diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-03 16:26:38 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-03 16:26:38 +0000 |
commit | 443cecd840029f0b758d32eb3e51d12e555ef0a1 (patch) | |
tree | 2f978e6e3faf1a18769a95cfcb8e2f47deb1c926 /src/map/battle.c | |
parent | 5e4f830c297c26c9bccb1bac30c04f086b5e2ab2 (diff) | |
download | hercules-443cecd840029f0b758d32eb3e51d12e555ef0a1.tar.gz hercules-443cecd840029f0b758d32eb3e51d12e555ef0a1.tar.bz2 hercules-443cecd840029f0b758d32eb3e51d12e555ef0a1.tar.xz hercules-443cecd840029f0b758d32eb3e51d12e555ef0a1.zip |
- Moved skill_counter_additional_effect calls to trigger right after skill_additional_effect (which means they trigger at the end of the attack motion for physical attacks)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5888 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 3b4d5d216..2851f0c88 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -125,8 +125,14 @@ int battle_delay_damage_sub (int tid, unsigned int tick, int id, int data) target->m == dat->src->m && check_distance_bl(dat->src, target, dat->distance)) //Check to see if you haven't teleported. [Skotlex]
{
battle_damage(dat->src, target, dat->damage, dat->flag);
- if (!status_isdead(target) && (dat->dmg_lv == ATK_DEF || dat->damage > 0) && dat->attack_type)
- skill_additional_effect(dat->src,target,dat->skill_id,dat->skill_lv,dat->attack_type, tick);
+ if ((dat->dmg_lv == ATK_DEF || dat->damage > 0) && dat->attack_type)
+ {
+ if (!status_isdead(target))
+ skill_additional_effect(dat->src,target,dat->skill_id,dat->skill_lv,dat->attack_type, tick);
+
+ skill_counter_additional_effect(dat->src,target,dat->skill_id,dat->skill_lv,dat->attack_type,tick);
+ }
+
}
ers_free(delay_damage_ers, dat);
return 0;
@@ -140,8 +146,13 @@ int battle_delay_damage (unsigned int tick, struct block_list *src, struct block if (!battle_config.delay_battle_damage) {
battle_damage(src, target, damage, flag);
- if (!status_isdead(target) && (damage > 0 || dmg_lv == ATK_DEF) && attack_type)
- skill_additional_effect(src, target, skill_id, skill_lv, attack_type, gettick());
+ if ((damage > 0 || dmg_lv == ATK_DEF) && attack_type)
+ {
+ if (!status_isdead(target))
+ skill_additional_effect(src, target, skill_id, skill_lv, attack_type, gettick());
+
+ skill_counter_additional_effect(src, target, skill_id, skill_lv, attack_type, gettick());
+ }
return 0;
}
dat = ers_alloc(delay_damage_ers, struct delay_damage);
@@ -3068,8 +3079,6 @@ int battle_weapon_attack( struct block_list *src,struct block_list *target, battle_delay_damage(tick+wd.amotion, src, target, BF_WEAPON, 0, 0, damage, wd.dmg_lv, 0);
- if (wd.dmg_lv == ATK_DEF || damage > 0) //Added counter effect [Skotlex]
- skill_counter_additional_effect(src, target, 0, 0, BF_WEAPON, tick);
if (!status_isdead(target) && damage > 0) {
if (sd) {
int boss = status_get_mode(target)&MD_BOSS;
|