summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-12-15 00:23:15 +0100
committerHaru <haru@dotalux.com>2015-12-28 18:35:59 +0100
commit09a2201e0d8563608a421378970f9d9ae6bc38bc (patch)
tree00e3dacdd6818e5665cc440f25ef183c7c9b9eb9 /src/map/mob.c
parent08fc3deb0234208b0abf3ed7fb4eadba44456fdf (diff)
downloadhercules-09a2201e0d8563608a421378970f9d9ae6bc38bc.tar.gz
hercules-09a2201e0d8563608a421378970f9d9ae6bc38bc.tar.bz2
hercules-09a2201e0d8563608a421378970f9d9ae6bc38bc.tar.xz
hercules-09a2201e0d8563608a421378970f9d9ae6bc38bc.zip
Replaced some numeric mob IDs with the proper constants (MOBID_TREASURE_BOX*)
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 21ebea650..48f1e531e 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -3832,7 +3832,7 @@ void mob_read_db_drops_sub(struct mob_db *entry, struct status_data *mstatus, in
continue;
}
type = id->type;
- if ((class_ >= 1324 && class_ <= 1363) || (class_ >= 1938 && class_ <= 1946)) {
+ if ((class_ >= MOBID_TREASURE_BOX1 && class_ <= MOBID_TREASURE_BOX40) || (class_ >= MOBID_TREASURE_BOX41 && class_ <= MOBID_TREASURE_BOX49)) {
//Treasure box drop rates [Skotlex]
rate_adjust = battle_config.item_rate_treasure;
ratemin = battle_config.item_drop_treasure_min;
@@ -3873,8 +3873,10 @@ void mob_read_db_drops_sub(struct mob_db *entry, struct status_data *mstatus, in
entry->dropitem[idx].p = mob->drop_adjust(value, rate_adjust, ratemin, ratemax);
//calculate and store Max available drop chance of the item
- if (entry->dropitem[idx].p && (class_ < 1324 || class_ > 1363) && (class_ < 1938 || class_ > 1946))
- { //Skip treasure chests.
+ if (entry->dropitem[idx].p
+ && (class_ < MOBID_TREASURE_BOX1 || class_ > MOBID_TREASURE_BOX40)
+ && (class_ < MOBID_TREASURE_BOX41 || class_ > MOBID_TREASURE_BOX49)) {
+ //Skip treasure chests.
if (id->maxchance == -1 || (id->maxchance < entry->dropitem[idx].p) ) {
id->maxchance = entry->dropitem[idx].p; //item has bigger drop chance or sold in shops
}