diff options
author | treeston <treeston.mmoc@gmail.com> | 2015-12-19 11:32:25 +0100 |
---|---|---|
committer | treeston <treeston.mmoc@gmail.com> | 2015-12-19 11:32:25 +0100 |
commit | 403ff2132490c7e785bb0ae5373d2c7a34d73e14 (patch) | |
tree | 2dc2e293e8fc0556aaa57d6a1fe37692a60ee943 | |
parent | 0f8743a5415d67cdf46228ca5d5b91123668b009 (diff) |
Spells/Penance: If hostile target is not in front, now fails in the initial cast rather than the triggered cast, thus not erroneously causing a cooldown.
-rw-r--r-- | src/server/scripts/Spells/spell_priest.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index 0914089f1c4..b5c3b26f1bf 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -617,8 +617,13 @@ class spell_pri_penance : public SpellScriptLoader { Player* caster = GetCaster()->ToPlayer(); if (Unit* target = GetExplTargetUnit()) - if (!caster->IsFriendlyTo(target) && !caster->IsValidAttackTarget(target)) - return SPELL_FAILED_BAD_TARGETS; + if (!caster->IsFriendlyTo(target)) + { + if (!caster->IsValidAttackTarget(target)) + return SPELL_FAILED_BAD_TARGETS; + if (!caster->isInFront(target)) + return SPELL_FAILED_UNIT_NOT_INFRONT; + } return SPELL_CAST_OK; } |