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
This commit is contained in:
Shauren
2023-06-10 20:31:33 +02:00
parent 39bebe6a65
commit 4d4c7e6893
13 changed files with 192 additions and 181 deletions

View File

@@ -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)
{