Core/Entities: Update StringId assignment to use StringIdType

Port From (https://github.com/TrinityCore/TrinityCore/commit/9959a1373a1851e484ddef9268d98b116c5d8241)
This commit is contained in:
Hondacrx
2024-08-05 14:59:31 -04:00
parent b8d0b4bf2e
commit f410597e4c
2 changed files with 8 additions and 8 deletions
+4 -4
View File
@@ -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;