mirror of
https://github.com/ZhengPeiRu21/mod-individual-progression
synced 2025-11-29 23:44:51 +08:00
Check progression instead of Death Knight class (#662)
death knights can now enter if their progression level is low enough.
This commit is contained in:
@@ -365,7 +365,7 @@ public:
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (mapid == MAP_ONYXIAS_LAIR && player->GetLevel() <= IP_LEVEL_TBC && (!player->HasItemCount(ITEM_DRAKEFIRE_AMULET) || player->getClass() == CLASS_DEATH_KNIGHT))
|
||||
if (mapid == MAP_ONYXIAS_LAIR && !sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5) && !player->HasItemCount(ITEM_DRAKEFIRE_AMULET))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -435,7 +435,7 @@ public:
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (instanceTemplate->Parent == MAP_NORTHREND && mapid == MAP_NAXXRAMAS && player->GetLevel() <= IP_LEVEL_TBC && !isAttuned(player))
|
||||
if (instanceTemplate->Parent == MAP_NORTHREND && mapid == MAP_NAXXRAMAS && player->GetLevel() <= IP_LEVEL_TBC && (!isAttuned(player) || sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5) ))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -52,7 +52,6 @@ public:
|
||||
static bool HandleViewIndividualProgressionCommand(ChatHandler* handler, Optional<PlayerIdentifier> player)
|
||||
{
|
||||
player = PlayerIdentifier::FromTargetOrSelf(handler);
|
||||
|
||||
Player* target = player->GetConnectedPlayer();
|
||||
uint32 progressionLevel = target->GetPlayerSetting("mod-individual-progression", SETTING_PROGRESSION_STATE).value;
|
||||
std::string playername = target->GetName();
|
||||
@@ -77,24 +76,24 @@ public:
|
||||
|
||||
static bool HandleTeleIndividualProgressionCommand(ChatHandler* handler, Optional<PlayerIdentifier> player, std::string location)
|
||||
{
|
||||
player = PlayerIdentifier::FromTargetOrSelf(handler);
|
||||
|
||||
if (location != "naxx40" && location != "onyxia40")
|
||||
{
|
||||
handler->PSendSysMessage("|cff00ffff{}|r is not a valid teleport location.", location);
|
||||
return false;
|
||||
}
|
||||
|
||||
player = PlayerIdentifier::FromTargetOrSelf(handler);
|
||||
Player* target = player->GetConnectedPlayer();
|
||||
uint32 progressionLevel = target->GetPlayerSetting("mod-individual-progression", SETTING_PROGRESSION_STATE).value;
|
||||
std::string playername = target->GetName();
|
||||
|
||||
if ((location == "naxx40") && (target->GetLevel() <= IP_LEVEL_TBC) && (target->getClass() != CLASS_DEATH_KNIGHT) && isAttuned(target))
|
||||
if (location == "naxx40" && ((progressionLevel < PROGRESSION_TBC_TIER_5 && isAttuned(target)) || target->IsGameMaster()))
|
||||
{
|
||||
target->SetRaidDifficulty(RAID_DIFFICULTY_10MAN_HEROIC);
|
||||
target->TeleportTo(533, 3005.51f, -3434.64f, 304.195f, 6.2831f);
|
||||
return true;
|
||||
}
|
||||
else if ((location == "onyxia40" && target->GetLevel() < IP_LEVEL_TBC) && (target->getClass() != CLASS_DEATH_KNIGHT) && target->HasItemCount(ITEM_DRAKEFIRE_AMULET))
|
||||
else if (location == "onyxia40" && ((progressionLevel < PROGRESSION_TBC_TIER_5 && target->HasItemCount(ITEM_DRAKEFIRE_AMULET)) || target->IsGameMaster()))
|
||||
{
|
||||
target->SetRaidDifficulty(RAID_DIFFICULTY_10MAN_HEROIC);
|
||||
target->TeleportTo(249, 29.1607f, -71.3372f, -8.18032f, 4.58f);
|
||||
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* /*go*/) override
|
||||
{
|
||||
if ((isExcludedFromProgression(player) && (player->GetLevel() <= IP_LEVEL_TBC) && (player->getClass() != CLASS_DEATH_KNIGHT)) ||
|
||||
if ((isExcludedFromProgression(player) && (player->GetLevel() <= IP_LEVEL_TBC)) ||
|
||||
((!sIndividualProgression->requireNaxxStrath || player->GetQuestStatus(NAXX40_ENTRANCE_FLAG) == QUEST_STATUS_REWARDED) && (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5))))
|
||||
{
|
||||
player->SetRaidDifficulty(RAID_DIFFICULTY_10MAN_HEROIC);
|
||||
|
||||
@@ -148,8 +148,9 @@ public:
|
||||
bool OnTrigger(Player* player, AreaTrigger const* /*areaTrigger*/) override
|
||||
{
|
||||
ChatHandler handler(player->GetSession());
|
||||
uint32 progressionLevel = player->GetPlayerSetting("mod-individual-progression", SETTING_PROGRESSION_STATE).value;
|
||||
|
||||
if ((player->GetLevel() <= IP_LEVEL_TBC) && (player->getClass() != CLASS_DEATH_KNIGHT) && (player->HasItemCount(ITEM_DRAKEFIRE_AMULET) || isExcludedFromProgression(player)))
|
||||
if (player->GetLevel() <= IP_LEVEL_TBC && progressionLevel < PROGRESSION_TBC_TIER_5 && (player->HasItemCount(ITEM_DRAKEFIRE_AMULET) || isExcludedFromProgression(player)))
|
||||
{
|
||||
player->SetRaidDifficulty(RAID_DIFFICULTY_10MAN_HEROIC);
|
||||
player->TeleportTo(249, 29.1607f, -71.3372f, -8.18032f, 4.58f);
|
||||
@@ -162,9 +163,9 @@ public:
|
||||
{
|
||||
handler.PSendSysMessage("You must have the Drakefire Amulet in your inventory to enter this version of Onyxia\'s Lair.");
|
||||
}
|
||||
else if (player->getClass() == CLASS_DEATH_KNIGHT)
|
||||
else if (progressionLevel > PROGRESSION_TBC_TIER_4)
|
||||
{
|
||||
handler.PSendSysMessage("Death knights are not allowed to enter this version of Onyxia\'s Lair.");
|
||||
handler.PSendSysMessage("Your progression level is too high to enter this version of Onyxia\'s Lair.");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user