Skip to content

Commit

Permalink
Fixed lib Translit on healing done
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Aug 3, 2021
1 parent 4fe002c commit b4b6b64
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Libs/DF/fw.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


local dversion = 261
local dversion = 262
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary (major, minor)

Expand Down
18 changes: 16 additions & 2 deletions Libs/DF/panel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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


------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Expand Down
39 changes: 38 additions & 1 deletion Libs/LibRaidStatus/LibRaidStatus.lua
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 = {
Expand Down
5 changes: 5 additions & 0 deletions Libs/LibRaidStatus/docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions classes/class_heal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit b4b6b64

Please sign in to comment.