diff options
author | AJ Keresztes <aj@keresztes.us> | 2024-05-15 15:08:37 +0000 |
---|---|---|
committer | AJ Keresztes <aj@keresztes.us> | 2024-05-15 15:08:37 +0000 |
commit | 354c8402d3fcd830c1f2671aeaa0436963432efb (patch) | |
tree | dc1c9b78c75927cc83602a63f0e17916def434de /src/map/mob.cpp | |
parent | 66aa8daa855727ec925c3cbebba62b92fde4b204 (diff) | |
parent | aaaf2321b8a0e47c46f8ba8a2090c423f5947cf9 (diff) | |
download | tmwa-354c8402d3fcd830c1f2671aeaa0436963432efb.tar.gz tmwa-354c8402d3fcd830c1f2671aeaa0436963432efb.tar.bz2 tmwa-354c8402d3fcd830c1f2671aeaa0436963432efb.tar.xz tmwa-354c8402d3fcd830c1f2671aeaa0436963432efb.zip |
Merge branch tmwa:master into master
Diffstat (limited to 'src/map/mob.cpp')
-rw-r--r-- | src/map/mob.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/map/mob.cpp b/src/map/mob.cpp index 4fd9d6d..996e2bb 100644 --- a/src/map/mob.cpp +++ b/src/map/mob.cpp @@ -2556,10 +2556,12 @@ int mob_damage(dumb_ptr<block_list> src, dumb_ptr<mob_data> md, int damage, // activity if (sd) + { if (sd->activity.attacks == 2147483647) sd->activity.attacks = 1; else sd->activity.attacks++; + } if (md->hp > 0) { @@ -2736,6 +2738,9 @@ int mob_damage(dumb_ptr<block_list> src, dumb_ptr<mob_data> md, int damage, if (sd && md && battle_config.pk_mode == 1 && (get_mob_db(md->mob_class).lv - sd->status.base_level >= 20)) drop_rate.num *= 1.25; // pk_mode increase drops if 20 level difference [Valaris] + + // server-wide drop rate scaling + drop_rate.num = (drop_rate.num * battle_config.drop_rate) / 100; if (!random_::chance(drop_rate)) continue; |