summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-23 14:40:22 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-23 14:40:22 +0000
commit67e3647db031dabdb4b300e24ce3d23af4b4889b (patch)
tree2d9feb6f6be00d0297619c6fbdf0fc283486048a /src/map/skill.c
parentc6b5397e443179b28e6e094452fd4966ceb36798 (diff)
downloadhercules-67e3647db031dabdb4b300e24ce3d23af4b4889b.tar.gz
hercules-67e3647db031dabdb4b300e24ce3d23af4b4889b.tar.bz2
hercules-67e3647db031dabdb4b300e24ce3d23af4b4889b.tar.xz
hercules-67e3647db031dabdb4b300e24ce3d23af4b4889b.zip
- A skill's walk delay will also delay your can-attack time when the skill connects, since this is the behaviour of Sonic Blows as described by Tharis.
- Added missing declaration of merc_get_hom_viewdata in mercenary.h git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9698 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index d79d9b4ae..4bff55a5c 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2090,6 +2090,15 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
if (su->group && skill_get_inf2(su->group->skill_id)&INF2_TRAP)
damage = 0; //Only Heaven's drive may damage traps. [Skotlex]
}
+
+ if (dmg.dmg_lv == ATK_DEF && (type = skill_get_walkdelay(skillid, skilllv)) > 0)
+ { //Skills with can't walk delay also stop normal attacking for that
+ //duration when the attack connects. [Skotlex]
+ struct unit_data *ud = unit_bl2ud(src);
+ if (ud && DIFF_TICK(ud->attackabletime, tick + type) < 0)
+ ud->attackabletime = tick + type;
+ }
+
if (!dmg.amotion) {
status_fix_damage(src,bl,damage,dmg.dmotion); //Deal damage before knockback to allow stuff like firewall+storm gust combo.
if (dmg.dmg_lv == ATK_DEF || damage > 0) {