fix(Core/PlayerQuest): Introduce flag QUEST_SPECIAL_FLAGS_CAN_FAIL_IN… (#19116)

fix(Core/PlayerQuest): Introduce flag QUEST_SPECIAL_FLAGS_CAN_FAIL_IN_ANY_STATE

- this allows flagging quests so that they are allowed to fail in Player::FailQuest()
  independant of their current state
- update quest 853 accordingly as a first use case
This commit is contained in:
sudlud
2024-06-22 08:04:56 +02:00
committed by GitHub
parent 3599c26cd5
commit b3f21d909a
3 changed files with 18 additions and 14 deletions

View File

@@ -883,7 +883,7 @@ void Player::FailQuest(uint32 questId)
{
QuestStatus qStatus = GetQuestStatus(questId);
// xinef: if quest is marked as failed, dont do it again
if ((qStatus != QUEST_STATUS_INCOMPLETE) && (!quest->HasSpecialFlag(QUEST_SPECIAL_FLAGS_TIMED)))
if ((qStatus != QUEST_STATUS_INCOMPLETE) && (!quest->HasSpecialFlag(QUEST_SPECIAL_FLAGS_CAN_FAIL_IN_ANY_STATE)))
return;
SetQuestStatus(questId, QUEST_STATUS_FAILED);