From 4d4c7e68935df9ca40bd5539d602ac4e779f53d5 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 10 Jun 2023 20:31:33 +0200 Subject: Core/Quests: Quest flag fixups * Update flag names * Implemented QUEST_FLAGS_COMPLETION_NO_DEATH and QUEST_FLAGS_FAIL_ON_LOGOUT * Started using QUEST_FLAGS_COMPLETION_EVENT and QUEST_FLAGS_COMPLETION_AREA_TRIGGER instead of a custom SpeclalFlag * Renamed Quest::IsAutoComplete to Quest::IsTurnIn to better describe what it means (a quest that can be turned in without accepting it to quest log) * Implemented QUEST_FLAGS_UPDATE_PHASESHIFT and removed forced phaseshift updates on every quest status change * Implemented QUEST_FLAGS_LAUNCH_GOSSIP_ACCEPT - reopens gossip menu with questgiver --- src/server/game/Quests/QuestDef.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/server/game/Quests/QuestDef.cpp') diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp index e3d39cef7a9..2feff84a03d 100644 --- a/src/server/game/Quests/QuestDef.cpp +++ b/src/server/game/Quests/QuestDef.cpp @@ -521,7 +521,7 @@ void Quest::BuildQuestRewards(WorldPackets::Quest::QuestRewards& rewards, Player uint32 Quest::GetRewMoneyMaxLevel() const { // If Quest has flag to not give money on max level, it's 0 - if (HasFlag(QUEST_FLAGS_NO_MONEY_FROM_XP)) + if (HasFlag(QUEST_FLAGS_NO_MONEY_FOR_XP)) return 0; // Else, return the rewarded copper sum modified by the rate @@ -533,9 +533,9 @@ bool Quest::IsAutoAccept() const return !sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_AUTO_ACCEPT) && HasFlag(QUEST_FLAGS_AUTO_ACCEPT); } -bool Quest::IsAutoComplete() const +bool Quest::IsTurnIn() const { - return !sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_AUTO_COMPLETE) && _type == QUEST_TYPE_AUTOCOMPLETE; + return !sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_AUTO_COMPLETE) && _type == QUEST_TYPE_TURNIN; } bool Quest::IsRaidQuest(Difficulty difficulty) const @@ -552,7 +552,7 @@ bool Quest::IsRaidQuest(Difficulty difficulty) const break; } - if ((_flags & QUEST_FLAGS_RAID) != 0) + if ((_flags & QUEST_FLAGS_RAID_GROUP_OK) != 0) return true; return false; @@ -654,7 +654,7 @@ WorldPacket Quest::BuildQueryData(LocaleConstant loc, Player* player) const response.Info.RewardXPDifficulty = GetXPDifficulty(); response.Info.RewardXPMultiplier = GetXPMultiplier(); - if (!HasFlag(QUEST_FLAGS_HIDDEN_REWARDS)) + if (!HasFlag(QUEST_FLAGS_HIDE_REWARD)) response.Info.RewardMoney = player ? player->GetQuestMoneyReward(this) : GetMaxMoneyReward(); response.Info.RewardMoneyDifficulty = GetRewMoneyDifficulty(); @@ -697,7 +697,7 @@ WorldPacket Quest::BuildQueryData(LocaleConstant loc, Player* player) const response.Info.ItemDropQuantity[i] = ItemDropQuantity[i]; } - if (!HasFlag(QUEST_FLAGS_HIDDEN_REWARDS)) + if (!HasFlag(QUEST_FLAGS_HIDE_REWARD)) { for (uint8 i = 0; i < QUEST_REWARD_ITEM_COUNT; ++i) { -- cgit v1.2.3