From 8934cfb6dcce5fbbcc90cb465fe5548b1374108b Mon Sep 17 00:00:00 2001 From: hondacrx Date: Thu, 2 Jun 2022 20:58:32 -0400 Subject: [PATCH] Core/GameObjects: Changed gameobject artkit type to uint Port From (https://github.com/TrinityCore/TrinityCore/commit/bb3b2cf4cb4897a7dd087e2409a250c887c3fb9a) --- Source/Game/Chat/Commands/GameObjectCommands.cs | 2 +- Source/Game/Entities/GameObject/GameObject.cs | 8 ++++---- Source/Game/Entities/GameObject/GameObjectData.cs | 2 +- Source/Game/OutdoorPVP/Zones/HellfirePeninsulaPvP.cs | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/Game/Chat/Commands/GameObjectCommands.cs b/Source/Game/Chat/Commands/GameObjectCommands.cs index 71e631b8a..859b4491e 100644 --- a/Source/Game/Chat/Commands/GameObjectCommands.cs +++ b/Source/Game/Chat/Commands/GameObjectCommands.cs @@ -753,7 +753,7 @@ namespace Game.Chat obj.SetGoType((GameObjectTypes)objectState); break; case 2: - obj.SetGoArtKit((byte)objectState); + obj.SetGoArtKit(objectState); break; case 3: obj.SetGoAnimProgress(objectState); diff --git a/Source/Game/Entities/GameObject/GameObject.cs b/Source/Game/Entities/GameObject/GameObject.cs index 75a120c84..60ee47a6b 100644 --- a/Source/Game/Entities/GameObject/GameObject.cs +++ b/Source/Game/Entities/GameObject/GameObject.cs @@ -293,7 +293,7 @@ namespace Game.Entities SetGoType(goInfo.type); m_prevGoState = goState; SetGoState(goState); - SetGoArtKit((byte)artKit); + SetGoArtKit(artKit); SetUpdateFieldValue(m_values.ModifyValue(m_gameObjectData).ModifyValue(m_gameObjectData.SpawnTrackingStateAnimID), Global.DB2Mgr.GetEmptyAnimStateID()); @@ -1566,7 +1566,7 @@ namespace Game.Entities if (artKitValue == 0) Log.outError(LogFilter.Sql, $"GameObject {GetEntry()} hit by spell {spellId} needs `artkit{artKitIndex}` in `gameobject_template_addon`"); else - SetGoArtKit((byte)artKitValue); + SetGoArtKit(artKitValue); break; } @@ -1624,7 +1624,7 @@ namespace Game.Entities } } - public void SetGoArtKit(byte kit) + public void SetGoArtKit(uint kit) { SetUpdateFieldValue(m_values.ModifyValue(m_gameObjectData).ModifyValue(m_gameObjectData.ArtKit), kit); GameObjectData data = Global.ObjectMgr.GetGameObjectData(m_spawnId); @@ -1632,7 +1632,7 @@ namespace Game.Entities data.artKit = kit; } - public void SetGoArtKit(byte artkit, GameObject go, uint lowguid) + public void SetGoArtKit(uint artkit, GameObject go, uint lowguid) { GameObjectData data = null; if (go != null) diff --git a/Source/Game/Entities/GameObject/GameObjectData.cs b/Source/Game/Entities/GameObject/GameObjectData.cs index ba6174f01..1ebc8db51 100644 --- a/Source/Game/Entities/GameObject/GameObjectData.cs +++ b/Source/Game/Entities/GameObject/GameObjectData.cs @@ -1438,7 +1438,7 @@ namespace Game.Entities public Quaternion rotation; public uint animprogress; public GameObjectState goState; - public byte artKit; + public uint artKit; public GameObjectData() : base(SpawnObjectType.GameObject) { } } diff --git a/Source/Game/OutdoorPVP/Zones/HellfirePeninsulaPvP.cs b/Source/Game/OutdoorPVP/Zones/HellfirePeninsulaPvP.cs index 177f9b95d..c3a4468bb 100644 --- a/Source/Game/OutdoorPVP/Zones/HellfirePeninsulaPvP.cs +++ b/Source/Game/OutdoorPVP/Zones/HellfirePeninsulaPvP.cs @@ -260,11 +260,11 @@ namespace Game.PvP Map map = Global.MapMgr.FindMap(530, 0); var bounds = map.GetGameObjectBySpawnIdStore().LookupByKey(m_capturePointSpawnId); foreach (var go in bounds) - go.SetGoArtKit((byte)artkit); + go.SetGoArtKit(artkit); bounds = map.GetGameObjectBySpawnIdStore().LookupByKey(m_Objects[m_TowerType]); foreach (var go in bounds) - go.SetGoArtKit((byte)artkit2); + go.SetGoArtKit(artkit2); // send world state update if (field != 0)