From fc0f3b45bff9b339ba04c6cb1dfb034cdca02426 Mon Sep 17 00:00:00 2001 From: skotlex Date: Mon, 25 Sep 2006 20:03:58 +0000 Subject: [PATCH] - Fixed item group 35 (lottobox) in item_misc.txt - Item group reading will now complain when a line doesn't has enough fields. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8865 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 2 ++ db/Changelog.txt | 1 + db/item_misc.txt | 20 ++++++++++---------- src/map/itemdb.c | 5 ++++- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index d876a9bce9..97d3721dfd 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. 2006/09/25 + * Item group reading will now complain when a line doesn't has enough + fields. [Skotlex] * Fixed #baselevelup adding instead of substracting status points when used with negative levels. Also made it reset your stats if there wasn't enough to substract from. [Skotlex] diff --git a/db/Changelog.txt b/db/Changelog.txt index 5dda40d7a9..e8ea68d6c4 100644 --- a/db/Changelog.txt +++ b/db/Changelog.txt @@ -20,6 +20,7 @@ ========================= 09/25 + * Fixed item group 35 (lottobox) in item_misc.txt [Skotlex] * Added Ninja/Gunslinger job exp as separate exp chart [Playtester] * Immaterial Sword now has a 3% chance of reducing target's sp by 30% [Playtester] 09/23 diff --git a/db/item_misc.txt b/db/item_misc.txt index dddf9ace92..a9b73fc9b1 100644 --- a/db/item_misc.txt +++ b/db/item_misc.txt @@ -610,13 +610,13 @@ 33,5042,5 //Bao Bao 33,5066,1 //Succubus Horn // Lotto Box -35,7391 -35,7392 -35,7393 -35,7394 -35,7395 -35,7396 -35,7397 -35,7398 -35,7540 -35,7541 +35,7391,1 +35,7392,1 +35,7393,1 +35,7394,1 +35,7395,1 +35,7396,1 +35,7397,1 +35,7398,1 +35,7540,1 +35,7541,1 diff --git a/src/map/itemdb.c b/src/map/itemdb.c index db21927a49..62d40fe514 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -493,8 +493,11 @@ static void itemdb_read_itemgroup_sub(const char* filename) } if(str[0]==NULL) continue; - if (j<3) + if (j<3) { + if (j>1) //Or else it barks on blank lines... + ShowWarning("itemdb_read_itemgroup: Insufficient fields for entry at %s:%d\n", filename, ln); continue; + } groupid = atoi(str[0]); if (groupid < 0 || groupid >= MAX_ITEMGROUP) { ShowWarning("itemdb_read_itemgroup: Invalid group %d in %s:%d\n", groupid, filename, ln);