diff options
author | mekolat <mekolat@users.noreply.github.com> | 2016-03-24 15:10:40 -0400 |
---|---|---|
committer | mekolat <mekolat@users.noreply.github.com> | 2016-04-15 11:47:28 -0400 |
commit | 2a581450a6ff87c5a183be3855e68b3f2e1b53f3 (patch) | |
tree | 7caf4a3c16fa11b92d5cbaf5881d0829aa75b9dc /src/map/clif.cpp | |
parent | 6eb63903cd839b2c0dbf3acefceee4ba7b07b0f8 (diff) | |
download | tmwa-2a581450a6ff87c5a183be3855e68b3f2e1b53f3.tar.gz tmwa-2a581450a6ff87c5a183be3855e68b3f2e1b53f3.tar.bz2 tmwa-2a581450a6ff87c5a183be3855e68b3f2e1b53f3.tar.xz tmwa-2a581450a6ff87c5a183be3855e68b3f2e1b53f3.zip |
improvements, cleanup, bug fixes
Diffstat (limited to 'src/map/clif.cpp')
-rw-r--r-- | src/map/clif.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/map/clif.cpp b/src/map/clif.cpp index 4cf1de2..ea11bbf 100644 --- a/src/map/clif.cpp +++ b/src/map/clif.cpp @@ -2550,7 +2550,9 @@ int clif_damage(dumb_ptr<block_list> src, dumb_ptr<block_list> dst, nullpo_retz(src); nullpo_retz(dst); - sc_data = battle_get_sc_data(dst); + int target_hp = battle_get_hp(dst); + if (target_hp < damage) + damage = target_hp; // limit damage to hp Packet_Fixed<0x008a> fixed_8a; fixed_8a.src_id = src->bl_id; @@ -4423,6 +4425,8 @@ RecvResult clif_parse_NpcClicked(Session *s, dumb_ptr<map_session_data> sd) } if (sd->npc_id) return rv; + if (battle_get_class(map_id2bl(fixed.block_id)) == INVISIBLE_CLASS) + return rv; npc_click(sd, fixed.block_id); return rv; |