aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2017-02-22 16:50:05 -0300
committerariel- <ariel-@users.noreply.github.com>2017-02-22 16:50:05 -0300
commitf948ae80fc9a89f4ba3e22a7e93dd4ca3a13bd70 (patch)
treeea71a5286d9dcc75db287888d7d87242a47c0bd5 /src
parenta21cda6ad681011deecf14a4c954ebda8c3dabfa (diff)
Core/Spell: fix Glyph of Devastate interaction with Glyph of Sunder Armor
- Killed existing ModStackAmount hack, spell is always casted in sniffs (twice with Glyph of Devastate) Closes #14633
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/SpellEffects.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index debf220c133..7b17d8d485a 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -3138,20 +3138,15 @@ void Spell::EffectWeaponDmg(SpellEffIndex effIndex)
// Devastate (player ones)
if (m_spellInfo->SpellFamilyFlags[1] & 0x40)
{
- // Player can apply only 58567 Sunder Armor effect.
- bool needCast = !unitTarget->HasAura(58567, m_caster->GetGUID());
- if (needCast)
+ m_caster->CastSpell(unitTarget, 58567, true);
+ // 58388 - Glyph of Devastate dummy aura.
+ if (m_caster->HasAura(58388))
m_caster->CastSpell(unitTarget, 58567, true);
if (Aura* aur = unitTarget->GetAura(58567, m_caster->GetGUID()))
- {
- // 58388 - Glyph of Devastate dummy aura.
- if (int32 num = (needCast ? 0 : 1) + (m_caster->HasAura(58388) ? 1 : 0))
- aur->ModStackAmount(num);
- fixed_bonus += (aur->GetStackAmount() - 1) * CalculateDamage(2, unitTarget);
- }
+ fixed_bonus += (aur->GetStackAmount() - 1) * CalculateDamage(EFFECT_2, unitTarget); // subtract 1 so fixed bonus is not applied twice
}
- if (m_spellInfo->SpellFamilyFlags[0] & 0x8000000) // Mocking Blow
+ else if (m_spellInfo->SpellFamilyFlags[0] & 0x8000000) // Mocking Blow
{
if (unitTarget->IsImmunedToSpellEffect(m_spellInfo, EFFECT_1, m_caster) || unitTarget->GetTypeId() == TYPEID_PLAYER)
{