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

@@ -27,7 +27,7 @@ public:
PlayerbotHolder();
virtual ~PlayerbotHolder(){};
void AddPlayerBot(ObjectGuid guid, uint32 masterAccountId, bool byAddClass = false);
void AddPlayerBot(ObjectGuid guid, uint32 masterAccountId);
void HandlePlayerBotLoginCallback(PlayerbotLoginQueryHolder const& holder);
void LogoutPlayerBot(ObjectGuid guid);
@@ -43,7 +43,7 @@ public:
void HandleBotPackets(WorldSession* session);
void LogoutAllBots();
void OnBotLogin(Player* const bot, bool byAddClass = false);
void OnBotLogin(Player* const bot);
std::vector<std::string> HandlePlayerbotCommand(char const* args, Player* master = nullptr);
std::string const ProcessBotCommand(std::string const cmd, ObjectGuid guid, ObjectGuid masterguid, bool admin,
@@ -59,7 +59,6 @@ protected:
virtual void OnBotLoginInternal(Player* const bot) = 0;
PlayerBotMap playerBots;
std::unordered_set<ObjectGuid> addClassBots;
std::unordered_set<ObjectGuid> botLoading;
};