diff options
author | HoraK-FDF <horak-fdf@web.de> | 2022-11-17 13:37:20 +0000 |
---|---|---|
committer | Jesusalva Jesusalva <jesusalva@themanaworld.org> | 2022-11-17 13:37:20 +0000 |
commit | 148ab787d51c7c9c71540f799d37fb748cf19135 (patch) | |
tree | c29a691b1692960bda8589ad7cf78b94d5202aa2 /src/map/mob.cpp | |
parent | 1b097707c019a1c9a121998be942a7237a7f3592 (diff) | |
download | tmwa-148ab787d51c7c9c71540f799d37fb748cf19135.tar.gz tmwa-148ab787d51c7c9c71540f799d37fb748cf19135.tar.bz2 tmwa-148ab787d51c7c9c71540f799d37fb748cf19135.tar.xz tmwa-148ab787d51c7c9c71540f799d37fb748cf19135.zip |
MobInfo
* includes @mobinfo ingame command aswell as mobinfo functions for scripts
* enhanced summon script command to take a name to support spawn names
* moved @summon to where other mob related commands are
* added enchanter and koyntety cooldown symbols
* some translations
* some constants added for drops and mobs
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; |