Den
23.04.2012, 20:17
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index a389f3c..ba5e497 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -4814,6 +4814,13 @@ SpellCastResult Spell::CheckCast(bool strict)
return SPELL_FAILED_MOVING;
}
+ if (!m_caster->isInCombat())
+ {
+ // Hunter Disengage allow use only in combat
+ if (m_spellInfo->IsFitToFamily(SPELLFAMILY_HUNTER, UI64LIT(0x0000400000000000)))
+ return SPELL_FAILED_CASTER_AURASTATE;
+ }
+
if (!m_IsTriggeredSpell && NeedsComboPoints(m_spellInfo) && !m_caster->IsIgnoreUnitState(m_spellInfo, IGNORE_UNIT_TARGET_STATE) &&
(!m_targets.getUnitTarget() || m_targets.getUnitTarget()->GetObjectGuid() != ((Player*)m_caster)->GetComboTargetGuid()))
// warrior not have real combo-points at client side but use this way for mark allow Overpower use
index a389f3c..ba5e497 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -4814,6 +4814,13 @@ SpellCastResult Spell::CheckCast(bool strict)
return SPELL_FAILED_MOVING;
}
+ if (!m_caster->isInCombat())
+ {
+ // Hunter Disengage allow use only in combat
+ if (m_spellInfo->IsFitToFamily(SPELLFAMILY_HUNTER, UI64LIT(0x0000400000000000)))
+ return SPELL_FAILED_CASTER_AURASTATE;
+ }
+
if (!m_IsTriggeredSpell && NeedsComboPoints(m_spellInfo) && !m_caster->IsIgnoreUnitState(m_spellInfo, IGNORE_UNIT_TARGET_STATE) &&
(!m_targets.getUnitTarget() || m_targets.getUnitTarget()->GetObjectGuid() != ((Player*)m_caster)->GetComboTargetGuid()))
// warrior not have real combo-points at client side but use this way for mark allow Overpower use