Skip to content
Permalink
Browse files

Core/Spells: Fix stacking for some generic spells

Closes #1616
  • Loading branch information...
AbraKabastard committed May 15, 2019
1 parent f627698 commit 1b56eed9cfb9df7f53eeb966578ec1ada4faadb5
Showing with 4 additions and 5 deletions.
  1. +0 −3 src/game/SpellEffects.cpp
  2. +1 −1 src/game/SpellMgr.cpp
  3. +3 −1 src/game/Unit.cpp
@@ -5304,9 +5304,6 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
if (!unitTarget)
return;

// Prevent stacking of mounts
unitTarget->RemoveSpellsCausingAura(SPELL_AURA_MOUNTED);

// Two separate mounts depending on area id (allows use both in and out of specific instance)
if (unitTarget->GetAreaId() == 3428)
unitTarget->CastSpell(unitTarget, 25863, false);
@@ -1629,7 +1629,7 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2, bool
if (!spellInfo_1->SpellIconID
|| spellInfo_1->SpellIconID == 1
|| spellInfo_1->SpellIconID != spellInfo_2->SpellIconID)
return false;
return true;
}

// check for class spells
@@ -699,7 +699,9 @@ void Unit::RemoveMovementImpairingAuras()

void Unit::RemoveSpellsCausingAura(AuraType auraType)
{
if (auraType >= TOTAL_AURAS) return;
if (auraType >= TOTAL_AURAS)
return;

AuraList::iterator iter, next;
for (iter = m_modAuras[auraType].begin(); iter != m_modAuras[auraType].end(); iter = next)
{

0 comments on commit 1b56eed

Please sign in to comment.
You can’t perform that action at this time.