mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-17 21:50:50 -04:00
Core/Spell: SpellAura Redux (#22794)
* typo and correction * spell aura no longer shared between targets _spellAura isolated * SPELL_AURA_CONTROL_VEHICLE is not strictly single target spell Steam Tank Control and Wyrmrest Commander units can reseat themselves again * Rename 9999_99_99_99_world.sql to 2019_03_08_00_world.sql
This commit is contained in:
committed by
Giacomo Pozzoni
parent
3eecadcebf
commit
ec3cb05d7f
@@ -3265,14 +3265,13 @@ void Unit::_AddAura(UnitAura* aura, Unit* caster)
|
||||
if (aura->IsRemoved())
|
||||
return;
|
||||
|
||||
aura->SetIsSingleTarget(caster && (aura->GetSpellInfo()->IsSingleTarget() || aura->HasEffectType(SPELL_AURA_CONTROL_VEHICLE)));
|
||||
aura->SetIsSingleTarget(caster && aura->GetSpellInfo()->IsSingleTarget());
|
||||
if (aura->IsSingleTarget())
|
||||
{
|
||||
ASSERT((IsInWorld() && !IsDuringRemoveFromWorld()) || (aura->GetCasterGUID() == GetGUID()) ||
|
||||
(IsLoading() && aura->HasEffectType(SPELL_AURA_CONTROL_VEHICLE)));
|
||||
ASSERT((IsInWorld() && !IsDuringRemoveFromWorld()) || aura->GetCasterGUID() == GetGUID());
|
||||
/* @HACK: Player is not in world during loading auras.
|
||||
* Single target auras are not saved or loaded from database
|
||||
* but may be created as a result of aura links (player mounts with passengers)
|
||||
* but may be created as a result of aura links.
|
||||
*/
|
||||
|
||||
// register single target aura
|
||||
@@ -12499,6 +12498,11 @@ void Unit::_EnterVehicle(Vehicle* vehicle, int8 seatId, AuraApplication const* a
|
||||
}
|
||||
else if (seatId >= 0 && seatId == GetTransSeat())
|
||||
return;
|
||||
else
|
||||
{
|
||||
//Exit the current vehicle because unit will reenter in a new seat.
|
||||
m_vehicle->GetBase()->RemoveAurasByType(SPELL_AURA_CONTROL_VEHICLE, GetGUID(), aurApp->GetBase());
|
||||
}
|
||||
}
|
||||
|
||||
if (aurApp->GetRemoveMode())
|
||||
|
||||
Reference in New Issue
Block a user