Core/Battlegrounds: Fixed AV turnins being counted when opening quest completion UI instead after completing the quest

This commit is contained in:
Shauren
2022-07-09 00:09:54 +02:00
parent 490b6f88d4
commit 5dca7309f4

View File

@@ -382,6 +382,9 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPackets::Quest::Quest
{
if (_player->CanRewardQuest(quest, packet.Choice.LootItemType, packet.Choice.Item.ItemID, true)) // Then check if player can receive the reward item (if inventory is not full, if player doesn't have too many unique items, and so on). If not, the client will close the gossip window
{
if (Battleground* bg = _player->GetBattleground())
bg->HandleQuestComplete(packet.QuestID, _player);
_player->RewardQuest(quest, packet.Choice.LootItemType, packet.Choice.Item.ItemID, object);
switch (object->GetTypeId())
@@ -594,9 +597,6 @@ void WorldSession::HandleQuestgiverCompleteQuest(WorldPackets::Quest::QuestGiver
return;
}
if (Battleground* bg = _player->GetBattleground())
bg->HandleQuestComplete(packet.QuestID, _player);
if (_player->GetQuestStatus(packet.QuestID) != QUEST_STATUS_COMPLETE)
{
if (quest->IsRepeatable())