From b4b6b645049fda4aebe8ede76ced05995fb71b4d Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Tue, 3 Aug 2021 10:44:42 -0300 Subject: [PATCH] Fixed lib Translit on healing done --- Libs/DF/fw.lua | 2 +- Libs/DF/panel.lua | 18 +++++++++++-- Libs/LibRaidStatus/LibRaidStatus.lua | 39 +++++++++++++++++++++++++++- Libs/LibRaidStatus/docs.txt | 5 ++++ classes/class_heal.lua | 1 + 5 files changed, 61 insertions(+), 4 deletions(-) diff --git a/Libs/DF/fw.lua b/Libs/DF/fw.lua index 3b78eddd7..2095eaa39 100644 --- a/Libs/DF/fw.lua +++ b/Libs/DF/fw.lua @@ -1,6 +1,6 @@ -local dversion = 261 +local dversion = 262 local major, minor = "DetailsFramework-1.0", dversion local DF, oldminor = LibStub:NewLibrary (major, minor) diff --git a/Libs/DF/panel.lua b/Libs/DF/panel.lua index 61a12a49c..a99304505 100644 --- a/Libs/DF/panel.lua +++ b/Libs/DF/panel.lua @@ -1974,7 +1974,8 @@ local SimplePanel_frame_backdrop_border_color = {0, 0, 0, 1} --the slider was anchoring to with_label and here here were anchoring the slider again function DF:CreateScaleBar (frame, config) local scaleBar, text = DF:CreateSlider (frame, 120, 14, 0.6, 1.6, 0.1, config.scale, true, "ScaleBar", nil, "Scale:", DF:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE"), DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")) - --scaleBar:SetPoint ("right", frame.Close, "left", -26, 0) + scaleBar.thumb:SetWidth(24) + text:SetPoint ("topleft", frame, "topleft", 12, -7) scaleBar:SetFrameLevel (DF.FRAMELEVEL_OVERLAY) scaleBar.OnValueChanged = function (_, _, value) @@ -1987,7 +1988,7 @@ function DF:CreateScaleBar (frame, config) frame:SetScale (config.scale) end) - scaleBar:SetAlpha (0.5) + scaleBar:SetAlpha (0.70) return scaleBar end @@ -4020,8 +4021,21 @@ function DF:CreateTabContainer (parent, title, frame_name, frame_list, options_t return mainFrame end +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +-- ~right ~click to ~close + +function DF:CreateRightClickToClose(parent, xOffset, yOffset, color, fontSize) + --default values + xOffset = xOffset or 0 + yOffset = yOffset or 0 + color = color or "white" + fontSize = fontSize or 10 + local label = DF:CreateLabel(parent, "right click to close", fontSize, color) + label:SetPoint("bottomright", parent, "bottomright", -4 + xOffset, 5 + yOffset) + return label +end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ diff --git a/Libs/LibRaidStatus/LibRaidStatus.lua b/Libs/LibRaidStatus/LibRaidStatus.lua index 8f5259919..6c8fdc71a 100644 --- a/Libs/LibRaidStatus/LibRaidStatus.lua +++ b/Libs/LibRaidStatus/LibRaidStatus.lua @@ -1,6 +1,6 @@ local major = "LibRaidStatus-1.0" -local CONST_LIB_VERSION = 19 +local CONST_LIB_VERSION = 20 LIB_RAID_STATUS_CAN_LOAD = false --declae the library within the LibStub @@ -21,6 +21,7 @@ LIB_RAID_STATUS_CAN_LOAD = false local CONST_DIAGNOSTIC_COMM = false local CONST_COMM_PREFIX = "LRS" + local CONST_COMM_FULLINFO_PREFIX = "F" local CONST_COMM_COOLDOWNUPDATE_PREFIX = "U" local CONST_COMM_COOLDOWNFULLLIST_PREFIX = "C" local CONST_COMM_GEARINFO_FULL_PREFIX = "G" @@ -246,6 +247,7 @@ LIB_RAID_STATUS_CAN_LOAD = false raidStatusLib.commHandler.commCallback = { --when transmiting + [CONST_COMM_FULLINFO_PREFIX] = {}, --update all [CONST_COMM_COOLDOWNFULLLIST_PREFIX] = {}, --all cooldowns of a player [CONST_COMM_COOLDOWNUPDATE_PREFIX] = {}, --an update of a single cooldown [CONST_COMM_GEARINFO_FULL_PREFIX] = {}, --an update of gear information @@ -681,6 +683,41 @@ LIB_RAID_STATUS_CAN_LOAD = false raidStatusLib.publicCallback.TriggerCallback("OnPlayerRess", sourceName) end) + +-------------------------------------------------------------------------------------------------------------------------------- +--> ~all, request data from all players + + --send a request to all player to send their data + function raidStatusLib.RequestAllPlayersInfo() + if (not IsInGroup()) then + return + end + + raidStatusLib.requestAllInfoCooldown = raidStatusLib.requestAllInfoCooldown or 0 + + if (raidStatusLib.requestAllInfoCooldown > GetTime()) then + return + end + + raidStatusLib.commHandler.SendCommData(CONST_COMM_FULLINFO_PREFIX) + diagnosticComm("RequestAllInfo| " .. CONST_COMM_FULLINFO_PREFIX) --debug + + raidStatusLib.requestAllInfoCooldown = GetTime() + 5 + return true + end + + raidStatusLib.commHandler.RegisterComm(CONST_COMM_FULLINFO_PREFIX, function(data, sourceName) + raidStatusLib.sendRequestedAllInfoCooldown = raidStatusLib.sendRequestedAllInfoCooldown or 0 + + --some player in the group requested all information from all players + if (raidStatusLib.sendRequestedAllInfoCooldown > GetTime()) then + return + end + + raidStatusLib.Schedules.NewUniqueTimer(random() + math.random(0, 3), raidStatusLib.mainControl.SendFullData, "mainControl", "sendFullData_Schedule") + raidStatusLib.sendRequestedAllInfoCooldown = GetTime() + 5 + end) + -------------------------------------------------------------------------------------------------------------------------------- --> ~cooldowns raidStatusLib.cooldownManager = { diff --git a/Libs/LibRaidStatus/docs.txt b/Libs/LibRaidStatus/docs.txt index 5933b05c3..604fbac12 100644 --- a/Libs/LibRaidStatus/docs.txt +++ b/Libs/LibRaidStatus/docs.txt @@ -14,6 +14,11 @@ With this object, you can start querying the library for information. Functions: +local sentRequest = raidStatusLib.RequestAllPlayersInfo() +Request to all players to send all data infomation: cooldowns, gear and player data. +Instants after calling this, expect to receive several callbacks. + + local allPlayersGear = raidStatusLib.gearManager.GetAllPlayersGear() allPlayersGear = { ["playerName1"] = playerGear, diff --git a/classes/class_heal.lua b/classes/class_heal.lua index 29fc6d633..890b41e86 100644 --- a/classes/class_heal.lua +++ b/classes/class_heal.lua @@ -28,6 +28,7 @@ local _ local AceLocale = LibStub ("AceLocale-3.0") local Loc = AceLocale:GetLocale ( "Details" ) +local Translit = LibStub ("LibTranslit-1.0") local gump = _detalhes.gump