Revert "fix(Core/Vehicles): defer accessory init to avoid double install" (#25491)

This commit is contained in:
Andrew 2026-04-17 11:28:33 -03:00 committed by GitHub
parent b40a978938
commit 589784baa0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 14 deletions

View file

@ -346,6 +346,11 @@ 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
if (obj->IsCreature())
if (Vehicle* vehicle = obj->ToCreature()->GetVehicleKit())
vehicle->Reset();
return true;
}