Merge PR #14824 'tkrokli/spell_mod_stealth_stand_state' into 3.3.5

(cherry picked from commit 1511855fea)
This commit is contained in:
jackpoz
2015-11-22 15:37:32 +01:00
committed by Shauren
parent 1747eec6be
commit d9b8125ca5
4 changed files with 17 additions and 29 deletions

View File

@@ -2464,9 +2464,8 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
{
m_caster->CombatStart(unit, m_spellInfo->HasInitialAggro());
if (m_spellInfo->HasAttribute(SPELL_ATTR0_CU_AURA_CC))
if (!unit->IsStandState())
unit->SetStandState(UNIT_STAND_STATE_STAND);
if (!unit->IsStandState())
unit->SetStandState(UNIT_STAND_STATE_STAND);
}
if (spellHitTarget)
@@ -2534,8 +2533,8 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleA
if (m_caster->_IsValidAttackTarget(unit, m_spellInfo))
{
unit->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_HITBYSPELL);
/// @todo This is a hack. But we do not know what types of stealth should be interrupted by CC
if ((m_spellInfo->HasAttribute(SPELL_ATTR0_CU_AURA_CC)) && unit->IsControlledByPlayer())
if (!m_spellInfo->HasAttribute(SPELL_ATTR0_CU_DONT_BREAK_STEALTH))
unit->RemoveAurasByType(SPELL_AURA_MOD_STEALTH);
}
else if (m_caster->IsFriendlyTo(unit))