diff options
author | shennetsind <ind@henn.et> | 2013-07-05 23:06:28 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-07-05 23:06:28 -0300 |
commit | 144a9d0843dfe47e0b58c8857762f58ae70543c8 (patch) | |
tree | 9895c9f8fd9d6d2d0af34d83148adcd36dc777ea /src/map/battle.c | |
parent | 04251494ebf61d3fba1a0b87cb80e90c6c9e32fd (diff) | |
download | hercules-144a9d0843dfe47e0b58c8857762f58ae70543c8.tar.gz hercules-144a9d0843dfe47e0b58c8857762f58ae70543c8.tar.bz2 hercules-144a9d0843dfe47e0b58c8857762f58ae70543c8.tar.xz hercules-144a9d0843dfe47e0b58c8857762f58ae70543c8.zip |
Fixed Bug #7307
http://hercules.ws/board/tracker/issue-7307-status-weapon-switch/
Special Thanks to kyeme, Beret.
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 3268128ac..cf952a3b9 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -226,7 +226,7 @@ int battle_delay_damage_sub(int tid, unsigned int tick, int id, intptr_t data) { } src = iMap->id2bl(dat->src_id); - + if( src && target->m == src->m && (target->type != BL_PC || ((TBL_PC*)target)->invincible_timer == INVALID_TIMER) && check_distance_bl(src, target, dat->distance) ) //Check to see if you haven't teleported. [Skotlex] @@ -246,6 +246,9 @@ int battle_delay_damage_sub(int tid, unsigned int tick, int id, intptr_t data) { status_fix_damage(target, target, dat->damage, dat->delay); iMap->freeblock_unlock(); } + + if( src && src->type == BL_PC ) + ((TBL_PC*)src)->delayed_damage--; } ers_free(delay_damage_ers, dat); return 0; @@ -287,6 +290,9 @@ int battle_delay_damage (unsigned int tick, int amotion, struct block_list *src, if (src->type != BL_PC && amotion > 1000) amotion = 1000; //Aegis places a damage-delay cap of 1 sec to non player attacks. [Skotlex] + if( src->type == BL_PC ) + ((TBL_PC*)src)->delayed_damage++; + iTimer->add_timer(tick+amotion, battle->delay_damage_sub, 0, (intptr_t)dat); return 0; |