summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-11-14 22:26:26 +0000
committerL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-11-14 22:26:26 +0000
commit2c2dd14cc70502ec717d7f982ecdf561b503c27f (patch)
tree3be7f96d5154315adf53431134ee3ac2b62cc6a1 /src
parent1446f510effe4991378d66e09448faf4ae578672 (diff)
downloadhercules-2c2dd14cc70502ec717d7f982ecdf561b503c27f.tar.gz
hercules-2c2dd14cc70502ec717d7f982ecdf561b503c27f.tar.bz2
hercules-2c2dd14cc70502ec717d7f982ecdf561b503c27f.tar.xz
hercules-2c2dd14cc70502ec717d7f982ecdf561b503c27f.zip
* Updated quest_read_db. Might need reviewing. ;-;
- Reports entries when read by server at start up like other DBs. - Will now skip blank lines instead of reporting false errors. - Will report when entries are > MAX_QUEST_DB. * Updated quest and item DB with Eden Group information. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/renewal@14463 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/common/mmo.h2
-rw-r--r--src/map/quest.c8
2 files changed, 8 insertions, 2 deletions
diff --git a/src/common/mmo.h b/src/common/mmo.h
index 0d48418c3..b1a257e9c 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -105,7 +105,7 @@
#define MAX_GUILDCASTLE 34 // Updated to include new entries for WoE:SE. [L0ne_W0lf]
#define MAX_GUILDLEVEL 50
#define MAX_GUARDIANS 8 //Local max per castle. [Skotlex]
-#define MAX_QUEST_DB 1500 //Max quests that the server will load
+#define MAX_QUEST_DB 2000 //Max quests that the server will load
#define MAX_QUEST_OBJECTIVES 3 //Max quest objectives for a quest
#define MIN_HAIR_STYLE battle_config.min_hair_style
diff --git a/src/map/quest.c b/src/map/quest.c
index d751b27ff..3e43fcda6 100644
--- a/src/map/quest.c
+++ b/src/map/quest.c
@@ -314,6 +314,10 @@ int quest_read_db(void)
while(fgets(line, sizeof(line), fp))
{
+ if (k == MAX_QUEST_DB) {
+ ShowError("quest_read_db: Too many entries specified in %s/quest_db.txt!\n", db_path);
+ break;
+ }
if(line[0]=='/' && line[1]=='/')
continue;
memset(str,0,sizeof(str));
@@ -326,6 +330,8 @@ int quest_read_db(void)
*np = 0;
p = np + 1;
}
+ else if (str[0] == NULL)
+ continue;
else
{
ShowError("quest_read_db: insufficient columes in line %s\n", line);
@@ -352,7 +358,7 @@ int quest_read_db(void)
k++;
}
fclose(fp);
- ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","quest_db.txt");
+ ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", k, "quest_db.txt");
return 0;
}