- Fixed an issue on dynamic overall data where it wasn't showing DPS.
- Fixed an issue with Apply, Save and Cancel buttons when editing a custom display. - Removed the Damage and Healing presets for custom displays, now is only possible create custom displays by scripting them.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
--> customized display script
|
||||
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local gump = _detalhes.gump
|
||||
local _
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
|
||||
|
||||
local _cstr = string.format --lua local
|
||||
local _math_floor = math.floor --lua local
|
||||
local _table_sort = table.sort --lua local
|
||||
@@ -2338,7 +2338,7 @@
|
||||
desc = "Show overall damage done on the fly.",
|
||||
source = false,
|
||||
target = false,
|
||||
script_version = 1,
|
||||
script_version = 2,
|
||||
script = [[
|
||||
--init:
|
||||
local combat, instance_container, instance = ...
|
||||
@@ -2349,10 +2349,14 @@
|
||||
--get the current combat
|
||||
local CurrentCombat = Details:GetCombat (0)
|
||||
|
||||
if (not OverallCombat.GetActorList or not CurrentCombat.GetActorList) then
|
||||
return 0, 0, 0
|
||||
end
|
||||
|
||||
--get the damage actor container for overall
|
||||
local damage_container_overall = combat:GetActorList ( DETAILS_ATTRIBUTE_DAMAGE )
|
||||
local damage_container_overall = OverallCombat:GetActorList ( DETAILS_ATTRIBUTE_DAMAGE )
|
||||
--get the damage actor container for current
|
||||
local damage_container_current = combat:GetActorList ( DETAILS_ATTRIBUTE_DAMAGE )
|
||||
local damage_container_current = CurrentCombat:GetActorList ( DETAILS_ATTRIBUTE_DAMAGE )
|
||||
|
||||
--do the loop:
|
||||
for _, player in ipairs ( damage_container_overall ) do
|
||||
@@ -2362,10 +2366,12 @@
|
||||
end
|
||||
end
|
||||
|
||||
for _, player in ipairs ( damage_container_current ) do
|
||||
--only player in group
|
||||
if (player:IsGroupPlayer()) then
|
||||
instance_container:AddValue (player, player.total)
|
||||
if (Details.in_combat) then
|
||||
for _, player in ipairs ( damage_container_current ) do
|
||||
--only player in group
|
||||
if (player:IsGroupPlayer()) then
|
||||
instance_container:AddValue (player, player.total)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2424,6 +2430,27 @@
|
||||
end
|
||||
end
|
||||
]],
|
||||
|
||||
total_script = [[
|
||||
local value, top, total, combat, instance = ...
|
||||
|
||||
--get the time of overall combat
|
||||
local OverallCombatTime = Details:GetCombat (-1):GetCombatTime()
|
||||
|
||||
--get the time of current combat if the player is in combat
|
||||
if (Details.in_combat) then
|
||||
local CurrentCombatTime = Details:GetCombat (0):GetCombatTime()
|
||||
OverallCombatTime = OverallCombatTime + CurrentCombatTime
|
||||
end
|
||||
|
||||
--build the string
|
||||
local ToK = Details:GetCurrentToKFunction()
|
||||
local s = ToK (_, total / OverallCombatTime)
|
||||
s = ToK (_, total) .. " (" .. s .. ", "
|
||||
|
||||
return s
|
||||
]],
|
||||
|
||||
}
|
||||
|
||||
local have = false
|
||||
|
||||
+32
-9
@@ -875,8 +875,8 @@
|
||||
}
|
||||
|
||||
local attributes = {
|
||||
{icon = [[Interface\ICONS\Spell_Fire_Fireball02]], label = Loc ["STRING_CUSTOM_ATTRIBUTE_DAMAGE"], box = 1, attribute = "damagedone", boxtype = 1},
|
||||
{icon = [[Interface\ICONS\SPELL_NATURE_HEALINGTOUCH]], label = Loc ["STRING_CUSTOM_ATTRIBUTE_HEAL"], box = 1, attribute = "healdone", boxtype = 1},
|
||||
--{icon = [[Interface\ICONS\Spell_Fire_Fireball02]], label = Loc ["STRING_CUSTOM_ATTRIBUTE_DAMAGE"], box = 1, attribute = "damagedone", boxtype = 1},
|
||||
--{icon = [[Interface\ICONS\SPELL_NATURE_HEALINGTOUCH]], label = Loc ["STRING_CUSTOM_ATTRIBUTE_HEAL"], box = 1, attribute = "healdone", boxtype = 1},
|
||||
{icon = [[Interface\ICONS\INV_Inscription_Scroll]], label = Loc ["STRING_CUSTOM_ATTRIBUTE_SCRIPT"], box = 2, attribute = false, boxtype = 2},
|
||||
|
||||
--{icon = [[Interface\ICONS\INV_Inscription_Scroll]], label = "Custom Script", box = 2, attribute = false, boxtype = 2},
|
||||
@@ -1042,7 +1042,8 @@
|
||||
accept_button:SetPoint ("left", cancel_button, "right", 2, 0)
|
||||
accept_button:InstallCustomTexture()
|
||||
|
||||
|
||||
cancel_button:SetFrameLevel (500)
|
||||
accept_button:SetFrameLevel (500)
|
||||
|
||||
--> create box type 1
|
||||
local box1 = _CreateFrame ("frame", "DetailsCustomPanelBox1", custom_window)
|
||||
@@ -1764,18 +1765,40 @@
|
||||
return true
|
||||
end
|
||||
|
||||
local expand = gump:NewButton (code_editor, nil, "$parentExpand", "expandbutton", 8, 10, expand_func, 4, nil, nil, "^")
|
||||
local supportFrame = CreateFrame ("frame", "$parentSupportFrame", custom_window)
|
||||
supportFrame:SetFrameLevel (500)
|
||||
|
||||
local expand = gump:NewButton (supportFrame, nil, "$parentExpand", "expandbutton", 8, 10, expand_func, 4, nil, nil, "^")
|
||||
expand:SetPoint ("bottomleft", code_editor, "topleft", 3, 0)
|
||||
local font_size1 = gump:NewButton (code_editor, nil, "$parentFont1", "font1button", 8, 10, font_change, true, nil, nil, "+")
|
||||
local font_size1 = gump:NewButton (supportFrame, nil, "$parentFont1", "font1button", 8, 10, font_change, true, nil, nil, "+")
|
||||
font_size1:SetPoint ("left", expand, "right", -4, 2)
|
||||
local font_size2 = gump:NewButton (code_editor, nil, "$parentFont2", "font2button", 8, 10, font_change, nil, nil, nil, "-")
|
||||
local font_size2 = gump:NewButton (supportFrame, nil, "$parentFont2", "font2button", 8, 10, font_change, nil, nil, nil, "-")
|
||||
font_size2:SetPoint ("left", font_size1, "right", -4, 2)
|
||||
local apply1 = gump:NewButton (code_editor, nil, "$parentApply", "applybutton", 8, 10, apply_code, nil, nil, nil, "apply")
|
||||
local apply1 = gump:NewButton (supportFrame, nil, "$parentApply", "applybutton", 8, 10, apply_code, nil, nil, nil, "apply")
|
||||
apply1:SetPoint ("left", font_size2, "right", -4, 1)
|
||||
|
||||
local open_API = gump:NewButton (code_editor, nil, "$parentOpenAPI", "openAPIbutton", 8, 10, _detalhes.OpenAPI, nil, nil, nil, "Open Details! API")
|
||||
local open_API = gump:NewButton (supportFrame, nil, "$parentOpenAPI", "openAPIbutton", 8, 10, _detalhes.OpenAPI, nil, nil, nil, "Open Details! API")
|
||||
open_API:SetPoint ("left", apply1, "right", -4, -1)
|
||||
|
||||
code_editor:SetScript ("OnShow", function()
|
||||
expand:Show()
|
||||
font_size1:Show()
|
||||
font_size2:Show()
|
||||
apply1:Show()
|
||||
open_API:Show()
|
||||
end)
|
||||
code_editor:SetScript ("OnHide", function()
|
||||
expand:Hide()
|
||||
font_size1:Hide()
|
||||
font_size2:Hide()
|
||||
apply1:Hide()
|
||||
open_API:Hide()
|
||||
end)
|
||||
|
||||
expand:Hide()
|
||||
font_size1:Hide()
|
||||
font_size2:Hide()
|
||||
apply1:Hide()
|
||||
open_API:Hide()
|
||||
|
||||
--> select damage
|
||||
DetailsCustomPanelAttributeMenu1:Click()
|
||||
|
||||
Reference in New Issue
Block a user