Skip to content

Commit

Permalink
Merge PR #14824 'tkrokli/spell_mod_stealth_stand_state' into 3.3.5
Browse files Browse the repository at this point in the history
(cherry picked from commit 1511855)
  • Loading branch information
jackpoz authored and Shauren committed Apr 10, 2016
1 parent 1747eec commit d9b8125
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 29 deletions.
12 changes: 12 additions & 0 deletions sql/updates/world/2016_04_10_04_world_2015_11_22_02_world.sql
@@ -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
9 changes: 4 additions & 5 deletions src/server/game/Spells/Spell.cpp
Expand Up @@ -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)
Expand Down Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion src/server/game/Spells/SpellInfo.h
Expand Up @@ -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,
Expand Down
23 changes: 0 additions & 23 deletions src/server/game/Spells/SpellMgr.cpp
Expand Up @@ -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:
Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit d9b8125

Please sign in to comment.