Core/Vehicles: Use DespawnOrUnsummon in Vehicle::Dismiss to call AI despawn hooks.

This commit is contained in:
Shauren
2012-04-11 17:52:44 +02:00
parent 7cc2c6109a
commit 0506877e2a

View File

@@ -453,11 +453,12 @@ void Vehicle::RelocatePassengers(float x, float y, float z, float ang)
void Vehicle::Dismiss()
{
if (GetBase()->GetTypeId() != TYPEID_UNIT)
return;
sLog->outDebug(LOG_FILTER_VEHICLES, "Vehicle::Dismiss Entry: %u, GuidLow %u", _creatureEntry, _me->GetGUIDLow());
Uninstall();
_me->DestroyForNearbyPlayers();
_me->CombatStop();
_me->AddObjectToRemoveList();
GetBase()->ToCreature()->DespawnOrUnsummon();
}
void Vehicle::InitMovementInfoForBase()