From f410597e4ce505ce440c76f44a50fc74257ab716 Mon Sep 17 00:00:00 2001 From: Hondacrx Date: Mon, 5 Aug 2024 14:59:31 -0400 Subject: [PATCH] Core/Entities: Update StringId assignment to use StringIdType Port From (https://github.com/TrinityCore/TrinityCore/commit/9959a1373a1851e484ddef9268d98b116c5d8241) --- Source/Game/Entities/Creature/Creature.cs | 8 ++++---- Source/Game/Entities/GameObject/GameObject.cs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/Game/Entities/Creature/Creature.cs b/Source/Game/Entities/Creature/Creature.cs index 577c5f39a..3e77989cc 100644 --- a/Source/Game/Entities/Creature/Creature.cs +++ b/Source/Game/Entities/Creature/Creature.cs @@ -411,7 +411,7 @@ namespace Game.Entities //We must update last scriptId or it looks like we reloaded a script, breaking some things such as gossip temporarily LastUsedScriptID = GetScriptId(); - m_stringIds[0] = cInfo.StringId; + m_stringIds[(int)StringIdType.Template] = cInfo.StringId; return true; } @@ -2925,12 +2925,12 @@ namespace Game.Entities if (!id.IsEmpty()) { m_scriptStringId = id; - m_stringIds[2] = m_scriptStringId; + m_stringIds[(int)StringIdType.Script] = m_scriptStringId; } else { m_scriptStringId = null; - m_stringIds[2] = null; + m_stringIds[(int)StringIdType.Script] = null; } } @@ -3531,7 +3531,7 @@ namespace Game.Entities // checked at creature_template loading DefaultMovementType = (MovementGeneratorType)data.movementType; - m_stringIds[1] = data.StringId; + m_stringIds[(int)StringIdType.Spawn] = data.StringId; if (addToMap && !GetMap().AddToMap(this)) return false; diff --git a/Source/Game/Entities/GameObject/GameObject.cs b/Source/Game/Entities/GameObject/GameObject.cs index 5355dfcf4..648f66cdc 100644 --- a/Source/Game/Entities/GameObject/GameObject.cs +++ b/Source/Game/Entities/GameObject/GameObject.cs @@ -380,7 +380,7 @@ namespace Game.Entities LastUsedScriptID = GetGoInfo().ScriptId; - m_stringIds[0] = goInfo.StringId; + m_stringIds[(int)StringIdType.Template] = goInfo.StringId; AIM_Initialize(); @@ -1163,7 +1163,7 @@ namespace Game.Entities m_goData = data; - m_stringIds[1] = data.StringId; + m_stringIds[(int)StringIdType.Spawn] = data.StringId; if (addToMap && !GetMap().AddToMap(this)) return false; @@ -2675,12 +2675,12 @@ namespace Game.Entities if (!id.IsEmpty()) { m_scriptStringId = id; - m_stringIds[2] = m_scriptStringId; + m_stringIds[(int)StringIdType.Script] = m_scriptStringId; } else { m_scriptStringId = null; - m_stringIds[2] = null; + m_stringIds[(int)StringIdType.Script] = null; } }