Skip to content

Commit c6340b9

Browse files
committed
fix: Implement requirement of clearing BT to access T6 items
1 parent 9fcb820 commit c6340b9

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

src/ZoneDifficulty.h

+9-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,15 @@ enum ZoneDifficultySettings
119119
TYPE_RAID_T7 = 13,
120120
TYPE_RAID_T8 = 14,
121121
TYPE_RAID_T9 = 15,
122-
TYPE_RAID_T10 = 16
122+
TYPE_RAID_T10 = 16,
123+
124+
// Completed tiers settings
125+
SETTING_BLACK_TEMPLE = 0
126+
};
127+
128+
enum Misc
129+
{
130+
NPC_ILLIDAN_STORMRAGE = 22917
123131
};
124132

125133
class ZoneDifficulty

src/mod_zone_difficulty_scripts.cpp

+20
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,15 @@ class mod_zone_difficulty_globalscript : public GlobalScript
588588
else if (map->IsRaid())
589589
{
590590
sZoneDifficulty->AddMythicmodeScore(map, sZoneDifficulty->Expansion[mapId], score);
591+
592+
if (source->GetEntry() == NPC_ILLIDAN_STORMRAGE)
593+
{
594+
map->DoForAllPlayers([&](Player* player)
595+
{
596+
player->UpdatePlayerSetting(ModZoneDifficultyString + "ct", SETTING_BLACK_TEMPLE, 1);
597+
ChatHandler(player->GetSession()).PSendSysMessage("Congratulations on completing the Black Temple!");
598+
});
599+
}
591600
}
592601
/* debug
593602
* else
@@ -769,6 +778,17 @@ class mod_zone_difficulty_rewardnpc : public CreatureScript
769778
//LOG_INFO("module", "MOD-ZONE-DIFFICULTY: Handling item with category {}, itemType {}, counter {}", category, itemType, counter);
770779

771780
// Check if the player has enough score in the respective category.
781+
782+
if (category == TYPE_RAID_T6)
783+
{
784+
if (!player->GetPlayerSetting(ModZoneDifficultyString + "ct", SETTING_BLACK_TEMPLE).value)
785+
{
786+
creature->Whisper("Ah, hero! The threads of fate bring you to me. To claim the rewards you desire, you must first confront Illidan Stormrage on Mythic difficulty.",
787+
LANG_UNIVERSAL, player);
788+
return true;
789+
}
790+
}
791+
772792
uint32 availableScore = player->GetPlayerSetting(ModZoneDifficultyString + "score", category).value;
773793

774794
if (availableScore < sZoneDifficulty->Rewards[category][itemType][counter].Price)

0 commit comments

Comments
 (0)