Increase link count header size

This commit is contained in:
Foereaper
2021-07-20 00:49:33 +02:00
parent c0a80bf40d
commit b7a4c9947e
2 changed files with 4 additions and 4 deletions

View File

@ -146,7 +146,7 @@ CMHFrame:SetScript("OnEvent", CMH.OnReceive)
function CMH.OnREQ(sender, data) function CMH.OnREQ(sender, data)
debugOut("Processing REQ data") debugOut("Processing REQ data")
-- split header string into proper variables and ensure the string is the expected format -- split header string into proper variables and ensure the string is the expected format
local functionId, linkCount, reqId, addon = data:match("(%d%d)(%d%d)(%w%w%w%w%w%w)(.+)"); local functionId, linkCount, reqId, addon = data:match("(%d%d)(%d%d%d)(%w%w%w%w%w%w)(.+)");
if not functionId or not linkCount or not reqId or not addon then if not functionId or not linkCount or not reqId or not addon then
debugOut("Malformed REQ data, aborting.") debugOut("Malformed REQ data, aborting.")
return return
@ -277,7 +277,7 @@ end
function CMH.SendREQ(functionId, linkCount, reqId, addon) function CMH.SendREQ(functionId, linkCount, reqId, addon)
debugOut("Sending REQ with ID: "..reqId) debugOut("Sending REQ with ID: "..reqId)
local send = string.format("%01s%01s%02d%02d%02d%06s%0"..tostring(#addon).."s", CSMHMsgPrefix, "C", pck.REQ, functionId, linkCount, reqId, addon) local send = string.format("%01s%01s%02d%02d%03d%06s%0"..tostring(#addon).."s", CSMHMsgPrefix, "C", pck.REQ, functionId, linkCount, reqId, addon)
SendAddonMessage(send, "", "WHISPER", UnitName("player")) SendAddonMessage(send, "", "WHISPER", UnitName("player"))
end end

View File

@ -154,7 +154,7 @@ RegisterServerEvent(30, SMH.OnReceive)
function SMH.OnREQ(sender, data) function SMH.OnREQ(sender, data)
debugOut("Processing REQ data") debugOut("Processing REQ data")
-- split header string into proper variables and ensure the string is the expected format -- split header string into proper variables and ensure the string is the expected format
local functionId, linkCount, reqId, addon = data:match("(%d%d)(%d%d)(%w%w%w%w%w%w)(.+)"); local functionId, linkCount, reqId, addon = data:match("(%d%d)(%d%d%d)(%w%w%w%w%w%w)(.+)");
if not functionId or not linkCount or not reqId or not addon then if not functionId or not linkCount or not reqId or not addon then
debugOut("Malformed REQ data, aborting.") debugOut("Malformed REQ data, aborting.")
return return
@ -288,7 +288,7 @@ end
function SMH.SendREQ(sender, functionId, linkCount, reqId, addon) function SMH.SendREQ(sender, functionId, linkCount, reqId, addon)
debugOut("Sending REQ with ID: "..reqId) debugOut("Sending REQ with ID: "..reqId)
local send = string.format("%01s%01s%02d%02d%02d%06s%0"..tostring(#addon).."s", CSMHMsgPrefix, "S", pck.REQ, functionId, linkCount, reqId, addon) local send = string.format("%01s%01s%02d%02d%03d%06s%0"..tostring(#addon).."s", CSMHMsgPrefix, "S", pck.REQ, functionId, linkCount, reqId, addon)
sender:SendAddonMessage(send, "", 7, sender) sender:SendAddonMessage(send, "", 7, sender)
end end