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

@@ -0,0 +1,12 @@
DELETE FROM `spell_custom_attr` WHERE `entry` IN (1130,1725,3600,32375,32592,35009,39897,43263,58838);
INSERT INTO `spell_custom_attr` (`entry`, `attributes`) VALUES
(1130, 64), -- Hunter spell 1130, Hunter's Mark Rank 1
(1725, 64), -- Rogue spell 1725, Distract
(3600, 64), -- Greater Earthbind Totem spell 3600, Earthbind
(32375, 64), -- Priest Discipline spell 32375, Mass Dispel
(32592, 64), -- Priest Discipline spell 32592, Mass Dispel
-- Spell ID 35009 - Server-side - Invisibility - Reducing threat
(35009, 64), -- Triggered by Mage Invisibility (Level 68), spells 66 & 67765
(39897, 64), -- Priest Discipline spell 39897, Mass Dispel
(43263, 64), -- Ghoul level 66 spell 43263, Ghoul Taunt
(58838, 64); -- Inherit Master's Threat List

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))

View File

@@ -187,7 +187,7 @@ enum SpellCustomAttributes
SPELL_ATTR0_CU_SHARE_DAMAGE = 0x00000008,
SPELL_ATTR0_CU_NO_INITIAL_THREAT = 0x00000010,
SPELL_ATTR0_CU_IS_TALENT = 0x00000020,
SPELL_ATTR0_CU_AURA_CC = 0x00000040,
SPELL_ATTR0_CU_DONT_BREAK_STEALTH = 0x00000040,
SPELL_ATTR0_CU_DIRECT_DAMAGE = 0x00000100,
SPELL_ATTR0_CU_CHARGE = 0x00000200,
SPELL_ATTR0_CU_PICKPOCKET = 0x00000400,

View File

@@ -2847,14 +2847,6 @@ void SpellMgr::LoadSpellInfoCustomAttributes()
switch (effect->ApplyAuraName)
{
case SPELL_AURA_MOD_POSSESS:
case SPELL_AURA_MOD_CONFUSE:
case SPELL_AURA_MOD_CHARM:
case SPELL_AURA_AOE_CHARM:
case SPELL_AURA_MOD_FEAR:
case SPELL_AURA_MOD_STUN:
spellInfo->AttributesCu |= SPELL_ATTR0_CU_AURA_CC;
break;
case SPELL_AURA_PERIODIC_HEAL:
case SPELL_AURA_PERIODIC_DAMAGE:
case SPELL_AURA_PERIODIC_DAMAGE_PERCENT:
@@ -2950,21 +2942,6 @@ void SpellMgr::LoadSpellInfoCustomAttributes()
if (talentSpells.count(spellInfo->Id))
spellInfo->AttributesCu |= SPELL_ATTR0_CU_IS_TALENT;
switch (spellInfo->SpellFamilyName)
{
case SPELLFAMILY_WARRIOR:
// Shout
if (spellInfo->SpellFamilyFlags[0] & 0x20000 || spellInfo->SpellFamilyFlags[1] & 0x20)
spellInfo->AttributesCu |= SPELL_ATTR0_CU_AURA_CC;
break;
case SPELLFAMILY_DRUID:
// Roar
if (spellInfo->SpellFamilyFlags[0] & 0x8)
spellInfo->AttributesCu |= SPELL_ATTR0_CU_AURA_CC;
break;
default:
break;
}
spellInfo->_InitializeExplicitTargetMask();
}