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

Port From (https://github.com/TrinityCore/TrinityCore/commit/5dca7309f4db9de348525987d236cd03657ef21f)
This commit is contained in:
hondacrx
2022-07-09 12:40:12 -04:00
parent 6f0aa96c50
commit fca1e3d98a
+4 -3
View File
@@ -356,6 +356,10 @@ namespace Game
{
if (GetPlayer().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
{
Battleground bg = _player.GetBattleground();
if (bg != null)
bg.HandleQuestComplete(packet.QuestID, _player);
GetPlayer().RewardQuest(quest, packet.Choice.LootItemType, packet.Choice.Item.ItemID, obj);
switch (obj.GetTypeId())
@@ -557,9 +561,6 @@ namespace Game
GetPlayer().GetName(), GetPlayer().GetGUID().ToString(), packet.QuestID);
return;
}
Battleground bg = GetPlayer().GetBattleground();
if (bg)
bg.HandleQuestComplete(packet.QuestID, GetPlayer());
if (GetPlayer().GetQuestStatus(packet.QuestID) != QuestStatus.Complete)
{