Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix transmission of auras #5266

Merged
merged 1 commit into from
Jul 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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