fix crash null QuestItemList

This commit is contained in:
Alvin Zhu
2023-03-22 16:24:41 +08:00
parent 407fa917f8
commit dfcf27aac8

View File

@@ -83,6 +83,9 @@ void LootObject::Refresh(Player* bot, ObjectGuid lootGUID)
bool isQuestItemOnly = false;
GameObjectQuestItemList const* items = sObjectMgr->GetGameObjectQuestItemList(go->GetEntry());
if (!items)
return;
for (int i = 0; i < MAX_GAMEOBJECT_QUEST_ITEMS; i++)
{
if (i >= items->size())