From a0bf3a144b4c655710f8ec4843ab713f05eb4752 Mon Sep 17 00:00:00 2001 From: killerwife Date: Mon, 13 Jan 2025 18:10:40 +0100 Subject: [PATCH] Quest: Extend previous commit to items --- src/game/Entities/GossipDef.cpp | 2 +- src/game/Entities/Player.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/Entities/GossipDef.cpp b/src/game/Entities/GossipDef.cpp index dd5aa543016..60b190dcf1e 100644 --- a/src/game/Entities/GossipDef.cpp +++ b/src/game/Entities/GossipDef.cpp @@ -471,7 +471,7 @@ void PlayerMenu::SendQuestGiverQuestDetails(Quest const* pQuest, ObjectGuid guid GetMenuSession()->SendPacket(data); Player* player = GetMenuSession()->GetPlayer(); - WorldObject* giver = player->GetMap()->GetWorldObject(guid); + Object* giver = player->GetObjectByTypeMask(guid, TYPEMASK_CREATURE_GAMEOBJECT_PLAYER_OR_ITEM); if (giver && pQuest->IsAutoAccept() && player->CanTakeQuest(pQuest, false) && player->CanAddQuest(pQuest, false)) { player->AddQuest(pQuest, giver); diff --git a/src/game/Entities/Player.cpp b/src/game/Entities/Player.cpp index 2e96825c7d7..84400c740b8 100644 --- a/src/game/Entities/Player.cpp +++ b/src/game/Entities/Player.cpp @@ -24759,7 +24759,7 @@ Object* Player::GetObjectByTypeMask(ObjectGuid guid, TypeMask typemask) if (GetObjectGuid() == guid) return this; if ((typemask & TYPEMASK_PLAYER) && IsInWorld()) - return ObjectAccessor::FindPlayer(guid); + return GetMap()->GetPlayer(guid); break; case HIGHGUID_TRANSPORT: case HIGHGUID_GAMEOBJECT: