mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
Core/Vehicles: Use DespawnOrUnsummon in Vehicle::Dismiss to call AI despawn hooks.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user