Skip to content

Commit

Permalink
Fix transmission of auras
Browse files Browse the repository at this point in the history
deleted crossRealmSendCommMessage function was handling chatType automatically, we have to readd this param
  • Loading branch information
mrbuds committed Jul 27, 2024
1 parent a90591a commit 219e3ab
Showing 1 changed file with 4 additions and 29 deletions.
33 changes: 4 additions & 29 deletions WeakAuras/Transmission.lua
Original file line number Diff line number Diff line change
Expand Up @@ -610,41 +610,29 @@ function RequestDisplay(characterName, displayName)
d = displayName
};
local transmitString = TableToString(transmit);
Comm:SendCommMessage("WeakAuras", transmitString, characterName);
Comm:SendCommMessage("WeakAuras", transmitString, "WHISPER", characterName);
end

function TransmitError(errorMsg, characterName)
local transmit = {
m = "dE",
eM = errorMsg
};
Comm:SendCommMessage("WeakAuras", TableToString(transmit), characterName);
Comm:SendCommMessage("WeakAuras", TableToString(transmit), "WHISPER", characterName);
end

function TransmitDisplay(id, characterName)
local encoded = Private.DisplayToString(id);
if(encoded ~= "") then
Comm:SendCommMessage("WeakAuras", encoded, characterName, "BULK", function(displayName, done, total)
Comm:SendCommMessage("WeakAurasProg", done.." "..total.." "..displayName, characterName, "ALERT");
Comm:SendCommMessage("WeakAuras", encoded, "WHISPER", characterName, "BULK", function(displayName, done, total)
Comm:SendCommMessage("WeakAurasProg", done.." "..total.." "..displayName, "WHISPER", characterName, "ALERT");
end, id);
else
TransmitError("dne", characterName);
end
end

Comm:RegisterComm("WeakAurasProg", function(prefix, message, distribution, sender)
if distribution == "PARTY" or distribution == "RAID" then
local dest, msg = string.match(message, "^§§(.+):(.+)$")
if dest then
local dName, dServer = string.match(dest, "^(.*)-(.*)$")
local myName, myServer = UnitFullName("player")
if myName == dName and myServer == dServer then
message = msg
else
return
end
end
end
if tooltipLoading and ItemRefTooltip:IsVisible() and safeSenders[sender] then
receivedData = true;
local done, total, displayName = strsplit(" ", message, 3)
Expand All @@ -663,19 +651,6 @@ Comm:RegisterComm("WeakAurasProg", function(prefix, message, distribution, sende
end)

Comm:RegisterComm("WeakAuras", function(prefix, message, distribution, sender)
if distribution == "PARTY" or distribution == "RAID" then
local dest, msg = string.match(message, "^§§([^:]+):(.+)$")
if dest then
local dName, dServer = string.match(dest, "^(.*)-(.*)$")
local myName, myServer = UnitFullName("player")
if myName == dName and myServer == dServer then
message = msg
else
return
end
end
end

local linkValidityDuration = 60 * 5
local safeSender = safeSenders[sender]
local validLink = false
Expand Down

0 comments on commit 219e3ab

Please sign in to comment.