Переглянути джерело

Fixed Quest DB for > 65535

Fixes #675
Lemongrass3110 9 роки тому
батько
коміт
a2d8b817ca
2 змінених файлів з 3 додано та 4 видалено
  1. 1 1
      src/map/quest.c
  2. 2 3
      src/map/quest.h

+ 1 - 1
src/map/quest.c

@@ -407,7 +407,7 @@ void quest_read_txtdb(void)
 		while(fgets(line, sizeof(line), fp)) {
 			struct quest_db *quest = NULL;
 			char *str[19], *p;
-			uint16 quest_id = 0;
+			int quest_id = 0;
 			uint8 i;
 
 			++ln;

+ 2 - 3
src/map/quest.h

@@ -4,8 +4,6 @@
 #ifndef _QUEST_H_
 #define _QUEST_H_
 
-#define MAX_QUEST_DB (62238 + 1) // Highest quest ID + 1
-
 struct quest_dropitem {
 	uint16 nameid;
 	uint16 count;
@@ -22,7 +20,8 @@ struct quest_objective {
 };
 
 struct quest_db {
-	uint16 id;
+	// TODO: find out if signed or unsigned in client
+	int id;
 	unsigned int time;
 	uint8 objectives_count;
 	struct quest_objective *objectives;