Playerbot: BotGear addon — use a non-zero sequence number
The server rejects any PBC frame with seq == 0 (AddonControl envelope check), so GEAR_BAGS_REQ/GEAR_EQUIP_REQ were silently dropped and the panel rendered with no data. Send uses an incrementing seq like PlayerbotControl.
This commit is contained in:
@@ -38,10 +38,12 @@ local EQUIP_SLOT_NAMES = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- Comms -------------------------------------------------------------
|
-- Comms -------------------------------------------------------------
|
||||||
|
local seqCounter = 1 -- server rejects frames with seq == 0
|
||||||
local function Send(mtype, ...)
|
local function Send(mtype, ...)
|
||||||
local args = {...}
|
local args = {...}
|
||||||
local body = table.concat(args, "|")
|
local body = table.concat(args, "|")
|
||||||
local f = string.format("1|00000000|1|1|%s|%s", mtype, body)
|
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"))
|
C_ChatInfo.SendAddonMessage(PREFIX, f, "WHISPER", botName or UnitName("player"))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user