added exclude accounts parameter

This commit is contained in:
Maicol González
2024-09-01 02:11:17 -03:00
parent f6624ceb81
commit 333cc730c7

View File

@@ -166,9 +166,9 @@ public:
return false; return false;
} }
std::string accountName; std::string accountName;
bool gotAccountName = AccountMgr::GetName(player->GetSession()->GetAccountId(), accountName); bool accountNameFound = AccountMgr::GetName(player->GetSession()->GetAccountId(), accountName);
std::regex excludedAccountsRegex (sIndividualProgression->excludedAccountsRegex); std::regex excludedAccountsRegex (sIndividualProgression->excludedAccountsRegex);
return (gotAccountName && std::regex_match(accountName, excludedAccountsRegex)); return (accountNameFound && std::regex_match(accountName, excludedAccountsRegex));
} }
bool OnBeforeTeleport(Player* player, uint32 mapid, float x, float y, float z, float /*orientation*/, uint32 /*options*/, Unit* /*target*/) override bool OnBeforeTeleport(Player* player, uint32 mapid, float x, float y, float z, float /*orientation*/, uint32 /*options*/, Unit* /*target*/) override