Increase link count header size
This commit is contained in:
@ -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
|
||||||
|
|
||||||
|
|||||||
@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user