Playerbot: BotGear addon — send via PBCFLEET target, not the bot's name

Whispering the bot's character name routes the server's OnChat hook to the
headless bot's session (pool account), so GEAR responses were never sent to
the owner. Match PlayerbotControl: whisper the magic 'PBCFLEET' target; the
bot guid is carried in the payload and the handlers authorize via Owners().
This commit is contained in:
devbox
2026-08-17 18:20:11 +10:00
parent 41ebd14db9
commit deef9544bf
@@ -39,12 +39,16 @@ local EQUIP_SLOT_NAMES = {
-- Comms -------------------------------------------------------------
local seqCounter = 1 -- server rejects frames with seq == 0
local FLEET_TARGET = "PBCFLEET" -- magic whisper target intercepted server-side
local function Send(mtype, ...)
local args = {...}
local body = table.concat(args, "|")
local f = string.format("1|%08x|1|1|%s|%s", seqCounter, mtype, body)
seqCounter = (seqCounter % 0xFFFFFFFF) + 1
C_ChatInfo.SendAddonMessage(PREFIX, f, "WHISPER", botName or UnitName("player"))
-- Send to PBCFLEET like PlayerbotControl: whispering the bot's name
-- routes the server's OnChat hook to the headless bot session instead of
-- the owner, so no reply ever reaches us.
C_ChatInfo.SendAddonMessage(PREFIX, f, "WHISPER", FLEET_TARGET)
end
local function ResolveTarget()