Core/GameObjects: Changed gameobject artkit type to uint
Port From (https://github.com/TrinityCore/TrinityCore/commit/bb3b2cf4cb4897a7dd087e2409a250c887c3fb9a)
This commit is contained in:
@@ -753,7 +753,7 @@ namespace Game.Chat
|
|||||||
obj.SetGoType((GameObjectTypes)objectState);
|
obj.SetGoType((GameObjectTypes)objectState);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
obj.SetGoArtKit((byte)objectState);
|
obj.SetGoArtKit(objectState);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
obj.SetGoAnimProgress(objectState);
|
obj.SetGoAnimProgress(objectState);
|
||||||
|
|||||||
@@ -293,7 +293,7 @@ namespace Game.Entities
|
|||||||
SetGoType(goInfo.type);
|
SetGoType(goInfo.type);
|
||||||
m_prevGoState = goState;
|
m_prevGoState = goState;
|
||||||
SetGoState(goState);
|
SetGoState(goState);
|
||||||
SetGoArtKit((byte)artKit);
|
SetGoArtKit(artKit);
|
||||||
|
|
||||||
SetUpdateFieldValue(m_values.ModifyValue(m_gameObjectData).ModifyValue(m_gameObjectData.SpawnTrackingStateAnimID), Global.DB2Mgr.GetEmptyAnimStateID());
|
SetUpdateFieldValue(m_values.ModifyValue(m_gameObjectData).ModifyValue(m_gameObjectData.SpawnTrackingStateAnimID), Global.DB2Mgr.GetEmptyAnimStateID());
|
||||||
|
|
||||||
@@ -1566,7 +1566,7 @@ namespace Game.Entities
|
|||||||
if (artKitValue == 0)
|
if (artKitValue == 0)
|
||||||
Log.outError(LogFilter.Sql, $"GameObject {GetEntry()} hit by spell {spellId} needs `artkit{artKitIndex}` in `gameobject_template_addon`");
|
Log.outError(LogFilter.Sql, $"GameObject {GetEntry()} hit by spell {spellId} needs `artkit{artKitIndex}` in `gameobject_template_addon`");
|
||||||
else
|
else
|
||||||
SetGoArtKit((byte)artKitValue);
|
SetGoArtKit(artKitValue);
|
||||||
|
|
||||||
break;
|
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);
|
SetUpdateFieldValue(m_values.ModifyValue(m_gameObjectData).ModifyValue(m_gameObjectData.ArtKit), kit);
|
||||||
GameObjectData data = Global.ObjectMgr.GetGameObjectData(m_spawnId);
|
GameObjectData data = Global.ObjectMgr.GetGameObjectData(m_spawnId);
|
||||||
@@ -1632,7 +1632,7 @@ namespace Game.Entities
|
|||||||
data.artKit = kit;
|
data.artKit = kit;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetGoArtKit(byte artkit, GameObject go, uint lowguid)
|
public void SetGoArtKit(uint artkit, GameObject go, uint lowguid)
|
||||||
{
|
{
|
||||||
GameObjectData data = null;
|
GameObjectData data = null;
|
||||||
if (go != null)
|
if (go != null)
|
||||||
|
|||||||
@@ -1438,7 +1438,7 @@ namespace Game.Entities
|
|||||||
public Quaternion rotation;
|
public Quaternion rotation;
|
||||||
public uint animprogress;
|
public uint animprogress;
|
||||||
public GameObjectState goState;
|
public GameObjectState goState;
|
||||||
public byte artKit;
|
public uint artKit;
|
||||||
|
|
||||||
public GameObjectData() : base(SpawnObjectType.GameObject) { }
|
public GameObjectData() : base(SpawnObjectType.GameObject) { }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -260,11 +260,11 @@ namespace Game.PvP
|
|||||||
Map map = Global.MapMgr.FindMap(530, 0);
|
Map map = Global.MapMgr.FindMap(530, 0);
|
||||||
var bounds = map.GetGameObjectBySpawnIdStore().LookupByKey(m_capturePointSpawnId);
|
var bounds = map.GetGameObjectBySpawnIdStore().LookupByKey(m_capturePointSpawnId);
|
||||||
foreach (var go in bounds)
|
foreach (var go in bounds)
|
||||||
go.SetGoArtKit((byte)artkit);
|
go.SetGoArtKit(artkit);
|
||||||
|
|
||||||
bounds = map.GetGameObjectBySpawnIdStore().LookupByKey(m_Objects[m_TowerType]);
|
bounds = map.GetGameObjectBySpawnIdStore().LookupByKey(m_Objects[m_TowerType]);
|
||||||
foreach (var go in bounds)
|
foreach (var go in bounds)
|
||||||
go.SetGoArtKit((byte)artkit2);
|
go.SetGoArtKit(artkit2);
|
||||||
|
|
||||||
// send world state update
|
// send world state update
|
||||||
if (field != 0)
|
if (field != 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user