aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 7dec93b881e..4288ce1e58f 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -10206,7 +10206,7 @@ void Unit::setDeathState(DeathState s)
UnsummonAllTotems();
RemoveAllControlled();
RemoveAllAurasOnDeath();
- if(m_Vehicle) m_Vehicle->RemovePassenger(this);
+ ExitVehicle();
//This is needed to clear visible auras after unit dies
ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false);
@@ -11172,7 +11172,7 @@ void Unit::RemoveFromWorld()
RemoveCharmAuras();
RemoveBindSightAuras();
RemoveNotOwnSingleTargetAuras();
- if(m_Vehicle) m_Vehicle->RemovePassenger(this);
+ ExitVehicle();
if(GetCharmerGUID())
sLog.outCrash("Unit %u has charmer guid when removed from world", GetEntry());