diff --git a/LootReserve.lua b/LootReserve.lua index 631cbcf..b1f3470 100644 --- a/LootReserve.lua +++ b/LootReserve.lua @@ -416,7 +416,7 @@ function LootReserve:FixText(text) return text:gsub("\1", " "); end -function LootReserve:SendChatMessage(text, channel, target) +function LootReserve:SendChatMessage(text, channel, target, skipOnlineCheck) if channel == "RAID_WARNING" and not (UnitIsGroupLeader("player") or UnitIsGroupAssistant("player")) then channel = "RAID"; end @@ -426,7 +426,7 @@ function LootReserve:SendChatMessage(text, channel, target) if channel == "PARTY" and not IsInGroup() then channel, target = "WHISPER", LootReserve:Me(); end - if target and not LootReserve:IsPlayerOnline(target) then return; end + if target and not LootReserve:IsPlayerOnline(target) and not skipOnlineCheck then return; end local function Send(text) if #text > 0 then text = self:FixText(text); diff --git a/Windows/ServerWindow.xml b/Windows/ServerWindow.xml index 7aeeec4..957ce56 100644 --- a/Windows/ServerWindow.xml +++ b/Windows/ServerWindow.xml @@ -981,10 +981,11 @@ disabled = not condition, func = function(info) local frame = self:GetParent():GetParent(); - if not frame.Roll then return; end + if not frame.Roll then LootReserve:debug("test") return; end local recipient = UnitIsPlayer("target") and UnitIsConnected("target") and UnitNameUnmodified("target"); if info.arg1 == "WHISPER" and not recipient then - LootReserve:PrintError("Target is not a valid player to whisper.") + LootReserve:PrintError("Target is not a valid player to whisper."); + LootReserve:debug("test2") return; end @@ -1006,22 +1007,22 @@ frame.Link, frame.Roll.Phases and format(" for %s", frame.Roll.Phases[1] or "") or "", frame.Historical and format(" on %s", (frame.ItemFrame.Misc:GetText() or ""):gsub("%s%s", " at ")) or "" - ), info.arg1, recipient); + ), info.arg1, recipient, true); local i = 1; for player, roll, rollNumber in LootReserve.Server:GetOrderedPlayerRolls(frame.Roll.Players) do if roll > LootReserve.Constants.RollType.NotRolled and (not self.Lines or self.Lines == 0 or self.Lines >= i) then if frame.Roll.Tiered then roll = LootReserve.Server:ConvertFromTieredRoll(roll) .. "/" .. math.floor(roll); end - LootReserve:SendChatMessage(format(" %s %s %s", roll, frame.Roll.RaidRoll and "=" or "by", player), info.arg1, recipient); + LootReserve:SendChatMessage(format(" %s %s %s", roll, frame.Roll.RaidRoll and "=" or "by", player), info.arg1, recipient, true); i = i + 1; end end if i == 1 then if frame.Roll.Winners then - LootReserve:SendChatMessage(format(" %s by %s", frame.Roll.Disenchant and "Disenchanted" or "Reserved", frame.Roll.Winners[1]), info.arg1, recipient); + LootReserve:SendChatMessage(format(" %s by %s", frame.Roll.Disenchant and "Disenchanted" or "Reserved", frame.Roll.Winners[1]), info.arg1, recipient, true); else - LootReserve:SendChatMessage(" No Rolls", info.arg1, recipient); + LootReserve:SendChatMessage(" No Rolls", info.arg1, recipient, true); end end end, @@ -1102,7 +1103,7 @@ end local reservesText = LootReserve:GetReservesData(LootReserve.Server.CurrentSession.ItemReserves[frame.Item:GetID()].Players); - LootReserve:SendChatMessage(format("Reserves for %s: %s", frame.Link, reservesText), info.arg1, recipient); + LootReserve:SendChatMessage(format("Reserves for %s: %s", frame.Link, reservesText), info.arg1, recipient, true); end, }; end