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:
Ovahlord
2020-04-27 19:29:01 +02:00
committed by Shauren
parent a20526077d
commit f4f56c105f
2 changed files with 2 additions and 3 deletions

View File

@@ -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;
}

View File

@@ -76,8 +76,6 @@ Vehicle::~Vehicle()
void Vehicle::Install()
{
_me->UpdateDisplayPower();
_status = STATUS_INSTALLED;
if (GetBase()->GetTypeId() == TYPEID_UNIT)
sScriptMgr->OnInstall(this);