mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Core/Vehicles: update the power display of vehicles before being added to world to avoid building unnecessary update_object packets right after spawning them
(cherry picked from commit 1610337e67)
This commit is contained in:
@@ -1694,7 +1694,8 @@ bool Creature::CreateFromProto(ObjectGuid::LowType guidlow, uint32 entry, Creatu
|
||||
}
|
||||
|
||||
if (vehId)
|
||||
CreateVehicleKit(vehId, entry, true);
|
||||
if (CreateVehicleKit(vehId, entry, true))
|
||||
UpdateDisplayPower();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -76,8 +76,6 @@ Vehicle::~Vehicle()
|
||||
|
||||
void Vehicle::Install()
|
||||
{
|
||||
_me->UpdateDisplayPower();
|
||||
|
||||
_status = STATUS_INSTALLED;
|
||||
if (GetBase()->GetTypeId() == TYPEID_UNIT)
|
||||
sScriptMgr->OnInstall(this);
|
||||
|
||||
Reference in New Issue
Block a user