diff options
-rw-r--r-- | src/game/GossipDef.cpp | 12 | ||||
-rw-r--r-- | src/game/ObjectMgr.cpp | 12 | ||||
-rw-r--r-- | src/game/QuestDef.cpp | 2 | ||||
-rw-r--r-- | src/game/QuestDef.h | 15 |
4 files changed, 21 insertions, 20 deletions
diff --git a/src/game/GossipDef.cpp b/src/game/GossipDef.cpp index 20a1bc7e279..bfb81dfa724 100644 --- a/src/game/GossipDef.cpp +++ b/src/game/GossipDef.cpp @@ -167,7 +167,7 @@ void PlayerMenu::SendGossipMenu(uint32 TitleTextId, uint64 objectGUID) data << uint32(questID); data << uint32(qItem.m_qIcon); data << uint32(pSession->GetPlayer()->GetQuestLevel(pQuest)); - data << uint32(pQuest->GetFlags()); // 3.3.3 quest flags + data << uint32(pQuest->GetClientFlags()); // 3.3.3 quest flags data << uint8(0); // 3.3.3 changes icon: blue question or yellow exclamation std::string Title = pQuest->GetTitle(); @@ -411,7 +411,7 @@ void PlayerMenu::SendQuestGiverQuestList(QEmote eEmote, const std::string& Title data << uint32(questID); data << uint32(qmi.m_qIcon); data << uint32(pSession->GetPlayer()->GetQuestLevel(pQuest)); - data << uint32(pQuest->GetFlags()); // 3.3.3 quest flags + data << uint32(pQuest->GetClientFlags()); // 3.3.3 quest flags data << uint8(0); // 3.3.3 changes icon: blue question or yellow exclamation data << title; } @@ -461,7 +461,7 @@ void PlayerMenu::SendQuestGiverQuestDetails(Quest const *pQuest, uint64 npcGUID, data << Details; data << Objectives; data << uint8(ActivateAccept ? 1 : 0); // auto finish - data << uint32(pQuest->GetFlags()); // 3.3.3 questFlags + data << uint32(pQuest->GetClientFlags()); // 3.3.3 questFlags data << uint32(pQuest->GetSuggestedPlayers()); data << uint8(0); // IsFinished, value is sent back to server in quest accept packet @@ -603,7 +603,7 @@ void PlayerMenu::SendQuestQueryResponse(Quest const *pQuest) data << uint32(Trinity::Honor::hk_honor_at_level(pSession->GetPlayer()->getLevel(), pQuest->GetRewHonorableKills())); data << float(0); // new reward honor (multipled by ~62 at client side) data << uint32(pQuest->GetSrcItemId()); // source item id - data << uint32(pQuest->GetFlags() & 0xFFFF); // quest flags + data << uint32(pQuest->GetClientFlags()); // quest flags data << uint32(pQuest->GetCharTitleId()); // CharTitleId, new 2.4.0, player gets this title (id from CharTitles) data << uint32(pQuest->GetPlayersSlain()); // players slain data << uint32(pQuest->GetBonusTalents()); // bonus talents @@ -708,7 +708,7 @@ void PlayerMenu::SendQuestGiverOfferReward(Quest const* pQuest, uint64 npcGUID, data << OfferRewardText; data << uint8(EnableNext ? 1 : 0); // Auto Finish - data << uint32(pQuest->GetFlags()); // 3.3.3 questFlags + data << uint32(pQuest->GetClientFlags()); // 3.3.3 questFlags data << uint32(pQuest->GetSuggestedPlayers()); // SuggestedGroupNum uint32 EmoteCount = 0; @@ -828,7 +828,7 @@ void PlayerMenu::SendQuestGiverRequestItems(Quest const *pQuest, uint64 npcGUID, else data << uint32(0x00); - data << uint32(pQuest->GetFlags()); // 3.3.3 questFlags + data << uint32(pQuest->GetClientFlags()); // 3.3.3 questFlags data << uint32(pQuest->GetSuggestedPlayers()); // SuggestedGroupNum // Required Money diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index c4efb463732..9cf28c3c482 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -3653,23 +3653,23 @@ void ObjectMgr::LoadQuests() sLog.outErrorDb("Quest %u has `Method` = %u, expected values are 0, 1 or 2.",qinfo->GetQuestId(),qinfo->GetQuestMethod()); } - if (qinfo->QuestFlags & ~QUEST_TRINITY_FLAGS_DB_ALLOWED) + if (qinfo->GetFlags() & ~QUEST_TRINITY_FLAGS_DB_ALLOWED) { sLog.outErrorDb("Quest %u has `SpecialFlags` = %u > max allowed value. Correct `SpecialFlags` to value <= %u", - qinfo->GetQuestId(),qinfo->QuestFlags,QUEST_TRINITY_FLAGS_DB_ALLOWED >> 16); + qinfo->GetQuestId(),qinfo->GetFlags(),QUEST_TRINITY_FLAGS_DB_ALLOWED >> 20); qinfo->QuestFlags &= QUEST_TRINITY_FLAGS_DB_ALLOWED; } - if (qinfo->QuestFlags & (QUEST_FLAGS_DAILY | QUEST_FLAGS_WEEKLY)) + if (qinfo->GetFlags() & (QUEST_FLAGS_DAILY | QUEST_FLAGS_WEEKLY)) { - if (!(qinfo->QuestFlags & QUEST_TRINITY_FLAGS_REPEATABLE)) + if (!(qinfo->GetFlags() & QUEST_TRINITY_FLAGS_REPEATABLE)) { sLog.outErrorDb("Daily Quest %u not marked as repeatable in `SpecialFlags`, added.",qinfo->GetQuestId()); - qinfo->QuestFlags |= QUEST_TRINITY_FLAGS_REPEATABLE; + qinfo->SetFlag(QUEST_TRINITY_FLAGS_REPEATABLE); } } - if (qinfo->QuestFlags & QUEST_FLAGS_AUTO_REWARDED) + if (qinfo->GetFlags() & QUEST_FLAGS_AUTO_REWARDED) { // at auto-reward can be rewarded only RewChoiceItemId[0] for (uint8 j = 1; j < QUEST_REWARD_CHOICES_COUNT; ++j) diff --git a/src/game/QuestDef.cpp b/src/game/QuestDef.cpp index 7f3bda0682d..525ed05dd25 100644 --- a/src/game/QuestDef.cpp +++ b/src/game/QuestDef.cpp @@ -142,7 +142,7 @@ Quest::Quest(Field * questRecord) QuestStartScript = questRecord[142].GetUInt32(); QuestCompleteScript = questRecord[143].GetUInt32(); - QuestFlags |= SpecialFlags << 16; + QuestFlags |= SpecialFlags << 20; m_reqitemscount = 0; m_reqCreatureOrGOcount = 0; diff --git a/src/game/QuestDef.h b/src/game/QuestDef.h index 7ceb12bd025..c8537c8eff3 100644 --- a/src/game/QuestDef.h +++ b/src/game/QuestDef.h @@ -143,15 +143,15 @@ enum __QuestFlags QUEST_FLAGS_AUTO_ACCEPT = 0x00080000, // quests in starting areas // Trinity flags for set SpecialFlags in DB if required but used only at server - QUEST_TRINITY_FLAGS_REPEATABLE = 0x010000, // Set by 1 in SpecialFlags from DB - QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT = 0x020000, // Set by 2 in SpecialFlags from DB (if reequired area explore, spell SPELL_EFFECT_QUEST_COMPLETE casting, table `*_script` command SCRIPT_COMMAND_QUEST_EXPLORED use, set from script) - QUEST_TRINITY_FLAGS_DB_ALLOWED = 0xFFFF | QUEST_TRINITY_FLAGS_REPEATABLE | QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT, + QUEST_TRINITY_FLAGS_REPEATABLE = 0x00100000, // Set by 1 in SpecialFlags from DB + QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT = 0x00200000, // Set by 2 in SpecialFlags from DB (if reequired area explore, spell SPELL_EFFECT_QUEST_COMPLETE casting, table `*_script` command SCRIPT_COMMAND_QUEST_EXPLORED use, set from script) + QUEST_TRINITY_FLAGS_DB_ALLOWED = 0xFFFFF | QUEST_TRINITY_FLAGS_REPEATABLE | QUEST_TRINITY_FLAGS_EXPLORATION_OR_EVENT, // Trinity flags for internal use only - QUEST_TRINITY_FLAGS_DELIVER = 0x040000, // Internal flag computed only - QUEST_TRINITY_FLAGS_SPEAKTO = 0x080000, // Internal flag computed only - QUEST_TRINITY_FLAGS_KILL_OR_CAST = 0x100000, // Internal flag computed only - QUEST_TRINITY_FLAGS_TIMED = 0x200000, // Internal flag computed only + QUEST_TRINITY_FLAGS_DELIVER = 0x04000000, // Internal flag computed only + QUEST_TRINITY_FLAGS_SPEAKTO = 0x08000000, // Internal flag computed only + QUEST_TRINITY_FLAGS_KILL_OR_CAST = 0x10000000, // Internal flag computed only + QUEST_TRINITY_FLAGS_TIMED = 0x20000000, // Internal flag computed only }; struct QuestLocale @@ -239,6 +239,7 @@ class Quest bool IsRepeatable() const { return QuestFlags & QUEST_TRINITY_FLAGS_REPEATABLE; } bool IsAutoComplete() const { return QuestMethod ? false : true; } uint32 GetFlags() const { return QuestFlags; } + uint32 GetClientFlags() const { return QuestFlags & 0xFFFFF; } bool IsDaily() const { return QuestFlags & QUEST_FLAGS_DAILY; } bool IsWeekly() const { return QuestFlags & QUEST_FLAGS_WEEKLY; } bool IsAutoAccept() const { return QuestFlags & QUEST_FLAGS_AUTO_ACCEPT; } |