mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-02-01 18:03:47 +00:00
initself command(test)
This commit is contained in:
@@ -647,6 +647,23 @@ std::vector<std::string> PlayerbotHolder::HandlePlayerbotCommand(char const* arg
|
|||||||
return messages;
|
return messages;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!strcmp(cmd, "initself")) {
|
||||||
|
if (master->GetSession()->GetSecurity() >= SEC_GAMEMASTER) {
|
||||||
|
OnBotLogin(master);
|
||||||
|
PlayerbotFactory factory(master, master->getLevel(), ITEM_QUALITY_EPIC);
|
||||||
|
factory.Randomize(false);
|
||||||
|
// LogoutPlayerBot(master->GetGUID());
|
||||||
|
// DisablePlayerBot(master->GetGUID());
|
||||||
|
// sPlayerbotsMgr->AddPlayerbotData(master, false);
|
||||||
|
// sRandomPlayerbotMgr->OnPlayerLogin(master);
|
||||||
|
messages.push_back("initself ok. please logout to refresh.");
|
||||||
|
return messages;
|
||||||
|
} else {
|
||||||
|
messages.push_back("ERROR: Only GM can use this command.");
|
||||||
|
return messages;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!strcmp(cmd, "list"))
|
if (!strcmp(cmd, "list"))
|
||||||
{
|
{
|
||||||
messages.push_back(ListBots(master));
|
messages.push_back(ListBots(master));
|
||||||
|
|||||||
Reference in New Issue
Block a user