summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-12-06 04:59:08 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-12-06 04:59:08 +0000
commitad6eb9badbd17de02aa8c87dae3b71ed8cf1bb03 (patch)
treee8675637aad021aff277046d883730b191a23d10 /src
parent699c9568b18f5860091f5dbea5615b3978f75b11 (diff)
downloadhercules-ad6eb9badbd17de02aa8c87dae3b71ed8cf1bb03.tar.gz
hercules-ad6eb9badbd17de02aa8c87dae3b71ed8cf1bb03.tar.bz2
hercules-ad6eb9badbd17de02aa8c87dae3b71ed8cf1bb03.tar.xz
hercules-ad6eb9badbd17de02aa8c87dae3b71ed8cf1bb03.zip
Fixed Performance Issue on Mob DB loading bugreport:4980
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15013 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/mob.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 8181fb5e7..df547c77d 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -3593,7 +3593,8 @@ static bool mob_parse_dbrow(char** str)
db->dropitem[i].p = 0; //No drop.
continue;
}
- type = itemdb_type(db->dropitem[i].nameid);
+ id = itemdb_search(db->dropitem[i].nameid);
+ type = id->type;
rate = atoi(str[k+1]);
if( (class_ >= 1324 && class_ <= 1363) || (class_ >= 1938 && class_ <= 1946) )
{ //Treasure box drop rates [Skotlex]
@@ -3637,7 +3638,6 @@ static bool mob_parse_dbrow(char** str)
//calculate and store Max available drop chance of the item
if( db->dropitem[i].p && (class_ < 1324 || class_ > 1363) && (class_ < 1938 || class_ > 1946) )
{ //Skip treasure chests.
- id = itemdb_search(db->dropitem[i].nameid);
if (id->maxchance == -1 || (id->maxchance < db->dropitem[i].p) ) {
id->maxchance = db->dropitem[i].p; //item has bigger drop chance or sold in shops
}