aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/game/Spells/Auras/SpellAuras.cpp17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index d9483a848f6..7e6f1d1b402 100644
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -1878,20 +1878,7 @@ bool Aura::CanStackWith(Aura const* existingAura) const
}
}
- bool isVehicleAura1 = false;
- bool isVehicleAura2 = false;
- uint8 i = 0;
- while (i < MAX_SPELL_EFFECTS && !(isVehicleAura1 && isVehicleAura2))
- {
- if (m_spellInfo->Effects[i].ApplyAuraName == SPELL_AURA_CONTROL_VEHICLE)
- isVehicleAura1 = true;
- if (existingSpellInfo->Effects[i].ApplyAuraName == SPELL_AURA_CONTROL_VEHICLE)
- isVehicleAura2 = true;
-
- ++i;
- }
-
- if (isVehicleAura1 && isVehicleAura2)
+ if (HasEffectType(SPELL_AURA_CONTROL_VEHICLE) && existingAura->HasEffectType(SPELL_AURA_CONTROL_VEHICLE))
{
Vehicle* veh = NULL;
if (GetOwner()->ToUnit())
@@ -1903,7 +1890,7 @@ bool Aura::CanStackWith(Aura const* existingAura) const
if (!veh->GetAvailableSeatCount())
return false; // No empty seat available
- return true; // Empty seat available (skip rest)
+ return !sameCaster; // Empty seat available (skip rest) and different caster
}
// spell of same spell rank chain