diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/battle.c | 8 | ||||
-rw-r--r-- | src/map/skill.c | 11 |
2 files changed, 12 insertions, 7 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index a40df7765..cda47fc8c 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -2166,18 +2166,14 @@ struct Damage battle_calc_magic_attack( switch(skill_num) { case MG_FIREWALL: + ad.dmotion = 0; //No flinch animation. if(mflag) //mflag has a value when it was checked against an undead in skill.c [Skotlex] ad.blewcount = 0; //No knockback - else - ad.blewcount |= 0x10000; + break; case HW_GRAVITATION: ad.dmotion = 0; //No flinch animation. break; - case WZ_STORMGUST: //Should knockback randomly. - ad.blewcount|=0x40000; - break; case PR_SANCTUARY: - ad.blewcount|=0x10000; ad.dmotion = 0; //No flinch animation. break; } 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) |