Skip to content

Commit

Permalink
Quest: Extend previous commit to items
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Jan 13, 2025
1 parent c180df7 commit a0bf3a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/game/Entities/GossipDef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/game/Entities/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a0bf3a1

Please sign in to comment.