Playerbot: BotGear addon — self-whisper to the owner (the only working target)
The server's addon OnChat hook only fires inside Player::WhisperAddon, which
requires the whisper target to resolve to a real connected player. The fake
'PBCFLEET' name is dropped before the hook, so BotGear requests never reached
the server. Whisper the OWNER's own name instead (self-whisper) — the exact
path PlayerbotControl uses (it re-points its fleet target at UnitName('player')
on PLAYER_LOGIN). The bot identity rides in the payload.
This commit is contained in:
@@ -39,16 +39,18 @@ 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
|
||||
-- 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)
|
||||
-- Self-whisper to the OWNER's name. The server's OnChat hook only fires
|
||||
-- inside Player::WhisperAddon, which requires the target to resolve to a
|
||||
-- real connected player — the fake "PBCFLEET" name is dropped first, and
|
||||
-- whispering the bot works but the player's own name is the proven path
|
||||
-- (PlayerbotControl re-points its fleet target here at PLAYER_LOGIN).
|
||||
-- The bot identity rides in the payload.
|
||||
C_ChatInfo.SendAddonMessage(PREFIX, f, "WHISPER", UnitName("player"))
|
||||
end
|
||||
|
||||
local function ResolveTarget()
|
||||
|
||||
Reference in New Issue
Block a user