diff --git a/Libs/DF/panel.lua b/Libs/DF/panel.lua index 6a23be18..45b7ba1b 100644 --- a/Libs/DF/panel.lua +++ b/Libs/DF/panel.lua @@ -10114,8 +10114,17 @@ DF.ListboxFunctions = { line:AlignWithHeader(listBox.header, "left") return line end, -} + SetData = function(frameCanvas, newData) + if (type(newData) ~= "table") then + error("ListBox:SetData received an invalid newData on parameter 2.") + return + end + + frameCanvas.data = newData + frameCanvas.scrollBox:Refresh() + end, +} local listbox_options = { width = 800, diff --git a/Libs/LibRaidStatus/LibRaidStatus.lua b/Libs/LibRaidStatus/LibRaidStatus.lua index 9cd80fa0..7d855291 100644 --- a/Libs/LibRaidStatus/LibRaidStatus.lua +++ b/Libs/LibRaidStatus/LibRaidStatus.lua @@ -1354,6 +1354,9 @@ function raidStatusLib.playerInfoManager.GetPlayerFullInfo() playerInfo[1] = specId + --covenant + + --renown local renown = C_CovenantSanctumUI.GetRenownLevel() or 1 playerInfo[2] = renown diff --git a/core/network.lua b/core/network.lua index c43c042f..0511b22c 100644 --- a/core/network.lua +++ b/core/network.lua @@ -717,9 +717,7 @@ end function _detalhes:SendRaidData (type, ...) - local isInInstanceGroup = IsInRaid (LE_PARTY_CATEGORY_INSTANCE) - if (isInInstanceGroup) then _detalhes:SendCommMessage (DETAILS_PREFIX_NETWORK, _detalhes:Serialize (type, _UnitName("player"), _GetRealmName(), _detalhes.realversion, ...), "INSTANCE_CHAT") if (_detalhes.debug) then @@ -734,9 +732,7 @@ end function _detalhes:SendPartyData (type, ...) - local isInInstanceGroup = IsInGroup (LE_PARTY_CATEGORY_INSTANCE) - if (isInInstanceGroup) then _detalhes:SendCommMessage (DETAILS_PREFIX_NETWORK, _detalhes:Serialize (type, _UnitName ("player"), _GetRealmName(), _detalhes.realversion, ...), "INSTANCE_CHAT") if (_detalhes.debug) then @@ -748,7 +744,6 @@ _detalhes:Msg ("(debug) sent comm to LOCAL party group") end end - end function _detalhes:SendRaidOrPartyData (type, ...) diff --git a/functions/coach.lua b/functions/coach.lua index e18b76ff..8a1eb7ae 100644 --- a/functions/coach.lua +++ b/functions/coach.lua @@ -32,7 +32,7 @@ Details.Coach = { } function Details.Coach.AskRLForCoachStatus() - Details:SendCommMessage(_G.DETAILS_PREFIX_NETWORK, Details:Serialize(_G.DETAILS_PREFIX_COACH, UnitName("player"), GetRealmName(), Details.realversion, "CIEA"), "RAID") + Details:SendRaidData(DETAILS_PREFIX_COACH, "CIEA") if (_detalhes.debug) then Details:Msg("[|cFFAAFFAADetails! Coach|r] asked the coach the coach status.") end @@ -54,7 +54,7 @@ end --the coach is no more a coach function Details.Coach.SendRaidCoachEndNotify() - Details:SendCommMessage(_G.DETAILS_PREFIX_NETWORK, Details:Serialize(_G.DETAILS_PREFIX_COACH, UnitName("player"), GetRealmName(), Details.realversion, "CE"), "RAID") + Details:SendRaidData(DETAILS_PREFIX_COACH, "CE") if (_detalhes.debug) then Details:Msg("[|cFFAAFFAADetails! Coach|r] sent to raid a coach end notification.") end @@ -62,7 +62,7 @@ end --there's a new coach, notify players function Details.Coach.SendRaidCoachStartNotify() - Details:SendCommMessage(_G.DETAILS_PREFIX_NETWORK, Details:Serialize(_G.DETAILS_PREFIX_COACH, UnitName("player"), GetRealmName(), Details.realversion, "CS"), "RAID") + Details:SendRaidData(DETAILS_PREFIX_COACH, "CS") if (_detalhes.debug) then Details:Msg("[|cFFAAFFAADetails! Coach|r] sent to raid a coach start notification.") end @@ -70,7 +70,7 @@ end --player send his death to the coach function Details.Coach.SendDeathToRL(deathTable) - Details:SendCommMessage(_G.DETAILS_PREFIX_NETWORK, Details:Serialize(_G.DETAILS_PREFIX_COACH, UnitName("player"), GetRealmName(), Details.realversion, "CDD", deathTable), "RAID") + Details:SendRaidData(DETAILS_PREFIX_COACH, "CDD", deathTable) if (_detalhes.debug) then Details:Msg("[|cFFAAFFAADetails! Coach|r] your death has been sent to coach.") end @@ -81,7 +81,7 @@ function Details.Coach.Client.SendDataToRL() if (_detalhes.debug) then print("Details Coach sending data to RL.") end - + local data = Details.packFunctions.GetAllData() if (data and Details.Coach.Client.coachName) then Details:SendCommMessage(_G.DETAILS_PREFIX_NETWORK, Details:Serialize(_G.DETAILS_PREFIX_COACH, UnitName("player"), GetRealmName(), Details.realversion, "CDT", data), "WHISPER", Details.Coach.Client.coachName) diff --git a/functions/schedules.lua b/functions/schedules.lua index 93eeb00d..1af7fe8c 100644 --- a/functions/schedules.lua +++ b/functions/schedules.lua @@ -36,7 +36,10 @@ end --cancel an ongoing ticker function Details.Schedules.Cancel(tickerObject) - return tickerObject:Cancel() + --ignore if there's no ticker object + if (tickerObject) then + return tickerObject:Cancel() + end end --schedule a task with an interval of @time