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
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user