fix(Core/Spells): Devastate vs Glyph of Sunder Armor. (#8705)

Fixes #8506
This commit is contained in:
UltraNix
2021-10-25 04:31:19 +02:00
committed by GitHub
parent 0df821cbb0
commit c69e309681
2 changed files with 4 additions and 14 deletions

View File

@@ -3380,17 +3380,14 @@ void Spell::EffectWeaponDmg(SpellEffIndex effIndex)
// Devastate (player ones)
if (m_spellInfo->SpellFamilyFlags[1] & 0x40)
{
// Player can apply only 58567 Sunder Armor effect.
// Xinef: 7386 triggers 58567
bool needCast = !unitTarget->HasAura(58567);
if (needCast)
m_caster->CastSpell(unitTarget, 7386, true);
m_caster->CastSpell(unitTarget, 58567, true);
if (Aura* aur = unitTarget->GetAura(58567))
{
// 58388 - Glyph of Devastate dummy aura.
if (int32 num = (needCast ? 0 : 1) + (m_caster->HasAura(58388) ? 1 : 0))
aur->ModStackAmount(num);
if (m_caster->HasAura(58388))
aur->ModStackAmount(1);
spell_bonus += (aur->GetStackAmount() - 1) * CalculateSpellDamage(2, unitTarget);
}
}

View File

@@ -4526,13 +4526,6 @@ void SpellMgr::LoadDbcDataCorrections()
spellInfo->SpellFamilyName = SPELLFAMILY_WARRIOR;
});
// Sunder Armor
ApplySpellFix({ 58567 }, [](SpellEntry* spellInfo)
{
// trigger, remove spellfamilyflags because of glyph of sunder armor
spellInfo->SpellFamilyFlags = flag96(0x0, 0x0, 0x0);
});
// Sunder Armor - Old Ranks
ApplySpellFix({ 7405, 8380, 11596, 11597, 25225, 47467 }, [](SpellEntry* spellInfo)
{