fix GetQuestGreetingLocale typeIndex just like GetQuestGreeting
This commit is contained in:
Alvin Zhu
2023-01-07 14:54:17 +08:00
committed by GitHub
parent b89eea668a
commit 88a356d2cd

View File

@@ -1263,7 +1263,15 @@ public:
}
[[nodiscard]] QuestGreetingLocale const* GetQuestGreetingLocale(TypeID type, uint32 id) const
{
QuestGreetingLocaleContainer::const_iterator itr = _questGreetingLocaleStore.find(MAKE_PAIR32(type, id));
uint32 typeIndex;
if (type == TYPEID_UNIT)
typeIndex = 0;
else if (type == TYPEID_GAMEOBJECT)
typeIndex = 1;
else
return nullptr;
QuestGreetingLocaleContainer::const_iterator itr = _questGreetingLocaleStore.find(MAKE_PAIR32(typeIndex, id));
if (itr == _questGreetingLocaleStore.end()) return nullptr;
return &itr->second;
}