summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-07-09 12:15:04 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-07-09 12:15:04 +0000
commit7d396ef4ecd85de70c6b6cc7836dea5874bd05a6 (patch)
tree9c20e40a4a888d0022b715a22858c8b37f870fb4 /src/map/skill.c
parent1f8c922a8ffd8fb216c050b86fdbc4040e5780f6 (diff)
downloadhercules-7d396ef4ecd85de70c6b6cc7836dea5874bd05a6.tar.gz
hercules-7d396ef4ecd85de70c6b6cc7836dea5874bd05a6.tar.bz2
hercules-7d396ef4ecd85de70c6b6cc7836dea5874bd05a6.tar.xz
hercules-7d396ef4ecd85de70c6b6cc7836dea5874bd05a6.zip
A rather ugly fix to fix knockback for Firewall, Stormgust and Sanctuary
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10869 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index b0ca693b1..5df5d3355 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2141,7 +2141,16 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
//Only knockback if it's still alive, otherwise a "ghost" is left behind. [Skotlex]
if (dmg.blewcount > 0 && !status_isdead(bl))
- skill_blown(dsrc,bl,dmg.blewcount,-1,0);
+ {
+ int direction = -1; // default
+ switch(skillid)
+ {
+ case MG_FIREWALL: direction = unit_getdir(bl); break; // backwards
+ case WZ_STORMGUST: direction = rand()%8; break; // randomly
+ case PR_SANCTUARY: direction = unit_getdir(bl); break; // backwards
+ }
+ skill_blown(dsrc,bl,dmg.blewcount,direction,0);
+ }
//Delayed damage must be dealt after the knockback (it needs to know actual position of target)
if (dmg.amotion)