Core/Vehicles
* Fixed crash happening when passenger died on vehicle he was controlling * Fixed crash happening if vehicle control aura was removed before passenger is fully added to vehicle Closes #7160
This commit is contained in:
1 parent
a0f4937fbc
commit
2c169bcca5
6 files changed
+40
-3
No files matched your search
@@ -12419,6 +12419,9 @@ void Unit::setDeathState(DeathState s)
|
||||
if (IsNonMeleeSpellCasted(false))
|
||||
InterruptNonMeleeSpells(false);
|
||||
|
||||
ExitVehicle(); // Exit vehicle before calling RemoveAllControlled
|
||||
// vehicles use special type of charm that is not removed by the next function
|
||||
// triggering an assert
|
||||
UnsummonAllTotems();
|
||||
RemoveAllControlled();
|
||||
RemoveAllAurasOnDeath();
|
||||
@@ -16842,7 +16845,10 @@ void Unit::_EnterVehicle(Vehicle* vehicle, int8 seatId, AuraApplication const* a
|
||||
if (Player* player = ToPlayer())
|
||||
{
|
||||
if (vehicle->GetBase()->GetTypeId() == TYPEID_PLAYER && player->isInCombat())
|
||||
{
|
||||
vehicle->GetBase()->RemoveAura(const_cast<AuraApplication*>(aurApp));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
ASSERT(!m_vehicle);
|
||||
|
||||
Reference in new issue
Block a user