mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 17:09:08 +00:00
Item usage and equip initialization
This commit is contained in:
@@ -845,6 +845,22 @@ std::vector<std::string> PlayerbotHolder::HandlePlayerbotCommand(char const* arg
|
||||
|
||||
if (!strncmp(cmd, "initself=", 9))
|
||||
{
|
||||
if (!strcmp(cmd, "initself=uncommon"))
|
||||
{
|
||||
if (master->GetSession()->GetSecurity() >= SEC_GAMEMASTER)
|
||||
{
|
||||
// OnBotLogin(master);
|
||||
PlayerbotFactory factory(master, master->GetLevel(), ITEM_QUALITY_UNCOMMON);
|
||||
factory.Randomize(false);
|
||||
messages.push_back("initself ok");
|
||||
return messages;
|
||||
}
|
||||
else
|
||||
{
|
||||
messages.push_back("ERROR: Only GM can use this command.");
|
||||
return messages;
|
||||
}
|
||||
}
|
||||
if (!strcmp(cmd, "initself=rare"))
|
||||
{
|
||||
if (master->GetSession()->GetSecurity() >= SEC_GAMEMASTER)
|
||||
@@ -877,6 +893,22 @@ std::vector<std::string> PlayerbotHolder::HandlePlayerbotCommand(char const* arg
|
||||
return messages;
|
||||
}
|
||||
}
|
||||
if (!strcmp(cmd, "initself=legendary"))
|
||||
{
|
||||
if (master->GetSession()->GetSecurity() >= SEC_GAMEMASTER)
|
||||
{
|
||||
// OnBotLogin(master);
|
||||
PlayerbotFactory factory(master, master->GetLevel(), ITEM_QUALITY_LEGENDARY);
|
||||
factory.Randomize(false);
|
||||
messages.push_back("initself ok");
|
||||
return messages;
|
||||
}
|
||||
else
|
||||
{
|
||||
messages.push_back("ERROR: Only GM can use this command.");
|
||||
return messages;
|
||||
}
|
||||
}
|
||||
int32 gs;
|
||||
if (sscanf(cmd, "initself=%d", &gs) != -1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user