summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-14 11:15:32 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-01-14 11:15:32 +0000
commit46735c13ce91c0dcb2981f0a7a40b542d6d91bb3 (patch)
tree9b5e857033f561393e6238bea17a31d374ca0808 /src/map
parent64c950102f6a680c0ae32bcc9d3e6b843aea9db1 (diff)
downloadhercules-46735c13ce91c0dcb2981f0a7a40b542d6d91bb3.tar.gz
hercules-46735c13ce91c0dcb2981f0a7a40b542d6d91bb3.tar.bz2
hercules-46735c13ce91c0dcb2981f0a7a40b542d6d91bb3.tar.xz
hercules-46735c13ce91c0dcb2981f0a7a40b542d6d91bb3.zip
fixed battle_delay_damage from delaying damage in 1ms or less interval (it'd receive 1 because the client delay stuff understands 1 = wait for damage)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15450 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 025339fe1..1353a1bfb 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -236,7 +236,7 @@ int battle_delay_damage (unsigned int tick, int amotion, struct block_list *src,
if( sc && sc->data[SC_DEVOTION] && damage > 0 && skill_id != PA_PRESSURE && skill_id != CR_REFLECTSHIELD )
damage = 0;
- if (!battle_config.delay_battle_damage) {
+ if ( !battle_config.delay_battle_damage || amotion <= 1 ) {
map_freeblock_lock();
status_fix_damage(src, target, damage, ddelay); // We have to seperate here between reflect damage and others [icescope]
if( attack_type && !status_isdead(target) )
@@ -258,6 +258,7 @@ int battle_delay_damage (unsigned int tick, int amotion, struct block_list *src,
dat->distance = distance_bl(src, target)+10; //Attack should connect regardless unless you teleported.
if (src->type != BL_PC && amotion > 1000)
amotion = 1000; //Aegis places a damage-delay cap of 1 sec to non player attacks. [Skotlex]
+
add_timer(tick+amotion, battle_delay_damage_sub, src->id, (intptr_t)dat);
return 0;