bug fixes
This commit is contained in:
+92
-91
@@ -123,169 +123,170 @@ DF:Mixin(ButtonMetaFunctions, DF.ScriptHookMixin)
|
|||||||
ButtonMetaFunctions.GetMembers["textfont"] = gmember_textfont --alias
|
ButtonMetaFunctions.GetMembers["textfont"] = gmember_textfont --alias
|
||||||
ButtonMetaFunctions.GetMembers["textsize"] = gmember_textsize --alias
|
ButtonMetaFunctions.GetMembers["textsize"] = gmember_textsize --alias
|
||||||
|
|
||||||
ButtonMetaFunctions.__index = function(_table, _member_requested)
|
ButtonMetaFunctions.__index = function(object, key)
|
||||||
|
local func = ButtonMetaFunctions.GetMembers[key]
|
||||||
local func = ButtonMetaFunctions.GetMembers [_member_requested]
|
|
||||||
if (func) then
|
if (func) then
|
||||||
return func (_table, _member_requested)
|
return func(object, key)
|
||||||
end
|
end
|
||||||
|
|
||||||
local fromMe = rawget(_table, _member_requested)
|
local alreadyHaveKey = rawget(object, key)
|
||||||
if (fromMe) then
|
if (alreadyHaveKey) then
|
||||||
return fromMe
|
return alreadyHaveKey
|
||||||
end
|
end
|
||||||
|
|
||||||
return ButtonMetaFunctions [_member_requested]
|
return ButtonMetaFunctions[key]
|
||||||
end
|
end
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
--tooltip
|
--tooltip
|
||||||
local smember_tooltip = function(_object, _value)
|
local smember_tooltip = function(object, value)
|
||||||
return _object:SetTooltip (_value)
|
return object:SetTooltip (value)
|
||||||
end
|
end
|
||||||
|
|
||||||
--show
|
--show
|
||||||
local smember_show = function(_object, _value)
|
local smember_show = function(object, value)
|
||||||
if (_value) then
|
if (value) then
|
||||||
return _object:Show()
|
return object:Show()
|
||||||
else
|
else
|
||||||
return _object:Hide()
|
return object:Hide()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--hide
|
--hide
|
||||||
local smember_hide = function(_object, _value)
|
local smember_hide = function(object, value)
|
||||||
if (not _value) then
|
if (not value) then
|
||||||
return _object:Show()
|
return object:Show()
|
||||||
else
|
else
|
||||||
return _object:Hide()
|
return object:Hide()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--frame width
|
--frame width
|
||||||
local smember_width = function(_object, _value)
|
local smember_width = function(object, value)
|
||||||
return _object.button:SetWidth(_value)
|
return object.button:SetWidth(value)
|
||||||
end
|
end
|
||||||
|
|
||||||
--frame height
|
--frame height
|
||||||
local smember_height = function(_object, _value)
|
local smember_height = function(object, value)
|
||||||
return _object.button:SetHeight(_value)
|
return object.button:SetHeight(value)
|
||||||
end
|
end
|
||||||
|
|
||||||
--text
|
--text
|
||||||
local smember_text = function(_object, _value)
|
local smember_text = function(object, value)
|
||||||
return _object.button.text:SetText(_value)
|
return object.button.text:SetText(value)
|
||||||
end
|
end
|
||||||
|
|
||||||
--function
|
--function
|
||||||
local smember_function = function(_object, _value)
|
local smember_function = function(object, value)
|
||||||
return rawset(_object, "func", _value)
|
return rawset(object, "func", value)
|
||||||
end
|
end
|
||||||
|
|
||||||
--param1
|
--param1
|
||||||
local smember_param1 = function(_object, _value)
|
local smember_param1 = function(object, value)
|
||||||
return rawset(_object, "param1", _value)
|
return rawset(object, "param1", value)
|
||||||
end
|
end
|
||||||
|
|
||||||
--param2
|
--param2
|
||||||
local smember_param2 = function(_object, _value)
|
local smember_param2 = function(object, value)
|
||||||
return rawset(_object, "param2", _value)
|
return rawset(object, "param2", value)
|
||||||
end
|
end
|
||||||
|
|
||||||
--text color
|
--text color
|
||||||
local smember_textcolor = function(_object, _value)
|
local smember_textcolor = function(object, value)
|
||||||
local _value1, _value2, _value3, _value4 = DF:ParseColors(_value)
|
local value1, value2, value3, value4 = DF:ParseColors(value)
|
||||||
return _object.button.text:SetTextColor(_value1, _value2, _value3, _value4)
|
return object.button.text:SetTextColor(value1, value2, value3, value4)
|
||||||
end
|
end
|
||||||
|
|
||||||
--text font
|
--text font
|
||||||
local smember_textfont = function(_object, _value)
|
local smember_textfont = function(object, value)
|
||||||
return DF:SetFontFace (_object.button.text, _value)
|
return DF:SetFontFace (object.button.text, value)
|
||||||
end
|
end
|
||||||
|
|
||||||
--text size
|
--text size
|
||||||
local smember_textsize = function(_object, _value)
|
local smember_textsize = function(object, value)
|
||||||
return DF:SetFontSize (_object.button.text, _value)
|
return DF:SetFontSize (object.button.text, value)
|
||||||
end
|
end
|
||||||
|
|
||||||
--texture
|
--texture
|
||||||
local smember_texture = function(_object, _value)
|
local smember_texture = function(object, value)
|
||||||
if (type(_value) == "table") then
|
if (type(value) == "table") then
|
||||||
local _value1, _value2, _value3, _value4 = unpack(_value)
|
local value1, value2, value3, value4 = unpack(value)
|
||||||
if (_value1) then
|
if (value1) then
|
||||||
_object.button:SetNormalTexture(_value1)
|
object.button:SetNormalTexture(value1)
|
||||||
end
|
end
|
||||||
if (_value2) then
|
if (value2) then
|
||||||
_object.button:SetHighlightTexture(_value2, "ADD")
|
object.button:SetHighlightTexture(value2, "ADD")
|
||||||
end
|
end
|
||||||
if (_value3) then
|
if (value3) then
|
||||||
_object.button:SetPushedTexture(_value3)
|
object.button:SetPushedTexture(value3)
|
||||||
end
|
end
|
||||||
if (_value4) then
|
if (value4) then
|
||||||
_object.button:SetDisabledTexture (_value4)
|
object.button:SetDisabledTexture(value4)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
_object.button:SetNormalTexture(_value)
|
object.button:SetNormalTexture(value)
|
||||||
_object.button:SetHighlightTexture(_value, "ADD")
|
object.button:SetHighlightTexture(value, "ADD")
|
||||||
_object.button:SetPushedTexture(_value)
|
object.button:SetPushedTexture(value)
|
||||||
_object.button:SetDisabledTexture (_value)
|
object.button:SetDisabledTexture(value)
|
||||||
end
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
--locked
|
--locked
|
||||||
local smember_locked = function(_object, _value)
|
local smember_locked = function(object, value)
|
||||||
if (_value) then
|
if (value) then
|
||||||
_object.button:SetMovable(false)
|
object.button:SetMovable(false)
|
||||||
return rawset(_object, "is_locked", true)
|
return rawset(object, "is_locked", true)
|
||||||
else
|
else
|
||||||
_object.button:SetMovable(true)
|
object.button:SetMovable(true)
|
||||||
rawset(_object, "is_locked", false)
|
rawset(object, "is_locked", false)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--text align
|
--text align
|
||||||
local smember_textalign = function(_object, _value)
|
local smember_textalign = function(object, value)
|
||||||
if (_value == "left" or _value == "<") then
|
if (value == "left" or value == "<") then
|
||||||
_object.button.text:SetPoint("left", _object.button, "left", 2, 0)
|
object.button.text:SetPoint("left", object.button, "left", 2, 0)
|
||||||
_object.capsule_textalign = "left"
|
object.capsule_textalign = "left"
|
||||||
elseif (_value == "center" or _value == "|") then
|
|
||||||
_object.button.text:SetPoint("center", _object.button, "center", 0, 0)
|
elseif (value == "center" or value == "|") then
|
||||||
_object.capsule_textalign = "center"
|
object.button.text:SetPoint("center", object.button, "center", 0, 0)
|
||||||
elseif (_value == "right" or _value == ">") then
|
object.capsule_textalign = "center"
|
||||||
_object.button.text:SetPoint("right", _object.button, "right", -2, 0)
|
|
||||||
_object.capsule_textalign = "right"
|
elseif (value == "right" or value == ">") then
|
||||||
|
object.button.text:SetPoint("right", object.button, "right", -2, 0)
|
||||||
|
object.capsule_textalign = "right"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
ButtonMetaFunctions.SetMembers = ButtonMetaFunctions.SetMembers or {}
|
ButtonMetaFunctions.SetMembers= ButtonMetaFunctions.SetMembers or {}
|
||||||
ButtonMetaFunctions.SetMembers ["tooltip"] = smember_tooltip
|
ButtonMetaFunctions.SetMembers["tooltip"] = smember_tooltip
|
||||||
ButtonMetaFunctions.SetMembers ["show"] = smember_show
|
ButtonMetaFunctions.SetMembers["show"] = smember_show
|
||||||
ButtonMetaFunctions.SetMembers ["hide"] = smember_hide
|
ButtonMetaFunctions.SetMembers["hide"] = smember_hide
|
||||||
ButtonMetaFunctions.SetMembers ["width"] = smember_width
|
ButtonMetaFunctions.SetMembers["width"] = smember_width
|
||||||
ButtonMetaFunctions.SetMembers ["height"] = smember_height
|
ButtonMetaFunctions.SetMembers["height"] = smember_height
|
||||||
ButtonMetaFunctions.SetMembers ["text"] = smember_text
|
ButtonMetaFunctions.SetMembers["text"] = smember_text
|
||||||
ButtonMetaFunctions.SetMembers ["clickfunction"] = smember_function
|
ButtonMetaFunctions.SetMembers["clickfunction"] = smember_function
|
||||||
ButtonMetaFunctions.SetMembers ["param1"] = smember_param1
|
ButtonMetaFunctions.SetMembers["param1"] = smember_param1
|
||||||
ButtonMetaFunctions.SetMembers ["param2"] = smember_param2
|
ButtonMetaFunctions.SetMembers["param2"] = smember_param2
|
||||||
ButtonMetaFunctions.SetMembers ["textcolor"] = smember_textcolor
|
ButtonMetaFunctions.SetMembers["textcolor"] = smember_textcolor
|
||||||
ButtonMetaFunctions.SetMembers ["textfont"] = smember_textfont
|
ButtonMetaFunctions.SetMembers["textfont"] = smember_textfont
|
||||||
ButtonMetaFunctions.SetMembers ["textsize"] = smember_textsize
|
ButtonMetaFunctions.SetMembers["textsize"] = smember_textsize
|
||||||
ButtonMetaFunctions.SetMembers ["fontcolor"] = smember_textcolor--alias
|
ButtonMetaFunctions.SetMembers["fontcolor"] = smember_textcolor--alias
|
||||||
ButtonMetaFunctions.SetMembers ["fontface"] = smember_textfont--alias
|
ButtonMetaFunctions.SetMembers["fontface"] = smember_textfont--alias
|
||||||
ButtonMetaFunctions.SetMembers ["fontsize"] = smember_textsize--alias
|
ButtonMetaFunctions.SetMembers["fontsize"] = smember_textsize--alias
|
||||||
ButtonMetaFunctions.SetMembers ["texture"] = smember_texture
|
ButtonMetaFunctions.SetMembers["texture"] = smember_texture
|
||||||
ButtonMetaFunctions.SetMembers ["locked"] = smember_locked
|
ButtonMetaFunctions.SetMembers["locked"] = smember_locked
|
||||||
ButtonMetaFunctions.SetMembers ["textalign"] = smember_textalign
|
ButtonMetaFunctions.SetMembers["textalign"] = smember_textalign
|
||||||
|
|
||||||
ButtonMetaFunctions.__newindex = function(_table, _key, _value)
|
ButtonMetaFunctions.__newindex = function(object, key, value)
|
||||||
local func = ButtonMetaFunctions.SetMembers [_key]
|
local func = ButtonMetaFunctions.SetMembers[key]
|
||||||
if (func) then
|
if (func) then
|
||||||
return func (_table, _value)
|
return func(object, value)
|
||||||
else
|
else
|
||||||
return rawset(_table, _key, _value)
|
return rawset(object, key, value)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1134,7 +1134,7 @@ function DF:CreateCoolTip()
|
|||||||
|
|
||||||
function gameCooltip:RefreshSpark(menuButton)
|
function gameCooltip:RefreshSpark(menuButton)
|
||||||
menuButton.spark:ClearAllPoints()
|
menuButton.spark:ClearAllPoints()
|
||||||
menuButton.spark:SetPoint("LEFT", menuButton.statusbar, "LEFT", (menuButton.statusbar:GetValue() * (menuButton.statusbar:GetWidth() / 100)) - 5, 0)
|
menuButton.spark:SetPoint("left", menuButton.statusbar, "left", (menuButton.statusbar:GetValue() * (menuButton.statusbar:GetWidth() / 100)) - 5, 0)
|
||||||
menuButton.spark2:ClearAllPoints()
|
menuButton.spark2:ClearAllPoints()
|
||||||
menuButton.spark2:SetPoint("left", menuButton.statusbar, "left", menuButton.statusbar:GetValue() * (menuButton.statusbar:GetWidth()/100) - 16, 0)
|
menuButton.spark2:SetPoint("left", menuButton.statusbar, "left", menuButton.statusbar:GetValue() * (menuButton.statusbar:GetWidth()/100) - 16, 0)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -2630,6 +2630,12 @@ end
|
|||||||
|
|
||||||
DF.ClientLanguage = clientLanguage
|
DF.ClientLanguage = clientLanguage
|
||||||
|
|
||||||
|
function DF:DetectTextLanguage(text)
|
||||||
|
for i = 1, #text do
|
||||||
|
--or not
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--returns which region the language the client is running, return "western", "russia" or "asia"
|
--returns which region the language the client is running, return "western", "russia" or "asia"
|
||||||
function DF:GetClientRegion()
|
function DF:GetClientRegion()
|
||||||
if (clientLanguage == "zhCN" or clientLanguage == "koKR" or clientLanguage == "zhTW") then
|
if (clientLanguage == "zhCN" or clientLanguage == "koKR" or clientLanguage == "zhTW") then
|
||||||
|
|||||||
+23
-26
@@ -421,8 +421,8 @@ DF:Mixin(DFSliderMetaFunctions, DF.ScriptHookMixin)
|
|||||||
buttonPlus:SetPushedTexture([[Interface\Buttons\UI-PlusButton-Down]])
|
buttonPlus:SetPushedTexture([[Interface\Buttons\UI-PlusButton-Down]])
|
||||||
buttonMinor:SetPushedTexture([[Interface\Buttons\UI-MinusButton-Down]])
|
buttonMinor:SetPushedTexture([[Interface\Buttons\UI-MinusButton-Down]])
|
||||||
|
|
||||||
buttonPlus:SetDisabledTexture ([[Interface\Buttons\UI-PlusButton-Disabled]])
|
buttonPlus:SetDisabledTexture([[Interface\Buttons\UI-PlusButton-Disabled]])
|
||||||
buttonMinor:SetDisabledTexture ([[Interface\Buttons\UI-MinusButton-Disabled]])
|
buttonMinor:SetDisabledTexture([[Interface\Buttons\UI-MinusButton-Disabled]])
|
||||||
|
|
||||||
buttonPlus:SetHighlightTexture([[Interface\Buttons\UI-PlusButton-Hilight]])
|
buttonPlus:SetHighlightTexture([[Interface\Buttons\UI-PlusButton-Hilight]])
|
||||||
buttonMinor:SetHighlightTexture([[Interface\Buttons\UI-PlusButton-Hilight]])
|
buttonMinor:SetHighlightTexture([[Interface\Buttons\UI-PlusButton-Hilight]])
|
||||||
@@ -1047,9 +1047,7 @@ function DF:CreateSlider (parent, w, h, min, max, step, defaultv, isDecemal, mem
|
|||||||
return slider, label
|
return slider, label
|
||||||
end
|
end
|
||||||
|
|
||||||
function DF:NewSlider (parent, container, name, member, w, h, min, max, step, defaultv, isDecemal, isSwitch, with_label, slider_template, label_template)
|
function DF:NewSlider (parent, container, name, member, width, height, minValue, maxValue, step, defaultValue, isDecemal, isSwitch, with_label, slider_template, label_template)
|
||||||
|
|
||||||
--early checks
|
|
||||||
if (not name) then
|
if (not name) then
|
||||||
name = "DetailsFrameworkSlider" .. DF.SliderCounter
|
name = "DetailsFrameworkSlider" .. DF.SliderCounter
|
||||||
DF.SliderCounter = DF.SliderCounter + 1
|
DF.SliderCounter = DF.SliderCounter + 1
|
||||||
@@ -1080,13 +1078,13 @@ function DF:NewSlider (parent, container, name, member, w, h, min, max, step, de
|
|||||||
end
|
end
|
||||||
|
|
||||||
--defaults
|
--defaults
|
||||||
min = min or 1
|
minValue = minValue or 1
|
||||||
max = max or 2
|
maxValue = maxValue or 2
|
||||||
step = step or 1
|
step = step or 1
|
||||||
defaultv = defaultv or min
|
defaultValue = defaultValue or minValue
|
||||||
|
|
||||||
w = w or 130
|
width = width or 130
|
||||||
h = h or 19
|
height = height or 19
|
||||||
|
|
||||||
--default members:
|
--default members:
|
||||||
SliderObject.lockdown = false
|
SliderObject.lockdown = false
|
||||||
@@ -1098,40 +1096,40 @@ function DF:NewSlider (parent, container, name, member, w, h, min, max, step, de
|
|||||||
SliderObject.useDecimals = isDecemal or false
|
SliderObject.useDecimals = isDecemal or false
|
||||||
|
|
||||||
if (SliderObject.useDecimals) then
|
if (SliderObject.useDecimals) then
|
||||||
SliderObject.slider:SetValueStep (0.01)
|
SliderObject.slider:SetValueStep(0.01)
|
||||||
else
|
else
|
||||||
SliderObject.slider:SetValueStep (step)
|
SliderObject.slider:SetValueStep(step)
|
||||||
end
|
end
|
||||||
|
|
||||||
if (not APISliderFunctions) then
|
if (not APISliderFunctions) then
|
||||||
APISliderFunctions = true
|
APISliderFunctions = true
|
||||||
local idx = getmetatable(SliderObject.slider).__index
|
local idx = getmetatable(SliderObject.slider).__index
|
||||||
for funcName, funcAddress in pairs(idx) do
|
for funcName, funcAddress in pairs(idx) do
|
||||||
if (not DFSliderMetaFunctions [funcName]) then
|
if (not DFSliderMetaFunctions[funcName]) then
|
||||||
DFSliderMetaFunctions [funcName] = function(object, ...)
|
DFSliderMetaFunctions[funcName] = function(object, ...)
|
||||||
local x = loadstring ( "return _G['"..object.slider:GetName().."']:"..funcName.."(...)")
|
local x = loadstring ( "return _G['"..object.slider:GetName().."']:"..funcName.."(...)")
|
||||||
return x (...)
|
return x(...)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
SliderObject.slider.MyObject = SliderObject
|
SliderObject.slider.MyObject = SliderObject
|
||||||
SliderObject.slider:SetWidth(w)
|
SliderObject.slider:SetWidth(width)
|
||||||
SliderObject.slider:SetHeight(h)
|
SliderObject.slider:SetHeight(height)
|
||||||
SliderObject.slider:SetOrientation ("horizontal")
|
SliderObject.slider:SetOrientation ("horizontal")
|
||||||
SliderObject.slider:SetMinMaxValues(min, max)
|
SliderObject.slider:SetMinMaxValues(minValue, maxValue)
|
||||||
SliderObject.slider:SetValue(defaultv)
|
SliderObject.slider:SetValue(defaultValue)
|
||||||
SliderObject.ivalue = defaultv
|
SliderObject.ivalue = defaultValue
|
||||||
|
|
||||||
SliderObject.slider:SetBackdrop({edgeFile = "Interface\\Buttons\\UI-SliderBar-Border", edgeSize = 8})
|
SliderObject.slider:SetBackdrop({edgeFile = "Interface\\Buttons\\UI-SliderBar-Border", edgeSize = 8})
|
||||||
SliderObject.slider:SetBackdropColor(0.9, 0.7, 0.7, 1.0)
|
SliderObject.slider:SetBackdropColor(0.9, 0.7, 0.7, 1.0)
|
||||||
|
|
||||||
SliderObject.thumb = SliderObject.slider:CreateTexture(nil, "artwork")
|
SliderObject.thumb = SliderObject.slider:CreateTexture(nil, "artwork")
|
||||||
SliderObject.thumb:SetTexture("Interface\\Buttons\\UI-ScrollBar-Knob")
|
SliderObject.thumb:SetTexture("Interface\\Buttons\\UI-ScrollBar-Knob")
|
||||||
SliderObject.thumb:SetSize(30+(h*0.2), h*1.2)
|
SliderObject.thumb:SetSize(30 + (height * 0.2), height * 1.2)
|
||||||
SliderObject.thumb.originalWidth = SliderObject.thumb:GetWidth()
|
SliderObject.thumb.originalWidth = SliderObject.thumb:GetWidth()
|
||||||
SliderObject.thumb.originalHeight =SliderObject.thumb:GetHeight()
|
SliderObject.thumb.originalHeight = SliderObject.thumb:GetHeight()
|
||||||
SliderObject.thumb:SetAlpha(0.7)
|
SliderObject.thumb:SetAlpha(0.7)
|
||||||
SliderObject.slider:SetThumbTexture (SliderObject.thumb)
|
SliderObject.slider:SetThumbTexture (SliderObject.thumb)
|
||||||
SliderObject.slider.thumb = SliderObject.thumb
|
SliderObject.slider.thumb = SliderObject.thumb
|
||||||
@@ -1142,9 +1140,9 @@ function DF:NewSlider (parent, container, name, member, w, h, min, max, step, de
|
|||||||
|
|
||||||
SliderObject.amt = SliderObject.slider:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
|
SliderObject.amt = SliderObject.slider:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
|
||||||
|
|
||||||
local amt = defaultv
|
local amt = defaultValue
|
||||||
if (amt < 10 and amt >= 1) then
|
if (amt < 10 and amt >= 1) then
|
||||||
amt = "0"..amt
|
amt = "0" .. amt
|
||||||
end
|
end
|
||||||
|
|
||||||
if (SliderObject.useDecimals) then
|
if (SliderObject.useDecimals) then
|
||||||
@@ -1157,7 +1155,7 @@ function DF:NewSlider (parent, container, name, member, w, h, min, max, step, de
|
|||||||
SliderObject.amt:SetPoint("center", SliderObject.thumb, "center")
|
SliderObject.amt:SetPoint("center", SliderObject.thumb, "center")
|
||||||
SliderObject.slider.amt = SliderObject.amt
|
SliderObject.slider.amt = SliderObject.amt
|
||||||
|
|
||||||
SliderObject.previous_value = {defaultv or 0, 0, 0}
|
SliderObject.previous_value = {defaultValue or 0, 0, 0}
|
||||||
|
|
||||||
--hooks
|
--hooks
|
||||||
SliderObject.HookList = {
|
SliderObject.HookList = {
|
||||||
@@ -1200,7 +1198,6 @@ function DF:NewSlider (parent, container, name, member, w, h, min, max, step, de
|
|||||||
end
|
end
|
||||||
|
|
||||||
return SliderObject, with_label
|
return SliderObject, with_label
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
DF.AdjustmentSliderOptions = {
|
DF.AdjustmentSliderOptions = {
|
||||||
|
|||||||
@@ -43,10 +43,10 @@ TODO:
|
|||||||
- add into gear info how many tier set parts the player has
|
- add into gear info how many tier set parts the player has
|
||||||
- raid lockouts normal-heroic-mythic
|
- raid lockouts normal-heroic-mythic
|
||||||
- soulbind character (covenant choise) - probably not used in 10.0
|
- soulbind character (covenant choise) - probably not used in 10.0
|
||||||
|
|
||||||
BUGS:
|
BUGS:
|
||||||
- after a /reload, it is not starting new tickers for spells under cooldown
|
- after a /reload, it is not starting new tickers for spells under cooldown
|
||||||
|
|
||||||
--]=]
|
--]=]
|
||||||
|
|
||||||
local versionString, revision, launchDate, gameVersion = GetBuildInfo()
|
local versionString, revision, launchDate, gameVersion = GetBuildInfo()
|
||||||
@@ -63,9 +63,11 @@ if (WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE and not isExpansion_Dragonflight()) t
|
|||||||
end
|
end
|
||||||
|
|
||||||
local major = "LibOpenRaid-1.0"
|
local major = "LibOpenRaid-1.0"
|
||||||
local CONST_LIB_VERSION = 59
|
local CONST_LIB_VERSION = 60
|
||||||
LIB_OPEN_RAID_CAN_LOAD = false
|
LIB_OPEN_RAID_CAN_LOAD = false
|
||||||
|
|
||||||
|
local unpack = table.unpack or _G.unpack
|
||||||
|
|
||||||
--declae the library within the LibStub
|
--declae the library within the LibStub
|
||||||
local libStub = _G.LibStub
|
local libStub = _G.LibStub
|
||||||
local openRaidLib = libStub:NewLibrary(major, CONST_LIB_VERSION)
|
local openRaidLib = libStub:NewLibrary(major, CONST_LIB_VERSION)
|
||||||
@@ -322,15 +324,15 @@ LIB_OPEN_RAID_CAN_LOAD = false
|
|||||||
openRaidLib.Schedules = {
|
openRaidLib.Schedules = {
|
||||||
registeredUniqueTimers = {}
|
registeredUniqueTimers = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
--run a scheduled function with its payload
|
--run a scheduled function with its payload
|
||||||
local triggerScheduledTick = function(tickerObject)
|
local triggerScheduledTick = function(tickerObject)
|
||||||
local payload = tickerObject.payload
|
local payload = tickerObject.payload
|
||||||
local callback = tickerObject.callback
|
local callback = tickerObject.callback
|
||||||
|
|
||||||
local result, errortext = pcall(callback, _G.unpack(payload))
|
local result, errortext = xpcall(callback, geterrorhandler(), unpack(payload))
|
||||||
if (not result) then
|
if (not result) then
|
||||||
sendChatMessage("openRaidLib: error on scheduler:", tickerObject.scheduleName, tickerObject.stack, errortext)
|
sendChatMessage("openRaidLib: error on scheduler:", tickerObject.scheduleName, tickerObject.stack)
|
||||||
end
|
end
|
||||||
|
|
||||||
if (tickerObject.isUnique) then
|
if (tickerObject.isUnique) then
|
||||||
@@ -455,15 +457,14 @@ LIB_OPEN_RAID_CAN_LOAD = false
|
|||||||
local func = addonObject[functionName]
|
local func = addonObject[functionName]
|
||||||
|
|
||||||
if (func) then
|
if (func) then
|
||||||
--using pcall at the moment, should get a better caller in the future
|
local okay, errorMessage = xpcall(func, geterrorhandler(), ...)
|
||||||
local okay, errorMessage = pcall(func, ...)
|
|
||||||
if (not okay) then
|
if (not okay) then
|
||||||
sendChatMessage("error:", errorMessage)
|
sendChatMessage("error on callback for event:", event)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function openRaidLib.RegisterCallback(addonObject, event, callbackMemberName)
|
function openRaidLib.RegisterCallback(addonObject, event, callbackMemberName)
|
||||||
--check of integrity
|
--check of integrity
|
||||||
local integrity = checkRegisterDataIntegrity(addonObject, event, callbackMemberName)
|
local integrity = checkRegisterDataIntegrity(addonObject, event, callbackMemberName)
|
||||||
@@ -1211,7 +1212,7 @@ openRaidLib.internalCallback.RegisterCallback("onLeaveCombat", openRaidLib.UnitI
|
|||||||
weaponEnchant = 0,
|
weaponEnchant = 0,
|
||||||
noGems = {},
|
noGems = {},
|
||||||
noEnchants = {},
|
noEnchants = {},
|
||||||
}
|
}
|
||||||
|
|
||||||
function openRaidLib.GetAllUnitsGear()
|
function openRaidLib.GetAllUnitsGear()
|
||||||
return openRaidLib.GearManager.GetAllUnitsGear()
|
return openRaidLib.GearManager.GetAllUnitsGear()
|
||||||
@@ -1376,7 +1377,7 @@ openRaidLib.internalCallback.RegisterCallback("onLeaveCombat", openRaidLib.UnitI
|
|||||||
--[2] int durability
|
--[2] int durability
|
||||||
--[3] int weapon enchant
|
--[3] int weapon enchant
|
||||||
--[4] table with integers of equipSlot without enchant
|
--[4] table with integers of equipSlot without enchant
|
||||||
--[5] table with integers of equipSlot which has a gem slot but the slot is empty
|
--[5] table with integers of equipSlot which has a gem slot but the slot is empty
|
||||||
|
|
||||||
local dataToSend = CONST_COMM_GEARINFO_FULL_PREFIX .. ","
|
local dataToSend = CONST_COMM_GEARINFO_FULL_PREFIX .. ","
|
||||||
local playerGearInfo = openRaidLib.GearManager.GetPlayerFullGearInfo()
|
local playerGearInfo = openRaidLib.GearManager.GetPlayerFullGearInfo()
|
||||||
|
|||||||
@@ -323,21 +323,23 @@ elseif (isExpansion_Shadowlands()) then
|
|||||||
|
|
||||||
elseif (isExpansion_Dragonflight()) then
|
elseif (isExpansion_Dragonflight()) then
|
||||||
LIB_OPEN_RAID_BLOODLUST = {
|
LIB_OPEN_RAID_BLOODLUST = {
|
||||||
[2825] = true, --bloodlust
|
[2825] = true, --bloodlust (shaman)
|
||||||
[32182] = true, --heroism
|
[32182] = true, --heroism (shaman)
|
||||||
[80353] = true, --timewarp
|
[80353] = true, --timewarp (mage)
|
||||||
[90355] = true, --ancient hysteria
|
[90355] = true, --ancient hysteria (hunter)
|
||||||
[309658] = true, --current exp drums
|
[309658] = true, --current exp drums (letherwork)
|
||||||
|
--need to get the 30% haste buff from evokers
|
||||||
}
|
}
|
||||||
|
|
||||||
LIB_OPEN_RAID_MYTHICKEYSTONE_ITEMID = 180653
|
LIB_OPEN_RAID_MYTHICKEYSTONE_ITEMID = 180653
|
||||||
LIB_OPEN_RAID_AUGMENTATED_RUNE = 347901
|
LIB_OPEN_RAID_AUGMENTATED_RUNE = 0 --need to update to dragonflight
|
||||||
|
|
||||||
LIB_OPEN_RAID_COVENANT_ICONS = {
|
LIB_OPEN_RAID_COVENANT_ICONS = {
|
||||||
[[Interface\ICONS\UI_Sigil_Kyrian]], --kyrian
|
--need to get the icon for the new 4 covanants in dragonflight
|
||||||
[[Interface\ICONS\UI_Sigil_Venthyr]], --venthyr
|
--"Interface\\ICONS\\UI_Sigil_Kyrian", --kyrian
|
||||||
[[Interface\ICONS\UI_Sigil_NightFae]], --nightfae
|
--"Interface\\ICONS\\UI_Sigil_Venthyr", --venthyr
|
||||||
[[Interface\ICONS\UI_Sigil_Necrolord]], --necrolords
|
--"Interface\\ICONS\\UI_Sigil_NightFae", --nightfae
|
||||||
|
--"Interface\\ICONS\\UI_Sigil_Necrolord", --necrolords
|
||||||
}
|
}
|
||||||
|
|
||||||
--which gear slots can be enchanted on the latest retail version of the game
|
--which gear slots can be enchanted on the latest retail version of the game
|
||||||
@@ -360,78 +362,68 @@ elseif (isExpansion_Dragonflight()) then
|
|||||||
-- local enchandId = select(3, strsplit(":", itemLink))
|
-- local enchandId = select(3, strsplit(":", itemLink))
|
||||||
-- print("enchantId:", enchandId)
|
-- print("enchantId:", enchandId)
|
||||||
LIB_OPEN_RAID_ENCHANT_IDS = {
|
LIB_OPEN_RAID_ENCHANT_IDS = {
|
||||||
|
--need to get this data to dragonflight
|
||||||
--FEET
|
--FEET
|
||||||
--[6207] = INVSLOT_FEET, --[Enchant Boots - Speed of Soul]
|
--[6207] = INVSLOT_FEET, --[Enchant Boots - Speed of Soul]
|
||||||
[6211] = INVSLOT_FEET, --[Enchant Boots - Eternal Agility] + 15 agi
|
--[6211] = INVSLOT_FEET, --[Enchant Boots - Eternal Agility] + 15 agi
|
||||||
[6212] = INVSLOT_FEET, --[Enchant Boots - Agile Soulwalker] + 10 agi
|
--[6212] = INVSLOT_FEET, --[Enchant Boots - Agile Soulwalker] + 10 agi
|
||||||
|
|
||||||
--WRIST
|
--WRIST
|
||||||
--[6222] = INVSLOT_WRIST, [Enchant Bracers - Shaded Hearthing]
|
--[6222] = INVSLOT_WRIST, [Enchant Bracers - Shaded Hearthing]
|
||||||
[6219] = INVSLOT_WRIST, --[Enchant Bracers - Illuminated Soul] + 10 int
|
--[6219] = INVSLOT_WRIST, --[Enchant Bracers - Illuminated Soul] + 10 int
|
||||||
[6220] = INVSLOT_WRIST, --[Enchant Bracers - Eternal Intellect] + 15 int
|
--[6220] = INVSLOT_WRIST, --[Enchant Bracers - Eternal Intellect] + 15 int
|
||||||
|
|
||||||
--HAND
|
--HAND
|
||||||
--[6205] = INVSLOT_HAND, --[Enchant Gloves - Shadowlands Gathering]
|
--[6205] = INVSLOT_HAND, --[Enchant Gloves - Shadowlands Gathering]
|
||||||
[6209] = INVSLOT_HAND, --[Enchant Gloves - Strength of Soul] +10 str
|
--[6209] = INVSLOT_HAND, --[Enchant Gloves - Strength of Soul] +10 str
|
||||||
[6210] = INVSLOT_HAND, --[Enchant Gloves - Eternal Strength] +15 str
|
--[6210] = INVSLOT_HAND, --[Enchant Gloves - Eternal Strength] +15 str
|
||||||
|
|
||||||
--FINGER
|
--FINGER
|
||||||
[6164] = INVSLOT_FINGER1, --[Enchant Ring - Tenet of Critical Strike] +16
|
--[6164] = INVSLOT_FINGER1, --[Enchant Ring - Tenet of Critical Strike] +16
|
||||||
[6166] = INVSLOT_FINGER1, --[Enchant Ring - Tenet of Haste] +16
|
--[6166] = INVSLOT_FINGER1, --[Enchant Ring - Tenet of Haste] +16
|
||||||
[6168] = INVSLOT_FINGER1, --[Enchant Ring - Tenet of Mastery] +16
|
--[6168] = INVSLOT_FINGER1, --[Enchant Ring - Tenet of Mastery] +16
|
||||||
[6170] = INVSLOT_FINGER1, --[Enchant Ring - Tenet of Versatility] +16
|
--[6170] = INVSLOT_FINGER1, --[Enchant Ring - Tenet of Versatility] +16
|
||||||
|
|
||||||
--BACK
|
--BACK
|
||||||
[6202] = INVSLOT_BACK, --[Enchant Cloak - Fortified Speed] +20 stam +30 speed
|
--[6202] = INVSLOT_BACK, --[Enchant Cloak - Fortified Speed] +20 stam +30 speed
|
||||||
[6203] = INVSLOT_BACK, --[Enchant Cloak - Fortified Avoidance] +20 stam +30 avoidance
|
--[6203] = INVSLOT_BACK, --[Enchant Cloak - Fortified Avoidance] +20 stam +30 avoidance
|
||||||
[6204] = INVSLOT_BACK, --[Enchant Cloak - Fortified Leech]
|
--[6204] = INVSLOT_BACK, --[Enchant Cloak - Fortified Leech]
|
||||||
[6208] = INVSLOT_BACK, --[Enchant Cloak - Soul Vitality]
|
--[6208] = INVSLOT_BACK, --[Enchant Cloak - Soul Vitality]
|
||||||
|
|
||||||
--CHEST
|
--CHEST
|
||||||
[6213] = INVSLOT_CHEST, --[Enchant Chest - Eternal Bulwark] +25 armor +20 agi or str
|
--[6213] = INVSLOT_CHEST, --[Enchant Chest - Eternal Bulwark] +25 armor +20 agi or str
|
||||||
[6214] = INVSLOT_CHEST, --[Enchant Chest - Eternal Skirmish] +20 agi or str +more white damage
|
--[6214] = INVSLOT_CHEST, --[Enchant Chest - Eternal Skirmish] +20 agi or str +more white damage
|
||||||
[6217] = INVSLOT_CHEST, --[Enchant Chest - Eternal Bounds] +20 int + 6% mana
|
--[6217] = INVSLOT_CHEST, --[Enchant Chest - Eternal Bounds] +20 int + 6% mana
|
||||||
[6216] = INVSLOT_CHEST, --[Enchant Chest - Sacred Stats] +20 all stats
|
--[6216] = INVSLOT_CHEST, --[Enchant Chest - Sacred Stats] +20 all stats
|
||||||
[6230] = INVSLOT_CHEST, --[Enchant Chest - Eternal Stats] +30 all stats
|
--[6230] = INVSLOT_CHEST, --[Enchant Chest - Eternal Stats] +30 all stats
|
||||||
|
|
||||||
--MAINHAND
|
--MAINHAND
|
||||||
[6223] = INVSLOT_MAINHAND, --[Enchant Weapon - Lightless Force] + shadow wave damage
|
--[6223] = INVSLOT_MAINHAND, --[Enchant Weapon - Lightless Force] + shadow wave damage
|
||||||
[6226] = INVSLOT_MAINHAND, --[Enchant Weapon - Eternal Grace] + burst of healing done
|
--[6226] = INVSLOT_MAINHAND, --[Enchant Weapon - Eternal Grace] + burst of healing done
|
||||||
[6227] = INVSLOT_MAINHAND, --[Enchant Weapon - Ascended Vigor] + healing received increased
|
--[6227] = INVSLOT_MAINHAND, --[Enchant Weapon - Ascended Vigor] + healing received increased
|
||||||
[6228] = INVSLOT_MAINHAND, --[Enchant Weapon - Sinful Revelation] + 6% bleed damage
|
--[6228] = INVSLOT_MAINHAND, --[Enchant Weapon - Sinful Revelation] + 6% bleed damage
|
||||||
[6229] = INVSLOT_MAINHAND, --[Enchant Weapon - Celestial Guidance] + 5% agility
|
--[6229] = INVSLOT_MAINHAND, --[Enchant Weapon - Celestial Guidance] + 5% agility
|
||||||
[6243] = INVSLOT_MAINHAND, --[Runeforging: Rune of Hysteria]
|
--[6243] = INVSLOT_MAINHAND, --[Runeforging: Rune of Hysteria]
|
||||||
[3370] = INVSLOT_MAINHAND, --[Runeforging: Rune of Razorice]
|
--[3370] = INVSLOT_MAINHAND, --[Runeforging: Rune of Razorice]
|
||||||
[6241] = INVSLOT_MAINHAND, --[Runeforging: Rune of Sanguination]
|
--[6241] = INVSLOT_MAINHAND, --[Runeforging: Rune of Sanguination]
|
||||||
[6242] = INVSLOT_MAINHAND, --[Runeforging: Rune of Spellwarding]
|
--[6242] = INVSLOT_MAINHAND, --[Runeforging: Rune of Spellwarding]
|
||||||
[6245] = INVSLOT_MAINHAND, --[Runeforging: Rune of the Apocalypse]
|
--[6245] = INVSLOT_MAINHAND, --[Runeforging: Rune of the Apocalypse]
|
||||||
[3368] = INVSLOT_MAINHAND, --[Runeforging: Rune of the Fallen Crusader]
|
--[3368] = INVSLOT_MAINHAND, --[Runeforging: Rune of the Fallen Crusader]
|
||||||
[3847] = INVSLOT_MAINHAND, --[Runeforging: Rune of the Stoneskin Gargoyle]
|
--[3847] = INVSLOT_MAINHAND, --[Runeforging: Rune of the Stoneskin Gargoyle]
|
||||||
[6244] = INVSLOT_MAINHAND, --[Runeforging: Rune of Unending Thirst]
|
--[6244] = INVSLOT_MAINHAND, --[Runeforging: Rune of Unending Thirst]
|
||||||
}
|
}
|
||||||
|
|
||||||
-- how to get the gemId:
|
--how to get the gemId:
|
||||||
-- local itemLink = GetInventoryItemLink("player", slotId)
|
--local itemLink = GetInventoryItemLink("player", slotId)
|
||||||
-- local gemId = select(4, strsplit(":", itemLink))
|
--local gemId = select(4, strsplit(":", itemLink))
|
||||||
-- print("gemId:", gemId)
|
--print("gemId:", gemId)
|
||||||
LIB_OPEN_RAID_GEM_IDS = {
|
LIB_OPEN_RAID_GEM_IDS = {
|
||||||
[173126] = true, --Straddling Jewel Doublet (green, +12 speed)
|
--need update to dragonflight
|
||||||
[173125] = true, --Revitalizing Jewel Doublet (green, +100 health)
|
|
||||||
[173130] = true, --Masterful Jewel Cluster (blue, master)
|
|
||||||
[173129] = true, --Versatile Jewel Cluster (blue, versatility)
|
|
||||||
[173127] = true, --Deadly Jewel Cluster (blue, crit)
|
|
||||||
[173128] = true, --Quick Jewel Cluster (blue, haste)
|
|
||||||
[168636] = true, --Leviathan's Eye of Strength (purple, strength)
|
|
||||||
[168638] = true, --Leviathan's Eye of Intellect (purple, intellect)
|
|
||||||
[169220] = true, --Straddling Sage Agate (blue, movement speed)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
--/dump GetWeaponEnchantInfo()
|
--/dump GetWeaponEnchantInfo()
|
||||||
LIB_OPEN_RAID_WEAPON_ENCHANT_IDS = {
|
LIB_OPEN_RAID_WEAPON_ENCHANT_IDS = {
|
||||||
[6188] = true, --shadowcore oil
|
--need update to dragonflight
|
||||||
[6190] = true, --embalmer's oil
|
|
||||||
[6201] = true, --weighted
|
|
||||||
[6200] = true, --sharpened
|
|
||||||
[5400] = true, --flametongue
|
[5400] = true, --flametongue
|
||||||
[5401] = true, --windfury
|
[5401] = true, --windfury
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -954,7 +954,7 @@ do
|
|||||||
if ( index <= numMacroIcons and texture ) then
|
if ( index <= numMacroIcons and texture ) then
|
||||||
macroPopupButton:SetNormalTexture(texture)
|
macroPopupButton:SetNormalTexture(texture)
|
||||||
macroPopupButton:SetPushedTexture(texture)
|
macroPopupButton:SetPushedTexture(texture)
|
||||||
macroPopupButton:SetDisabledTexture (texture)
|
macroPopupButton:SetDisabledTexture(texture)
|
||||||
macroPopupButton:SetHighlightTexture(texture, "ADD")
|
macroPopupButton:SetHighlightTexture(texture, "ADD")
|
||||||
macroPopupButton.IconID = index
|
macroPopupButton.IconID = index
|
||||||
macroPopupButton:Show()
|
macroPopupButton:Show()
|
||||||
@@ -978,7 +978,7 @@ do
|
|||||||
if ( index <= numMacroIcons and texture ) then
|
if ( index <= numMacroIcons and texture ) then
|
||||||
macroPopupButton:SetNormalTexture(texture)
|
macroPopupButton:SetNormalTexture(texture)
|
||||||
macroPopupButton:SetPushedTexture(texture)
|
macroPopupButton:SetPushedTexture(texture)
|
||||||
macroPopupButton:SetDisabledTexture (texture)
|
macroPopupButton:SetDisabledTexture(texture)
|
||||||
macroPopupButton:SetHighlightTexture(texture, "ADD")
|
macroPopupButton:SetHighlightTexture(texture, "ADD")
|
||||||
macroPopupButton.IconID = index
|
macroPopupButton.IconID = index
|
||||||
macroPopupButton:Show()
|
macroPopupButton:Show()
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
|
|
||||||
local version, build, date, tocversion = GetBuildInfo()
|
local version, build, date, tocversion = GetBuildInfo()
|
||||||
|
|
||||||
_detalhes.build_counter = 10136
|
_detalhes.build_counter = 10142
|
||||||
_detalhes.alpha_build_counter = 10136 --if this is higher than the regular counter, use it instead
|
_detalhes.alpha_build_counter = 10142 --if this is higher than the regular counter, use it instead
|
||||||
_detalhes.dont_open_news = true
|
_detalhes.dont_open_news = true
|
||||||
_detalhes.game_version = version
|
_detalhes.game_version = version
|
||||||
_detalhes.userversion = version .. " " .. _detalhes.build_counter
|
_detalhes.userversion = version .. " " .. _detalhes.build_counter
|
||||||
@@ -49,6 +49,7 @@
|
|||||||
--namespace for the player breakdown window
|
--namespace for the player breakdown window
|
||||||
Details.PlayerBreakdown = {}
|
Details.PlayerBreakdown = {}
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
--initialization stuff
|
--initialization stuff
|
||||||
local _
|
local _
|
||||||
|
|||||||
+52
-31
@@ -198,10 +198,16 @@ function atributo_misc:CreateBuffTargetObject()
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
local backgroundColor = {0, 0, 0, 1}
|
local statusBarBackgroundTable_ForDeathTooltip = {
|
||||||
local statusBarDamageBackgroundTable = {value = 100, texture = [[Interface\AddOns\Details\images\bar_serenity]], color = {1, 0, 0, 0.1}}
|
value = 100,
|
||||||
|
texture = [[Interface\AddOns\Details\images\bar_serenity]],
|
||||||
|
color = {DetailsFramework:GetDefaultBackdropColor()}
|
||||||
|
}
|
||||||
|
|
||||||
function Details:ShowDeathTooltip(combatObject, deathTable)
|
--expose in case someone want to customize the death tooltip background
|
||||||
|
Details.StatusBarBackgroundTable_ForDeathTooltip = statusBarBackgroundTable_ForDeathTooltip
|
||||||
|
|
||||||
|
function Details.ShowDeathTooltip(instance, lineFrame, combatObject, deathTable)
|
||||||
local events = deathTable[1]
|
local events = deathTable[1]
|
||||||
local timeOfDeath = deathTable[2]
|
local timeOfDeath = deathTable[2]
|
||||||
local maxHP = max(deathTable[5], 0.001)
|
local maxHP = max(deathTable[5], 0.001)
|
||||||
@@ -209,14 +215,23 @@ function Details:ShowDeathTooltip(combatObject, deathTable)
|
|||||||
local lastcooldown = false
|
local lastcooldown = false
|
||||||
local gameCooltip = GameCooltip
|
local gameCooltip = GameCooltip
|
||||||
|
|
||||||
|
local showSpark = Details.death_tooltip_spark
|
||||||
|
local barTypeColors = Details.death_log_colors
|
||||||
|
local statusbarTexture = Details.death_tooltip_texture
|
||||||
|
local tooltipWidth = Details.death_tooltip_width
|
||||||
|
|
||||||
|
local damageSourceColor = "FFFFFFFF" --FFC6B0D9
|
||||||
|
local healingSourceColor = "FF988EA0" --FFC6B0D9
|
||||||
|
|
||||||
|
local damageAmountColor = "FFFFFFFF"
|
||||||
|
local healingAmountColor = "FF988EA0"
|
||||||
|
|
||||||
gameCooltip:Reset()
|
gameCooltip:Reset()
|
||||||
gameCooltip:SetType("tooltipbar")
|
gameCooltip:SetType("tooltipbar")
|
||||||
|
|
||||||
gameCooltip:AddLine(Loc ["STRING_REPORT_LEFTCLICK"], nil, 1, unpack(self.click_to_report_color))
|
gameCooltip:AddLine(Loc ["STRING_REPORT_LEFTCLICK"], nil, 1, unpack(Details.click_to_report_color))
|
||||||
gameCooltip:AddIcon([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, 16, 0.015625, 0.13671875, 0.4375, 0.59765625)
|
gameCooltip:AddIcon([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, 16, 0.015625, 0.13671875, 0.4375, 0.59765625)
|
||||||
|
|
||||||
local barTypeColors = Details.death_log_colors
|
|
||||||
|
|
||||||
--death parser
|
--death parser
|
||||||
for i, event in ipairs(events) do
|
for i, event in ipairs(events) do
|
||||||
local currentHP = event[5]
|
local currentHP = event[5]
|
||||||
@@ -229,7 +244,7 @@ function Details:ShowDeathTooltip(combatObject, deathTable)
|
|||||||
local spellName, _, spellIcon = _GetSpellInfo(event[2])
|
local spellName, _, spellIcon = _GetSpellInfo(event[2])
|
||||||
local amount = event[3]
|
local amount = event[3]
|
||||||
local eventTime = event[4]
|
local eventTime = event[4]
|
||||||
local source = event[6]
|
local source = Details:GetOnlyName(event[6] or "")
|
||||||
|
|
||||||
if (eventTime + 12 > timeOfDeath) then
|
if (eventTime + 12 > timeOfDeath) then
|
||||||
if (type(evType) == "boolean") then
|
if (type(evType) == "boolean") then
|
||||||
@@ -252,34 +267,34 @@ function Details:ShowDeathTooltip(combatObject, deathTable)
|
|||||||
--end
|
--end
|
||||||
|
|
||||||
overkill = " (" .. Details:ToK(overkill) .. " |cFFFF8800overkill|r)"
|
overkill = " (" .. Details:ToK(overkill) .. " |cFFFF8800overkill|r)"
|
||||||
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s |cFFFFFF00" .. spellName .. "|r (|cFFC6B0D9" .. source .. "|r)", "-" .. Details:ToK(amount) .. critOrCrush .. overkill .. " (" .. healthPercent .. "%)", 1, "white", "white")
|
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s |cFFFFFF00" .. spellName .. "|r (|c" .. damageSourceColor .. source .. "|r)", "|c" .. damageAmountColor .. "-" .. Details:ToK(amount) .. critOrCrush .. overkill .. " (" .. healthPercent .. "%)", 1, "white", "white")
|
||||||
else
|
else
|
||||||
overkill = ""
|
overkill = ""
|
||||||
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "-" .. Details:ToK(amount) .. critOrCrush .. overkill .. " (" .. healthPercent .. "%)", 1, "white", "white")
|
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (|c" .. damageSourceColor .. source .. "|r)", "|c" .. damageAmountColor .. "-" .. Details:ToK(amount) .. critOrCrush .. overkill .. " (" .. healthPercent .. "%)", 1, "white", "white")
|
||||||
end
|
end
|
||||||
|
|
||||||
gameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
|
gameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
|
||||||
|
|
||||||
if (event[9]) then
|
if (event[9]) then
|
||||||
--friendly fire
|
--friendly fire
|
||||||
gameCooltip:AddStatusBar(healthPercent, 1, barTypeColors.friendlyfire, true, statusBarDamageBackgroundTable)
|
gameCooltip:AddStatusBar(healthPercent, 1, barTypeColors.friendlyfire, showSpark, statusBarBackgroundTable_ForDeathTooltip)
|
||||||
else
|
else
|
||||||
--from a enemy
|
--from a enemy
|
||||||
gameCooltip:AddStatusBar(healthPercent, 1, barTypeColors.damage, true, statusBarDamageBackgroundTable)
|
gameCooltip:AddStatusBar(healthPercent, 1, barTypeColors.damage, showSpark, statusBarBackgroundTable_ForDeathTooltip)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
--heal
|
--heal
|
||||||
if (amount > Details.deathlog_healingdone_min) then
|
if (amount > Details.deathlog_healingdone_min) then
|
||||||
if (combatObject.is_arena) then
|
if (combatObject.is_arena) then
|
||||||
if (amount > Details.deathlog_healingdone_min_arena) then
|
if (amount > Details.deathlog_healingdone_min_arena) then
|
||||||
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. Details:ToK(amount) .. " (" .. healthPercent .. "%)", 1, "white", "white")
|
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (|c" .. healingSourceColor .. source .. "|r)", "|c" .. healingAmountColor .. "+" .. Details:ToK(amount) .. " (" .. healthPercent .. "%)", 1, "white", "white")
|
||||||
gameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
|
gameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
|
||||||
gameCooltip:AddStatusBar(healthPercent, 1, barTypeColors.heal, true)
|
gameCooltip:AddStatusBar(healthPercent, 1, barTypeColors.heal, showSpark, statusBarBackgroundTable_ForDeathTooltip)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. Details:ToK(amount) .. " (" .. healthPercent .. "%)", 1, "white", "white")
|
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (|c" .. healingSourceColor .. source .. "|r)", "|c" .. healingAmountColor .. "+" .. Details:ToK(amount) .. " (" .. healthPercent .. "%)", 1, "white", "white")
|
||||||
gameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
|
gameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
|
||||||
gameCooltip:AddStatusBar(healthPercent, 1, barTypeColors.heal, true)
|
gameCooltip:AddStatusBar(healthPercent, 1, barTypeColors.heal, showSpark, statusBarBackgroundTable_ForDeathTooltip)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -289,7 +304,7 @@ function Details:ShowDeathTooltip(combatObject, deathTable)
|
|||||||
--cooldown
|
--cooldown
|
||||||
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (" .. source .. ")", "cooldown (" .. healthPercent .. "%)", 1, "white", "white")
|
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (" .. source .. ")", "cooldown (" .. healthPercent .. "%)", 1, "white", "white")
|
||||||
gameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
|
gameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
|
||||||
gameCooltip:AddStatusBar(100, 1, barTypeColors.cooldown, true)
|
gameCooltip:AddStatusBar(100, 1, barTypeColors.cooldown, showSpark)
|
||||||
|
|
||||||
elseif (evType == 2 and not battleress) then
|
elseif (evType == 2 and not battleress) then
|
||||||
--battle ress
|
--battle ress
|
||||||
@@ -301,10 +316,9 @@ function Details:ShowDeathTooltip(combatObject, deathTable)
|
|||||||
|
|
||||||
elseif (evType == 4) then
|
elseif (evType == 4) then
|
||||||
--debuff
|
--debuff
|
||||||
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s [x" .. amount .. "] " .. spellName .. " (" .. source .. ")", "debuff (" .. healthPercent .. "%)", 1, "white", "white")
|
gameCooltip:AddLine("" .. format("%.1f", eventTime - timeOfDeath) .. "s " .. spellName .. " (" .. source .. ")", "x" .. amount .. AURA_TYPE_DEBUFF .. " (" .. healthPercent .. "%)", 1, "white", "white")
|
||||||
gameCooltip:AddIcon(spellIcon)
|
gameCooltip:AddIcon(spellIcon)
|
||||||
gameCooltip:AddStatusBar(100, 1, barTypeColors.debuff, true)
|
gameCooltip:AddStatusBar(100, 1, barTypeColors.debuff, showSpark)
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -348,26 +362,33 @@ function Details:ShowDeathTooltip(combatObject, deathTable)
|
|||||||
--move each line in the Y axis (vertical offsett)
|
--move each line in the Y axis (vertical offsett)
|
||||||
gameCooltip:SetOption("LineYOffset", 0)
|
gameCooltip:SetOption("LineYOffset", 0)
|
||||||
|
|
||||||
gameCooltip:SetOption("FixedWidth", (type(_detalhes.death_tooltip_width) == "number" and _detalhes.death_tooltip_width) or 300)
|
--tooltip width
|
||||||
|
gameCooltip:SetOption("FixedWidth", (type(tooltipWidth) == "number" and tooltipWidth) or 300)
|
||||||
|
|
||||||
|
--progress bar texture
|
||||||
|
gameCooltip:SetOption("StatusBarTexture", statusbarTexture)
|
||||||
|
|
||||||
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
function Details:ToolTipDead(instance, deathTable, barFrame)
|
function Details:ToolTipDead(instance, deathTable, barFrame)
|
||||||
local gameCooltip = GameCooltip
|
local gameCooltip = GameCooltip
|
||||||
|
|
||||||
Details:ShowDeathTooltip(instance:GetShowingCombat(), deathTable)
|
local builtTooltip = Details.ShowDeathTooltipFunction(instance, barFrame, instance:GetShowingCombat(), deathTable)
|
||||||
|
if (builtTooltip) then
|
||||||
|
local myPoint = Details.tooltip.anchor_point
|
||||||
|
local anchorPoint = Details.tooltip.anchor_relative
|
||||||
|
local xOffset = Details.tooltip.anchor_offset[1]
|
||||||
|
local yOffset = Details.tooltip.anchor_offset[2]
|
||||||
|
|
||||||
local myPoint = Details.tooltip.anchor_point
|
if (Details.tooltip.anchored_to == 1) then
|
||||||
local anchorPoint = Details.tooltip.anchor_relative
|
gameCooltip:SetHost(barFrame, myPoint, anchorPoint, xOffset, yOffset)
|
||||||
local xOffset = Details.tooltip.anchor_offset[1]
|
else
|
||||||
local yOffset = Details.tooltip.anchor_offset[2]
|
gameCooltip:SetHost(DetailsTooltipAnchor, myPoint, anchorPoint, xOffset, yOffset)
|
||||||
|
end
|
||||||
|
|
||||||
if (Details.tooltip.anchored_to == 1) then
|
gameCooltip:ShowCooltip()
|
||||||
gameCooltip:SetHost(barFrame, myPoint, anchorPoint, xOffset, yOffset)
|
|
||||||
else
|
|
||||||
gameCooltip:SetHost(DetailsTooltipAnchor, myPoint, anchorPoint, xOffset, yOffset)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
gameCooltip:ShowCooltip()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function RefreshBarraMorte (morte, barra, instancia)
|
local function RefreshBarraMorte (morte, barra, instancia)
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
--textures
|
--textures
|
||||||
button:SetNormalTexture(icon)
|
button:SetNormalTexture(icon)
|
||||||
button:SetPushedTexture(icon)
|
button:SetPushedTexture(icon)
|
||||||
button:SetDisabledTexture (icon)
|
button:SetDisabledTexture(icon)
|
||||||
button:SetHighlightTexture(icon, "ADD")
|
button:SetHighlightTexture(icon, "ADD")
|
||||||
button.__icon = icon
|
button.__icon = icon
|
||||||
button.__name = pluginname
|
button.__name = pluginname
|
||||||
|
|||||||
+4
-4
@@ -68,7 +68,7 @@ function gump:NewDetailsButton (parent, container, instancia, func, param1, para
|
|||||||
|
|
||||||
new_button:SetNormalTexture(pic_up)
|
new_button:SetNormalTexture(pic_up)
|
||||||
new_button:SetPushedTexture(pic_down)
|
new_button:SetPushedTexture(pic_down)
|
||||||
new_button:SetDisabledTexture (pic_disabled)
|
new_button:SetDisabledTexture(pic_disabled)
|
||||||
new_button:SetHighlightTexture(pic_highlight, "ADD")
|
new_button:SetHighlightTexture(pic_highlight, "ADD")
|
||||||
|
|
||||||
local new_text = new_button:CreateFontString(nil, "OVERLAY", "GameFontNormal")
|
local new_text = new_button:CreateFontString(nil, "OVERLAY", "GameFontNormal")
|
||||||
@@ -223,7 +223,7 @@ function gump:NewDetailsButton (parent, container, instancia, func, param1, para
|
|||||||
function new_button:ChangeIcon (icon1, icon2, icon3, icon4)
|
function new_button:ChangeIcon (icon1, icon2, icon3, icon4)
|
||||||
new_button:SetNormalTexture(icon1)
|
new_button:SetNormalTexture(icon1)
|
||||||
new_button:SetPushedTexture(icon2)
|
new_button:SetPushedTexture(icon2)
|
||||||
new_button:SetDisabledTexture (icon3)
|
new_button:SetDisabledTexture(icon3)
|
||||||
new_button:SetHighlightTexture(icon4, "ADD")
|
new_button:SetHighlightTexture(icon4, "ADD")
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -519,7 +519,7 @@ function gump:NewScrollBar2 (master, slave, x, y)
|
|||||||
botao_cima:SetHeight(32)
|
botao_cima:SetHeight(32)
|
||||||
botao_cima:SetNormalTexture([[Interface\Buttons\Arrow-Up-Up]])
|
botao_cima:SetNormalTexture([[Interface\Buttons\Arrow-Up-Up]])
|
||||||
botao_cima:SetPushedTexture([[Interface\Buttons\Arrow-Up-Down]])
|
botao_cima:SetPushedTexture([[Interface\Buttons\Arrow-Up-Down]])
|
||||||
botao_cima:SetDisabledTexture ([[Interface\Buttons\Arrow-Up-Disabled]])
|
botao_cima:SetDisabledTexture([[Interface\Buttons\Arrow-Up-Disabled]])
|
||||||
botao_cima:Show()
|
botao_cima:Show()
|
||||||
botao_cima:Disable()
|
botao_cima:Disable()
|
||||||
|
|
||||||
@@ -536,7 +536,7 @@ function gump:NewScrollBar2 (master, slave, x, y)
|
|||||||
botao_baixo:SetHeight(32)
|
botao_baixo:SetHeight(32)
|
||||||
botao_baixo:SetNormalTexture([[Interface\Buttons\Arrow-Down-Up]])
|
botao_baixo:SetNormalTexture([[Interface\Buttons\Arrow-Down-Up]])
|
||||||
botao_baixo:SetPushedTexture([[Interface\Buttons\Arrow-Down-Down]])
|
botao_baixo:SetPushedTexture([[Interface\Buttons\Arrow-Down-Down]])
|
||||||
botao_baixo:SetDisabledTexture ([[Interface\Buttons\Arrow-Down-Disabled]])
|
botao_baixo:SetDisabledTexture([[Interface\Buttons\Arrow-Down-Disabled]])
|
||||||
botao_baixo:Show()
|
botao_baixo:Show()
|
||||||
botao_baixo:Disable()
|
botao_baixo:Disable()
|
||||||
|
|
||||||
|
|||||||
@@ -3532,14 +3532,14 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
|||||||
baseframe.button_up:SetHeight(32)
|
baseframe.button_up:SetHeight(32)
|
||||||
baseframe.button_up:SetNormalTexture([[Interface\BUTTONS\UI-ScrollBar-ScrollUpButton-Up]])
|
baseframe.button_up:SetNormalTexture([[Interface\BUTTONS\UI-ScrollBar-ScrollUpButton-Up]])
|
||||||
baseframe.button_up:SetPushedTexture([[Interface\BUTTONS\UI-ScrollBar-ScrollUpButton-Down]])
|
baseframe.button_up:SetPushedTexture([[Interface\BUTTONS\UI-ScrollBar-ScrollUpButton-Down]])
|
||||||
baseframe.button_up:SetDisabledTexture ([[Interface\BUTTONS\UI-ScrollBar-ScrollUpButton-Disabled]])
|
baseframe.button_up:SetDisabledTexture([[Interface\BUTTONS\UI-ScrollBar-ScrollUpButton-Disabled]])
|
||||||
baseframe.button_up:Disable()
|
baseframe.button_up:Disable()
|
||||||
|
|
||||||
baseframe.button_down:SetWidth(29)
|
baseframe.button_down:SetWidth(29)
|
||||||
baseframe.button_down:SetHeight(32)
|
baseframe.button_down:SetHeight(32)
|
||||||
baseframe.button_down:SetNormalTexture([[Interface\BUTTONS\UI-ScrollBar-ScrollDownButton-Up]])
|
baseframe.button_down:SetNormalTexture([[Interface\BUTTONS\UI-ScrollBar-ScrollDownButton-Up]])
|
||||||
baseframe.button_down:SetPushedTexture([[Interface\BUTTONS\UI-ScrollBar-ScrollDownButton-Down]])
|
baseframe.button_down:SetPushedTexture([[Interface\BUTTONS\UI-ScrollBar-ScrollDownButton-Down]])
|
||||||
baseframe.button_down:SetDisabledTexture ([[Interface\BUTTONS\UI-ScrollBar-ScrollDownButton-Disabled]])
|
baseframe.button_down:SetDisabledTexture([[Interface\BUTTONS\UI-ScrollBar-ScrollDownButton-Disabled]])
|
||||||
baseframe.button_down:Disable()
|
baseframe.button_down:Disable()
|
||||||
|
|
||||||
baseframe.button_up:SetPoint("topright", baseframe.scroll_up, "topright", -4, 3)
|
baseframe.button_up:SetPoint("topright", baseframe.scroll_up, "topright", -4, 3)
|
||||||
@@ -3801,7 +3801,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
|||||||
instancia.break_snap_button:SetScript("OnLeave", unSnapButtonOnLeave)
|
instancia.break_snap_button:SetScript("OnLeave", unSnapButtonOnLeave)
|
||||||
|
|
||||||
instancia.break_snap_button:SetNormalTexture(DEFAULT_SKIN)
|
instancia.break_snap_button:SetNormalTexture(DEFAULT_SKIN)
|
||||||
instancia.break_snap_button:SetDisabledTexture (DEFAULT_SKIN)
|
instancia.break_snap_button:SetDisabledTexture(DEFAULT_SKIN)
|
||||||
instancia.break_snap_button:SetHighlightTexture(DEFAULT_SKIN, "ADD")
|
instancia.break_snap_button:SetHighlightTexture(DEFAULT_SKIN, "ADD")
|
||||||
instancia.break_snap_button:SetPushedTexture(DEFAULT_SKIN)
|
instancia.break_snap_button:SetPushedTexture(DEFAULT_SKIN)
|
||||||
|
|
||||||
@@ -7112,7 +7112,7 @@ function Details:ChangeSkin(skin_name)
|
|||||||
self.baseframe.resize_esquerda.texture:SetTexture(skin_file) --bot�o de redimencionar da esquerda
|
self.baseframe.resize_esquerda.texture:SetTexture(skin_file) --bot�o de redimencionar da esquerda
|
||||||
|
|
||||||
self.break_snap_button:SetNormalTexture(skin_file) --cadeado
|
self.break_snap_button:SetNormalTexture(skin_file) --cadeado
|
||||||
self.break_snap_button:SetDisabledTexture (skin_file)
|
self.break_snap_button:SetDisabledTexture(skin_file)
|
||||||
self.break_snap_button:SetHighlightTexture(skin_file, "ADD")
|
self.break_snap_button:SetHighlightTexture(skin_file, "ADD")
|
||||||
self.break_snap_button:SetPushedTexture(skin_file)
|
self.break_snap_button:SetPushedTexture(skin_file)
|
||||||
|
|
||||||
|
|||||||
@@ -1218,7 +1218,7 @@ local default_skin = function()
|
|||||||
--scrollbar
|
--scrollbar
|
||||||
window.container_barras.cima:SetNormalTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Up")
|
window.container_barras.cima:SetNormalTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Up")
|
||||||
window.container_barras.cima:SetPushedTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Down")
|
window.container_barras.cima:SetPushedTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Down")
|
||||||
window.container_barras.cima:SetDisabledTexture ("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Disabled")
|
window.container_barras.cima:SetDisabledTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Disabled")
|
||||||
window.container_barras.cima:GetNormalTexture():ClearAllPoints()
|
window.container_barras.cima:GetNormalTexture():ClearAllPoints()
|
||||||
window.container_barras.cima:GetPushedTexture():ClearAllPoints()
|
window.container_barras.cima:GetPushedTexture():ClearAllPoints()
|
||||||
window.container_barras.cima:GetDisabledTexture():ClearAllPoints()
|
window.container_barras.cima:GetDisabledTexture():ClearAllPoints()
|
||||||
@@ -1230,7 +1230,7 @@ local default_skin = function()
|
|||||||
|
|
||||||
window.container_barras.baixo:SetNormalTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Up")
|
window.container_barras.baixo:SetNormalTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Up")
|
||||||
window.container_barras.baixo:SetPushedTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Down")
|
window.container_barras.baixo:SetPushedTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Down")
|
||||||
window.container_barras.baixo:SetDisabledTexture ("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Disabled")
|
window.container_barras.baixo:SetDisabledTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Disabled")
|
||||||
window.container_barras.baixo:GetNormalTexture():ClearAllPoints()
|
window.container_barras.baixo:GetNormalTexture():ClearAllPoints()
|
||||||
window.container_barras.baixo:GetPushedTexture():ClearAllPoints()
|
window.container_barras.baixo:GetPushedTexture():ClearAllPoints()
|
||||||
window.container_barras.baixo:GetDisabledTexture():ClearAllPoints()
|
window.container_barras.baixo:GetDisabledTexture():ClearAllPoints()
|
||||||
@@ -1253,7 +1253,7 @@ local default_skin = function()
|
|||||||
--
|
--
|
||||||
window.container_alvos.cima:SetNormalTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Up")
|
window.container_alvos.cima:SetNormalTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Up")
|
||||||
window.container_alvos.cima:SetPushedTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Down")
|
window.container_alvos.cima:SetPushedTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Down")
|
||||||
window.container_alvos.cima:SetDisabledTexture ("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Disabled")
|
window.container_alvos.cima:SetDisabledTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Disabled")
|
||||||
window.container_alvos.cima:GetNormalTexture():ClearAllPoints()
|
window.container_alvos.cima:GetNormalTexture():ClearAllPoints()
|
||||||
window.container_alvos.cima:GetPushedTexture():ClearAllPoints()
|
window.container_alvos.cima:GetPushedTexture():ClearAllPoints()
|
||||||
window.container_alvos.cima:GetDisabledTexture():ClearAllPoints()
|
window.container_alvos.cima:GetDisabledTexture():ClearAllPoints()
|
||||||
@@ -1265,7 +1265,7 @@ local default_skin = function()
|
|||||||
|
|
||||||
window.container_alvos.baixo:SetNormalTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Up")
|
window.container_alvos.baixo:SetNormalTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Up")
|
||||||
window.container_alvos.baixo:SetPushedTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Down")
|
window.container_alvos.baixo:SetPushedTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Down")
|
||||||
window.container_alvos.baixo:SetDisabledTexture ("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Disabled")
|
window.container_alvos.baixo:SetDisabledTexture("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Disabled")
|
||||||
window.container_alvos.baixo:GetNormalTexture():ClearAllPoints()
|
window.container_alvos.baixo:GetNormalTexture():ClearAllPoints()
|
||||||
window.container_alvos.baixo:GetPushedTexture():ClearAllPoints()
|
window.container_alvos.baixo:GetPushedTexture():ClearAllPoints()
|
||||||
window.container_alvos.baixo:GetDisabledTexture():ClearAllPoints()
|
window.container_alvos.baixo:GetDisabledTexture():ClearAllPoints()
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ function _detalhes:OpenWelcomeWindow()
|
|||||||
forward:SetPushedTexture([[Interface\Buttons\UI-SpellbookIcon-NextPage-Down]])
|
forward:SetPushedTexture([[Interface\Buttons\UI-SpellbookIcon-NextPage-Down]])
|
||||||
forward:SetHighlightTexture([[Interface\Buttons\UI-SpellbookIcon-NextPage-Up]])
|
forward:SetHighlightTexture([[Interface\Buttons\UI-SpellbookIcon-NextPage-Up]])
|
||||||
forward:SetNormalTexture([[Interface\Buttons\UI-SpellbookIcon-NextPage-Up]])
|
forward:SetNormalTexture([[Interface\Buttons\UI-SpellbookIcon-NextPage-Up]])
|
||||||
forward:SetDisabledTexture ([[Interface\Buttons\UI-SpellbookIcon-NextPage-Disabled]])
|
forward:SetDisabledTexture([[Interface\Buttons\UI-SpellbookIcon-NextPage-Disabled]])
|
||||||
|
|
||||||
local backward = CreateFrame("button", nil, window)
|
local backward = CreateFrame("button", nil, window)
|
||||||
backward:SetWidth(26)
|
backward:SetWidth(26)
|
||||||
@@ -87,7 +87,7 @@ function _detalhes:OpenWelcomeWindow()
|
|||||||
backward:SetPushedTexture([[Interface\Buttons\UI-SpellbookIcon-PrevPage-Down]])
|
backward:SetPushedTexture([[Interface\Buttons\UI-SpellbookIcon-PrevPage-Down]])
|
||||||
backward:SetHighlightTexture([[Interface\Buttons\UI-SpellbookIcon-PrevPage-Up]])
|
backward:SetHighlightTexture([[Interface\Buttons\UI-SpellbookIcon-PrevPage-Up]])
|
||||||
backward:SetNormalTexture([[Interface\Buttons\UI-SpellbookIcon-PrevPage-Up]])
|
backward:SetNormalTexture([[Interface\Buttons\UI-SpellbookIcon-PrevPage-Up]])
|
||||||
backward:SetDisabledTexture ([[Interface\Buttons\UI-SpellbookIcon-PrevPage-Disabled]])
|
backward:SetDisabledTexture([[Interface\Buttons\UI-SpellbookIcon-PrevPage-Disabled]])
|
||||||
|
|
||||||
forward:SetScript("OnClick", function()
|
forward:SetScript("OnClick", function()
|
||||||
if (index < #pages) then
|
if (index < #pages) then
|
||||||
|
|||||||
+164
-162
@@ -1,14 +1,14 @@
|
|||||||
|
|
||||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
local _detalhes = _G._detalhes
|
local _detalhes = _G._detalhes
|
||||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||||
local _
|
local _
|
||||||
|
|
||||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
--Profiles:
|
--Profiles:
|
||||||
--return the current profile name
|
--return the current profile name
|
||||||
|
|
||||||
function _detalhes:GetCurrentProfileName()
|
function _detalhes:GetCurrentProfileName()
|
||||||
|
|
||||||
--check is have a profile name
|
--check is have a profile name
|
||||||
@@ -16,7 +16,7 @@ function _detalhes:GetCurrentProfileName()
|
|||||||
local character_key = UnitName ("player") .. "-" .. GetRealmName()
|
local character_key = UnitName ("player") .. "-" .. GetRealmName()
|
||||||
_detalhes_database.active_profile = character_key
|
_detalhes_database.active_profile = character_key
|
||||||
end
|
end
|
||||||
|
|
||||||
--end
|
--end
|
||||||
return _detalhes_database.active_profile
|
return _detalhes_database.active_profile
|
||||||
end
|
end
|
||||||
@@ -35,31 +35,31 @@ function _detalhes:CreateProfile (name)
|
|||||||
if (_detalhes_global.__profiles [name]) then
|
if (_detalhes_global.__profiles [name]) then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
--copy the default table
|
--copy the default table
|
||||||
local new_profile = Details.CopyTable(_detalhes.default_profile)
|
local new_profile = Details.CopyTable(_detalhes.default_profile)
|
||||||
new_profile.instances = {}
|
new_profile.instances = {}
|
||||||
|
|
||||||
--add to global container
|
--add to global container
|
||||||
_detalhes_global.__profiles [name] = new_profile
|
_detalhes_global.__profiles [name] = new_profile
|
||||||
|
|
||||||
--end
|
--end
|
||||||
return new_profile
|
return new_profile
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
--Profiles:
|
--Profiles:
|
||||||
--return the list os all profiles
|
--return the list os all profiles
|
||||||
|
|
||||||
function _detalhes:GetProfileList()
|
function _detalhes:GetProfileList()
|
||||||
|
|
||||||
--build the table
|
--build the table
|
||||||
local t = {}
|
local t = {}
|
||||||
for name, profile in pairs(_detalhes_global.__profiles) do
|
for name, profile in pairs(_detalhes_global.__profiles) do
|
||||||
t [#t + 1] = name
|
t [#t + 1] = name
|
||||||
end
|
end
|
||||||
|
|
||||||
--end
|
--end
|
||||||
return t
|
return t
|
||||||
end
|
end
|
||||||
@@ -67,42 +67,42 @@ end
|
|||||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
--Profiles:
|
--Profiles:
|
||||||
--delete a profile
|
--delete a profile
|
||||||
|
|
||||||
function _detalhes:EraseProfile (profile_name)
|
function _detalhes:EraseProfile (profile_name)
|
||||||
|
|
||||||
--erase profile table
|
--erase profile table
|
||||||
_detalhes_global.__profiles [profile_name] = nil
|
_detalhes_global.__profiles [profile_name] = nil
|
||||||
|
|
||||||
if (_detalhes_database.active_profile == profile_name) then
|
if (_detalhes_database.active_profile == profile_name) then
|
||||||
|
|
||||||
local character_key = UnitName ("player") .. "-" .. GetRealmName()
|
local character_key = UnitName ("player") .. "-" .. GetRealmName()
|
||||||
|
|
||||||
local my_profile = _detalhes:GetProfile (character_key)
|
local my_profile = _detalhes:GetProfile (character_key)
|
||||||
|
|
||||||
if (my_profile) then
|
if (my_profile) then
|
||||||
_detalhes:ApplyProfile (character_key, true)
|
_detalhes:ApplyProfile (character_key, true)
|
||||||
else
|
else
|
||||||
local profile = _detalhes:CreateProfile (character_key)
|
local profile = _detalhes:CreateProfile (character_key)
|
||||||
_detalhes:ApplyProfile (character_key, true)
|
_detalhes:ApplyProfile (character_key, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--end
|
--end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
--Profiles:
|
--Profiles:
|
||||||
--return the profile table requested
|
--return the profile table requested
|
||||||
|
|
||||||
function _detalhes:GetProfile (name, create)
|
function _detalhes:GetProfile (name, create)
|
||||||
|
|
||||||
--get the profile, create and return
|
--get the profile, create and return
|
||||||
if (not name) then
|
if (not name) then
|
||||||
name = _detalhes:GetCurrentProfileName()
|
name = _detalhes:GetCurrentProfileName()
|
||||||
end
|
end
|
||||||
|
|
||||||
local profile = _detalhes_global.__profiles [name]
|
local profile = _detalhes_global.__profiles [name]
|
||||||
|
|
||||||
if (not profile and not create) then
|
if (not profile and not create) then
|
||||||
@@ -112,10 +112,10 @@ function _detalhes:GetProfile (name, create)
|
|||||||
profile = _detalhes:CreateProfile (name)
|
profile = _detalhes:CreateProfile (name)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--end
|
--end
|
||||||
return profile
|
return profile
|
||||||
end
|
end
|
||||||
|
|
||||||
function _detalhes:SetProfileCProp (name, cprop, value)
|
function _detalhes:SetProfileCProp (name, cprop, value)
|
||||||
if (not name) then
|
if (not name) then
|
||||||
@@ -123,7 +123,7 @@ function _detalhes:SetProfileCProp (name, cprop, value)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local profile = _detalhes:GetProfile (name, false)
|
local profile = _detalhes:GetProfile (name, false)
|
||||||
|
|
||||||
if (profile) then
|
if (profile) then
|
||||||
if (type(value) == "table") then
|
if (type(value) == "table") then
|
||||||
rawset (profile, cprop, Details.CopyTable(value))
|
rawset (profile, cprop, Details.CopyTable(value))
|
||||||
@@ -142,11 +142,11 @@ function _detalhes:ResetProfile (profile_name)
|
|||||||
|
|
||||||
--get the profile
|
--get the profile
|
||||||
local profile = _detalhes:GetProfile (profile_name, true)
|
local profile = _detalhes:GetProfile (profile_name, true)
|
||||||
|
|
||||||
if (not profile) then
|
if (not profile) then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
--reset all already created instances
|
--reset all already created instances
|
||||||
for index, instance in _detalhes:ListInstances() do
|
for index, instance in _detalhes:ListInstances() do
|
||||||
if (not instance.baseframe) then
|
if (not instance.baseframe) then
|
||||||
@@ -155,7 +155,7 @@ function _detalhes:ResetProfile (profile_name)
|
|||||||
instance.skin = ""
|
instance.skin = ""
|
||||||
instance:ChangeSkin (_detalhes.default_skin_to_use)
|
instance:ChangeSkin (_detalhes.default_skin_to_use)
|
||||||
end
|
end
|
||||||
|
|
||||||
for index, instance in pairs(_detalhes.unused_instances) do
|
for index, instance in pairs(_detalhes.unused_instances) do
|
||||||
if (not instance.baseframe) then
|
if (not instance.baseframe) then
|
||||||
instance:AtivarInstancia()
|
instance:AtivarInstancia()
|
||||||
@@ -163,7 +163,7 @@ function _detalhes:ResetProfile (profile_name)
|
|||||||
instance.skin = ""
|
instance.skin = ""
|
||||||
instance:ChangeSkin(_detalhes.default_skin_to_use)
|
instance:ChangeSkin(_detalhes.default_skin_to_use)
|
||||||
end
|
end
|
||||||
|
|
||||||
--reset the profile
|
--reset the profile
|
||||||
table.wipe(profile.instances)
|
table.wipe(profile.instances)
|
||||||
|
|
||||||
@@ -180,9 +180,9 @@ function _detalhes:ResetProfile (profile_name)
|
|||||||
instance.horizontalSnap = false
|
instance.horizontalSnap = false
|
||||||
instance.verticalSnap = false
|
instance.verticalSnap = false
|
||||||
instance.snap = {}
|
instance.snap = {}
|
||||||
|
|
||||||
_detalhes:ApplyProfile (profile_name, true)
|
_detalhes:ApplyProfile (profile_name, true)
|
||||||
|
|
||||||
--end
|
--end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@@ -227,7 +227,7 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
|||||||
end
|
end
|
||||||
|
|
||||||
profile.ocd_tracker = nil --moved to local character saved
|
profile.ocd_tracker = nil --moved to local character saved
|
||||||
|
|
||||||
--always save the previous profile, except if nosave flag is up
|
--always save the previous profile, except if nosave flag is up
|
||||||
if (not nosave) then
|
if (not nosave) then
|
||||||
--salva o profile ativo no momento
|
--salva o profile ativo no momento
|
||||||
@@ -235,7 +235,7 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
|||||||
end
|
end
|
||||||
|
|
||||||
--update profile keys before go
|
--update profile keys before go
|
||||||
for key, value in pairs(_detalhes.default_profile) do
|
for key, value in pairs(_detalhes.default_profile) do
|
||||||
--the entire key doesn't exist
|
--the entire key doesn't exist
|
||||||
if (profile [key] == nil) then
|
if (profile [key] == nil) then
|
||||||
if (type(value) == "table") then
|
if (type(value) == "table") then
|
||||||
@@ -243,44 +243,44 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
|||||||
else
|
else
|
||||||
profile [key] = value
|
profile [key] = value
|
||||||
end
|
end
|
||||||
|
|
||||||
--the key exist and is a table, check for missing values on sub tables
|
--the key exist and is a table, check for missing values on sub tables
|
||||||
elseif (type(value) == "table") then
|
elseif (type(value) == "table") then
|
||||||
--deploy only copy non existing data
|
--deploy only copy non existing data
|
||||||
_detalhes.table.deploy(profile [key], value)
|
_detalhes.table.deploy(profile [key], value)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--apply the profile values
|
--apply the profile values
|
||||||
for key, _ in pairs(_detalhes.default_profile) do
|
for key, _ in pairs(_detalhes.default_profile) do
|
||||||
local value = profile [key]
|
local value = profile [key]
|
||||||
|
|
||||||
if (type(value) == "table") then
|
if (type(value) == "table") then
|
||||||
if (key == "class_specs_coords") then
|
if (key == "class_specs_coords") then
|
||||||
value = Details.CopyTable(_detalhes.default_profile.class_specs_coords)
|
value = Details.CopyTable(_detalhes.default_profile.class_specs_coords)
|
||||||
end
|
end
|
||||||
|
|
||||||
local ctable = Details.CopyTable(value)
|
local ctable = Details.CopyTable(value)
|
||||||
_detalhes [key] = ctable
|
_detalhes [key] = ctable
|
||||||
else
|
else
|
||||||
_detalhes [key] = value
|
_detalhes [key] = value
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--set the current profile
|
--set the current profile
|
||||||
if (not is_copy) then
|
if (not is_copy) then
|
||||||
_detalhes.active_profile = profile_name
|
_detalhes.active_profile = profile_name
|
||||||
_detalhes_database.active_profile = profile_name
|
_detalhes_database.active_profile = profile_name
|
||||||
end
|
end
|
||||||
|
|
||||||
--apply the skin
|
--apply the skin
|
||||||
|
|
||||||
--first save the local instance configs
|
--first save the local instance configs
|
||||||
_detalhes:SaveLocalInstanceConfig()
|
_detalhes:SaveLocalInstanceConfig()
|
||||||
|
|
||||||
local saved_skins = profile.instances
|
local saved_skins = profile.instances
|
||||||
local instance_limit = _detalhes.instances_amount
|
local instance_limit = _detalhes.instances_amount
|
||||||
|
|
||||||
--then close all opened instances
|
--then close all opened instances
|
||||||
for index, instance in _detalhes:ListInstances() do
|
for index, instance in _detalhes:ListInstances() do
|
||||||
if (not getmetatable(instance)) then
|
if (not getmetatable(instance)) then
|
||||||
@@ -306,14 +306,14 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
|||||||
instance1:ResetInstanceConfig()
|
instance1:ResetInstanceConfig()
|
||||||
instance1.skin = "no skin"
|
instance1.skin = "no skin"
|
||||||
instance1:ChangeSkin (_detalhes.default_skin_to_use)
|
instance1:ChangeSkin (_detalhes.default_skin_to_use)
|
||||||
|
|
||||||
--release the snap and lock
|
--release the snap and lock
|
||||||
instance1:LoadLocalInstanceConfig()
|
instance1:LoadLocalInstanceConfig()
|
||||||
instance1.snap = {}
|
instance1.snap = {}
|
||||||
instance1.horizontalSnap = nil
|
instance1.horizontalSnap = nil
|
||||||
instance1.verticalSnap = nil
|
instance1.verticalSnap = nil
|
||||||
instance1:LockInstance (false)
|
instance1:LockInstance (false)
|
||||||
|
|
||||||
if (#_detalhes.tabela_instancias > 1) then
|
if (#_detalhes.tabela_instancias > 1) then
|
||||||
for i = #_detalhes.tabela_instancias, 2, -1 do
|
for i = #_detalhes.tabela_instancias, 2, -1 do
|
||||||
_detalhes.tabela_instancias [i].modo = 2
|
_detalhes.tabela_instancias [i].modo = 2
|
||||||
@@ -322,10 +322,10 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
||||||
--load skins
|
--load skins
|
||||||
local instances_loaded = 0
|
local instances_loaded = 0
|
||||||
|
|
||||||
for index, skin in ipairs(saved_skins) do
|
for index, skin in ipairs(saved_skins) do
|
||||||
if (instance_limit < index) then
|
if (instance_limit < index) then
|
||||||
break
|
break
|
||||||
@@ -337,7 +337,7 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
|||||||
--create a instance without creating its frames (not initializing)
|
--create a instance without creating its frames (not initializing)
|
||||||
instance = _detalhes:CreateDisabledInstance (index, skin)
|
instance = _detalhes:CreateDisabledInstance (index, skin)
|
||||||
end
|
end
|
||||||
|
|
||||||
--copy skin
|
--copy skin
|
||||||
for key, value in pairs(skin) do
|
for key, value in pairs(skin) do
|
||||||
if (type(value) == "table") then
|
if (type(value) == "table") then
|
||||||
@@ -346,16 +346,16 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
|||||||
instance [key] = value
|
instance [key] = value
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--apply default values if some key is missing
|
--apply default values if some key is missing
|
||||||
instance:LoadInstanceConfig()
|
instance:LoadInstanceConfig()
|
||||||
|
|
||||||
--reset basic config
|
--reset basic config
|
||||||
instance.snap = {}
|
instance.snap = {}
|
||||||
instance.horizontalSnap = nil
|
instance.horizontalSnap = nil
|
||||||
instance.verticalSnap = nil
|
instance.verticalSnap = nil
|
||||||
instance:LockInstance (false)
|
instance:LockInstance (false)
|
||||||
|
|
||||||
--load data saved for this character only
|
--load data saved for this character only
|
||||||
instance:LoadLocalInstanceConfig()
|
instance:LoadLocalInstanceConfig()
|
||||||
if (skin.__was_opened) then
|
if (skin.__was_opened) then
|
||||||
@@ -367,7 +367,7 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
|||||||
end
|
end
|
||||||
|
|
||||||
instance.modo = instance.modo or 2
|
instance.modo = instance.modo or 2
|
||||||
|
|
||||||
--load data saved again
|
--load data saved again
|
||||||
instance:LoadLocalInstanceConfig()
|
instance:LoadLocalInstanceConfig()
|
||||||
--check window positioning
|
--check window positioning
|
||||||
@@ -396,7 +396,7 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
|||||||
instance.posicao.normal = {x = 1, y = 1, w = 300, h = 200}
|
instance.posicao.normal = {x = 1, y = 1, w = 300, h = 200}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--open the instance
|
--open the instance
|
||||||
if (instance:IsEnabled()) then
|
if (instance:IsEnabled()) then
|
||||||
if (not instance.baseframe) then
|
if (not instance.baseframe) then
|
||||||
@@ -404,7 +404,7 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
|||||||
end
|
end
|
||||||
|
|
||||||
instance:LockInstance (instance.isLocked)
|
instance:LockInstance (instance.isLocked)
|
||||||
|
|
||||||
--tinsert(_detalhes.resize_debug, #_detalhes.resize_debug+1, "libwindow X (427): " .. (instance.libwindow.x or 0))
|
--tinsert(_detalhes.resize_debug, #_detalhes.resize_debug+1, "libwindow X (427): " .. (instance.libwindow.x or 0))
|
||||||
instance:RestoreMainWindowPosition()
|
instance:RestoreMainWindowPosition()
|
||||||
instance:ReajustaGump()
|
instance:ReajustaGump()
|
||||||
@@ -414,10 +414,10 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
|||||||
else
|
else
|
||||||
instance.skin = skin.skin
|
instance.skin = skin.skin
|
||||||
end
|
end
|
||||||
|
|
||||||
instances_loaded = instances_loaded + 1
|
instances_loaded = instances_loaded + 1
|
||||||
end
|
end
|
||||||
|
|
||||||
--move unused instances for unused container
|
--move unused instances for unused container
|
||||||
if (#_detalhes.tabela_instancias > instances_loaded) then
|
if (#_detalhes.tabela_instancias > instances_loaded) then
|
||||||
for i = #_detalhes.tabela_instancias, instances_loaded+1, -1 do
|
for i = #_detalhes.tabela_instancias, instances_loaded+1, -1 do
|
||||||
@@ -425,13 +425,13 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
|||||||
_detalhes.tabela_instancias [i] = nil
|
_detalhes.tabela_instancias [i] = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--check all snaps for invalid entries
|
--check all snaps for invalid entries
|
||||||
for i = 1, instances_loaded do
|
for i = 1, instances_loaded do
|
||||||
local instance = _detalhes:GetInstance(i)
|
local instance = _detalhes:GetInstance(i)
|
||||||
local previous_instance_id = _detalhes:GetInstance(i-1) and _detalhes:GetInstance(i-1):GetId() or 0
|
local previous_instance_id = _detalhes:GetInstance(i-1) and _detalhes:GetInstance(i-1):GetId() or 0
|
||||||
local next_instance_id = _detalhes:GetInstance(i+1) and _detalhes:GetInstance(i+1):GetId() or 0
|
local next_instance_id = _detalhes:GetInstance(i+1) and _detalhes:GetInstance(i+1):GetId() or 0
|
||||||
|
|
||||||
for snap_side, instance_id in pairs(instance.snap) do
|
for snap_side, instance_id in pairs(instance.snap) do
|
||||||
if (instance_id < 1) then --invalid instance
|
if (instance_id < 1) then --invalid instance
|
||||||
instance.snap [snap_side] = nil
|
instance.snap [snap_side] = nil
|
||||||
@@ -440,7 +440,7 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--auto realign windows
|
--auto realign windows
|
||||||
if (not _detalhes.initializing) then
|
if (not _detalhes.initializing) then
|
||||||
for _, instance in _detalhes:ListInstances() do
|
for _, instance in _detalhes:ListInstances() do
|
||||||
@@ -472,9 +472,9 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--check instance amount
|
--check instance amount
|
||||||
_detalhes.opened_windows = 0
|
_detalhes.opened_windows = 0
|
||||||
for index = 1, _detalhes.instances_amount do
|
for index = 1, _detalhes.instances_amount do
|
||||||
@@ -483,22 +483,22 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
|||||||
_detalhes.opened_windows = _detalhes.opened_windows + 1
|
_detalhes.opened_windows = _detalhes.opened_windows + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--update tooltip settings
|
--update tooltip settings
|
||||||
_detalhes:SetTooltipBackdrop()
|
_detalhes:SetTooltipBackdrop()
|
||||||
|
|
||||||
--update player detail window
|
--update player detail window
|
||||||
_detalhes:ApplyPDWSkin()
|
_detalhes:ApplyPDWSkin()
|
||||||
|
|
||||||
--update the numerical system
|
--update the numerical system
|
||||||
_detalhes:SelectNumericalSystem()
|
_detalhes:SelectNumericalSystem()
|
||||||
|
|
||||||
--refresh the update interval
|
--refresh the update interval
|
||||||
_detalhes:RefreshUpdater()
|
_detalhes:RefreshUpdater()
|
||||||
|
|
||||||
--refresh animation functions
|
--refresh animation functions
|
||||||
_detalhes:RefreshAnimationFunctions()
|
_detalhes:RefreshAnimationFunctions()
|
||||||
|
|
||||||
--refresh broadcaster tools
|
--refresh broadcaster tools
|
||||||
_detalhes:LoadFramesForBroadcastTools()
|
_detalhes:LoadFramesForBroadcastTools()
|
||||||
|
|
||||||
@@ -515,24 +515,24 @@ end
|
|||||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
--Profiles:
|
--Profiles:
|
||||||
--return the profile table requested
|
--return the profile table requested
|
||||||
|
|
||||||
function _detalhes:SaveProfile (saveas)
|
function _detalhes:SaveProfile (saveas)
|
||||||
|
|
||||||
--get the current profile
|
--get the current profile
|
||||||
|
|
||||||
local profile_name
|
local profile_name
|
||||||
|
|
||||||
if (saveas) then
|
if (saveas) then
|
||||||
profile_name = saveas
|
profile_name = saveas
|
||||||
else
|
else
|
||||||
profile_name = _detalhes:GetCurrentProfileName()
|
profile_name = _detalhes:GetCurrentProfileName()
|
||||||
end
|
end
|
||||||
|
|
||||||
local profile = _detalhes:GetProfile (profile_name, true)
|
local profile = _detalhes:GetProfile (profile_name, true)
|
||||||
|
|
||||||
--save default keys
|
--save default keys
|
||||||
for key, _ in pairs(_detalhes.default_profile) do
|
for key, _ in pairs(_detalhes.default_profile) do
|
||||||
|
|
||||||
local current_value = _detalhes [key]
|
local current_value = _detalhes [key]
|
||||||
|
|
||||||
if (type(current_value) == "table") then
|
if (type(current_value) == "table") then
|
||||||
@@ -743,7 +743,7 @@ local default_profile = {
|
|||||||
0.125, -- [4]
|
0.125, -- [4]
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
class_colors = {
|
class_colors = {
|
||||||
["DEMONHUNTER"] = {
|
["DEMONHUNTER"] = {
|
||||||
0.64,
|
0.64,
|
||||||
@@ -872,10 +872,10 @@ local default_profile = {
|
|||||||
--minimap
|
--minimap
|
||||||
minimap = {hide = false, radius = 160, minimapPos = 220, onclick_what_todo = 1, text_type = 1, text_format = 3},
|
minimap = {hide = false, radius = 160, minimapPos = 220, onclick_what_todo = 1, text_type = 1, text_format = 3},
|
||||||
data_broker_text = "",
|
data_broker_text = "",
|
||||||
|
|
||||||
--hotcorner
|
--hotcorner
|
||||||
hotcorner_topleft = {hide = false},
|
hotcorner_topleft = {hide = false},
|
||||||
|
|
||||||
--PvP
|
--PvP
|
||||||
only_pvp_frags = false,
|
only_pvp_frags = false,
|
||||||
color_by_arena_team = true,
|
color_by_arena_team = true,
|
||||||
@@ -892,24 +892,24 @@ local default_profile = {
|
|||||||
disable_stretch_button = false,
|
disable_stretch_button = false,
|
||||||
disable_alldisplays_window = false,
|
disable_alldisplays_window = false,
|
||||||
damage_taken_everything = false,
|
damage_taken_everything = false,
|
||||||
|
|
||||||
--info window
|
--info window
|
||||||
player_details_window = {
|
player_details_window = {
|
||||||
skin = "ElvUI",
|
skin = "ElvUI",
|
||||||
bar_texture = "Skyline",
|
bar_texture = "Skyline",
|
||||||
scale = 1,
|
scale = 1,
|
||||||
},
|
},
|
||||||
|
|
||||||
options_window = {
|
options_window = {
|
||||||
scale = 1,
|
scale = 1,
|
||||||
},
|
},
|
||||||
|
|
||||||
--segments
|
--segments
|
||||||
segments_amount = 40,
|
segments_amount = 40,
|
||||||
segments_amount_to_save = 40,
|
segments_amount_to_save = 40,
|
||||||
segments_panic_mode = false,
|
segments_panic_mode = false,
|
||||||
segments_auto_erase = 1,
|
segments_auto_erase = 1,
|
||||||
|
|
||||||
--instances
|
--instances
|
||||||
instances_amount = 5,
|
instances_amount = 5,
|
||||||
instances_segments_locked = true,
|
instances_segments_locked = true,
|
||||||
@@ -917,16 +917,16 @@ local default_profile = {
|
|||||||
instances_menu_click_to_open = false,
|
instances_menu_click_to_open = false,
|
||||||
instances_no_libwindow = false,
|
instances_no_libwindow = false,
|
||||||
instances_suppress_trash = 0,
|
instances_suppress_trash = 0,
|
||||||
|
|
||||||
--if clear ungroup characters when logout
|
--if clear ungroup characters when logout
|
||||||
clear_ungrouped = true,
|
clear_ungrouped = true,
|
||||||
|
|
||||||
--if clear graphic data when logout
|
--if clear graphic data when logout
|
||||||
clear_graphic = true,
|
clear_graphic = true,
|
||||||
|
|
||||||
--item level tracker
|
--item level tracker
|
||||||
track_item_level = false,
|
track_item_level = false,
|
||||||
|
|
||||||
--text settings
|
--text settings
|
||||||
font_sizes = {menus = 10},
|
font_sizes = {menus = 10},
|
||||||
font_faces = {menus = "Friz Quadrata TT"},
|
font_faces = {menus = "Friz Quadrata TT"},
|
||||||
@@ -934,7 +934,7 @@ local default_profile = {
|
|||||||
total_abbreviation = 2,
|
total_abbreviation = 2,
|
||||||
numerical_system = 1,
|
numerical_system = 1,
|
||||||
numerical_system_symbols = "auto",
|
numerical_system_symbols = "auto",
|
||||||
|
|
||||||
--performance
|
--performance
|
||||||
use_row_animations = true,
|
use_row_animations = true,
|
||||||
--default animation speed - % per second
|
--default animation speed - % per second
|
||||||
@@ -958,22 +958,22 @@ local default_profile = {
|
|||||||
trash_concatenate = false,
|
trash_concatenate = false,
|
||||||
trash_auto_remove = false,
|
trash_auto_remove = false,
|
||||||
world_combat_is_trash = false,
|
world_combat_is_trash = false,
|
||||||
|
|
||||||
--death log
|
--death log
|
||||||
deadlog_limit = 16,
|
deadlog_limit = 16,
|
||||||
deadlog_events = 32,
|
deadlog_events = 32,
|
||||||
|
|
||||||
--report
|
--report
|
||||||
report_lines = 5,
|
report_lines = 5,
|
||||||
report_to_who = "",
|
report_to_who = "",
|
||||||
report_heal_links = false,
|
report_heal_links = false,
|
||||||
report_schema = 1,
|
report_schema = 1,
|
||||||
deny_score_messages = false,
|
deny_score_messages = false,
|
||||||
|
|
||||||
--colors
|
--colors
|
||||||
default_bg_color = 0.0941,
|
default_bg_color = 0.0941,
|
||||||
default_bg_alpha = 0.5,
|
default_bg_alpha = 0.5,
|
||||||
|
|
||||||
--fades
|
--fades
|
||||||
row_fade_in = {"in", 0.2},
|
row_fade_in = {"in", 0.2},
|
||||||
windows_fade_in = {"in", 0.2},
|
windows_fade_in = {"in", 0.2},
|
||||||
@@ -989,13 +989,13 @@ local default_profile = {
|
|||||||
["aura"] = true,
|
["aura"] = true,
|
||||||
["spellcast"] = true,
|
["spellcast"] = true,
|
||||||
},
|
},
|
||||||
|
|
||||||
--bookmark
|
--bookmark
|
||||||
bookmark_text_size = 11,
|
bookmark_text_size = 11,
|
||||||
|
|
||||||
--cloud capture
|
--cloud capture
|
||||||
cloud_capture = true,
|
cloud_capture = true,
|
||||||
|
|
||||||
--combat
|
--combat
|
||||||
minimum_combat_time = 5, --combats with less then this in elapsed time is discarted
|
minimum_combat_time = 5, --combats with less then this in elapsed time is discarted
|
||||||
minimum_overall_combat_time = 10, --minimum time the combat must have to be added into the overall data
|
minimum_overall_combat_time = 10, --minimum time the combat must have to be added into the overall data
|
||||||
@@ -1011,15 +1011,17 @@ local default_profile = {
|
|||||||
use_battleground_server_parser = false,
|
use_battleground_server_parser = false,
|
||||||
force_activity_time_pvp = true,
|
force_activity_time_pvp = true,
|
||||||
death_tooltip_width = 350,
|
death_tooltip_width = 350,
|
||||||
|
death_tooltip_spark = false,
|
||||||
|
death_tooltip_texture = "Details Serenity",
|
||||||
override_spellids = true,
|
override_spellids = true,
|
||||||
all_players_are_group = false,
|
all_players_are_group = false,
|
||||||
|
|
||||||
--skins
|
--skins
|
||||||
standard_skin = false,
|
standard_skin = false,
|
||||||
skin = "Minimalistic",
|
skin = "Minimalistic",
|
||||||
profile_save_pos = true,
|
profile_save_pos = true,
|
||||||
options_group_edit = true,
|
options_group_edit = true,
|
||||||
|
|
||||||
chat_tab_embed = {
|
chat_tab_embed = {
|
||||||
enabled = false,
|
enabled = false,
|
||||||
tab_name = "",
|
tab_name = "",
|
||||||
@@ -1027,10 +1029,10 @@ local default_profile = {
|
|||||||
x_offset = 0,
|
x_offset = 0,
|
||||||
y_offset = 0,
|
y_offset = 0,
|
||||||
},
|
},
|
||||||
|
|
||||||
--broadcaster options
|
--broadcaster options
|
||||||
broadcaster_enabled = false,
|
broadcaster_enabled = false,
|
||||||
|
|
||||||
--event tracker
|
--event tracker
|
||||||
event_tracker = {
|
event_tracker = {
|
||||||
frame = {
|
frame = {
|
||||||
@@ -1080,7 +1082,7 @@ local default_profile = {
|
|||||||
update_interval = 0.30,
|
update_interval = 0.30,
|
||||||
sample_size = 3, --in seconds
|
sample_size = 3, --in seconds
|
||||||
},
|
},
|
||||||
|
|
||||||
--streamer
|
--streamer
|
||||||
-- _detalhes.streamer_config.
|
-- _detalhes.streamer_config.
|
||||||
streamer_config = {
|
streamer_config = {
|
||||||
@@ -1091,19 +1093,19 @@ local default_profile = {
|
|||||||
faster_updates = false,
|
faster_updates = false,
|
||||||
use_animation_accel = true,
|
use_animation_accel = true,
|
||||||
},
|
},
|
||||||
|
|
||||||
--tooltip
|
--tooltip
|
||||||
tooltip = {
|
tooltip = {
|
||||||
fontface = "Friz Quadrata TT",
|
fontface = "Friz Quadrata TT",
|
||||||
fontsize = 10,
|
fontsize = 10,
|
||||||
fontsize_title = 10,
|
fontsize_title = 10,
|
||||||
fontcolor = {1, 1, 1, 1},
|
fontcolor = {1, 1, 1, 1},
|
||||||
fontcolor_right = {1, 0.7, 0, 1}, --{1, 0.9254, 0.6078, 1}
|
fontcolor_right = {1, 0.7, 0, 1}, --{1, 0.9254, 0.6078, 1}
|
||||||
fontshadow = false,
|
fontshadow = false,
|
||||||
background = {0.1960, 0.1960, 0.1960, 0.8697},
|
background = {0.1960, 0.1960, 0.1960, 0.8697},
|
||||||
abbreviation = 2, -- 2 = ToK I Upper 5 = ToK I Lower -- was 8
|
abbreviation = 2, -- 2 = ToK I Upper 5 = ToK I Lower -- was 8
|
||||||
maximize_method = 1,
|
maximize_method = 1,
|
||||||
show_amount = false,
|
show_amount = false,
|
||||||
commands = {},
|
commands = {},
|
||||||
header_text_color = {1, 0.9176, 0, 1}, --{1, 0.7, 0, 1}
|
header_text_color = {1, 0.9176, 0, 1}, --{1, 0.7, 0, 1}
|
||||||
header_statusbar = {0.3, 0.3, 0.3, 0.8, false, false, "WorldState Score"},
|
header_statusbar = {0.3, 0.3, 0.3, 0.8, false, false, "WorldState Score"},
|
||||||
@@ -1114,27 +1116,27 @@ local default_profile = {
|
|||||||
anchor_point = "bottom",
|
anchor_point = "bottom",
|
||||||
anchor_relative = "top",
|
anchor_relative = "top",
|
||||||
anchor_offset = {0, 0},
|
anchor_offset = {0, 0},
|
||||||
|
|
||||||
border_texture = "Details BarBorder 3",
|
border_texture = "Details BarBorder 3",
|
||||||
border_color = {0, 0, 0, 1},
|
border_color = {0, 0, 0, 1},
|
||||||
border_size = 14,
|
border_size = 14,
|
||||||
|
|
||||||
tooltip_max_abilities = 6,
|
tooltip_max_abilities = 6,
|
||||||
tooltip_max_targets = 2,
|
tooltip_max_targets = 2,
|
||||||
tooltip_max_pets = 2,
|
tooltip_max_pets = 2,
|
||||||
|
|
||||||
--menus_bg_coords = {331/512, 63/512, 109/512, 143/512}, --with gradient on right side
|
--menus_bg_coords = {331/512, 63/512, 109/512, 143/512}, --with gradient on right side
|
||||||
menus_bg_coords = {0.309777336120606, 0.924000015258789, 0.213000011444092, 0.279000015258789},
|
menus_bg_coords = {0.309777336120606, 0.924000015258789, 0.213000011444092, 0.279000015258789},
|
||||||
menus_bg_color = {.8, .8, .8, 0.2},
|
menus_bg_color = {.8, .8, .8, 0.2},
|
||||||
menus_bg_texture = [[Interface\SPELLBOOK\Spellbook-Page-1]],
|
menus_bg_texture = [[Interface\SPELLBOOK\Spellbook-Page-1]],
|
||||||
|
|
||||||
icon_border_texcoord = {L = 5/64, R = 59/64, T = 5/64, B = 59/64},
|
icon_border_texcoord = {L = 5/64, R = 59/64, T = 5/64, B = 59/64},
|
||||||
icon_size = {W = 13, H = 13},
|
icon_size = {W = 13, H = 13},
|
||||||
|
|
||||||
--height used on tooltips at displays such as damage taken by spell
|
--height used on tooltips at displays such as damage taken by spell
|
||||||
line_height = 17,
|
line_height = 17,
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_detalhes.default_profile = default_profile
|
_detalhes.default_profile = default_profile
|
||||||
@@ -1178,9 +1180,9 @@ local default_player_data = {
|
|||||||
cached_specs = {},
|
cached_specs = {},
|
||||||
cached_talents = {},
|
cached_talents = {},
|
||||||
cached_roles = {},
|
cached_roles = {},
|
||||||
|
|
||||||
last_day = date ("%d"),
|
last_day = date ("%d"),
|
||||||
|
|
||||||
combat_id = 0,
|
combat_id = 0,
|
||||||
combat_counter = 0,
|
combat_counter = 0,
|
||||||
last_instance_id = 0,
|
last_instance_id = 0,
|
||||||
@@ -1252,14 +1254,14 @@ local default_player_data = {
|
|||||||
--benchmark
|
--benchmark
|
||||||
benchmark_db = {
|
benchmark_db = {
|
||||||
frame = {},
|
frame = {},
|
||||||
|
|
||||||
},
|
},
|
||||||
--rank
|
--rank
|
||||||
rank_window = {
|
rank_window = {
|
||||||
last_difficulty = 15,
|
last_difficulty = 15,
|
||||||
last_raid = "",
|
last_raid = "",
|
||||||
},
|
},
|
||||||
|
|
||||||
--death panel buttons
|
--death panel buttons
|
||||||
on_death_menu = false,
|
on_death_menu = false,
|
||||||
}
|
}
|
||||||
@@ -1333,16 +1335,16 @@ local default_global_data = {
|
|||||||
scale = 1
|
scale = 1
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
--profile by spec
|
--profile by spec
|
||||||
profile_by_spec = {},
|
profile_by_spec = {},
|
||||||
|
|
||||||
--displays by spec
|
--displays by spec
|
||||||
displays_by_spec = {},
|
displays_by_spec = {},
|
||||||
|
|
||||||
--death log
|
--death log
|
||||||
show_totalhitdamage_on_overkill = false,
|
show_totalhitdamage_on_overkill = false,
|
||||||
|
|
||||||
--switch tables
|
--switch tables
|
||||||
switchSaved = {slots = 4, table = {
|
switchSaved = {slots = 4, table = {
|
||||||
{["atributo"] = 1, ["sub_atributo"] = 1}, --damage done
|
{["atributo"] = 1, ["sub_atributo"] = 1}, --damage done
|
||||||
@@ -1351,18 +1353,18 @@ local default_global_data = {
|
|||||||
{["atributo"] = 4, ["sub_atributo"] = 5}, --deaths
|
{["atributo"] = 4, ["sub_atributo"] = 5}, --deaths
|
||||||
}},
|
}},
|
||||||
report_pos = {1, 1},
|
report_pos = {1, 1},
|
||||||
|
|
||||||
--tutorial
|
--tutorial
|
||||||
tutorial = {
|
tutorial = {
|
||||||
logons = 0,
|
logons = 0,
|
||||||
unlock_button = 0,
|
unlock_button = 0,
|
||||||
version_announce = 0,
|
version_announce = 0,
|
||||||
main_help_button = 0,
|
main_help_button = 0,
|
||||||
alert_frames = {false, false, false, false, false, false},
|
alert_frames = {false, false, false, false, false, false},
|
||||||
bookmark_tutorial = false,
|
bookmark_tutorial = false,
|
||||||
ctrl_click_close_tutorial = false,
|
ctrl_click_close_tutorial = false,
|
||||||
},
|
},
|
||||||
|
|
||||||
performance_profiles = {
|
performance_profiles = {
|
||||||
["RaidFinder"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true},
|
["RaidFinder"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true},
|
||||||
["Raid15"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true},
|
["Raid15"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true},
|
||||||
@@ -1373,16 +1375,16 @@ local default_global_data = {
|
|||||||
["Arena"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true},
|
["Arena"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true},
|
||||||
["Dungeon"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true},
|
["Dungeon"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true},
|
||||||
},
|
},
|
||||||
|
|
||||||
--auras (wa auras created from the aura panel)
|
--auras (wa auras created from the aura panel)
|
||||||
details_auras = {},
|
details_auras = {},
|
||||||
|
|
||||||
--ilvl
|
--ilvl
|
||||||
item_level_pool = {},
|
item_level_pool = {},
|
||||||
|
|
||||||
--latest report
|
--latest report
|
||||||
latest_report_table = {},
|
latest_report_table = {},
|
||||||
|
|
||||||
--death recap
|
--death recap
|
||||||
death_recap = {
|
death_recap = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
@@ -1397,14 +1399,14 @@ local default_global_data = {
|
|||||||
spell_pool = {},
|
spell_pool = {},
|
||||||
encounter_spell_pool = {},
|
encounter_spell_pool = {},
|
||||||
npcid_pool = {},
|
npcid_pool = {},
|
||||||
|
|
||||||
--aura creation frame libwindow
|
--aura creation frame libwindow
|
||||||
createauraframe = {},
|
createauraframe = {},
|
||||||
|
|
||||||
--min health done on the death report
|
--min health done on the death report
|
||||||
deathlog_healingdone_min = 1,
|
deathlog_healingdone_min = 1,
|
||||||
deathlog_healingdone_min_arena = 400,
|
deathlog_healingdone_min_arena = 400,
|
||||||
|
|
||||||
--mythic plus config
|
--mythic plus config
|
||||||
mythic_plus = {
|
mythic_plus = {
|
||||||
always_in_combat = false, --
|
always_in_combat = false, --
|
||||||
@@ -1421,10 +1423,10 @@ local default_global_data = {
|
|||||||
mythicrun_chart_frame_minimized = {},
|
mythicrun_chart_frame_minimized = {},
|
||||||
mythicrun_chart_frame_ready = {},
|
mythicrun_chart_frame_ready = {},
|
||||||
},
|
},
|
||||||
|
|
||||||
--plugin window positions
|
--plugin window positions
|
||||||
plugin_window_pos = {},
|
plugin_window_pos = {},
|
||||||
|
|
||||||
--run code
|
--run code
|
||||||
run_code = {
|
run_code = {
|
||||||
["on_specchanged"] = "\n-- run when the player changes its spec",
|
["on_specchanged"] = "\n-- run when the player changes its spec",
|
||||||
@@ -1434,7 +1436,7 @@ local default_global_data = {
|
|||||||
["on_entercombat"] = "\n-- this code runs when the player enters in combat",
|
["on_entercombat"] = "\n-- this code runs when the player enters in combat",
|
||||||
["on_groupchange"] = "\n-- this code runs when the player enter or leave a group",
|
["on_groupchange"] = "\n-- this code runs when the player enter or leave a group",
|
||||||
},
|
},
|
||||||
|
|
||||||
--plater integration
|
--plater integration
|
||||||
plater = {
|
plater = {
|
||||||
realtime_dps_enabled = false,
|
realtime_dps_enabled = false,
|
||||||
@@ -1454,12 +1456,12 @@ local default_global_data = {
|
|||||||
damage_taken_color = {1, 1, 0, 1},
|
damage_taken_color = {1, 1, 0, 1},
|
||||||
damage_taken_shadow = true,
|
damage_taken_shadow = true,
|
||||||
damage_taken_anchor = {side = 7, x = 0, y = 0},
|
damage_taken_anchor = {side = 7, x = 0, y = 0},
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
--dungeon information - can be accessed by plugins and third party mods
|
--dungeon information - can be accessed by plugins and third party mods
|
||||||
dungeon_data = {},
|
dungeon_data = {},
|
||||||
|
|
||||||
--raid information - can be accessed by plugins and third party mods
|
--raid information - can be accessed by plugins and third party mods
|
||||||
raid_data = {},
|
raid_data = {},
|
||||||
|
|
||||||
@@ -1481,7 +1483,7 @@ function _detalhes:GetTutorialCVar(key, default)
|
|||||||
if (_detalhes.streamer_config.no_alerts) then
|
if (_detalhes.streamer_config.no_alerts) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
local value = _detalhes.tutorial [key]
|
local value = _detalhes.tutorial [key]
|
||||||
if (value == nil and default) then
|
if (value == nil and default) then
|
||||||
_detalhes.tutorial [key] = default
|
_detalhes.tutorial [key] = default
|
||||||
@@ -1494,13 +1496,13 @@ function _detalhes:SetTutorialCVar (key, value)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function _detalhes:SaveProfileSpecial()
|
function _detalhes:SaveProfileSpecial()
|
||||||
|
|
||||||
--get the current profile
|
--get the current profile
|
||||||
local profile_name = _detalhes:GetCurrentProfileName()
|
local profile_name = _detalhes:GetCurrentProfileName()
|
||||||
local profile = _detalhes:GetProfile (profile_name, true)
|
local profile = _detalhes:GetProfile (profile_name, true)
|
||||||
|
|
||||||
--save default keys
|
--save default keys
|
||||||
for key, _ in pairs(_detalhes.default_profile) do
|
for key, _ in pairs(_detalhes.default_profile) do
|
||||||
|
|
||||||
local current_value = _detalhes_database [key] or _detalhes_global [key] or _detalhes.default_player_data [key] or _detalhes.default_global_data [key]
|
local current_value = _detalhes_database [key] or _detalhes_global [key] or _detalhes.default_player_data [key] or _detalhes.default_global_data [key]
|
||||||
|
|
||||||
@@ -1543,15 +1545,15 @@ end
|
|||||||
|
|
||||||
function _detalhes:UpdateState_CurrentMythicDungeonRun (stillOngoing, segmentID, latestBossAt)
|
function _detalhes:UpdateState_CurrentMythicDungeonRun (stillOngoing, segmentID, latestBossAt)
|
||||||
local savedTable = _detalhes.mythic_dungeon_currentsaved
|
local savedTable = _detalhes.mythic_dungeon_currentsaved
|
||||||
|
|
||||||
if (not stillOngoing) then
|
if (not stillOngoing) then
|
||||||
savedTable.started = false
|
savedTable.started = false
|
||||||
end
|
end
|
||||||
|
|
||||||
if (segmentID) then
|
if (segmentID) then
|
||||||
savedTable.segment_id = segmentID
|
savedTable.segment_id = segmentID
|
||||||
end
|
end
|
||||||
|
|
||||||
if (latestBossAt) then
|
if (latestBossAt) then
|
||||||
savedTable.previous_boss_killed_at = latestBossAt
|
savedTable.previous_boss_killed_at = latestBossAt
|
||||||
end
|
end
|
||||||
@@ -1568,14 +1570,14 @@ function _detalhes:RestoreState_CurrentMythicDungeonRun()
|
|||||||
local mythicLevel = C_ChallengeMode.GetActiveKeystoneInfo()
|
local mythicLevel = C_ChallengeMode.GetActiveKeystoneInfo()
|
||||||
local zoneName, _, _, _, _, _, _, currentZoneID = GetInstanceInfo()
|
local zoneName, _, _, _, _, _, _, currentZoneID = GetInstanceInfo()
|
||||||
local mapID = C_Map.GetBestMapForUnit ("player")
|
local mapID = C_Map.GetBestMapForUnit ("player")
|
||||||
|
|
||||||
if (not mapID) then
|
if (not mapID) then
|
||||||
--print("D! no mapID to restored mythic dungeon state.")
|
--print("D! no mapID to restored mythic dungeon state.")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local ejID = 0
|
local ejID = 0
|
||||||
|
|
||||||
if (mapID) then
|
if (mapID) then
|
||||||
ejID = DetailsFramework.EncounterJournal.EJ_GetInstanceForMap (mapID) or 0
|
ejID = DetailsFramework.EncounterJournal.EJ_GetInstanceForMap (mapID) or 0
|
||||||
end
|
end
|
||||||
@@ -1599,7 +1601,7 @@ function _detalhes:RestoreState_CurrentMythicDungeonRun()
|
|||||||
DetailsMythicPlusFrame.IsDoingMythicDungeon = true
|
DetailsMythicPlusFrame.IsDoingMythicDungeon = true
|
||||||
|
|
||||||
print("D! (debug) mythic dungeon state restored.")
|
print("D! (debug) mythic dungeon state restored.")
|
||||||
|
|
||||||
C_Timer.After(2, function()
|
C_Timer.After(2, function()
|
||||||
_detalhes:SendEvent("COMBAT_MYTHICDUNGEON_START")
|
_detalhes:SendEvent("COMBAT_MYTHICDUNGEON_START")
|
||||||
end)
|
end)
|
||||||
@@ -1610,7 +1612,7 @@ function _detalhes:RestoreState_CurrentMythicDungeonRun()
|
|||||||
else
|
else
|
||||||
print("D! (debug) zone name or zone Id isn't the same:", zoneName, savedTable.dungeon_name, currentZoneID, savedTable.dungeon_zone_id)
|
print("D! (debug) zone name or zone Id isn't the same:", zoneName, savedTable.dungeon_name, currentZoneID, savedTable.dungeon_zone_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
--mythic run is over
|
--mythic run is over
|
||||||
savedTable.started = false
|
savedTable.started = false
|
||||||
else
|
else
|
||||||
@@ -1670,21 +1672,21 @@ local exportProfileBlacklist = {
|
|||||||
function Details:ExportCurrentProfile()
|
function Details:ExportCurrentProfile()
|
||||||
--save the current profile
|
--save the current profile
|
||||||
Details:SaveProfile()
|
Details:SaveProfile()
|
||||||
|
|
||||||
--data saved inside the profile
|
--data saved inside the profile
|
||||||
local profileObject = Details:GetProfile (Details:GetCurrentProfileName())
|
local profileObject = Details:GetProfile (Details:GetCurrentProfileName())
|
||||||
if (not profileObject) then
|
if (not profileObject) then
|
||||||
Details:Msg("fail to get the current profile.")
|
Details:Msg("fail to get the current profile.")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
--data saved individual for each character
|
--data saved individual for each character
|
||||||
local defaultPlayerData = Details.default_player_data
|
local defaultPlayerData = Details.default_player_data
|
||||||
local playerData = {}
|
local playerData = {}
|
||||||
--data saved for the account
|
--data saved for the account
|
||||||
local defaultGlobalData = Details.default_global_data
|
local defaultGlobalData = Details.default_global_data
|
||||||
local globaData = {}
|
local globaData = {}
|
||||||
|
|
||||||
--fill player and global data tables
|
--fill player and global data tables
|
||||||
for key, _ in pairs(defaultPlayerData) do
|
for key, _ in pairs(defaultPlayerData) do
|
||||||
if (not exportProfileBlacklist[key]) then
|
if (not exportProfileBlacklist[key]) then
|
||||||
@@ -1704,7 +1706,7 @@ function Details:ExportCurrentProfile()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local exportedData = {
|
local exportedData = {
|
||||||
profile = profileObject,
|
profile = profileObject,
|
||||||
playerData = playerData,
|
playerData = playerData,
|
||||||
@@ -1722,13 +1724,13 @@ function Details:ImportProfile (profileString, newProfileName)
|
|||||||
Details:Msg("invalid profile name or profile name is too short.") --localize-me
|
Details:Msg("invalid profile name or profile name is too short.") --localize-me
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
profileString = DetailsFramework:Trim (profileString)
|
profileString = DetailsFramework:Trim (profileString)
|
||||||
local currentDataVersion = 1
|
local currentDataVersion = 1
|
||||||
|
|
||||||
local dataTable = Details:DecompressData (profileString, "print")
|
local dataTable = Details:DecompressData (profileString, "print")
|
||||||
if (dataTable) then
|
if (dataTable) then
|
||||||
|
|
||||||
local profileObject = Details:GetProfile (newProfileName, false)
|
local profileObject = Details:GetProfile (newProfileName, false)
|
||||||
if (not profileObject) then
|
if (not profileObject) then
|
||||||
--profile doesn't exists, create new
|
--profile doesn't exists, create new
|
||||||
@@ -1738,20 +1740,20 @@ function Details:ImportProfile (profileString, newProfileName)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local profileData, playerData, globalData, version = dataTable.profile, dataTable.playerData, dataTable.globaData, dataTable.version
|
local profileData, playerData, globalData, version = dataTable.profile, dataTable.playerData, dataTable.globaData, dataTable.version
|
||||||
|
|
||||||
if (version < currentDataVersion) then
|
if (version < currentDataVersion) then
|
||||||
--perform update in the sereived settings
|
--perform update in the sereived settings
|
||||||
end
|
end
|
||||||
|
|
||||||
--character data defaults
|
--character data defaults
|
||||||
local defaultPlayerData = Details.default_player_data
|
local defaultPlayerData = Details.default_player_data
|
||||||
--global data defaults
|
--global data defaults
|
||||||
local defaultGlobalData = Details.default_global_data
|
local defaultGlobalData = Details.default_global_data
|
||||||
--profile defaults
|
--profile defaults
|
||||||
local defaultProfileData = Details.default_profile
|
local defaultProfileData = Details.default_profile
|
||||||
|
|
||||||
--transfer player and global data tables from the profile to details object
|
--transfer player and global data tables from the profile to details object
|
||||||
for key, _ in pairs(defaultPlayerData) do
|
for key, _ in pairs(defaultPlayerData) do
|
||||||
local importedValue = playerData[key]
|
local importedValue = playerData[key]
|
||||||
@@ -1763,7 +1765,7 @@ function Details:ImportProfile (profileString, newProfileName)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
for key, _ in pairs(defaultGlobalData) do
|
for key, _ in pairs(defaultGlobalData) do
|
||||||
local importedValue = globalData[key]
|
local importedValue = globalData[key]
|
||||||
if (importedValue ~= nil) then
|
if (importedValue ~= nil) then
|
||||||
@@ -1774,7 +1776,7 @@ function Details:ImportProfile (profileString, newProfileName)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--transfer data from the imported profile to the new profile object
|
--transfer data from the imported profile to the new profile object
|
||||||
for key, _ in pairs(defaultProfileData) do
|
for key, _ in pairs(defaultProfileData) do
|
||||||
local importedValue = profileData[key]
|
local importedValue = profileData[key]
|
||||||
|
|||||||
@@ -36,6 +36,15 @@ function Details:StartMeUp() --I'll never stop!
|
|||||||
|
|
||||||
self.click_to_report_color = {1, 0.8, 0, 1}
|
self.click_to_report_color = {1, 0.8, 0, 1}
|
||||||
|
|
||||||
|
--death tooltip function, exposed for 3rd party customization
|
||||||
|
--called when the mouse hover over a player line when displaying deaths
|
||||||
|
--the function called receives 4 parameters: instanceObject, lineFrame, combatObject, deathTable
|
||||||
|
--@instance: the details! object of the window showing the deaths
|
||||||
|
--@lineFrame: the frame to setpoint your frame
|
||||||
|
--@combatObject: the combat it self
|
||||||
|
--@deathTable: a table containing all the information about the player's death
|
||||||
|
Details.ShowDeathTooltipFunction = Details.ShowDeathTooltip
|
||||||
|
|
||||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
--initialize
|
--initialize
|
||||||
C_Timer.After(2, function()
|
C_Timer.After(2, function()
|
||||||
|
|||||||
Reference in New Issue
Block a user