From b3e3a13f5623becb0d0e6e49249299a5192bb6aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E4=BD=A9=E8=8C=B9?= Date: Sat, 26 Mar 2022 17:21:22 -0600 Subject: [PATCH] More Enchanting crash fixes --- src/PlayerbotFactory.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/PlayerbotFactory.cpp b/src/PlayerbotFactory.cpp index 5c73de9a..5b574013 100644 --- a/src/PlayerbotFactory.cpp +++ b/src/PlayerbotFactory.cpp @@ -1181,6 +1181,7 @@ void PlayerbotFactory::InitEquipment(bool incremental) newItem->AddToWorld(); newItem->AddToUpdateQueueOf(bot); bot->AutoUnequipOffhandIfNeed(); + newItem->SetOwnerGUID(bot->GetGUID()); EnchantItem(newItem); found = true; break; @@ -1325,6 +1326,7 @@ void PlayerbotFactory::InitSecondEquipmentSet() if (Item* newItem = StoreNewItemInInventorySlot(bot, newItemId, 1)) { + newItem->SetOwnerGUID(bot->GetGUID()); EnchantItem(newItem); newItem->AddToWorld(); newItem->AddToUpdateQueueOf(bot);