Core/Vehicles: update the power display of vehicles before being added to world to avoid building unnecessary update_object packets right after spawning them

Port From (https://github.com/TrinityCore/TrinityCore/commit/f4f56c105fabf33398d332c09c8e331bc4025192)
This commit is contained in:
hondacrx
2022-02-18 13:40:02 -05:00
parent 00d04e06a1
commit da1405d365
2 changed files with 2 additions and 3 deletions
+2 -1
View File
@@ -1532,7 +1532,8 @@ namespace Game.Entities
}
if (vehId != 0)
CreateVehicleKit(vehId, entry, true);
if (CreateVehicleKit(vehId, entry, true))
UpdateDisplayPower();
return true;
}
-2
View File
@@ -72,8 +72,6 @@ namespace Game.Entities
public void Install()
{
_me.UpdateDisplayPower();
_status = Status.Installed;
if (GetBase().IsTypeId(TypeId.Unit))
Global.ScriptMgr.OnInstall(this);