diff options
| author | PolarCookie <sei009@post.uit.no> | 2019-03-08 08:34:16 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2021-11-24 20:35:19 +0100 |
| commit | f7299dce9770a5b4a3a5ab289e930a390aa0407a (patch) | |
| tree | ce53e0a4ad59df124d923638581eb2bb5b3c0f12 /src/server/game/Entities/Unit | |
| parent | 67e0b2573925c323e4fc918311226588248ef35d (diff) | |
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
(cherry picked from commit ec3cb05d7fbc5cef60d000af910dc39dd3af92bf)
Diffstat (limited to 'src/server/game/Entities/Unit')
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index c101550e500..bedf0e1bddf 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -3150,14 +3150,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 @@ -11853,6 +11852,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()) |
