Always allow addclass bots login and init (#946)

* Change the way to check addclass bots and allow adding them by characters name

* Always addclass bots login and init

* Comments and message
This commit is contained in:
Yunfan Li
2025-02-05 12:56:37 +08:00
committed by GitHub
parent 308c0b437e
commit 14bdc0ec5a
4 changed files with 63 additions and 68 deletions

View File

@@ -111,6 +111,7 @@ public:
static bool HandlePlayerbotConsoleCommand(ChatHandler* handler, char const* args);
bool IsRandomBot(Player* bot);
bool IsRandomBot(ObjectGuid::LowType bot);
bool IsAddclassBot(ObjectGuid::LowType bot);
void Randomize(Player* bot);
void Clear(Player* bot);
void RandomizeFirst(Player* bot);
@@ -172,7 +173,7 @@ public:
void PrepareAddclassCache();
void PrepareTeleportCache();
void Init();
std::map<uint8, std::vector<ObjectGuid>> addclassCache;
std::map<uint8, std::unordered_set<ObjectGuid>> addclassCache;
std::map<uint8, std::vector<WorldLocation>> locsPerLevelCache;
std::map<uint8, std::vector<WorldLocation>> allianceStarterPerLevelCache;
std::map<uint8, std::vector<WorldLocation>> hordeStarterPerLevelCache;