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:
@@ -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();
|
||||
@@ -76,25 +75,25 @@ 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);
|
||||
|
||||
Reference in New Issue
Block a user