summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/itemdb.c4
-rw-r--r--src/map/mob.c8
2 files changed, 7 insertions, 5 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 54458d248..2894463de 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -2095,9 +2095,9 @@ void itemdb_reload(void) {
//Epoque's awesome @reloaditemdb fix - thanks! [Ind]
//- Fixes the need of a @reloadmobdb after a @reloaditemdb to re-link monster drop data
- for( i = 0; i < MAX_MOB_DB; i++ ) {
+ for (i = 0; i < MAX_MOB_DB; i++) {
struct mob_db *entry;
- if( !((i < 1324 || i > 1363) && (i < 1938 || i > 1946)) )
+ if ((i >= MOBID_TREASURE_BOX1 && i <= MOBID_TREASURE_BOX40) || (i >= MOBID_TREASURE_BOX41 && i <= MOBID_TREASURE_BOX49))
continue;
entry = mob->db(i);
for(d = 0; d < MAX_MOB_DROP; d++) {
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
}