Bots: register .bot trade, answer the raid reset words, and load ForeverBots_Trade.lua

This commit is contained in:
Karrz1
2026-11-16 17:38:52 +00:00
parent eb8fff366e
commit fa476bb2be
5 changed files with 7 additions and 8 deletions
@@ -15,3 +15,4 @@ ForeverBots_Quests.lua
ForeverBots_Spec.lua
ForeverBots_Finder.lua
ForeverBots_Place.lua
ForeverBots_Trade.lua
+1
View File
@@ -69,6 +69,7 @@ The `.bot` commands for your own bots work for every account, no GM needed; each
| `.bot dismiss <name\|all>` | Removes it from your group and logs it out. Gear is kept. |
| `.bot delete <name>` | Deletes the character for good (the addon asks first). Only bots made for you: one of your own characters summoned as a bot (`.playerbot summon`) is refused with a pointer to `.bot dismiss`. |
| `.bot list` | Your companions, online or not (`saved` marks roster ones). |
| `.bot trade <seq> <what you see>` | Sent by the ForeverBots add-on right after you click Trade in a trade window with a bot, never typed. When the window still holds what you saw (money and items on both sides), your accept goes through with the bot's current state, so one click is enough; when the bot changed its offer, nothing is accepted and the add-on asks you to look again. Trades with players are not touched. |
| `.bot regear <name\|all>` | Re-rolls the equipment of online companions so they do not all wear the same pieces. Better pieces they wear stay; replaced ones go to the bags. |
| `.bot world` | Status of the world-bot spawner (Playerbot.World.*), console too. |
| `.bot population [off\|low\|medium\|high\|file]` | How many world bots the realm has, GM only, until the next restart (the launcher's Bots setting, `Bots.Size`, decides at every start; the add-on has no World bots tab since 0.6.13). Applies right away (a step down logs the world bots out first). It wins over `Bots.Size` and `Playerbot.World.Enable` until then; `file` hands back to the config files. No word: what it is now. Console too. |
@@ -61,7 +61,9 @@ std::optional<std::string> ClassifyGroupOrder(std::string_view msg, bool owner_w
// The panel's Ignore target button and key: the owner's own list, answered once (BotCommandParser::ApplyIgnoreOrder).
order == "ignore target" || order == "ignore clear" ||
// The Positions tab's words: "place <shape> [gap] [here|target] [who...]", answered once (BotCommandParser::ApplyPlaceOrder).
order.rfind("place ", 0) == 0;
order.rfind("place ", 0) == 0 ||
// The panel's Raid reset button (BotCommandParser::ApplyRaidResetOrder), answered once.
order == "raid reset" || order == "reset raid";
// Everyday words for the two commonest orders, exact lines only ("follow me please" stays chatter). Karrz typed "wait here" in
// party chat (2026-11-08): a bot answered "wait, got it" (BotChatReactor's acknowledgement) and nobody waited; "follow me"
// likewise only got a reply. The Russian lines are the ones the Russian testers use.
@@ -707,6 +707,8 @@ public:
{ "unsave", HandleBotUnsave, rbac::RBAC_PERM_JOIN_NORMAL_BG, Console::No },
{ "delete", HandleBotDelete, rbac::RBAC_PERM_JOIN_NORMAL_BG, Console::No },
{ "list", HandleBotList, rbac::RBAC_PERM_JOIN_NORMAL_BG, Console::No },
// Every player: the ForeverBots trade window (accept a bot's offer as seen). Sent by the add-on, not typed.
{ "trade", HandleBotTrade, rbac::RBAC_PERM_JOIN_NORMAL_BG, Console::No },
{ "language", HandleBotLanguage, rbac::RBAC_PERM_JOIN_NORMAL_BG, Console::No },
{ "world", HandleBotWorld, rbac::RBAC_PERM_COMMAND_GM, Console::Yes },
// GM only: how many world bots the realm has (Off / Low / Medium / High), set in game until the next restart (the launcher's Bots setting decides at every start).
@@ -1176,13 +1176,6 @@ bool BotPopulationManager::SetOwnerGearMode(uint32 account_id, uint8 requested_m
RequestGearRefresh(bot);
reply = std::string("gear mode ") + Gear::Owned::ModeName(mode) +
(Gear::Owned::IsCapMode(mode) ? " (this applies at level " + std::to_string(MaxPlayerLevel()) + "; below that: match)" : "");
// With hired bots on (Playerbot.Hire.Mode) a player who must hire gets each bot's grade gear, whatever mode is chosen
// (HireMgr::GearModeOverride): the choice is kept for when the rule is off, but say so instead of a plain "set" (Karrz 11-15,
// Naxx: T3 chosen and Regear pressed, the bots stayed in match gear and nothing said why).
bool const must_hire = requester ? HireMgr::Instance().MustHire(requester) : HireMgr::Instance().MustHireAccount(account_id);
if (must_hire && mode != GearMode::Match)
reply += ". Hired bots are on, so your bots wear the gear of their grade: Sellsword and your own bots match, Veteran best,"
" Legend bis. For this mode set Playerbot.Hire.Mode = 0, or Playerbot.Hire.GmBypass = 1 for a GM, in zz-9-local.conf";
return true;
}