Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3617250

Browse files
committedSep 13, 2024·
fix: hide the dungeonmaster NPC if 5 man mythics are not enabled
1 parent b13fd96 commit 3617250

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed
 

‎src/mod_zone_difficulty_scripts.cpp

+13-8
Original file line numberDiff line numberDiff line change
@@ -1020,25 +1020,31 @@ class mod_zone_difficulty_dungeonmaster : public CreatureScript
10201020
{
10211021
mod_zone_difficulty_dungeonmasterAI(Creature* creature) : ScriptedAI(creature) { }
10221022

1023+
bool CanBeSeen(Player const* /*seer*/) override
1024+
{
1025+
if (me->GetMap() && me->GetMap()->IsHeroic() && !me->GetMap()->IsRaid())
1026+
if (!sZoneDifficulty->MythicmodeInNormalDungeons)
1027+
return false;
1028+
1029+
if (!sZoneDifficulty->MythicmodeEnable)
1030+
return false;
1031+
1032+
return true;
1033+
}
1034+
10231035
void Reset() override
10241036
{
1025-
//LOG_INFO("module", "MOD-ZONE-DIFFICULTY: mod_zone_difficulty_dungeonmasterAI: Reset happens.");
10261037
if (me->GetMap() && me->GetMap()->IsHeroic() && !me->GetMap()->IsRaid())
10271038
{
10281039
if (!sZoneDifficulty->MythicmodeEnable)
1029-
{
10301040
return;
1031-
}
1032-
//LOG_INFO("module", "MOD-ZONE-DIFFICULTY: We're inside a heroic 5man now.");
1041+
10331042
//todo: add the list for the wotlk heroic dungeons quests
10341043
for (auto& quest : sZoneDifficulty->DailyHeroicQuests)
10351044
{
1036-
//LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Checking quest {} and MapId {}", quest, me->GetMapId());
10371045
if (sPoolMgr->IsSpawnedObject<Quest>(quest))
1038-
{
10391046
if (sZoneDifficulty->HeroicTBCQuestMapList[me->GetMapId()] == quest)
10401047
{
1041-
//LOG_INFO("module", "MOD-ZONE-DIFFICULTY: mod_zone_difficulty_dungeonmasterAI: Quest with id {} is active.", quest);
10421048
me->SetPhaseMask(1, true);
10431049

10441050
_scheduler.Schedule(15s, [this](TaskContext /*context*/)
@@ -1055,7 +1061,6 @@ class mod_zone_difficulty_dungeonmaster : public CreatureScript
10551061
});
10561062
break;
10571063
}
1058-
}
10591064
}
10601065
}
10611066
}

0 commit comments

Comments
 (0)
Please sign in to comment.