Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Core/PlayerQuest): Introduce flag QUEST_SPECIAL_FLAGS_NO_LOREMAST… #19962

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions data/sql/updates/pending_db_world/rev_1726231075608295100.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-- implement QUEST_SPECIAL_FLAGS_NO_LOREMASTER_COUNT
-- extend column datatype from tinyint to int
ALTER TABLE `quest_template_addon` MODIFY COLUMN `SpecialFlags` INT UNSIGNED DEFAULT 0 NOT NULL;

-- add flag to Corrupted Flower Quests in Felwood
UPDATE `quest_template_addon` SET `SpecialFlags` = (`SpecialFlags` | 256)
WHERE (`ID` IN (996, 998, 1514, 2523, 2878, 3363, 4113, 4114, 4115, 4116, 4117, 4118, 4119, 4221, 4222, 4343, 4401, 4403, 4443, 4444, 4445, 4446, 4447, 4448, 4461, 4462, 4464, 4465, 4466, 4467));
2 changes: 1 addition & 1 deletion src/server/game/Achievements/AchievementMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
for (RewardedQuestSet::const_iterator itr = rewQuests.begin(); itr != rewQuests.end(); ++itr)
{
Quest const* quest = sObjectMgr->GetQuestTemplate(*itr);
if (quest && quest->GetZoneOrSort() >= 0 && uint32(quest->GetZoneOrSort()) == achievementCriteria->complete_quests_in_zone.zoneID)
if (quest && quest->GetZoneOrSort() >= 0 && uint32(quest->GetZoneOrSort()) == achievementCriteria->complete_quests_in_zone.zoneID && !(quest->HasSpecialFlag(QUEST_SPECIAL_FLAGS_NO_LOREMASTER_COUNT)))
++counter;
}
SetCriteriaProgress(achievementCriteria, counter);
Expand Down
2 changes: 1 addition & 1 deletion src/server/game/Quests/QuestDef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ void Quest::LoadQuestTemplateAddon(Field* fields)
RequiredMaxRepValue = fields[14].Get<int32>();
StartItemCount = fields[15].Get<uint8>();
RewardMailSenderEntry = fields[16].Get<uint32>();
SpecialFlags = fields[17].Get<uint8>();
SpecialFlags = fields[17].Get<uint32>();

if ((SpecialFlags & QUEST_SPECIAL_FLAGS_AUTO_ACCEPT) && !sWorld->getBoolConfig(CONFIG_QUEST_IGNORE_AUTO_ACCEPT))
{
Expand Down
13 changes: 7 additions & 6 deletions src/server/game/Quests/QuestDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,17 +165,18 @@ enum QuestSpecialFlags
QUEST_SPECIAL_FLAGS_CAST = 0x0020, // Set by 32 in SpecialFlags in DB if the quest requires RequiredOrNpcGo killcredit but NOT kill (a spell cast)
QUEST_SPECIAL_FLAGS_NO_REP_SPILLOVER = 0x0040, // Set by 64 in SpecialFlags in DB if the quest does not share rewarded reputation with other allied factions
QUEST_SPECIAL_FLAGS_CAN_FAIL_IN_ANY_STATE = 0x0080, // Set by 128 in SpecialFlags in DB if the quest is allowed to fail in Player::FailQuest() independant of its current state
QUEST_SPECIAL_FLAGS_NO_LOREMASTER_COUNT = 0x0100, // Set by 256 in SpecialFlags in DB if the quest should not count towards Loremaster Achievement
// room for more custom flags

QUEST_SPECIAL_FLAGS_DB_ALLOWED = QUEST_SPECIAL_FLAGS_REPEATABLE | QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT | QUEST_SPECIAL_FLAGS_AUTO_ACCEPT |
QUEST_SPECIAL_FLAGS_DF_QUEST | QUEST_SPECIAL_FLAGS_MONTHLY | QUEST_SPECIAL_FLAGS_CAST | QUEST_SPECIAL_FLAGS_NO_REP_SPILLOVER |
QUEST_SPECIAL_FLAGS_CAN_FAIL_IN_ANY_STATE,
QUEST_SPECIAL_FLAGS_CAN_FAIL_IN_ANY_STATE | QUEST_SPECIAL_FLAGS_NO_LOREMASTER_COUNT,

QUEST_SPECIAL_FLAGS_DELIVER = 0x0100, // Internal flag computed only
QUEST_SPECIAL_FLAGS_SPEAKTO = 0x0200, // Internal flag computed only
QUEST_SPECIAL_FLAGS_KILL = 0x0400, // Internal flag computed only
QUEST_SPECIAL_FLAGS_TIMED = 0x0800, // Internal flag computed only
QUEST_SPECIAL_FLAGS_PLAYER_KILL = 0x1000 // Internal flag computed only
QUEST_SPECIAL_FLAGS_DELIVER = 0x0200, // Internal flag computed only
QUEST_SPECIAL_FLAGS_SPEAKTO = 0x0400, // Internal flag computed only
QUEST_SPECIAL_FLAGS_KILL = 0x0800, // Internal flag computed only
QUEST_SPECIAL_FLAGS_TIMED = 0x1000, // Internal flag computed only
QUEST_SPECIAL_FLAGS_PLAYER_KILL = 0x2000 // Internal flag computed only
};

struct QuestLocale
Expand Down