mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-24 15:40:28 -04:00
Core/Entities: Update StringId assignment to use StringIdType
(cherry picked from commit 9959a1373a)
This commit is contained in:
@@ -1158,7 +1158,7 @@ bool GameObject::Create(uint32 entry, Map* map, Position const& pos, QuaternionD
|
||||
|
||||
LastUsedScriptID = GetGOInfo()->ScriptId;
|
||||
|
||||
m_stringIds[0] = goInfo->StringId;
|
||||
m_stringIds[AsUnderlyingType(StringIdType::Template)] = goInfo->StringId;
|
||||
|
||||
AIM_Initialize();
|
||||
|
||||
@@ -1978,7 +1978,7 @@ bool GameObject::LoadFromDB(ObjectGuid::LowType spawnId, Map* map, bool addToMap
|
||||
|
||||
m_goData = data;
|
||||
|
||||
m_stringIds[1] = data->StringId;
|
||||
m_stringIds[AsUnderlyingType(StringIdType::Spawn)] = data->StringId;
|
||||
|
||||
if (addToMap && !GetMap()->AddToMap(this))
|
||||
return false;
|
||||
@@ -3493,12 +3493,12 @@ void GameObject::SetScriptStringId(std::string id)
|
||||
if (!id.empty())
|
||||
{
|
||||
m_scriptStringId.emplace(std::move(id));
|
||||
m_stringIds[2] = *m_scriptStringId;
|
||||
m_stringIds[AsUnderlyingType(StringIdType::Script)] = *m_scriptStringId;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_scriptStringId.reset();
|
||||
m_stringIds[2] = {};
|
||||
m_stringIds[AsUnderlyingType(StringIdType::Script)] = {};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user