mirror of
https://github.com/ZhengPeiRu21/mod-individual-progression
synced 2025-11-29 23:44:51 +08:00
fix allowed bots
This prevents bots that aren't attuned or haven't progressed to the Naxx phase to be teleported inside excluded random bots should still be able to get in
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "IndividualProgression.h"
|
||||
#include "naxxramas_40.h"
|
||||
|
||||
class IndividualPlayerProgression : public PlayerScript
|
||||
{
|
||||
@@ -171,6 +172,20 @@ public:
|
||||
return (accountNameFound && std::regex_match(accountName, excludedAccountsRegex));
|
||||
}
|
||||
|
||||
static bool isAttuned(Player* player)
|
||||
{
|
||||
if ((player->GetQuestStatus(NAXX40_ATTUNEMENT_1) == QUEST_STATUS_REWARDED) ||
|
||||
(player->GetQuestStatus(NAXX40_ATTUNEMENT_2) == QUEST_STATUS_REWARDED) ||
|
||||
(player->GetQuestStatus(NAXX40_ATTUNEMENT_3) == QUEST_STATUS_REWARDED))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool OnPlayerBeforeTeleport(Player* player, uint32 mapid, float x, float y, float z, float /*orientation*/, uint32 /*options*/, Unit* /*target*/) override
|
||||
{
|
||||
if (!sIndividualProgression->enabled || player->IsGameMaster() || isExcludedFromProgression(player))
|
||||
@@ -243,6 +258,10 @@ public:
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (instanceTemplate->Parent == MAP_NORTHREND && mapid == MAP_NAXXRAMAS && player->GetLevel() < 80 && (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ) || !isAttuned(player)) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user