diff options
| author | treeston <treeston.mmoc@gmail.com> | 2015-12-19 11:32:25 +0100 |
|---|---|---|
| committer | MitchesD <majklprofik@seznam.cz> | 2016-01-16 13:16:57 +0100 |
| commit | e1fae1841768548a1a79dbf10952a20044928a80 (patch) | |
| tree | 4ef79ace459ef2212e802dadb77db937aa7e1887 | |
| parent | 6252980f66bd81c2b456625715d36d29046e2462 (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.
(cherry picked from commit 403ff2132490c7e785bb0ae5373d2c7a34d73e14)
| -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 58eb2088fca..c381c902f95 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -825,8 +825,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; } |
