diff options
author | Jesusalva Jesusalva <jesusalva@themanaworld.org> | 2022-11-17 13:37:20 +0000 |
---|---|---|
committer | Jesusalva Jesusalva <jesusalva@themanaworld.org> | 2022-11-17 13:37:20 +0000 |
commit | 1c3b142131b4a3f987ed8667d9e72ad1dda09065 (patch) | |
tree | 7e61e57523062bdbee2a39c7e95897ce57c32cf7 /src/map/mob.cpp | |
parent | de1a0ca22db4a49345b02b653efa3091cd08a2db (diff) | |
parent | 148ab787d51c7c9c71540f799d37fb748cf19135 (diff) | |
download | tmwa-1c3b142131b4a3f987ed8667d9e72ad1dda09065.tar.gz tmwa-1c3b142131b4a3f987ed8667d9e72ad1dda09065.tar.bz2 tmwa-1c3b142131b4a3f987ed8667d9e72ad1dda09065.tar.xz tmwa-1c3b142131b4a3f987ed8667d9e72ad1dda09065.zip |
Merge branch 'mobinfo' into 'master'
Mobinfo
See merge request legacy/tmwa!237
Diffstat (limited to 'src/map/mob.cpp')
-rw-r--r-- | src/map/mob.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/mob.cpp b/src/map/mob.cpp index 0da946a..0f273a8 100644 --- a/src/map/mob.cpp +++ b/src/map/mob.cpp @@ -115,7 +115,7 @@ Species mobdb_searchname(MobName str) Species mobdb_checkid(Species id) { // value range is [1001, 2000] - if (wrap<Species>(1000) < id && id < wrap<Species>(2001)) + if (wrap<Species>(MinMobID-1) < id && id < wrap<Species>(MaxMobID+1)) return id; return Species(); } @@ -2647,7 +2647,7 @@ int mob_damage(dumb_ptr<block_list> src, dumb_ptr<mob_data> md, int damage, // item drop if (!(type & 1)) { - for (int i = 0; i < 8; i++) + for (int i = 0; i < MaxDrops; i++) { if (md->state.special_mob_ai >= 1 && battle_config.alchemist_summon_reward != 1) // Added [Valaris] break; // End @@ -3439,7 +3439,7 @@ int mob_makedummymobdb(Species mob_class) get_mob_db(mob_class).adelay = 1000_ms; get_mob_db(mob_class).amotion = 500_ms; get_mob_db(mob_class).dmotion = 500_ms; - for (i = 0; i < 8; i++) + for (i = 0; i < MaxDrops; i++) { get_mob_db(mob_class).dropitem[i].nameid = ItemNameId(); get_mob_db(mob_class).dropitem[i].p.num = 0; @@ -3577,7 +3577,7 @@ bool mob_readdb(ZString filename) // TODO move this lower get_mob_db(mob_class) = std::move(mdbv); - for (int i = 0; i < 8; i++) + for (int i = 0; i < MaxDrops; i++) { int rate = get_mob_db(mob_class).dropitem[i].p.num; if (rate < 1) rate = 1; |