Core/Vehicles: Fixed a crash introduced in 2c169bcca5

This commit is contained in:
Shauren
2013-03-13 22:38:41 +01:00
parent c83b2b69b6
commit c47dceebff

View File

@@ -2926,6 +2926,9 @@ void AuraEffect::HandleAuraControlVehicle(AuraApplication const* aurApp, uint8 m
}
else
{
// Remove pending passengers before exiting vehicle - might cause an Uninstall
target->GetVehicleKit()->RemovePendingEventsForPassenger(caster);
if (GetId() == 53111) // Devour Humanoid
{
target->Kill(caster);
@@ -2935,8 +2938,6 @@ void AuraEffect::HandleAuraControlVehicle(AuraApplication const* aurApp, uint8 m
caster->_ExitVehicle();
// some SPELL_AURA_CONTROL_VEHICLE auras have a dummy effect on the player - remove them
caster->RemoveAurasDueToSpell(GetId());
target->GetVehicleKit()->RemovePendingEventsForPassenger(caster);
}
}