mirror of
https://gitcode.com/GitHub_Trending/az/azerothcore-wotlk.git
synced 2026-07-16 13:17:58 +00:00
fix(Core/Vehicles): Prevent accessory double-install and respawn orphans (#25499)
Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
@@ -346,8 +346,7 @@ bool Map::AddToMap(T* obj, bool checkTransport)
|
||||
//also, trigger needs to cast spell, if not update, cannot see visual
|
||||
obj->UpdateObjectVisibility(true);
|
||||
|
||||
// Xinef: little hack for vehicles, accessories have to be added after visibility update so they wont fall off the vehicle, moved from Creature::AIM_Initialize
|
||||
// Initialize vehicle, this is done only for summoned npcs, DB creatures are handled by grid loaders
|
||||
// Post-visibility so accessories seat after the vehicle's create packet reaches clients.
|
||||
if (obj->IsCreature())
|
||||
if (Vehicle* vehicle = obj->ToCreature()->GetVehicleKit())
|
||||
vehicle->Reset();
|
||||
|
||||
Reference in New Issue
Block a user