Core/Vehicles: Fixed crashes in StopCastingCharm happening when unit was attempting to enter 2 vehicles at the same time
Closes #9293 Closes #9618
This commit is contained in:
1 parent
55fa58af19
commit
1addad4dbd
6 files changed
+33
-29
No files matched your search
@@ -3263,7 +3263,7 @@ void Unit::_AddAura(UnitAura* aura, Unit* caster)
|
||||
if (aura->IsRemoved())
|
||||
return;
|
||||
|
||||
aura->SetIsSingleTarget(caster && aura->GetSpellInfo()->IsSingleTarget());
|
||||
aura->SetIsSingleTarget(caster && (aura->GetSpellInfo()->IsSingleTarget() || aura->HasEffectType(SPELL_AURA_CONTROL_VEHICLE)));
|
||||
if (aura->IsSingleTarget())
|
||||
{
|
||||
ASSERT((IsInWorld() && !IsDuringRemoveFromWorld()) || (aura->GetCasterGUID() == GetGUID()));
|
||||
@@ -3274,7 +3274,7 @@ void Unit::_AddAura(UnitAura* aura, Unit* caster)
|
||||
for (Unit::AuraList::iterator itr = scAuras.begin(); itr != scAuras.end();)
|
||||
{
|
||||
if ((*itr) != aura &&
|
||||
(*itr)->GetSpellInfo()->IsSingleTargetWith(aura->GetSpellInfo()))
|
||||
(*itr)->IsSingleTargetWith(aura))
|
||||
{
|
||||
(*itr)->Remove();
|
||||
itr = scAuras.begin();
|
||||
|
||||
Reference in new issue
Block a user