feat(bot): addclass command for non-gm player

This commit is contained in:
Yunfan Li
2023-07-08 00:42:03 +08:00
parent 51490666ae
commit d5f0553b53

View File

@@ -8,6 +8,7 @@
#include "ObjectAccessor.h"
#include "ObjectMgr.h"
#include "PlayerbotMgr.h"
#include "PlayerbotSecurity.h"
#include "Playerbots.h"
#include "PlayerbotDbStore.h"
#include "PlayerbotFactory.h"
@@ -422,7 +423,7 @@ void PlayerbotHolder::OnBotLogin(Player* const bot)
// set delay on login
botAI->SetNextCheckDelay(urand(2000, 4000));
botAI->TellMaster("Hello!");
botAI->TellMaster("Hello!", PLAYERBOT_SECURITY_TALK);
if (master && master->GetGroup() && !group) {
master->GetGroup()->AddMember(bot);