From 0dda317989ea58d513c1a28fa0bd12d376e56a71 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Mon, 27 Dec 2021 16:50:14 -0500 Subject: [PATCH] Core/Quest: Do not allow quests to be turned in if the player no longer satisfies level/skill/reputation requirements. Port From (https://github.com/TrinityCore/TrinityCore/commit/925aaecbc0997a8fa3dea8de25f12258f889ffad) --- Source/Game/Entities/Player/Player.Quest.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Source/Game/Entities/Player/Player.Quest.cs b/Source/Game/Entities/Player/Player.Quest.cs index 96d7055c2..a10f6243c 100644 --- a/Source/Game/Entities/Player/Player.Quest.cs +++ b/Source/Game/Entities/Player/Player.Quest.cs @@ -527,6 +527,10 @@ namespace Game.Entities public bool CanRewardQuest(Quest quest, bool msg) { + // quest is disabled + if (Global.DisableMgr.IsDisabledFor(DisableType.Quest, quest.Id, this)) + return false; + // not auto complete quest and not completed quest (only cheating case, then ignore without message) if (!quest.IsDFQuest() && !quest.IsAutoComplete() && GetQuestStatus(quest.Id) != QuestStatus.Complete) return false; @@ -535,6 +539,10 @@ namespace Game.Entities if (!SatisfyQuestDay(quest, true) || !SatisfyQuestWeek(quest, true) || !SatisfyQuestMonth(quest, true) || !SatisfyQuestSeasonal(quest, true)) return false; + // player no longer satisfies the quest's requirements (skill level etc.) + if (!SatisfyQuestLevel(quest, true) || !SatisfyQuestSkill(quest, true) || !SatisfyQuestReputation(quest, true)) + return false; + // rewarded and not repeatable quest (only cheating case, then ignore without message) if (GetQuestRewardStatus(quest.Id)) return false;