Skip to content

Commit

Permalink
Quest: Ensure that instant complete quests are completed
Browse files Browse the repository at this point in the history
  • Loading branch information
insunaa authored and killerwife committed Sep 18, 2024
1 parent cd48f6c commit 897b3c1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/game/Entities/GossipDef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,11 @@ void PlayerMenu::SendQuestGiverQuestDetails(Quest const* pQuest, ObjectGuid guid
Player* player = GetMenuSession()->GetPlayer();
Unit* giver = player->GetMap()->GetUnit(guid);
if (giver && pQuest->IsAutoAccept() && player->CanTakeQuest(pQuest, false) && player->CanAddQuest(pQuest, false))
{
player->AddQuest(pQuest, giver);
if (player->CanCompleteQuest(pQuest->GetQuestId()))
player->CompleteQuest(pQuest->GetQuestId());
}

DEBUG_LOG("WORLD: Sent SMSG_QUESTGIVER_QUEST_DETAILS - for %s of %s, questid = %u", GetMenuSession()->GetPlayer()->GetGuidStr().c_str(), guid.GetString().c_str(), pQuest->GetQuestId());
}
Expand Down

0 comments on commit 897b3c1

Please sign in to comment.