diff options
| author | Rat <none@none> | 2010-09-20 10:19:20 +0200 |
|---|---|---|
| committer | Rat <none@none> | 2010-09-20 10:19:20 +0200 |
| commit | 2fb80e4a86a6006d5692e483880e4ec4370fe5f5 (patch) | |
| tree | 81193faa0a36fcd358c7c9ff509123de03364411 /src/server/game/Server | |
| parent | 1d6d11d367f6176b9df5a93cc68e4834623a605f (diff) | |
Core/ConditionMgr: You can now hide/show the quest marks with conditions (! ?)
note: check only runs at quest giver query!
Using together with CONDITION_SOURCE_TYPE_QUEST_ACCEPT you can totally hide quests
--HG--
branch : trunk
Diffstat (limited to 'src/server/game/Server')
| -rw-r--r-- | src/server/game/Server/Protocol/Handlers/QuestHandler.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp b/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp index 480f0983041..676184a9544 100644 --- a/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp @@ -33,6 +33,7 @@ #include "Battleground.h" #include "BattlegroundAV.h" #include "ScriptMgr.h" +#include "ConditionMgr.h" void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket & recv_data) { @@ -602,6 +603,10 @@ uint32 WorldSession::getDialogStatus(Player *pPlayer, Object* questgiver, uint32 Quest const *pQuest = sObjectMgr.GetQuestTemplate(quest_id); if (!pQuest) continue; + ConditionList conditions = sConditionMgr.GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK, pQuest->GetQuestId()); + if (!sConditionMgr.IsPlayerMeetToConditions(pPlayer, conditions)) + continue; + QuestStatus status = pPlayer->GetQuestStatus(quest_id); if ((status == QUEST_STATUS_COMPLETE && !pPlayer->GetQuestRewardStatus(quest_id)) || (pQuest->IsAutoComplete() && pPlayer->CanTakeQuest(pQuest, false))) @@ -626,6 +631,10 @@ uint32 WorldSession::getDialogStatus(Player *pPlayer, Object* questgiver, uint32 if (!pQuest) continue; + ConditionList conditions = sConditionMgr.GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK, pQuest->GetQuestId()); + if (!sConditionMgr.IsPlayerMeetToConditions(pPlayer, conditions)) + continue; + QuestStatus status = pPlayer->GetQuestStatus(quest_id); if (status == QUEST_STATUS_NONE) { |
