mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-18 03:05:43 +00:00
Merge pull request #367 from liyunfan1223/self-command
Fix .playerbot bot self
This commit is contained in:
@@ -19,7 +19,7 @@ bool InviteToGroupAction::Execute(Event event)
|
||||
|
||||
bool InviteToGroupAction::Invite(Player* player)
|
||||
{
|
||||
if (!player)
|
||||
if (!player || !player->IsInWorld())
|
||||
return false;
|
||||
|
||||
if (!GET_PLAYERBOT_AI(player) && !botAI->GetSecurity()->CheckLevelFor(PLAYERBOT_SECURITY_INVITE, true, player))
|
||||
|
||||
@@ -74,7 +74,7 @@ bool SellAction::Execute(Event event)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (text == "all")
|
||||
if (text != "")
|
||||
{
|
||||
std::vector<Item *> items = parseItems(text, ITERATE_ITEMS_IN_BAGS);
|
||||
for (Item *item : items)
|
||||
@@ -84,7 +84,7 @@ bool SellAction::Execute(Event event)
|
||||
return true;
|
||||
}
|
||||
|
||||
botAI->TellError("Usage: s gray/*/vendor/all");
|
||||
botAI->TellError("Usage: s gray/*/vendor/[item link]");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -172,6 +172,7 @@ bool MaintenanceAction::Execute(Event event)
|
||||
factory.ApplyEnchantAndGemsNew();
|
||||
}
|
||||
bot->DurabilityRepairAll(false, 1.0f, false);
|
||||
bot->SendTalentsInfoData(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -181,6 +182,7 @@ bool RemoveGlyphAction::Execute(Event event)
|
||||
{
|
||||
bot->SetGlyph(slotIndex, 0, true);
|
||||
}
|
||||
bot->SendTalentsInfoData(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user