diff --git a/Libs/DF/auras.lua b/Libs/DF/auras.lua
index efbca2fb..c5d6b17a 100644
--- a/Libs/DF/auras.lua
+++ b/Libs/DF/auras.lua
@@ -215,7 +215,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
f.OnProfileChanged = on_profile_changed
f.LocTexts = texts
options = options or {}
- self.table.deploy (options, aura_panel_defaultoptions)
+ self.table.deploy(options, aura_panel_defaultoptions)
local f_auto = CreateFrame("frame", "$parent_Automatic", f, "BackdropTemplate")
local f_manual = CreateFrame("frame", "$parent_Manual", f, "BackdropTemplate")
@@ -228,7 +228,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
--check if the texts table is valid and also deploy default values into the table in case some value is nil
texts = (type(texts == "table") and texts) or default_text_for_aura_frame
- DF.table.deploy (texts, default_text_for_aura_frame)
+ DF.table.deploy(texts, default_text_for_aura_frame)
-------------
@@ -815,7 +815,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
local icon = line:CreateTexture("$parentIcon", "overlay")
icon:SetSize(lineHeight - 2, lineHeight - 2)
- local name = line:CreateFontString ("$parentName", "overlay", "GameFontNormal")
+ local name = line:CreateFontString("$parentName", "overlay", "GameFontNormal")
DF:SetFontSize (name, 10)
local remove_button = CreateFrame("button", "$parentRemoveButton", line, "UIPanelCloseButton")
@@ -995,7 +995,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
local icon = line:CreateTexture("$parentIcon", "overlay")
icon:SetSize(scroll_line_height - 2, scroll_line_height - 2)
- local name = line:CreateFontString ("$parentName", "overlay", "GameFontNormal")
+ local name = line:CreateFontString("$parentName", "overlay", "GameFontNormal")
local remove_button = CreateFrame("button", "$parentRemoveButton", line, "UIPanelCloseButton")
remove_button:SetSize(16, 16)
@@ -1085,7 +1085,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
if (text ~= "") then
--check for more than one spellname
if (text:find (";")) then
- for _, spellName in ipairs({strsplit (";", text)}) do
+ for _, spellName in ipairs({strsplit(";", text)}) do
spellName = self:trim (spellName)
local spellID = get_spellID_from_string (spellName)
@@ -1132,7 +1132,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
if (text ~= "") then
--check for more than one spellname
if (text:find (";")) then
- for _, spellName in ipairs({strsplit (";", text)}) do
+ for _, spellName in ipairs({strsplit(";", text)}) do
spellName = self:trim (spellName)
local spellID = get_spellID_from_string (spellName)
diff --git a/Libs/DF/fw.lua b/Libs/DF/fw.lua
index 021cca1a..6c92c65f 100644
--- a/Libs/DF/fw.lua
+++ b/Libs/DF/fw.lua
@@ -107,15 +107,6 @@ function DF.IsShadowlandsWow()
end
end
-function DF.GetContainerItemInfo(containerIndex, slotIndex)
- if (DF.IsDragonflightAndBeyond()) then
- local itemInfo = C_Container.GetContainerItemInfo(containerIndex, slotIndex)
- return itemInfo.iconFileID, itemInfo.stackCount, itemInfo.isLocked, itemInfo.quality, itemInfo.isReadable, itemInfo.hasLoot, itemInfo.hyperlink, itemInfo.isFiltered, itemInfo.hasNoValue, itemInfo.itemID, itemInfo.isBound
- else
- return GetContainerItemInfo(containerIndex, slotIndex)
- end
-end
-
local roleBySpecTextureName = {
DruidBalance = "DAMAGER",
DruidFeralCombat = "DAMAGER",
diff --git a/Libs/DF/iteminfo.lua b/Libs/DF/iteminfo.lua
new file mode 100644
index 00000000..0cd4b9c0
--- /dev/null
+++ b/Libs/DF/iteminfo.lua
@@ -0,0 +1,27 @@
+
+local detailsFramework = _G["DetailsFramework"]
+if (not detailsFramework or not DetailsFrameworkCanLoad) then
+ return
+end
+
+--namespace
+detailsFramework.Items = {}
+
+local containerAPIVersion = 1
+if (detailsFramework.IsDragonflightAndBeyond()) then
+ containerAPIVersion = 2
+end
+
+function detailsFramework.Items.GetContainerItemInfo(containerIndex, slotIndex)
+ if (containerAPIVersion == 2) then
+ local itemInfo = C_Container.GetContainerItemInfo(containerIndex, slotIndex)
+ return itemInfo.iconFileID, itemInfo.stackCount, itemInfo.isLocked, itemInfo.quality, itemInfo.isReadable, itemInfo.hasLoot, itemInfo.hyperlink, itemInfo.isFiltered, itemInfo.hasNoValue, itemInfo.itemID, itemInfo.isBound
+ else
+ return GetContainerItemInfo(containerIndex, slotIndex)
+ end
+end
+
+function detailsFramework.Items.IsItemSoulbound(containerIndex, slotIndex)
+ local bIsBound = select(11, detailsFramework.Items.GetContainerItemInfo(containerIndex, slotIndex))
+ return bIsBound
+end
diff --git a/Libs/DF/load.xml b/Libs/DF/load.xml
index 54d7feaf..404ef22b 100644
--- a/Libs/DF/load.xml
+++ b/Libs/DF/load.xml
@@ -4,6 +4,7 @@
+
diff --git a/Libs/DF/mixins.lua b/Libs/DF/mixins.lua
index 5355fa51..92f02770 100644
--- a/Libs/DF/mixins.lua
+++ b/Libs/DF/mixins.lua
@@ -253,8 +253,8 @@ detailsFramework.OptionsFunctions = {
BuildOptionsTable = function(self, defaultOptions, userOptions)
self.options = self.options or {}
- detailsFramework.table.deploy (self.options, userOptions or {})
- detailsFramework.table.deploy (self.options, defaultOptions or {})
+ detailsFramework.table.deploy(self.options, userOptions or {})
+ detailsFramework.table.deploy(self.options, defaultOptions or {})
end
}
diff --git a/Libs/DF/normal_bar.lua b/Libs/DF/normal_bar.lua
index 4678cdf5..ae919c4d 100644
--- a/Libs/DF/normal_bar.lua
+++ b/Libs/DF/normal_bar.lua
@@ -738,12 +738,12 @@ local build_statusbar = function(self)
self.sparktimer:SetBlendMode("ADD")
self.sparktimer:Hide()
- self.lefttext = self:CreateFontString ("$parent_TextLeft", "OVERLAY", "GameFontHighlight")
+ self.lefttext = self:CreateFontString("$parent_TextLeft", "OVERLAY", "GameFontHighlight")
self.lefttext:SetJustifyH("LEFT")
self.lefttext:SetPoint("LEFT", self.icontexture, "RIGHT", 3, 0)
DF:SetFontSize (self.lefttext, 10)
- self.righttext = self:CreateFontString ("$parent_TextRight", "OVERLAY", "GameFontHighlight")
+ self.righttext = self:CreateFontString("$parent_TextRight", "OVERLAY", "GameFontHighlight")
self.righttext:SetJustifyH("LEFT")
DF:SetFontSize (self.righttext, 10)
self.righttext:SetPoint("RIGHT", self, "RIGHT", -3, 0)
diff --git a/Libs/DF/panel.lua b/Libs/DF/panel.lua
index 30fc9d88..fb6a954e 100644
--- a/Libs/DF/panel.lua
+++ b/Libs/DF/panel.lua
@@ -1,17 +1,17 @@
-local DF = _G ["DetailsFramework"]
-if (not DF or not DetailsFrameworkCanLoad) then
+local detailsFramework = _G ["DetailsFramework"]
+if (not detailsFramework or not DetailsFrameworkCanLoad) then
return
end
local _
--lua locals
-local _rawset = rawset --lua local
-local _rawget = rawget --lua local
-local _setmetatable = setmetatable --lua local
-local _unpack = unpack --lua local
+local rawset = rawset --lua local
+local rawget = rawget --lua local
+local setmetatable = setmetatable --lua local
+local unpack = table.unpack or unpack --lua local
local type = type --lua local
-local _math_floor = math.floor --lua local
+local floor = math.floor --lua local
local loadstring = loadstring --lua local
local IS_WOW_PROJECT_MAINLINE = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE
@@ -36,18 +36,18 @@ local APIFrameFunctions
do
local metaPrototype = {
WidgetType = "panel",
- SetHook = DF.SetHook,
- RunHooksForWidget = DF.RunHooksForWidget,
+ SetHook = detailsFramework.SetHook,
+ RunHooksForWidget = detailsFramework.RunHooksForWidget,
- dversion = DF.dversion,
+ dversion = detailsFramework.dversion,
}
--check if there's a metaPrototype already existing
- if (_G[DF.GlobalWidgetControlNames["panel"]]) then
+ if (_G[detailsFramework.GlobalWidgetControlNames["panel"]]) then
--get the already existing metaPrototype
- local oldMetaPrototype = _G[DF.GlobalWidgetControlNames ["panel"]]
+ local oldMetaPrototype = _G[detailsFramework.GlobalWidgetControlNames ["panel"]]
--check if is older
- if ( (not oldMetaPrototype.dversion) or (oldMetaPrototype.dversion < DF.dversion) ) then
+ if ( (not oldMetaPrototype.dversion) or (oldMetaPrototype.dversion < detailsFramework.dversion) ) then
--the version is older them the currently loading one
--copy the new values into the old metatable
for funcName, _ in pairs(metaPrototype) do
@@ -56,11 +56,11 @@ do
end
else
--first time loading the framework
- _G[DF.GlobalWidgetControlNames ["panel"]] = metaPrototype
+ _G[detailsFramework.GlobalWidgetControlNames ["panel"]] = metaPrototype
end
end
-local PanelMetaFunctions = _G[DF.GlobalWidgetControlNames ["panel"]]
+local PanelMetaFunctions = _G[detailsFramework.GlobalWidgetControlNames ["panel"]]
--default options for the frame layout
local default_framelayout_options = {
@@ -81,7 +81,7 @@ local default_framelayout_options = {
}
--mixin for frame layout
-DF.LayoutFrame = {
+detailsFramework.LayoutFrame = {
AnchorTo = function(self, anchor, point, x, y)
if (point == "top") then
self:ClearAllPoints()
@@ -102,13 +102,12 @@ DF.LayoutFrame = {
end,
ArrangeFrames = function(self, frameList, options)
-
if (not frameList) then
frameList = {self:GetChildren()}
end
options = options or {}
- DF.table.deploy (options, default_framelayout_options)
+ detailsFramework.table.deploy(options, default_framelayout_options)
local breakLine = options.amount_per_line + 1
local currentX, currentY = options.start_x, options.start_y
@@ -116,11 +115,11 @@ DF.LayoutFrame = {
local anchorPoint = options.anchor_point
local anchorAt = options.anchor_relative
local latestFrame = self
- local firstRowFrame = frameList [1]
+ local firstRowFrame = frameList[1]
if (options.is_vertical) then
for i = 1, #frameList do
- local thisFrame = frameList [i]
+ local thisFrame = frameList[i]
if (options.break_if_hidden and not thisFrame:IsShown()) then
break
end
@@ -199,13 +198,11 @@ DF.LayoutFrame = {
end
end
end
-
}
------------------------------------------------------------------------------------------------------------
--metatables
-
PanelMetaFunctions.__call = function(_table, value)
--nothing to do
return true
@@ -213,7 +210,6 @@ DF.LayoutFrame = {
------------------------------------------------------------------------------------------------------------
--members
-
--tooltip
local gmember_tooltip = function(_object)
return _object:GetTooltip()
@@ -240,7 +236,7 @@ DF.LayoutFrame = {
end
--locked
local gmember_locked = function(_object)
- return _rawget (_object, "is_locked")
+ return rawget (_object, "is_locked")
end
PanelMetaFunctions.GetMembers = PanelMetaFunctions.GetMembers or {}
@@ -252,22 +248,20 @@ DF.LayoutFrame = {
PanelMetaFunctions.GetMembers ["height"] = gmember_height
PanelMetaFunctions.GetMembers ["locked"] = gmember_locked
- PanelMetaFunctions.__index = function(_table, _member_requested)
-
- local func = PanelMetaFunctions.GetMembers [_member_requested]
+ PanelMetaFunctions.__index = function(object, key)
+ local func = PanelMetaFunctions.GetMembers[key]
if (func) then
- return func (_table, _member_requested)
+ return func(object, key)
end
- local fromMe = _rawget (_table, _member_requested)
+ local fromMe = rawget(object, key)
if (fromMe) then
return fromMe
end
- return PanelMetaFunctions [_member_requested]
+ return PanelMetaFunctions[key]
end
-
--tooltip
local smember_tooltip = function(_object, _value)
return _object:SetTooltip (_value)
@@ -290,7 +284,7 @@ DF.LayoutFrame = {
end
--backdrop color
local smember_color = function(_object, _value)
- local _value1, _value2, _value3, _value4 = DF:ParseColors(_value)
+ local _value1, _value2, _value3, _value4 = detailsFramework:ParseColors(_value)
return _object:SetBackdropColor(_value1, _value2, _value3, _value4)
end
--frame width
@@ -306,10 +300,10 @@ DF.LayoutFrame = {
local smember_locked = function(_object, _value)
if (_value) then
_object.frame:SetMovable(false)
- return _rawset (_object, "is_locked", true)
+ return rawset (_object, "is_locked", true)
else
_object.frame:SetMovable(true)
- _rawset (_object, "is_locked", false)
+ rawset (_object, "is_locked", false)
return
end
end
@@ -321,7 +315,7 @@ DF.LayoutFrame = {
--close with right button
local smember_right_close = function(_object, _value)
- return _rawset (_object, "rightButtonClose", _value)
+ return rawset (_object, "rightButtonClose", _value)
end
PanelMetaFunctions.SetMembers = PanelMetaFunctions.SetMembers or {}
@@ -340,7 +334,7 @@ DF.LayoutFrame = {
if (func) then
return func (_table, _value)
else
- return _rawset (_table, _key, _value)
+ return rawset (_table, _key, _value)
end
end
@@ -348,20 +342,22 @@ DF.LayoutFrame = {
--methods
--right click to close
- function PanelMetaFunctions:CreateRightClickLabel (textType, w, h, close_text)
+ function PanelMetaFunctions:CreateRightClickLabel(textType, width, height, showCloseText)
local text
- w = w or 20
- h = h or 20
+ width = width or 20
+ height = height or 20
- if (close_text) then
- text = close_text
+ if (showCloseText) then
+ text = showCloseText
else
if (textType) then
textType = string.lower (textType)
if (textType == "short") then
text = "close window"
+
elseif (textType == "medium") then
text = "close window"
+
elseif (textType == "large") then
text = "close window"
end
@@ -370,22 +366,21 @@ DF.LayoutFrame = {
end
end
- return DF:NewLabel(self, _, "$parentRightMouseToClose", nil, "|TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:"..w..":"..h..":0:1:512:512:8:70:328:409|t " .. text)
+ return detailsFramework:NewLabel(self, _, "$parentRightMouseToClose", nil, "|TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:" .. width .. ":" .. height .. ":0:1:512:512:8:70:328:409|t " .. text)
end
--show & hide
function PanelMetaFunctions:Show()
self.frame:Show()
-
end
+
function PanelMetaFunctions:Hide()
self.frame:Hide()
-
end
-- setpoint
function PanelMetaFunctions:SetPoint(v1, v2, v3, v4, v5)
- v1, v2, v3, v4, v5 = DF:CheckPoints (v1, v2, v3, v4, v5, self)
+ v1, v2, v3, v4, v5 = detailsFramework:CheckPoints (v1, v2, v3, v4, v5, self)
if (not v1) then
print("Invalid parameter for SetPoint")
return
@@ -441,7 +436,7 @@ DF.LayoutFrame = {
if (arg2) then
self.frame:SetBackdropColor(color, arg2, arg3, arg4 or 1)
else
- local _value1, _value2, _value3, _value4 = DF:ParseColors(color)
+ local _value1, _value2, _value3, _value4 = detailsFramework:ParseColors(color)
self.frame:SetBackdropColor(_value1, _value2, _value3, _value4)
end
end
@@ -451,20 +446,20 @@ DF.LayoutFrame = {
if (arg2) then
return self.frame:SetBackdropBorderColor(color, arg2, arg3, arg4)
end
- local _value1, _value2, _value3, _value4 = DF:ParseColors(color)
+ local _value1, _value2, _value3, _value4 = detailsFramework:ParseColors(color)
self.frame:SetBackdropBorderColor(_value1, _value2, _value3, _value4)
end
-- tooltip
function PanelMetaFunctions:SetTooltip (tooltip)
if (tooltip) then
- return _rawset (self, "have_tooltip", tooltip)
+ return rawset (self, "have_tooltip", tooltip)
else
- return _rawset (self, "have_tooltip", nil)
+ return rawset (self, "have_tooltip", nil)
end
end
function PanelMetaFunctions:GetTooltip()
- return _rawget (self, "have_tooltip")
+ return rawget (self, "have_tooltip")
end
-- frame levels
@@ -590,15 +585,15 @@ DF.LayoutFrame = {
------------------------------------------------------------------------------------------------------------
--object constructor
-function DF:CreatePanel (parent, w, h, backdrop, backdropcolor, bordercolor, member, name)
- return DF:NewPanel(parent, parent, name, member, w, h, backdrop, backdropcolor, bordercolor)
+function detailsFramework:CreatePanel (parent, w, h, backdrop, backdropcolor, bordercolor, member, name)
+ return detailsFramework:NewPanel(parent, parent, name, member, w, h, backdrop, backdropcolor, bordercolor)
end
-function DF:NewPanel(parent, container, name, member, w, h, backdrop, backdropcolor, bordercolor)
+function detailsFramework:NewPanel(parent, container, name, member, w, h, backdrop, backdropcolor, bordercolor)
if (not name) then
- name = "DetailsFrameworkPanelNumber" .. DF.PanelCounter
- DF.PanelCounter = DF.PanelCounter + 1
+ name = "DetailsFrameworkPanelNumber" .. detailsFramework.PanelCounter
+ detailsFramework.PanelCounter = detailsFramework.PanelCounter + 1
elseif (not parent) then
parent = UIParent
@@ -675,7 +670,7 @@ function DF:NewPanel(parent, container, name, member, w, h, backdrop, backdropco
PanelObject.frame:SetScript("OnMouseDown", OnMouseDown)
PanelObject.frame:SetScript("OnMouseUp", OnMouseUp)
- _setmetatable(PanelObject, PanelMetaFunctions)
+ setmetatable(PanelObject, PanelMetaFunctions)
if (backdrop) then
PanelObject:SetBackdrop(backdrop)
@@ -712,7 +707,7 @@ end
local add_row = function(self, t, need_update)
local index = #self.rows+1
- local thisrow = DF:NewPanel(self, self, "$parentHeader_" .. self._name .. index, nil, 1, 20)
+ local thisrow = detailsFramework:NewPanel(self, self, "$parentHeader_" .. self._name .. index, nil, 1, 20)
thisrow.backdrop = {bgFile = [[Interface\Tooltips\UI-Tooltip-Background]]}
thisrow.color = {.3, .3, .3, .9}
thisrow.type = t.type
@@ -727,7 +722,7 @@ local add_row = function(self, t, need_update)
thisrow.onenter = t.onenter
thisrow.onleave = t.onleave
- local text = DF:NewLabel(thisrow, nil, self._name .. "$parentLabel" .. index, "text")
+ local text = detailsFramework:NewLabel(thisrow, nil, self._name .. "$parentLabel" .. index, "text")
text:SetPoint("left", thisrow, "left", 2, 0)
text:SetText(t.name)
@@ -790,7 +785,7 @@ local align_rows = function(self)
text:SetPoint("left", line, "left", self._anchors [#self._anchors], 0)
text:SetWidth(row.width)
- DF:SetFontSize (text, row.textsize or 10)
+ detailsFramework:SetFontSize (text, row.textsize or 10)
text:SetJustifyH(row.textalign or "left")
end
elseif (rowType == "entry") then
@@ -960,7 +955,7 @@ local update_rows = function(self, updated_rows)
--
widget.text:SetText(t.name)
- DF:SetFontSize (widget.text, raw.textsize or 10)
+ detailsFramework:SetFontSize (widget.text, raw.textsize or 10)
widget.text:SetJustifyH(raw.textalign or "left")
end
end
@@ -1024,13 +1019,13 @@ end
local create_panel_text = function(self, row)
row.text_total = row.text_total + 1
- local text = DF:NewLabel(row, nil, self._name .. "$parentLabel" .. row.text_total, "text" .. row.text_total)
+ local text = detailsFramework:NewLabel(row, nil, self._name .. "$parentLabel" .. row.text_total, "text" .. row.text_total)
tinsert(row.text_available, text)
end
local create_panel_entry = function(self, row)
row.entry_total = row.entry_total + 1
- local editbox = DF:NewTextEntry(row, nil, "$parentEntry" .. row.entry_total, "entry", 120, 20)
+ local editbox = detailsFramework:NewTextEntry(row, nil, "$parentEntry" .. row.entry_total, "entry", 120, 20)
editbox.align = "left"
editbox:SetHook("OnEnterPressed", function()
@@ -1053,7 +1048,7 @@ local create_panel_entry = function(self, row)
editbox.editbox.current_bordercolor = {1, 1, 1, 0.1}
- editbox:SetTemplate(DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
+ editbox:SetTemplate(detailsFramework:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
editbox:SetBackdropColor(.2, .2, .2, 0.7)
tinsert(row.entry_available, editbox)
@@ -1063,20 +1058,20 @@ local create_panel_checkbox = function(self, row)
--row.checkbox_available
row.checkbox_total = row.checkbox_total + 1
- local switch = DF:NewSwitch (row, nil, "$parentCheckBox" .. row.checkbox_total, nil, 20, 20, nil, nil, false)
+ local switch = detailsFramework:NewSwitch (row, nil, "$parentCheckBox" .. row.checkbox_total, nil, 20, 20, nil, nil, false)
switch:SetAsCheckBox()
- switch:SetTemplate(DF:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
+ switch:SetTemplate(detailsFramework:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
tinsert(row.checkbox_available, switch)
end
local create_panel_button = function(self, row)
row.button_total = row.button_total + 1
- local button = DF:NewButton(row, nil, "$parentButton" .. row.button_total, "button" .. row.button_total, 120, 20)
+ local button = detailsFramework:NewButton(row, nil, "$parentButton" .. row.button_total, "button" .. row.button_total, 120, 20)
--create icon and the text
- local icon = DF:NewImage (button, nil, 20, 20)
- local text = DF:NewLabel(button)
+ local icon = detailsFramework:NewImage (button, nil, 20, 20)
+ local text = detailsFramework:NewLabel(button)
button._icon = icon
button._text = text
@@ -1094,17 +1089,17 @@ end
local create_panel_icon = function(self, row)
row.icon_total = row.icon_total + 1
- local iconbutton = DF:NewButton(row, nil, "$parentIconButton" .. row.icon_total, "iconbutton", 22, 20)
+ local iconbutton = detailsFramework:NewButton(row, nil, "$parentIconButton" .. row.icon_total, "iconbutton", 22, 20)
iconbutton:SetHook("OnEnter", button_on_enter)
iconbutton:SetHook("OnLeave", button_on_leave)
iconbutton:SetHook("OnMouseUp", function()
- DF:IconPick (icon_onclick, true, iconbutton)
+ detailsFramework:IconPick (icon_onclick, true, iconbutton)
return true
end)
- local icon = DF:NewImage (iconbutton, nil, 20, 20, "artwork", nil, "_icon", "$parentIcon" .. row.icon_total)
+ local icon = detailsFramework:NewImage (iconbutton, nil, 20, 20, "artwork", nil, "_icon", "$parentIcon" .. row.icon_total)
iconbutton._icon = icon
icon:SetPoint("center", iconbutton, "center", 0, 0)
@@ -1114,7 +1109,7 @@ end
local create_panel_texture = function(self, row)
row.texture_total = row.texture_total + 1
- local texture = DF:NewImage (row, nil, 20, 20, "artwork", nil, "_icon" .. row.texture_total, "$parentIcon" .. row.texture_total)
+ local texture = detailsFramework:NewImage (row, nil, 20, 20, "artwork", nil, "_icon" .. row.texture_total, "$parentIcon" .. row.texture_total)
tinsert(row.texture_available, texture)
end
@@ -1145,12 +1140,12 @@ end
-- ~fillpanel
--alias
-function DF:CreateFillPanel(parent, rows, w, h, total_lines, fill_row, autowidth, options, member, name)
- return DF:NewFillPanel(parent, rows, name, member, w, h, total_lines, fill_row, autowidth, options)
+function detailsFramework:CreateFillPanel(parent, rows, w, h, total_lines, fill_row, autowidth, options, member, name)
+ return detailsFramework:NewFillPanel(parent, rows, name, member, w, h, total_lines, fill_row, autowidth, options)
end
-function DF:NewFillPanel(parent, rows, name, member, w, h, total_lines, fill_row, autowidth, options)
- local panel = DF:NewPanel(parent, parent, name, member, w, h)
+function detailsFramework:NewFillPanel(parent, rows, name, member, w, h, total_lines, fill_row, autowidth, options)
+ local panel = detailsFramework:NewPanel(parent, parent, name, member, w, h)
panel.backdrop = nil
options = options or {rowheight = 20}
@@ -1308,7 +1303,7 @@ function DF:NewFillPanel(parent, rows, name, member, w, h, total_lines, fill_row
local color = results [index].color
if (color) then
- local r, g, b, a = DF:ParseColors(color)
+ local r, g, b, a = detailsFramework:ParseColors(color)
iconwidget._icon:SetVertexColor(r, g, b, a)
else
iconwidget._icon:SetVertexColor(1, 1, 1, 1)
@@ -1343,7 +1338,7 @@ function DF:NewFillPanel(parent, rows, name, member, w, h, total_lines, fill_row
local color = results [index].color
if (color) then
- local r, g, b, a = DF:ParseColors(color)
+ local r, g, b, a = detailsFramework:ParseColors(color)
texturewidget:SetVertexColor(r, g, b, a)
else
texturewidget:SetVertexColor(1, 1, 1, 1)
@@ -1390,7 +1385,7 @@ function DF:NewFillPanel(parent, rows, name, member, w, h, total_lines, fill_row
panel.scrollframe = scrollframe
scrollframe.lines = {}
- DF:ReskinSlider(scrollframe)
+ detailsFramework:ReskinSlider(scrollframe)
--create lines
function panel:UpdateRowAmount()
@@ -1460,7 +1455,7 @@ local color_pick_func_cancel = function()
ColorPickerFrame:dcallback (r, g, b, a, ColorPickerFrame.dframe)
end
-function DF:ColorPick (frame, r, g, b, alpha, callback)
+function detailsFramework:ColorPick (frame, r, g, b, alpha, callback)
ColorPickerFrame:ClearAllPoints()
ColorPickerFrame:SetPoint("bottomleft", frame, "topright", 0, 0)
@@ -1484,133 +1479,133 @@ function DF:ColorPick (frame, r, g, b, alpha, callback)
end
------------icon pick
-function DF:IconPick (callback, close_when_select, param1, param2)
+function detailsFramework:IconPick (callback, close_when_select, param1, param2)
- if (not DF.IconPickFrame) then
+ if (not detailsFramework.IconPickFrame) then
local string_lower = string.lower
- DF.IconPickFrame = CreateFrame("frame", "DetailsFrameworkIconPickFrame", UIParent, "BackdropTemplate")
+ detailsFramework.IconPickFrame = CreateFrame("frame", "DetailsFrameworkIconPickFrame", UIParent, "BackdropTemplate")
tinsert(UISpecialFrames, "DetailsFrameworkIconPickFrame")
- DF.IconPickFrame:SetFrameStrata("FULLSCREEN")
+ detailsFramework.IconPickFrame:SetFrameStrata("FULLSCREEN")
- DF.IconPickFrame:SetPoint("center", UIParent, "center")
- DF.IconPickFrame:SetWidth(416)
- DF.IconPickFrame:SetHeight(350)
- DF.IconPickFrame:EnableMouse(true)
- DF.IconPickFrame:SetMovable(true)
+ detailsFramework.IconPickFrame:SetPoint("center", UIParent, "center")
+ detailsFramework.IconPickFrame:SetWidth(416)
+ detailsFramework.IconPickFrame:SetHeight(350)
+ detailsFramework.IconPickFrame:EnableMouse(true)
+ detailsFramework.IconPickFrame:SetMovable(true)
- DF:CreateTitleBar (DF.IconPickFrame, "Details! Framework Icon Picker")
+ detailsFramework:CreateTitleBar (detailsFramework.IconPickFrame, "Details! Framework Icon Picker")
- DF.IconPickFrame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
- DF.IconPickFrame:SetBackdropBorderColor(0, 0, 0)
- DF.IconPickFrame:SetBackdropColor(24/255, 24/255, 24/255, .8)
- DF.IconPickFrame:SetFrameLevel(5000)
+ detailsFramework.IconPickFrame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
+ detailsFramework.IconPickFrame:SetBackdropBorderColor(0, 0, 0)
+ detailsFramework.IconPickFrame:SetBackdropColor(24/255, 24/255, 24/255, .8)
+ detailsFramework.IconPickFrame:SetFrameLevel(5000)
- DF.IconPickFrame:SetScript("OnMouseDown", function(self)
+ detailsFramework.IconPickFrame:SetScript("OnMouseDown", function(self)
if (not self.isMoving) then
- DF.IconPickFrame:StartMoving()
+ detailsFramework.IconPickFrame:StartMoving()
self.isMoving = true
end
end)
- DF.IconPickFrame:SetScript("OnMouseUp", function(self)
+ detailsFramework.IconPickFrame:SetScript("OnMouseUp", function(self)
if (self.isMoving) then
- DF.IconPickFrame:StopMovingOrSizing()
+ detailsFramework.IconPickFrame:StopMovingOrSizing()
self.isMoving = nil
end
end)
- DF.IconPickFrame.emptyFunction = function() end
- DF.IconPickFrame.callback = DF.IconPickFrame.emptyFunction
+ detailsFramework.IconPickFrame.emptyFunction = function() end
+ detailsFramework.IconPickFrame.callback = detailsFramework.IconPickFrame.emptyFunction
- DF.IconPickFrame.preview = CreateFrame("frame", nil, UIParent, "BackdropTemplate")
- DF.IconPickFrame.preview:SetFrameStrata("tooltip")
- DF.IconPickFrame.preview:SetFrameLevel(6001)
- DF.IconPickFrame.preview:SetSize(76, 76)
+ detailsFramework.IconPickFrame.preview = CreateFrame("frame", nil, UIParent, "BackdropTemplate")
+ detailsFramework.IconPickFrame.preview:SetFrameStrata("tooltip")
+ detailsFramework.IconPickFrame.preview:SetFrameLevel(6001)
+ detailsFramework.IconPickFrame.preview:SetSize(76, 76)
- local preview_image_bg = DF:NewImage (DF.IconPickFrame.preview, nil, 76, 76)
+ local preview_image_bg = detailsFramework:NewImage (detailsFramework.IconPickFrame.preview, nil, 76, 76)
preview_image_bg:SetDrawLayer ("background", 0)
- preview_image_bg:SetAllPoints(DF.IconPickFrame.preview)
+ preview_image_bg:SetAllPoints(detailsFramework.IconPickFrame.preview)
preview_image_bg:SetColorTexture (0, 0, 0)
- local preview_image = DF:NewImage (DF.IconPickFrame.preview, nil, 76, 76)
- preview_image:SetAllPoints(DF.IconPickFrame.preview)
+ local preview_image = detailsFramework:NewImage (detailsFramework.IconPickFrame.preview, nil, 76, 76)
+ preview_image:SetAllPoints(detailsFramework.IconPickFrame.preview)
- DF.IconPickFrame.preview.icon = preview_image
- DF.IconPickFrame.preview:Hide()
+ detailsFramework.IconPickFrame.preview.icon = preview_image
+ detailsFramework.IconPickFrame.preview:Hide()
--serach
- DF.IconPickFrame.searchLabel = DF:NewLabel(DF.IconPickFrame, nil, "$parentSearchBoxLabel", nil, "Search:")
- DF.IconPickFrame.searchLabel:SetPoint("topleft", DF.IconPickFrame, "topleft", 12, -36)
- DF.IconPickFrame.searchLabel:SetTemplate(DF:GetTemplate("font", "ORANGE_FONT_TEMPLATE"))
- DF.IconPickFrame.searchLabel.fontsize = 12
+ detailsFramework.IconPickFrame.searchLabel = detailsFramework:NewLabel(detailsFramework.IconPickFrame, nil, "$parentSearchBoxLabel", nil, "Search:")
+ detailsFramework.IconPickFrame.searchLabel:SetPoint("topleft", detailsFramework.IconPickFrame, "topleft", 12, -36)
+ detailsFramework.IconPickFrame.searchLabel:SetTemplate(detailsFramework:GetTemplate("font", "ORANGE_FONT_TEMPLATE"))
+ detailsFramework.IconPickFrame.searchLabel.fontsize = 12
- DF.IconPickFrame.search = DF:NewTextEntry(DF.IconPickFrame, nil, "$parentSearchBox", nil, 140, 20)
- DF.IconPickFrame.search:SetPoint("left", DF.IconPickFrame.searchLabel, "right", 2, 0)
- DF.IconPickFrame.search:SetTemplate(DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
+ detailsFramework.IconPickFrame.search = detailsFramework:NewTextEntry(detailsFramework.IconPickFrame, nil, "$parentSearchBox", nil, 140, 20)
+ detailsFramework.IconPickFrame.search:SetPoint("left", detailsFramework.IconPickFrame.searchLabel, "right", 2, 0)
+ detailsFramework.IconPickFrame.search:SetTemplate(detailsFramework:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
- DF.IconPickFrame.search:SetHook("OnTextChanged", function()
- DF.IconPickFrame.searching = DF.IconPickFrame.search:GetText()
- if (DF.IconPickFrame.searching == "") then
- DF.IconPickFrameScroll:Show()
- DF.IconPickFrame.searching = nil
- DF.IconPickFrameScroll.RefreshIcons()
+ detailsFramework.IconPickFrame.search:SetHook("OnTextChanged", function()
+ detailsFramework.IconPickFrame.searching = detailsFramework.IconPickFrame.search:GetText()
+ if (detailsFramework.IconPickFrame.searching == "") then
+ detailsFramework.IconPickFrameScroll:Show()
+ detailsFramework.IconPickFrame.searching = nil
+ detailsFramework.IconPickFrameScroll.RefreshIcons()
else
- DF.IconPickFrameScroll:Hide()
- FauxScrollFrame_SetOffset (DF.IconPickFrame, 1)
- DF.IconPickFrame.last_filter_index = 1
- DF.IconPickFrameScroll.RefreshIcons()
+ detailsFramework.IconPickFrameScroll:Hide()
+ FauxScrollFrame_SetOffset (detailsFramework.IconPickFrame, 1)
+ detailsFramework.IconPickFrame.last_filter_index = 1
+ detailsFramework.IconPickFrameScroll.RefreshIcons()
end
end)
--manually enter the icon path
- DF.IconPickFrame.customIcon = DF:CreateLabel(DF.IconPickFrame, "Icon Path:", DF:GetTemplate("font", "ORANGE_FONT_TEMPLATE"))
- DF.IconPickFrame.customIcon:SetPoint("bottomleft", DF.IconPickFrame, "bottomleft", 12, 16)
- DF.IconPickFrame.customIcon.fontsize = 12
+ detailsFramework.IconPickFrame.customIcon = detailsFramework:CreateLabel(detailsFramework.IconPickFrame, "Icon Path:", detailsFramework:GetTemplate("font", "ORANGE_FONT_TEMPLATE"))
+ detailsFramework.IconPickFrame.customIcon:SetPoint("bottomleft", detailsFramework.IconPickFrame, "bottomleft", 12, 16)
+ detailsFramework.IconPickFrame.customIcon.fontsize = 12
- DF.IconPickFrame.customIconEntry = DF:CreateTextEntry (DF.IconPickFrame, function()end, 200, 20, "CustomIconEntry", _, _, DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
- DF.IconPickFrame.customIconEntry:SetPoint("left", DF.IconPickFrame.customIcon, "right", 2, 0)
+ detailsFramework.IconPickFrame.customIconEntry = detailsFramework:CreateTextEntry (detailsFramework.IconPickFrame, function()end, 200, 20, "CustomIconEntry", _, _, detailsFramework:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
+ detailsFramework.IconPickFrame.customIconEntry:SetPoint("left", detailsFramework.IconPickFrame.customIcon, "right", 2, 0)
- DF.IconPickFrame.customIconEntry:SetHook("OnTextChanged", function()
- DF.IconPickFrame.preview:SetPoint("bottom", DF.IconPickFrame.customIconEntry.widget, "top", 0, 2)
- DF.IconPickFrame.preview.icon:SetTexture(DF.IconPickFrame.customIconEntry:GetText())
- DF.IconPickFrame.preview:Show()
+ detailsFramework.IconPickFrame.customIconEntry:SetHook("OnTextChanged", function()
+ detailsFramework.IconPickFrame.preview:SetPoint("bottom", detailsFramework.IconPickFrame.customIconEntry.widget, "top", 0, 2)
+ detailsFramework.IconPickFrame.preview.icon:SetTexture(detailsFramework.IconPickFrame.customIconEntry:GetText())
+ detailsFramework.IconPickFrame.preview:Show()
end)
- DF.IconPickFrame.customIconEntry:SetHook("OnEnter", function()
- DF.IconPickFrame.preview:SetPoint("bottom", DF.IconPickFrame.customIconEntry.widget, "top", 0, 2)
- DF.IconPickFrame.preview.icon:SetTexture(DF.IconPickFrame.customIconEntry:GetText())
- DF.IconPickFrame.preview:Show()
+ detailsFramework.IconPickFrame.customIconEntry:SetHook("OnEnter", function()
+ detailsFramework.IconPickFrame.preview:SetPoint("bottom", detailsFramework.IconPickFrame.customIconEntry.widget, "top", 0, 2)
+ detailsFramework.IconPickFrame.preview.icon:SetTexture(detailsFramework.IconPickFrame.customIconEntry:GetText())
+ detailsFramework.IconPickFrame.preview:Show()
end)
--close button
- local close_button = CreateFrame("button", nil, DF.IconPickFrame, "UIPanelCloseButton", "BackdropTemplate")
+ local close_button = CreateFrame("button", nil, detailsFramework.IconPickFrame, "UIPanelCloseButton", "BackdropTemplate")
close_button:SetWidth(32)
close_button:SetHeight(32)
- close_button:SetPoint("TOPRIGHT", DF.IconPickFrame, "TOPRIGHT", -8, -7)
+ close_button:SetPoint("TOPRIGHT", detailsFramework.IconPickFrame, "TOPRIGHT", -8, -7)
close_button:SetFrameLevel(close_button:GetFrameLevel()+2)
close_button:SetAlpha(0) --just hide, it is used below
--accept custom icon button
local accept_custom_icon = function()
- local path = DF.IconPickFrame.customIconEntry:GetText()
+ local path = detailsFramework.IconPickFrame.customIconEntry:GetText()
- DF:QuickDispatch (DF.IconPickFrame.callback, path, DF.IconPickFrame.param1, DF.IconPickFrame.param2)
+ detailsFramework:QuickDispatch (detailsFramework.IconPickFrame.callback, path, detailsFramework.IconPickFrame.param1, detailsFramework.IconPickFrame.param2)
- if (DF.IconPickFrame.click_close) then
+ if (detailsFramework.IconPickFrame.click_close) then
close_button:Click()
end
end
- DF.IconPickFrame.customIconAccept = DF:CreateButton(DF.IconPickFrame, accept_custom_icon, 82, 20, "Accept", nil, nil, nil, nil, nil, nil, DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate("font", "ORANGE_FONT_TEMPLATE"))
- DF.IconPickFrame.customIconAccept:SetPoint("left", DF.IconPickFrame.customIconEntry, "right", 2, 0)
+ detailsFramework.IconPickFrame.customIconAccept = detailsFramework:CreateButton(detailsFramework.IconPickFrame, accept_custom_icon, 82, 20, "Accept", nil, nil, nil, nil, nil, nil, detailsFramework:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"), detailsFramework:GetTemplate("font", "ORANGE_FONT_TEMPLATE"))
+ detailsFramework.IconPickFrame.customIconAccept:SetPoint("left", detailsFramework.IconPickFrame.customIconEntry, "right", 2, 0)
--fill with icons
local MACRO_ICON_FILENAMES = {}
local SPELLNAMES_CACHE = {}
- DF.IconPickFrame:SetScript("OnShow", function()
+ detailsFramework.IconPickFrame:SetScript("OnShow", function()
MACRO_ICON_FILENAMES[1] = "INV_MISC_QUESTIONMARK"
local index = 2
@@ -1649,44 +1644,44 @@ function DF:IconPick (callback, close_when_select, param1, param2)
GetMacroItemIcons(MACRO_ICON_FILENAMES)
--reset the custom icon text entry
- DF.IconPickFrame.customIconEntry:SetText("")
+ detailsFramework.IconPickFrame.customIconEntry:SetText("")
--reset the search text entry
- DF.IconPickFrame.search:SetText("")
+ detailsFramework.IconPickFrame.search:SetText("")
end)
- DF.IconPickFrame:SetScript("OnHide", function()
+ detailsFramework.IconPickFrame:SetScript("OnHide", function()
wipe(MACRO_ICON_FILENAMES)
wipe(SPELLNAMES_CACHE)
- DF.IconPickFrame.preview:Hide()
+ detailsFramework.IconPickFrame.preview:Hide()
collectgarbage()
end)
- DF.IconPickFrame.buttons = {}
+ detailsFramework.IconPickFrame.buttons = {}
local onClickFunction = function(self)
- DF:QuickDispatch (DF.IconPickFrame.callback, self.icon:GetTexture(), DF.IconPickFrame.param1, DF.IconPickFrame.param2)
+ detailsFramework:QuickDispatch (detailsFramework.IconPickFrame.callback, self.icon:GetTexture(), detailsFramework.IconPickFrame.param1, detailsFramework.IconPickFrame.param2)
- if (DF.IconPickFrame.click_close) then
+ if (detailsFramework.IconPickFrame.click_close) then
close_button:Click()
end
end
local onEnter = function(self)
- DF.IconPickFrame.preview:SetPoint("bottom", self, "top", 0, 2)
- DF.IconPickFrame.preview.icon:SetTexture(self.icon:GetTexture())
- DF.IconPickFrame.preview:Show()
+ detailsFramework.IconPickFrame.preview:SetPoint("bottom", self, "top", 0, 2)
+ detailsFramework.IconPickFrame.preview.icon:SetTexture(self.icon:GetTexture())
+ detailsFramework.IconPickFrame.preview:Show()
self.icon:SetBlendMode("ADD")
end
local onLeave = function(self)
- DF.IconPickFrame.preview:Hide()
+ detailsFramework.IconPickFrame.preview:Hide()
self.icon:SetBlendMode("BLEND")
end
local backdrop = {bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tile = true, tileSize = 16,
insets = {left = 0, right = 0, top = 0, bottom = 0}, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1}
- for _, button in ipairs(DF.IconPickFrame.buttons) do
+ for _, button in ipairs(detailsFramework.IconPickFrame.buttons) do
button:SetBackdropBorderColor(0, 0, 0, 1)
end
@@ -1717,9 +1712,9 @@ function DF:IconPick (callback, close_when_select, param1, param2)
local lower = string.lower
- local scroll = DF:CreateScrollBox(DF.IconPickFrame, "DetailsFrameworkIconPickFrameScroll", updateIconScroll, {}, width, height, linesAmount, lineHeight)
- DF:ReskinSlider(scroll)
- scroll:SetPoint("topleft", DF.IconPickFrame, "topleft", 2, -58)
+ local scroll = detailsFramework:CreateScrollBox(detailsFramework.IconPickFrame, "DetailsFrameworkIconPickFrameScroll", updateIconScroll, {}, width, height, linesAmount, lineHeight)
+ detailsFramework:ReskinSlider(scroll)
+ scroll:SetPoint("topleft", detailsFramework.IconPickFrame, "topleft", 2, -58)
function scroll.RefreshIcons()
--build icon list
@@ -1727,8 +1722,8 @@ function DF:IconPick (callback, close_when_select, param1, param2)
local numMacroIcons = #MACRO_ICON_FILENAMES
local filter
- if (DF.IconPickFrame.searching) then
- filter = lower(DF.IconPickFrame.searching)
+ if (detailsFramework.IconPickFrame.searching) then
+ filter = lower(detailsFramework.IconPickFrame.searching)
end
if (filter and filter ~= "") then
@@ -1815,36 +1810,36 @@ function DF:IconPick (callback, close_when_select, param1, param2)
end)
end
- DF.IconPickFrameScroll = scroll
- DF.IconPickFrame:Hide()
+ detailsFramework.IconPickFrameScroll = scroll
+ detailsFramework.IconPickFrame:Hide()
end
- DF.IconPickFrame.param1, DF.IconPickFrame.param2 = param1, param2
- DF.IconPickFrame:Show()
- DF.IconPickFrame.callback = callback or DF.IconPickFrame.emptyFunction
- DF.IconPickFrame.click_close = close_when_select
- DF.IconPickFrameScroll.RefreshIcons()
+ detailsFramework.IconPickFrame.param1, detailsFramework.IconPickFrame.param2 = param1, param2
+ detailsFramework.IconPickFrame:Show()
+ detailsFramework.IconPickFrame.callback = callback or detailsFramework.IconPickFrame.emptyFunction
+ detailsFramework.IconPickFrame.click_close = close_when_select
+ detailsFramework.IconPickFrameScroll.RefreshIcons()
end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-function DF:ShowPanicWarning (text)
- if (not DF.PanicWarningWindow) then
- DF.PanicWarningWindow = CreateFrame("frame", "DetailsFrameworkPanicWarningWindow", UIParent, "BackdropTemplate")
- DF.PanicWarningWindow:SetHeight(80)
- DF.PanicWarningWindow:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
- DF.PanicWarningWindow:SetBackdropColor(1, 0, 0, 0.2)
- DF.PanicWarningWindow:SetPoint("topleft", UIParent, "topleft", 0, -250)
- DF.PanicWarningWindow:SetPoint("topright", UIParent, "topright", 0, -250)
+function detailsFramework:ShowPanicWarning (text)
+ if (not detailsFramework.PanicWarningWindow) then
+ detailsFramework.PanicWarningWindow = CreateFrame("frame", "DetailsFrameworkPanicWarningWindow", UIParent, "BackdropTemplate")
+ detailsFramework.PanicWarningWindow:SetHeight(80)
+ detailsFramework.PanicWarningWindow:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
+ detailsFramework.PanicWarningWindow:SetBackdropColor(1, 0, 0, 0.2)
+ detailsFramework.PanicWarningWindow:SetPoint("topleft", UIParent, "topleft", 0, -250)
+ detailsFramework.PanicWarningWindow:SetPoint("topright", UIParent, "topright", 0, -250)
- DF.PanicWarningWindow.text = DF.PanicWarningWindow:CreateFontString (nil, "overlay", "GameFontNormal")
- DF.PanicWarningWindow.text:SetPoint("center", DF.PanicWarningWindow, "center")
- DF.PanicWarningWindow.text:SetTextColor (1, 0.6, 0)
+ detailsFramework.PanicWarningWindow.text = detailsFramework.PanicWarningWindow:CreateFontString(nil, "overlay", "GameFontNormal")
+ detailsFramework.PanicWarningWindow.text:SetPoint("center", detailsFramework.PanicWarningWindow, "center")
+ detailsFramework.PanicWarningWindow.text:SetTextColor (1, 0.6, 0)
end
- DF.PanicWarningWindow.text:SetText(text)
- DF.PanicWarningWindow:Show()
+ detailsFramework.PanicWarningWindow.text:SetText(text)
+ detailsFramework.PanicWarningWindow:Show()
end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -1856,7 +1851,7 @@ local simple_panel_mouse_down = function(self, button)
self.IsMoving = false
self:StopMovingOrSizing()
if (self.db and self.db.position) then
- DF:SavePositionOnScreen (self)
+ detailsFramework:SavePositionOnScreen (self)
end
end
if (not self.DontRightClickClose) then
@@ -1874,7 +1869,7 @@ local simple_panel_mouse_up = function(self, button)
self.IsMoving = false
self:StopMovingOrSizing()
if (self.db and self.db.position) then
- DF:SavePositionOnScreen (self)
+ detailsFramework:SavePositionOnScreen (self)
end
end
end
@@ -1892,8 +1887,8 @@ local SimplePanel_frame_backdrop_border_color = {0, 0, 0, 1}
--with_label was making the frame stay in place while its parent moves
--the slider was anchoring to with_label and here here were anchoring the slider again
-function DF:CreateScaleBar(frame, config) --~scale
- local scaleBar, text = DF:CreateSlider(frame, 120, 14, 0.6, 1.6, 0.1, config.scale, true, "ScaleBar", nil, "Scale:", DF:GetTemplate("slider", "OPTIONS_SLIDER_TEMPLATE"), DF:GetTemplate("font", "ORANGE_FONT_TEMPLATE"))
+function detailsFramework:CreateScaleBar(frame, config) --~scale
+ local scaleBar, text = detailsFramework:CreateSlider(frame, 120, 14, 0.6, 1.6, 0.1, config.scale, true, "ScaleBar", nil, "Scale:", detailsFramework:GetTemplate("slider", "OPTIONS_SLIDER_TEMPLATE"), detailsFramework:GetTemplate("font", "ORANGE_FONT_TEMPLATE"))
scaleBar.thumb:SetWidth(24)
scaleBar:SetValueStep(0.1)
scaleBar:SetObeyStepOnDrag(true)
@@ -1917,7 +1912,7 @@ function DF:CreateScaleBar(frame, config) --~scale
editbox:ClearFocus()
editbox:Hide()
local text = editbox:GetText()
- local newScale = DF.TextToFloor(text)
+ local newScale = detailsFramework.TextToFloor(text)
if (newScale) then
config.scale = newScale
@@ -1955,7 +1950,7 @@ function DF:CreateScaleBar(frame, config) --~scale
end)
text:SetPoint("topleft", frame, "topleft", 12, -7)
- scaleBar:SetFrameLevel(DF.FRAMELEVEL_OVERLAY)
+ scaleBar:SetFrameLevel(detailsFramework.FRAMELEVEL_OVERLAY)
scaleBar.OnValueChanged = function(_, _, value)
if (scaleBar.mouseDown) then
config.scale = value
@@ -1978,15 +1973,15 @@ function DF:CreateScaleBar(frame, config) --~scale
end
local no_options = {}
-function DF:CreateSimplePanel(parent, w, h, title, name, panel_options, db)
+function detailsFramework:CreateSimplePanel(parent, w, h, title, name, panel_options, db)
if (db and name and not db [name]) then
db [name] = {scale = 1}
end
if (not name) then
- name = "DetailsFrameworkSimplePanel" .. DF.SimplePanelCounter
- DF.SimplePanelCounter = DF.SimplePanelCounter + 1
+ name = "DetailsFrameworkSimplePanel" .. detailsFramework.SimplePanelCounter
+ detailsFramework.SimplePanelCounter = detailsFramework.SimplePanelCounter + 1
end
if (not parent) then
parent = UIParent
@@ -2020,7 +2015,7 @@ function DF:CreateSimplePanel(parent, w, h, title, name, panel_options, db)
f.TitleBar = title_bar
local close = CreateFrame("button", name and name .. "CloseButton", title_bar)
- close:SetFrameLevel(DF.FRAMELEVEL_OVERLAY)
+ close:SetFrameLevel(detailsFramework.FRAMELEVEL_OVERLAY)
close:SetSize(16, 16)
close:SetNormalTexture([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
@@ -2034,13 +2029,13 @@ function DF:CreateSimplePanel(parent, w, h, title, name, panel_options, db)
close:SetScript("OnClick", simple_panel_close_click)
f.Close = close
- local title_string = title_bar:CreateFontString (name and name .. "Title", "overlay", "GameFontNormal")
+ local title_string = title_bar:CreateFontString(name and name .. "Title", "overlay", "GameFontNormal")
title_string:SetTextColor (.8, .8, .8, 1)
title_string:SetText(title or "")
f.Title = title_string
if (panel_options.UseScaleBar and db [name]) then
- DF:CreateScaleBar (f, db [name])
+ detailsFramework:CreateScaleBar (f, db [name])
f:SetScale(db [name].scale)
end
@@ -2125,13 +2120,13 @@ local Panel1PxReadConfig = function(self)
db.position = db.position or {x = 0, y = 0}
db.position.x = db.position.x or 0
db.position.y = db.position.y or 0
- DF:RestoreFramePosition (self)
+ detailsFramework:RestoreFramePosition (self)
end
end
-function DF:SavePositionOnScreen (frame)
+function detailsFramework:SavePositionOnScreen (frame)
if (frame.db and frame.db.position) then
- local x, y = DF:GetPositionOnScreen (frame)
+ local x, y = detailsFramework:GetPositionOnScreen (frame)
--print("saving...", x, y, frame:GetName())
if (x and y) then
frame.db.position.x, frame.db.position.y = x, y
@@ -2139,7 +2134,7 @@ function DF:SavePositionOnScreen (frame)
end
end
-function DF:GetPositionOnScreen (frame)
+function detailsFramework:GetPositionOnScreen (frame)
local xOfs, yOfs = frame:GetCenter()
if (not xOfs) then
return
@@ -2151,7 +2146,7 @@ function DF:GetPositionOnScreen (frame)
return xOfs/UIscale, yOfs/UIscale
end
-function DF:RestoreFramePosition (frame)
+function detailsFramework:RestoreFramePosition (frame)
if (frame.db and frame.db.position) then
local scale, UIscale = frame:GetEffectiveScale(), UIParent:GetScale()
frame:ClearAllPoints()
@@ -2162,7 +2157,7 @@ function DF:RestoreFramePosition (frame)
end
local Panel1PxSavePosition= function(self)
- DF:SavePositionOnScreen (self)
+ detailsFramework:SavePositionOnScreen (self)
end
local Panel1PxHasPosition = function(self)
@@ -2174,195 +2169,195 @@ local Panel1PxHasPosition = function(self)
end
end
-function DF:Create1PxPanel(parent, w, h, title, name, config, title_anchor, no_special_frame)
- local f = CreateFrame("frame", name, parent or UIParent, "BackdropTemplate")
- f:SetSize(w or 100, h or 75)
- f:SetPoint("center", UIParent, "center")
+function detailsFramework:Create1PxPanel(parent, width, height, title, name, config, titleAnchor, noSpecialFrame)
+ local newFrame = CreateFrame("frame", name, parent or UIParent, "BackdropTemplate")
+ newFrame:SetSize(width or 100, height or 75)
+ newFrame:SetPoint("center", UIParent, "center", 0, 0)
- if (name and not no_special_frame) then
+ if (name and not noSpecialFrame) then
tinsert(UISpecialFrames, name)
end
- f:SetScript("OnMouseDown", simple_panel_mouse_down)
- f:SetScript("OnMouseUp", simple_panel_mouse_up)
+ newFrame:SetScript("OnMouseDown", simple_panel_mouse_down)
+ newFrame:SetScript("OnMouseUp", simple_panel_mouse_up)
- f:SetBackdrop(Panel1PxBackdrop)
- f:SetBackdropColor(0, 0, 0, 0.5)
+ newFrame:SetBackdrop(Panel1PxBackdrop)
+ newFrame:SetBackdropColor(0, 0, 0, 0.5)
- f.IsLocked = (config and config.IsLocked ~= nil and config.IsLocked) or false
- f:SetMovable(true)
- f:EnableMouse(true)
- f:SetUserPlaced (true)
+ newFrame.IsLocked = (config and config.IsLocked ~= nil and config.IsLocked) or false
+ newFrame:SetMovable(true)
+ newFrame:EnableMouse(true)
+ newFrame:SetUserPlaced (true)
- f.db = config
- --print(config.position.x, config.position.x)
- Panel1PxReadConfig (f)
+ newFrame.db = config
+ Panel1PxReadConfig(newFrame)
- local close = CreateFrame("button", name and name .. "CloseButton", f, "BackdropTemplate")
- close:SetSize(16, 16)
- close:SetNormalTexture([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
- close:SetHighlightTexture([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
- close:SetPushedTexture([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
- close:GetNormalTexture():SetDesaturated(true)
- close:GetHighlightTexture():SetDesaturated(true)
- close:GetPushedTexture():SetDesaturated(true)
- close:SetAlpha(0.7)
+ local closeButton = CreateFrame("button", name and name .. "CloseButton", newFrame, "BackdropTemplate")
+ closeButton:SetSize(16, 16)
+ closeButton:SetNormalTexture([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
+ closeButton:SetHighlightTexture([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
+ closeButton:SetPushedTexture([[Interface\GLUES\LOGIN\Glues-CheckBox-Check]])
+ closeButton:GetNormalTexture():SetDesaturated(true)
+ closeButton:GetHighlightTexture():SetDesaturated(true)
+ closeButton:GetPushedTexture():SetDesaturated(true)
+ closeButton:SetAlpha(0.7)
- local lock = CreateFrame("button", name and name .. "LockButton", f, "BackdropTemplate")
- lock:SetSize(16, 16)
- lock:SetNormalTexture([[Interface\GLUES\CharacterSelect\Glues-AddOn-Icons]])
- lock:SetHighlightTexture([[Interface\GLUES\CharacterSelect\Glues-AddOn-Icons]])
- lock:SetPushedTexture([[Interface\GLUES\CharacterSelect\Glues-AddOn-Icons]])
- lock:GetNormalTexture():SetDesaturated(true)
- lock:GetHighlightTexture():SetDesaturated(true)
- lock:GetPushedTexture():SetDesaturated(true)
- --lock:GetNormalTexture():SetBlendMode("ADD")
- --lock:GetHighlightTexture():SetBlendMode("ADD")
- --lock:GetPushedTexture():SetBlendMode("ADD")
- --lock:GetNormalTexture():SetTexCoord(73/256, 105/256, 64/128, 110/)
- --lock:GetHighlightTexture():SetTexCoord(73/256, 105/256, 64/128, 110/)
- --lock:GetPushedTexture():SetTexCoord(73/256, 105/256, 64/128, 110/)
- lock:SetAlpha(0.7)
+ local lockButton = CreateFrame("button", name and name .. "LockButton", newFrame, "BackdropTemplate")
+ lockButton:SetSize(16, 16)
+ lockButton:SetNormalTexture([[Interface\GLUES\CharacterSelect\Glues-AddOn-Icons]])
+ lockButton:SetHighlightTexture([[Interface\GLUES\CharacterSelect\Glues-AddOn-Icons]])
+ lockButton:SetPushedTexture([[Interface\GLUES\CharacterSelect\Glues-AddOn-Icons]])
+ lockButton:GetNormalTexture():SetDesaturated(true)
+ lockButton:GetHighlightTexture():SetDesaturated(true)
+ lockButton:GetPushedTexture():SetDesaturated(true)
+ lockButton:SetAlpha(0.7)
- close:SetPoint("topright", f, "topright", -3, -3)
- lock:SetPoint("right", close, "left", 3, 0)
+ closeButton:SetPoint("topright", newFrame, "topright", -3, -3)
+ lockButton:SetPoint("right", closeButton, "left", 3, 0)
- close:SetScript("OnClick", Panel1PxOnClickClose)
- lock:SetScript("OnClick", Panel1PxOnClickLock)
+ closeButton:SetScript("OnClick", Panel1PxOnClickClose)
+ lockButton:SetScript("OnClick", Panel1PxOnClickLock)
- local title_string = f:CreateFontString (name and name .. "Title", "overlay", "GameFontNormal")
- title_string:SetPoint("topleft", f, "topleft", 5, -5)
- title_string:SetText(title or "")
-
- if (title_anchor) then
- if (title_anchor == "top") then
- title_string:ClearAllPoints()
- title_string:SetPoint("bottomleft", f, "topleft", 0, 0)
- close:ClearAllPoints()
- close:SetPoint("bottomright", f, "topright", 0, 0)
- end
- f.title_anchor = title_anchor
+ local titleString = newFrame:CreateFontString(name and name .. "Title", "overlay", "GameFontNormal")
+ titleString:SetPoint("topleft", newFrame, "topleft", 5, -5)
+
+ if (detailsFramework.Language.IsLocTable(title)) then
+ local locTable = title
+ detailsFramework.Language.SetTextWithLocTable(titleString, locTable)
+ else
+ titleString:SetText(title or "")
end
- f.SetTitle = Panel1PxSetTitle
- f.Title = title_string
- f.Lock = lock
- f.Close = close
- f.HasPosition = Panel1PxHasPosition
- f.SavePosition = Panel1PxSavePosition
+ if (titleAnchor) then
+ if (titleAnchor == "top") then
+ titleString:ClearAllPoints()
+ titleString:SetPoint("bottomleft", newFrame, "topleft", 0, 0)
+
+ closeButton:ClearAllPoints()
+ closeButton:SetPoint("bottomright", newFrame, "topright", 0, 0)
+ end
+ newFrame.title_anchor = titleAnchor
+ end
- f.IsLocked = not f.IsLocked
- f.SetLocked = Panel1PxSetLocked
- Panel1PxOnToggleLock (f)
+ newFrame.SetTitle = Panel1PxSetTitle
+ newFrame.Title = titleString
+ newFrame.Lock = lockButton
+ newFrame.Close = closeButton
+ newFrame.HasPosition = Panel1PxHasPosition
+ newFrame.SavePosition = Panel1PxSavePosition
- return f
+ newFrame.IsLocked = not newFrame.IsLocked
+ newFrame.SetLocked = Panel1PxSetLocked
+ Panel1PxOnToggleLock(newFrame)
+
+ return newFrame
end
------------------------------------------------------------------------------------------------------------------------------------------------
-- ~prompt
-function DF:ShowPromptPanel (message, func_true, func_false, no_repeated, width)
-
+--@dontOverride: won't show another prompt if theres already a shown prompt
+function detailsFramework:ShowPromptPanel(message, trueCallback, falseCallback, dontOverride, width)
if (not DetailsFrameworkPromptSimple) then
- local f = CreateFrame("frame", "DetailsFrameworkPromptSimple", UIParent, "BackdropTemplate")
- f:SetSize(400, 80)
- f:SetFrameStrata("DIALOG")
- f:SetPoint("center", UIParent, "center", 0, 300)
- f:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
- f:SetBackdropColor(0, 0, 0, 0.8)
- f:SetBackdropBorderColor(0, 0, 0, 1)
+ local promptFrame = CreateFrame("frame", "DetailsFrameworkPromptSimple", UIParent, "BackdropTemplate")
+ promptFrame:SetSize(400, 80)
+ promptFrame:SetFrameStrata("DIALOG")
+ promptFrame:SetPoint("center", UIParent, "center", 0, 300)
+ detailsFramework:ApplyStandardBackdrop(promptFrame)
tinsert(UISpecialFrames, "DetailsFrameworkPromptSimple")
- DF:CreateTitleBar (f, "Prompt!")
- DF:ApplyStandardBackdrop(f)
+ detailsFramework:CreateTitleBar(promptFrame, "Prompt!")
+ detailsFramework:ApplyStandardBackdrop(promptFrame)
- local prompt = f:CreateFontString (nil, "overlay", "GameFontNormal")
- prompt:SetPoint("top", f, "top", 0, -28)
+ local prompt = promptFrame:CreateFontString(nil, "overlay", "GameFontNormal")
+ prompt:SetPoint("top", promptFrame, "top", 0, -28)
prompt:SetJustifyH("center")
- f.prompt = prompt
+ promptFrame.prompt = prompt
- local button_text_template = DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")
- local options_dropdown_template = DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
+ local button_text_template = detailsFramework:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")
+ local options_dropdown_template = detailsFramework:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
- local button_true = DF:CreateButton(f, nil, 60, 20, "Yes", nil, nil, nil, nil, nil, nil, options_dropdown_template)
- button_true:SetPoint("bottomright", f, "bottomright", -5, 5)
- f.button_true = button_true
+ local buttonTrue = detailsFramework:CreateButton(promptFrame, nil, 60, 20, "Yes", nil, nil, nil, nil, nil, nil, options_dropdown_template)
+ buttonTrue:SetPoint("bottomright", promptFrame, "bottomright", -5, 5)
+ promptFrame.button_true = buttonTrue
- local button_false = DF:CreateButton(f, nil, 60, 20, "No", nil, nil, nil, nil, nil, nil, options_dropdown_template)
- button_false:SetPoint("bottomleft", f, "bottomleft", 5, 5)
- f.button_false = button_false
+ local buttonFalse = detailsFramework:CreateButton(promptFrame, nil, 60, 20, "No", nil, nil, nil, nil, nil, nil, options_dropdown_template)
+ buttonFalse:SetPoint("bottomleft", promptFrame, "bottomleft", 5, 5)
+ promptFrame.button_false = buttonFalse
- button_true:SetClickFunction(function()
- local my_func = button_true.true_function
+ buttonTrue:SetClickFunction(function()
+ local my_func = buttonTrue.true_function
if (my_func) then
local okey, errormessage = pcall (my_func, true)
if (not okey) then
print("error:", errormessage)
end
- f:Hide()
+ promptFrame:Hide()
end
end)
- button_false:SetClickFunction(function()
- local my_func = button_false.false_function
+ buttonFalse:SetClickFunction(function()
+ local my_func = buttonFalse.false_function
if (my_func) then
local okey, errormessage = pcall (my_func, true)
if (not okey) then
print("error:", errormessage)
end
- f:Hide()
+ promptFrame:Hide()
end
end)
- f.ShowAnimation = DF:CreateAnimationHub (f, function()
- f:SetBackdropBorderColor(0, 0, 0, 0)
- f.TitleBar:SetBackdropBorderColor(0, 0, 0, 0)
- end, function()
- f:SetBackdropBorderColor(0, 0, 0, 1)
- f.TitleBar:SetBackdropBorderColor(0, 0, 0, 1)
+ promptFrame.ShowAnimation = detailsFramework:CreateAnimationHub(promptFrame, function()
+ promptFrame:SetBackdropBorderColor(0, 0, 0, 0)
+ promptFrame.TitleBar:SetBackdropBorderColor(0, 0, 0, 0)
+ end,
+ function()
+ promptFrame:SetBackdropBorderColor(0, 0, 0, 1)
+ promptFrame.TitleBar:SetBackdropBorderColor(0, 0, 0, 1)
end)
- DF:CreateAnimation(f.ShowAnimation, "scale", 1, .075, .2, .2, 1.1, 1.1, "center", 0, 0)
- DF:CreateAnimation(f.ShowAnimation, "scale", 2, .075, 1, 1, .90, .90, "center", 0, 0)
+
+ detailsFramework:CreateAnimation(promptFrame.ShowAnimation, "scale", 1, .075, .2, .2, 1.1, 1.1, "center", 0, 0)
+ detailsFramework:CreateAnimation(promptFrame.ShowAnimation, "scale", 2, .075, 1, 1, .90, .90, "center", 0, 0)
- f.FlashTexture = f:CreateTexture(nil, "overlay")
- f.FlashTexture:SetColorTexture (1, 1, 1, 1)
- f.FlashTexture:SetAllPoints()
+ promptFrame.FlashTexture = promptFrame:CreateTexture(nil, "overlay")
+ promptFrame.FlashTexture:SetColorTexture (1, 1, 1, 1)
+ promptFrame.FlashTexture:SetAllPoints()
- f.FlashAnimation = DF:CreateAnimationHub (f.FlashTexture, function() f.FlashTexture:Show() end, function() f.FlashTexture:Hide() end)
- DF:CreateAnimation(f.FlashAnimation, "alpha", 1, .075, 0, .25)
- DF:CreateAnimation(f.FlashAnimation, "alpha", 2, .075, .35, 0)
+ promptFrame.FlashAnimation = detailsFramework:CreateAnimationHub(promptFrame.FlashTexture, function() promptFrame.FlashTexture:Show() end, function() promptFrame.FlashTexture:Hide() end)
+ detailsFramework:CreateAnimation(promptFrame.FlashAnimation, "alpha", 1, .075, 0, .25)
+ detailsFramework:CreateAnimation(promptFrame.FlashAnimation, "alpha", 2, .075, .35, 0)
- f:Hide()
- DF.promtp_panel = f
+ promptFrame:Hide()
+ detailsFramework.promtp_panel = promptFrame
end
- assert (type(func_true) == "function" and type(func_false) == "function", "ShowPromptPanel expects two functions.")
+ assert(type(trueCallback) == "function" and type(falseCallback) == "function", "ShowPromptPanel expects two functions.")
- if (no_repeated) then
- if (DF.promtp_panel:IsShown()) then
+ if (dontOverride) then
+ if (detailsFramework.promtp_panel:IsShown()) then
return
end
end
if (width) then
- DF.promtp_panel:SetWidth(width)
+ detailsFramework.promtp_panel:SetWidth(width)
else
- DF.promtp_panel:SetWidth(400)
+ detailsFramework.promtp_panel:SetWidth(400)
end
- DF.promtp_panel.prompt:SetText(message)
- DF.promtp_panel.button_true.true_function = func_true
- DF.promtp_panel.button_false.false_function = func_false
+ detailsFramework.promtp_panel.prompt:SetText(message)
+ detailsFramework.promtp_panel.button_true.true_function = trueCallback
+ detailsFramework.promtp_panel.button_false.false_function = falseCallback
- DF.promtp_panel:Show()
+ detailsFramework.promtp_panel:Show()
- DF.promtp_panel.ShowAnimation:Play()
- DF.promtp_panel.FlashAnimation:Play()
+ detailsFramework.promtp_panel.ShowAnimation:Play()
+ detailsFramework.promtp_panel.FlashAnimation:Play()
end
-function DF:ShowTextPromptPanel (message, callback)
+function detailsFramework:ShowTextPromptPanel (message, callback)
- if (not DF.text_prompt_panel) then
+ if (not detailsFramework.text_prompt_panel) then
local f = CreateFrame("frame", "DetailsFrameworkPrompt", UIParent, "BackdropTemplate")
f:SetSize(400, 120)
@@ -2376,27 +2371,27 @@ function DF:ShowTextPromptPanel (message, callback)
f:SetScript("OnMouseDown", function(self, button) if (button == "RightButton") then f.EntryBox:ClearFocus() f:Hide() end end)
tinsert(UISpecialFrames, "DetailsFrameworkPrompt")
- DF:CreateTitleBar (f, "Prompt!")
- DF:ApplyStandardBackdrop(f)
+ detailsFramework:CreateTitleBar (f, "Prompt!")
+ detailsFramework:ApplyStandardBackdrop(f)
- local prompt = f:CreateFontString (nil, "overlay", "GameFontNormal")
+ local prompt = f:CreateFontString(nil, "overlay", "GameFontNormal")
prompt:SetPoint("top", f, "top", 0, -25)
prompt:SetJustifyH("center")
prompt:SetSize(360, 36)
f.prompt = prompt
- local button_text_template = DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")
- local options_dropdown_template = DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
+ local button_text_template = detailsFramework:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")
+ local options_dropdown_template = detailsFramework:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
- local textbox = DF:CreateTextEntry (f, function()end, 380, 20, "textbox", nil, nil, options_dropdown_template)
+ local textbox = detailsFramework:CreateTextEntry (f, function()end, 380, 20, "textbox", nil, nil, options_dropdown_template)
textbox:SetPoint("topleft", f, "topleft", 10, -60)
f.EntryBox = textbox
- local button_true = DF:CreateButton(f, nil, 60, 20, "Okey", nil, nil, nil, nil, nil, nil, options_dropdown_template)
+ local button_true = detailsFramework:CreateButton(f, nil, 60, 20, "Okey", nil, nil, nil, nil, nil, nil, options_dropdown_template)
button_true:SetPoint("bottomright", f, "bottomright", -10, 5)
f.button_true = button_true
- local button_false = DF:CreateButton(f, function() f.textbox:ClearFocus() f:Hide() end, 60, 20, "Cancel", nil, nil, nil, nil, nil, nil, options_dropdown_template)
+ local button_false = detailsFramework:CreateButton(f, function() f.textbox:ClearFocus() f:Hide() end, 60, 20, "Cancel", nil, nil, nil, nil, nil, nil, options_dropdown_template)
button_false:SetPoint("bottomleft", f, "bottomleft", 10, 5)
f.button_false = button_false
@@ -2421,21 +2416,21 @@ function DF:ShowTextPromptPanel (message, callback)
end)
f:Hide()
- DF.text_prompt_panel = f
+ detailsFramework.text_prompt_panel = f
end
- DF.text_prompt_panel:Show()
+ detailsFramework.text_prompt_panel:Show()
DetailsFrameworkPrompt.EntryBox:SetText("")
- DF.text_prompt_panel.prompt:SetText(message)
- DF.text_prompt_panel.button_true.true_function = callback
- DF.text_prompt_panel.textbox:SetFocus (true)
+ detailsFramework.text_prompt_panel.prompt:SetText(message)
+ detailsFramework.text_prompt_panel.button_true.true_function = callback
+ detailsFramework.text_prompt_panel.textbox:SetFocus (true)
end
------------------------------------------------------------------------------------------------------------------------------------------------
--options button -- ~options
-function DF:CreateOptionsButton (parent, callback, name)
+function detailsFramework:CreateOptionsButton (parent, callback, name)
local b = CreateFrame("button", name, parent, "BackdropTemplate")
b:SetSize(14, 14)
@@ -2464,7 +2459,7 @@ end
------------------------------------------------------------------------------------------------------------------------------------------------
--feedback panel -- ~feedback
-function DF:CreateFeedbackButton (parent, callback, name)
+function detailsFramework:CreateFeedbackButton (parent, callback, name)
local b = CreateFrame("button", name, parent, "BackdropTemplate")
b:SetSize(12, 13)
b:SetScript("OnClick", callback)
@@ -2494,10 +2489,10 @@ end
local on_click_feedback = function(self)
- local feedback_link_textbox = DF.feedback_link_textbox
+ local feedback_link_textbox = detailsFramework.feedback_link_textbox
if (not feedback_link_textbox) then
- local editbox = DF:CreateTextEntry (AddonFeedbackPanel, _, 275, 34)
+ local editbox = detailsFramework:CreateTextEntry (AddonFeedbackPanel, _, 275, 34)
editbox:SetAutoFocus (false)
editbox:SetHook("OnEditFocusGained", function()
editbox.text = editbox.link
@@ -2512,7 +2507,7 @@ local on_click_feedback = function(self)
end)
editbox.text = ""
- DF.feedback_link_textbox = editbox
+ detailsFramework.feedback_link_textbox = editbox
feedback_link_textbox = editbox
end
@@ -2544,7 +2539,7 @@ local feedback_get_fb_line = function(self)
line.icon = line:CreateTexture(nil, "overlay")
line.icon:SetSize(90, 36)
- line.desc = line:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ line.desc = line:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
line.icon:SetPoint("left", line, "left", 5, 0)
line.desc:SetPoint("left", line.icon, "right", 5, 0)
@@ -2564,10 +2559,10 @@ end
local on_click_feedback = function(self)
- local feedback_link_textbox = DF.feedback_link_textbox
+ local feedback_link_textbox = detailsFramework.feedback_link_textbox
if (not feedback_link_textbox) then
- local editbox = DF:CreateTextEntry (AddonFeedbackPanel, _, 275, 34)
+ local editbox = detailsFramework:CreateTextEntry (AddonFeedbackPanel, _, 275, 34)
editbox:SetAutoFocus (false)
editbox:SetHook("OnEditFocusGained", function()
editbox.text = editbox.link
@@ -2582,7 +2577,7 @@ local on_click_feedback = function(self)
end)
editbox.text = ""
- DF.feedback_link_textbox = editbox
+ detailsFramework.feedback_link_textbox = editbox
feedback_link_textbox = editbox
end
@@ -2615,10 +2610,10 @@ local on_leave_addon = function(self)
self.icon:SetBlendMode("BLEND")
end
local on_click_addon = function(self)
- local addon_link_textbox = DF.addon_link_textbox
+ local addon_link_textbox = detailsFramework.addon_link_textbox
if (not addon_link_textbox) then
- local editbox = DF:CreateTextEntry (AddonFeedbackPanel, _, 128, 64)
+ local editbox = detailsFramework:CreateTextEntry (AddonFeedbackPanel, _, 128, 64)
editbox:SetAutoFocus (false)
editbox:SetHook("OnEditFocusGained", function()
editbox.text = editbox.link
@@ -2633,7 +2628,7 @@ local on_click_addon = function(self)
end)
editbox.text = ""
- DF.addon_link_textbox = editbox
+ detailsFramework.addon_link_textbox = editbox
addon_link_textbox = editbox
end
@@ -2717,12 +2712,12 @@ local feedback_hide_all = function(self)
end
-- feedback_methods = { { icon = icon path, desc = description, link = url}}
-function DF:ShowFeedbackPanel (addon_name, version, feedback_methods, more_addons)
+function detailsFramework:ShowFeedbackPanel (addon_name, version, feedback_methods, more_addons)
local f = _G.AddonFeedbackPanel
if (not f) then
- f = DF:Create1PxPanel(UIParent, 400, 100, addon_name .. " Feedback", "AddonFeedbackPanel", nil)
+ f = detailsFramework:Create1PxPanel(UIParent, 400, 100, addon_name .. " Feedback", "AddonFeedbackPanel", nil)
f:SetFrameStrata("FULLSCREEN")
f:SetPoint("center", UIParent, "center")
f:SetBackdropColor(0, 0, 0, 0.8)
@@ -2732,19 +2727,19 @@ function DF:ShowFeedbackPanel (addon_name, version, feedback_methods, more_addon
f.next_addons = 1
f.next_addons_line_break = 4
- local feedback_anchor = f:CreateFontString (nil, "overlay", "GameFontNormal")
+ local feedback_anchor = f:CreateFontString(nil, "overlay", "GameFontNormal")
feedback_anchor:SetText("Feedback:")
feedback_anchor:SetPoint("topleft", f, "topleft", 5, -30)
f.feedback_anchor = feedback_anchor
- local excla_text = f:CreateFontString (nil, "overlay", "GameFontNormal")
+ local excla_text = f:CreateFontString(nil, "overlay", "GameFontNormal")
excla_text:SetText("click and copy the link")
excla_text:SetPoint("topright", f, "topright", -5, -30)
excla_text:SetTextColor (1, 0.8, 0.2, 0.6)
- local addons_anchor = f:CreateFontString (nil, "overlay", "GameFontNormal")
+ local addons_anchor = f:CreateFontString(nil, "overlay", "GameFontNormal")
addons_anchor:SetText("AddOns From the Same Author:")
f.addons_anchor = addons_anchor
- local excla_text2 = f:CreateFontString (nil, "overlay", "GameFontNormal")
+ local excla_text2 = f:CreateFontString(nil, "overlay", "GameFontNormal")
excla_text2:SetText("click and copy the link")
excla_text2:SetTextColor (1, 0.8, 0.2, 0.6)
f.excla_text2 = excla_text2
@@ -2755,7 +2750,7 @@ function DF:ShowFeedbackPanel (addon_name, version, feedback_methods, more_addon
f.AddOtherAddon = feedback_add_addon
f.HideAll = feedback_hide_all
- DF:SetFontSize (f.Title, 14)
+ detailsFramework:SetFontSize (f.Title, 14)
end
@@ -2845,7 +2840,7 @@ local chart_panel_set_scale = function(self, amt, func, text)
self ["dpsamt" .. math.abs(i-9)]:SetText(func (piece*i))
else
if (piece*i > 1) then
- self ["dpsamt" .. math.abs(i-9)]:SetText(DF.FormatNumber (piece*i))
+ self ["dpsamt" .. math.abs(i-9)]:SetText(detailsFramework.FormatNumber (piece*i))
else
self ["dpsamt" .. math.abs(i-9)]:SetText(format ("%.3f", piece*i))
end
@@ -2943,14 +2938,14 @@ local create_box = function(self, next_box)
local thisbox = {}
self.BoxLabels [next_box] = thisbox
- local box = DF:NewImage (self.Graphic, nil, 16, 16, "border")
- local text = DF:NewLabel(self.Graphic)
+ local box = detailsFramework:NewImage (self.Graphic, nil, 16, 16, "border")
+ local text = detailsFramework:NewLabel(self.Graphic)
- local border = DF:NewImage (self.Graphic, [[Interface\DialogFrame\UI-DialogBox-Gold-Corner]], 30, 30, "artwork")
+ local border = detailsFramework:NewImage (self.Graphic, [[Interface\DialogFrame\UI-DialogBox-Gold-Corner]], 30, 30, "artwork")
border:SetPoint("center", box, "center", -3, -4)
border:SetTexture([[Interface\DialogFrame\UI-DialogBox-Gold-Corner]])
- local checktexture = DF:NewImage (self.Graphic, [[Interface\Buttons\UI-CheckBox-Check]], 18, 18, "overlay")
+ local checktexture = detailsFramework:NewImage (self.Graphic, [[Interface\Buttons\UI-CheckBox-Check]], 18, 18, "overlay")
checktexture:SetPoint("center", box, "center", 0, -1)
checktexture:SetTexture([[Interface\Buttons\UI-CheckBox-Check]])
@@ -3447,11 +3442,11 @@ local chart_panel_right_click_close = function(self, value)
end
end
-function DF:CreateChartPanel(parent, w, h, name)
+function detailsFramework:CreateChartPanel(parent, w, h, name)
if (not name) then
- name = "DFPanel" .. DF.PanelCounter
- DF.PanelCounter = DF.PanelCounter + 1
+ name = "DFPanel" .. detailsFramework.PanelCounter
+ detailsFramework.PanelCounter = detailsFramework.PanelCounter + 1
end
parent = parent or UIParent
@@ -3477,7 +3472,7 @@ function DF:CreateChartPanel(parent, w, h, name)
c:SetAlpha(0.9)
f.CloseButton = c
- local title = DF:NewLabel(f, nil, "$parentTitle", "chart_title", "Chart!", nil, 20, {1, 1, 0})
+ local title = detailsFramework:NewLabel(f, nil, "$parentTitle", "chart_title", "Chart!", nil, 20, {1, 1, 0})
title:SetPoint("topleft", f, "topleft", 110, -13)
f.Overlays = {}
@@ -3521,7 +3516,7 @@ function DF:CreateChartPanel(parent, w, h, name)
line:SetWidth(670)
line:SetHeight(1.1)
- local s = f:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ local s = f:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
f ["dpsamt"..i] = s
s:SetText("100k")
s:SetPoint("topleft", f, "topleft", 27, -61 + (-(24.6*i)))
@@ -3536,7 +3531,7 @@ function DF:CreateChartPanel(parent, w, h, name)
f.TimeLabelsHeight = 16
for i = 1, 17 do
- local timeString = f:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ local timeString = f:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
timeString:SetText("00:00")
timeString:SetPoint("bottomleft", f, "bottomleft", 78 + ((i-1)*36), f.TimeLabelsHeight)
f.TimeLabels [i] = timeString
@@ -3549,7 +3544,7 @@ function DF:CreateChartPanel(parent, w, h, name)
timeString.line = line
end
- local bottom_texture = DF:NewImage (f, nil, 702, 25, "background", nil, nil, "$parentBottomTexture")
+ local bottom_texture = detailsFramework:NewImage (f, nil, 702, 25, "background", nil, nil, "$parentBottomTexture")
bottom_texture:SetColorTexture (.1, .1, .1, .7)
bottom_texture:SetPoint("topright", g, "bottomright", 0, 0)
bottom_texture:SetPoint("bottomleft", f, "bottomleft", 8, 12)
@@ -3645,19 +3640,19 @@ local gframe_create_line = function(self)
spellicon:SetSize(16, 16)
f.spellicon = spellicon
- local text = f:CreateFontString (nil, "overlay", "GameFontNormal")
+ local text = f:CreateFontString(nil, "overlay", "GameFontNormal")
local textBackground = f:CreateTexture(nil, "artwork")
textBackground:SetSize(30, 16)
textBackground:SetColorTexture (0, 0, 0, 0.5)
textBackground:SetPoint("bottom", f.ball, "top", 0, -6)
text:SetPoint("center", textBackground, "center")
- DF:SetFontSize (text, 10)
+ detailsFramework:SetFontSize (text, 10)
f.text = text
f.textBackground = textBackground
- local timeline = f:CreateFontString (nil, "overlay", "GameFontNormal")
+ local timeline = f:CreateFontString(nil, "overlay", "GameFontNormal")
timeline:SetPoint("bottomright", f, "bottomright", -2, 0)
- DF:SetFontSize (timeline, 8)
+ detailsFramework:SetFontSize (timeline, 8)
f.timeline = timeline
return f
@@ -3742,7 +3737,7 @@ local gframe_update = function(self, lines)
end
-function DF:CreateGFrame (parent, w, h, linewidth, onenter, onleave, member, name)
+function detailsFramework:CreateGFrame (parent, w, h, linewidth, onenter, onleave, member, name)
local f = CreateFrame("frame", name, parent, "BackdropTemplate")
f:SetSize(w or 450, h or 150)
--f.CustomLine = [[Interface\AddOns\Details\Libs\LibGraph-2.0\line]]
@@ -3773,7 +3768,7 @@ end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- ~buttoncontainer
-function DF:CreateButtonContainer (parent, name)
+function detailsFramework:CreateButtonContainer (parent, name)
local f = CreateFrame("frame", name, parent, "BackdropTemplate")
-- f.
end
@@ -3782,7 +3777,7 @@ end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--options tabs and buttons -dot
-function DF:FindHighestParent (self)
+function detailsFramework:FindHighestParent (self)
local f
if (self:GetParent() == UIParent) then
f = self
@@ -3802,12 +3797,12 @@ function DF:FindHighestParent (self)
return f
end
-DF.TabContainerFunctions = {}
+detailsFramework.TabContainerFunctions = {}
-local button_tab_template = DF.table.copy ({}, DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
+local button_tab_template = detailsFramework.table.copy ({}, detailsFramework:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
button_tab_template.backdropbordercolor = nil
-DF.TabContainerFunctions.CreateUnderlineGlow = function(button)
+detailsFramework.TabContainerFunctions.CreateUnderlineGlow = function(button)
local selectedGlow = button:CreateTexture(nil, "background", nil, -4)
selectedGlow:SetPoint("topleft", button.widget, "bottomleft", -7, 0)
selectedGlow:SetPoint("topright", button.widget, "bottomright", 7, 0)
@@ -3820,9 +3815,9 @@ DF.TabContainerFunctions.CreateUnderlineGlow = function(button)
button.selectedUnderlineGlow = selectedGlow
end
-DF.TabContainerFunctions.OnMouseDown = function(self, button)
+detailsFramework.TabContainerFunctions.OnMouseDown = function(self, button)
--search for UIParent
- local f = DF:FindHighestParent (self)
+ local f = detailsFramework:FindHighestParent (self)
local container = self:GetParent()
if (button == "LeftButton") then
@@ -3842,21 +3837,21 @@ DF.TabContainerFunctions.OnMouseDown = function(self, button)
end
else
--goes back to front page
- DF.TabContainerFunctions.SelectIndex (self, _, 1)
+ detailsFramework.TabContainerFunctions.SelectIndex (self, _, 1)
end
end
end
end
-DF.TabContainerFunctions.OnMouseUp = function(self, button)
- local f = DF:FindHighestParent (self)
+detailsFramework.TabContainerFunctions.OnMouseUp = function(self, button)
+ local f = detailsFramework:FindHighestParent (self)
if (f.IsMoving) then
f:StopMovingOrSizing()
f.IsMoving = false
end
end
-DF.TabContainerFunctions.SelectIndex = function(self, fixedParam, menuIndex)
+detailsFramework.TabContainerFunctions.SelectIndex = function(self, fixedParam, menuIndex)
local mainFrame = self.AllFrames and self or self.mainFrame or self:GetParent()
for i = 1, #mainFrame.AllFrames do
@@ -3882,11 +3877,11 @@ DF.TabContainerFunctions.SelectIndex = function(self, fixedParam, menuIndex)
mainFrame.CurrentIndex = menuIndex
if (mainFrame.hookList.OnSelectIndex) then
- DF:QuickDispatch(mainFrame.hookList.OnSelectIndex, mainFrame, mainFrame.AllButtons[menuIndex])
+ detailsFramework:QuickDispatch(mainFrame.hookList.OnSelectIndex, mainFrame, mainFrame.AllButtons[menuIndex])
end
end
-DF.TabContainerFunctions.SetIndex = function(self, index)
+detailsFramework.TabContainerFunctions.SetIndex = function(self, index)
self.CurrentIndex = index
end
@@ -3895,12 +3890,12 @@ local tab_container_on_show = function(self)
self.SelectIndex (self.AllButtons[index], nil, index)
end
-function DF:CreateTabContainer (parent, title, frame_name, frameList, options_table, hookList)
- local options_text_template = DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")
- local options_dropdown_template = DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
- local options_switch_template = DF:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE")
- local options_slider_template = DF:GetTemplate("slider", "OPTIONS_SLIDER_TEMPLATE")
- local options_button_template = DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE")
+function detailsFramework:CreateTabContainer (parent, title, frame_name, frameList, options_table, hookList)
+ local options_text_template = detailsFramework:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")
+ local options_dropdown_template = detailsFramework:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
+ local options_switch_template = detailsFramework:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE")
+ local options_slider_template = detailsFramework:GetTemplate("slider", "OPTIONS_SLIDER_TEMPLATE")
+ local options_button_template = detailsFramework:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE")
options_table = options_table or {}
local parentFrameWidth = parent:GetWidth()
@@ -3914,10 +3909,10 @@ function DF:CreateTabContainer (parent, title, frame_name, frameList, options_ta
local mainFrame = CreateFrame("frame", frame_name, parent.widget or parent, "BackdropTemplate")
mainFrame:SetAllPoints()
- DF:Mixin (mainFrame, DF.TabContainerFunctions)
+ detailsFramework:Mixin (mainFrame, detailsFramework.TabContainerFunctions)
mainFrame.hookList = hookList or {}
- local mainTitle = DF:CreateLabel(mainFrame, title, 24, "white")
+ local mainTitle = detailsFramework:CreateLabel(mainFrame, title, 24, "white")
mainTitle:SetPoint("topleft", mainFrame, "topleft", 10, -30 + y_offset)
mainFrame:SetFrameLevel(200)
@@ -3941,27 +3936,27 @@ function DF:CreateTabContainer (parent, title, frame_name, frameList, options_ta
f:SetFrameLevel(210)
f:Hide()
- local title = DF:CreateLabel(f, frame.title, 16, "silver")
+ local title = detailsFramework:CreateLabel(f, frame.title, 16, "silver")
title:SetPoint("topleft", mainTitle, "bottomleft", 0, 0)
f.titleText = title
- local tabButton = DF:CreateButton(mainFrame, DF.TabContainerFunctions.SelectIndex, buttonWidth, buttonHeight, frame.title, i, nil, nil, nil, "$parentTabButton" .. frame.name, false, button_tab_template)
+ local tabButton = detailsFramework:CreateButton(mainFrame, detailsFramework.TabContainerFunctions.SelectIndex, buttonWidth, buttonHeight, frame.title, i, nil, nil, nil, "$parentTabButton" .. frame.name, false, button_tab_template)
PixelUtil.SetSize(tabButton, buttonWidth, buttonHeight)
tabButton:SetFrameLevel(220)
tabButton.textsize = button_text_size
tabButton.mainFrame = mainFrame
- DF.TabContainerFunctions.CreateUnderlineGlow (tabButton)
+ detailsFramework.TabContainerFunctions.CreateUnderlineGlow (tabButton)
local right_click_to_back
if (i == 1 or options_table.rightbutton_always_close) then
- right_click_to_back = DF:CreateLabel(f, "right click to close", 10, "gray")
+ right_click_to_back = detailsFramework:CreateLabel(f, "right click to close", 10, "gray")
right_click_to_back:SetPoint("bottomright", f, "bottomright", -1, options_table.right_click_y or 0)
if (options_table.close_text_alpha) then
right_click_to_back:SetAlpha(options_table.close_text_alpha)
end
f.IsFrontPage = true
else
- right_click_to_back = DF:CreateLabel(f, "right click to go back to main menu", 10, "gray")
+ right_click_to_back = detailsFramework:CreateLabel(f, "right click to go back to main menu", 10, "gray")
right_click_to_back:SetPoint("bottomright", f, "bottomright", -1, options_table.right_click_y or 0)
if (options_table.close_text_alpha) then
right_click_to_back:SetAlpha(options_table.close_text_alpha)
@@ -3972,8 +3967,8 @@ function DF:CreateTabContainer (parent, title, frame_name, frameList, options_ta
right_click_to_back:Hide()
end
- f:SetScript("OnMouseDown", DF.TabContainerFunctions.OnMouseDown)
- f:SetScript("OnMouseUp", DF.TabContainerFunctions.OnMouseUp)
+ f:SetScript("OnMouseDown", detailsFramework.TabContainerFunctions.OnMouseDown)
+ f:SetScript("OnMouseUp", detailsFramework.TabContainerFunctions.OnMouseUp)
tinsert(mainFrame.AllFrames, f)
tinsert(mainFrame.AllButtons, tabButton)
@@ -4012,14 +4007,14 @@ end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- ~right ~click to ~close
-function DF:CreateRightClickToClose(parent, xOffset, yOffset, color, fontSize)
+function detailsFramework:CreateRightClickToClose(parent, xOffset, yOffset, color, fontSize)
--default values
xOffset = xOffset or 0
yOffset = yOffset or 0
color = color or "white"
fontSize = fontSize or 10
- local label = DF:CreateLabel(parent, "right click to close", fontSize, color)
+ local label = detailsFramework:CreateLabel(parent, "right click to close", fontSize, color)
label:SetPoint("bottomright", parent, "bottomright", -4 + xOffset, 5 + yOffset)
return label
@@ -4049,14 +4044,14 @@ local simple_list_box_GetOrCreateWidget = function(self)
local index = self.nextWidget
local widget = self.widgets [index]
if (not widget) then
- widget = DF:CreateButton(self, function()end, self.options.width, self.options.row_height, "", nil, nil, nil, nil, nil, nil, DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
+ widget = detailsFramework:CreateButton(self, function()end, self.options.width, self.options.row_height, "", nil, nil, nil, nil, nil, nil, detailsFramework:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
widget:SetHook("OnEnter", simple_list_box_onenter)
widget:SetHook("OnLeave", simple_list_box_onleave)
widget.textcolor = self.options.textcolor
widget.textsize = self.options.text_size
widget.onleave_backdrop = self.options.backdrop_color
- widget.XButton = DF:CreateButton(widget, function()end, 16, 16)
+ widget.XButton = detailsFramework:CreateButton(widget, function()end, 16, 16)
widget.XButton:SetPoint("topright", widget.widget, "topright")
widget.XButton:SetIcon ([[Interface\BUTTONS\UI-Panel-MinimizeButton-Up]], 16, 16, "overlay", nil, nil, 0, -4, 0, false)
widget.XButton.icon:SetDesaturated(true)
@@ -4124,7 +4119,7 @@ local simple_list_box_RefreshWidgets = function(self)
widget.value = value
- local r, g, b, a = DF:ParseColors(self.options.backdrop_color)
+ local r, g, b, a = detailsFramework:ParseColors(self.options.backdrop_color)
widget:SetBackdropColor(r, g, b, a)
widget:Show()
@@ -4167,7 +4162,7 @@ local simple_list_box_SetData = function(self, t)
self.list_table = t
end
-function DF:CreateSimpleListBox (parent, name, title, empty_text, list_table, onclick, options)
+function detailsFramework:CreateSimpleListBox (parent, name, title, empty_text, list_table, onclick, options)
local f = CreateFrame("frame", name, parent, "BackdropTemplate")
f.ResetWidgets = simple_list_box_ResetWidgets
@@ -4178,20 +4173,20 @@ function DF:CreateSimpleListBox (parent, name, title, empty_text, list_table, on
f.list_table = list_table
f.func = function(self, button, value)
--onclick (value)
- DF:QuickDispatch (onclick, value)
+ detailsFramework:QuickDispatch (onclick, value)
f:Refresh()
end
f.widgets = {}
- DF:ApplyStandardBackdrop(f)
+ detailsFramework:ApplyStandardBackdrop(f)
f.options = options or {}
- self.table.deploy (f.options, default_options)
+ self.table.deploy(f.options, default_options)
if (f.options.x_button_func) then
local original_X_function = f.options.x_button_func
f.options.x_button_func = function(self, button, value)
- DF:QuickDispatch (original_X_function, value)
+ detailsFramework:QuickDispatch (original_X_function, value)
f:Refresh()
end
end
@@ -4200,12 +4195,12 @@ function DF:CreateSimpleListBox (parent, name, title, empty_text, list_table, on
f:SetSize(f.options.width + 2, f.options.height)
- local name = DF:CreateLabel(f, title, 12, "silver")
- name:SetTemplate(DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE"))
+ local name = detailsFramework:CreateLabel(f, title, 12, "silver")
+ name:SetTemplate(detailsFramework:GetTemplate("font", "OPTIONS_FONT_TEMPLATE"))
name:SetPoint("bottomleft", f, "topleft", 0, 2)
f.Title = name
- local emptyLabel = DF:CreateLabel(f, empty_text, 12, "gray")
+ local emptyLabel = detailsFramework:CreateLabel(f, empty_text, 12, "gray")
emptyLabel:SetAlpha(.6)
emptyLabel:SetSize(f.options.width-10, f.options.height)
emptyLabel:SetPoint("center", 0, 0)
@@ -4220,10 +4215,10 @@ end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- ~scrollbox
-function DF:CreateScrollBox (parent, name, refreshFunc, data, width, height, lineAmount, lineHeight, createLineFunc, autoAmount, noScroll)
+function detailsFramework:CreateScrollBox (parent, name, refreshFunc, data, width, height, lineAmount, lineHeight, createLineFunc, autoAmount, noScroll)
local scroll = CreateFrame("scrollframe", name, parent, "FauxScrollFrameTemplate, BackdropTemplate")
- DF:ApplyStandardBackdrop(scroll)
+ detailsFramework:ApplyStandardBackdrop(scroll)
scroll:SetSize(width, height)
scroll.LineAmount = lineAmount
@@ -4234,14 +4229,14 @@ function DF:CreateScrollBox (parent, name, refreshFunc, data, width, height, lin
scroll.ReajustNumFrames = autoAmount
scroll.CreateLineFunc = createLineFunc
- DF:Mixin(scroll, DF.SortFunctions)
- DF:Mixin(scroll, DF.ScrollBoxFunctions)
+ detailsFramework:Mixin(scroll, detailsFramework.SortFunctions)
+ detailsFramework:Mixin(scroll, detailsFramework.ScrollBoxFunctions)
scroll.refresh_func = refreshFunc
scroll.data = data
scroll:SetScript("OnVerticalScroll", scroll.OnVerticalScroll)
- scroll:SetScript("OnSizeChanged", DF.ScrollBoxFunctions.OnSizeChanged)
+ scroll:SetScript("OnSizeChanged", detailsFramework.ScrollBoxFunctions.OnSizeChanged)
return scroll
end
@@ -4250,7 +4245,7 @@ end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- ~resizers
-function DF:CreateResizeGrips (parent)
+function detailsFramework:CreateResizeGrips (parent)
if (parent) then
local parentName = parent:GetName()
@@ -4339,13 +4334,13 @@ local keybind_set_data = function(self, new_data_table)
self.keybindScroll:UpdateScroll()
end
-function DF:CreateKeybindBox (parent, name, data, callback, width, height, line_amount, line_height)
+function detailsFramework:CreateKeybindBox (parent, name, data, callback, width, height, line_amount, line_height)
- local options_text_template = DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")
- local options_dropdown_template = DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
- local options_switch_template = DF:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE")
- local options_slider_template = DF:GetTemplate("slider", "OPTIONS_SLIDER_TEMPLATE")
- local options_button_template = DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE")
+ local options_text_template = detailsFramework:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")
+ local options_dropdown_template = detailsFramework:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
+ local options_switch_template = detailsFramework:GetTemplate("switch", "OPTIONS_CHECKBOX_TEMPLATE")
+ local options_slider_template = detailsFramework:GetTemplate("slider", "OPTIONS_SLIDER_TEMPLATE")
+ local options_button_template = detailsFramework:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE")
local SCROLL_ROLL_AMOUNT = line_amount
@@ -4372,7 +4367,7 @@ function DF:CreateKeybindBox (parent, name, data, callback, width, height, line_
--build data table for the character class
local _, unitClass = UnitClass ("player")
if (unitClass) then
- local specIds = DF:GetClassSpecIDs (unitClass)
+ local specIds = detailsFramework:GetClassSpecIDs (unitClass)
if (specIds) then
for _, specId in ipairs(specIds) do
data [specId] = {}
@@ -4384,7 +4379,7 @@ function DF:CreateKeybindBox (parent, name, data, callback, width, height, line_
new_keybind_frame.Data = data
new_keybind_frame.SetData = keybind_set_data
- new_keybind_frame.EditingSpec = DF:GetCurrentSpec()
+ new_keybind_frame.EditingSpec = detailsFramework:GetCurrentSpec()
new_keybind_frame.CurrentKeybindEditingSet = new_keybind_frame.Data [new_keybind_frame.EditingSpec]
local allSpecButtons = {}
@@ -4406,15 +4401,15 @@ function DF:CreateKeybindBox (parent, name, data, callback, width, height, line_
end
--choose which spec to use
- local spec1 = DF:CreateButton(new_keybind_frame, switch_spec, 160, 20, "Spec1 Placeholder Text", 1, _, _, "SpecButton1", _, 0, options_button_template, options_text_template)
- local spec2 = DF:CreateButton(new_keybind_frame, switch_spec, 160, 20, "Spec2 Placeholder Text", 1, _, _, "SpecButton2", _, 0, options_button_template, options_text_template)
- local spec3 = DF:CreateButton(new_keybind_frame, switch_spec, 160, 20, "Spec3 Placeholder Text", 1, _, _, "SpecButton3", _, 0, options_button_template, options_text_template)
- local spec4 = DF:CreateButton(new_keybind_frame, switch_spec, 160, 20, "Spec4 Placeholder Text", 1, _, _, "SpecButton4", _, 0, options_button_template, options_text_template)
+ local spec1 = detailsFramework:CreateButton(new_keybind_frame, switch_spec, 160, 20, "Spec1 Placeholder Text", 1, _, _, "SpecButton1", _, 0, options_button_template, options_text_template)
+ local spec2 = detailsFramework:CreateButton(new_keybind_frame, switch_spec, 160, 20, "Spec2 Placeholder Text", 1, _, _, "SpecButton2", _, 0, options_button_template, options_text_template)
+ local spec3 = detailsFramework:CreateButton(new_keybind_frame, switch_spec, 160, 20, "Spec3 Placeholder Text", 1, _, _, "SpecButton3", _, 0, options_button_template, options_text_template)
+ local spec4 = detailsFramework:CreateButton(new_keybind_frame, switch_spec, 160, 20, "Spec4 Placeholder Text", 1, _, _, "SpecButton4", _, 0, options_button_template, options_text_template)
--format the button label and icon with the spec information
local className, class = UnitClass ("player")
local i = 1
- local specIds = DF:GetClassSpecIDs (class)
+ local specIds = detailsFramework:GetClassSpecIDs (class)
for index, specId in ipairs(specIds) do
local button = new_keybind_frame ["SpecButton" .. index]
@@ -4436,7 +4431,7 @@ function DF:CreateKeybindBox (parent, name, data, callback, width, height, line_
i = i + 1
end
- local specsTitle = DF:CreateLabel(new_keybind_frame, "Config keys for spec:", 12, "silver")
+ local specsTitle = detailsFramework:CreateLabel(new_keybind_frame, "Config keys for spec:", 12, "silver")
specsTitle:SetPoint("topleft", new_keybind_frame, "topleft", 10, mainStartY)
keybindScroll:SetPoint("topleft", specsTitle.widget, "bottomleft", 0, -120)
@@ -4454,7 +4449,7 @@ function DF:CreateKeybindBox (parent, name, data, callback, width, height, line_
enter_the_key:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
enter_the_key:SetBackdropColor(0, 0, 0, 1)
enter_the_key:SetBackdropBorderColor(1, 1, 1, 1)
- enter_the_key.text = DF:CreateLabel(enter_the_key, "- Press a keyboard key to bind.\n- Click to bind a mouse button.\n- Press escape to cancel.", 11, "orange")
+ enter_the_key.text = detailsFramework:CreateLabel(enter_the_key, "- Press a keyboard key to bind.\n- Click to bind a mouse button.\n- Press escape to cancel.", 11, "orange")
enter_the_key.text:SetPoint("center", enter_the_key, "center")
enter_the_key:Hide()
@@ -4482,7 +4477,7 @@ function DF:CreateKeybindBox (parent, name, data, callback, width, height, line_
enter_the_key:Hide()
new_keybind_frame.keybindScroll:UpdateScroll()
- DF:QuickDispatch (callback)
+ detailsFramework:QuickDispatch (callback)
end
local set_keybind_key = function(self, button, keybindIndex)
@@ -4507,14 +4502,14 @@ function DF:CreateKeybindBox (parent, name, data, callback, width, height, line_
local set_action_text = function(keybindIndex, _, text)
local keybind = new_keybind_frame.CurrentKeybindEditingSet [keybindIndex]
keybind.actiontext = text
- DF:QuickDispatch (callback)
+ detailsFramework:QuickDispatch (callback)
end
local set_action_on_espace_press = function(textentry, capsule)
capsule = capsule or textentry.MyObject
local keybind = new_keybind_frame.CurrentKeybindEditingSet [capsule.CurIndex]
textentry:SetText(keybind.actiontext)
- DF:QuickDispatch (callback)
+ detailsFramework:QuickDispatch (callback)
end
local lock_textentry = {
@@ -4530,7 +4525,7 @@ function DF:CreateKeybindBox (parent, name, data, callback, width, height, line_
local keybind = new_keybind_frame.CurrentKeybindEditingSet [keybindIndex]
keybind.action = value
new_keybind_frame.keybindScroll:UpdateScroll()
- DF:QuickDispatch (callback)
+ detailsFramework:QuickDispatch (callback)
end
local fill_action_dropdown = function()
@@ -4569,21 +4564,21 @@ function DF:CreateKeybindBox (parent, name, data, callback, width, height, line_
local key = CopyTable (keybind)
local specid, specName = DetailsFramework.GetSpecializationInfoByID (specID)
tinsert(new_keybind_frame.Data [specID], key)
- DF:Msg("Keybind copied to " .. (specName or ""))
+ detailsFramework:Msg("Keybind copied to " .. (specName or ""))
end
end
- DF:QuickDispatch (callback)
+ detailsFramework:QuickDispatch (callback)
end
local delete_keybind = function(self, button, keybindIndex)
tremove(new_keybind_frame.CurrentKeybindEditingSet, keybindIndex)
new_keybind_frame.keybindScroll:UpdateScroll()
- DF:QuickDispatch (callback)
+ detailsFramework:QuickDispatch (callback)
end
- local newTitle = DF:CreateLabel(new_keybind_frame, "Create a new Keybind:", 12, "silver")
+ local newTitle = detailsFramework:CreateLabel(new_keybind_frame, "Create a new Keybind:", 12, "silver")
newTitle:SetPoint("topleft", new_keybind_frame, "topleft", 200, mainStartY)
- local createNewKeybind = DF:CreateButton(new_keybind_frame, new_key_bind, 160, 20, "New Key Bind", 1, _, _, "NewKeybindButton", _, 0, options_button_template, options_text_template)
+ local createNewKeybind = detailsFramework:CreateButton(new_keybind_frame, new_key_bind, 160, 20, "New Key Bind", 1, _, _, "NewKeybindButton", _, 0, options_button_template, options_text_template)
createNewKeybind:SetPoint("topleft", newTitle, "bottomleft", 0, -10)
--createNewKeybind:SetIcon ([[Interface\Buttons\UI-GuildButton-PublicNote-Up]])
@@ -4667,12 +4662,12 @@ function DF:CreateKeybindBox (parent, name, data, callback, width, height, line_
f:SetScript("OnLeave", on_leave)
tinsert(keybindScroll.Frames, f)
- f.Index = DF:CreateLabel(f, "1")
- f.KeyBind = DF:CreateButton(f, set_key_bind, 100, 20, "", _, _, _, "SetNewKeybindButton", _, 0, options_button_template, options_text_template)
- f.ActionDrop = DF:CreateDropDown (f, fill_action_dropdown, 0, 120, 20, "ActionDropdown", _, options_dropdown_template)
- f.ActionText = DF:CreateTextEntry (f, function()end, 660, 20, "TextBox", _, _, options_dropdown_template)
- f.Copy = DF:CreateButton(f, copy_keybind, 20, 20, "", _, _, _, "CopyKeybindButton", _, 0, options_button_template, options_text_template)
- f.Delete = DF:CreateButton(f, delete_keybind, 16, 20, "", _, _, _, "DeleteKeybindButton", _, 2, options_button_template, options_text_template)
+ f.Index = detailsFramework:CreateLabel(f, "1")
+ f.KeyBind = detailsFramework:CreateButton(f, set_key_bind, 100, 20, "", _, _, _, "SetNewKeybindButton", _, 0, options_button_template, options_text_template)
+ f.ActionDrop = detailsFramework:CreateDropDown (f, fill_action_dropdown, 0, 120, 20, "ActionDropdown", _, options_dropdown_template)
+ f.ActionText = detailsFramework:CreateTextEntry (f, function()end, 660, 20, "TextBox", _, _, options_dropdown_template)
+ f.Copy = detailsFramework:CreateButton(f, copy_keybind, 20, 20, "", _, _, _, "CopyKeybindButton", _, 0, options_button_template, options_text_template)
+ f.Delete = detailsFramework:CreateButton(f, delete_keybind, 16, 20, "", _, _, _, "DeleteKeybindButton", _, 2, options_button_template, options_text_template)
f.Index:SetPoint("left", f, "left", 10, 0)
f.KeyBind:SetPoint("left", f, "left", 43, 0)
@@ -4712,12 +4707,12 @@ function DF:CreateKeybindBox (parent, name, data, callback, width, height, line_
header:SetPoint("bottomright", keybindScroll, "topright", 0, 2)
header:SetHeight(16)
- header.Index = DF:CreateLabel (header, "Index", DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE"))
- header.Key = DF:CreateLabel (header, "Key", DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE"))
- header.Action = DF:CreateLabel (header, "Action", DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE"))
- header.Macro = DF:CreateLabel (header, "Spell Name / Macro", DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE"))
- header.Copy = DF:CreateLabel (header, "Copy", DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE"))
- header.Delete = DF:CreateLabel (header, "Delete", DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE"))
+ header.Index = detailsFramework:CreateLabel (header, "Index", detailsFramework:GetTemplate("font", "OPTIONS_FONT_TEMPLATE"))
+ header.Key = detailsFramework:CreateLabel (header, "Key", detailsFramework:GetTemplate("font", "OPTIONS_FONT_TEMPLATE"))
+ header.Action = detailsFramework:CreateLabel (header, "Action", detailsFramework:GetTemplate("font", "OPTIONS_FONT_TEMPLATE"))
+ header.Macro = detailsFramework:CreateLabel (header, "Spell Name / Macro", detailsFramework:GetTemplate("font", "OPTIONS_FONT_TEMPLATE"))
+ header.Copy = detailsFramework:CreateLabel (header, "Copy", detailsFramework:GetTemplate("font", "OPTIONS_FONT_TEMPLATE"))
+ header.Delete = detailsFramework:CreateLabel (header, "Delete", detailsFramework:GetTemplate("font", "OPTIONS_FONT_TEMPLATE"))
header.Index:SetPoint("left", header, "left", 10, 0)
header.Key:SetPoint("left", header, "left", 43, 0)
@@ -4752,7 +4747,7 @@ function DF:CreateKeybindBox (parent, name, data, callback, width, height, line_
return new_keybind_frame
end
-function DF:BuildKeybindFunctions (data, prefix)
+function detailsFramework:BuildKeybindFunctions (data, prefix)
--~keybind
local classLoc, class = UnitClass ("player")
@@ -4836,7 +4831,7 @@ function DF:BuildKeybindFunctions (data, prefix)
end
-function DF:SetKeybindsOnProtectedFrame (frame, bind_string, bind_type_func, bind_macro_func)
+function detailsFramework:SetKeybindsOnProtectedFrame (frame, bind_string, bind_type_func, bind_macro_func)
bind_type_func (frame)
bind_macro_func (frame)
@@ -4847,7 +4842,7 @@ end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- ~standard backdrop
-function DF:ApplyStandardBackdrop(frame, solidColor, alphaScale)
+function detailsFramework:ApplyStandardBackdrop(frame, solidColor, alphaScale)
alphaScale = alphaScale or 0.95
if (not frame.SetBackdrop)then
@@ -4855,7 +4850,7 @@ function DF:ApplyStandardBackdrop(frame, solidColor, alphaScale)
Mixin(frame, BackdropTemplateMixin)
end
- local red, green, blue, alpha = DF:GetDefaultBackdropColor()
+ local red, green, blue, alpha = detailsFramework:GetDefaultBackdropColor()
if (solidColor) then
local colorDeviation = 0.05
@@ -4881,29 +4876,29 @@ end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- ~title bar
-DF.TitleFunctions = {
+detailsFramework.TitleFunctions = {
SetTitle = function(self, titleText, titleColor, font, size)
self.TitleLabel:SetText(titleText or self.TitleLabel:GetText())
if (titleColor) then
- local r, g, b, a = DF:ParseColors(titleColor)
+ local r, g, b, a = detailsFramework:ParseColors(titleColor)
self.TitleLabel:SetTextColor (r, g, b, a)
end
if (font) then
- DF:SetFontFace (self.TitleLabel, font)
+ detailsFramework:SetFontFace (self.TitleLabel, font)
end
if (size) then
- DF:SetFontSize (self.TitleLabel, size)
+ detailsFramework:SetFontSize (self.TitleLabel, size)
end
end
}
-function DF:CreateTitleBar (f, titleText)
+function detailsFramework:CreateTitleBar (f, titleText)
local titleBar = CreateFrame("frame", f:GetName() and f:GetName() .. "TitleBar" or nil, f,"BackdropTemplate")
titleBar:SetPoint("topleft", f, "topleft", 2, -3)
@@ -4926,7 +4921,7 @@ function DF:CreateTitleBar (f, titleText)
closeButton:SetAlpha(0.7)
closeButton:SetScript("OnClick", simple_panel_close_click) --upvalue from this file
- local titleLabel = titleBar:CreateFontString (titleBar:GetName() and titleBar:GetName() .. "TitleText" or nil, "overlay", "GameFontNormal")
+ local titleLabel = titleBar:CreateFontString(titleBar:GetName() and titleBar:GetName() .. "TitleText" or nil, "overlay", "GameFontNormal")
titleLabel:SetTextColor (.8, .8, .8, 1)
titleLabel:SetText(titleText or "")
@@ -4942,7 +4937,7 @@ function DF:CreateTitleBar (f, titleText)
titleBar.CloseButton = closeButton
titleBar.Text = titleLabel
- DF:Mixin (f, DF.TitleFunctions)
+ detailsFramework:Mixin (f, detailsFramework.TitleFunctions)
return titleBar
end
@@ -4951,7 +4946,7 @@ end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- ~icon row
-DF.IconRowFunctions = {
+detailsFramework.IconRowFunctions = {
GetIcon = function(self)
local iconFrame = self.IconPool [self.NextIcon]
@@ -4979,17 +4974,17 @@ DF.IconRowFunctions = {
cooldownFrame:SetHideCountdownNumbers (self.options.surpress_blizzard_cd_timer)
cooldownFrame.noCooldownCount = self.options.surpress_tulla_omni_cc
- newIconFrame.CountdownText = cooldownFrame:CreateFontString (nil, "overlay", "GameFontNormal")
+ newIconFrame.CountdownText = cooldownFrame:CreateFontString(nil, "overlay", "GameFontNormal")
--newIconFrame.CountdownText:SetPoint("center")
newIconFrame.CountdownText:SetPoint(self.options.text_anchor or "center", newIconFrame, self.options.text_rel_anchor or "center", self.options.text_x_offset or 0, self.options.text_y_offset or 0)
newIconFrame.CountdownText:Hide()
- newIconFrame.StackText = newIconFrame:CreateFontString (nil, "overlay", "GameFontNormal")
+ newIconFrame.StackText = newIconFrame:CreateFontString(nil, "overlay", "GameFontNormal")
--newIconFrame.StackText:SetPoint("bottomright")
newIconFrame.StackText:SetPoint(self.options.stack_text_anchor or "center", newIconFrame, self.options.stack_text_rel_anchor or "bottomright", self.options.stack_text_x_offset or 0, self.options.stack_text_y_offset or 0)
newIconFrame.StackText:Hide()
- newIconFrame.Desc = newIconFrame:CreateFontString (nil, "overlay", "GameFontNormal")
+ newIconFrame.Desc = newIconFrame:CreateFontString(nil, "overlay", "GameFontNormal")
--newIconFrame.Desc:SetPoint("bottom", newIconFrame, "top", 0, 2)
newIconFrame.Desc:SetPoint(self.options.desc_text_anchor or "bottom", newIconFrame, self.options.desc_text_rel_anchor or "top", self.options.desc_text_x_offset or 0, self.options.desc_text_y_offset or 2)
newIconFrame.Desc:Hide()
@@ -5023,7 +5018,7 @@ DF.IconRowFunctions = {
end
- DF:SetFontColor(iconFrame.CountdownText, self.options.text_color)
+ detailsFramework:SetFontColor(iconFrame.CountdownText, self.options.text_color)
self.NextIcon = self.NextIcon + 1
return iconFrame
@@ -5079,9 +5074,9 @@ DF.IconRowFunctions = {
iconFrame.CountdownText:SetText(formattedTime)
iconFrame.CountdownText:SetPoint(self.options.text_anchor or "center", iconFrame, self.options.text_rel_anchor or "center", self.options.text_x_offset or 0, self.options.text_y_offset or 0)
- DF:SetFontSize (iconFrame.CountdownText, self.options.text_size)
- DF:SetFontFace (iconFrame.CountdownText, self.options.text_font)
- DF:SetFontOutline (iconFrame.CountdownText, self.options.text_outline)
+ detailsFramework:SetFontSize (iconFrame.CountdownText, self.options.text_size)
+ detailsFramework:SetFontFace (iconFrame.CountdownText, self.options.text_font)
+ detailsFramework:SetFontOutline (iconFrame.CountdownText, self.options.text_outline)
if self.options.on_tick_cooldown_update then
iconFrame.lastUpdateCooldown = now
@@ -5109,11 +5104,11 @@ DF.IconRowFunctions = {
if (descText and self.options.desc_text) then
iconFrame.Desc:Show()
iconFrame.Desc:SetText(descText.text)
- iconFrame.Desc:SetTextColor (DF:ParseColors(descText.text_color or self.options.desc_text_color))
+ iconFrame.Desc:SetTextColor (detailsFramework:ParseColors(descText.text_color or self.options.desc_text_color))
iconFrame.Desc:SetPoint(self.options.desc_text_anchor or "bottom", iconFrame, self.options.desc_text_rel_anchor or "top", self.options.desc_text_x_offset or 0, self.options.desc_text_y_offset or 2)
- DF:SetFontSize (iconFrame.Desc, descText.text_size or self.options.desc_text_size)
- DF:SetFontFace (iconFrame.Desc, self.options.desc_text_font)
- DF:SetFontOutline (iconFrame.Desc, self.options.desc_text_outline)
+ detailsFramework:SetFontSize (iconFrame.Desc, descText.text_size or self.options.desc_text_size)
+ detailsFramework:SetFontFace (iconFrame.Desc, self.options.desc_text_font)
+ detailsFramework:SetFontOutline (iconFrame.Desc, self.options.desc_text_outline)
else
iconFrame.Desc:Hide()
end
@@ -5121,11 +5116,11 @@ DF.IconRowFunctions = {
if (count and count > 1 and self.options.stack_text) then
iconFrame.StackText:Show()
iconFrame.StackText:SetText(count)
- iconFrame.StackText:SetTextColor (DF:ParseColors(self.options.desc_text_color))
+ iconFrame.StackText:SetTextColor (detailsFramework:ParseColors(self.options.desc_text_color))
iconFrame.StackText:SetPoint(self.options.stack_text_anchor or "center", iconFrame, self.options.stack_text_rel_anchor or "bottomright", self.options.stack_text_x_offset or 0, self.options.stack_text_y_offset or 0)
- DF:SetFontSize (iconFrame.StackText, self.options.stack_text_size)
- DF:SetFontFace (iconFrame.StackText, self.options.stack_text_font)
- DF:SetFontOutline (iconFrame.StackText, self.options.stack_text_outline)
+ detailsFramework:SetFontSize (iconFrame.StackText, self.options.stack_text_size)
+ detailsFramework:SetFontFace (iconFrame.StackText, self.options.stack_text_font)
+ detailsFramework:SetFontOutline (iconFrame.StackText, self.options.stack_text_outline)
else
iconFrame.StackText:Hide()
end
@@ -5394,14 +5389,14 @@ local default_icon_row_options = {
cooldown_edge_texture = "Interface\\Cooldown\\edge",
}
-function DF:CreateIconRow (parent, name, options)
+function detailsFramework:CreateIconRow (parent, name, options)
local f = CreateFrame("frame", name, parent, "BackdropTemplate")
f.IconPool = {}
f.NextIcon = 1
f.AuraCache = {}
- DF:Mixin (f, DF.IconRowFunctions)
- DF:Mixin (f, DF.OptionsFunctions)
+ detailsFramework:Mixin (f, detailsFramework.IconRowFunctions)
+ detailsFramework:Mixin (f, detailsFramework.OptionsFunctions)
f:BuildOptionsTable (default_icon_row_options, options)
@@ -5419,7 +5414,7 @@ end
--~header
--mixed functions
-DF.HeaderFunctions = {
+detailsFramework.HeaderFunctions = {
AddFrameToHeaderAlignment = function(self, frame)
self.FramesToAlign = self.FramesToAlign or {}
tinsert(self.FramesToAlign, frame)
@@ -5487,7 +5482,7 @@ DF.HeaderFunctions = {
end,
}
-DF.HeaderCoreFunctions = {
+detailsFramework.HeaderCoreFunctions = {
GetColumnWidth = function(self, columnId)
return self.HeaderTable[columnId].width
end,
@@ -5639,9 +5634,9 @@ DF.HeaderCoreFunctions = {
columnHeader.Text:SetText(headerData.text)
--text options
- DF:SetFontColor(columnHeader.Text, self.options.text_color)
- DF:SetFontSize(columnHeader.Text, self.options.text_size)
- DF:SetFontOutline(columnHeader.Text, self.options.text_shadow)
+ detailsFramework:SetFontColor(columnHeader.Text, self.options.text_color)
+ detailsFramework:SetFontSize(columnHeader.Text, self.options.text_size)
+ detailsFramework:SetFontOutline(columnHeader.Text, self.options.text_shadow)
--point
if (not headerData.icon) then
@@ -5740,16 +5735,16 @@ DF.HeaderCoreFunctions = {
if (not columnHeader) then
--create a new column header
local newHeader = CreateFrame("button", "$parentHeaderIndex" .. nextHeader, self, "BackdropTemplate")
- newHeader:SetScript("OnClick", DF.HeaderFunctions.OnClick)
+ newHeader:SetScript("OnClick", detailsFramework.HeaderFunctions.OnClick)
--header icon
- DF:CreateImage(newHeader, "", self.options.header_height, self.options.header_height, "ARTWORK", nil, "Icon", "$parentIcon")
+ detailsFramework:CreateImage(newHeader, "", self.options.header_height, self.options.header_height, "ARTWORK", nil, "Icon", "$parentIcon")
--header separator
- DF:CreateImage(newHeader, "", 1, 1, "ARTWORK", nil, "Separator", "$parentSeparator")
+ detailsFramework:CreateImage(newHeader, "", 1, 1, "ARTWORK", nil, "Separator", "$parentSeparator")
--header name text
- DF:CreateLabel(newHeader, "", self.options.text_size, self.options.text_color, "GameFontNormal", "Text", "$parentText", "ARTWORK")
+ detailsFramework:CreateLabel(newHeader, "", self.options.text_size, self.options.text_color, "GameFontNormal", "Text", "$parentText", "ARTWORK")
--header selected and order icon
- DF:CreateImage(newHeader, self.options.arrow_up_texture, 12, 12, "ARTWORK", nil, "Arrow", "$parentArrow")
+ detailsFramework:CreateImage(newHeader, self.options.arrow_up_texture, 12, 12, "ARTWORK", nil, "Arrow", "$parentArrow")
newHeader.Arrow:SetPoint("right", newHeader, "right", -1, 0)
@@ -5806,11 +5801,11 @@ local default_header_options = {
line_separator_gap_align = false,
}
-function DF:CreateHeader(parent, headerTable, options, frameName)
+function detailsFramework:CreateHeader(parent, headerTable, options, frameName)
local newHeader = CreateFrame("frame", frameName or "$parentHeaderLine", parent, "BackdropTemplate")
- DF:Mixin(newHeader, DF.OptionsFunctions)
- DF:Mixin(newHeader, DF.HeaderCoreFunctions)
+ detailsFramework:Mixin(newHeader, detailsFramework.OptionsFunctions)
+ detailsFramework:Mixin(newHeader, detailsFramework.HeaderCoreFunctions)
newHeader:BuildOptionsTable(default_header_options, options)
@@ -5835,7 +5830,7 @@ local default_radiogroup_options = {
is_radio = false,
}
-DF.RadioGroupCoreFunctions = {
+detailsFramework.RadioGroupCoreFunctions = {
Disable = function(self)
local frameList = self:GetAllCheckboxes()
for _, checkbox in ipairs(frameList) do
@@ -5896,10 +5891,10 @@ DF.RadioGroupCoreFunctions = {
end,
CreateCheckbox = function(self)
- local checkbox = DF:CreateSwitch(self, function()end, false, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, DF:GetTemplate("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"))
+ local checkbox = detailsFramework:CreateSwitch(self, function()end, false, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, detailsFramework:GetTemplate("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"))
checkbox:SetAsCheckBox()
- checkbox.Icon = DF:CreateImage(checkbox, "", 16, 16)
- checkbox.Label = DF:CreateLabel(checkbox, "")
+ checkbox.Icon = detailsFramework:CreateImage(checkbox, "", 16, 16)
+ checkbox.Label = detailsFramework:CreateLabel(checkbox, "")
return checkbox
end,
@@ -5922,7 +5917,7 @@ DF.RadioGroupCoreFunctions = {
--callback
if (checkbox._callback) then
- DF:QuickDispatch(checkbox._callback, fixedParam, checkbox._optionid)
+ detailsFramework:QuickDispatch(checkbox._callback, fixedParam, checkbox._optionid)
end
end,
@@ -5936,7 +5931,7 @@ DF.RadioGroupCoreFunctions = {
checkbox._optionid = optionId
checkbox:SetFixedParameter(optionTable.param or optionId)
- local isChecked = type(optionTable.get) == "function" and DF:Dispatch(optionTable.get) or false
+ local isChecked = type(optionTable.get) == "function" and detailsFramework:Dispatch(optionTable.get) or false
checkbox:SetValue(isChecked)
checkbox.Label:SetText(optionTable.name)
@@ -5991,12 +5986,12 @@ DF.RadioGroupCoreFunctions = {
options: override options for default_radiogroup_options table
anchorOptions: override options for default_framelayout_options table
--]=]
-function DF:CreateCheckboxGroup(parent, radioOptions, name, options, anchorOptions)
+function detailsFramework:CreateCheckboxGroup(parent, radioOptions, name, options, anchorOptions)
local f = CreateFrame("frame", name, parent, "BackdropTemplate")
- DF:Mixin (f, DF.OptionsFunctions)
- DF:Mixin (f, DF.RadioGroupCoreFunctions)
- DF:Mixin (f, DF.LayoutFrame)
+ detailsFramework:Mixin (f, detailsFramework.OptionsFunctions)
+ detailsFramework:Mixin (f, detailsFramework.RadioGroupCoreFunctions)
+ detailsFramework:Mixin (f, detailsFramework.LayoutFrame)
f:BuildOptionsTable (default_radiogroup_options, options)
@@ -6008,7 +6003,7 @@ function DF:CreateCheckboxGroup(parent, radioOptions, name, options, anchorOptio
f.AnchorOptions = anchorOptions or {}
if (f.options.title) then
- local titleLabel = DF:CreateLabel(f, f.options.title, DF:GetTemplate("font", "ORANGE_FONT_TEMPLATE"))
+ local titleLabel = detailsFramework:CreateLabel(f, f.options.title, detailsFramework:GetTemplate("font", "ORANGE_FONT_TEMPLATE"))
titleLabel:SetPoint("bottomleft", f, "topleft", 0, 2)
f.Title = titleLabel
end
@@ -6018,14 +6013,14 @@ function DF:CreateCheckboxGroup(parent, radioOptions, name, options, anchorOptio
return f
end
-function DF:CreateRadionGroup(parent, radioOptions, name, options, anchorOptions) --alias for miss spelled old function
- return DF:CreateRadioGroup(parent, radioOptions, name, options, anchorOptions)
+function detailsFramework:CreateRadionGroup(parent, radioOptions, name, options, anchorOptions) --alias for miss spelled old function
+ return detailsFramework:CreateRadioGroup(parent, radioOptions, name, options, anchorOptions)
end
-function DF:CreateRadioGroup(parent, radioOptions, name, options, anchorOptions)
+function detailsFramework:CreateRadioGroup(parent, radioOptions, name, options, anchorOptions)
options = options or {}
options.is_radio = true
- return DF:CreateCheckboxGroup(parent, radioOptions, name, options, anchorOptions)
+ return detailsFramework:CreateCheckboxGroup(parent, radioOptions, name, options, anchorOptions)
end
@@ -6051,7 +6046,7 @@ local default_load_conditions_frame_options = {
name = "Object",
}
-function DF:CreateLoadFilterParser (callback)
+function detailsFramework:CreateLoadFilterParser (callback)
local f = CreateFrame("frame")
f:RegisterEvent ("PLAYER_ENTERING_WORLD")
if IS_WOW_PROJECT_MAINLINE then
@@ -6097,20 +6092,20 @@ function DF:CreateLoadFilterParser (callback)
end
end
- if (DF.CurrentPlayerRole == assignedRole) then
+ if (detailsFramework.CurrentPlayerRole == assignedRole) then
return
end
- DF.CurrentPlayerRole = assignedRole
+ detailsFramework.CurrentPlayerRole = assignedRole
end
--print("Plater Script Update:", event, ...)
- DF:QuickDispatch (callback, f.EncounterIDCached)
+ detailsFramework:QuickDispatch (callback, f.EncounterIDCached)
end)
end
-function DF:PassLoadFilters (loadTable, encounterID)
+function detailsFramework:PassLoadFilters (loadTable, encounterID)
--class
local passLoadClass
if (loadTable.class.Enabled) then
@@ -6129,7 +6124,7 @@ function DF:PassLoadFilters (loadTable, encounterID)
if (passLoadClass) then
--if is allowed to load on this class, check if the talents isn't from another class
local _, classFileName = UnitClass ("player")
- local specsForThisClass = DF:GetClassSpecIDs (classFileName)
+ local specsForThisClass = detailsFramework:GetClassSpecIDs (classFileName)
canCheckTalents = false
@@ -6165,7 +6160,7 @@ function DF:PassLoadFilters (loadTable, encounterID)
--talents
if (IS_WOW_PROJECT_MAINLINE and loadTable.talent.Enabled) then
- local talentsInUse = DF:GetCharacterTalents (false, true)
+ local talentsInUse = detailsFramework:GetCharacterTalents (false, true)
local hasTalent
for talentID, _ in pairs(talentsInUse) do
if talentID and (loadTable.talent [talentID] or loadTable.talent [talentID .. ""]) then
@@ -6180,7 +6175,7 @@ function DF:PassLoadFilters (loadTable, encounterID)
--pvptalent
if (IS_WOW_PROJECT_MAINLINE and loadTable.pvptalent.Enabled) then
- local talentsInUse = DF:GetCharacterPvPTalents (false, true)
+ local talentsInUse = detailsFramework:GetCharacterPvPTalents (false, true)
local hasTalent
for talentID, _ in pairs(talentsInUse) do
if talentID and (loadTable.pvptalent [talentID] or loadTable.pvptalent [talentID .. ""]) then
@@ -6274,30 +6269,30 @@ function DF:PassLoadFilters (loadTable, encounterID)
end
--this func will deploy the default values from the prototype into the config table
-function DF:UpdateLoadConditionsTable (configTable)
+function detailsFramework:UpdateLoadConditionsTable (configTable)
configTable = configTable or {}
- DF.table.deploy (configTable, default_load_conditions)
+ detailsFramework.table.deploy(configTable, default_load_conditions)
return configTable
end
--/run Plater.OpenOptionsPanel()PlaterOptionsPanelContainer:SelectIndex (Plater, 14)
-function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
+function detailsFramework:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
frameOptions = frameOptions or {}
- DF.table.deploy (frameOptions, default_load_conditions_frame_options)
+ detailsFramework.table.deploy(frameOptions, default_load_conditions_frame_options)
- DF:UpdateLoadConditionsTable (optionsTable)
+ detailsFramework:UpdateLoadConditionsTable (optionsTable)
if (not DetailsFrameworkLoadConditionsPanel) then
- local f = DF:CreateSimplePanel(UIParent, 970, 505, "Load Conditions", "DetailsFrameworkLoadConditionsPanel")
+ local f = detailsFramework:CreateSimplePanel(UIParent, 970, 505, "Load Conditions", "DetailsFrameworkLoadConditionsPanel")
f:SetBackdropColor(0, 0, 0, 1)
f.AllRadioGroups = {}
f.AllTextEntries = {}
f.OptionsTable = optionsTable
- DF:ApplyStandardBackdrop(f, false, 1.1)
+ detailsFramework:ApplyStandardBackdrop(f, false, 1.1)
local xStartAt = 10
local x2StartAt = 500
@@ -6314,8 +6309,8 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
map_ids = {x2StartAt, -460},
}
- local editingLabel = DF:CreateLabel(f, "Load Conditions For:")
- local editingWhatLabel = DF:CreateLabel(f, "")
+ local editingLabel = detailsFramework:CreateLabel(f, "Load Conditions For:")
+ local editingWhatLabel = detailsFramework:CreateLabel(f, "")
editingLabel:SetPoint("topleft", f, "topleft", 10, -35)
editingWhatLabel:SetPoint("left", editingLabel, "right", 2, 0)
@@ -6324,7 +6319,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
--when the user click on an option, run the callback
f.RunCallback = function()
- DF:Dispatch (f.CallbackFunc)
+ detailsFramework:Dispatch (f.CallbackFunc)
end
--when the user click on an option or when the panel is opened
@@ -6349,7 +6344,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
--create the radio group for classes
local classes = {}
- for _, classTable in pairs(DF:GetClassList()) do
+ for _, classTable in pairs(detailsFramework:GetClassList()) do
tinsert(classes, {
name = classTable.Name,
set = f.OnRadioCheckboxClick,
@@ -6360,7 +6355,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
})
end
- local classGroup = DF:CreateCheckboxGroup (f, classes, name, {width = 200, height = 200, title = "Character Class"}, {offset_x = 130, amount_per_line = 3})
+ local classGroup = detailsFramework:CreateCheckboxGroup (f, classes, name, {width = 200, height = 200, title = "Character Class"}, {offset_x = 130, amount_per_line = 3})
classGroup:SetPoint("topleft", f, "topleft", anchorPositions.class [1], anchorPositions.class [2])
classGroup.DBKey = "class"
tinsert(f.AllRadioGroups, classGroup)
@@ -6368,7 +6363,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
--create the radio group for character spec
if IS_WOW_PROJECT_MAINLINE then
local specs = {}
- for _, specID in ipairs(DF:GetClassSpecIDs (select(2, UnitClass ("player")))) do
+ for _, specID in ipairs(detailsFramework:GetClassSpecIDs (select(2, UnitClass ("player")))) do
local specID, specName, specDescription, specIcon, specBackground, specRole, specClass = DetailsFramework.GetSpecializationInfoByID (specID)
tinsert(specs, {
name = specName,
@@ -6378,7 +6373,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
texture = specIcon,
})
end
- local specGroup = DF:CreateCheckboxGroup (f, specs, name, {width = 200, height = 200, title = "Character Spec"}, {offset_x = 130, amount_per_line = 4})
+ local specGroup = detailsFramework:CreateCheckboxGroup (f, specs, name, {width = 200, height = 200, title = "Character Spec"}, {offset_x = 130, amount_per_line = 4})
specGroup:SetPoint("topleft", f, "topleft", anchorPositions.spec [1], anchorPositions.spec [2])
specGroup.DBKey = "spec"
tinsert(f.AllRadioGroups, specGroup)
@@ -6386,7 +6381,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
--create radio group for character races
local raceList = {}
- for _, raceTable in ipairs(DF:GetCharacterRaceList()) do
+ for _, raceTable in ipairs(detailsFramework:GetCharacterRaceList()) do
tinsert(raceList, {
name = raceTable.Name,
set = f.OnRadioCheckboxClick,
@@ -6394,7 +6389,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
get = function() return f.OptionsTable.race [raceTable.FileString] end,
})
end
- local raceGroup = DF:CreateCheckboxGroup (f, raceList, name, {width = 200, height = 200, title = "Character Race"})
+ local raceGroup = detailsFramework:CreateCheckboxGroup (f, raceList, name, {width = 200, height = 200, title = "Character Race"})
raceGroup:SetPoint("topleft", f, "topleft", anchorPositions.race [1], anchorPositions.race [2])
raceGroup.DBKey = "race"
tinsert(f.AllRadioGroups, raceGroup)
@@ -6402,7 +6397,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
--create radio group for talents
if IS_WOW_PROJECT_MAINLINE then
local talentList = {}
- for _, talentTable in ipairs(DF:GetCharacterTalents()) do
+ for _, talentTable in ipairs(detailsFramework:GetCharacterTalents()) do
tinsert(talentList, {
name = talentTable.Name,
set = f.OnRadioCheckboxClick,
@@ -6411,7 +6406,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
texture = talentTable.Texture,
})
end
- local talentGroup = DF:CreateCheckboxGroup (f, talentList, name, {width = 200, height = 200, title = "Characer Talents"}, {offset_x = 150, amount_per_line = 3})
+ local talentGroup = detailsFramework:CreateCheckboxGroup (f, talentList, name, {width = 200, height = 200, title = "Characer Talents"}, {offset_x = 150, amount_per_line = 3})
talentGroup:SetPoint("topleft", f, "topleft", anchorPositions.talent [1], anchorPositions.talent [2])
talentGroup.DBKey = "talent"
tinsert(f.AllRadioGroups, talentGroup)
@@ -6422,7 +6417,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
local otherTalents = CreateFrame("frame", nil, f, "BackdropTemplate")
otherTalents:SetSize(26, 26)
otherTalents:SetPoint("left", talentGroup.Title.widget, "right", 10, -2)
- otherTalents.Texture = DF:CreateImage(otherTalents, [[Interface\BUTTONS\AdventureGuideMicrobuttonAlert]], 24, 24)
+ otherTalents.Texture = detailsFramework:CreateImage(otherTalents, [[Interface\BUTTONS\AdventureGuideMicrobuttonAlert]], 24, 24)
otherTalents.Texture:SetAllPoints()
local removeTalent = function(_, _, talentID)
@@ -6433,7 +6428,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
end
local buildTalentMenu = function()
- local playerTalents = DF:GetCharacterTalents()
+ local playerTalents = detailsFramework:GetCharacterTalents()
local indexedTalents = {}
for _, talentTable in ipairs(playerTalents) do
tinsert(indexedTalents, talentTable.ID)
@@ -6444,7 +6439,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
GameCooltip2:AddLine("$div", nil, nil, -1, -1)
for talentID, _ in pairs(f.OptionsTable.talent) do
- if (type(talentID) == "number" and not DF.table.find (indexedTalents, talentID)) then
+ if (type(talentID) == "number" and not detailsFramework.table.find (indexedTalents, talentID)) then
local talentID, name, texture, selected, available = GetTalentInfoByID (talentID)
if (name) then
GameCooltip2:AddLine(name)
@@ -6483,13 +6478,13 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
GameCooltip2:CoolTipInject (otherTalents)
function f.CanShowTalentWarning()
- local playerTalents = DF:GetCharacterTalents()
+ local playerTalents = detailsFramework:GetCharacterTalents()
local indexedTalents = {}
for _, talentTable in ipairs(playerTalents) do
tinsert(indexedTalents, talentTable.ID)
end
for talentID, _ in pairs(f.OptionsTable.talent) do
- if (type(talentID) == "number" and not DF.table.find (indexedTalents, talentID)) then
+ if (type(talentID) == "number" and not detailsFramework.table.find (indexedTalents, talentID)) then
otherTalents:Show()
return
end
@@ -6502,7 +6497,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
--create radio group for pvp talents
if IS_WOW_PROJECT_MAINLINE then
local pvpTalentList = {}
- for _, talentTable in ipairs(DF:GetCharacterPvPTalents()) do
+ for _, talentTable in ipairs(detailsFramework:GetCharacterPvPTalents()) do
tinsert(pvpTalentList, {
name = talentTable.Name,
set = f.OnRadioCheckboxClick,
@@ -6511,7 +6506,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
texture = talentTable.Texture,
})
end
- local pvpTalentGroup = DF:CreateCheckboxGroup (f, pvpTalentList, name, {width = 200, height = 200, title = "Characer PvP Talents"}, {offset_x = 150, amount_per_line = 3})
+ local pvpTalentGroup = detailsFramework:CreateCheckboxGroup (f, pvpTalentList, name, {width = 200, height = 200, title = "Characer PvP Talents"}, {offset_x = 150, amount_per_line = 3})
pvpTalentGroup:SetPoint("topleft", f, "topleft", anchorPositions.pvptalent [1], anchorPositions.pvptalent [2])
pvpTalentGroup.DBKey = "pvptalent"
tinsert(f.AllRadioGroups, pvpTalentGroup)
@@ -6522,7 +6517,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
local otherTalents = CreateFrame("frame", nil, f, "BackdropTemplate")
otherTalents:SetSize(26, 26)
otherTalents:SetPoint("left", pvpTalentGroup.Title.widget, "right", 10, -2)
- otherTalents.Texture = DF:CreateImage(otherTalents, [[Interface\BUTTONS\AdventureGuideMicrobuttonAlert]], 24, 24)
+ otherTalents.Texture = detailsFramework:CreateImage(otherTalents, [[Interface\BUTTONS\AdventureGuideMicrobuttonAlert]], 24, 24)
otherTalents.Texture:SetAllPoints()
local removeTalent = function(_, _, talentID)
@@ -6533,7 +6528,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
end
local buildTalentMenu = function()
- local playerTalents = DF:GetCharacterPvPTalents()
+ local playerTalents = detailsFramework:GetCharacterPvPTalents()
local indexedTalents = {}
for _, talentTable in ipairs(playerTalents) do
tinsert(indexedTalents, talentTable.ID)
@@ -6544,7 +6539,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
GameCooltip2:AddLine("$div", nil, nil, -1, -1)
for talentID, _ in pairs(f.OptionsTable.pvptalent) do
- if (type(talentID) == "number" and not DF.table.find (indexedTalents, talentID)) then
+ if (type(talentID) == "number" and not detailsFramework.table.find (indexedTalents, talentID)) then
local _, name, texture = GetPvpTalentInfoByID (talentID)
if (name) then
GameCooltip2:AddLine(name)
@@ -6583,13 +6578,13 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
GameCooltip2:CoolTipInject (otherTalents)
function f.CanShowPvPTalentWarning()
- local playerTalents = DF:GetCharacterPvPTalents()
+ local playerTalents = detailsFramework:GetCharacterPvPTalents()
local indexedTalents = {}
for _, talentTable in ipairs(playerTalents) do
tinsert(indexedTalents, talentTable.ID)
end
for talentID, _ in pairs(f.OptionsTable.pvptalent) do
- if (type(talentID) == "number" and not DF.table.find (indexedTalents, talentID)) then
+ if (type(talentID) == "number" and not detailsFramework.table.find (indexedTalents, talentID)) then
otherTalents:Show()
return
end
@@ -6601,7 +6596,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
--create radio for group types
local groupTypes = {}
- for _, groupTable in ipairs(DF:GetGroupTypes()) do
+ for _, groupTable in ipairs(detailsFramework:GetGroupTypes()) do
tinsert(groupTypes, {
name = groupTable.Name,
set = f.OnRadioCheckboxClick,
@@ -6609,14 +6604,14 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
get = function() return f.OptionsTable.group [groupTable.ID] or f.OptionsTable.group [groupTable.ID .. ""] end,
})
end
- local groupTypesGroup = DF:CreateCheckboxGroup (f, groupTypes, name, {width = 200, height = 200, title = "Group Types"})
+ local groupTypesGroup = detailsFramework:CreateCheckboxGroup (f, groupTypes, name, {width = 200, height = 200, title = "Group Types"})
groupTypesGroup:SetPoint("topleft", f, "topleft", anchorPositions.group [1], anchorPositions.group [2])
groupTypesGroup.DBKey = "group"
tinsert(f.AllRadioGroups, groupTypesGroup)
--create radio for character roles
local roleTypes = {}
- for _, roleTable in ipairs(DF:GetRoleTypes()) do
+ for _, roleTable in ipairs(detailsFramework:GetRoleTypes()) do
tinsert(roleTypes, {
name = roleTable.Texture .. " " .. roleTable.Name,
set = f.OnRadioCheckboxClick,
@@ -6624,7 +6619,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
get = function() return f.OptionsTable.role [roleTable.ID] or f.OptionsTable.role [roleTable.ID .. ""] end,
})
end
- local roleTypesGroup = DF:CreateCheckboxGroup (f, roleTypes, name, {width = 200, height = 200, title = "Role Types"})
+ local roleTypesGroup = detailsFramework:CreateCheckboxGroup (f, roleTypes, name, {width = 200, height = 200, title = "Role Types"})
roleTypesGroup:SetPoint("topleft", f, "topleft", anchorPositions.role [1], anchorPositions.role [2])
roleTypesGroup.DBKey = "role"
tinsert(f.AllRadioGroups, roleTypesGroup)
@@ -6644,7 +6639,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
})
end
end
- local affixTypesGroup = DF:CreateCheckboxGroup (f, affixes, name, {width = 200, height = 200, title = "M+ Affixes"})
+ local affixTypesGroup = detailsFramework:CreateCheckboxGroup (f, affixes, name, {width = 200, height = 200, title = "M+ Affixes"})
affixTypesGroup:SetPoint("topleft", f, "topleft", anchorPositions.affix [1], anchorPositions.affix [2])
affixTypesGroup.DBKey = "affix"
tinsert(f.AllRadioGroups, affixTypesGroup)
@@ -6666,8 +6661,8 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
wipe (f.OptionsTable [self.DBKey])
local text = self:GetText()
- for _, ID in ipairs({strsplit (" ", text)}) do
- ID = DF:trim (ID)
+ for _, ID in ipairs({strsplit(" ", text)}) do
+ ID = detailsFramework:trim (ID)
ID = tonumber (ID)
if (ID) then
tinsert(f.OptionsTable [self.DBKey], ID)
@@ -6677,22 +6672,22 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
end
--create the text entry to type the encounter ID
- local encounterIDLabel = DF:CreateLabel(f, "Encounter ID", DF:GetTemplate("font", "ORANGE_FONT_TEMPLATE"))
- local encounterIDEditbox = DF:CreateTextEntry (f, function()end, 200, 20, "EncounterEditbox", _, _, DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
+ local encounterIDLabel = detailsFramework:CreateLabel(f, "Encounter ID", detailsFramework:GetTemplate("font", "ORANGE_FONT_TEMPLATE"))
+ local encounterIDEditbox = detailsFramework:CreateTextEntry (f, function()end, 200, 20, "EncounterEditbox", _, _, detailsFramework:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
encounterIDLabel:SetPoint("topleft", f, "topleft", anchorPositions.encounter_ids [1], anchorPositions.encounter_ids [2])
encounterIDEditbox:SetPoint("topleft", encounterIDLabel, "bottomleft", 0, -2)
encounterIDEditbox.DBKey = "encounter_ids"
encounterIDEditbox.Refresh = textEntryRefresh
encounterIDEditbox.tooltip = "Enter multiple IDs separating with a whitespace.\nExample: 35 45 95\n\nSanctum of Domination:\n"
- for _, encounterTable in ipairs(DF:GetCLEncounterIDs()) do
+ for _, encounterTable in ipairs(detailsFramework:GetCLEncounterIDs()) do
encounterIDEditbox.tooltip = encounterIDEditbox.tooltip .. encounterTable.ID .. " - " .. encounterTable.Name .. "\n"
end
encounterIDEditbox:SetHook("OnEnterPressed", textEntryOnEnterPressed)
tinsert(f.AllTextEntries, encounterIDEditbox)
--create the text entry for map ID
- local mapIDLabel = DF:CreateLabel(f, "Map ID", DF:GetTemplate("font", "ORANGE_FONT_TEMPLATE"))
- local mapIDEditbox = DF:CreateTextEntry (f, function()end, 200, 20, "MapEditbox", _, _, DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
+ local mapIDLabel = detailsFramework:CreateLabel(f, "Map ID", detailsFramework:GetTemplate("font", "ORANGE_FONT_TEMPLATE"))
+ local mapIDEditbox = detailsFramework:CreateTextEntry (f, function()end, 200, 20, "MapEditbox", _, _, detailsFramework:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
mapIDLabel:SetPoint("topleft", f, "topleft", anchorPositions.map_ids [1], anchorPositions.map_ids [2])
mapIDEditbox:SetPoint("topleft", mapIDLabel, "bottomleft", 0, -2)
mapIDEditbox.DBKey = "map_ids"
@@ -6705,7 +6700,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
if IS_WOW_PROJECT_MAINLINE then
--update the talents (might have changed if the player changed its specialization)
local talentList = {}
- for _, talentTable in ipairs(DF:GetCharacterTalents()) do
+ for _, talentTable in ipairs(detailsFramework:GetCharacterTalents()) do
tinsert(talentList, {
name = talentTable.Name,
set = DetailsFrameworkLoadConditionsPanel.OnRadioCheckboxClick,
@@ -6719,7 +6714,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
if IS_WOW_PROJECT_MAINLINE then
local pvpTalentList = {}
- for _, talentTable in ipairs(DF:GetCharacterPvPTalents()) do
+ for _, talentTable in ipairs(detailsFramework:GetCharacterPvPTalents()) do
tinsert(pvpTalentList, {
name = talentTable.Name,
set = DetailsFrameworkLoadConditionsPanel.OnRadioCheckboxClick,
@@ -6771,7 +6766,7 @@ end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--simple data scroll
-DF.DataScrollFunctions = {
+detailsFramework.DataScrollFunctions = {
RefreshScroll = function(self, data, offset, totalLines)
local filter = self.Filter
local currentData = {}
@@ -6821,9 +6816,9 @@ DF.DataScrollFunctions = {
line:SetBackdropColor(unpack(self.options.backdrop_color))
line:SetBackdropBorderColor(unpack(self.options.backdrop_border_color))
- local title = DF:CreateLabel(line, "", DF:GetTemplate("font", self.options.title_template))
- local date = DF:CreateLabel(line, "", DF:GetTemplate("font", self.options.title_template))
- local text = DF:CreateLabel(line, "", DF:GetTemplate("font", self.options.text_tempate))
+ local title = detailsFramework:CreateLabel(line, "", detailsFramework:GetTemplate("font", self.options.title_template))
+ local date = detailsFramework:CreateLabel(line, "", detailsFramework:GetTemplate("font", self.options.title_template))
+ local text = detailsFramework:CreateLabel(line, "", detailsFramework:GetTemplate("font", self.options.text_tempate))
title.textsize = 14
date.textsize = 14
@@ -6872,7 +6867,7 @@ DF.DataScrollFunctions = {
end
if (line:GetParent().OnUpdateLineHook) then
- DF:CoreDispatch ((line:GetName() or "ScrollBoxDataScrollUpdateLineHook") .. ":UpdateLineHook()", line:GetParent().OnUpdateLineHook, line, lineIndex, data)
+ detailsFramework:CoreDispatch ((line:GetName() or "ScrollBoxDataScrollUpdateLineHook") .. ":UpdateLineHook()", line:GetParent().OnUpdateLineHook, line, lineIndex, data)
end
end,
}
@@ -6893,12 +6888,12 @@ local default_datascroll_options = {
title_template = "ORANGE_FONT_TEMPLATE",
text_tempate = "OPTIONS_FONT_TEMPLATE",
- create_line_func = DF.DataScrollFunctions.CreateLine,
- update_line_func = DF.DataScrollFunctions.UpdateLine,
- refresh_func = DF.DataScrollFunctions.RefreshScroll,
- on_enter = DF.DataScrollFunctions.LineOnEnter,
- on_leave = DF.DataScrollFunctions.LineOnLeave,
- on_click = DF.DataScrollFunctions.OnClick,
+ create_line_func = detailsFramework.DataScrollFunctions.CreateLine,
+ update_line_func = detailsFramework.DataScrollFunctions.UpdateLine,
+ refresh_func = detailsFramework.DataScrollFunctions.RefreshScroll,
+ on_enter = detailsFramework.DataScrollFunctions.LineOnEnter,
+ on_leave = detailsFramework.DataScrollFunctions.LineOnLeave,
+ on_click = detailsFramework.DataScrollFunctions.OnClick,
data = {},
}
@@ -6910,19 +6905,19 @@ local default_datascroll_options = {
@name = the frame name to use in the CreateFrame call
@options = options table to override default values from the table above
--]=]
-function DF:CreateDataScrollFrame (parent, name, options)
+function detailsFramework:CreateDataScrollFrame (parent, name, options)
--call the mixin with a dummy table to built the default options before the frame creation
--this is done because CreateScrollBox needs parameters at creation time
local optionsTable = {}
- DF.OptionsFunctions.BuildOptionsTable (optionsTable, default_datascroll_options, options)
+ detailsFramework.OptionsFunctions.BuildOptionsTable (optionsTable, default_datascroll_options, options)
optionsTable = optionsTable.options
--scroll frame
- local newScroll = DF:CreateScrollBox (parent, name, optionsTable.refresh_func, optionsTable.data, optionsTable.width, optionsTable.height, optionsTable.line_amount, optionsTable.line_height)
- DF:ReskinSlider(newScroll)
+ local newScroll = detailsFramework:CreateScrollBox (parent, name, optionsTable.refresh_func, optionsTable.data, optionsTable.width, optionsTable.height, optionsTable.line_amount, optionsTable.line_height)
+ detailsFramework:ReskinSlider(newScroll)
- DF:Mixin (newScroll, DF.OptionsFunctions)
- DF:Mixin (newScroll, DF.LayoutFrame)
+ detailsFramework:Mixin (newScroll, detailsFramework.OptionsFunctions)
+ detailsFramework:Mixin (newScroll, detailsFramework.LayoutFrame)
newScroll:BuildOptionsTable (default_datascroll_options, options)
@@ -6954,7 +6949,7 @@ local default_newsframe_options = {
show_title = true,
}
-DF.NewsFrameFunctions = {
+detailsFramework.NewsFrameFunctions = {
}
@@ -6963,7 +6958,7 @@ DF.NewsFrameFunctions = {
@newsTable = an indexed table of tables
@lastNewsTime = last time the player opened the news window
--]=]
-function DF:GetNumNews (newsTable, lastNewsTime)
+function detailsFramework:GetNumNews (newsTable, lastNewsTime)
local now = time()
local nonReadNews = 0
@@ -6984,14 +6979,14 @@ end
@newsTable = an indexed table of tables
@db = (optional) an empty table from the addon database to store the position of the frame between game sessions
--]=]
-function DF:CreateNewsFrame (parent, name, options, newsTable, db)
+function detailsFramework:CreateNewsFrame (parent, name, options, newsTable, db)
- local f = DF:CreateSimplePanel(parent, 400, 700, options and options.title or default_newsframe_options.title, name, {UseScaleBar = db and true}, db)
+ local f = detailsFramework:CreateSimplePanel(parent, 400, 700, options and options.title or default_newsframe_options.title, name, {UseScaleBar = db and true}, db)
f:SetFrameStrata("MEDIUM")
- DF:ApplyStandardBackdrop(f)
+ detailsFramework:ApplyStandardBackdrop(f)
- DF:Mixin (f, DF.OptionsFunctions)
- DF:Mixin (f, DF.LayoutFrame)
+ detailsFramework:Mixin (f, detailsFramework.OptionsFunctions)
+ detailsFramework:Mixin (f, detailsFramework.LayoutFrame)
f:BuildOptionsTable (default_newsframe_options, options)
@@ -7007,7 +7002,7 @@ function DF:CreateNewsFrame (parent, name, options, newsTable, db)
line_amount = f.options.line_amount,
line_height = f.options.line_height,
}
- local newsScroll = DF:CreateDataScrollFrame (f, "$parentScroll", scrollOptions)
+ local newsScroll = detailsFramework:CreateDataScrollFrame (f, "$parentScroll", scrollOptions)
if (not f.options.show_title) then
f.TitleBar:Hide()
@@ -7035,14 +7030,14 @@ end
}
]]
-function DF:BuildStatusbarAuthorInfo(f, addonBy, authorsNameString)
- local authorName = DF:CreateLabel(f, "" .. (addonBy or "An addon by ") .. "|cFFFFFFFF" .. (authorsNameString or "Terciob") .. "|r")
+function detailsFramework:BuildStatusbarAuthorInfo(f, addonBy, authorsNameString)
+ local authorName = detailsFramework:CreateLabel(f, "" .. (addonBy or "An addon by ") .. "|cFFFFFFFF" .. (authorsNameString or "Terciob") .. "|r")
authorName.textcolor = "silver"
- local discordLabel = DF:CreateLabel(f, "Discord: ")
+ local discordLabel = detailsFramework:CreateLabel(f, "Discord: ")
discordLabel.textcolor = "silver"
- local options_dropdown_template = DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
- local discordTextEntry = DF:CreateTextEntry (f, function()end, 200, 18, "DiscordTextBox", _, _, options_dropdown_template)
+ local options_dropdown_template = detailsFramework:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
+ local discordTextEntry = detailsFramework:CreateTextEntry (f, function()end, 200, 18, "DiscordTextBox", _, _, options_dropdown_template)
discordTextEntry:SetText("https://discord.gg/AGSzAZX")
discordTextEntry:SetFrameLevel(5000)
@@ -7069,11 +7064,11 @@ local statusbar_default_options = {
attach = "bottom", --bottomleft from statusbar attach to bottomleft of the frame | other option is "top": topleft attach to bottomleft
}
-function DF:CreateStatusBar(f, options)
+function detailsFramework:CreateStatusBar(f, options)
local statusBar = CreateFrame("frame", nil, f, "BackdropTemplate")
- DF:Mixin (statusBar, DF.OptionsFunctions)
- DF:Mixin (statusBar, DF.LayoutFrame)
+ detailsFramework:Mixin (statusBar, detailsFramework.OptionsFunctions)
+ detailsFramework:Mixin (statusBar, detailsFramework.LayoutFrame)
statusBar:BuildOptionsTable (statusbar_default_options, options)
@@ -7087,7 +7082,7 @@ function DF:CreateStatusBar(f, options)
end
statusBar:SetHeight(20)
- DF:ApplyStandardBackdrop(statusBar)
+ detailsFramework:ApplyStandardBackdrop(statusBar)
statusBar:SetAlpha(0.8)
return statusBar
@@ -7108,7 +7103,7 @@ end
--]=]
-DF.StatusBarFunctions = {
+detailsFramework.StatusBarFunctions = {
SetTexture = function(self, texture)
self.barTexture:SetTexture(texture)
end,
@@ -7134,7 +7129,7 @@ DF.StatusBarFunctions = {
end,
SetColor = function(self, r, g, b, a)
- r, g, b, a = DF:ParseColors(r, g, b, a)
+ r, g, b, a = detailsFramework:ParseColors(r, g, b, a)
self:SetStatusBarColor (r, g, b, a)
end,
@@ -7191,14 +7186,14 @@ DF.StatusBarFunctions = {
if (object.GetObjectType and object:GetObjectType() == "Texture") then
object:AddMaskTexture(self.barTextureMask)
else
- DF:Msg("Invalid 'Texture' to object:AddMaskTexture(Texture)", debugstack())
+ detailsFramework:Msg("Invalid 'Texture' to object:AddMaskTexture(Texture)", debugstack())
end
end,
CreateTextureMask = function(self)
local barTexture = self:GetStatusBarTexture() or self.barTexture
if (not barTexture) then
- DF:Msg("Object doesn't not have a statubar texture, create one and object:SetStatusBarTexture(textureObject)", debugstack())
+ detailsFramework:Msg("Object doesn't not have a statubar texture, create one and object:SetStatusBarTexture(textureObject)", debugstack())
return
end
@@ -7223,7 +7218,7 @@ DF.StatusBarFunctions = {
HasTextureMask = function(self)
if (not self.barTextureMask) then
- DF:Msg("Object doesn't not have a texture mask, create one using object:CreateTextureMask()", debugstack())
+ detailsFramework:Msg("Object doesn't not have a texture mask, create one using object:CreateTextureMask()", debugstack())
return false
end
return true
@@ -7253,7 +7248,7 @@ DF.StatusBarFunctions = {
end,
SetBorderColor = function(self, r, g, b, a)
- r, g, b, a = DF:ParseColors(r, g, b, a)
+ r, g, b, a = detailsFramework:ParseColors(r, g, b, a)
if (self.barBorderTextureForMask and self.barBorderTextureForMask:IsShown()) then
self.barBorderTextureForMask:SetVertexColor(r, g, b, a)
@@ -7357,18 +7352,18 @@ DF.StatusBarFunctions = {
--healthBar meta prototype
local healthBarMetaPrototype = {
WidgetType = "healthBar",
- SetHook = DF.SetHook,
- RunHooksForWidget = DF.RunHooksForWidget,
+ SetHook = detailsFramework.SetHook,
+ RunHooksForWidget = detailsFramework.RunHooksForWidget,
- dversion = DF.dversion,
+ dversion = detailsFramework.dversion,
}
--check if there's a metaPrototype already existing
- if (_G[DF.GlobalWidgetControlNames["healthBar"]]) then
+ if (_G[detailsFramework.GlobalWidgetControlNames["healthBar"]]) then
--get the already existing metaPrototype
- local oldMetaPrototype = _G[DF.GlobalWidgetControlNames ["healthBar"]]
+ local oldMetaPrototype = _G[detailsFramework.GlobalWidgetControlNames ["healthBar"]]
--check if is older
- if ( (not oldMetaPrototype.dversion) or (oldMetaPrototype.dversion < DF.dversion) ) then
+ if ( (not oldMetaPrototype.dversion) or (oldMetaPrototype.dversion < detailsFramework.dversion) ) then
--the version is older them the currently loading one
--copy the new values into the old metatable
for funcName, _ in pairs(healthBarMetaPrototype) do
@@ -7377,10 +7372,10 @@ DF.StatusBarFunctions = {
end
else
--first time loading the framework
- _G[DF.GlobalWidgetControlNames ["healthBar"]] = healthBarMetaPrototype
+ _G[detailsFramework.GlobalWidgetControlNames ["healthBar"]] = healthBarMetaPrototype
end
- local healthBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["healthBar"]]
+ local healthBarMetaFunctions = _G[detailsFramework.GlobalWidgetControlNames ["healthBar"]]
--hook list
local defaultHooksForHealthBar = {
@@ -7393,7 +7388,7 @@ DF.StatusBarFunctions = {
--use the hook already existing
healthBarMetaFunctions.HookList = healthBarMetaFunctions.HookList or defaultHooksForHealthBar
--copy the non existing values from a new version to the already existing hook table
- DF.table.deploy (healthBarMetaFunctions.HookList, defaultHooksForHealthBar)
+ detailsFramework.table.deploy(healthBarMetaFunctions.HookList, defaultHooksForHealthBar)
--Health Bar Meta Functions
@@ -7404,7 +7399,7 @@ DF.StatusBarFunctions = {
ShowShields = true, --indicator of the amount of damage absortion the unit has
--appearance
- BackgroundColor = DF:CreateColorTable (.2, .2, .2, .8),
+ BackgroundColor = detailsFramework:CreateColorTable (.2, .2, .2, .8),
Texture = [[Interface\RaidFrame\Raid-Bar-Hp-Fill]],
ShieldIndicatorTexture = [[Interface\RaidFrame\Shield-Fill]],
ShieldGlowTexture = [[Interface\RaidFrame\Shield-Overshield]],
@@ -7665,7 +7660,7 @@ DF.StatusBarFunctions = {
-- ~healthbar
-function DF:CreateHealthBar (parent, name, settingsOverride)
+function detailsFramework:CreateHealthBar (parent, name, settingsOverride)
assert (name or parent:GetName(), "DetailsFramework:CreateHealthBar parameter 'name' omitted and parent has no name.")
@@ -7694,20 +7689,20 @@ function DF:CreateHealthBar (parent, name, settingsOverride)
end
--mixins
- DF:Mixin (healthBar, healthBarMetaFunctions)
- DF:Mixin (healthBar, DF.StatusBarFunctions)
+ detailsFramework:Mixin (healthBar, healthBarMetaFunctions)
+ detailsFramework:Mixin (healthBar, detailsFramework.StatusBarFunctions)
healthBar:CreateTextureMask()
--settings and hooks
- local settings = DF.table.copy ({}, healthBarMetaFunctions.Settings)
+ local settings = detailsFramework.table.copy ({}, healthBarMetaFunctions.Settings)
if (settingsOverride) then
- DF.table.copy (settings, settingsOverride)
+ detailsFramework.table.copy (settings, settingsOverride)
end
healthBar.Settings = settings
--hook list
- healthBar.HookList = DF.table.copy ({}, healthBarMetaFunctions.HookList)
+ healthBar.HookList = detailsFramework.table.copy ({}, healthBarMetaFunctions.HookList)
--initialize the cast bar
healthBar:Initialize()
@@ -7726,11 +7721,11 @@ end
@settingsOverride = table with keys and values to replace the defaults from the framework
--]=]
-DF.PowerFrameFunctions = {
+detailsFramework.PowerFrameFunctions = {
WidgetType = "powerBar",
- SetHook = DF.SetHook,
- RunHooksForWidget = DF.RunHooksForWidget,
+ SetHook = detailsFramework.SetHook,
+ RunHooksForWidget = detailsFramework.RunHooksForWidget,
HookList = {
OnHide = {},
@@ -7745,7 +7740,7 @@ DF.PowerFrameFunctions = {
CanTick = false, --if it calls the OnTick function every tick
--appearance
- BackgroundColor = DF:CreateColorTable (.2, .2, .2, .8),
+ BackgroundColor = detailsFramework:CreateColorTable (.2, .2, .2, .8),
Texture = [[Interface\RaidFrame\Raid-Bar-Resource-Fill]],
--default size
@@ -7819,9 +7814,9 @@ DF.PowerFrameFunctions = {
self.percentText:Show()
PixelUtil.SetPoint (self.percentText, "center", self, "center", 0, 0)
- DF:SetFontSize (self.percentText, 9)
- DF:SetFontColor(self.percentText, "white")
- DF:SetFontOutline (self.percentText, "OUTLINE")
+ detailsFramework:SetFontSize (self.percentText, 9)
+ detailsFramework:SetFontColor(self.percentText, "white")
+ detailsFramework:SetFontOutline (self.percentText, "OUTLINE")
else
self.percentText:Hide()
end
@@ -7941,7 +7936,7 @@ DF.PowerFrameFunctions = {
}
-- ~powerbar
-function DF:CreatePowerBar (parent, name, settingsOverride)
+function detailsFramework:CreatePowerBar (parent, name, settingsOverride)
assert (name or parent:GetName(), "DetailsFramework:CreatePowerBar parameter 'name' omitted and parent has no name.")
@@ -7956,23 +7951,23 @@ function DF:CreatePowerBar (parent, name, settingsOverride)
powerBar:SetStatusBarTexture (powerBar.barTexture)
--overlay
- powerBar.percentText = powerBar:CreateFontString (nil, "overlay", "GameFontNormal")
+ powerBar.percentText = powerBar:CreateFontString(nil, "overlay", "GameFontNormal")
end
--mixins
- DF:Mixin (powerBar, DF.PowerFrameFunctions)
- DF:Mixin (powerBar, DF.StatusBarFunctions)
+ detailsFramework:Mixin (powerBar, detailsFramework.PowerFrameFunctions)
+ detailsFramework:Mixin (powerBar, detailsFramework.StatusBarFunctions)
powerBar:CreateTextureMask()
--settings and hooks
- local settings = DF.table.copy ({}, DF.PowerFrameFunctions.Settings)
+ local settings = detailsFramework.table.copy ({}, detailsFramework.PowerFrameFunctions.Settings)
if (settingsOverride) then
- DF.table.copy (settings, settingsOverride)
+ detailsFramework.table.copy (settings, settingsOverride)
end
powerBar.Settings = settings
- local hookList = DF.table.copy ({}, DF.PowerFrameFunctions.HookList)
+ local hookList = detailsFramework.table.copy ({}, detailsFramework.PowerFrameFunctions.HookList)
powerBar.HookList = hookList
--initialize the cast bar
@@ -7992,11 +7987,11 @@ end
@settingsOverride = table with keys and values to replace the defaults from the framework
--]=]
-DF.CastFrameFunctions = {
+detailsFramework.CastFrameFunctions = {
WidgetType = "castBar",
- SetHook = DF.SetHook,
- RunHooksForWidget = DF.RunHooksForWidget,
+ SetHook = detailsFramework.SetHook,
+ RunHooksForWidget = detailsFramework.RunHooksForWidget,
HookList = {
OnHide = {},
@@ -8037,16 +8032,16 @@ DF.CastFrameFunctions = {
--colour the castbar statusbar by the type of the cast
Colors = {
- Casting = DF:CreateColorTable (1, 0.73, .1, 1),
- Channeling = DF:CreateColorTable (1, 0.73, .1, 1),
- Finished = DF:CreateColorTable (0, 1, 0, 1),
- NonInterruptible = DF:CreateColorTable (.7, .7, .7, 1),
- Failed = DF:CreateColorTable (.4, .4, .4, 1),
- Interrupted = DF:CreateColorTable (.965, .754, .154, 1),
+ Casting = detailsFramework:CreateColorTable (1, 0.73, .1, 1),
+ Channeling = detailsFramework:CreateColorTable (1, 0.73, .1, 1),
+ Finished = detailsFramework:CreateColorTable (0, 1, 0, 1),
+ NonInterruptible = detailsFramework:CreateColorTable (.7, .7, .7, 1),
+ Failed = detailsFramework:CreateColorTable (.4, .4, .4, 1),
+ Interrupted = detailsFramework:CreateColorTable (.965, .754, .154, 1),
},
--appearance
- BackgroundColor = DF:CreateColorTable (.2, .2, .2, .8),
+ BackgroundColor = detailsFramework:CreateColorTable (.2, .2, .2, .8),
Texture = [[Interface\TargetingFrame\UI-StatusBar]],
BorderShieldWidth = 10,
BorderShieldHeight = 12,
@@ -8917,7 +8912,7 @@ end -- end classic era
-- ~castbar
-function DF:CreateCastBar (parent, name, settingsOverride)
+function detailsFramework:CreateCastBar (parent, name, settingsOverride)
assert (name or parent:GetName(), "DetailsFramework:CreateCastBar parameter 'name' omitted and parent has no name.")
@@ -8934,7 +8929,7 @@ function DF:CreateCastBar (parent, name, settingsOverride)
castBar.extraBackground = castBar:CreateTexture(nil, "background", nil, -5)
--overlay
- castBar.Text = castBar:CreateFontString (nil, "overlay", "SystemFont_Shadow_Small")
+ castBar.Text = castBar:CreateFontString(nil, "overlay", "SystemFont_Shadow_Small")
castBar.Text:SetDrawLayer ("overlay", 1)
castBar.Text:SetPoint("center", 0, 0)
@@ -8948,7 +8943,7 @@ function DF:CreateCastBar (parent, name, settingsOverride)
castBar.Spark:SetBlendMode("ADD")
--time left on the cast
- castBar.percentText = castBar:CreateFontString (nil, "overlay", "SystemFont_Shadow_Small")
+ castBar.percentText = castBar:CreateFontString(nil, "overlay", "SystemFont_Shadow_Small")
castBar.percentText:SetDrawLayer ("overlay", 7)
--statusbar texture
@@ -8956,12 +8951,12 @@ function DF:CreateCastBar (parent, name, settingsOverride)
castBar:SetStatusBarTexture (castBar.barTexture)
--animations fade in and out
- local fadeOutAnimationHub = DF:CreateAnimationHub (castBar, DF.CastFrameFunctions.Animation_FadeOutStarted, DF.CastFrameFunctions.Animation_FadeOutFinished)
- fadeOutAnimationHub.alpha1 = DF:CreateAnimation(fadeOutAnimationHub, "ALPHA", 1, 1, 1, 0)
+ local fadeOutAnimationHub = detailsFramework:CreateAnimationHub (castBar, detailsFramework.CastFrameFunctions.Animation_FadeOutStarted, detailsFramework.CastFrameFunctions.Animation_FadeOutFinished)
+ fadeOutAnimationHub.alpha1 = detailsFramework:CreateAnimation(fadeOutAnimationHub, "ALPHA", 1, 1, 1, 0)
castBar.fadeOutAnimation = fadeOutAnimationHub
- local fadeInAnimationHub = DF:CreateAnimationHub (castBar, DF.CastFrameFunctions.Animation_FadeInStarted, DF.CastFrameFunctions.Animation_FadeInFinished)
- fadeInAnimationHub.alpha1 = DF:CreateAnimation(fadeInAnimationHub, "ALPHA", 1, 0.150, 0, 1)
+ local fadeInAnimationHub = detailsFramework:CreateAnimationHub (castBar, detailsFramework.CastFrameFunctions.Animation_FadeInStarted, detailsFramework.CastFrameFunctions.Animation_FadeInFinished)
+ fadeInAnimationHub.alpha1 = detailsFramework:CreateAnimation(fadeInAnimationHub, "ALPHA", 1, 0.150, 0, 1)
castBar.fadeInAnimation = fadeInAnimationHub
--animatios flash
@@ -8973,15 +8968,15 @@ function DF:CreateCastBar (parent, name, settingsOverride)
flashTexture:SetBlendMode("ADD")
castBar.flashTexture = flashTexture
- local flashAnimationHub = DF:CreateAnimationHub (flashTexture, function() flashTexture:Show() end, function() flashTexture:Hide() end)
- DF:CreateAnimation(flashAnimationHub, "ALPHA", 1, 0.2, 0, 0.8)
- DF:CreateAnimation(flashAnimationHub, "ALPHA", 2, 0.2, 1, 0)
+ local flashAnimationHub = detailsFramework:CreateAnimationHub (flashTexture, function() flashTexture:Show() end, function() flashTexture:Hide() end)
+ detailsFramework:CreateAnimation(flashAnimationHub, "ALPHA", 1, 0.2, 0, 0.8)
+ detailsFramework:CreateAnimation(flashAnimationHub, "ALPHA", 2, 0.2, 1, 0)
castBar.flashAnimation = flashAnimationHub
end
--mixins
- DF:Mixin (castBar, DF.CastFrameFunctions)
- DF:Mixin (castBar, DF.StatusBarFunctions)
+ detailsFramework:Mixin (castBar, detailsFramework.CastFrameFunctions)
+ detailsFramework:Mixin (castBar, detailsFramework.StatusBarFunctions)
castBar:CreateTextureMask()
castBar:AddMaskTexture(castBar.flashTexture)
@@ -8989,13 +8984,13 @@ function DF:CreateCastBar (parent, name, settingsOverride)
castBar:AddMaskTexture(castBar.extraBackground)
--settings and hooks
- local settings = DF.table.copy ({}, DF.CastFrameFunctions.Settings)
+ local settings = detailsFramework.table.copy ({}, detailsFramework.CastFrameFunctions.Settings)
if (settingsOverride) then
- DF.table.copy (settings, settingsOverride)
+ detailsFramework.table.copy (settings, settingsOverride)
end
castBar.Settings = settings
- local hookList = DF.table.copy ({}, DF.CastFrameFunctions.HookList)
+ local hookList = detailsFramework.table.copy ({}, detailsFramework.CastFrameFunctions.HookList)
castBar.HookList = hookList
--initialize the cast bar
@@ -9014,9 +9009,9 @@ end
@name = name of the frame, if omitted a random name is created
--]=]
-DF.BorderFunctions = {
+detailsFramework.BorderFunctions = {
SetBorderColor = function(self, r, g, b, a)
- r, g, b, a = DF:ParseColors(r, g, b, a)
+ r, g, b, a = detailsFramework:ParseColors(r, g, b, a)
for _, texture in ipairs(self.allTextures) do
texture:SetVertexColor(r, g, b, a)
end
@@ -9033,7 +9028,7 @@ DF.BorderFunctions = {
}
-- ~borderframe
-function DF:CreateBorderFrame (parent, name)
+function detailsFramework:CreateBorderFrame (parent, name)
local parentName = name or "DetailsFrameworkBorderFrame" .. tostring (math.random (1, 100000000))
@@ -9041,7 +9036,7 @@ function DF:CreateBorderFrame (parent, name)
f:SetFrameLevel(f:GetFrameLevel()+1)
f:SetAllPoints()
- DF:Mixin (f, DF.BorderFunctions)
+ detailsFramework:Mixin (f, detailsFramework.BorderFunctions)
f.allTextures = {}
@@ -9113,7 +9108,7 @@ end
return unit and not UnitPlayerControlled (unit) and UnitIsTapDenied (unit)
end
- DF.UnitFrameFunctions = {
+ detailsFramework.UnitFrameFunctions = {
WidgetType = "unitFrame",
@@ -9134,7 +9129,7 @@ end
--misc
ShowTargetOverlay = true, --shows a highlighht for the player current target
- BorderColor = DF:CreateColorTable (0, 0, 0, 1), --border color, set to alpha zero for no border
+ BorderColor = detailsFramework:CreateColorTable (0, 0, 0, 1), --border color, set to alpha zero for no border
CanTick = false, --if true it'll run the OnTick event
--size
@@ -9352,7 +9347,7 @@ end
if (r) then
--check if passed a special color
if (type(r) ~= "number") then
- r, g, b = DF:ParseColors(r)
+ r, g, b = detailsFramework:ParseColors(r)
end
self:SetHealthBarColor (r, g, b)
@@ -9538,7 +9533,7 @@ end
-- ~unitframe
local globalBaseFrameLevel = 1 -- to be increased + used across each new plate
-function DF:CreateUnitFrame (parent, name, unitFrameSettingsOverride, healthBarSettingsOverride, castBarSettingsOverride, powerBarSettingsOverride)
+function detailsFramework:CreateUnitFrame (parent, name, unitFrameSettingsOverride, healthBarSettingsOverride, castBarSettingsOverride, powerBarSettingsOverride)
local parentName = name or ("DetailsFrameworkUnitFrame" .. tostring (math.random (1, 100000000)))
@@ -9553,22 +9548,22 @@ function DF:CreateUnitFrame (parent, name, unitFrameSettingsOverride, healthBarS
f:SetFrameLevel(baseFrameLevel)
--create the healthBar
- local healthBar = DF:CreateHealthBar (f, false, healthBarSettingsOverride)
+ local healthBar = detailsFramework:CreateHealthBar (f, false, healthBarSettingsOverride)
healthBar:SetFrameLevel(baseFrameLevel + 1)
f.healthBar = healthBar
--create the power bar
- local powerBar = DF:CreatePowerBar (f, false, powerBarSettingsOverride)
+ local powerBar = detailsFramework:CreatePowerBar (f, false, powerBarSettingsOverride)
powerBar:SetFrameLevel(baseFrameLevel + 2)
f.powerBar = powerBar
--create the castBar
- local castBar = DF:CreateCastBar (f, false, castBarSettingsOverride)
+ local castBar = detailsFramework:CreateCastBar (f, false, castBarSettingsOverride)
castBar:SetFrameLevel(baseFrameLevel + 3)
f.castBar = castBar
--border frame
- local borderFrame = DF:CreateBorderFrame (f, f:GetName() .. "Border")
+ local borderFrame = detailsFramework:CreateBorderFrame (f, f:GetName() .. "Border")
borderFrame:SetFrameLevel(f:GetFrameLevel() + 5)
f.border = borderFrame
@@ -9580,7 +9575,7 @@ function DF:CreateUnitFrame (parent, name, unitFrameSettingsOverride, healthBarS
--unit frame layers
do
--artwork
- f.unitName = f:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ f.unitName = f:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
PixelUtil.SetPoint (f.unitName, "topleft", healthBar, "topleft", 2, -2, 1, 1)
--target overlay - it's parented in the healthbar so other widgets won't get the overlay
@@ -9593,12 +9588,12 @@ function DF:CreateUnitFrame (parent, name, unitFrameSettingsOverride, healthBarS
--mixins
--inject mixins
- DF:Mixin (f, DF.UnitFrameFunctions)
+ detailsFramework:Mixin (f, detailsFramework.UnitFrameFunctions)
--create the settings table and copy the overrides into it, the table is set into the frame after the mixin
- local unitFrameSettings = DF.table.copy ({}, DF.UnitFrameFunctions.Settings)
+ local unitFrameSettings = detailsFramework.table.copy ({}, detailsFramework.UnitFrameFunctions.Settings)
if (unitFrameSettingsOverride) then
- unitFrameSettings = DF.table.copy (unitFrameSettings, unitFrameSettingsOverride)
+ unitFrameSettings = detailsFramework.table.copy (unitFrameSettings, unitFrameSettingsOverride)
end
f.Settings = unitFrameSettings
@@ -9676,23 +9671,23 @@ local elapsedtime_frame_options = {
draw_line_thickness = 1,
}
-DF.TimeLineElapsedTimeFunctions = {
+detailsFramework.TimeLineElapsedTimeFunctions = {
--get a label and update its appearance
GetLabel = function(self, index)
local label = self.labels [index]
if (not label) then
- label = self:CreateFontString (nil, "artwork", "GameFontNormal")
+ label = self:CreateFontString(nil, "artwork", "GameFontNormal")
label.line = self:CreateTexture(nil, "artwork")
label.line:SetColorTexture (1, 1, 1)
label.line:SetPoint("topleft", label, "bottomleft", 0, -2)
self.labels [index] = label
end
- DF:SetFontColor(label, self.options.text_color)
- DF:SetFontSize (label, self.options.text_size)
- DF:SetFontFace (label, self.options.text_font)
- DF:SetFontOutline (label, self.options.text_outline)
+ detailsFramework:SetFontColor(label, self.options.text_color)
+ detailsFramework:SetFontSize (label, self.options.text_size)
+ detailsFramework:SetFontFace (label, self.options.text_font)
+ detailsFramework:SetFontOutline (label, self.options.text_outline)
if (self.options.draw_line) then
label.line:SetVertexColor(unpack(self.options.draw_line_color))
@@ -9734,7 +9729,7 @@ DF.TimeLineElapsedTimeFunctions = {
local secondsOfTime = pixelPerSecond * xOffset
- label:SetText(DF:IntegerToTimer (floor(secondsOfTime)))
+ label:SetText(detailsFramework:IntegerToTimer (floor(secondsOfTime)))
if (label.line:IsShown()) then
label.line:SetHeight(parent:GetParent():GetHeight())
@@ -9746,12 +9741,12 @@ DF.TimeLineElapsedTimeFunctions = {
}
--creates a frame to show the elapsed time in a row
-function DF:CreateElapsedTimeFrame(parent, name, options)
+function detailsFramework:CreateElapsedTimeFrame(parent, name, options)
local elapsedTimeFrame = CreateFrame("frame", name, parent, "BackdropTemplate")
- DF:Mixin(elapsedTimeFrame, DF.OptionsFunctions)
- DF:Mixin(elapsedTimeFrame, DF.LayoutFrame)
- DF:Mixin(elapsedTimeFrame, DF.TimeLineElapsedTimeFunctions)
+ detailsFramework:Mixin(elapsedTimeFrame, detailsFramework.OptionsFunctions)
+ detailsFramework:Mixin(elapsedTimeFrame, detailsFramework.LayoutFrame)
+ detailsFramework:Mixin(elapsedTimeFrame, detailsFramework.TimeLineElapsedTimeFunctions)
elapsedTimeFrame:BuildOptionsTable(elapsedtime_frame_options, options)
@@ -9764,7 +9759,7 @@ function DF:CreateElapsedTimeFrame(parent, name, options)
end
-DF.TimeLineBlockFunctions = {
+detailsFramework.TimeLineBlockFunctions = {
--self is the line
SetBlock = function(self, index, blockInfo)
--get the block information
@@ -9901,7 +9896,7 @@ DF.TimeLineBlockFunctions = {
local background = block:CreateTexture(nil, "background")
background:SetColorTexture (1, 1, 1, 1)
local icon = block:CreateTexture(nil, "artwork")
- local text = block:CreateFontString (nil, "artwork")
+ local text = block:CreateFontString(nil, "artwork")
local auraLength = block:CreateTexture(nil, "border")
background:SetAllPoints()
@@ -9936,13 +9931,13 @@ DF.TimeLineBlockFunctions = {
end,
}
-DF.TimeLineFunctions = {
+detailsFramework.TimeLineFunctions = {
GetLine = function(self, index)
local line = self.lines [index]
if (not line) then
--create a new line
line = CreateFrame("frame", "$parentLine" .. index, self.body, "BackdropTemplate")
- DF:Mixin (line, DF.TimeLineBlockFunctions)
+ detailsFramework:Mixin (line, detailsFramework.TimeLineBlockFunctions)
self.lines [index] = line
local lineHeader = CreateFrame("frame", nil, line, "BackdropTemplate")
@@ -9955,8 +9950,8 @@ DF.TimeLineFunctions = {
--store the individual textures that shows the timeline information
line.blocks = {}
- line.SetBlock = DF.TimeLineBlockFunctions.SetBlock
- line.GetBlock = DF.TimeLineBlockFunctions.GetBlock
+ line.SetBlock = detailsFramework.TimeLineBlockFunctions.SetBlock
+ line.GetBlock = detailsFramework.TimeLineBlockFunctions.GetBlock
--set its parameters
@@ -9975,11 +9970,11 @@ DF.TimeLineFunctions = {
line:SetBackdropColor(unpack(self.options.backdrop_color))
line:SetBackdropBorderColor(unpack(self.options.backdrop_border_color))
- local icon = DF:CreateImage(line, "", self.options.line_height, self.options.line_height)
+ local icon = detailsFramework:CreateImage(line, "", self.options.line_height, self.options.line_height)
icon:SetPoint("left", line, "left", 2, 0)
line.icon = icon
- local text = DF:CreateLabel(line, "", DF:GetTemplate("font", self.options.title_template))
+ local text = detailsFramework:CreateLabel(line, "", detailsFramework:GetTemplate("font", self.options.title_template))
text:SetPoint("left", icon.widget, "right", 2, 0)
line.text = text
@@ -10027,7 +10022,7 @@ DF.TimeLineFunctions = {
--adjust the scale slider range
local oldMin, oldMax = self.horizontalSlider:GetMinMaxValues()
self.horizontalSlider:SetMinMaxValues(0, newMaxValue)
- self.horizontalSlider:SetValue(DF:MapRangeClamped(oldMin, oldMax, 0, newMaxValue, self.horizontalSlider:GetValue()))
+ self.horizontalSlider:SetValue(detailsFramework:MapRangeClamped(oldMin, oldMax, 0, newMaxValue, self.horizontalSlider:GetValue()))
local defaultColor = self.data.defaultColor or {1, 1, 1, 1}
@@ -10072,7 +10067,7 @@ DF.TimeLineFunctions = {
}
--creates a regular scroll in horizontal position
-function DF:CreateTimeLineFrame(parent, name, options, timelineOptions)
+function detailsFramework:CreateTimeLineFrame(parent, name, options, timelineOptions)
local width = options and options.width or timeline_options.width
local height = options and options.height or timeline_options.height
local scrollWidth = 800 --placeholder until the timeline receives data
@@ -10080,16 +10075,16 @@ function DF:CreateTimeLineFrame(parent, name, options, timelineOptions)
local frameCanvas = CreateFrame("scrollframe", name, parent, "BackdropTemplate")
- DF:Mixin(frameCanvas, DF.TimeLineFunctions)
- DF:Mixin(frameCanvas, DF.OptionsFunctions)
- DF:Mixin(frameCanvas, DF.LayoutFrame)
+ detailsFramework:Mixin(frameCanvas, detailsFramework.TimeLineFunctions)
+ detailsFramework:Mixin(frameCanvas, detailsFramework.OptionsFunctions)
+ detailsFramework:Mixin(frameCanvas, detailsFramework.LayoutFrame)
frameCanvas.data = {}
frameCanvas.lines = {}
frameCanvas.currentScale = 0.5
frameCanvas:SetSize(width, height)
- DF:ApplyStandardBackdrop(frameCanvas)
+ detailsFramework:ApplyStandardBackdrop(frameCanvas)
local frameBody = CreateFrame("frame", nil, frameCanvas, "BackdropTemplate")
frameBody:SetSize(scrollWidth, scrollHeight)
@@ -10100,7 +10095,7 @@ function DF:CreateTimeLineFrame(parent, name, options, timelineOptions)
frameCanvas:BuildOptionsTable(timeline_options, options)
--create elapsed time frame
- frameCanvas.elapsedTimeFrame = DF:CreateElapsedTimeFrame(frameBody, frameCanvas:GetName() and frameCanvas:GetName() .. "ElapsedTimeFrame", timelineOptions)
+ frameCanvas.elapsedTimeFrame = detailsFramework:CreateElapsedTimeFrame(frameBody, frameCanvas:GetName() and frameCanvas:GetName() .. "ElapsedTimeFrame", timelineOptions)
--create horizontal slider
local horizontalSlider = CreateFrame("slider", frameCanvas:GetName() .. "HorizontalSlider", parent, "BackdropTemplate")
@@ -10155,7 +10150,7 @@ function DF:CreateTimeLineFrame(parent, name, options, timelineOptions)
scaleSlider:SetSize(width + 20, 20)
scaleSlider:SetPoint("topleft", horizontalSlider, "bottomleft", 0, -2)
scaleSlider:SetMinMaxValues(frameCanvas.options.scale_min, frameCanvas.options.scale_max)
- scaleSlider:SetValue(DF:GetRangeValue(frameCanvas.options.scale_min, frameCanvas.options.scale_max, 0.5))
+ scaleSlider:SetValue(detailsFramework:GetRangeValue(frameCanvas.options.scale_min, frameCanvas.options.scale_max, 0.5))
scaleSlider:SetScript("OnValueChanged", function(self)
local stepValue = ceil(self:GetValue() * 100) / 100
@@ -10278,9 +10273,9 @@ f:Hide()
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--error message box
-function DF:ShowErrorMessage (errorMessage, titleText)
+function detailsFramework:ShowErrorMessage (errorMessage, titleText)
- if (not DF.ErrorMessagePanel) then
+ if (not detailsFramework.ErrorMessagePanel) then
local f = CreateFrame("frame", "DetailsFrameworkErrorMessagePanel", UIParent, "BackdropTemplate")
f:SetSize(400, 120)
f:SetFrameStrata("FULLSCREEN")
@@ -10292,21 +10287,21 @@ function DF:ShowErrorMessage (errorMessage, titleText)
f:SetScript("OnDragStop", function() f:StopMovingOrSizing() end)
f:SetScript("OnMouseDown", function(self, button) if (button == "RightButton") then f:Hide() end end)
tinsert(UISpecialFrames, "DetailsFrameworkErrorMessagePanel")
- DF.ErrorMessagePanel = f
+ detailsFramework.ErrorMessagePanel = f
- DF:CreateTitleBar (f, "Details! Framework Error!")
- DF:ApplyStandardBackdrop(f)
+ detailsFramework:CreateTitleBar (f, "Details! Framework Error!")
+ detailsFramework:ApplyStandardBackdrop(f)
- local errorLabel = f:CreateFontString (nil, "overlay", "GameFontNormal")
+ local errorLabel = f:CreateFontString(nil, "overlay", "GameFontNormal")
errorLabel:SetPoint("top", f, "top", 0, -25)
errorLabel:SetJustifyH("center")
errorLabel:SetSize(360, 66)
f.errorLabel = errorLabel
- local button_text_template = DF:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")
- local options_dropdown_template = DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
+ local button_text_template = detailsFramework:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")
+ local options_dropdown_template = detailsFramework:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
- local closeButton = DF:CreateButton(f, nil, 60, 20, "close", nil, nil, nil, nil, nil, nil, options_dropdown_template)
+ local closeButton = detailsFramework:CreateButton(f, nil, 60, 20, "close", nil, nil, nil, nil, nil, nil, options_dropdown_template)
closeButton:SetPoint("bottom", f, "bottom", 0, 5)
f.closeButton = closeButton
@@ -10314,32 +10309,32 @@ function DF:ShowErrorMessage (errorMessage, titleText)
f:Hide()
end)
- f.ShowAnimation = DF:CreateAnimationHub (f, function()
+ f.ShowAnimation = detailsFramework:CreateAnimationHub (f, function()
f:SetBackdropBorderColor(0, 0, 0, 0)
f.TitleBar:SetBackdropBorderColor(0, 0, 0, 0)
end, function()
f:SetBackdropBorderColor(0, 0, 0, 1)
f.TitleBar:SetBackdropBorderColor(0, 0, 0, 1)
end)
- DF:CreateAnimation(f.ShowAnimation, "scale", 1, .075, .2, .2, 1.1, 1.1, "center", 0, 0)
- DF:CreateAnimation(f.ShowAnimation, "scale", 2, .075, 1, 1, .90, .90, "center", 0, 0)
+ detailsFramework:CreateAnimation(f.ShowAnimation, "scale", 1, .075, .2, .2, 1.1, 1.1, "center", 0, 0)
+ detailsFramework:CreateAnimation(f.ShowAnimation, "scale", 2, .075, 1, 1, .90, .90, "center", 0, 0)
f.FlashTexture = f:CreateTexture(nil, "overlay")
f.FlashTexture:SetColorTexture (1, 1, 1, 1)
f.FlashTexture:SetAllPoints()
- f.FlashAnimation = DF:CreateAnimationHub (f.FlashTexture, function() f.FlashTexture:Show() end, function() f.FlashTexture:Hide() end)
- DF:CreateAnimation(f.FlashAnimation, "alpha", 1, .075, 0, .05)
- DF:CreateAnimation(f.FlashAnimation, "alpha", 2, .075, .1, 0)
+ f.FlashAnimation = detailsFramework:CreateAnimationHub (f.FlashTexture, function() f.FlashTexture:Show() end, function() f.FlashTexture:Hide() end)
+ detailsFramework:CreateAnimation(f.FlashAnimation, "alpha", 1, .075, 0, .05)
+ detailsFramework:CreateAnimation(f.FlashAnimation, "alpha", 2, .075, .1, 0)
f:Hide()
end
- DF.ErrorMessagePanel:Show()
- DF.ErrorMessagePanel.errorLabel:SetText(errorMessage)
- DF.ErrorMessagePanel.TitleLabel:SetText(titleText)
- DF.ErrorMessagePanel.ShowAnimation:Play()
- DF.ErrorMessagePanel.FlashAnimation:Play()
+ detailsFramework.ErrorMessagePanel:Show()
+ detailsFramework.ErrorMessagePanel.errorLabel:SetText(errorMessage)
+ detailsFramework.ErrorMessagePanel.TitleLabel:SetText(titleText)
+ detailsFramework.ErrorMessagePanel.ShowAnimation:Play()
+ detailsFramework.ErrorMessagePanel.FlashAnimation:Play()
end
--[[
@@ -10353,7 +10348,7 @@ end
@xOffset: the amount to apply into the x offset
@yOffset: the amount to apply into the y offset
--]]
-function DF:SetPointOffsets(frame, xOffset, yOffset)
+function detailsFramework:SetPointOffsets(frame, xOffset, yOffset)
for i = 1, frame:GetNumPoints() do
local anchor1, anchorTo, anchor2, x, y = frame:GetPoint(i)
x = x or 0
@@ -10380,7 +10375,7 @@ end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--list box
-DF.ListboxFunctions = {
+detailsFramework.ListboxFunctions = {
scrollRefresh = function(self, data, offset, totalLines)
for i = 1, totalLines do
local index = i + offset
@@ -10389,7 +10384,7 @@ DF.ListboxFunctions = {
if (lineData) then
local line = self:GetLine(i)
line.dataIndex = index
- line.deleteButton:SetClickFunction(DF.ListboxFunctions.deleteEntry, data, index)
+ line.deleteButton:SetClickFunction(detailsFramework.ListboxFunctions.deleteEntry, data, index)
line.indexText:SetText(index)
local amountEntries = #lineData
@@ -10434,7 +10429,7 @@ DF.ListboxFunctions = {
line:SetBackdropColor(unpack(options.line_backdrop_color))
line:SetBackdropBorderColor(unpack(options.line_backdrop_border_color))
- DF:Mixin(line, DF.HeaderFunctions)
+ detailsFramework:Mixin(line, detailsFramework.HeaderFunctions)
line.widgets = {}
@@ -10442,21 +10437,21 @@ DF.ListboxFunctions = {
local headerColumn = listBox.headerTable[i]
if (headerColumn.isDelete) then
- local deleteButton = DF:CreateButton(line, DF.ListboxFunctions.deleteEntry, 20, self.lineHeight, "X", listBox.data, index, nil, nil, nil, nil, DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate("font", "ORANGE_FONT_TEMPLATE"))
+ local deleteButton = detailsFramework:CreateButton(line, detailsFramework.ListboxFunctions.deleteEntry, 20, self.lineHeight, "X", listBox.data, index, nil, nil, nil, nil, detailsFramework:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"), detailsFramework:GetTemplate("font", "ORANGE_FONT_TEMPLATE"))
line.deleteButton = deleteButton
line:AddFrameToHeaderAlignment(deleteButton)
elseif (headerColumn.isIndex) then
- local indexText = DF:CreateLabel(line)
+ local indexText = detailsFramework:CreateLabel(line)
line.indexText = indexText
line:AddFrameToHeaderAlignment(indexText)
elseif (headerColumn.text) then
- local template = DF.table.copy({}, DF:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
+ local template = detailsFramework.table.copy({}, detailsFramework:GetTemplate("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
template.backdropcolor = {.1, .1, .1, .7}
template.backdropbordercolor = {.2, .2, .2, .6}
- local textEntry = DF:CreateTextEntry(line, function()end, headerColumn.width, self.lineHeight, nil, nil, nil, template)
+ local textEntry = detailsFramework:CreateTextEntry(line, function()end, headerColumn.width, self.lineHeight, nil, nil, nil, template)
textEntry:SetHook("OnEditFocusGained", function() textEntry:HighlightText(0) end)
textEntry:SetHook("OnEditFocusLost", function()
textEntry:HighlightText(0, 0)
@@ -10501,16 +10496,16 @@ local listbox_options = {
--@options: table with options to overwrite the default setting from 'listbox_options'
--@header: a table to create a header widget
--@header_options: a table with options to overwrite the default header options
-function DF:CreateListBox(parent, name, data, options, headerTable, headerOptions)
+function detailsFramework:CreateListBox(parent, name, data, options, headerTable, headerOptions)
options = options or {}
name = name or "ListboxUnamed_" .. (math.random(100000, 1000000))
--canvas
local frameCanvas = CreateFrame("scrollframe", name, parent, "BackdropTemplate")
- DF:Mixin(frameCanvas, DF.ListboxFunctions)
- DF:Mixin(frameCanvas, DF.OptionsFunctions)
- DF:Mixin(frameCanvas, DF.LayoutFrame)
+ detailsFramework:Mixin(frameCanvas, detailsFramework.ListboxFunctions)
+ detailsFramework:Mixin(frameCanvas, detailsFramework.OptionsFunctions)
+ detailsFramework:Mixin(frameCanvas, detailsFramework.LayoutFrame)
frameCanvas.headerTable = headerTable
if (not data or type(data) ~= "table") then
@@ -10519,7 +10514,7 @@ function DF:CreateListBox(parent, name, data, options, headerTable, headerOption
frameCanvas.data = data
frameCanvas.lines = {}
- DF:ApplyStandardBackdrop(frameCanvas)
+ detailsFramework:ApplyStandardBackdrop(frameCanvas)
frameCanvas:BuildOptionsTable(listbox_options, options)
--header
@@ -10539,7 +10534,7 @@ function DF:CreateListBox(parent, name, data, options, headerTable, headerOption
tinsert(headerTable, 1, {text = "#", width = 20, isIndex = true}) --isDelete signals the createScrollLine() to make the delete button for the line
tinsert(headerTable, {text = "Delete", width = 50, isDelete = true}) --isDelete signals the createScrollLine() to make the delete button for the line
- local header = DF:CreateHeader(frameCanvas, headerTable, headerOptions)
+ local header = detailsFramework:CreateHeader(frameCanvas, headerTable, headerOptions)
--set the header point
header:SetPoint("topleft", frameCanvas, "topleft", 5, -5)
frameCanvas.header = header
@@ -10571,10 +10566,10 @@ function DF:CreateListBox(parent, name, data, options, headerTable, headerOption
local lineAmount = floor((height - 60) / lineHeight)
-- -12 is padding: 5 on top, 7 bottom, 2 header scrollbar blank space | -24 to leave space to the add button
- local scrollBox = DF:CreateScrollBox(frameCanvas, "$parentScrollbox", frameCanvas.scrollRefresh, data, width-4, height - header:GetHeight() - 12 - 24, lineAmount, lineHeight)
+ local scrollBox = detailsFramework:CreateScrollBox(frameCanvas, "$parentScrollbox", frameCanvas.scrollRefresh, data, width-4, height - header:GetHeight() - 12 - 24, lineAmount, lineHeight)
scrollBox:SetPoint("topleft", header, "bottomleft", 0, -2)
scrollBox:SetPoint("topright", header, "bottomright", 0, -2) -- -20 for the scrollbar
- DF:ReskinSlider(scrollBox)
+ detailsFramework:ReskinSlider(scrollBox)
scrollBox.lineHeight = lineHeight
scrollBox.lineAmount = lineAmount
frameCanvas.scrollBox = scrollBox
@@ -10586,7 +10581,7 @@ function DF:CreateListBox(parent, name, data, options, headerTable, headerOption
scrollBox:Refresh()
--add line button
- local addLineButton = DF:CreateButton(frameCanvas, DF.ListboxFunctions.addEntry, 80, 20, "Add", nil, nil, nil, nil, nil, nil, DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate("font", "ORANGE_FONT_TEMPLATE"))
+ local addLineButton = detailsFramework:CreateButton(frameCanvas, detailsFramework.ListboxFunctions.addEntry, 80, 20, "Add", nil, nil, nil, nil, nil, nil, detailsFramework:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"), detailsFramework:GetTemplate("font", "ORANGE_FONT_TEMPLATE"))
addLineButton:SetPoint("topleft", scrollBox, "bottomleft", 0, -4)
return frameCanvas
diff --git a/Libs/DF/slider.lua b/Libs/DF/slider.lua
index 02fdb826..5d94f856 100644
--- a/Libs/DF/slider.lua
+++ b/Libs/DF/slider.lua
@@ -566,7 +566,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin)
local do_precision = function(text)
if (type(text) == "string" and text:find ("%.")) then
- local left, right = strsplit (".", text)
+ local left, right = strsplit(".", text)
left = tonumber (left)
right = tonumber (right)
@@ -958,7 +958,7 @@ function DF:NewSwitch (parent, container, name, member, w, h, ltext, rtext, defa
thumb:SetAlpha(0.7)
thumb:SetPoint("left", slider.widget, "left")
- local text = slider:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ local text = slider:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
text:SetTextColor (.8, .8, .8, 1)
text:SetPoint("center", thumb, "center")
@@ -1158,7 +1158,7 @@ function DF:NewSlider (parent, container, name, member, w, h, min, max, step, de
SliderObject.have_tooltip = "Right Click to Type the Value"
end
- SliderObject.amt = SliderObject.slider:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ SliderObject.amt = SliderObject.slider:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
local amt = defaultv
if (amt < 10 and amt >= 1) then
diff --git a/Libs/DF/split_bar.lua b/Libs/DF/split_bar.lua
index 0f3c653b..f7a29317 100644
--- a/Libs/DF/split_bar.lua
+++ b/Libs/DF/split_bar.lua
@@ -692,12 +692,12 @@ local build_statusbar = function(self)
self.spark:SetSize(32, 32)
self.spark:SetPoint("LEFT", self, "RIGHT", -17, -1)
- self.lefttext = self:CreateFontString ("$parent_TextLeft", "OVERLAY", "GameFontHighlight")
+ self.lefttext = self:CreateFontString("$parent_TextLeft", "OVERLAY", "GameFontHighlight")
DF:SetFontSize (self.lefttext, 10)
self.lefttext:SetJustifyH("left")
self.lefttext:SetPoint("LEFT", self.lefticon, "RIGHT", 3, 0)
- self.righttext = self:CreateFontString ("$parent_TextRight", "OVERLAY", "GameFontHighlight")
+ self.righttext = self:CreateFontString("$parent_TextRight", "OVERLAY", "GameFontHighlight")
DF:SetFontSize (self.righttext, 10)
self.righttext:SetJustifyH("right")
self.righttext:SetPoint("RIGHT", self.righticon, "LEFT", -3, 0)
diff --git a/Libs/DF/textentry.lua b/Libs/DF/textentry.lua
index 1c2375df..cd380be4 100644
--- a/Libs/DF/textentry.lua
+++ b/Libs/DF/textentry.lua
@@ -569,7 +569,7 @@ function DF:NewTextEntry(parent, container, name, member, w, h, func, param1, pa
TextEntryObject.editbox:SetSize(232, 20)
TextEntryObject.editbox:SetBackdrop({bgFile = [["Interface\DialogFrame\UI-DialogBox-Background"]], tileSize = 64, tile = true, edgeFile = [[Interface\DialogFrame\UI-DialogBox-Border]], edgeSize = 10, insets = {left = 1, right = 1, top = 0, bottom = 0}})
- TextEntryObject.editbox.label = TextEntryObject.editbox:CreateFontString ("$parent_Desc", "OVERLAY", "GameFontHighlightSmall")
+ TextEntryObject.editbox.label = TextEntryObject.editbox:CreateFontString("$parent_Desc", "OVERLAY", "GameFontHighlightSmall")
TextEntryObject.editbox.label:SetJustifyH("left")
TextEntryObject.editbox.label:SetPoint("RIGHT", TextEntryObject.editbox, "LEFT", -2, 0)
diff --git a/Libs/NickTag-1.0/NickTag-1.0.lua b/Libs/NickTag-1.0/NickTag-1.0.lua
index ebba144b..8f486e4b 100644
--- a/Libs/NickTag-1.0/NickTag-1.0.lua
+++ b/Libs/NickTag-1.0/NickTag-1.0.lua
@@ -853,7 +853,7 @@ do
background_texture:SetTexture(NickTag.background_pool[1][1])
background_texture:SetTexCoord (unpack(NickTag.background_pool[1][3]))
--
- local name = avatar_pick_frame:CreateFontString ("AvatarPickFrameName", "overlay", "GameFontHighlightHuge")
+ local name = avatar_pick_frame:CreateFontString("AvatarPickFrameName", "overlay", "GameFontHighlightHuge")
name:SetPoint("left", avatar_texture, "right", -11, -17)
name:SetText(UnitName ("player"))
---
diff --git a/classes/class_combat.lua b/classes/class_combat.lua
index abeff575..65803100 100644
--- a/classes/class_combat.lua
+++ b/classes/class_combat.lua
@@ -8,7 +8,7 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--local pointers
local ipairs = ipairs -- lua local
- local _pairs = pairs -- lua local
+ local pairs = pairs -- lua local
local _bit_band = bit.band -- lua local
local _date = date -- lua local
local tremove = table.remove -- lua local
diff --git a/classes/class_custom.lua b/classes/class_custom.lua
index bc71cf55..4bbd3bc6 100644
--- a/classes/class_custom.lua
+++ b/classes/class_custom.lua
@@ -12,11 +12,11 @@
local _cstr = string.format --lua local
local _math_floor = math.floor --lua local
local _table_sort = table.sort --lua local
- local _table_insert = table.insert --lua local
+ local tinsert = table.insert --lua local
local _table_size = table.getn --lua local
local _setmetatable = setmetatable --lua local
local ipairs = ipairs --lua local
- local _pairs = pairs --lua local
+ local pairs = pairs --lua local
local _rawget= rawget --lua local
local _math_min = math.min --lua local
local _math_max = math.max --lua local
@@ -26,9 +26,9 @@
local _pcall = pcall -- lua local
local _GetSpellInfo = _detalhes.getspellinfo -- api local
- local _IsInRaid = IsInRaid -- api local
- local _IsInGroup = IsInGroup -- api local
- local _GetNumGroupMembers = GetNumGroupMembers -- api local
+ local IsInRaid = IsInRaid -- api local
+ local IsInGroup = IsInGroup -- api local
+ local GetNumGroupMembers = GetNumGroupMembers -- api local
local _GetNumPartyMembers = GetNumPartyMembers or GetNumSubgroupMembers -- api local
local _GetNumRaidMembers = GetNumRaidMembers or GetNumGroupMembers -- api local
local _GetUnitName = GetUnitName -- api local
@@ -394,7 +394,7 @@
local use_total_bar = false
if (instance.total_bar.enabled) then
use_total_bar = true
- if (instance.total_bar.only_in_group and (not _IsInGroup() and not _IsInRaid())) then
+ if (instance.total_bar.only_in_group and (not IsInGroup() and not IsInRaid())) then
use_total_bar = false
end
end
diff --git a/classes/class_damage.lua b/classes/class_damage.lua
index 9ab8f5e6..3a419c14 100644
--- a/classes/class_damage.lua
+++ b/classes/class_damage.lua
@@ -12,12 +12,12 @@
local format = string.format --lua local
local _math_floor = math.floor --lua local
local _table_sort = table.sort --lua local
- local _table_insert = table.insert --lua local
+ local tinsert = table.insert --lua local
local _table_size = table.getn --lua local
local _setmetatable = setmetatable --lua local
local _getmetatable = getmetatable --lua local
local ipairs = ipairs --lua local
- local _pairs = pairs --lua local
+ local pairs = pairs --lua local
local _rawget= rawget --lua local
local _math_min = math.min --lua local
local _math_max = math.max --lua local
@@ -26,8 +26,8 @@
local unpack = unpack --lua local
local type = type --lua local
local GameTooltip = GameTooltip --api local
- local _IsInRaid = IsInRaid --api local
- local _IsInGroup = IsInGroup --api local
+ local IsInRaid = IsInRaid --api local
+ local IsInGroup = IsInGroup --api local
local GetSpellInfo = GetSpellInfo --api local
local _GetSpellInfo = Details.getspellinfo --details api
@@ -1038,7 +1038,7 @@ end
local total_damage_taken = frag_actor.damage_taken
local total = 0
- for aggressor, _ in _pairs(took_damage_from) do
+ for aggressor, _ in pairs(took_damage_from) do
local damager_actor = damage_container._ActorTable [damage_container._NameIndexTable [ aggressor ]]
@@ -1423,7 +1423,7 @@ end
local container = actor.debuff_uptime_targets
- for target_name, debuff_table in _pairs(container) do
+ for target_name, debuff_table in pairs(container) do
if (alvos) then
local damage_alvo = alvos [target_name]
if (damage_alvo) then
@@ -1444,7 +1444,7 @@ end
end
local i = 1
- for target_name, debuff_table in _pairs(container) do
+ for target_name, debuff_table in pairs(container) do
local t = tooltip_void_zone_temp [i]
if (not t) then
t = {}
@@ -1469,7 +1469,7 @@ end
Details:AddTooltipHeaderStatusbar (1, 1, 1, 0.5)
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, Details.tooltip_key_size_width, Details.tooltip_key_size_height, 0, 1, 0, 0.640625, Details.tooltip_key_overlay2)
- --for target_name, debuff_table in _pairs(container) do
+ --for target_name, debuff_table in pairs(container) do
local first = tooltip_void_zone_temp [1] and tooltip_void_zone_temp [1][3]
if (type(first) == "table") then
first = first.damage
@@ -1729,7 +1729,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
local frags_total_kills = 0
local index = 0
- for fragName, fragAmount in _pairs(frags) do
+ for fragName, fragAmount in pairs(frags) do
index = index + 1
@@ -1965,7 +1965,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
--fix spell, sometimes there is two spells with the same name, one is the cast and other is the debuff
if (spell.total == 0 and not actor.damage_spellid_fixed) then
local curname = _GetSpellInfo(actor.damage_spellid)
- for spellid, spelltable in _pairs(twin_damage_actor.spells._ActorTable) do
+ for spellid, spelltable in pairs(twin_damage_actor.spells._ActorTable) do
if (spelltable.total > spell.total) then
local name = _GetSpellInfo(spellid)
if (name == curname) then
@@ -1984,7 +1984,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
--fix spell, if the spellid passed for debuff uptime is actully the spell id of a ability and not if the aura it self
actor.damage_spellid_fixed = true
local found = false
- for spellid, spelltable in _pairs(twin_damage_actor.spells._ActorTable) do
+ for spellid, spelltable in pairs(twin_damage_actor.spells._ActorTable) do
local name = _GetSpellInfo(spellid)
if (actor.damage_twin:find (name)) then
actor.damage = spelltable.total
@@ -2231,7 +2231,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta
if (instancia.total_bar.enabled) then
useTotalBar = true
- if (instancia.total_bar.only_in_group and (not _IsInGroup() and not _IsInRaid())) then
+ if (instancia.total_bar.only_in_group and (not IsInGroup() and not IsInRaid())) then
useTotalBar = false
end
@@ -3186,7 +3186,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
end
--add actor spells
- for _spellid, _skill in _pairs(ActorSkillsContainer) do
+ for _spellid, _skill in pairs(ActorSkillsContainer) do
ActorSkillsSortTable [#ActorSkillsSortTable+1] = {_spellid, _skill.total, _skill.total/meu_tempo}
if (_skill.isReflection) then
reflectionSpells[#reflectionSpells+1] = _skill
@@ -3197,7 +3197,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
for petIndex, petName in ipairs(self:Pets()) do
local petActor = instancia.showing[class_type]:PegarCombatente (nil, petName)
if (petActor) then
- for _spellid, _skill in _pairs(petActor:GetActorSpells()) do
+ for _spellid, _skill in pairs(petActor:GetActorSpells()) do
ActorSkillsSortTable [#ActorSkillsSortTable+1] = {_spellid, _skill.total, _skill.total/meu_tempo, petName:gsub ((" <.*"), "")}
end
end
@@ -3210,7 +3210,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
local ActorTargetsSortTable = {}
--add
- for target_name, amount in _pairs(self.targets) do
+ for target_name, amount in pairs(self.targets) do
ActorTargetsSortTable [#ActorTargetsSortTable+1] = {target_name, amount}
end
--sort
@@ -3364,17 +3364,17 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
end
totais [#totais+1] = {nome, my_self.total_without_pet, my_self.total_without_pet/meu_tempo}
- for spellid, tabela in _pairs(tabela) do
+ for spellid, tabela in pairs(tabela) do
local nome, rank, icone = _GetSpellInfo(spellid)
- _table_insert (meus_danos, {spellid, tabela.total, tabela.total/meu_total*100, {nome, rank, icone}})
+ tinsert (meus_danos, {spellid, tabela.total, tabela.total/meu_total*100, {nome, rank, icone}})
end
_table_sort(meus_danos, Details.Sort2)
danos [nome] = meus_danos
local meus_inimigos = {}
tabela = my_self.targets
- for target_name, amount in _pairs(tabela) do
- _table_insert (meus_inimigos, {target_name, amount, amount/meu_total*100})
+ for target_name, amount in pairs(tabela) do
+ tinsert (meus_inimigos, {target_name, amount, amount/meu_total*100})
end
_table_sort(meus_inimigos,Details.Sort2)
alvos [nome] = meus_inimigos
@@ -3690,7 +3690,7 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown)
else
--aggressors
- for nome, _ in _pairs(agressores) do --who damaged the player
+ for nome, _ in pairs(agressores) do --who damaged the player
--get the aggressor
local este_agressor = showing._ActorTable [showing._NameIndexTable [nome]]
if (este_agressor) then --checagem por causa do total e do garbage collector que n�o limpa os nomes que deram dano
@@ -3775,7 +3775,7 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown)
local all_spells = {}
- for spellid, spell in _pairs(aggressor.spells._ActorTable) do
+ for spellid, spell in pairs(aggressor.spells._ActorTable) do
local on_target = spell.targets [self.nome]
if (on_target) then
tinsert(all_spells, {spellid, on_target, aggressor.nome})
@@ -3785,7 +3785,7 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown)
--friendly fire
local friendlyFire = aggressor.friendlyfire [self.nome]
if (friendlyFire) then
- for spellid, amount in _pairs(friendlyFire.spells) do
+ for spellid, amount in pairs(friendlyFire.spells) do
tinsert(all_spells, {spellid, amount, aggressor.nome})
end
end
@@ -3865,11 +3865,11 @@ function atributo_damage:ToolTip_FriendlyFire (instancia, numero, barra, keydown
local DamagedPlayers = {}
local Skills = {}
- for target_name, ff_table in _pairs(FriendlyFire) do
+ for target_name, ff_table in pairs(FriendlyFire) do
local actor = combat (1, target_name)
if (actor) then
DamagedPlayers [#DamagedPlayers+1] = {target_name, ff_table.total, actor.classe}
- for spellid, amount in _pairs(ff_table.spells) do
+ for spellid, amount in pairs(ff_table.spells) do
Skills [spellid] = (Skills [spellid] or 0) + amount
end
end
@@ -3937,7 +3937,7 @@ function atributo_damage:ToolTip_FriendlyFire (instancia, numero, barra, keydown
--spells usadas no friendly fire
local SpellsInOrder = {}
- for spellID, amount in _pairs(Skills) do
+ for spellID, amount in pairs(Skills) do
SpellsInOrder [#SpellsInOrder+1] = {spellID, amount}
end
_table_sort(SpellsInOrder, Details.Sort2)
@@ -3999,13 +3999,13 @@ function atributo_damage:MontaInfoFriendlyFire()
local DamagedPlayers = {}
local Skills = {}
- for target_name, ff_table in _pairs(self.friendlyfire) do
+ for target_name, ff_table in pairs(self.friendlyfire) do
local actor = combat (1, target_name)
if (actor) then
- _table_insert (DamagedPlayers, {target_name, ff_table.total, ff_table.total / FriendlyFireTotal * 100, actor.classe})
+ tinsert (DamagedPlayers, {target_name, ff_table.total, ff_table.total / FriendlyFireTotal * 100, actor.classe})
- for spellid, amount in _pairs(ff_table.spells) do
+ for spellid, amount in pairs(ff_table.spells) do
Skills [spellid] = (Skills [spellid] or 0) + amount
end
end
@@ -4084,7 +4084,7 @@ function atributo_damage:MontaInfoFriendlyFire()
end
local SkillTable = {}
- for spellid, amt in _pairs(Skills) do
+ for spellid, amt in pairs(Skills) do
local nome, _, icone = _GetSpellInfo(spellid)
SkillTable [#SkillTable+1] = {nome, amt, amt/FriendlyFireTotal*100, icone}
end
@@ -4137,7 +4137,7 @@ function atributo_damage:MontaInfoDamageTaken()
local meus_agressores = {}
local este_agressor
- for nome, _ in _pairs(agressores) do
+ for nome, _ in pairs(agressores) do
este_agressor = showing._ActorTable[showing._NameIndexTable[nome]]
if (este_agressor) then
local alvos = este_agressor.targets
@@ -4306,10 +4306,10 @@ function atributo_damage:MontaInfoDamageDone()
meu_tempo = info.instancia.showing:GetCombatTime()
end
- for _spellid, _skill in _pairs(ActorSkillsContainer) do --da foreach em cada spellid do container
+ for _spellid, _skill in pairs(ActorSkillsContainer) do --da foreach em cada spellid do container
local nome, _, icone = _GetSpellInfo(_spellid)
if (nome) then
- _table_insert (ActorSkillsSortTable, {_spellid, _skill.total, _skill.total/ActorTotalDamage*100, nome, icone, nil, _skill.spellschool})
+ tinsert (ActorSkillsSortTable, {_spellid, _skill.total, _skill.total/ActorTotalDamage*100, nome, icone, nil, _skill.spellschool})
end
end
@@ -4347,11 +4347,11 @@ function atributo_damage:MontaInfoDamageDone()
local PetActor = instancia.showing (class_type, PetName)
if (PetActor) then
local PetSkillsContainer = PetActor.spells._ActorTable
- for _spellid, _skill in _pairs(PetSkillsContainer) do --da foreach em cada spellid do container
+ for _spellid, _skill in pairs(PetSkillsContainer) do --da foreach em cada spellid do container
local nome, _, icone = _GetSpellInfo(_spellid)
- --_table_insert (ActorSkillsSortTable, {_spellid, _skill.total, _skill.total/ActorTotalDamage*100, nome .. " |TInterface\\AddOns\\Details\\images\\classes_small_alpha:12:12:0:0:128:128:33:64:96:128|t|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r", icone, PetActor, _skill.spellschool})
+ --tinsert (ActorSkillsSortTable, {_spellid, _skill.total, _skill.total/ActorTotalDamage*100, nome .. " |TInterface\\AddOns\\Details\\images\\classes_small_alpha:12:12:0:0:128:128:33:64:96:128|t|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r", icone, PetActor, _skill.spellschool})
if (nome) then
- _table_insert (ActorSkillsSortTable, {_spellid, _skill.total, _skill.total/ActorTotalDamage*100, nome .. " (|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r)", icone, PetActor, _skill.spellschool})
+ tinsert (ActorSkillsSortTable, {_spellid, _skill.total, _skill.total/ActorTotalDamage*100, nome .. " (|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r)", icone, PetActor, _skill.spellschool})
end
end
end
@@ -4411,7 +4411,7 @@ function atributo_damage:MontaInfoDamageDone()
local meus_agressores = {}
local este_agressor
- for nome, _ in _pairs(agressores) do
+ for nome, _ in pairs(agressores) do
este_agressor = showing._ActorTable[showing._NameIndexTable[nome]]
if (este_agressor) then
local este_alvo = este_agressor.targets [self.nome]
@@ -4493,8 +4493,8 @@ function atributo_damage:MontaInfoDamageDone()
--my target container
conteudo = self.targets
- for target_name, amount in _pairs(conteudo) do
- _table_insert (meus_inimigos, {target_name, amount, amount/total*100})
+ for target_name, amount in pairs(conteudo) do
+ tinsert (meus_inimigos, {target_name, amount, amount/total*100})
end
--sort
@@ -4590,9 +4590,9 @@ function atributo_damage:MontaDetalhesFriendlyFire (nome, barra)
local minhas_magias = {}
- for spellid, amount in _pairs(ff_table.spells) do --da foreach em cada spellid do container
+ for spellid, amount in pairs(ff_table.spells) do --da foreach em cada spellid do container
local nome, _, icone = _GetSpellInfo(spellid)
- _table_insert (minhas_magias, {spellid, amount, amount / total * 100, nome, icone})
+ tinsert (minhas_magias, {spellid, amount, amount / total * 100, nome, icone})
end
_table_sort(minhas_magias, Details.Sort2)
@@ -4658,7 +4658,7 @@ function atributo_damage:MontaDetalhesEnemy (spellid, barra)
local targets = spell.targets
local target_pool = {}
- for target_name, amount in _pairs(targets) do
+ for target_name, amount in pairs(targets) do
local classe
local this_actor = info.instancia.showing (1, target_name)
if (this_actor) then
@@ -4741,7 +4741,7 @@ function atributo_damage:MontaDetalhesDamageTaken (nome, barra)
return
end
- local conteudo = este_agressor.spells._ActorTable --_pairs[] com os IDs das magias
+ local conteudo = este_agressor.spells._ActorTable --pairs[] com os IDs das magias
local actor = info.jogador.nome
@@ -4749,11 +4749,11 @@ function atributo_damage:MontaDetalhesDamageTaken (nome, barra)
local minhas_magias = {}
- for spellid, tabela in _pairs(conteudo) do --da foreach em cada spellid do container
+ for spellid, tabela in pairs(conteudo) do --da foreach em cada spellid do container
local este_alvo = tabela.targets [actor]
if (este_alvo) then --esta magia deu dano no actor
local spell_nome, rank, icone = _GetSpellInfo(spellid)
- _table_insert (minhas_magias, {spellid, este_alvo, este_alvo/total*100, spell_nome, icone})
+ tinsert (minhas_magias, {spellid, este_alvo, este_alvo/total*100, spell_nome, icone})
end
end
@@ -4941,7 +4941,7 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia)
if (not spell_cast and misc_actor.spell_cast) then
local spellname = GetSpellInfo(spellid)
- for casted_spellid, amount in _pairs(misc_actor.spell_cast) do
+ for casted_spellid, amount in pairs(misc_actor.spell_cast) do
local casted_spellname = GetSpellInfo(casted_spellid)
if (casted_spellname == spellname) then
spell_cast = amount .. " (|cFFFFFF00?|r)"
@@ -5145,8 +5145,8 @@ function atributo_damage:MontaTooltipDamageTaken (thisLine, index)
local total = 0
- for spellid, spell in _pairs(container) do
- for target_name, amount in _pairs(spell.targets) do
+ for spellid, spell in pairs(container) do
+ for target_name, amount in pairs(spell.targets) do
if (target_name == self.nome) then
total = total + amount
habilidades [#habilidades+1] = {spellid, amount}
@@ -5185,11 +5185,11 @@ function atributo_damage:MontaTooltipAlvos (thisLine, index, instancia)
GameCooltip:SetOwner(thisLine, "bottom", "top", 4, -2)
GameCooltip:SetOption("MinWidth", _math_max (230, thisLine:GetWidth()*0.98))
- for spellid, spell in _pairs(self.spells._ActorTable) do
+ for spellid, spell in pairs(self.spells._ActorTable) do
if (spell.isReflection) then
- for target_name, amount in _pairs(spell.targets) do
+ for target_name, amount in pairs(spell.targets) do
if (target_name == inimigo) then
- for reflectedSpellId, amount in _pairs(spell.extra) do
+ for reflectedSpellId, amount in pairs(spell.extra) do
local spellName, _, spellIcon = _GetSpellInfo(reflectedSpellId)
local t = habilidades [i]
if (not t) then
@@ -5203,7 +5203,7 @@ function atributo_damage:MontaTooltipAlvos (thisLine, index, instancia)
end
end
else
- for target_name, amount in _pairs(spell.targets) do
+ for target_name, amount in pairs(spell.targets) do
if (target_name == inimigo) then
local nome, _, icone = _GetSpellInfo(spellid)
@@ -5225,10 +5225,10 @@ function atributo_damage:MontaTooltipAlvos (thisLine, index, instancia)
local PetActor = instancia.showing (class_type, PetName)
if (PetActor) then
local PetSkillsContainer = PetActor.spells._ActorTable
- for _spellid, _skill in _pairs(PetSkillsContainer) do
+ for _spellid, _skill in pairs(PetSkillsContainer) do
local alvos = _skill.targets
- for target_name, amount in _pairs(alvos) do
+ for target_name, amount in pairs(alvos) do
if (target_name == inimigo) then
local t = habilidades [i]
@@ -5393,7 +5393,7 @@ end
Details.refresh:r_atributo_damage (actor, shadow)
--copia o container de alvos (captura de dados)
- for target_name, amount in _pairs(actor.targets) do
+ for target_name, amount in pairs(actor.targets) do
--cria e soma o valor do total
if (not shadow.targets [target_name]) then
shadow.targets [target_name] = 0
@@ -5401,19 +5401,19 @@ end
end
--copia o container de habilidades (captura de dados)
- for spellid, habilidade in _pairs(actor.spells._ActorTable) do
+ for spellid, habilidade in pairs(actor.spells._ActorTable) do
--cria e soma o valor
local habilidade_shadow = shadow.spells:PegaHabilidade (spellid, true, nil, true)
--create the target value
- for target_name, amount in _pairs(habilidade.targets) do
+ for target_name, amount in pairs(habilidade.targets) do
if (not habilidade_shadow.targets [target_name]) then
habilidade_shadow.targets [target_name] = 0
end
end
--create the extra value
- for spellId, amount in _pairs(habilidade.extra) do
+ for spellId, amount in pairs(habilidade.extra) do
if (not habilidade_shadow.extra [spellId]) then
habilidade_shadow.extra [spellId] = 0
end
@@ -5422,11 +5422,11 @@ end
end
--copia o container de friendly fire (captura de dados)
- for target_name, ff_table in _pairs(actor.friendlyfire) do
+ for target_name, ff_table in pairs(actor.friendlyfire) do
--cria ou pega a shadow
local friendlyFire_shadow = shadow.friendlyfire [target_name] or shadow:CreateFFTable (target_name)
--some as spells
- for spellid, amount in _pairs(ff_table.spells) do
+ for spellid, amount in pairs(ff_table.spells) do
friendlyFire_shadow.spells [spellid] = 0
end
end
@@ -5511,38 +5511,38 @@ end
end
--copia o damage_from (captura de dados)
- for nome, _ in _pairs(actor.damage_from) do
+ for nome, _ in pairs(actor.damage_from) do
shadow.damage_from [nome] = true
end
--copia o container de alvos (captura de dados)
- for target_name, amount in _pairs(actor.targets) do
+ for target_name, amount in pairs(actor.targets) do
shadow.targets [target_name] = (shadow.targets [target_name] or 0) + amount
end
--copiar o container de raid targets
- for flag, amount in _pairs(actor.raid_targets) do
+ for flag, amount in pairs(actor.raid_targets) do
shadow.raid_targets = shadow.raid_targets or {} --deu invalido noutro dia
shadow.raid_targets [flag] = (shadow.raid_targets [flag] or 0) + amount
end
--copia o container de habilidades (captura de dados)
- for spellid, habilidade in _pairs(actor.spells._ActorTable) do
+ for spellid, habilidade in pairs(actor.spells._ActorTable) do
--cria e soma o valor
local habilidade_shadow = shadow.spells:PegaHabilidade (spellid, true, nil, true)
--refresh e soma os valores dos alvos
- for target_name, amount in _pairs(habilidade.targets) do
+ for target_name, amount in pairs(habilidade.targets) do
habilidade_shadow.targets [target_name] = (habilidade_shadow.targets [target_name] or 0) + amount
end
--refresh and add extra values
- for spellId, amount in _pairs(habilidade.extra) do
+ for spellId, amount in pairs(habilidade.extra) do
habilidade_shadow.extra [spellId] = (habilidade_shadow.extra [spellId] or 0) + amount
end
--soma todos os demais valores
- for key, value in _pairs(habilidade) do
+ for key, value in pairs(habilidade) do
if (type(value) == "number") then
if (key ~= "id" and key ~= "spellschool") then
if (not habilidade_shadow [key]) then
@@ -5567,13 +5567,13 @@ end
end
--copia o container de friendly fire (captura de dados)
- for target_name, ff_table in _pairs(actor.friendlyfire) do
+ for target_name, ff_table in pairs(actor.friendlyfire) do
--cria ou pega a shadow
local friendlyFire_shadow = shadow.friendlyfire [target_name] or shadow:CreateFFTable (target_name)
--soma o total
friendlyFire_shadow.total = friendlyFire_shadow.total + ff_table.total
--some as spells
- for spellid, amount in _pairs(ff_table.spells) do
+ for spellid, amount in pairs(ff_table.spells) do
friendlyFire_shadow.spells [spellid] = (friendlyFire_shadow.spells [spellid] or 0) + amount
end
end
@@ -5690,7 +5690,7 @@ atributo_damage.__add = function(tabela1, tabela2)
tabela1.friendlyfire_total = tabela1.friendlyfire_total + tabela2.friendlyfire_total
--soma o damage_from
- for nome, _ in _pairs(tabela2.damage_from) do
+ for nome, _ in pairs(tabela2.damage_from) do
tabela1.damage_from [nome] = true
end
@@ -5710,32 +5710,32 @@ atributo_damage.__add = function(tabela1, tabela2)
end
--soma os containers de alvos
- for target_name, amount in _pairs(tabela2.targets) do
+ for target_name, amount in pairs(tabela2.targets) do
tabela1.targets [target_name] = (tabela1.targets [target_name] or 0) + amount
end
--soma o container de raid targets
- for flag, amount in _pairs(tabela2.raid_targets) do
+ for flag, amount in pairs(tabela2.raid_targets) do
tabela1.raid_targets [flag] = (tabela1.raid_targets [flag] or 0) + amount
end
--soma o container de habilidades
- for spellid, habilidade in _pairs(tabela2.spells._ActorTable) do
+ for spellid, habilidade in pairs(tabela2.spells._ActorTable) do
--pega a habilidade no primeiro ator
local habilidade_tabela1 = tabela1.spells:PegaHabilidade (spellid, true, "SPELL_DAMAGE", false)
--soma os alvos
- for target_name, amount in _pairs(habilidade.targets) do
+ for target_name, amount in pairs(habilidade.targets) do
habilidade_tabela1.targets[target_name] = (habilidade_tabela1.targets [target_name] or 0) + amount
end
--soma os extras
- for spellId, amount in _pairs(habilidade.extra) do
+ for spellId, amount in pairs(habilidade.extra) do
habilidade_tabela1.extra = (habilidade_tabela1.extra [spellId] or 0) + amount
end
--soma os valores da habilidade
- for key, value in _pairs(habilidade) do
+ for key, value in pairs(habilidade) do
if (type(value) == "number") then
if (key ~= "id" and key ~= "spellschool") then
if (not habilidade_tabela1 [key]) then
@@ -5760,14 +5760,14 @@ atributo_damage.__add = function(tabela1, tabela2)
end
--soma o container de friendly fire
- for target_name, ff_table in _pairs(tabela2.friendlyfire) do
+ for target_name, ff_table in pairs(tabela2.friendlyfire) do
--pega o ator ff no ator principal
local friendlyFire_tabela1 = tabela1.friendlyfire [target_name] or tabela1:CreateFFTable (target_name)
--soma o total
friendlyFire_tabela1.total = friendlyFire_tabela1.total + ff_table.total
--soma as habilidades
- for spellid, amount in _pairs(ff_table.spells) do
+ for spellid, amount in pairs(ff_table.spells) do
friendlyFire_tabela1.spells [spellid] = (friendlyFire_tabela1.spells [spellid] or 0) + amount
end
end
@@ -5793,7 +5793,7 @@ atributo_damage.__sub = function(tabela1, tabela2)
tabela1.friendlyfire_total = tabela1.friendlyfire_total - tabela2.friendlyfire_total
--reduz os containers de alvos
- for target_name, amount in _pairs(tabela2.targets) do
+ for target_name, amount in pairs(tabela2.targets) do
local alvo_tabela1 = tabela1.targets [target_name]
if (alvo_tabela1) then
tabela1.targets [target_name] = tabela1.targets [target_name] - amount
@@ -5801,19 +5801,19 @@ atributo_damage.__sub = function(tabela1, tabela2)
end
--reduz o container de raid targets
- for flag, amount in _pairs(tabela2.raid_targets) do
+ for flag, amount in pairs(tabela2.raid_targets) do
if (tabela1.raid_targets [flag]) then
tabela1.raid_targets [flag] = _math_max (tabela1.raid_targets [flag] - amount, 0)
end
end
--reduz o container de habilidades
- for spellid, habilidade in _pairs(tabela2.spells._ActorTable) do
+ for spellid, habilidade in pairs(tabela2.spells._ActorTable) do
--get the spell from the first actor
local habilidade_tabela1 = tabela1.spells:PegaHabilidade (spellid, true, "SPELL_DAMAGE", false)
--subtract targets
- for target_name, amount in _pairs(habilidade.targets) do
+ for target_name, amount in pairs(habilidade.targets) do
local alvo_tabela1 = habilidade_tabela1.targets [target_name]
if (alvo_tabela1) then
habilidade_tabela1.targets [target_name] = habilidade_tabela1.targets [target_name] - amount
@@ -5821,7 +5821,7 @@ atributo_damage.__sub = function(tabela1, tabela2)
end
--subtract extra table
- for spellId, amount in _pairs(habilidade.extra) do
+ for spellId, amount in pairs(habilidade.extra) do
local extra_tabela1 = habilidade_tabela1.extra [spellId]
if (extra_tabela1) then
habilidade_tabela1.extra [spellId] = habilidade_tabela1.extra [spellId] - amount
@@ -5829,7 +5829,7 @@ atributo_damage.__sub = function(tabela1, tabela2)
end
--subtrai os valores da habilidade
- for key, value in _pairs(habilidade) do
+ for key, value in pairs(habilidade) do
if (type(value) == "number") then
if (key ~= "id" and key ~= "spellschool") then
if (not habilidade_tabela1 [key]) then
@@ -5852,12 +5852,12 @@ atributo_damage.__sub = function(tabela1, tabela2)
end
--reduz o container de friendly fire
- for target_name, ff_table in _pairs(tabela2.friendlyfire) do
+ for target_name, ff_table in pairs(tabela2.friendlyfire) do
--pega o ator ff no ator principal
local friendlyFire_tabela1 = tabela1.friendlyfire [target_name]
if (friendlyFire_tabela1) then
friendlyFire_tabela1.total = friendlyFire_tabela1.total - ff_table.total
- for spellid, amount in _pairs(ff_table.spells) do
+ for spellid, amount in pairs(ff_table.spells) do
if (friendlyFire_tabela1.spells [spellid]) then
friendlyFire_tabela1.spells [spellid] = friendlyFire_tabela1.spells [spellid] - amount
end
@@ -5895,7 +5895,7 @@ end
local damage_done = 0
--get targets
- for target_name, amount in _pairs(enemy.targets) do
+ for target_name, amount in pairs(enemy.targets) do
local player = combat (1, target_name)
if (player and player.grupo) then
local t = tooltip_temp_table [i]
diff --git a/classes/class_heal.lua b/classes/class_heal.lua
index c8d84259..fb9ba522 100644
--- a/classes/class_heal.lua
+++ b/classes/class_heal.lua
@@ -3,23 +3,23 @@
local _cstr = string.format
local _math_floor = math.floor
local _setmetatable = setmetatable
-local _pairs = pairs
+local pairs = pairs
local ipairs = ipairs
local _unpack = unpack
local type = type
local _table_sort = table.sort
local _cstr = string.format
-local _table_insert = table.insert
+local tinsert = table.insert
local _bit_band = bit.band
local _math_min = math.min
local _math_ceil = math.ceil
--api locals
local GetSpellInfo = GetSpellInfo
local _GetSpellInfo = _detalhes.getspellinfo
-local _IsInRaid = IsInRaid
-local _IsInGroup = IsInGroup
+local IsInRaid = IsInRaid
+local IsInGroup = IsInGroup
local _UnitName = UnitName
-local _GetNumGroupMembers = GetNumGroupMembers
+local GetNumGroupMembers = GetNumGroupMembers
local _string_replace = _detalhes.string.replace --details api
@@ -419,7 +419,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
if (instancia.total_bar.enabled) then
use_total_bar = true
- if (instancia.total_bar.only_in_group and (not _IsInGroup() and not _IsInRaid())) then
+ if (instancia.total_bar.only_in_group and (not IsInGroup() and not IsInRaid())) then
use_total_bar = false
end
end
@@ -970,15 +970,15 @@ function _detalhes:CloseShields(combat)
local parser = _detalhes.parser
local GetSpellInfo = GetSpellInfo --n�o colocar no cache de spells
- for alvo_name, spellid_table in _pairs(escudos) do
+ for alvo_name, spellid_table in pairs(escudos) do
local tgt = container:PegarCombatente (_, alvo_name)
if (tgt) then
- for spellid, owner_table in _pairs(spellid_table) do
+ for spellid, owner_table in pairs(spellid_table) do
local spellname = GetSpellInfo(spellid)
- for owner, amount in _pairs(owner_table) do
+ for owner, amount in pairs(owner_table) do
if (amount > 0) then
local obj = container:PegarCombatente (_, owner)
@@ -1045,23 +1045,23 @@ function atributo_heal:ToolTip_HealingDenied (instancia, numero, barra, keydown)
local icon_size = _detalhes.tooltip.icon_size
local icon_border = _detalhes.tooltip.icon_border_texcoord
- for spellID, spell in _pairs(self.spells._ActorTable) do
+ for spellID, spell in pairs(self.spells._ActorTable) do
if (spell.totaldenied > 0 and spell.heal_denied) then
--my spells which denied heal
tinsert(spellList, {spell, spell.totaldenied})
--players affected
- for playerName, amount in _pairs(spell.targets) do
+ for playerName, amount in pairs(spell.targets) do
targetList [playerName] = (targetList [playerName] or 0) + amount
end
--spells with heal denied
- for spellID, amount in _pairs(spell.heal_denied) do
+ for spellID, amount in pairs(spell.heal_denied) do
spellsDenied [spellID] = (spellsDenied [spellID] or 0) + amount
end
--healers denied
- for healerName, amount in _pairs(spell.heal_denied_healers) do
+ for healerName, amount in pairs(spell.heal_denied_healers) do
healersDenied [healerName] = (healersDenied [healerName] or 0) + amount
end
end
@@ -1106,7 +1106,7 @@ function atributo_heal:ToolTip_HealingDenied (instancia, numero, barra, keydown)
--Target Players
local playerSorted = {}
- for playerName, amount in _pairs(targetList) do
+ for playerName, amount in pairs(targetList) do
tinsert(playerSorted, {playerName, amount})
end
table.sort (playerSorted, _detalhes.Sort2)
@@ -1152,7 +1152,7 @@ function atributo_heal:ToolTip_HealingDenied (instancia, numero, barra, keydown)
-- Spells Affected
local spellsSorted = {}
- for spellID, amount in _pairs(spellsDenied) do
+ for spellID, amount in pairs(spellsDenied) do
tinsert(spellsSorted, {spellID, amount})
end
table.sort (spellsSorted, _detalhes.Sort2)
@@ -1189,7 +1189,7 @@ function atributo_heal:ToolTip_HealingDenied (instancia, numero, barra, keydown)
_detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha)
local healersSorted = {}
- for healerName, amount in _pairs(healersDenied) do
+ for healerName, amount in pairs(healersDenied) do
tinsert(healersSorted, {healerName, amount})
end
table.sort (healersSorted, _detalhes.Sort2)
@@ -1235,7 +1235,7 @@ function atributo_heal:ToolTip_HealingTaken (instancia, numero, barra, keydown)
local meus_curadores = {}
- for nome, _ in _pairs(curadores) do --agressores seria a lista de nomes
+ for nome, _ in pairs(curadores) do --agressores seria a lista de nomes
local este_curador = showing._ActorTable[showing._NameIndexTable[nome]]
if (este_curador) then --checagem por causa do total e do garbage collector que n�o limpa os nomes que deram dano
local alvos = este_curador.targets
@@ -1337,10 +1337,10 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
local ActorTotal = self [actor_key]
--add actor spells
- for _spellid, _skill in _pairs(ActorSkillsContainer) do
+ for _spellid, _skill in pairs(ActorSkillsContainer) do
local SkillName, _, SkillIcon = _GetSpellInfo(_spellid)
if (_skill [skill_key] > 0 or _skill.anti_heal) then
- _table_insert (ActorHealingTable, {
+ tinsert (ActorHealingTable, {
_spellid,
_skill [skill_key],
_skill [skill_key]/ActorTotal*100,
@@ -1357,7 +1357,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
for petIndex, petName in ipairs(self:Pets()) do
local petActor = instancia.showing[class_type]:PegarCombatente (nil, petName)
if (petActor) then
- for _spellid, _skill in _pairs(petActor:GetActorSpells()) do
+ for _spellid, _skill in pairs(petActor:GetActorSpells()) do
if (_skill [skill_key] > 0) then
local SkillName, _, SkillIcon = _GetSpellInfo(_spellid)
local petName = petName:gsub ((" <.*"), "")
@@ -1379,7 +1379,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
--TOP Curados
ActorSkillsContainer = self.targets
- for target_name, amount in _pairs(ActorSkillsContainer) do
+ for target_name, amount in pairs(ActorSkillsContainer) do
if (amount > 0) then
--translate cyrillic alphabet to western alphabet by Vardex (https://github.com/Vardex May 22, 2019)
@@ -1387,7 +1387,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
target_name = Translit:Transliterate(target_name, "!")
end
- _table_insert (ActorHealingTargets, {target_name, amount, amount / ActorTotal * 100})
+ tinsert (ActorHealingTargets, {target_name, amount, amount / ActorTotal * 100})
end
end
_table_sort (ActorHealingTargets, _detalhes.Sort2)
@@ -1683,7 +1683,7 @@ function atributo_heal:MontaInfoHealTaken()
local meus_curandeiros = {}
local este_curandeiro
- for nome, _ in _pairs(curandeiros) do
+ for nome, _ in pairs(curandeiros) do
este_curandeiro = showing._ActorTable[showing._NameIndexTable[nome]]
if (este_curandeiro) then
local alvos = este_curandeiro.targets
@@ -1737,9 +1737,9 @@ function atributo_heal:MontaInfoOverHealing()
local minhas_curas = {}
local barras = info.barras1
- for spellid, tabela in _pairs(tabela) do
+ for spellid, tabela in pairs(tabela) do
local nome, _, icone = _GetSpellInfo(spellid)
- _table_insert (minhas_curas, {spellid, tabela.overheal, tabela.overheal/total*100, nome, icone})
+ tinsert (minhas_curas, {spellid, tabela.overheal, tabela.overheal/total*100, nome, icone})
end
--add pets
@@ -1749,9 +1749,9 @@ function atributo_heal:MontaInfoOverHealing()
local PetActor = instancia.showing (class_type, PetName)
if (PetActor) then
local PetSkillsContainer = PetActor.spells._ActorTable
- for _spellid, _skill in _pairs(PetSkillsContainer) do --da foreach em cada spellid do container
+ for _spellid, _skill in pairs(PetSkillsContainer) do --da foreach em cada spellid do container
local nome, _, icone = _GetSpellInfo(_spellid)
- _table_insert (minhas_curas, {_spellid, _skill.overheal, _skill.overheal/total*100, nome .. " (|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r)", icone, PetActor})
+ tinsert (minhas_curas, {_spellid, _skill.overheal, _skill.overheal/total*100, nome .. " (|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r)", icone, PetActor})
end
end
end
@@ -1818,13 +1818,13 @@ function atributo_heal:MontaInfoOverHealing()
local jogadores_overhealed = {}
tabela = self.targets_overheal
local heal_container = instancia.showing[2]
- for target_name, amount in _pairs(tabela) do
+ for target_name, amount in pairs(tabela) do
local classe = "UNKNOW"
local actor_object = heal_container._ActorTable [heal_container._NameIndexTable [tabela.nome]]
if (actor_object) then
classe = actor_object.classe
end
- _table_insert (jogadores_overhealed, {target_name, amount, amount/total*100, classe})
+ tinsert (jogadores_overhealed, {target_name, amount, amount/total*100, classe})
end
_table_sort (jogadores_overhealed, _detalhes.Sort2)
@@ -1886,9 +1886,9 @@ function atributo_heal:MontaInfoHealingDone()
meu_tempo = info.instancia.showing:GetCombatTime()
end
- for spellid, tabela in _pairs(tabela) do
+ for spellid, tabela in pairs(tabela) do
local nome, rank, icone = _GetSpellInfo(spellid)
- _table_insert (minhas_curas, {
+ tinsert (minhas_curas, {
spellid,
tabela.total,
tabela.total/total*100,
@@ -1909,9 +1909,9 @@ function atributo_heal:MontaInfoHealingDone()
local PetActor = instancia.showing (class_type, PetName)
if (PetActor) then
local PetSkillsContainer = PetActor.spells._ActorTable
- for _spellid, _skill in _pairs(PetSkillsContainer) do --da foreach em cada spellid do container
+ for _spellid, _skill in pairs(PetSkillsContainer) do --da foreach em cada spellid do container
local nome, _, icone = _GetSpellInfo(_spellid)
- _table_insert (minhas_curas, {
+ tinsert (minhas_curas, {
_spellid,
_skill.total,
_skill.total/total*100,
@@ -1970,8 +1970,8 @@ function atributo_heal:MontaInfoHealingDone()
--TOP CURADOS
local healedTargets = {}
tabela = self.targets
- for target_name, amount in _pairs(tabela) do
- _table_insert (healedTargets, {target_name, amount, amount / total*100})
+ for target_name, amount in pairs(tabela) do
+ tinsert (healedTargets, {target_name, amount, amount / total*100})
end
_table_sort(healedTargets, _detalhes.Sort2)
@@ -2045,8 +2045,8 @@ function atributo_heal:MontaTooltipAlvos (thisLine, index, instancia)
GameCooltip:SetOption("MinWidth", max(230, thisLine:GetWidth()*0.98))
--add spells
- for spellid, tabela in _pairs(container) do
- for target_name, amount in _pairs(tabela ["targets" .. targets_key]) do
+ for spellid, tabela in pairs(container) do
+ for target_name, amount in pairs(tabela ["targets" .. targets_key]) do
if (target_name == inimigo) then
local nome, _, icone = _GetSpellInfo(spellid)
habilidades [#habilidades+1] = {nome, amount, icone}
@@ -2060,9 +2060,9 @@ function atributo_heal:MontaTooltipAlvos (thisLine, index, instancia)
local PetActor = instancia.showing (class_type, PetName)
if (PetActor) then
local PetSkillsContainer = PetActor.spells._ActorTable
- for _spellid, _skill in _pairs(PetSkillsContainer) do
+ for _spellid, _skill in pairs(PetSkillsContainer) do
- for target_name, amount in _pairs(_skill ["targets" .. targets_key]) do
+ for target_name, amount in pairs(_skill ["targets" .. targets_key]) do
if (target_name == inimigo) then
local nome, _, icone = _GetSpellInfo(_spellid)
habilidades [#habilidades+1] = {nome, amount, icone}
@@ -2150,7 +2150,7 @@ function atributo_heal:MontaDetalhesHealingTaken (nome, barra)
local showing = tabela_do_combate [class_type] --o que esta sendo mostrado -> [1] - dano [2] - cura --pega o container com ._NameIndexTable ._ActorTable
local este_curandeiro = showing._ActorTable[showing._NameIndexTable[nome]]
- local conteudo = este_curandeiro.spells._ActorTable --_pairs[] com os IDs das magias
+ local conteudo = este_curandeiro.spells._ActorTable --pairs[] com os IDs das magias
local actor = info.jogador.nome
@@ -2158,10 +2158,10 @@ function atributo_heal:MontaDetalhesHealingTaken (nome, barra)
local minhas_magias = {}
- for spellid, tabela in _pairs(conteudo) do --da foreach em cada spellid do container
+ for spellid, tabela in pairs(conteudo) do --da foreach em cada spellid do container
if (tabela.targets [actor]) then
local spell_nome, _, icone = _GetSpellInfo(spellid)
- _table_insert (minhas_magias, {spellid, tabela.targets [actor], tabela.targets [actor] / total*100, spell_nome, icone})
+ tinsert (minhas_magias, {spellid, tabela.targets [actor], tabela.targets [actor] / total*100, spell_nome, icone})
end
end
@@ -2278,7 +2278,7 @@ function atributo_heal:MontaDetalhesHealingDone (spellid, barra)
if (not spell_cast and misc_actor.spell_cast) then
local spellname = GetSpellInfo(spellid)
- for casted_spellid, amount in _pairs(misc_actor.spell_cast) do
+ for casted_spellid, amount in pairs(misc_actor.spell_cast) do
local casted_spellname = GetSpellInfo(casted_spellid)
if (casted_spellname == spellname) then
spell_cast = amount .. " (|cFFFFFF00?|r)"
@@ -2493,33 +2493,33 @@ end
_detalhes.refresh:r_atributo_heal (actor, shadow)
--copia o container de alvos (captura de dados)
- for target_name, amount in _pairs(actor.targets) do
+ for target_name, amount in pairs(actor.targets) do
shadow.targets [target_name] = 0
end
- for target_name, amount in _pairs(actor.targets_overheal) do
+ for target_name, amount in pairs(actor.targets_overheal) do
shadow.targets_overheal [target_name] = 0
end
- for target_name, amount in _pairs(actor.targets_absorbs) do
+ for target_name, amount in pairs(actor.targets_absorbs) do
shadow.targets_absorbs [target_name] = 0
end
--copia o container de habilidades (captura de dados)
- for spellid, habilidade in _pairs(actor.spells._ActorTable) do
+ for spellid, habilidade in pairs(actor.spells._ActorTable) do
--cria e soma o valor
local habilidade_shadow = shadow.spells:PegaHabilidade (spellid, true, nil, true)
--refresh e soma os valores dos alvos
- for target_name, amount in _pairs(habilidade.targets) do
+ for target_name, amount in pairs(habilidade.targets) do
if (not habilidade_shadow.targets [target_name]) then
habilidade_shadow.targets [target_name] = 0
end
end
- for target_name, amount in _pairs(habilidade.targets_overheal) do
+ for target_name, amount in pairs(habilidade.targets_overheal) do
if (not habilidade_shadow.targets_overheal [target_name]) then
habilidade_shadow.targets_overheal [target_name] = 0
end
end
- for target_name, amount in _pairs(habilidade.targets_absorbs) do
+ for target_name, amount in pairs(habilidade.targets_absorbs) do
if (not habilidade_shadow.targets_absorbs [target_name]) then
habilidade_shadow.targets_absorbs [target_name] = 0
end
@@ -2531,12 +2531,12 @@ end
habilidade_shadow.heal_denied = habilidade_shadow.heal_denied or {}
habilidade_shadow.heal_denied_healers = habilidade_shadow.heal_denied_healers or {}
--copia
- for spellID, amount in _pairs(habilidade.heal_denied) do
+ for spellID, amount in pairs(habilidade.heal_denied) do
if (not habilidade_shadow.heal_denied [spellID]) then
habilidade_shadow.heal_denied [spellID] = 0
end
end
- for healerName, amount in _pairs(habilidade.heal_denied_healers) do
+ for healerName, amount in pairs(habilidade.heal_denied_healers) do
if (not habilidade_shadow.heal_denied_healers [healerName]) then
habilidade_shadow.heal_denied_healers [healerName] = 0
end
@@ -2614,12 +2614,12 @@ end
end
--copia o healing_from (captura de dados)
- for nome, _ in _pairs(actor.healing_from) do
+ for nome, _ in pairs(actor.healing_from) do
shadow.healing_from [nome] = true
end
--copia o heal_enemy (captura de dados)
- for spellid, amount in _pairs(actor.heal_enemy) do
+ for spellid, amount in pairs(actor.heal_enemy) do
if (shadow.heal_enemy [spellid]) then
shadow.heal_enemy [spellid] = shadow.heal_enemy [spellid] + amount
else
@@ -2628,29 +2628,29 @@ end
end
--copia o container de alvos (captura de dados)
- for target_name, amount in _pairs(actor.targets) do
+ for target_name, amount in pairs(actor.targets) do
shadow.targets [target_name] = (shadow.targets [target_name] or 0) + amount
end
- for target_name, amount in _pairs(actor.targets_overheal) do
+ for target_name, amount in pairs(actor.targets_overheal) do
shadow.targets_overheal [target_name] = (shadow.targets_overheal [target_name] or 0) + amount
end
- for target_name, amount in _pairs(actor.targets_absorbs) do
+ for target_name, amount in pairs(actor.targets_absorbs) do
shadow.targets_absorbs [target_name] = (shadow.targets_absorbs [target_name] or 0) + amount
end
--copia o container de habilidades (captura de dados)
- for spellid, habilidade in _pairs(actor.spells._ActorTable) do
+ for spellid, habilidade in pairs(actor.spells._ActorTable) do
--cria e soma o valor
local habilidade_shadow = shadow.spells:PegaHabilidade (spellid, true, nil, true)
--refresh e soma os valores dos alvos
- for target_name, amount in _pairs(habilidade.targets) do
+ for target_name, amount in pairs(habilidade.targets) do
habilidade_shadow.targets [target_name] = (habilidade_shadow.targets [target_name] or 0) + amount
end
- for target_name, amount in _pairs(habilidade.targets_overheal) do
+ for target_name, amount in pairs(habilidade.targets_overheal) do
habilidade_shadow.targets_overheal [target_name] = (habilidade_shadow.targets_overheal [target_name] or 0) + amount
end
- for target_name, amount in _pairs(habilidade.targets_absorbs) do
+ for target_name, amount in pairs(habilidade.targets_absorbs) do
habilidade_shadow.targets_absorbs [target_name] = (habilidade_shadow.targets_absorbs [target_name] or 0) + amount
end
@@ -2660,16 +2660,16 @@ end
habilidade_shadow.heal_denied = habilidade_shadow.heal_denied or {}
habilidade_shadow.heal_denied_healers = habilidade_shadow.heal_denied_healers or {}
--copia
- for spellID, amount in _pairs(habilidade.heal_denied) do
+ for spellID, amount in pairs(habilidade.heal_denied) do
habilidade_shadow.heal_denied [spellID] = (habilidade_shadow.heal_denied [spellID] or 0) + amount
end
- for healerName, amount in _pairs(habilidade.heal_denied_healers) do
+ for healerName, amount in pairs(habilidade.heal_denied_healers) do
habilidade_shadow.heal_denied_healers [healerName] = (habilidade_shadow.heal_denied_healers [healerName] or 0) + amount
end
end
--soma todos os demais valores
- for key, value in _pairs(habilidade) do
+ for key, value in pairs(habilidade) do
if (type(value) == "number") then
if (key ~= "id") then
if (not habilidade_shadow [key]) then
@@ -2725,12 +2725,12 @@ atributo_heal.__add = function(tabela1, tabela2)
tabela1.healing_taken = tabela1.healing_taken + tabela2.healing_taken
--soma o healing_from
- for nome, _ in _pairs(tabela2.healing_from) do
+ for nome, _ in pairs(tabela2.healing_from) do
tabela1.healing_from [nome] = true
end
--somar o heal_enemy
- for spellid, amount in _pairs(tabela2.heal_enemy) do
+ for spellid, amount in pairs(tabela2.heal_enemy) do
if (tabela1.heal_enemy [spellid]) then
tabela1.heal_enemy [spellid] = tabela1.heal_enemy [spellid] + amount
else
@@ -2739,28 +2739,28 @@ atributo_heal.__add = function(tabela1, tabela2)
end
--somar o container de alvos
- for target_name, amount in _pairs(tabela2.targets) do
+ for target_name, amount in pairs(tabela2.targets) do
tabela1.targets [target_name] = (tabela1.targets [target_name] or 0) + amount
end
- for target_name, amount in _pairs(tabela2.targets_overheal) do
+ for target_name, amount in pairs(tabela2.targets_overheal) do
tabela1.targets_overheal [target_name] = (tabela1.targets_overheal [target_name] or 0) + amount
end
- for target_name, amount in _pairs(tabela2.targets_absorbs) do
+ for target_name, amount in pairs(tabela2.targets_absorbs) do
tabela1.targets_absorbs [target_name] = (tabela1.targets_absorbs [target_name] or 0) + amount
end
--soma o container de habilidades
- for spellid, habilidade in _pairs(tabela2.spells._ActorTable) do
+ for spellid, habilidade in pairs(tabela2.spells._ActorTable) do
--pega a habilidade no primeiro ator
local habilidade_tabela1 = tabela1.spells:PegaHabilidade (spellid, true, "SPELL_HEAL", false)
--soma os alvos
- for target_name, amount in _pairs(habilidade.targets) do
+ for target_name, amount in pairs(habilidade.targets) do
habilidade_tabela1.targets = (habilidade_tabela1.targets [target_name] or 0) + amount
end
- for target_name, amount in _pairs(habilidade.targets_overheal) do
+ for target_name, amount in pairs(habilidade.targets_overheal) do
habilidade_tabela1.targets_overheal = (habilidade_tabela1.targets_overheal [target_name] or 0) + amount
end
- for target_name, amount in _pairs(habilidade.targets_absorbs) do
+ for target_name, amount in pairs(habilidade.targets_absorbs) do
habilidade_tabela1.targets_absorbs = (habilidade_tabela1.targets_absorbs [target_name] or 0) + amount
end
@@ -2770,16 +2770,16 @@ atributo_heal.__add = function(tabela1, tabela2)
habilidade_tabela1.heal_denied = habilidade_tabela1.heal_denied or {}
habilidade_tabela1.heal_denied_healers = habilidade_tabela1.heal_denied_healers or {}
--copia
- for spellID, amount in _pairs(habilidade.heal_denied) do
+ for spellID, amount in pairs(habilidade.heal_denied) do
habilidade_tabela1.heal_denied [spellID] = (habilidade_tabela1.heal_denied [spellID] or 0) + amount
end
- for healerName, amount in _pairs(habilidade.heal_denied_healers) do
+ for healerName, amount in pairs(habilidade.heal_denied_healers) do
habilidade_tabela1.heal_denied_healers [healerName] = (habilidade_tabela1.heal_denied_healers [healerName] or 0) + amount
end
end
--soma os valores da habilidade
- for key, value in _pairs(habilidade) do
+ for key, value in pairs(habilidade) do
if (type(value) == "number") then
if (key ~= "id") then
if (not habilidade_tabela1 [key]) then
@@ -2828,7 +2828,7 @@ atributo_heal.__sub = function(tabela1, tabela2)
tabela1.healing_taken = tabela1.healing_taken - tabela2.healing_taken
--reduz o heal_enemy
- for spellid, amount in _pairs(tabela2.heal_enemy) do
+ for spellid, amount in pairs(tabela2.heal_enemy) do
if (tabela1.heal_enemy [spellid]) then
tabela1.heal_enemy [spellid] = tabela1.heal_enemy [spellid] - amount
else
@@ -2837,38 +2837,38 @@ atributo_heal.__sub = function(tabela1, tabela2)
end
--reduz o container de alvos
- for target_name, amount in _pairs(tabela2.targets) do
+ for target_name, amount in pairs(tabela2.targets) do
if (tabela1.targets [target_name]) then
tabela1.targets [target_name] = tabela1.targets [target_name] - amount
end
end
- for target_name, amount in _pairs(tabela2.targets_overheal) do
+ for target_name, amount in pairs(tabela2.targets_overheal) do
if (tabela1.targets_overheal [target_name]) then
tabela1.targets_overheal [target_name] = tabela1.targets_overheal [target_name] - amount
end
end
- for target_name, amount in _pairs(tabela2.targets_absorbs) do
+ for target_name, amount in pairs(tabela2.targets_absorbs) do
if (tabela1.targets_absorbs [target_name]) then
tabela1.targets_absorbs [target_name] = tabela1.targets_absorbs [target_name] - amount
end
end
--reduz o container de habilidades
- for spellid, habilidade in _pairs(tabela2.spells._ActorTable) do
+ for spellid, habilidade in pairs(tabela2.spells._ActorTable) do
--pega a habilidade no primeiro ator
local habilidade_tabela1 = tabela1.spells:PegaHabilidade (spellid, true, "SPELL_HEAL", false)
--alvos
- for target_name, amount in _pairs(habilidade.targets) do
+ for target_name, amount in pairs(habilidade.targets) do
if (habilidade_tabela1.targets [target_name]) then
habilidade_tabela1.targets [target_name] = habilidade_tabela1.targets [target_name] - amount
end
end
- for target_name, amount in _pairs(habilidade.targets_overheal) do
+ for target_name, amount in pairs(habilidade.targets_overheal) do
if (habilidade_tabela1.targets_overheal [target_name]) then
habilidade_tabela1.targets_overheal [target_name] = habilidade_tabela1.targets_overheal [target_name] - amount
end
end
- for target_name, amount in _pairs(habilidade.targets_absorbs) do
+ for target_name, amount in pairs(habilidade.targets_absorbs) do
if (habilidade_tabela1.targets_absorbs [target_name]) then
habilidade_tabela1.targets_absorbs [target_name] = habilidade_tabela1.targets_absorbs [target_name] - amount
end
@@ -2880,16 +2880,16 @@ atributo_heal.__sub = function(tabela1, tabela2)
habilidade_tabela1.heal_denied = habilidade_tabela1.heal_denied or {}
habilidade_tabela1.heal_denied_healers = habilidade_tabela1.heal_denied_healers or {}
--copia
- for spellID, amount in _pairs(habilidade.heal_denied) do
+ for spellID, amount in pairs(habilidade.heal_denied) do
habilidade_tabela1.heal_denied [spellID] = (habilidade_tabela1.heal_denied [spellID] or 0) - amount
end
- for healerName, amount in _pairs(habilidade.heal_denied_healers) do
+ for healerName, amount in pairs(habilidade.heal_denied_healers) do
habilidade_tabela1.heal_denied_healers [healerName] = (habilidade_tabela1.heal_denied_healers [healerName] or 0) - amount
end
end
--soma os valores da habilidade
- for key, value in _pairs(habilidade) do
+ for key, value in pairs(habilidade) do
if (type(value) == "number") then
if (key ~= "id") then
if (not habilidade_tabela1 [key]) then
diff --git a/classes/class_instance.lua b/classes/class_instance.lua
index ad83cceb..410f6e9d 100644
--- a/classes/class_instance.lua
+++ b/classes/class_instance.lua
@@ -4,7 +4,7 @@ local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
local type= type --lua local
local ipairs = ipairs --lua local
-local _pairs = pairs --lua local
+local pairs = pairs --lua local
local _math_floor = math.floor --lua local
local abs = math.abs --lua local
local _table_remove = table.remove --lua local
@@ -755,7 +755,7 @@ end
--break snaps of previous and next window
local left_instance = _detalhes:GetInstance(id-1)
if (left_instance) then
- for snap_side, instance_id in _pairs(left_instance.snap) do
+ for snap_side, instance_id in pairs(left_instance.snap) do
if (instance_id == id) then --snap na proxima instancia
left_instance.snap [snap_side] = nil
end
@@ -763,7 +763,7 @@ end
end
local right_instance = _detalhes:GetInstance(id+1)
if (right_instance) then
- for snap_side, instance_id in _pairs(right_instance.snap) do
+ for snap_side, instance_id in pairs(right_instance.snap) do
if (instance_id == id) then --snap na proxima instancia
right_instance.snap [snap_side] = nil
end
@@ -774,7 +774,7 @@ end
for i = id+1, #_detalhes.tabela_instancias do
local this_instance = _detalhes:GetInstance(i)
--fix the snaps
- for snap_side, instance_id in _pairs(this_instance.snap) do
+ for snap_side, instance_id in pairs(this_instance.snap) do
if (instance_id == i+1) then --snap na proxima instancia
this_instance.snap [snap_side] = i
elseif (instance_id == i-1 and i-2 > 0) then --snap na instancia anterior
@@ -944,7 +944,7 @@ function _detalhes:BaseFrameSnap()
end
local my_baseframe = self.baseframe
- for lado, snap_to in _pairs(self.snap) do
+ for lado, snap_to in pairs(self.snap) do
local instancia_alvo = _detalhes.tabela_instancias [snap_to]
if (instancia_alvo) then
@@ -982,7 +982,7 @@ function _detalhes:BaseFrameSnap()
local inicio_retro = self.meu_id - 1
for meu_id = inicio_retro, 1, -1 do
local instancia = _detalhes.tabela_instancias [meu_id]
- for lado, snap_to in _pairs(instancia.snap) do
+ for lado, snap_to in pairs(instancia.snap) do
if (snap_to < instancia.meu_id and snap_to ~= self.meu_id) then --se o lado que esta grudado for menor que o meu id... EX instnacia #2 grudada na #1
--ent�o tenho que pegar a inst�ncia do snap
@@ -1036,7 +1036,7 @@ function _detalhes:BaseFrameSnap()
for meu_id, instancia in ipairs(_detalhes.tabela_instancias) do
if (meu_id > self.meu_id) then
- for lado, snap_to in _pairs(instancia.snap) do
+ for lado, snap_to in pairs(instancia.snap) do
if (snap_to > instancia.meu_id and snap_to ~= self.meu_id) then
local instancia_alvo = _detalhes.tabela_instancias [snap_to]
@@ -1075,7 +1075,7 @@ function _detalhes:agrupar_janelas(lados)
local instancia = self
- for lado, esta_instancia in _pairs(lados) do
+ for lado, esta_instancia in pairs(lados) do
if (esta_instancia) then
instancia.baseframe:ClearAllPoints()
esta_instancia = _detalhes.tabela_instancias [esta_instancia]
@@ -1206,7 +1206,7 @@ function _detalhes:Desagrupar (instancia, lado, lado2)
local ID = instancia.meu_id
for id, esta_instancia in ipairs(_detalhes.tabela_instancias) do
- for index, iid in _pairs(esta_instancia.snap) do -- index = 1 left , 3 right, 2 bottom, 4 top
+ for index, iid in pairs(esta_instancia.snap) do -- index = 1 left , 3 right, 2 bottom, 4 top
if (iid and (iid == ID or id == ID)) then -- iid = instancia.meu_id
esta_instancia.snap [index] = nil
@@ -3005,7 +3005,7 @@ function _detalhes:FormatReportLines (report_table, data, f1, f2, f3)
f3 = f3 or default_format_value3
if (not _detalhes.fontstring_len) then
- _detalhes.fontstring_len = _detalhes.listener:CreateFontString (nil, "background", "GameFontNormal")
+ _detalhes.fontstring_len = _detalhes.listener:CreateFontString(nil, "background", "GameFontNormal")
end
local _, fontSize = FCF_GetChatWindowInfo (1)
if (fontSize < 1) then
diff --git a/classes/class_resources.lua b/classes/class_resources.lua
index 48864d15..16bf3097 100644
--- a/classes/class_resources.lua
+++ b/classes/class_resources.lua
@@ -3,10 +3,10 @@
local _cstr = string.format
local _math_floor = math.floor
local _table_sort = table.sort
-local _table_insert = table.insert
+local tinsert = table.insert
local _setmetatable = setmetatable
local ipairs = ipairs
-local _pairs = pairs
+local pairs = pairs
local _rawget= rawget
local _math_min = math.min
local _math_max = math.max
@@ -16,8 +16,8 @@ local type = type
--api locals
local _GetSpellInfo = _detalhes.getspellinfo
local GameTooltip = GameTooltip
-local _IsInRaid = IsInRaid
-local _IsInGroup = IsInGroup
+local IsInRaid = IsInRaid
+local IsInGroup = IsInGroup
local _string_replace = _detalhes.string.replace --details api
@@ -507,7 +507,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
if (instancia.total_bar.enabled) then
use_total_bar = true
- if (instancia.total_bar.only_in_group and (not _IsInGroup() and not _IsInRaid())) then
+ if (instancia.total_bar.only_in_group and (not IsInGroup() and not IsInRaid())) then
use_total_bar = false
end
end
@@ -839,7 +839,7 @@ local reset_tooltips_table = function()
t[1], t[2], t[3] = "", 0, ""
end
- for k, v in _pairs(energy_tooltips_hash) do
+ for k, v in pairs(energy_tooltips_hash) do
energy_tooltips_hash [k] = nil
end
end
@@ -867,7 +867,7 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
for index, actor in ipairs(container._ActorTable) do
if (actor.powertype == powertype) then
- for spellid, spell in _pairs(actor.spells._ActorTable) do
+ for spellid, spell in pairs(actor.spells._ActorTable) do
local on_self = spell.targets [name]
if (on_self) then
local already_tracked = energy_tooltips_hash [spellid]
@@ -1001,7 +1001,7 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown
--player generators
local allGeneratorSpells = {}
local allGenerated = 0
- for spellid, spellObject in _pairs(self.spells._ActorTable) do
+ for spellid, spellObject in pairs(self.spells._ActorTable) do
tinsert(allGeneratorSpells, {spellObject, spellObject.total, spellObject.totalover})
allGenerated = allGenerated + spellObject.total
end
@@ -1069,7 +1069,7 @@ function atributo_energy:MontaInfoRegenRecebido()
for index, actor in ipairs(container._ActorTable) do
if (actor.powertype == powertype) then
- for spellid, spell in _pairs(actor.spells._ActorTable) do
+ for spellid, spell in pairs(actor.spells._ActorTable) do
local on_self = spell.targets [my_name]
if (on_self) then
@@ -1320,7 +1320,7 @@ function atributo_energy:MontaTooltipAlvos (esta_barra, index)
--spells:
local i = 1
- for spellid, spell in _pairs(actor.spells._ActorTable) do
+ for spellid, spell in pairs(actor.spells._ActorTable) do
local on_self = spell.targets [my_name]
if (on_self) then
local t = energy_tooltips_table [i]
@@ -1423,15 +1423,15 @@ end
end
--targets
- for target_name, amount in _pairs(actor.targets) do
+ for target_name, amount in pairs(actor.targets) do
shadow.targets [target_name] = 0
end
--spells
- for spellid, habilidade in _pairs(actor.spells._ActorTable) do
+ for spellid, habilidade in pairs(actor.spells._ActorTable) do
local habilidade_shadow = shadow.spells:PegaHabilidade (spellid, true, "SPELL_ENERGY", false)
--spell targets
- for target_name, amount in _pairs(habilidade.targets) do
+ for target_name, amount in pairs(habilidade.targets) do
habilidade_shadow.targets [target_name] = 0
end
end
@@ -1496,12 +1496,12 @@ end
end
--targets
- for target_name, amount in _pairs(actor.targets) do
+ for target_name, amount in pairs(actor.targets) do
shadow.targets [target_name] = (shadow.targets [target_name] or 0) + amount
end
--spells
- for spellid, habilidade in _pairs(actor.spells._ActorTable) do
+ for spellid, habilidade in pairs(actor.spells._ActorTable) do
local habilidade_shadow = shadow.spells:PegaHabilidade (spellid, true, "SPELL_ENERGY", false)
@@ -1509,7 +1509,7 @@ end
habilidade_shadow.counter = habilidade_shadow.counter + habilidade.counter
--spell targets
- for target_name, amount in _pairs(habilidade.targets) do
+ for target_name, amount in pairs(habilidade.targets) do
habilidade_shadow.targets [target_name] = (habilidade_shadow.targets [target_name] or 0) + amount
end
@@ -1558,12 +1558,12 @@ atributo_energy.__add = function(tabela1, tabela2)
tabela1.alternatepower = tabela1.alternatepower + tabela2.alternatepower
--targets
- for target_name, amount in _pairs(tabela2.targets) do
+ for target_name, amount in pairs(tabela2.targets) do
tabela1.targets [target_name] = (tabela1.targets [target_name] or 0) + amount
end
--spells
- for spellid, habilidade in _pairs(tabela2.spells._ActorTable) do
+ for spellid, habilidade in pairs(tabela2.spells._ActorTable) do
local habilidade_tabela1 = tabela1.spells:PegaHabilidade (spellid, true, "SPELL_ENERGY", false)
@@ -1571,7 +1571,7 @@ atributo_energy.__add = function(tabela1, tabela2)
habilidade_tabela1.counter = habilidade_tabela1.counter + habilidade.counter
--spell targets
- for target_name, amount in _pairs(habilidade.targets) do
+ for target_name, amount in pairs(habilidade.targets) do
habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) + amount
end
@@ -1596,14 +1596,14 @@ atributo_energy.__sub = function(tabela1, tabela2)
tabela1.alternatepower = tabela1.alternatepower - tabela2.alternatepower
--targets
- for target_name, amount in _pairs(tabela2.targets) do
+ for target_name, amount in pairs(tabela2.targets) do
if (tabela1.targets [target_name]) then
tabela1.targets [target_name] = tabela1.targets [target_name] - amount
end
end
--spells
- for spellid, habilidade in _pairs(tabela2.spells._ActorTable) do
+ for spellid, habilidade in pairs(tabela2.spells._ActorTable) do
local habilidade_tabela1 = tabela1.spells:PegaHabilidade (spellid, true, "SPELL_ENERGY", false)
@@ -1611,7 +1611,7 @@ atributo_energy.__sub = function(tabela1, tabela2)
habilidade_tabela1.counter = habilidade_tabela1.counter - habilidade.counter
--spell targets
- for target_name, amount in _pairs(habilidade.targets) do
+ for target_name, amount in pairs(habilidade.targets) do
if (habilidade_tabela1.targets [target_name]) then
habilidade_tabela1.targets [target_name] = habilidade_tabela1.targets [target_name] - amount
end
diff --git a/classes/class_spelldamage.lua b/classes/class_spelldamage.lua
index 3b46310d..6e50d6e8 100644
--- a/classes/class_spelldamage.lua
+++ b/classes/class_spelldamage.lua
@@ -6,7 +6,7 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--local pointers
local ipairs = ipairs--lua local
- local _pairs = pairs--lua local
+ local pairs = pairs--lua local
local _UnitAura = UnitAura--api local
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -168,7 +168,7 @@
else
- for BuffName, _ in _pairs(_detalhes.Buffs.BuffsTable) do
+ for BuffName, _ in pairs(_detalhes.Buffs.BuffsTable) do
local name = _UnitAura ("player", BuffName)
if (name ~= nil) then
local buff_info = SpellBuffDetails [name] or {["counter"] = 0, ["total"] = 0, ["critico"] = 0, ["critico_dano"] = 0}
diff --git a/classes/class_utility.lua b/classes/class_utility.lua
index 6085d548..54dc90a2 100644
--- a/classes/class_utility.lua
+++ b/classes/class_utility.lua
@@ -1,7 +1,7 @@
--lua locals
local _cstr = string.format
local _math_floor = math.floor
-local _table_insert = table.insert
+local tinsert = table.insert
local _table_size = table.getn
local ipairs = ipairs
local pairs = pairs
@@ -15,12 +15,12 @@ local type = type
--api locals
local _GetSpellInfo = _detalhes.getspellinfo
local GameTooltip = GameTooltip
-local _IsInRaid = IsInRaid
-local _IsInGroup = IsInGroup
-local _GetNumGroupMembers = GetNumGroupMembers
+local IsInRaid = IsInRaid
+local IsInGroup = IsInGroup
+local GetNumGroupMembers = GetNumGroupMembers
local _GetNumSubgroupMembers = GetNumSubgroupMembers
local _UnitAura = UnitAura
-local _UnitGUID = UnitGUID
+local UnitGUID = UnitGUID
local _UnitName = UnitName
local format = _G.format
@@ -406,7 +406,7 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia)
do
if (not _detalhes.fontstring_len) then
- _detalhes.fontstring_len = _detalhes.listener:CreateFontString (nil, "background", "GameFontNormal")
+ _detalhes.fontstring_len = _detalhes.listener:CreateFontString(nil, "background", "GameFontNormal")
end
local _, fontSize = FCF_GetChatWindowInfo (1)
if (fontSize < 1) then
@@ -1328,14 +1328,14 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
local cacheGetTime = GetTime()
- if (_IsInRaid()) then
+ if (IsInRaid()) then
local checked = {}
- for raidIndex = 1, _GetNumGroupMembers() do
+ for raidIndex = 1, GetNumGroupMembers() do
local target = "raid"..raidIndex.."target"
- local his_target = _UnitGUID(target)
+ local his_target = UnitGUID(target)
if (his_target and not checked [his_target]) then
local rect = UnitReaction (target, "player")
@@ -1346,7 +1346,7 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
for debuffIndex = 1, 41 do
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff (target, debuffIndex)
if (name and unitCaster) then
- local playerGUID = _UnitGUID(unitCaster)
+ local playerGUID = UnitGUID(unitCaster)
if (playerGUID) then
local playerName, realmName = _UnitName (unitCaster)
@@ -1362,12 +1362,12 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
end
end
- elseif (_IsInGroup()) then
+ elseif (IsInGroup()) then
local checked = {}
- for raidIndex = 1, _GetNumGroupMembers()-1 do
- local his_target = _UnitGUID("party"..raidIndex.."target")
+ for raidIndex = 1, GetNumGroupMembers()-1 do
+ local his_target = UnitGUID("party"..raidIndex.."target")
local rect = UnitReaction ("party"..raidIndex.."target", "player")
if (his_target and not checked [his_target] and rect and rect <= 4) then
@@ -1377,7 +1377,7 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("party"..raidIndex.."target", debuffIndex)
if (name and unitCaster) then
local playerName, realmName = _UnitName (unitCaster)
- local playerGUID = _UnitGUID(unitCaster)
+ local playerGUID = UnitGUID(unitCaster)
if (playerGUID) then
if (realmName and realmName ~= "") then
playerName = playerName .. "-" .. realmName
@@ -1390,14 +1390,14 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
end
end
- local his_target = _UnitGUID("playertarget")
+ local his_target = UnitGUID("playertarget")
local rect = UnitReaction ("playertarget", "player")
if (his_target and not checked [his_target] and rect and rect <= 4) then
for debuffIndex = 1, 40 do
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex)
if (name and unitCaster) then
local playerName, realmName = _UnitName (unitCaster)
- local playerGUID = _UnitGUID(unitCaster)
+ local playerGUID = UnitGUID(unitCaster)
if (playerGUID) then
if (realmName and realmName ~= "") then
playerName = playerName .. "-" .. realmName
@@ -1409,7 +1409,7 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
end
else
- local his_target = _UnitGUID("playertarget")
+ local his_target = UnitGUID("playertarget")
if (his_target) then
local reaction = UnitReaction ("playertarget", "player")
if (reaction and reaction <= 4) then
@@ -1417,7 +1417,7 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex)
if (name and unitCaster) then
local playerName, realmName = _UnitName (unitCaster)
- local playerGUID = _UnitGUID(unitCaster)
+ local playerGUID = UnitGUID(unitCaster)
if (playerGUID) then
if (realmName and realmName ~= "") then
playerName = playerName .. "-" .. realmName
@@ -1441,7 +1441,7 @@ local runes_id = {
--called from control on leave / enter combat
function _detalhes:CatchRaidBuffUptime (in_or_out)
- if (_IsInRaid()) then
+ if (IsInRaid()) then
local pot_usage = {}
local focus_augmentation = {}
@@ -1449,9 +1449,9 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
--raid groups
local cacheGetTime = GetTime()
- for raidIndex = 1, _GetNumGroupMembers() do
+ for raidIndex = 1, GetNumGroupMembers() do
local RaidIndex = "raid" .. raidIndex
- local playerGUID = _UnitGUID(RaidIndex)
+ local playerGUID = UnitGUID(RaidIndex)
if (playerGUID) then
@@ -1496,19 +1496,19 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
_detalhes:SendEvent("COMBAT_PREPOTION_UPDATED", nil, pot_usage, focus_augmentation)
end
- elseif (_IsInGroup()) then
+ elseif (IsInGroup()) then
local pot_usage = {}
local focus_augmentation = {}
--party members
- for groupIndex = 1, _GetNumGroupMembers() - 1 do
+ for groupIndex = 1, GetNumGroupMembers() - 1 do
for buffIndex = 1, 41 do
local name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("party"..groupIndex, buffIndex, nil, "HELPFUL")
if (name and unitCaster and UnitExists (unitCaster) and UnitExists ("party" .. groupIndex) and UnitIsUnit (unitCaster, "party" .. groupIndex)) then
local playerName, realmName = _UnitName ("party"..groupIndex)
- local playerGUID = _UnitGUID("party"..groupIndex)
+ local playerGUID = UnitGUID("party"..groupIndex)
if (playerGUID) then
if (realmName and realmName ~= "") then
@@ -1535,7 +1535,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
local name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
if (name and unitCaster and UnitExists (unitCaster) and UnitIsUnit (unitCaster, "player")) then
local playerName = _UnitName ("player")
- local playerGUID = _UnitGUID("player")
+ local playerGUID = UnitGUID("player")
if (playerGUID) then
if (in_or_out == "BUFF_UPTIME_IN") then
if (_detalhes.PotionList [spellid]) then
@@ -1576,7 +1576,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
local name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
if (name and unitCaster and UnitExists (unitCaster) and UnitIsUnit (unitCaster, "player")) then
local playerName = _UnitName ("player")
- local playerGUID = _UnitGUID("player")
+ local playerGUID = UnitGUID("player")
if (playerGUID) then
if (in_or_out == "BUFF_UPTIME_IN") then
@@ -2048,7 +2048,7 @@ function atributo_misc:MontaInfoInterrupt()
--player
for _spellid, _tabela in pairs(minha_tabela) do --da foreach em cada spellid do container
local nome, _, icone = _GetSpellInfo(_spellid)
- _table_insert (meus_interrupts, {_spellid, _tabela.counter, _tabela.counter/meu_total*100, nome, icone})
+ tinsert (meus_interrupts, {_spellid, _tabela.counter, _tabela.counter/meu_total*100, nome, icone})
end
--pet
local ActorPets = self.pets
@@ -2059,7 +2059,7 @@ function atributo_misc:MontaInfoInterrupt()
local PetSkillsContainer = PetActor.interrupt_spells._ActorTable
for _spellid, _skill in pairs(PetSkillsContainer) do --da foreach em cada spellid do container
local nome, _, icone = _GetSpellInfo(_spellid)
- _table_insert (meus_interrupts, {_spellid, _skill.counter, _skill.counter/meu_total*100, nome .. " (|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r)", icone, PetActor})
+ tinsert (meus_interrupts, {_spellid, _skill.counter, _skill.counter/meu_total*100, nome .. " (|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r)", icone, PetActor})
end
end
end
diff --git a/classes/container_actors.lua b/classes/container_actors.lua
index 829766d1..7f450991 100644
--- a/classes/container_actors.lua
+++ b/classes/container_actors.lua
@@ -12,7 +12,7 @@
local _UnitClass = UnitClass --api local
local _IsInInstance = IsInInstance --api local
- local _UnitGUID = UnitGUID --api local
+ local UnitGUID = UnitGUID --api local
local strsplit = strsplit --api local
local _setmetatable = setmetatable --lua local
@@ -20,7 +20,7 @@
local _bit_band = bit.band --lua local
local _table_sort = table.sort --lua local
local ipairs = ipairs --lua local
- local _pairs = pairs --lua local
+ local pairs = pairs --lua local
local AddUnique = DetailsFramework.table.addunique --framework
local UnitGroupRolesAssigned = DetailsFramework.UnitGroupRolesAssigned --framework
@@ -437,7 +437,7 @@
local follower_text_object = _G ["DetailsPetOwnerFinderTextLeft3"] --not in use
local find_pet_found_owner = function(ownerName, serial, nome, flag, self)
- local ownerGuid = _UnitGUID(ownerName)
+ local ownerGuid = UnitGUID(ownerName)
if (ownerGuid) then
_detalhes.tabela_pets:Adicionar (serial, nome, flag, ownerGuid, ownerName, 0x00000417)
local nome_dele, dono_nome, dono_serial, dono_flag = _detalhes.tabela_pets:PegaDono (serial, nome, flag)
@@ -483,7 +483,7 @@
local text1 = line1 and line1:GetText()
if (text1 and text1 ~= "") then
--for _, playerName in ipairs(Details.tabela_vigente.raid_roster_indexed) do
- for playerName, _ in _pairs(_detalhes.tabela_vigente.raid_roster) do
+ for playerName, _ in pairs(_detalhes.tabela_vigente.raid_roster) do
local pName = playerName
playerName = playerName:gsub ("%-.*", "") --remove realm name
@@ -510,7 +510,7 @@
local line2 = _G ["DetailsPetOwnerFinderTextLeft3"]
local text2 = line2 and line2:GetText()
if (text2 and text2 ~= "") then
- for playerName, _ in _pairs(_detalhes.tabela_vigente.raid_roster) do
+ for playerName, _ in pairs(_detalhes.tabela_vigente.raid_roster) do
--for _, playerName in ipairs(Details.tabela_vigente.raid_roster_indexed) do
local pName = playerName
playerName = playerName:gsub ("%-.*", "") --remove realm name
diff --git a/classes/container_pets.lua b/classes/container_pets.lua
index b23d6e9d..deec220b 100644
--- a/classes/container_pets.lua
+++ b/classes/container_pets.lua
@@ -3,19 +3,19 @@ local gump = _detalhes.gump
local container_pets = _detalhes.container_pets
-- api locals
-local _UnitGUID = _G.UnitGUID
+local UnitGUID = _G.UnitGUID
local _UnitName = _G.UnitName
local _GetUnitName = _G.GetUnitName
-local _IsInRaid = _G.IsInRaid
-local _IsInGroup = _G.IsInGroup
-local _GetNumGroupMembers = _G.GetNumGroupMembers
+local IsInRaid = _G.IsInRaid
+local IsInGroup = _G.IsInGroup
+local GetNumGroupMembers = _G.GetNumGroupMembers
-- lua locals
local _setmetatable = setmetatable
local _bit_band = bit.band --lua local
-local _pairs = pairs
+local pairs = pairs
local ipairs = ipairs
-local _table_wipe = table.wipe
+local wipe = table.wipe
--details locals
local is_ignored = _detalhes.pets_ignored
@@ -59,10 +59,10 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
--buscar pelo pet na raide
local dono_nome, dono_serial, dono_flags
- if (_IsInRaid()) then
- for i = 1, _GetNumGroupMembers() do
- if (pet_serial == _UnitGUID("raidpet"..i)) then
- dono_serial = _UnitGUID("raid"..i)
+ if (IsInRaid()) then
+ for i = 1, GetNumGroupMembers() do
+ if (pet_serial == UnitGUID("raidpet"..i)) then
+ dono_serial = UnitGUID("raid"..i)
dono_flags = 0x00000417 --emulate sourceflag flag
local nome, realm = _UnitName ("raid"..i)
@@ -73,10 +73,10 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
end
end
- elseif (_IsInGroup()) then
- for i = 1, _GetNumGroupMembers()-1 do
- if (pet_serial == _UnitGUID("partypet"..i)) then
- dono_serial = _UnitGUID("party"..i)
+ elseif (IsInGroup()) then
+ for i = 1, GetNumGroupMembers()-1 do
+ if (pet_serial == UnitGUID("partypet"..i)) then
+ dono_serial = UnitGUID("party"..i)
dono_flags = 0x00000417 --emulate sourceflag flag
local nome, realm = _UnitName ("party"..i)
@@ -90,10 +90,10 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
end
if (not dono_nome) then
- if (pet_serial == _UnitGUID("pet")) then
+ if (pet_serial == UnitGUID("pet")) then
dono_nome = _GetUnitName ("player")
- dono_serial = _UnitGUID("player")
- if (_IsInGroup() or _IsInRaid()) then
+ dono_serial = UnitGUID("player")
+ if (IsInGroup() or IsInRaid()) then
dono_flags = 0x00000417 --emulate sourceflag flag
else
dono_flags = 0x00000411 --emulate sourceflag flag
@@ -126,7 +126,7 @@ end
function container_pets:Unpet (...)
local unitid = ...
- local owner_serial = _UnitGUID(unitid)
+ local owner_serial = UnitGUID(unitid)
if (owner_serial) then
--tira o pet existente da tabela de pets e do cache do core
@@ -137,7 +137,7 @@ function container_pets:Unpet (...)
_detalhes.pets_players [owner_serial] = nil
end
--verifica se h� um pet novo deste jogador
- local pet_serial = _UnitGUID(unitid .. "pet")
+ local pet_serial = UnitGUID(unitid .. "pet")
if (pet_serial) then
if (not _detalhes.tabela_pets.pets [pet_serial]) then
local nome, realm = _UnitName (unitid)
@@ -157,16 +157,16 @@ function container_pets:PlayerPet (player_serial, pet_serial)
end
function container_pets:BuscarPets()
- if (_IsInRaid()) then
- for i = 1, _GetNumGroupMembers(), 1 do
- local pet_serial = _UnitGUID("raidpet"..i)
+ if (IsInRaid()) then
+ for i = 1, GetNumGroupMembers(), 1 do
+ local pet_serial = UnitGUID("raidpet"..i)
if (pet_serial) then
if (not _detalhes.tabela_pets.pets [pet_serial]) then
local nome, realm = _UnitName ("raid"..i)
if (realm and realm ~= "") then
nome = nome.."-"..realm
end
- local owner_serial = _UnitGUID("raid"..i)
+ local owner_serial = UnitGUID("raid"..i)
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("raidpet"..i), 0x1114, owner_serial, nome, 0x514)
_detalhes.parser:RevomeActorFromCache (pet_serial)
container_pets:PlayerPet (owner_serial, pet_serial)
@@ -174,9 +174,9 @@ function container_pets:BuscarPets()
end
end
- elseif (_IsInGroup()) then
- for i = 1, _GetNumGroupMembers()-1, 1 do
- local pet_serial = _UnitGUID("partypet"..i)
+ elseif (IsInGroup()) then
+ for i = 1, GetNumGroupMembers()-1, 1 do
+ local pet_serial = UnitGUID("partypet"..i)
if (pet_serial) then
if (not _detalhes.tabela_pets.pets [pet_serial]) then
local nome, realm = _UnitName ("party"..i)
@@ -184,24 +184,24 @@ function container_pets:BuscarPets()
if (realm and realm ~= "") then
nome = nome.."-"..realm
end
- _detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("partypet"..i), 0x1114, _UnitGUID("party"..i), nome, 0x514)
+ _detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("partypet"..i), 0x1114, UnitGUID("party"..i), nome, 0x514)
end
end
end
- local pet_serial = _UnitGUID("pet")
+ local pet_serial = UnitGUID("pet")
if (pet_serial) then
if (not _detalhes.tabela_pets.pets [pet_serial]) then
- _detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("pet"), 0x1114, _UnitGUID("player"), _detalhes.playername, 0x514)
+ _detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("pet"), 0x1114, UnitGUID("player"), _detalhes.playername, 0x514)
end
end
else
- local pet_serial = _UnitGUID("pet")
+ local pet_serial = UnitGUID("pet")
if (pet_serial) then
if (not _detalhes.tabela_pets.pets [pet_serial]) then
- _detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("pet"), 0x1114, _UnitGUID("player"), _detalhes.playername, 0x514)
+ _detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("pet"), 0x1114, UnitGUID("player"), _detalhes.playername, 0x514)
end
end
end
@@ -223,14 +223,14 @@ function container_pets:Adicionar (pet_serial, pet_nome, pet_flags, dono_serial,
end
function _detalhes:WipePets()
- return _table_wipe(_detalhes.tabela_pets.pets)
+ return wipe(_detalhes.tabela_pets.pets)
end
function _detalhes:LimparPets()
--erase old pet table by creating a new one
local newPetTable = {}
--minimum of 90 minutes to clean a pet from the pet table data
- for PetSerial, PetTable in _pairs(_detalhes.tabela_pets.pets) do
+ for PetSerial, PetTable in pairs(_detalhes.tabela_pets.pets) do
if ( (PetTable[4] + 5400 > _detalhes._tempo + 1) or (PetTable[5] and PetTable[4] + 43200 > _detalhes._tempo) ) then
newPetTable [PetSerial] = PetTable
end
diff --git a/classes/container_segments.lua b/classes/container_segments.lua
index d33b57ce..b9453eda 100644
--- a/classes/container_segments.lua
+++ b/classes/container_segments.lua
@@ -514,7 +514,7 @@ function segmentClass:resetar()
wipe(Details.cache_healing_group)
Details:UpdateParserGears()
- if (not InCombatLockdown() and not UnitAffectingCombat ("player")) then
+ if (not InCombatLockdown() and not UnitAffectingCombat("player")) then
--workarround for the "script run too long" issue while outside the combat lockdown
local cleargarbage = function()
collectgarbage()
diff --git a/classes/custom_damagedone.lua b/classes/custom_damagedone.lua
index 14a3de7a..94ee605d 100644
--- a/classes/custom_damagedone.lua
+++ b/classes/custom_damagedone.lua
@@ -19,11 +19,11 @@ local _
local _cstr = string.format --lua local
local _math_floor = math.floor --lua local
local _table_sort = table.sort --lua local
-local _table_insert = table.insert --lua local
+local tinsert = table.insert --lua local
local _table_size = table.getn --lua local
local _setmetatable = setmetatable --lua local
local ipairs = ipairs --lua local
-local _pairs = pairs --lua local
+local pairs = pairs --lua local
local _rawget= rawget --lua local
local _math_min = math.min --lua local
local _math_max = math.max --lua local
@@ -32,9 +32,9 @@ local _unpack = unpack --lua local
local type = type --lua local
local _GetSpellInfo = _detalhes.getspellinfo -- api local
-local _IsInRaid = IsInRaid -- api local
-local _IsInGroup = IsInGroup -- api local
-local _GetNumGroupMembers = GetNumGroupMembers -- api local
+local IsInRaid = IsInRaid -- api local
+local IsInGroup = IsInGroup -- api local
+local GetNumGroupMembers = GetNumGroupMembers -- api local
local _GetNumPartyMembers = GetNumPartyMembers or GetNumSubgroupMembers -- api local
local _GetNumRaidMembers = GetNumRaidMembers or GetNumGroupMembers -- api local
local _GetUnitName = GetUnitName -- api local
@@ -59,7 +59,7 @@ local temp_table = {}
local target_func = function(main_table)
local i = 1
- for name, amount in _pairs(main_table) do
+ for name, amount in pairs(main_table) do
local t = temp_table [i]
if (not t) then
t = {"", 0}
@@ -75,7 +75,7 @@ end
local spells_used_func = function(main_table, target)
local i = 1
- for spellid, spell_table in _pairs(main_table) do
+ for spellid, spell_table in pairs(main_table) do
local target_amount = spell_table.targets [target]
if (target_amount) then
local t = temp_table [i]
@@ -117,7 +117,7 @@ function atributo_custom:damagedoneTooltip (actor, target, spellid, combat, inst
local this_actor = combat (1, targetname)
if (this_actor) then
- for name, _ in _pairs(this_actor.damage_from) do
+ for name, _ in pairs(this_actor.damage_from) do
local aggressor = combat (1, name)
if (aggressor) then
local spell = aggressor.spells._ActorTable [spellid]
@@ -219,7 +219,7 @@ function atributo_custom:damagedone (actor, source, target, spellid, combat, ins
if (spell) then
if (target) then
if (target == "[all]") then
- for target_name, amount in _pairs(spell.targets) do
+ for target_name, amount in pairs(spell.targets) do
--add amount
--we need to pass a object here in order to get name and class, so we just get the main damage actor from the combat
@@ -236,7 +236,7 @@ function atributo_custom:damagedone (actor, source, target, spellid, combat, ins
elseif (target == "[raid]") then
local roster = combat.raid_roster
- for target_name, amount in _pairs(spell.targets) do
+ for target_name, amount in pairs(spell.targets) do
if (roster [target_name]) then
--add amount
instance_container:AddValue (combat (1, target_name), amount, true)
@@ -289,14 +289,14 @@ function atributo_custom:damagedone (actor, source, target, spellid, combat, ins
if (target == "[all]") then
local total = 0
- for target_name, amount in _pairs(actor.targets) do
+ for target_name, amount in pairs(actor.targets) do
total = total + amount
end
return total
elseif (target == "[raid]") then
local total = 0
- for target_name, amount in _pairs(actor.targets) do
+ for target_name, amount in pairs(actor.targets) do
if (combat.raid_roster [target_name]) then
total = total + amount
end
diff --git a/classes/custom_healingdone.lua b/classes/custom_healingdone.lua
index f3a11a03..566e672a 100644
--- a/classes/custom_healingdone.lua
+++ b/classes/custom_healingdone.lua
@@ -12,11 +12,11 @@
local _cstr = string.format --lua local
local _math_floor = math.floor --lua local
local _table_sort = table.sort --lua local
- local _table_insert = table.insert --lua local
+ local tinsert = table.insert --lua local
local _table_size = table.getn --lua local
local _setmetatable = setmetatable --lua local
local ipairs = ipairs --lua local
- local _pairs = pairs --lua local
+ local pairs = pairs --lua local
local _rawget= rawget --lua local
local _math_min = math.min --lua local
local _math_max = math.max --lua local
@@ -25,9 +25,9 @@
local type = type --lua local
local _GetSpellInfo = _detalhes.getspellinfo -- api local
- local _IsInRaid = IsInRaid -- api local
- local _IsInGroup = IsInGroup -- api local
- local _GetNumGroupMembers = GetNumGroupMembers -- api local
+ local IsInRaid = IsInRaid -- api local
+ local IsInGroup = IsInGroup -- api local
+ local GetNumGroupMembers = GetNumGroupMembers -- api local
local _GetNumPartyMembers = GetNumPartyMembers or GetNumSubgroupMembers -- api local
local _GetNumRaidMembers = GetNumRaidMembers or GetNumGroupMembers -- api local
local _GetUnitName = GetUnitName -- api local
@@ -52,7 +52,7 @@
local target_func = function(main_table)
local i = 1
- for name, amount in _pairs(main_table) do
+ for name, amount in pairs(main_table) do
local t = temp_table [i]
if (not t) then
t = {"", 0}
@@ -68,7 +68,7 @@
local spells_used_func = function(main_table, target)
local i = 1
- for spellid, spell_table in _pairs(main_table) do
+ for spellid, spell_table in pairs(main_table) do
local target_amount = spell_table.targets [target]
if (target_amount) then
local t = temp_table [i]
@@ -111,7 +111,7 @@
local this_actor = combat (2, targetname)
if (this_actor) then
- for name, _ in _pairs(this_actor.healing_from) do
+ for name, _ in pairs(this_actor.healing_from) do
local healer = combat (2, name)
if (healer) then
local spell = healer.spells._ActorTable [spellid]
@@ -208,7 +208,7 @@
if (spell) then
if (target) then
if (target == "[all]") then
- for target_name, amount in _pairs(spell.targets) do
+ for target_name, amount in pairs(spell.targets) do
--add amount
--we need to pass a object here in order to get name and class, so we just get the main heal actor from the combat
@@ -225,7 +225,7 @@
elseif (target == "[raid]") then
local roster = combat.raid_roster
- for target_name, amount in _pairs(spell.targets) do
+ for target_name, amount in pairs(spell.targets) do
if (roster [target_name]) then
--add amount
instance_container:AddValue (combat (1, target_name), amount, true)
@@ -278,14 +278,14 @@
if (target == "[all]") then
local total = 0
- for target_name, amount in _pairs(actor.targets) do
+ for target_name, amount in pairs(actor.targets) do
total = total + amount
end
return total
elseif (target == "[raid]") then
local total = 0
- for target_name, amount in _pairs(actor.targets) do
+ for target_name, amount in pairs(actor.targets) do
if (combat.raid_roster [target_name]) then
total = total + amount
end
diff --git a/core/control.lua b/core/control.lua
index e14a8965..7064855c 100644
--- a/core/control.lua
+++ b/core/control.lua
@@ -59,7 +59,7 @@
for _, actor in ipairs(Details.tabela_vigente[class_type_dano]._ActorTable) do
- if (not actor.grupo and not actor.owner and not actor.nome:find ("[*]") and bitBand (actor.flag_original, 0x00000060) ~= 0) then --0x20+0x40 neutral + enemy reaction
+ if (not actor.grupo and not actor.owner and not actor.nome:find ("[*]") and bitBand(actor.flag_original, 0x00000060) ~= 0) then --0x20+0x40 neutral + enemy reaction
for name, _ in pairs(actor.targets) do
if (name == Details.playername) then
return actor.nome
@@ -161,7 +161,7 @@
--catch boss function if any
local bossFunction, bossFunctionType = Details:GetBossFunction (ZoneMapID, BossIndex)
if (bossFunction) then
- if (bitBand (bossFunctionType, 0x1) ~= 0) then --realtime
+ if (bitBand(bossFunctionType, 0x1) ~= 0) then --realtime
Details.bossFunction = bossFunction
Details.tabela_vigente.bossFunction = Details:ScheduleTimer("bossFunction", 1)
end
@@ -629,7 +629,7 @@
else
--this segment is a boss fight
- if (not InCombatLockdown() and not UnitAffectingCombat ("player")) then
+ if (not InCombatLockdown() and not UnitAffectingCombat("player")) then
else
--Details.schedule_flag_boss_components = true
@@ -644,7 +644,7 @@
Details.tabela_vigente.is_boss.killed = true
--add to storage
- if (not InCombatLockdown() and not UnitAffectingCombat ("player") and not Details.logoff_saving_data) then
+ if (not InCombatLockdown() and not UnitAffectingCombat("player") and not Details.logoff_saving_data) then
local successful, errortext = pcall (Details.Database.StoreEncounter)
if (not successful) then
Details:Msg("error occurred on Details.Database.StoreEncounter():", errortext)
@@ -660,7 +660,7 @@
Details:SendEvent("COMBAT_BOSS_WIPE", nil, Details.tabela_vigente)
--add to storage
- if (not InCombatLockdown() and not UnitAffectingCombat ("player") and not Details.logoff_saving_data) then
+ if (not InCombatLockdown() and not UnitAffectingCombat("player") and not Details.logoff_saving_data) then
local successful, errortext = pcall (Details.Database.StoreWipe)
if (not successful) then
Details:Msg("error occurred on Details.Database.StoreWipe():", errortext)
@@ -702,7 +702,7 @@
--encounter boss function
local bossFunction, bossFunctionType = Details:GetBossFunction (Details.tabela_vigente.is_boss.mapid or 0, Details.tabela_vigente.is_boss.index or 0)
if (bossFunction) then
- if (bitBand (bossFunctionType, 0x2) ~= 0) then --end of combat
+ if (bitBand(bossFunctionType, 0x2) ~= 0) then --end of combat
if (not Details.logoff_saving_data) then
local successful, errortext = pcall (bossFunction, Details.tabela_vigente)
if (not successful) then
diff --git a/core/gears.lua b/core/gears.lua
index b8055a41..04868dd4 100644
--- a/core/gears.lua
+++ b/core/gears.lua
@@ -1377,7 +1377,7 @@ local create_storage_tables = function()
end
function _detalhes.ScheduleLoadStorage()
- if (InCombatLockdown() or UnitAffectingCombat ("player")) then
+ if (InCombatLockdown() or UnitAffectingCombat("player")) then
if (_detalhes.debug) then
print("|cFFFFFF00Details! storage scheduled to load (player in combat).")
end
@@ -1421,7 +1421,7 @@ function _detalhes.OpenStorage()
--check if the storage is already loaded
if (not IsAddOnLoaded ("Details_DataStorage")) then
--can't open it during combat
- if (InCombatLockdown() or UnitAffectingCombat ("player")) then
+ if (InCombatLockdown() or UnitAffectingCombat("player")) then
if (_detalhes.debug) then
print("|cFFFFFF00Details! Storage|r: can't load storage due to combat.")
end
@@ -2045,7 +2045,7 @@ function ilvl_core:GetItemLevel (unitid, guid, is_forced, try_number)
end
--ddouble check
- if (not is_forced and (UnitAffectingCombat ("player") or InCombatLockdown())) then
+ if (not is_forced and (UnitAffectingCombat("player") or InCombatLockdown())) then
return
end
diff --git a/core/meta.lua b/core/meta.lua
index aea4f91f..1a80f4d3 100644
--- a/core/meta.lua
+++ b/core/meta.lua
@@ -6,13 +6,13 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--local pointers
local _
- local _pairs = pairs --lua local
+ local pairs = pairs --lua local
local ipairs = ipairs --lua local
local _rawget = rawget --lua local
local _setmetatable = setmetatable --lua local
local _table_remove = table.remove --lua local
local _bit_band = bit.band --lua local
- local _table_wipe = table.wipe --lua local
+ local wipe = table.wipe --lua local
local _time = time --lua local
local _InCombatLockdown = InCombatLockdown --wow api local
@@ -743,7 +743,7 @@
--desativado 7.2.5 veio com algum bug e a checagem de memoria esta sendo feita durante o combate
function _detalhes:CheckMemoryAfterCombat()
- if (_detalhes.next_memory_check < time() and not InCombatLockdown() and not UnitAffectingCombat ("player")) then
+ if (_detalhes.next_memory_check < time() and not InCombatLockdown() and not UnitAffectingCombat("player")) then
_detalhes.next_memory_check = time()+_detalhes.intervalo_memoria
UpdateAddOnMemoryUsage()
local memory = GetAddOnMemoryUsage ("Details")
@@ -754,7 +754,7 @@
end
function _detalhes:CheckMemoryPeriodically()
- if (_detalhes.next_memory_check <= time() and not _InCombatLockdown() and not _detalhes.in_combat and not UnitAffectingCombat ("player")) then
+ if (_detalhes.next_memory_check <= time() and not _InCombatLockdown() and not _detalhes.in_combat and not UnitAffectingCombat("player")) then
_detalhes.next_memory_check = time() + _detalhes.intervalo_memoria - 3
UpdateAddOnMemoryUsage()
local memory = GetAddOnMemoryUsage ("Details")
@@ -841,7 +841,7 @@
_detalhes:ResetSpecCache()
--wipa container de escudos
- _table_wipe(_detalhes.escudos)
+ wipe(_detalhes.escudos)
_detalhes.ultima_coleta = _detalhes._tempo
diff --git a/core/parser.lua b/core/parser.lua
index c00dd6f6..335a97f1 100755
--- a/core/parser.lua
+++ b/core/parser.lua
@@ -11,35 +11,33 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--local pointers
- local _UnitAffectingCombat = UnitAffectingCombat --wow api local
- local _UnitHealth = UnitHealth --wow api local
- local _UnitHealthMax = UnitHealthMax --wow api local
- local _UnitGUID = UnitGUID --wow api local
- local _IsInRaid = IsInRaid --wow api local
- local _IsInGroup = IsInGroup --wow api local
- local _GetNumGroupMembers = GetNumGroupMembers --wow api local
+ local UnitAffectingCombat = UnitAffectingCombat
+ local UnitHealth = UnitHealth
+ local UnitHealthMax = UnitHealthMax
+ local UnitGUID = UnitGUID
+ local IsInRaid = IsInRaid
+ local IsInGroup = IsInGroup
+ local GetNumGroupMembers = GetNumGroupMembers
+ local CombatLogGetCurrentEventInfo = CombatLogGetCurrentEventInfo
+ local GetTime = GetTime
+ local tonumber = tonumber
+ local tinsert = table.insert
+ local select = select
+ local bitBand = bit.band
+ local floor = math.floor
+ local ipairs = ipairs
+ local pairs = pairs
+ local type = type
+ local ceil = math.ceil
+ local wipe = table.wipe
+ local strsplit = strsplit
+
local _UnitGroupRolesAssigned = DetailsFramework.UnitGroupRolesAssigned
- local _GetTime = GetTime
- local _tonumber = tonumber
+ local _GetSpellInfo = _detalhes.getspellinfo
- local _CombatLogGetCurrentEventInfo = CombatLogGetCurrentEventInfo
-
- local _table_insert = table.insert --lua local
- local _select = select --lua local
- local _bit_band = bit.band --lua local
- local _math_floor = math.floor --lua local
- local ipairs = ipairs --lua local
- local _pairs = pairs --lua local
- local type = type --lua local
- local _math_ceil = math.ceil --lua local
- local _table_wipe = table.wipe --lua local
- local _strsplit = strsplit
-
- local _GetSpellInfo = _detalhes.getspellinfo --details api
local escudo = _detalhes.escudos --details local
local parser = _detalhes.parser --details local
local absorb_spell_list = _detalhes.AbsorbSpells --details local
- --local arena_enemies = _detalhes.arena_enemies --details local (not in use - deprecated)
local cc_spell_list = DetailsFramework.CrowdControlSpells
local container_habilidades = _detalhes.container_habilidades --details local
@@ -61,6 +59,7 @@
--total container pointers
local _current_total = _current_combat.totals
local _current_gtotal = _current_combat.totals_grupo
+
--actors container pointers
local _current_damage_container = _current_combat [1]
local _current_heal_container = _current_combat [2]
@@ -108,6 +107,7 @@
local druid_kyrian_bounds = {} --remove on 10.0
--spell containers for special cases
local monk_guard_talent = {} --guard talent for bm monks
+
--spell reflection
local reflection_damage = {} --self-inflicted damage
local reflection_debuffs = {} --self-inflicted debuffs
@@ -239,6 +239,9 @@
[49919] = 49921,
[49920] = 49921,
[66992] = 49921, --offhand
+
+ --Seal of Command
+ [20424] = 69403,
}
else --retail
@@ -404,17 +407,13 @@
[315197] = true, --Thing From Beyond --REMOVE ON 9.0
}
- local NPCID_SPIKEDBALL = 176581 --remove on 10.0 --spikeball npcId
- --local NPCID_SPIKEDBALL = 161881 --remove on 10.0 - debug npc (maldraxus)
- --local NPCID_SPIKEDBALL = 167999 --remove on 10.0 - debug npc (echo of sin sire denatrius)
+ --local NPCID_SPIKEDBALL = 176581 --remove on 10.0 --spikeball npcId
--spikeball cache
local spikeball_damage_cache = {
npc_cache = {},
ignore_spikeballs = 0,
}
- local NPCID_KELTHUZAD_ADDMIMICPLAYERS = 176605
-
--damage spells to ignore
local damage_spells_to_ignore = {
--the damage that the warlock apply to its pet through soullink is ignored
@@ -651,11 +650,10 @@
end
function parser:spell_dmg (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand, isreflected)
-
------------------------------------------------------------------------------------------------
--early checks and fixes
if (who_serial == "") then
- if (who_flags and _bit_band (who_flags, OBJECT_TYPE_PETS) ~= 0) then --� um pet
+ if (who_flags and bitBand(who_flags, OBJECT_TYPE_PETS) ~= 0) then --� um pet
--pets must have a serial
return
end
@@ -673,7 +671,7 @@
end
--check if the spell isn't in the backlist
- if (damage_spells_to_ignore [spellid]) then
+ if (damage_spells_to_ignore[spellid]) then
return
end
@@ -707,7 +705,6 @@
------------------------------------------------------------------------------------------------
--spell reflection
if (who_serial == alvo_serial and not reflection_ignore[spellid]) then --~reflect
-
--this spell could've been reflected, check it
if (reflection_events[who_serial] and reflection_events[who_serial][spellid] and time-reflection_events[who_serial][spellid].time > 3.5 and (not reflection_debuffs[who_serial] or (reflection_debuffs[who_serial] and not reflection_debuffs[who_serial][spellid]))) then
--here we check if we have to filter old reflection data
@@ -762,13 +759,13 @@
--REMOVE ON 10.0
if (_current_encounter_id == 2422) then --kel'thuzad
if (raid_members_cache[who_serial]) then --attacker is a player
- if (who_flags and _bit_band(who_flags, 0xa60) ~= 0) then --neutral or hostile and contorlled by npc
+ if (who_flags and bitBand(who_flags, 0xa60) ~= 0) then --neutral or hostile and contorlled by npc
who_name = who_name .. "*"
who_flags = 0xa48
end
elseif (raid_members_cache[alvo_serial]) then --defender is a player
- if (alvo_flags and _bit_band(alvo_flags, 0xa60) ~= 0) then --neutral or hostile and contorlled by npc
+ if (alvo_flags and bitBand(alvo_flags, 0xa60) ~= 0) then --neutral or hostile and contorlled by npc
alvo_name = alvo_name .. "*"
alvo_flags = 0xa48
end
@@ -785,7 +782,7 @@
--target
if (not npcId) then
- npcId = _tonumber(_select(6, _strsplit ("-", alvo_serial)) or 0)
+ npcId = tonumber(select(6, strsplit("-", alvo_serial)) or 0)
npcid_cache[alvo_serial] = npcId
end
@@ -797,11 +794,11 @@
alvo_flags = 0xa48
end
- if (npcId == NPCID_KELTHUZAD_ADDMIMICPLAYERS) then --remove on 10.0
+ if (npcId == 176605) then --remove on 10.0 --NPCID_KELTHUZAD_ADDMIMICPLAYERS
alvo_name = "Tank Add"
end
- if (npcId == NPCID_SPIKEDBALL) then --remove on 10.0, all this IF block
+ if (npcId == 176581) then --remove on 10.0, all this IF block -- NPCID_SPIKEDBALL
if (spikeball_damage_cache.ignore_spikeballs) then
if (spikeball_damage_cache.ignore_spikeballs > GetTime()) then
return
@@ -880,9 +877,10 @@
--source
npcId = npcid_cache[who_serial]
if (not npcId) then
- npcId = _tonumber(_select(6, _strsplit ("-", who_serial)) or 0)
+ npcId = tonumber(select(6, strsplit("-", who_serial)) or 0)
npcid_cache[who_serial] = npcId
end
+
if (ignored_npcids[npcId]) then
return
end
@@ -890,7 +888,8 @@
if (npcId == 176703) then --remove on 10.0 --kelthuzad
who_flags = 0xa48
end
- if (npcId == NPCID_KELTHUZAD_ADDMIMICPLAYERS) then --remove on 10.0
+
+ if (npcId == 176605) then --remove on 10.0 --NPCID_KELTHUZAD_ADDMIMICPLAYERS
who_name = "Tank Add"
end
@@ -909,15 +908,15 @@
--if (special_damage_spells [spellid]) then --remove this IF due to have hit 60 local variables
--stagger
if (spellid == SPELLID_MONK_STAGGER) then
- return parser:MonkStagger_damage (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand)
+ return parser:MonkStagger_damage(token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand)
--spirit link toten
elseif (spellid == SPELLID_SHAMAN_SLT) then
- return parser:SLT_damage (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand)
+ return parser:SLT_damage(token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand)
--Light of the Martyr - paladin spell which causes damage to the caster it self
elseif (spellid == 196917) then -- or spellid == 183998 < healing part
- return parser:LOTM_damage (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand)
+ return parser:LOTM_damage(token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand)
end
--end
@@ -931,19 +930,17 @@
------------------------------------------------------------------------------------------------
--check if need start an combat
-
if (not _in_combat) then --~startcombat ~combatstart
if ( token ~= "SPELL_PERIODIC_DAMAGE" and
(
- (who_flags and _bit_band (who_flags, AFFILIATION_GROUP) ~= 0 and _UnitAffectingCombat (who_name) )
+ (who_flags and bitBand(who_flags, AFFILIATION_GROUP) ~= 0 and UnitAffectingCombat(who_name) )
or
- (alvo_flags and _bit_band (alvo_flags, AFFILIATION_GROUP) ~= 0 and _UnitAffectingCombat (alvo_name) )
+ (alvo_flags and bitBand(alvo_flags, AFFILIATION_GROUP) ~= 0 and UnitAffectingCombat(alvo_name) )
or
- (not _detalhes.in_group and who_flags and _bit_band (who_flags, AFFILIATION_GROUP) ~= 0)
+ (not _detalhes.in_group and who_flags and bitBand(who_flags, AFFILIATION_GROUP) ~= 0)
)
) then
- --n�o entra em combate se for DOT
- if (_detalhes.encounter_table.id and _detalhes.encounter_table ["start"] >= GetTime() - 3 and _detalhes.announce_firsthit.enabled) then
+ if (_detalhes.encounter_table.id and _detalhes.encounter_table["start"] >= GetTime() - 3 and _detalhes.announce_firsthit.enabled) then
local link
if (spellid <= 10) then
link = GetSpellInfo(spellid)
@@ -954,10 +951,12 @@
if (_detalhes.WhoAggroTimer) then
_detalhes.WhoAggroTimer:Cancel()
end
+
_detalhes.WhoAggroTimer = C_Timer.NewTimer(0.5, who_aggro)
_detalhes.WhoAggroTimer.HitBy = "|cFFFFFF00First Hit|r: " .. (link or "") .. " from " .. (who_name or "Unknown")
end
- _detalhes:EntrarEmCombate (who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags)
+
+ _detalhes:EntrarEmCombate(who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags)
else
--entrar em combate se for dot e for do jogador e o ultimo combate ter sido a mais de 10 segundos atr�s
if (token == "SPELL_PERIODIC_DAMAGE" and who_name == _detalhes.playername) then
@@ -967,9 +966,10 @@
if (spellid == 111400 or spellid == 368637) then
return
end
+
--faz o calculo dos 10 segundos
- if (_detalhes.last_combat_time+10 < _tempo) then
- _detalhes:EntrarEmCombate (who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags)
+ if (_detalhes.last_combat_time + 10 < _tempo) then
+ _detalhes:EntrarEmCombate(who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags)
end
end
end
@@ -986,8 +986,7 @@
local este_jogador, meu_dono = damage_cache [who_serial] or damage_cache_pets [who_serial] or damage_cache [who_name], damage_cache_petsOwners [who_serial]
if (not este_jogador) then --pode ser um desconhecido ou um pet
-
- este_jogador, meu_dono, who_name = _current_damage_container:PegarCombatente (who_serial, who_name, who_flags, true)
+ este_jogador, meu_dono, who_name = _current_damage_container:PegarCombatente(who_serial, who_name, who_flags, true)
if (meu_dono) then --� um pet
if (who_serial ~= "") then
@@ -1192,14 +1191,14 @@
unitId = Details:GuessArenaEnemyUnitId(alvo_name)
end
if (unitId) then
- this_event [5] = _UnitHealth(unitId)
+ this_event [5] = UnitHealth(unitId)
else
this_event [5] = cacheAnything.arenaHealth[alvo_name] or 100000
end
cacheAnything.arenaHealth[alvo_name] = this_event[5]
else
- this_event [5] = _UnitHealth(alvo_name)
+ this_event [5] = UnitHealth(alvo_name)
end
this_event [6] = who_name --source name
@@ -1250,7 +1249,7 @@
_detalhes:UpdateSolo()
end
- if (_UnitAffectingCombat ("player")) then
+ if (UnitAffectingCombat("player")) then
_detalhes:SendEvent("COMBAT_PLAYER_TIMESTARTED", nil, _current_combat, este_jogador)
end
end
@@ -1284,7 +1283,7 @@
end
else
if (
- (_bit_band (alvo_flags, REACTION_FRIENDLY) ~= 0 and _bit_band (who_flags, REACTION_FRIENDLY) ~= 0) or --ajdt d' brx
+ (bitBand(alvo_flags, REACTION_FRIENDLY) ~= 0 and bitBand(who_flags, REACTION_FRIENDLY) ~= 0) or --ajdt d' brx
(raid_members_cache [alvo_serial] and raid_members_cache [who_serial] and alvo_serial:find ("Player") and who_serial:find ("Player")) --amrl
) then
is_friendly_fire = true
@@ -1306,7 +1305,7 @@
this_event [2] = spellid --spellid || false if this is a battle ress line
this_event [3] = amount --amount of damage or healing
this_event [4] = time --parser time
- this_event [5] = _UnitHealth (alvo_name) --current unit heal
+ this_event [5] = UnitHealth (alvo_name) --current unit heal
this_event [6] = who_name --source name
this_event [7] = absorbed
this_event [8] = spelltype or school
@@ -1388,7 +1387,7 @@
if (not spell) then
spell = este_jogador.spells:PegaHabilidade (spellid, true, token)
spell.spellschool = spelltype or school
- if (_current_combat.is_boss and who_flags and _bit_band (who_flags, OBJECT_TYPE_ENEMY) ~= 0) then
+ if (_current_combat.is_boss and who_flags and bitBand(who_flags, OBJECT_TYPE_ENEMY) ~= 0) then
_detalhes.spell_school_cache [spellname] = spelltype or school
end
@@ -1486,7 +1485,7 @@
this_event [2] = spellid --spellid || false if this is a battle ress line
this_event [3] = amount --amount of damage or healing
this_event [4] = time --parser time
- this_event [5] = _UnitHealth (who_name) --current unit heal
+ this_event [5] = UnitHealth (who_name) --current unit heal
this_event [6] = who_name --source name
this_event [7] = absorbed
this_event [8] = school
@@ -1582,7 +1581,7 @@
this_event [2] = spellid --spellid || false if this is a battle ress line
this_event [3] = amount --amount of damage or healing
this_event [4] = time --parser time
- this_event [5] = _UnitHealth (who_name) --current unit heal
+ this_event [5] = UnitHealth (who_name) --current unit heal
this_event [6] = who_name --source name
this_event [7] = absorbed
this_event [8] = school
@@ -1702,7 +1701,7 @@
this_event [2] = spellid --spellid || false if this is a battle ress line
this_event [3] = amount --amount of damage or healing
this_event [4] = time --parser time
- this_event [5] = _UnitHealth (alvo_name) --current unit heal
+ this_event [5] = UnitHealth (alvo_name) --current unit heal
this_event [6] = who_name --source name
this_event [7] = absorbed
this_event [8] = spelltype or school
@@ -1910,7 +1909,7 @@
if (not spell) then
spell = este_jogador.spells:PegaHabilidade (spellid, true, token)
spell.spellschool = spelltype
- if (_current_combat.is_boss and who_flags and _bit_band (who_flags, OBJECT_TYPE_ENEMY) ~= 0) then
+ if (_current_combat.is_boss and who_flags and bitBand(who_flags, OBJECT_TYPE_ENEMY) ~= 0) then
_detalhes.spell_school_cache [spellname] = spelltype
end
end
@@ -1935,7 +1934,7 @@
who_name = "[*] " .. spellName
end
- local npcId = _tonumber(_select(6, _strsplit ("-", alvo_serial)) or 0)
+ local npcId = tonumber(select(6, strsplit("-", alvo_serial)) or 0)
--kel'thuzad encounter --remove on 10.0
if (npcId == 176703) then --kelthuzad
@@ -2007,7 +2006,7 @@
--check invalid serial against pets
if (who_serial == "") then
- if (who_flags and _bit_band (who_flags, OBJECT_TYPE_PETS) ~= 0) then --� um pet
+ if (who_flags and bitBand(who_flags, OBJECT_TYPE_PETS) ~= 0) then --� um pet
return
end
end
@@ -2063,7 +2062,7 @@
local spell = este_jogador.spells._ActorTable [spellidAbsorb]
if (not spell) then
spell = este_jogador.spells:PegaHabilidade (spellidAbsorb, true, token)
- if (_current_combat.is_boss and who_flags and _bit_band (who_flags, OBJECT_TYPE_ENEMY) ~= 0) then
+ if (_current_combat.is_boss and who_flags and bitBand(who_flags, OBJECT_TYPE_ENEMY) ~= 0) then
_detalhes.spell_school_cache [spellnameAbsorb] = spellschoolAbsorb or 1
end
end
@@ -2108,7 +2107,7 @@
elseif (shieldid == 110913) then
--dark bargain
- local max_health = _UnitHealthMax (owner_name)
+ local max_health = UnitHealthMax (owner_name)
if ((amount or 0) > (max_health or 1) * 4) then
return
end
@@ -2145,7 +2144,7 @@
--check invalid serial against pets
if (who_serial == "") then
- if (who_flags and _bit_band (who_flags, OBJECT_TYPE_PETS) ~= 0) then --� um pet
+ if (who_flags and bitBand(who_flags, OBJECT_TYPE_PETS) ~= 0) then --� um pet
return
end
--who_serial = nil
@@ -2278,7 +2277,7 @@
if (spellid == SPELLID_SANGUINE_HEAL) then --sanguine ichor (heal enemies)
este_jogador.grupo = true
- elseif (_bit_band (alvo_flags, REACTION_FRIENDLY) == 0 and not _detalhes.is_in_arena and not _detalhes.is_in_battleground) then
+ elseif (bitBand(alvo_flags, REACTION_FRIENDLY) == 0 and not _detalhes.is_in_arena and not _detalhes.is_in_battleground) then
if (not este_jogador.heal_enemy [spellid]) then
este_jogador.heal_enemy [spellid] = cura_efetiva
else
@@ -2323,12 +2322,12 @@
unitId = Details:GuessArenaEnemyUnitId(alvo_name)
end
if (unitId) then
- this_event [5] = _UnitHealth(unitId)
+ this_event [5] = UnitHealth(unitId)
else
this_event [5] = 0
end
else
- this_event [5] = _UnitHealth(alvo_name)
+ this_event [5] = UnitHealth(alvo_name)
end
this_event [6] = who_name --source name
@@ -2426,7 +2425,7 @@
if (is_shield) then
spell.is_shield = true
end
- if (_current_combat.is_boss and who_flags and _bit_band (who_flags, OBJECT_TYPE_ENEMY) ~= 0) then
+ if (_current_combat.is_boss and who_flags and bitBand(who_flags, OBJECT_TYPE_ENEMY) ~= 0) then
_detalhes.spell_school_cache [spellname] = spelltype or school
end
end
@@ -2480,7 +2479,7 @@
this_event [2] = spellid --spellid || false if this is a battle ress line
this_event [3] = amount --amount of damage or healing
this_event [4] = time --parser time
- this_event [5] = _UnitHealth (alvo_name) --current unit heal
+ this_event [5] = UnitHealth (alvo_name) --current unit heal
this_event [6] = who_name --source name
this_event [7] = is_shield
this_event [8] = absorbed
@@ -2706,7 +2705,7 @@
--record buffs active on player when the debuff was applied
local BuffsOn = {}
- for BuffName, BuffTable in _pairs(_detalhes.Buffs.BuffsTable) do
+ for BuffName, BuffTable in pairs(_detalhes.Buffs.BuffsTable) do
if (BuffTable.active) then
BuffsOn [#BuffsOn+1] = BuffName
end
@@ -2801,7 +2800,7 @@
end
--verifica a classe
- if (who_flags and _bit_band (who_flags, OBJECT_TYPE_PLAYER) ~= 0) then
+ if (who_flags and bitBand(who_flags, OBJECT_TYPE_PLAYER) ~= 0) then
if (este_jogador.classe == "UNKNOW" or este_jogador.classe == "UNGROUPPLAYER") then
local damager_object = damage_cache [who_serial]
if (damager_object and (damager_object.classe ~= "UNKNOW" and damager_object.classe ~= "UNGROUPPLAYER")) then
@@ -2852,7 +2851,7 @@
escudo [alvo_name][spellid][who_name] = amount
if (overheal > 0) then
- return parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, nil, 0, _math_ceil (overheal), 0, nil, true)
+ return parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, nil, 0, ceil (overheal), 0, nil, true)
end
end
@@ -2946,7 +2945,7 @@
local SpellPower = GetSpellBonusDamage (3)
local BuffsOn = {}
- for BuffName, BuffTable in _pairs(_detalhes.Buffs.BuffsTable) do
+ for BuffName, BuffTable in pairs(_detalhes.Buffs.BuffsTable) do
if (BuffTable.active) then
BuffsOn [#BuffsOn+1] = BuffName
end
@@ -2994,7 +2993,7 @@
--BfA monk talent
if (monk_guard_talent [who_serial]) then
local damage_prevented = monk_guard_talent [who_serial] - (amount or 0)
- parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spellschool, damage_prevented, _math_ceil (amount or 0), 0, 0, true)
+ parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spellschool, damage_prevented, ceil (amount or 0), 0, 0, true)
end
elseif (spellid == SPELLID_NECROMANCER_CHEAT_DEATH) then --remove on 10.0
@@ -3038,7 +3037,7 @@
--can't use monk guard since its overheal is computed inside the unbuff
if (amount > 0 and spellid ~= SPELLID_MONK_GUARD) then
--removing the nil at the end before true for is_shield, I have no documentation change about it, not sure the reason why it was addded
- return parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, nil, 0, _math_ceil (amount), 0, 0, true) --0, 0, nil, true
+ return parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, nil, 0, ceil (amount), 0, 0, true) --0, 0, nil, true
else
return
end
@@ -3243,7 +3242,7 @@
this_event [2] = spellid --spellid
this_event [3] = 1
this_event [4] = time --parser time
- this_event [5] = _UnitHealth (alvo_name) --current unit heal
+ this_event [5] = UnitHealth (alvo_name) --current unit heal
this_event [6] = who_name --source name
this_event [7] = false
this_event [8] = false
@@ -3292,7 +3291,7 @@
this_event [2] = spellid --spellid
this_event [3] = stack_amount or 1
this_event [4] = time --parser time
- this_event [5] = _UnitHealth (alvo_name) --current unit heal
+ this_event [5] = UnitHealth (alvo_name) --current unit heal
this_event [6] = who_name --source name
this_event [7] = false
this_event [8] = false
@@ -3545,7 +3544,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
return
end
- for playerName, powerType in _pairs(auto_regen_cache) do
+ for playerName, powerType in pairs(auto_regen_cache) do
local currentPower = UnitPower (playerName, powerType) or 0
local maxPower = UnitPowerMax (playerName, powerType) or 1
@@ -3747,7 +3746,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
this_event [2] = spellid --spellid || false if this is a battle ress line
this_event [3] = 1 --amount of damage or healing
this_event [4] = time --parser time
- this_event [5] = _UnitHealth (who_name) --current unit heal
+ this_event [5] = UnitHealth (who_name) --current unit heal
this_event [6] = who_name --source name
i = i + 1
@@ -3981,7 +3980,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
else
--enemy successful casts (not interrupted)
- if (_bit_band (who_flags, 0x00000040) ~= 0 and who_name) then --byte 2 = 4 (enemy)
+ if (bitBand(who_flags, 0x00000040) ~= 0 and who_name) then --byte 2 = 4 (enemy)
--damager
local este_jogador = damage_cache [who_serial]
if (not este_jogador) then
@@ -4113,7 +4112,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
------------------------------------------------------------------------------------------------
--early checks and fixes
- if (_bit_band (who_flags, AFFILIATION_GROUP) == 0) then
+ if (bitBand(who_flags, AFFILIATION_GROUP) == 0) then
return
end
@@ -4162,7 +4161,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
este_jogador.ress = este_jogador.ress + 1
--add battle ress
- if (_UnitAffectingCombat (who_name)) then
+ if (UnitAffectingCombat(who_name)) then
--procura a �ltima morte do alvo na tabela do combate:
for i = 1, #_current_combat.last_events_tables do
if (_current_combat.last_events_tables [i] [3] == alvo_name) then
@@ -4176,12 +4175,12 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
end
if (not jaTem) then
- _table_insert (_current_combat.last_events_tables [i] [1], 1, {
+ tinsert (_current_combat.last_events_tables [i] [1], 1, {
2,
spellid,
1,
time,
- _UnitHealth (alvo_name),
+ UnitHealth (alvo_name),
who_name
})
break
@@ -4218,7 +4217,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
--print("NO CC:", spellid, spellname, extraSpellID, extraSpellName)
end
- if (_bit_band (who_flags, AFFILIATION_GROUP) == 0) then
+ if (bitBand(who_flags, AFFILIATION_GROUP) == 0) then
return
end
@@ -4306,7 +4305,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
local damageActor = _current_damage_container:GetActor(alvo_name)
--check for outsiders
- if (_in_combat and alvo_flags and (not damageActor or (_bit_band (alvo_flags, 0x00000008) ~= 0 and not damageActor.grupo))) then
+ if (_in_combat and alvo_flags and (not damageActor or (bitBand(alvo_flags, 0x00000008) ~= 0 and not damageActor.grupo))) then
--outsider death while in combat
--rules for specific encounters
@@ -4355,7 +4354,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
--frags
- if (_detalhes.only_pvp_frags and (_bit_band (alvo_flags, 0x00000400) == 0 or (_bit_band (alvo_flags, 0x00000040) == 0 and _bit_band (alvo_flags, 0x00000020) == 0))) then --byte 2 = 4 (HOSTILE) byte 3 = 4 (OBJECT_TYPE_PLAYER)
+ if (_detalhes.only_pvp_frags and (bitBand(alvo_flags, 0x00000400) == 0 or (bitBand(alvo_flags, 0x00000040) == 0 and bitBand(alvo_flags, 0x00000020) == 0))) then --byte 2 = 4 (HOSTILE) byte 3 = 4 (OBJECT_TYPE_PLAYER)
return
end
@@ -4371,9 +4370,9 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
elseif (not UnitIsFeignDeath (alvo_name)) then
if (
--player in your group
- (_bit_band (alvo_flags, AFFILIATION_GROUP) ~= 0 or (damageActor and damageActor.grupo)) and
+ (bitBand(alvo_flags, AFFILIATION_GROUP) ~= 0 or (damageActor and damageActor.grupo)) and
--must be a player
- _bit_band (alvo_flags, OBJECT_TYPE_PLAYER) ~= 0 and
+ bitBand(alvo_flags, OBJECT_TYPE_PLAYER) ~= 0 and
--must be in combat
_in_combat
) then
@@ -4413,18 +4412,18 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
if (last_index < _death_event_amt+1 and not t[last_index][4]) then
for i = 1, last_index-1 do
if (t[i][4] and t[i][4]+_death_event_amt > time) then
- _table_insert (esta_morte, t[i])
+ tinsert (esta_morte, t[i])
end
end
else
for i = last_index, _death_event_amt do --next index to 16
if (t[i][4] and t[i][4]+_death_event_amt > time) then
- _table_insert (esta_morte, t[i])
+ tinsert (esta_morte, t[i])
end
end
for i = 1, last_index-1 do --1 to latest index
if (t[i][4] and t[i][4]+_death_event_amt > time) then
- _table_insert (esta_morte, t[i])
+ tinsert (esta_morte, t[i])
end
end
end
@@ -4449,8 +4448,8 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
esta_morte [#esta_morte+1] = t
end
- local decorrido = _GetTime() - _current_combat:GetStartTime()
- local minutos, segundos = _math_floor(decorrido/60), _math_floor(decorrido%60)
+ local decorrido = GetTime() - _current_combat:GetStartTime()
+ local minutos, segundos = floor(decorrido/60), floor(decorrido%60)
local maxHealth
if (thisPlayer.arena_enemy) then
@@ -4471,11 +4470,11 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
end
local t = {esta_morte, time, thisPlayer.nome, thisPlayer.classe, maxHealth, minutos.."m "..segundos.."s", ["dead"] = true, ["last_cooldown"] = thisPlayer.last_cooldown, ["dead_at"] = decorrido}
- _table_insert (_current_combat.last_events_tables, #_current_combat.last_events_tables+1, t)
+ tinsert (_current_combat.last_events_tables, #_current_combat.last_events_tables+1, t)
if (_hook_deaths) then
--send event to registred functions
- local deathTime = _GetTime() - _current_combat:GetStartTime()
+ local deathTime = GetTime() - _current_combat:GetStartTime()
for _, func in ipairs(_hook_deaths_container) do
local copiedDeathTable = Details.CopyTable(t)
@@ -4497,13 +4496,13 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
local overallDeathTable = DetailsFramework.table.copy({}, t)
--get the elapsed time
- local timeElapsed = _GetTime() - _detalhes.tabela_overall:GetStartTime()
- local minutos, segundos = _math_floor(timeElapsed/60), _math_floor(timeElapsed%60)
+ local timeElapsed = GetTime() - _detalhes.tabela_overall:GetStartTime()
+ local minutos, segundos = floor(timeElapsed/60), floor(timeElapsed%60)
overallDeathTable [6] = minutos.."m "..segundos.."s"
overallDeathTable.dead_at = timeElapsed
- _table_insert(_detalhes.tabela_overall.last_events_tables, #_detalhes.tabela_overall.last_events_tables + 1, overallDeathTable)
+ tinsert(_detalhes.tabela_overall.last_events_tables, #_detalhes.tabela_overall.last_events_tables + 1, overallDeathTable)
end
end
@@ -4616,7 +4615,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
local schedule_table, schedule_id = unpack(_detalhes.capture_schedules[i])
_detalhes:CancelTimer(schedule_table)
end
- _table_wipe(_detalhes.capture_schedules)
+ wipe(_detalhes.capture_schedules)
end
function _detalhes:CaptureTimeout (table)
@@ -4902,11 +4901,11 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
-- PARSER
--serach key: ~parser ~events ~start ~inicio
-
function _detalhes:FlagCurrentCombat()
if (_detalhes.is_in_battleground) then
_detalhes.tabela_vigente.pvp = true
_detalhes.tabela_vigente.is_pvp = {name = _detalhes.zone_name, mapid = _detalhes.zone_id}
+
elseif (_detalhes.is_in_arena) then
_detalhes.tabela_vigente.arena = true
_detalhes.tabela_vigente.is_arena = {name = _detalhes.zone_name, zone = _detalhes.zone_name, mapid = _detalhes.zone_id}
@@ -4917,13 +4916,12 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
return _detalhes.zone_type
end
- function _detalhes.parser_functions:ZONE_CHANGED_NEW_AREA (...)
+ function _detalhes.parser_functions:ZONE_CHANGED_NEW_AREA(...)
return Details.Schedules.After(1, Details.Check_ZONE_CHANGED_NEW_AREA)
end
--~zone ~area
function _detalhes:Check_ZONE_CHANGED_NEW_AREA()
-
local zoneName, zoneType, _, _, _, _, _, zoneMapID = GetInstanceInfo()
_detalhes.zone_type = zoneType
@@ -4974,10 +4972,10 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
end
if (zoneType == "pvp") then --battlegrounds
-
if (_detalhes.debug) then
_detalhes:Msg("(debug) zone type is now 'pvp'.")
end
+
if(not _detalhes.is_in_battleground and _detalhes.overall_clear_pvp) then
_detalhes.tabela_historico:resetar_overall()
end
@@ -5011,7 +5009,6 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
Details.lastBattlegroundStartTime = GetTime()
elseif (zoneType == "arena") then
-
if (_detalhes.debug) then
_detalhes:Msg("(debug) zone type is now 'arena'.")
end
@@ -5057,7 +5054,6 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
end
_detalhes:DispatchAutoRunCode("on_zonechanged")
-
_detalhes:SchedulePetUpdate(7)
_detalhes:CheckForPerformanceProfile()
end
@@ -5066,8 +5062,6 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
return _detalhes.parser_functions:ZONE_CHANGED_NEW_AREA()
end
-
-
-- ~encounter
--ENCOUNTER START
function _detalhes.parser_functions:ENCOUNTER_START(...)
@@ -5076,7 +5070,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
end
_detalhes.latest_ENCOUNTER_END = _detalhes.latest_ENCOUNTER_END or 0
- if (_detalhes.latest_ENCOUNTER_END + 10 > _GetTime()) then
+ if (_detalhes.latest_ENCOUNTER_END + 10 > GetTime()) then
return
end
@@ -5085,7 +5079,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
_detalhes:SairDoCombate()
end
- local encounterID, encounterName, difficultyID, raidSize = _select(1, ...)
+ local encounterID, encounterName, difficultyID, raidSize = select(1, ...)
local zoneName, _, _, _, _, _, _, zoneMapID = GetInstanceInfo()
if (_detalhes.InstancesToStoreData[zoneMapID]) then
@@ -5106,7 +5100,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
_detalhes.boss1_health_percent = 1
local dbm_mod, dbm_time = _detalhes.encounter_table.DBM_Mod, _detalhes.encounter_table.DBM_ModTime
- _table_wipe(_detalhes.encounter_table)
+ wipe(_detalhes.encounter_table)
_detalhes.encounter_table.phase = 1
@@ -5141,11 +5135,11 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
local delay = encounter_start_table.delay()
if (delay) then
--_detalhes.encounter_table ["start"] = time() + delay
- _detalhes.encounter_table ["start"] = _GetTime() + delay
+ _detalhes.encounter_table ["start"] = GetTime() + delay
end
else
--_detalhes.encounter_table ["start"] = time() + encounter_start_table.delay
- _detalhes.encounter_table ["start"] = _GetTime() + encounter_start_table.delay
+ _detalhes.encounter_table ["start"] = GetTime() + encounter_start_table.delay
end
end
if (encounter_start_table.func) then
@@ -5164,8 +5158,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
--ENCOUNRTER_END
- function _detalhes.parser_functions:ENCOUNTER_END (...)
-
+ function _detalhes.parser_functions:ENCOUNTER_END(...)
if (_detalhes.debug) then
_detalhes:Msg("(debug) |cFFFFFF00ENCOUNTER_END|r event triggered.")
end
@@ -5179,7 +5172,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
end
end
- local encounterID, encounterName, difficultyID, raidSize, endStatus = _select(1, ...)
+ local encounterID, encounterName, difficultyID, raidSize, endStatus = select(1, ...)
if (not _detalhes.encounter_table.start) then
Details:Msg("encounter table without start time.")
@@ -5187,12 +5180,12 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
end
_detalhes.latest_ENCOUNTER_END = _detalhes.latest_ENCOUNTER_END or 0
- if (_detalhes.latest_ENCOUNTER_END + 15 > _GetTime()) then
+ if (_detalhes.latest_ENCOUNTER_END + 15 > GetTime()) then
return
end
- _detalhes.latest_ENCOUNTER_END = _GetTime()
- _detalhes.encounter_table ["end"] = _GetTime() -- 0.351
+ _detalhes.latest_ENCOUNTER_END = GetTime()
+ _detalhes.encounter_table ["end"] = GetTime() -- 0.351
local _, _, _, _, _, _, _, zoneMapID = GetInstanceInfo()
@@ -5214,11 +5207,11 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
_detalhes:SendEvent("COMBAT_ENCOUNTER_END", nil, ...)
- _table_wipe(_detalhes.encounter_table)
- _table_wipe(bargastBuffs) --remove on 10.0
- _table_wipe(necro_cheat_deaths) --remove on 10.0
- _table_wipe(dk_pets_cache.army)
- _table_wipe(dk_pets_cache.apoc)
+ wipe(_detalhes.encounter_table)
+ wipe(bargastBuffs) --remove on 10.0
+ wipe(necro_cheat_deaths) --remove on 10.0
+ wipe(dk_pets_cache.army)
+ wipe(dk_pets_cache.apoc)
--remove on 10.0 spikeball from painsmith
spikeball_damage_cache = {
@@ -5229,12 +5222,12 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
return true
end
- function _detalhes.parser_functions:UNIT_PET (...)
- _detalhes.container_pets:Unpet (...)
+ function _detalhes.parser_functions:UNIT_PET(...)
+ _detalhes.container_pets:Unpet(...)
_detalhes:SchedulePetUpdate(1)
end
- function _detalhes.parser_functions:PLAYER_REGEN_DISABLED (...)
+ function _detalhes.parser_functions:PLAYER_REGEN_DISABLED(...)
if (_detalhes.zone_type == "pvp" and not _detalhes.use_battleground_server_parser) then
if (_in_combat) then
_detalhes:SairDoCombate()
@@ -5273,7 +5266,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
--raid
local inCombat = false
for i = 1, GetNumGroupMembers() do
- if (UnitAffectingCombat ("raid" .. i)) then
+ if (UnitAffectingCombat("raid" .. i)) then
inCombat = true
break
end
@@ -5287,7 +5280,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
--party (dungeon)
local inCombat = false
for i = 1, GetNumGroupMembers() -1 do
- if (UnitAffectingCombat ("party" .. i)) then
+ if (UnitAffectingCombat("party" .. i)) then
inCombat = true
break
end
@@ -5357,7 +5350,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
end
if (not OnRegenEnabled) then
- _table_wipe(bitfield_swap_cache)
+ wipe(bitfield_swap_cache)
_detalhes:DispatchAutoRunCode("on_leavecombat")
end
@@ -5455,7 +5448,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
_detalhes:Msg("(debug) |cFFFFFF00PLAYER_REGEN_ENABLED|r event triggered.")
print("combat lockdown:", InCombatLockdown())
- print("affecting combat:", UnitAffectingCombat ("player"))
+ print("affecting combat:", UnitAffectingCombat("player"))
if (_current_encounter_id and IsInInstance()) then
print("has a encounter ID")
@@ -5471,7 +5464,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
C_Timer.After(10, check_for_encounter_end)
--playing alone, just finish the combat right now
- if (not _IsInGroup() and not IsInRaid()) then
+ if (not IsInGroup() and not IsInRaid()) then
_detalhes.tabela_vigente.playing_solo = true
_detalhes:SairDoCombate()
@@ -5483,7 +5476,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
--raid
local inCombat = false
for i = 1, GetNumGroupMembers() do
- if (UnitAffectingCombat ("raid" .. i)) then
+ if (UnitAffectingCombat("raid" .. i)) then
inCombat = true
break
end
@@ -5497,7 +5490,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
--party (dungeon)
local inCombat = false
for i = 1, GetNumGroupMembers() -1 do
- if (UnitAffectingCombat ("party" .. i)) then
+ if (UnitAffectingCombat("party" .. i)) then
inCombat = true
break
end
@@ -5649,7 +5642,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
_detalhes:IniciarColetaDeLixo(true)
_detalhes:WipePets()
_detalhes:SchedulePetUpdate(1)
- _table_wipe(_detalhes.details_users)
+ wipe(_detalhes.details_users)
_detalhes:InstanceCall(_detalhes.AdjustAlphaByContext)
_detalhes:CheckSwitchOnLogon()
_detalhes:SendEvent("GROUP_ONLEAVE")
@@ -5776,7 +5769,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
end
function _detalhes.parser_functions:ADDON_LOADED(...)
- local addon_name = _select(1, ...)
+ local addon_name = select(1, ...)
if (addon_name == "Details") then
start_details()
end
@@ -5828,9 +5821,8 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
_detalhes.listener:SetScript("OnEvent", _detalhes.OnEvent)
--logout function ~save ~logout
-
local saver = CreateFrame("frame", nil, UIParent)
- saver:RegisterEvent ("PLAYER_LOGOUT")
+ saver:RegisterEvent("PLAYER_LOGOUT")
saver:SetScript("OnEvent", function(...)
--save the time played on this class, run protected
pcall(function()
@@ -5927,7 +5919,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
-- ~parserstart ~startparser ~cleu
function _detalhes.OnParserEvent()
- local time, token, hidding, who_serial, who_name, who_flags, who_flags2, target_serial, target_name, target_flags, target_flags2, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12 = _CombatLogGetCurrentEventInfo()
+ local time, token, hidding, who_serial, who_name, who_flags, who_flags2, target_serial, target_name, target_flags, target_flags2, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12 = CombatLogGetCurrentEventInfo()
local func = token_list[token]
if (func) then
@@ -5990,31 +5982,32 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
function _detalhes:GetActorsOnDamageCache()
return _detalhes.cache_damage_group
end
+
function _detalhes:GetActorsOnHealingCache()
return _detalhes.cache_healing_group
end
function _detalhes:ClearParserCache()
- _table_wipe(damage_cache)
- _table_wipe(damage_cache_pets)
- _table_wipe(damage_cache_petsOwners)
- _table_wipe(healing_cache)
- _table_wipe(energy_cache)
- _table_wipe(misc_cache)
- _table_wipe(misc_cache_pets)
- _table_wipe(misc_cache_petsOwners)
- _table_wipe(npcid_cache)
+ wipe(damage_cache)
+ wipe(damage_cache_pets)
+ wipe(damage_cache_petsOwners)
+ wipe(healing_cache)
+ wipe(energy_cache)
+ wipe(misc_cache)
+ wipe(misc_cache_pets)
+ wipe(misc_cache_petsOwners)
+ wipe(npcid_cache)
- _table_wipe(ignore_death)
+ wipe(ignore_death)
- _table_wipe(reflection_damage)
- _table_wipe(reflection_debuffs)
- _table_wipe(reflection_events)
- _table_wipe(reflection_auras)
- _table_wipe(reflection_dispels)
+ wipe(reflection_damage)
+ wipe(reflection_debuffs)
+ wipe(reflection_events)
+ wipe(reflection_auras)
+ wipe(reflection_dispels)
- _table_wipe(dk_pets_cache.army)
- _table_wipe(dk_pets_cache.apoc)
+ wipe(dk_pets_cache.army)
+ wipe(dk_pets_cache.apoc)
damage_cache = setmetatable({}, _detalhes.weaktable)
damage_cache_pets = setmetatable({}, _detalhes.weaktable)
@@ -6054,82 +6047,82 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
end
function _detalhes:UptadeRaidMembersCache()
- _table_wipe(raid_members_cache)
- _table_wipe(tanks_members_cache)
- _table_wipe(auto_regen_cache)
- _table_wipe(bitfield_swap_cache)
+ wipe(raid_members_cache)
+ wipe(tanks_members_cache)
+ wipe(auto_regen_cache)
+ wipe(bitfield_swap_cache)
local roster = _detalhes.tabela_vigente.raid_roster
- if (_IsInRaid()) then
- for i = 1, _GetNumGroupMembers() do
+ if (IsInRaid()) then
+ for i = 1, GetNumGroupMembers() do
local name = GetUnitName("raid"..i, true)
- raid_members_cache[_UnitGUID("raid"..i)] = true
+ raid_members_cache[UnitGUID("raid"..i)] = true
roster[name] = true
local role = _UnitGroupRolesAssigned(name)
if (role == "TANK") then
- tanks_members_cache[_UnitGUID("raid"..i)] = true
+ tanks_members_cache[UnitGUID("raid"..i)] = true
end
- if (auto_regen_power_specs[_detalhes.cached_specs[_UnitGUID("raid" .. i)]]) then
- auto_regen_cache[name] = auto_regen_power_specs[_detalhes.cached_specs[_UnitGUID("raid" .. i)]]
+ if (auto_regen_power_specs[_detalhes.cached_specs[UnitGUID("raid" .. i)]]) then
+ auto_regen_cache[name] = auto_regen_power_specs[_detalhes.cached_specs[UnitGUID("raid" .. i)]]
end
end
- elseif (_IsInGroup()) then
+ elseif (IsInGroup()) then
--party
- for i = 1, _GetNumGroupMembers()-1 do
+ for i = 1, GetNumGroupMembers()-1 do
local name = GetUnitName("party"..i, true)
- raid_members_cache[_UnitGUID("party"..i)] = true
+ raid_members_cache[UnitGUID("party"..i)] = true
roster[name] = true
local role = _UnitGroupRolesAssigned(name)
if (role == "TANK") then
- tanks_members_cache[_UnitGUID("party"..i)] = true
+ tanks_members_cache[UnitGUID("party"..i)] = true
end
- if (auto_regen_power_specs[_detalhes.cached_specs[_UnitGUID("party" .. i)]]) then
- auto_regen_cache[name] = auto_regen_power_specs[_detalhes.cached_specs[_UnitGUID("party" .. i)]]
+ if (auto_regen_power_specs[_detalhes.cached_specs[UnitGUID("party" .. i)]]) then
+ auto_regen_cache[name] = auto_regen_power_specs[_detalhes.cached_specs[UnitGUID("party" .. i)]]
end
end
--player
local name = GetUnitName("player", true)
- raid_members_cache[_UnitGUID("player")] = true
+ raid_members_cache[UnitGUID("player")] = true
roster[name] = true
local role = _UnitGroupRolesAssigned(name)
if (role == "TANK") then
- tanks_members_cache[_UnitGUID("player")] = true
+ tanks_members_cache[UnitGUID("player")] = true
end
- if (auto_regen_power_specs[_detalhes.cached_specs[_UnitGUID("player")]]) then
- auto_regen_cache[name] = auto_regen_power_specs[_detalhes.cached_specs[_UnitGUID("player")]]
+ if (auto_regen_power_specs[_detalhes.cached_specs[UnitGUID("player")]]) then
+ auto_regen_cache[name] = auto_regen_power_specs[_detalhes.cached_specs[UnitGUID("player")]]
end
else
local name = GetUnitName("player", true)
- raid_members_cache[_UnitGUID("player")] = true
+ raid_members_cache[UnitGUID("player")] = true
roster[name] = true
local role = _UnitGroupRolesAssigned(name)
if (role == "TANK") then
- tanks_members_cache[_UnitGUID("player")] = true
+ tanks_members_cache[UnitGUID("player")] = true
else
local spec = DetailsFramework.GetSpecialization()
if (spec and spec ~= 0) then
if (DetailsFramework.GetSpecializationRole (spec) == "TANK") then
- tanks_members_cache[_UnitGUID("player")] = true
+ tanks_members_cache[UnitGUID("player")] = true
end
end
end
- if (auto_regen_power_specs[_detalhes.cached_specs[_UnitGUID("player")]]) then
- auto_regen_cache[name] = auto_regen_power_specs[_detalhes.cached_specs[_UnitGUID("player")]]
+ if (auto_regen_power_specs[_detalhes.cached_specs[UnitGUID("player")]]) then
+ auto_regen_cache[name] = auto_regen_power_specs[_detalhes.cached_specs[UnitGUID("player")]]
end
end
@@ -6144,7 +6137,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
if (_detalhes.iam_a_tank) then
- tanks_members_cache[_UnitGUID("player")] = true
+ tanks_members_cache[UnitGUID("player")] = true
end
end
@@ -6186,7 +6179,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
_recording_ability_with_buffs = _detalhes.RecordPlayerAbilityWithBuffs
_in_combat = _detalhes.in_combat
- _table_wipe(ignored_npcids)
+ wipe(ignored_npcids)
--fill it with the default npcs ignored
for npcId in pairs(_detalhes.default_ignored_npcs) do
@@ -6263,23 +6256,23 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
end
--get combat
- function _detalhes:GetCombat(_combat)
- if (not _combat) then
+ function _detalhes:GetCombat(combat)
+ if (not combat) then
return _current_combat
- elseif (type(_combat) == "number") then
- if (_combat == -1) then --overall
+ elseif (type(combat) == "number") then
+ if (combat == -1) then --overall
return _detalhes.tabela_overall
- elseif (_combat == 0) then --current
+ elseif (combat == 0) then --current
return _current_combat
else
- return _detalhes.tabela_historico.tabelas [_combat]
+ return _detalhes.tabela_historico.tabelas [combat]
end
- elseif (type(_combat) == "string") then
- if (_combat == "overall") then
+ elseif (type(combat) == "string") then
+ if (combat == "overall") then
return _detalhes.tabela_overall
- elseif (_combat == "current") then
+ elseif (combat == "current") then
return _current_combat
end
end
@@ -6297,39 +6290,39 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
end
--get an actor
- function _detalhes:GetActor(_combat, _attribute, _actorname)
- if (not _combat) then
- _combat = "current" --current combat
+ function _detalhes:GetActor(combat, attribute, actorName)
+ if (not combat) then
+ combat = "current" --current combat
end
- if (not _attribute) then
- _attribute = 1 --damage
+ if (not attribute) then
+ attribute = 1 --damage
end
- if (not _actorname) then
- _actorname = _detalhes.playername
+ if (not actorName) then
+ actorName = _detalhes.playername
end
- if (_combat == 0 or _combat == "current") then
- local actor = _detalhes.tabela_vigente(_attribute, _actorname)
+ if (combat == 0 or combat == "current") then
+ local actor = _detalhes.tabela_vigente(attribute, actorName)
if (actor) then
return actor
else
return nil
end
- elseif (_combat == -1 or _combat == "overall") then
- local actor = _detalhes.tabela_overall(_attribute, _actorname)
+ elseif (combat == -1 or combat == "overall") then
+ local actor = _detalhes.tabela_overall(attribute, actorName)
if (actor) then
return actor
else
return nil
end
- elseif (type(_combat) == "number") then
- local _combatOnHistoryTables = _detalhes.tabela_historico.tabelas[_combat]
- if (_combatOnHistoryTables) then
- local actor = _combatOnHistoryTables(_attribute, _actorname)
+ elseif (type(combat) == "number") then
+ local combatTables = _detalhes.tabela_historico.tabelas[combat]
+ if (combatTables) then
+ local actor = combatTables(attribute, actorName)
if (actor) then
return actor
else
@@ -6394,7 +6387,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
actor.classe = classToken or "UNKNOW"
elseif (name ~= "Unknown" and type(name) == "string" and string.len(name) > 1) then
- local guid = _UnitGUID(name)
+ local guid = UnitGUID(name)
if (guid) then
local flag
if (_detalhes.faction_id == faction) then --is from the same faction
@@ -6424,7 +6417,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
actor.classe = classToken or "UNKNOW"
elseif (name ~= "Unknown" and type(name) == "string" and string.len(name) > 1) then
- local guid = _UnitGUID(name)
+ local guid = UnitGUID(name)
if (guid) then
local flag
if (_detalhes.faction_id == faction) then --is from the same faction
diff --git a/core/plugins_solo.lua b/core/plugins_solo.lua
index 22115d0d..78ea9722 100644
--- a/core/plugins_solo.lua
+++ b/core/plugins_solo.lua
@@ -7,7 +7,7 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--local pointers
- local _pairs = pairs --lua locals
+ local pairs = pairs --lua locals
local _math_floor = math.floor --lua locals
local _UnitAura = UnitAura
@@ -276,7 +276,7 @@
return
end
- for SpellId, DebuffTable in _pairs(SoloDebuffUptime) do
+ for SpellId, DebuffTable in pairs(SoloDebuffUptime) do
if (DebuffTable.start) then
DebuffTable.duration = DebuffTable.duration + (_detalhes._tempo - DebuffTable.start) --time do parser ser� igual ao time()?
DebuffTable.start = nil
@@ -290,7 +290,7 @@
--reset bufftables
_detalhes.SoloTables.SoloBuffUptime = _detalhes.SoloTables.SoloBuffUptime or {}
- for spellname, BuffTable in _pairs(_detalhes.SoloTables.SoloBuffUptime) do
+ for spellname, BuffTable in pairs(_detalhes.SoloTables.SoloBuffUptime) do
--local BuffEntryTable = _detalhes.SoloTables.BuffTextEntry [BuffTable.tableIndex]
if (BuffTable.Active) then
@@ -314,7 +314,7 @@
for buffIndex = 1, 41 do
local name = _UnitAura ("player", buffIndex)
if (name) then
- for index, BuffName in _pairs(_detalhes.SoloTables.BuffsTableNameCache) do
+ for index, BuffName in pairs(_detalhes.SoloTables.BuffsTableNameCache) do
if (BuffName == name) then
local BuffObject = _detalhes.SoloTables.SoloBuffUptime [name]
if (not BuffObject) then
diff --git a/core/plugins_toolbar.lua b/core/plugins_toolbar.lua
index f6c6c722..733e1067 100644
--- a/core/plugins_toolbar.lua
+++ b/core/plugins_toolbar.lua
@@ -143,7 +143,7 @@ do
background:SetPoint("bottomright", 0, 0)
PluginDescPanel.background = background
- local icon, title, desc = PluginDescPanel:CreateTexture(nil, "overlay"), PluginDescPanel:CreateFontString (nil, "overlay", "GameFontNormal"), PluginDescPanel:CreateFontString (nil, "overlay", "GameFontNormal")
+ local icon, title, desc = PluginDescPanel:CreateTexture(nil, "overlay"), PluginDescPanel:CreateFontString(nil, "overlay", "GameFontNormal"), PluginDescPanel:CreateFontString(nil, "overlay", "GameFontNormal")
icon:SetPoint("topleft", 10, -10)
icon:SetSize(16, 16)
title:SetPoint("left", icon, "right", 2, 0)
diff --git a/core/timemachine.lua b/core/timemachine.lua
index 6464eb63..71081b44 100644
--- a/core/timemachine.lua
+++ b/core/timemachine.lua
@@ -7,13 +7,13 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--local pointers
- local _table_insert = table.insert --lua local
+ local tinsert = table.insert --lua local
local ipairs = ipairs --lua local
- local _pairs = pairs --lua local
+ local pairs = pairs --lua local
local _math_floor = math.floor --lua local
local _time = time --lua local
- local _GetTime = GetTime --api local
+ local GetTime = GetTime --api local
local timeMachine = _detalhes.timeMachine --details local
@@ -27,7 +27,7 @@
timeMachine.ligada = false
local calc_for_pvp = function(self)
- for tipo, tabela in _pairs(self.tabelas) do
+ for tipo, tabela in pairs(self.tabelas) do
for nome, jogador in ipairs(tabela) do
if (jogador) then
if (jogador.last_event+3 > _tempo) then --okey o jogador esta dando dps
@@ -46,7 +46,7 @@
end
local calc_for_pve = function(self)
- for tipo, tabela in _pairs(self.tabelas) do
+ for tipo, tabela in pairs(self.tabelas) do
for nome, jogador in ipairs(tabela) do
if (jogador) then
if (jogador.last_event+10 > _tempo) then --okey o jogador esta dando dps
@@ -125,7 +125,7 @@
end
local esta_tabela = timeMachine.tabelas [self.tipo]
- _table_insert (esta_tabela, self)
+ tinsert (esta_tabela, self)
self.timeMachine = #esta_tabela
end
diff --git a/core/util.lua b/core/util.lua
index 26bc5521..65371096 100644
--- a/core/util.lua
+++ b/core/util.lua
@@ -9,7 +9,7 @@
local upper = string.upper --lua local
local ipairs = ipairs --lua local
- local _pairs = pairs --lua local
+ local pairs = pairs --lua local
local _math_floor = math.floor --lua local
local _math_max = math.max --lua local
local _math_min = math.min --lua local
@@ -18,16 +18,16 @@
local _string_match = string.match --lua local
local _string_format = string.format --lua local
local loadstring = loadstring --lua local
- local _select = select
- local _tonumber = tonumber
- local _strsplit = strsplit
+ local select = select
+ local tonumber = tonumber
+ local strsplit = strsplit
local _pcall = pcall
- local _GetTime = GetTime
+ local GetTime = GetTime
- local _IsInRaid = IsInRaid --wow api local
- local _IsInGroup = IsInGroup --wow api local
- local _GetNumGroupMembers = GetNumGroupMembers --wow api local
- local _UnitAffectingCombat = UnitAffectingCombat --wow api local
+ local IsInRaid = IsInRaid --wow api local
+ local IsInGroup = IsInGroup --wow api local
+ local GetNumGroupMembers = GetNumGroupMembers --wow api local
+ local UnitAffectingCombat = UnitAffectingCombat --wow api local
local _InCombatLockdown = InCombatLockdown --wow api local
local gump = _detalhes.gump --details local
@@ -291,9 +291,9 @@
--get the npc id from guid
function _detalhes:GetNpcIdFromGuid (guid)
- local NpcId = _select( 6, _strsplit ( "-", guid ) )
+ local NpcId = select( 6, strsplit( "-", guid ) )
if (NpcId) then
- return _tonumber ( NpcId )
+ return tonumber ( NpcId )
end
return 0
end
@@ -349,7 +349,7 @@
--set all table keys to lower
local temptable = {}
function _detalhes:LowerizeKeys (_table)
- for key, value in _pairs(_table) do
+ for key, value in pairs(_table) do
temptable [string.lower (key)] = value
end
temptable, _table = table.wipe (_table), temptable
@@ -767,7 +767,7 @@
--remove a index from a hash table
function _detalhes:tableRemove (tabela, indexName)
local newtable = {}
- for hash, value in _pairs(tabela) do
+ for hash, value in pairs(tabela) do
if (hash ~= indexName) then
newtable [hash] = value
end
@@ -820,11 +820,11 @@
return t1
end
- function _detalhes.table.deploy (t1, t2)
+ function _detalhes.table.deploy(t1, t2)
for key, value in pairs(t2) do
if (type(value) == "table") then
t1 [key] = t1 [key] or {}
- _detalhes.table.deploy (t1 [key], t2 [key])
+ _detalhes.table.deploy(t1 [key], t2 [key])
elseif (t1 [key] == nil) then
t1 [key] = value
end
@@ -1120,19 +1120,19 @@ end
return true
--is in combat
- elseif (_UnitAffectingCombat("player")) then
+ elseif (UnitAffectingCombat("player")) then
return true
- elseif (_IsInRaid()) then
- for i = 1, _GetNumGroupMembers(), 1 do
- if (_UnitAffectingCombat ("raid"..i)) then
+ elseif (IsInRaid()) then
+ for i = 1, GetNumGroupMembers(), 1 do
+ if (UnitAffectingCombat("raid"..i)) then
return true
end
end
- elseif (_IsInGroup()) then
- for i = 1, _GetNumGroupMembers()-1, 1 do
- if (_UnitAffectingCombat ("party"..i)) then
+ elseif (IsInGroup()) then
+ for i = 1, GetNumGroupMembers()-1, 1 do
+ if (UnitAffectingCombat("party"..i)) then
return true
end
end
@@ -1154,15 +1154,15 @@ end
end
function _detalhes:FindGUIDFromName (name)
- if (_IsInRaid()) then
- for i = 1, _GetNumGroupMembers(), 1 do
+ if (IsInRaid()) then
+ for i = 1, GetNumGroupMembers(), 1 do
local this_name, _ = UnitName ("raid"..i)
if (this_name == name) then
return UnitGUID("raid"..i)
end
end
- elseif (_IsInGroup()) then
- for i = 1, _GetNumGroupMembers()-1, 1 do
+ elseif (IsInGroup()) then
+ for i = 1, GetNumGroupMembers()-1, 1 do
local this_name, _ = UnitName ("party"..i)
if (this_name == name) then
return UnitGUID("party"..i)
@@ -1197,7 +1197,7 @@ end
if (not ThisGradient.done) then
- local percent = _math_min((_GetTime() - ThisGradient.TimeStart) / ThisGradient.Duration * 100, 100)
+ local percent = _math_min((GetTime() - ThisGradient.TimeStart) / ThisGradient.Duration * 100, 100)
local red_now = ThisGradient.StartRed + (percent * ThisGradient.OnePercentRed)
local green_now = ThisGradient.StartGreen + (percent * ThisGradient.OnePercentGreen)
local blue_now = ThisGradient.StartBlue + (percent * ThisGradient.OnePercentBlue)
diff --git a/core/windows.lua b/core/windows.lua
index 5d1031fc..e79e6fea 100644
--- a/core/windows.lua
+++ b/core/windows.lua
@@ -1249,7 +1249,7 @@
--updatewindow_frame.TitleText:SetText("A New Version Is Available!") --10.0 fuck
- updatewindow_frame.midtext = updatewindow_frame:CreateFontString (nil, "artwork", "GameFontNormal")
+ updatewindow_frame.midtext = updatewindow_frame:CreateFontString(nil, "artwork", "GameFontNormal")
updatewindow_frame.midtext:SetText("Good news everyone!\nA new version has been forged and is waiting to be looted.")
updatewindow_frame.midtext:SetPoint("topleft", updatewindow_frame, "topleft", 10, -90)
updatewindow_frame.midtext:SetJustifyH("center")
diff --git a/frames/anime.lua b/frames/anime.lua
index 5f0163d1..5c5240a4 100644
--- a/frames/anime.lua
+++ b/frames/anime.lua
@@ -289,7 +289,7 @@ function _detalhes.PlayBestDamageOnGuild (damage)
----------------------------------------------
- local NewDamageRecord = DetailsNewDamageRecord:CreateFontString ("NewDamageRecordFontString", "OVERLAY")
+ local NewDamageRecord = DetailsNewDamageRecord:CreateFontString("NewDamageRecordFontString", "OVERLAY")
NewDamageRecord:SetFont ([=[Fonts\FRIZQT__.TTF]=], 12, "OUTLINE")
NewDamageRecord:SetText("Damage Record!")
NewDamageRecord:SetDrawLayer ("OVERLAY", 0)
@@ -328,7 +328,7 @@ function _detalhes.PlayBestDamageOnGuild (damage)
----------------------------------------------
- local DamageAmount = DetailsNewDamageRecord:CreateFontString ("DamageAmountFontString", "OVERLAY")
+ local DamageAmount = DetailsNewDamageRecord:CreateFontString("DamageAmountFontString", "OVERLAY")
DamageAmount:SetFont ([=[Fonts\FRIZQT__.TTF]=], 12, "THICKOUTLINE")
DamageAmount:SetText(_detalhes:comma_value (damage))
DamageAmount:SetDrawLayer ("OVERLAY", 0)
diff --git a/frames/fw_mods.lua b/frames/fw_mods.lua
index 9f8dd55a..2d0e2927 100644
--- a/frames/fw_mods.lua
+++ b/frames/fw_mods.lua
@@ -7,7 +7,7 @@ local CreateFrame = CreateFrame
local GetTime = GetTime
local GetCursorPosition = GetCursorPosition
local GameTooltip = GameTooltip
-local _select = select
+local select = select
local _detalhes = _G._detalhes
local gump = _detalhes.gump
@@ -17,7 +17,7 @@ function gump:NewLabel2 (parent, container, member, text, font, size, color)
font = font or "GameFontHighlightSmall"
- local newFontString = parent:CreateFontString (nil, "OVERLAY", font)
+ local newFontString = parent:CreateFontString(nil, "OVERLAY", font)
if (member) then
container [member] = newFontString
end
@@ -71,7 +71,7 @@ function gump:NewDetailsButton (parent, container, instancia, func, param1, para
new_button:SetDisabledTexture (pic_disabled)
new_button:SetHighlightTexture(pic_highlight, "ADD")
- local new_text = new_button:CreateFontString (nil, "OVERLAY", "GameFontNormal")
+ local new_text = new_button:CreateFontString(nil, "OVERLAY", "GameFontNormal")
new_text:SetPoint("center", new_button, "center")
new_button.text = new_text
diff --git a/frames/window_benchmark.lua b/frames/window_benchmark.lua
index 10837e54..c849e857 100644
--- a/frames/window_benchmark.lua
+++ b/frames/window_benchmark.lua
@@ -56,7 +56,7 @@ local libwindow = LibStub("LibWindow-1.1")
f.Close:SetScript("OnClick", function() f:Hide() end)
--title
- f.Title = f.TitleBar:CreateFontString ("$parentTitle", "overlay", "GameFontNormal")
+ f.Title = f.TitleBar:CreateFontString("$parentTitle", "overlay", "GameFontNormal")
f.Title:SetPoint("center", f.TitleBar, "center")
f.Title:SetTextColor (.8, .8, .8, 1)
f.Title:SetText("Details! Benchmark")
diff --git a/frames/window_currentdps.lua b/frames/window_currentdps.lua
index f3be4dad..4009f047 100644
--- a/frames/window_currentdps.lua
+++ b/frames/window_currentdps.lua
@@ -464,7 +464,7 @@ function Details:CreateCurrentDpsFrame(parent, name)
rightOrnamentTexture:SetAlpha(0.6)
--title bar
- local TitleString = f:CreateFontString (nil, "overlay", "GameFontNormal")
+ local TitleString = f:CreateFontString(nil, "overlay", "GameFontNormal")
TitleString:SetPoint("top", f, "top", 0, -5)
TitleString:SetText("Details! Arena Real Time DPS Tracker")
DF:SetFontSize (TitleString, 9)
@@ -498,12 +498,12 @@ function Details:CreateCurrentDpsFrame(parent, name)
end
--labels for mythic dungeon / group party
- local labelGroupDamage = f:CreateFontString (nil, "overlay", "GameFontNormal")
+ local labelGroupDamage = f:CreateFontString(nil, "overlay", "GameFontNormal")
labelGroupDamage:SetText("Real Time Group DPS")
DF:SetFontSize (labelGroupDamage, 14)
DF:SetFontOutline (labelGroupDamage, "NONE")
- local labelGroupDamage_DPS = f:CreateFontString (nil, "overlay", "GameFontNormal")
+ local labelGroupDamage_DPS = f:CreateFontString(nil, "overlay", "GameFontNormal")
labelGroupDamage_DPS:SetText("0")
labelGroupDamage:SetPoint("center", f, "center", 0, 10)
diff --git a/frames/window_custom.lua b/frames/window_custom.lua
index 70fff812..3494d61b 100644
--- a/frames/window_custom.lua
+++ b/frames/window_custom.lua
@@ -16,16 +16,16 @@
local _math_ceil = math.ceil --lua local
local _math_floor = math.floor --lua local
local ipairs = ipairs --lua local
- local _pairs = pairs --lua local
+ local pairs = pairs --lua local
local _string_lower = string.lower --lua local
local _table_sort = table.sort --lua local
- local _table_insert = table.insert --lua local
+ local tinsert = table.insert --lua local
local _unpack = unpack --lua local
local _setmetatable = setmetatable --lua local
local _GetSpellInfo = _detalhes.getspellinfo --api local
local _CreateFrame = CreateFrame --api local
- local _GetTime = GetTime --api local
+ local GetTime = GetTime --api local
local _GetCursorPosition = GetCursorPosition --api local
local _GameTooltip = GameTooltip --api local
local UIParent = UIParent --api local
@@ -1014,7 +1014,7 @@
button.icon:SetTexture([[Interface\AddOns\Details\images\custom_icones]])
button.icon:SetTexCoord (p*(i-1), p*(i), 0, 1)
- button.text = button:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ button.text = button:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
button.text:SetPoint("left", button.icon, "right", 4, 0)
button.text:SetText(attributes [i] and attributes [i].label or "")
button.text:SetTextColor (.9, .9, .9, 1)
@@ -1733,7 +1733,7 @@
local script = code_editor:GetText()
local func, errortext = loadstring (script)
if (not func) then
- local firstLine = strsplit ("\n", script, 2)
+ local firstLine = strsplit("\n", script, 2)
errortext = errortext:gsub (firstLine, "")
errortext = errortext:gsub ("%[string \"", "")
errortext = errortext:gsub ("...\"]:", "")
diff --git a/frames/window_eventtracker.lua b/frames/window_eventtracker.lua
index 54a6ee07..9246b62a 100644
--- a/frames/window_eventtracker.lua
+++ b/frames/window_eventtracker.lua
@@ -362,11 +362,11 @@ function Details:CreateEventTrackerFrame(parent, name)
local righticon = statusbar:CreateTexture("$parentRightIcon", "overlay")
righticon:SetPoint("right", line, "right", 0, 0)
- local lefttext = statusbar:CreateFontString ("$parentLeftText", "overlay", "GameFontNormal")
+ local lefttext = statusbar:CreateFontString("$parentLeftText", "overlay", "GameFontNormal")
DF:SetFontSize (lefttext, 9)
lefttext:SetPoint("left", lefticon, "right", 2, 0)
- local righttext = statusbar:CreateFontString ("$parentRightText", "overlay", "GameFontNormal")
+ local righttext = statusbar:CreateFontString("$parentRightText", "overlay", "GameFontNormal")
DF:SetFontSize (righttext, 9)
righttext:SetPoint("right", righticon, "left", -2, 0)
@@ -591,7 +591,7 @@ function Details:CreateEventTrackerFrame(parent, name)
end
--title text
- local TitleString = f:CreateFontString (nil, "overlay", "GameFontNormal")
+ local TitleString = f:CreateFontString(nil, "overlay", "GameFontNormal")
TitleString:SetPoint("top", f, "top", 0, -3)
TitleString:SetText("Details!: Event Tracker")
local TitleBackground = f:CreateTexture(nil, "artwork")
diff --git a/frames/window_forge.lua b/frames/window_forge.lua
index 7dd3fa07..11df86c0 100644
--- a/frames/window_forge.lua
+++ b/frames/window_forge.lua
@@ -61,7 +61,7 @@ function Details:OpenForge()
end
if (not have_plugins_enabled and false) then
- local nopluginLabel = f:CreateFontString (nil, "overlay", "GameFontNormal")
+ local nopluginLabel = f:CreateFontString(nil, "overlay", "GameFontNormal")
local nopluginIcon = f:CreateTexture(nil, "overlay")
nopluginIcon:SetPoint("bottomleft", f, "bottomleft", 10, 10)
nopluginIcon:SetSize(16, 16)
@@ -164,7 +164,7 @@ function Details:OpenForge()
w:SetSize(600, 20)
w:SetPoint("topleft", f, "topleft", 164, -40)
--
- local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ local label = w:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
label:SetText(L["STRING_FORGE_FILTER_PLAYERNAME"] .. ": ")
label:SetPoint("left", w, "left", 5, 0)
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeAllPlayersNameFilter")
@@ -228,7 +228,7 @@ function Details:OpenForge()
w:SetSize(600, 20)
w:SetPoint("topleft", f, "topleft", 164, -40)
--
- local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ local label = w:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
label:SetText(L["STRING_FORGE_FILTER_PETNAME"] .. ": ")
label:SetPoint("left", w, "left", 5, 0)
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeAllPetsNameFilter")
@@ -236,7 +236,7 @@ function Details:OpenForge()
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate(Details.gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
--
- local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ local label = w:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
label:SetText(L["STRING_FORGE_FILTER_OWNERNAME"] .. ": ")
label:SetPoint("left", entry.widget, "right", 20, 0)
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeAllPetsOwnerFilter")
@@ -315,7 +315,7 @@ function Details:OpenForge()
w:SetSize(600, 20)
w:SetPoint("topleft", f, "topleft", 164, -40)
--
- local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ local label = w:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
label:SetText(L["STRING_FORGE_FILTER_ENEMYNAME"] .. ": ")
label:SetPoint("left", w, "left", 5, 0)
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeAllEnemiesNameFilter")
@@ -412,7 +412,7 @@ function Details:OpenForge()
w:SetSize(600, 20)
w:SetPoint("topleft", f, "topleft", 164, -40)
--
- local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ local label = w:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
label:SetText(L["STRING_FORGE_FILTER_SPELLNAME"] .. ": ")
label:SetPoint("left", w, "left", 5, 0)
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeAllSpellsNameFilter")
@@ -420,7 +420,7 @@ function Details:OpenForge()
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate(Details.gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
--
- local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ local label = w:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
label:SetText(L["STRING_FORGE_FILTER_CASTERNAME"] .. ": ")
label:SetPoint("left", entry.widget, "right", 20, 0)
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeAllSpellsCasterFilter")
@@ -542,7 +542,7 @@ function Details:OpenForge()
w:SetSize(600, 20)
w:SetPoint("topleft", f, "topleft", 164, -40)
--
- local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ local label = w:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
label:SetText(L["STRING_FORGE_FILTER_SPELLNAME"] .. ": ")
label:SetPoint("left", w, "left", 5, 0)
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeEncounterSpellsNameFilter")
@@ -550,7 +550,7 @@ function Details:OpenForge()
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate(Details.gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
--
- local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ local label = w:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
label:SetText(L["STRING_FORGE_FILTER_CASTERNAME"] .. ": ")
label:SetPoint("left", entry.widget, "right", 20, 0)
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeEncounterSpellsCasterFilter")
@@ -558,7 +558,7 @@ function Details:OpenForge()
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate(Details.gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
--
- local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ local label = w:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
label:SetText(L["STRING_FORGE_FILTER_ENCOUNTERNAME"] .. ": ")
label:SetPoint("left", entry.widget, "right", 20, 0)
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeEncounterSpellsEncounterFilter")
@@ -702,7 +702,7 @@ function Details:OpenForge()
npcIdFrame:SetSize(600, 20)
npcIdFrame:SetPoint("topleft", f, "topleft", 164, -40)
- local filterSpellNameLabel = npcIdFrame:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ local filterSpellNameLabel = npcIdFrame:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
filterSpellNameLabel:SetText(L["STRING_FORGE_FILTER_SPELLNAME"] .. ": ")
filterSpellNameLabel:SetPoint("left", npcIdFrame, "left", 5, 0)
@@ -797,7 +797,7 @@ function Details:OpenForge()
w:SetSize(600, 20)
w:SetPoint("topleft", f, "topleft", 164, -40)
--
- local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ local label = w:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
label:SetText(L["STRING_FORGE_FILTER_BARTEXT"] .. ": ")
label:SetPoint("left", w, "left", 5, 0)
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeDBMBarsTextFilter")
@@ -805,7 +805,7 @@ function Details:OpenForge()
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate(Details.gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
--
- local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ local label = w:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
label:SetText(L["STRING_FORGE_FILTER_ENCOUNTERNAME"] .. ": ")
label:SetPoint("left", entry.widget, "right", 20, 0)
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeDBMBarsEncounterFilter")
@@ -928,7 +928,7 @@ function Details:OpenForge()
w:SetSize(600, 20)
w:SetPoint("topleft", f, "topleft", 164, -40)
--
- local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ local label = w:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
label:SetText(L["STRING_FORGE_FILTER_BARTEXT"] .. ": ")
label:SetPoint("left", w, "left", 5, 0)
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeBigWigsBarsTextFilter")
@@ -936,7 +936,7 @@ function Details:OpenForge()
entry:SetPoint("left", label, "right", 2, 0)
entry:SetTemplate(Details.gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
--
- local label = w:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ local label = w:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
label:SetText(L["STRING_FORGE_FILTER_ENCOUNTERNAME"] .. ": ")
label:SetPoint("left", entry.widget, "right", 20, 0)
local entry = fw:CreateTextEntry (w, nil, 120, 20, "entry", "DetailsForgeBWBarsEncounterFilter")
diff --git a/frames/window_main.lua b/frames/window_main.lua
index e7dc5f98..b39f1843 100644
--- a/frames/window_main.lua
+++ b/frames/window_main.lua
@@ -16,7 +16,7 @@ local abs = _G.abs
local unpack = unpack
--api locals
local CreateFrame = CreateFrame
-local _GetTime = GetTime
+local GetTime = GetTime
local _GetCursorPosition = GetCursorPosition
local UIParent = UIParent
local _IsAltKeyDown = IsAltKeyDown
@@ -1933,7 +1933,7 @@ local lineScript_Onmousedown = function(self, button)
self._instance:HandleTextsOnMouseClick (self, "down")
- self.mouse_down = _GetTime()
+ self.mouse_down = GetTime()
self.button = button
local x, y = _GetCursorPosition()
self.x = floor(x)
@@ -1964,7 +1964,7 @@ local lineScript_Onmouseup = function(self, button)
x = floor(x)
y = floor(y)
- if (self.mouse_down and (self.mouse_down+0.4 > _GetTime() and (x == self.x and y == self.y)) or (x == self.x and y == self.y)) then
+ if (self.mouse_down and (self.mouse_down+0.4 > GetTime() and (x == self.x and y == self.y)) or (x == self.x and y == self.y)) then
if (self.button == "LeftButton" or self.button == "MiddleButton") then
if (self._instance.atributo == 5 or is_shift_down) then
--report
diff --git a/frames/window_options2_sections.lua b/frames/window_options2_sections.lua
index f30d4430..62196924 100644
--- a/frames/window_options2_sections.lua
+++ b/frames/window_options2_sections.lua
@@ -4889,13 +4889,13 @@ do
tinsert(_G.UISpecialFrames, "DetailsLoadWallpaperImage")
- local t = f:CreateFontString (nil, "overlay", "GameFontNormal")
+ local t = f:CreateFontString(nil, "overlay", "GameFontNormal")
t:SetText(Loc ["STRING_OPTIONS_WALLPAPER_LOAD_EXCLAMATION"])
t:SetPoint("topleft", f, "topleft", 15, -25)
t:SetJustifyH("left")
f.t = t
- local filename = f:CreateFontString (nil, "overlay", "GameFontHighlightLeft")
+ local filename = f:CreateFontString(nil, "overlay", "GameFontHighlightLeft")
filename:SetPoint("topleft", f, "topleft", 15, -128)
filename:SetText(Loc ["STRING_OPTIONS_WALLPAPER_LOAD_FILENAME"])
diff --git a/frames/window_playerbreakdown.lua b/frames/window_playerbreakdown.lua
index 661b7bf3..889aec4a 100644
--- a/frames/window_playerbreakdown.lua
+++ b/frames/window_playerbreakdown.lua
@@ -10,11 +10,11 @@ local _
--local _string_len = string.len
local _math_floor = math.floor
local ipairs = ipairs
-local _pairs = pairs
+local pairs = pairs
local type = type
--api locals
local _CreateFrame = CreateFrame
-local _GetTime = GetTime
+local GetTime = GetTime
local _GetSpellInfo = _detalhes.getspellinfo
local _GetCursorPosition = GetCursorPosition
local _unpack = unpack
@@ -619,12 +619,12 @@ function gump:CriaDetalheInfo (index)
info.bg:SetValue(100)
info.bg:SetSize(320, 47)
- info.nome = info.bg:CreateFontString (nil, "OVERLAY", "GameFontNormal")
- info.nome2 = info.bg:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
- info.dano = info.bg:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
- info.dano_porcento = info.bg:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
- info.dano_media = info.bg:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
- info.dano_dps = info.bg:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
+ info.nome = info.bg:CreateFontString(nil, "OVERLAY", "GameFontNormal")
+ info.nome2 = info.bg:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
+ info.dano = info.bg:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
+ info.dano_porcento = info.bg:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
+ info.dano_media = info.bg:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
+ info.dano_dps = info.bg:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
info.bg.overlay = info.bg:CreateTexture("DetailsPlayerDetailsWindow_DetalheInfoBG_Overlay" .. index, "ARTWORK")
info.bg.overlay:SetTexture("Interface\\AddOns\\Details\\images\\overlay_detalhes")
@@ -815,19 +815,19 @@ end
--cria os textos em geral da janela info
------------------------------------------------------------------------------------------------------------------------------
local function cria_textos (este_gump, SWW)
- este_gump.nome = este_gump:CreateFontString (nil, "OVERLAY", "QuestFont_Large")
+ este_gump.nome = este_gump:CreateFontString(nil, "OVERLAY", "QuestFont_Large")
este_gump.nome:SetPoint("TOPLEFT", este_gump, "TOPLEFT", 105, -54)
- este_gump.atributo_nome = este_gump:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
+ este_gump.atributo_nome = este_gump:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
- este_gump.targets = SWW:CreateFontString (nil, "OVERLAY", "QuestFont_Large")
+ este_gump.targets = SWW:CreateFontString(nil, "OVERLAY", "QuestFont_Large")
este_gump.targets:SetPoint("TOPLEFT", este_gump, "TOPLEFT", 24, -273)
este_gump.targets:SetText(Loc ["STRING_TARGETS"] .. ":")
este_gump.avatar = este_gump:CreateTexture(nil, "overlay")
este_gump.avatar_bg = este_gump:CreateTexture(nil, "overlay")
- este_gump.avatar_attribute = este_gump:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
- este_gump.avatar_nick = este_gump:CreateFontString (nil, "overlay", "QuestFont_Large")
+ este_gump.avatar_attribute = este_gump:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
+ este_gump.avatar_nick = este_gump:CreateFontString(nil, "overlay", "QuestFont_Large")
este_gump.avatar:SetDrawLayer ("overlay", 3)
este_gump.avatar_bg:SetDrawLayer ("overlay", 2)
este_gump.avatar_nick:SetDrawLayer ("overlay", 4)
@@ -1728,12 +1728,12 @@ function gump:CriaJanelaInfo()
este_gump.apoio_icone_direito:SetHeight(13)
- este_gump.topright_text1 = este_gump:CreateFontString (nil, "overlay", "GameFontNormal")
+ este_gump.topright_text1 = este_gump:CreateFontString(nil, "overlay", "GameFontNormal")
este_gump.topright_text1:SetPoint("bottomright", este_gump, "topright", -18 - (94 * (1-1)), -36)
este_gump.topright_text1:SetJustifyH("right")
_detalhes.gump:SetFontSize (este_gump.topright_text1, 10)
- este_gump.topright_text2 = este_gump:CreateFontString (nil, "overlay", "GameFontNormal")
+ este_gump.topright_text2 = este_gump:CreateFontString(nil, "overlay", "GameFontNormal")
este_gump.topright_text2:SetPoint("bottomright", este_gump, "topright", -18 - (94 * (1-1)), -48)
este_gump.topright_text2:SetJustifyH("right")
_detalhes.gump:SetFontSize (este_gump.topright_text2, 10)
@@ -1811,7 +1811,7 @@ function gump:CriaJanelaInfo()
este_gump.no_targets:SetTexCoord (0.015625, 1, 0.01171875, 0.390625)
este_gump.no_targets:SetDesaturated(true)
este_gump.no_targets:SetAlpha(.7)
- este_gump.no_targets.text = SWW:CreateFontString (nil, "overlay", "GameFontNormal")
+ este_gump.no_targets.text = SWW:CreateFontString(nil, "overlay", "GameFontNormal")
este_gump.no_targets.text:SetPoint("center", este_gump.no_targets, "center")
este_gump.no_targets.text:SetText(Loc ["STRING_NO_TARGET_BOX"])
este_gump.no_targets.text:SetTextColor (1, 1, 1, .4)
@@ -1959,7 +1959,7 @@ function gump:CriaJanelaInfo()
local avoidance_create = function(tab, frame)
--Percent Desc
- local percent_desc = frame:CreateFontString (nil, "artwork", "GameFontNormal")
+ local percent_desc = frame:CreateFontString(nil, "artwork", "GameFontNormal")
percent_desc:SetText("Percent values are comparisons with the previous try.")
percent_desc:SetPoint("bottomleft", frame, "bottomleft", 13, 13 + PLAYER_DETAILS_STATUSBAR_HEIGHT)
percent_desc:SetTextColor (.5, .5, .5, 1)
@@ -1974,19 +1974,19 @@ function gump:CriaJanelaInfo()
local y = -5
local padding = 16
- local summary_text = summaryBox:CreateFontString (nil, "artwork", "GameFontNormal")
+ local summary_text = summaryBox:CreateFontString(nil, "artwork", "GameFontNormal")
summary_text:SetText("Summary")
summary_text :SetPoint("topleft", summaryBox, "topleft", 5, y)
y = y - padding
--total damage received
- local damagereceived = summaryBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local damagereceived = summaryBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
damagereceived:SetPoint("topleft", summaryBox, "topleft", 15, y)
damagereceived:SetText("Total Damage Taken:") --localize-me
damagereceived:SetTextColor (.8, .8, .8, 1)
- local damagereceived_amt = summaryBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local damagereceived_amt = summaryBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
damagereceived_amt:SetPoint("left", damagereceived, "right", 2, 0)
damagereceived_amt:SetText("0")
tab.damagereceived = damagereceived_amt
@@ -1994,11 +1994,11 @@ function gump:CriaJanelaInfo()
y = y - padding
--per second
- local damagepersecond = summaryBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local damagepersecond = summaryBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
damagepersecond:SetPoint("topleft", summaryBox, "topleft", 20, y)
damagepersecond:SetText("Per Second:") --localize-me
- local damagepersecond_amt = summaryBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local damagepersecond_amt = summaryBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
damagepersecond_amt:SetPoint("left", damagepersecond, "right", 2, 0)
damagepersecond_amt:SetText("0")
tab.damagepersecond = damagepersecond_amt
@@ -2006,12 +2006,12 @@ function gump:CriaJanelaInfo()
y = y - padding
--total absorbs
- local absorbstotal = summaryBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local absorbstotal = summaryBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
absorbstotal:SetPoint("topleft", summaryBox, "topleft", 15, y)
absorbstotal:SetText("Total Absorbs:") --localize-me
absorbstotal:SetTextColor (.8, .8, .8, 1)
- local absorbstotal_amt = summaryBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local absorbstotal_amt = summaryBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
absorbstotal_amt:SetPoint("left", absorbstotal, "right", 2, 0)
absorbstotal_amt:SetText("0")
tab.absorbstotal = absorbstotal_amt
@@ -2019,11 +2019,11 @@ function gump:CriaJanelaInfo()
y = y - padding
--per second
- local absorbstotalpersecond = summaryBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local absorbstotalpersecond = summaryBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
absorbstotalpersecond:SetPoint("topleft", summaryBox, "topleft", 20, y)
absorbstotalpersecond:SetText("Per Second:") --localize-me
- local absorbstotalpersecond_amt = summaryBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local absorbstotalpersecond_amt = summaryBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
absorbstotalpersecond_amt:SetPoint("left", absorbstotalpersecond, "right", 2, 0)
absorbstotalpersecond_amt:SetText("0")
tab.absorbstotalpersecond = absorbstotalpersecond_amt
@@ -2038,29 +2038,29 @@ function gump:CriaJanelaInfo()
meleeBox:SetPoint("topleft", summaryBox, "bottomleft", 0, -5)
meleeBox:SetSize(200, 160)
- local melee_text = meleeBox:CreateFontString (nil, "artwork", "GameFontNormal")
+ local melee_text = meleeBox:CreateFontString(nil, "artwork", "GameFontNormal")
melee_text:SetText("Melee")
melee_text :SetPoint("topleft", meleeBox, "topleft", 5, y)
y = y - padding
--dodge
- local dodge = meleeBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local dodge = meleeBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
dodge:SetPoint("topleft", meleeBox, "topleft", 15, y)
dodge:SetText("Dodge:") --localize-me
dodge:SetTextColor (.8, .8, .8, 1)
- local dodge_amt = meleeBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local dodge_amt = meleeBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
dodge_amt:SetPoint("left", dodge, "right", 2, 0)
dodge_amt:SetText("0")
tab.dodge = dodge_amt
y = y - padding
- local dodgepersecond = meleeBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local dodgepersecond = meleeBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
dodgepersecond:SetPoint("topleft", meleeBox, "topleft", 20, y)
dodgepersecond:SetText("Per Second:") --localize-me
- local dodgepersecond_amt = meleeBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local dodgepersecond_amt = meleeBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
dodgepersecond_amt:SetPoint("left", dodgepersecond, "right", 2, 0)
dodgepersecond_amt:SetText("0")
tab.dodgepersecond = dodgepersecond_amt
@@ -2068,21 +2068,21 @@ function gump:CriaJanelaInfo()
y = y - padding
-- parry
- local parry = meleeBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local parry = meleeBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
parry:SetPoint("topleft", meleeBox, "topleft", 15, y)
parry:SetText("Parry:") --localize-me
parry:SetTextColor (.8, .8, .8, 1)
- local parry_amt = meleeBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local parry_amt = meleeBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
parry_amt:SetPoint("left", parry, "right", 2, 0)
parry_amt:SetText("0")
tab.parry = parry_amt
y = y - padding
- local parrypersecond = meleeBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local parrypersecond = meleeBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
parrypersecond:SetPoint("topleft", meleeBox, "topleft", 20, y)
parrypersecond:SetText("Per Second:") --localize-me
- local parrypersecond_amt = meleeBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local parrypersecond_amt = meleeBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
parrypersecond_amt:SetPoint("left", parrypersecond, "right", 2, 0)
parrypersecond_amt:SetText("0")
tab.parrypersecond = parrypersecond_amt
@@ -2090,31 +2090,31 @@ function gump:CriaJanelaInfo()
y = y - padding
-- block
- local block = meleeBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local block = meleeBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
block:SetPoint("topleft", meleeBox, "topleft", 15, y)
block:SetText("Block:") --localize-me
block:SetTextColor (.8, .8, .8, 1)
- local block_amt = meleeBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local block_amt = meleeBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
block_amt:SetPoint("left", block, "right", 2, 0)
block_amt:SetText("0")
tab.block = block_amt
y = y - padding
- local blockpersecond = meleeBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local blockpersecond = meleeBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
blockpersecond:SetPoint("topleft", meleeBox, "topleft", 20, y)
blockpersecond:SetText("Per Second:") --localize-me
- local blockpersecond_amt = meleeBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local blockpersecond_amt = meleeBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
blockpersecond_amt:SetPoint("left", blockpersecond, "right", 2, 0)
blockpersecond_amt:SetText("0")
tab.blockpersecond = blockpersecond_amt
y = y - padding
- local blockeddamage = meleeBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local blockeddamage = meleeBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
blockeddamage:SetPoint("topleft", meleeBox, "topleft", 20, y)
blockeddamage:SetText("Damage Blocked:") --localize-me
- local blockeddamage_amt = meleeBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local blockeddamage_amt = meleeBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
blockeddamage_amt:SetPoint("left", blockeddamage, "right", 2, 0)
blockeddamage_amt:SetText("0")
tab.blockeddamage_amt = blockeddamage_amt
@@ -2129,18 +2129,18 @@ function gump:CriaJanelaInfo()
absorbsBox:SetPoint("topleft", summaryBox, "topright", 10, 0)
absorbsBox:SetSize(200, 160)
- local absorb_text = absorbsBox:CreateFontString (nil, "artwork", "GameFontNormal")
+ local absorb_text = absorbsBox:CreateFontString(nil, "artwork", "GameFontNormal")
absorb_text:SetText("Absorb")
absorb_text :SetPoint("topleft", absorbsBox, "topleft", 5, y)
y = y - padding
--full absorbs
- local fullsbsorbed = absorbsBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local fullsbsorbed = absorbsBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
fullsbsorbed:SetPoint("topleft", absorbsBox, "topleft", 20, y)
fullsbsorbed:SetText("Full Absorbs:") --localize-me
fullsbsorbed:SetTextColor (.8, .8, .8, 1)
- local fullsbsorbed_amt = absorbsBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local fullsbsorbed_amt = absorbsBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
fullsbsorbed_amt:SetPoint("left", fullsbsorbed, "right", 2, 0)
fullsbsorbed_amt:SetText("0")
tab.fullsbsorbed = fullsbsorbed_amt
@@ -2148,11 +2148,11 @@ function gump:CriaJanelaInfo()
y = y - padding
--partially absorbs
- local partiallyabsorbed = absorbsBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local partiallyabsorbed = absorbsBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
partiallyabsorbed:SetPoint("topleft", absorbsBox, "topleft", 20, y)
partiallyabsorbed:SetText("Partially Absorbed:") --localize-me
partiallyabsorbed:SetTextColor (.8, .8, .8, 1)
- local partiallyabsorbed_amt = absorbsBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local partiallyabsorbed_amt = absorbsBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
partiallyabsorbed_amt:SetPoint("left", partiallyabsorbed, "right", 2, 0)
partiallyabsorbed_amt:SetText("0")
tab.partiallyabsorbed = partiallyabsorbed_amt
@@ -2160,10 +2160,10 @@ function gump:CriaJanelaInfo()
y = y - padding
--partially absorbs per second
- local partiallyabsorbedpersecond = absorbsBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local partiallyabsorbedpersecond = absorbsBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
partiallyabsorbedpersecond:SetPoint("topleft", absorbsBox, "topleft", 25, y)
partiallyabsorbedpersecond:SetText("Average:") --localize-me
- local partiallyabsorbedpersecond_amt = absorbsBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local partiallyabsorbedpersecond_amt = absorbsBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
partiallyabsorbedpersecond_amt:SetPoint("left", partiallyabsorbedpersecond, "right", 2, 0)
partiallyabsorbedpersecond_amt:SetText("0")
tab.partiallyabsorbedpersecond = partiallyabsorbedpersecond_amt
@@ -2171,11 +2171,11 @@ function gump:CriaJanelaInfo()
y = y - padding
--no absorbs
- local noabsorbs = absorbsBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local noabsorbs = absorbsBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
noabsorbs:SetPoint("topleft", absorbsBox, "topleft", 20, y)
noabsorbs:SetText("No Absorption:") --localize-me
noabsorbs:SetTextColor (.8, .8, .8, 1)
- local noabsorbs_amt = absorbsBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local noabsorbs_amt = absorbsBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
noabsorbs_amt:SetPoint("left", noabsorbs, "right", 2, 0)
noabsorbs_amt:SetText("0")
tab.noabsorbs = noabsorbs_amt
@@ -2190,18 +2190,18 @@ function gump:CriaJanelaInfo()
healingBox:SetPoint("topleft", absorbsBox, "bottomleft", 0, -5)
healingBox:SetSize(200, 160)
- local healing_text = healingBox:CreateFontString (nil, "artwork", "GameFontNormal")
+ local healing_text = healingBox:CreateFontString(nil, "artwork", "GameFontNormal")
healing_text:SetText("Healing")
healing_text :SetPoint("topleft", healingBox, "topleft", 5, y)
y = y - padding
--self healing
- local selfhealing = healingBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local selfhealing = healingBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
selfhealing:SetPoint("topleft", healingBox, "topleft", 20, y)
selfhealing:SetText("Self Healing:") --localize-me
selfhealing:SetTextColor (.8, .8, .8, 1)
- local selfhealing_amt = healingBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local selfhealing_amt = healingBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
selfhealing_amt:SetPoint("left", selfhealing, "right", 2, 0)
selfhealing_amt:SetText("0")
tab.selfhealing = selfhealing_amt
@@ -2209,10 +2209,10 @@ function gump:CriaJanelaInfo()
y = y - padding
--self healing per second
- local selfhealingpersecond = healingBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local selfhealingpersecond = healingBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
selfhealingpersecond:SetPoint("topleft", healingBox, "topleft", 25, y)
selfhealingpersecond:SetText("Per Second:") --localize-me
- local selfhealingpersecond_amt = healingBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local selfhealingpersecond_amt = healingBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
selfhealingpersecond_amt:SetPoint("left", selfhealingpersecond, "right", 2, 0)
selfhealingpersecond_amt:SetText("0")
tab.selfhealingpersecond = selfhealingpersecond_amt
@@ -2220,11 +2220,11 @@ function gump:CriaJanelaInfo()
y = y - padding
for i = 1, 5 do
- local healer = healingBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local healer = healingBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
healer:SetPoint("topleft", healingBox, "topleft", 20, y + ((i-1)*15)*-1)
healer:SetText("healer name:") --localize-me
healer:SetTextColor (.8, .8, .8, 1)
- local healer_amt = healingBox:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local healer_amt = healingBox:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
healer_amt:SetPoint("left", healer, "right", 2, 0)
healer_amt:SetText("0")
tab ["healer" .. i] = {healer, healer_amt}
@@ -2242,7 +2242,7 @@ function gump:CriaJanelaInfo()
spellsBox:SetPoint("topleft", absorbsBox, "topright", 10, 0)
spellsBox:SetSize(346, 160 * 2 + 5)
- local spells_text = spellsBox:CreateFontString (nil, "artwork", "GameFontNormal")
+ local spells_text = spellsBox:CreateFontString(nil, "artwork", "GameFontNormal")
spells_text:SetText("Spells")
spells_text :SetPoint("topleft", spellsBox, "topleft", 5, y)
@@ -2279,12 +2279,12 @@ function gump:CriaJanelaInfo()
icon:SetSize(14, 14)
icon:SetPoint("left", frame_tooltip, "left")
- local spell = frame_tooltip:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local spell = frame_tooltip:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
spell:SetPoint("left", icon, "right", 2, 0)
spell:SetText("spell name:") --localize-me
spell:SetTextColor (.8, .8, .8, 1)
- local spell_amt = frame_tooltip:CreateFontString (nil, "artwork", "GameFontHighlightSmall")
+ local spell_amt = frame_tooltip:CreateFontString(nil, "artwork", "GameFontHighlightSmall")
spell_amt:SetPoint("left", spell, "right", 2, 0)
spell_amt:SetText("0")
@@ -2738,10 +2738,10 @@ function gump:CriaJanelaInfo()
local icon = line:CreateTexture("$parentIcon", "overlay")
icon:SetSize(scroll_line_height -2 , scroll_line_height - 2)
- local name = line:CreateFontString ("$parentName", "overlay", "GameFontNormal")
- local uptime = line:CreateFontString ("$parentName", "overlay", "GameFontNormal")
- local apply = line:CreateFontString ("$parentName", "overlay", "GameFontNormal")
- local refresh = line:CreateFontString ("$parentName", "overlay", "GameFontNormal")
+ local name = line:CreateFontString("$parentName", "overlay", "GameFontNormal")
+ local uptime = line:CreateFontString("$parentName", "overlay", "GameFontNormal")
+ local apply = line:CreateFontString("$parentName", "overlay", "GameFontNormal")
+ local refresh = line:CreateFontString("$parentName", "overlay", "GameFontNormal")
--local waButton = DF:CreateButton(line, wa_button, 18, 18)
--waButton:SetIcon ([[Interface\AddOns\WeakAuras\Media\Textures\icon]])
@@ -3020,7 +3020,7 @@ function gump:CriaJanelaInfo()
if (player_2) then
local player_2_target = player_2.targets
player_2_target_pool = {}
- for target_name, amount in _pairs(player_2_target) do
+ for target_name, amount in pairs(player_2_target) do
player_2_target_pool [#player_2_target_pool+1] = {target_name, amount}
end
table.sort (player_2_target_pool, _detalhes.Sort2)
@@ -3039,7 +3039,7 @@ function gump:CriaJanelaInfo()
if (player_3) then
local player_3_target = player_3.targets
player_3_target_pool = {}
- for target_name, amount in _pairs(player_3_target) do
+ for target_name, amount in pairs(player_3_target) do
player_3_target_pool [#player_3_target_pool+1] = {target_name, amount}
end
table.sort (player_3_target_pool, _detalhes.Sort2)
@@ -3253,7 +3253,7 @@ function gump:CriaJanelaInfo()
--main player skills
local spells_sorted = {}
- for spellid, spelltable in _pairs(player.spells._ActorTable) do
+ for spellid, spelltable in pairs(player.spells._ActorTable) do
spells_sorted [#spells_sorted+1] = {spelltable, spelltable.total}
end
@@ -3261,7 +3261,7 @@ function gump:CriaJanelaInfo()
for petIndex, petName in ipairs(player:Pets()) do
local petActor = info.instancia.showing [player.tipo]:PegarCombatente (nil, petName)
if (petActor) then
- for _spellid, _skill in _pairs(petActor:GetActorSpells()) do
+ for _spellid, _skill in pairs(petActor:GetActorSpells()) do
spells_sorted [#spells_sorted+1] = {_skill, _skill.total, petName}
end
end
@@ -3289,14 +3289,14 @@ function gump:CriaJanelaInfo()
player_2_spells_sorted = {}
--player 2 spells
- for spellid, spelltable in _pairs(other_players [1].spells._ActorTable) do
+ for spellid, spelltable in pairs(other_players [1].spells._ActorTable) do
player_2_spells_sorted [#player_2_spells_sorted+1] = {spelltable, spelltable.total}
end
--player 2 pets
for petIndex, petName in ipairs(other_players [1]:Pets()) do
local petActor = info.instancia.showing [player.tipo]:PegarCombatente (nil, petName)
if (petActor) then
- for _spellid, _skill in _pairs(petActor:GetActorSpells()) do
+ for _spellid, _skill in pairs(petActor:GetActorSpells()) do
player_2_spells_sorted [#player_2_spells_sorted+1] = {_skill, _skill.total, petName}
end
end
@@ -3331,14 +3331,14 @@ function gump:CriaJanelaInfo()
if (other_players [2]) then
--player 3 spells
- for spellid, spelltable in _pairs(other_players [2].spells._ActorTable) do
+ for spellid, spelltable in pairs(other_players [2].spells._ActorTable) do
player_3_spells_sorted [#player_3_spells_sorted+1] = {spelltable, spelltable.total}
end
--player 3 pets
for petIndex, petName in ipairs(other_players [2]:Pets()) do
local petActor = info.instancia.showing [player.tipo]:PegarCombatente (nil, petName)
if (petActor) then
- for _spellid, _skill in _pairs(petActor:GetActorSpells()) do
+ for _spellid, _skill in pairs(petActor:GetActorSpells()) do
player_3_spells_sorted [#player_3_spells_sorted+1] = {_skill, _skill.total, petName}
end
end
@@ -3594,7 +3594,7 @@ function gump:CriaJanelaInfo()
--player 1 targets
local my_targets = self.tab.player.targets
local target_pool = {}
- for target_name, amount in _pairs(my_targets) do
+ for target_name, amount in pairs(my_targets) do
target_pool [#target_pool+1] = {target_name, amount}
end
table.sort (target_pool, _detalhes.Sort2)
@@ -3668,8 +3668,8 @@ function gump:CriaJanelaInfo()
-- player 1
local player_1_skills = {}
- for spellid, spell in _pairs(player_1.spells._ActorTable) do
- for name, amount in _pairs(spell.targets) do
+ for spellid, spell in pairs(player_1.spells._ActorTable) do
+ for name, amount in pairs(spell.targets) do
if (name == target_name) then
player_1_skills [#player_1_skills+1] = {spellid, amount}
end
@@ -3684,8 +3684,8 @@ function gump:CriaJanelaInfo()
local player_2_skills = {}
local player_2_top
if (player_2) then
- for spellid, spell in _pairs(player_2.spells._ActorTable) do
- for name, amount in _pairs(spell.targets) do
+ for spellid, spell in pairs(player_2.spells._ActorTable) do
+ for name, amount in pairs(spell.targets) do
if (name == target_name) then
player_2_skills [#player_2_skills+1] = {spellid, amount}
end
@@ -3700,8 +3700,8 @@ function gump:CriaJanelaInfo()
local player_3_skills = {}
local player_3_top
if (player_3) then
- for spellid, spell in _pairs(player_3.spells._ActorTable) do
- for name, amount in _pairs(spell.targets) do
+ for spellid, spell in pairs(player_3.spells._ActorTable) do
+ for name, amount in pairs(spell.targets) do
if (name == target_name) then
player_3_skills [#player_3_skills+1] = {spellid, amount}
end
@@ -3969,7 +3969,7 @@ function gump:CriaJanelaInfo()
else
local spellname = GetSpellInfo(spellid)
local extra_search_found
- for casted_spellid, amount in _pairs(player1_misc.spell_cast or {}) do
+ for casted_spellid, amount in pairs(player1_misc.spell_cast or {}) do
local casted_spellname = GetSpellInfo(casted_spellid)
if (casted_spellname == spellname) then
frame1.tooltip.casts_label3:SetText(amount)
@@ -4133,7 +4133,7 @@ function gump:CriaJanelaInfo()
local amt_casts = player2_misc.spell_cast and player2_misc.spell_cast [spellid]
if (not amt_casts) then
local spellname = GetSpellInfo(spellid)
- for casted_spellid, amount in _pairs(player2_misc.spell_cast or {}) do
+ for casted_spellid, amount in pairs(player2_misc.spell_cast or {}) do
local casted_spellname = GetSpellInfo(casted_spellid)
if (casted_spellname == spellname) then
amt_casts = amount
@@ -4310,7 +4310,7 @@ function gump:CriaJanelaInfo()
local amt_casts = player3_misc.spell_cast and player3_misc.spell_cast [spellid]
if (not amt_casts) then
local spellname = GetSpellInfo(spellid)
- for casted_spellid, amount in _pairs(player3_misc.spell_cast or {}) do
+ for casted_spellid, amount in pairs(player3_misc.spell_cast or {}) do
local casted_spellname = GetSpellInfo(casted_spellid)
if (casted_spellname == spellname) then
amt_casts = amount
@@ -4418,7 +4418,7 @@ function gump:CriaJanelaInfo()
bar:SetScript("OnLeave", on_leave)
end
- bar.lefttext = bar:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
+ bar.lefttext = bar:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
local _, size, flags = bar.lefttext:GetFont()
local font = SharedMedia:Fetch ("font", "Arial Narrow")
@@ -4435,7 +4435,7 @@ function gump:CriaJanelaInfo()
bar.lefttext:SetWidth(110)
end
- bar.righttext = bar:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
+ bar.righttext = bar:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
local _, size, flags = bar.righttext:GetFont()
local font = SharedMedia:Fetch ("font", "Arial Narrow")
@@ -4445,7 +4445,7 @@ function gump:CriaJanelaInfo()
bar.righttext:SetJustifyH("right")
bar.righttext:SetTextColor (1, 1, 1, 1)
- bar.righttext2 = bar:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
+ bar.righttext2 = bar:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
local _, size, flags = bar.righttext2:GetFont()
local font = SharedMedia:Fetch ("font", "Arial Narrow")
@@ -4479,67 +4479,67 @@ function gump:CriaJanelaInfo()
background:SetPoint("topleft", tooltip, "topleft", 0, 0)
background:SetPoint("bottomright", tooltip, "bottomright", 0, 0)
- tooltip.casts_label = tooltip:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ tooltip.casts_label = tooltip:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
tooltip.casts_label:SetPoint("topleft", tooltip, "topleft", x_start, -2 + (y*0))
tooltip.casts_label:SetText("Total Casts:")
tooltip.casts_label:SetJustifyH("left")
- tooltip.casts_label2 = tooltip:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ tooltip.casts_label2 = tooltip:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
tooltip.casts_label2:SetPoint("topright", tooltip, "topright", -x_start, -2 + (y*0))
tooltip.casts_label2:SetText("0")
tooltip.casts_label2:SetJustifyH("right")
- tooltip.casts_label3 = tooltip:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ tooltip.casts_label3 = tooltip:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
tooltip.casts_label3:SetPoint("topright", tooltip, "topright", -x_start - 46, -2 + (y*0))
tooltip.casts_label3:SetText("0")
tooltip.casts_label3:SetJustifyH("right")
- tooltip.hits_label = tooltip:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ tooltip.hits_label = tooltip:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
tooltip.hits_label:SetPoint("topleft", tooltip, "topleft", x_start, -14 + (y*1))
tooltip.hits_label:SetText("Total Hits:")
tooltip.hits_label:SetJustifyH("left")
- tooltip.hits_label2 = tooltip:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ tooltip.hits_label2 = tooltip:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
tooltip.hits_label2:SetPoint("topright", tooltip, "topright", -x_start, -14 + (y*1))
tooltip.hits_label2:SetText("0")
tooltip.hits_label2:SetJustifyH("right")
- tooltip.hits_label3 = tooltip:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ tooltip.hits_label3 = tooltip:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
tooltip.hits_label3:SetPoint("topright", tooltip, "topright", -x_start - 46, -14 + (y*1))
tooltip.hits_label3:SetText("0")
tooltip.hits_label3:SetJustifyH("right")
- tooltip.average_label = tooltip:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ tooltip.average_label = tooltip:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
tooltip.average_label:SetPoint("topleft", tooltip, "topleft", x_start, -26 + (y*2))
tooltip.average_label:SetText("Average:")
tooltip.average_label:SetJustifyH("left")
- tooltip.average_label2 = tooltip:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ tooltip.average_label2 = tooltip:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
tooltip.average_label2:SetPoint("topright", tooltip, "topright", -x_start, -26 + (y*2))
tooltip.average_label2:SetText("0")
tooltip.average_label2:SetJustifyH("right")
- tooltip.average_label3 = tooltip:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ tooltip.average_label3 = tooltip:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
tooltip.average_label3:SetPoint("topright", tooltip, "topright", -x_start - 46, -26 + (y*2))
tooltip.average_label3:SetText("0")
tooltip.average_label3:SetJustifyH("right")
- tooltip.crit_label = tooltip:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ tooltip.crit_label = tooltip:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
tooltip.crit_label:SetPoint("topleft", tooltip, "topleft", x_start, -38 + (y*3))
tooltip.crit_label:SetText("Critical:")
tooltip.crit_label:SetJustifyH("left")
- tooltip.crit_label2 = tooltip:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ tooltip.crit_label2 = tooltip:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
tooltip.crit_label2:SetPoint("topright", tooltip, "topright", -x_start, -38 + (y*3))
tooltip.crit_label2:SetText("0")
tooltip.crit_label2:SetJustifyH("right")
- tooltip.crit_label3 = tooltip:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ tooltip.crit_label3 = tooltip:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
tooltip.crit_label3:SetPoint("topright", tooltip, "topright", -x_start - 46, -38 + (y*3))
tooltip.crit_label3:SetText("0")
tooltip.crit_label3:SetJustifyH("right")
- tooltip.uptime_label = tooltip:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ tooltip.uptime_label = tooltip:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
tooltip.uptime_label:SetPoint("topleft", tooltip, "topleft", x_start, -50 + (y*4))
tooltip.uptime_label:SetText("Uptime:")
tooltip.uptime_label:SetJustifyH("left")
- tooltip.uptime_label2 = tooltip:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ tooltip.uptime_label2 = tooltip:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
tooltip.uptime_label2:SetPoint("topright", tooltip, "topright", -x_start, -50 + (y*4))
tooltip.uptime_label2:SetText("0")
tooltip.uptime_label2:SetJustifyH("right")
- tooltip.uptime_label3 = tooltip:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ tooltip.uptime_label3 = tooltip:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
tooltip.uptime_label3:SetPoint("topright", tooltip, "topright", -x_start - 46, -50 + (y*4))
tooltip.uptime_label3:SetText("0")
tooltip.uptime_label3:SetJustifyH("right")
@@ -4617,7 +4617,7 @@ function gump:CriaJanelaInfo()
bar:SetHeight(14)
bar.icon = spellicon
- bar.lefttext = bar:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
+ bar.lefttext = bar:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
local _, size, flags = bar.lefttext:GetFont()
local font = SharedMedia:Fetch ("font", "Arial Narrow")
bar.lefttext:SetFont (font, 11)
@@ -4633,7 +4633,7 @@ function gump:CriaJanelaInfo()
bar.lefttext:SetWidth(80)
end
- bar.righttext = bar:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
+ bar.righttext = bar:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
local _, size, flags = bar.righttext:GetFont()
local font = SharedMedia:Fetch ("font", "Arial Narrow")
bar.righttext:SetFont (font, 11)
@@ -4641,7 +4641,7 @@ function gump:CriaJanelaInfo()
bar.righttext:SetJustifyH("right")
bar.righttext:SetTextColor (1, 1, 1, 1)
- bar.righttext2 = bar:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
+ bar.righttext2 = bar:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
local _, size, flags = bar.righttext2:GetFont()
local font = SharedMedia:Fetch ("font", "Arial Narrow")
bar.righttext2:SetFont (font, 11)
@@ -4693,7 +4693,7 @@ function gump:CriaJanelaInfo()
frame1.tooltip = create_tooltip ("DetailsPlayerComparisonBox1Tooltip")
frame1.tooltip:SetWidth(spell_compare_frame_width[1])
- local playername1 = frame1:CreateFontString (nil, "overlay", "GameFontNormal")
+ local playername1 = frame1:CreateFontString(nil, "overlay", "GameFontNormal")
playername1:SetPoint("bottomleft", frame1, "topleft", 2, 0)
playername1:SetText("Player 1")
frame1.name_label = playername1
@@ -4745,17 +4745,17 @@ function gump:CriaJanelaInfo()
frame2.tooltip = create_tooltip ("DetailsPlayerComparisonBox2Tooltip")
frame2.tooltip:SetWidth(spell_compare_frame_width[2])
- local playername2 = frame2:CreateFontString (nil, "overlay", "GameFontNormal")
+ local playername2 = frame2:CreateFontString(nil, "overlay", "GameFontNormal")
playername2:SetPoint("bottomleft", frame2, "topleft", 2, 0)
playername2:SetText("Player 2")
frame2.name_label = playername2
- local playername2_percent = frame2:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ local playername2_percent = frame2:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
playername2_percent:SetPoint("bottomright", frame2, "topright", -2, 0)
playername2_percent:SetText("Player 1 %")
playername2_percent:SetTextColor (.6, .6, .6)
- local noPLayersToShow = frame2:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ local noPLayersToShow = frame2:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
noPLayersToShow:SetPoint("center")
noPLayersToShow:SetText("There's no more players to compare (with the same class/spec)")
noPLayersToShow:SetSize(spell_compare_frame_width[2] - 10, spell_compare_frame_height)
@@ -4807,19 +4807,19 @@ function gump:CriaJanelaInfo()
frame3.tooltip = create_tooltip ("DetailsPlayerComparisonBox3Tooltip")
frame3.tooltip:SetWidth(spell_compare_frame_width[3])
- local playername3 = frame3:CreateFontString (nil, "overlay", "GameFontNormal")
+ local playername3 = frame3:CreateFontString(nil, "overlay", "GameFontNormal")
playername3:SetPoint("bottomleft", frame3, "topleft", 2, 0)
playername3:SetText("Player 3")
frame3.name_label = playername3
- local playername3_percent = frame3:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ local playername3_percent = frame3:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
playername3_percent:SetPoint("bottomright", frame3, "topright", -2, 0)
playername3_percent:SetText("Player 1 %")
playername3_percent:SetTextColor (.6, .6, .6)
frame3.name_label_percent = playername3_percent
- local noPLayersToShow = frame3:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ local noPLayersToShow = frame3:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
noPLayersToShow:SetPoint("center")
noPLayersToShow:SetText("There's no more players to compare (with the same class/spec)")
noPLayersToShow:SetSize(spell_compare_frame_width[2] - 10, spell_compare_frame_height)
@@ -4877,7 +4877,7 @@ function gump:CriaJanelaInfo()
local my_spells = {}
local my_spells_total = 0
--build my spell list
- for spellid, _ in _pairs(playerObject.spells._ActorTable) do
+ for spellid, _ in pairs(playerObject.spells._ActorTable) do
my_spells [spellid] = true
my_spells_total = my_spells_total + 1
end
@@ -4894,7 +4894,7 @@ function gump:CriaJanelaInfo()
if (actor.classe == class and actor ~= playerObject) then
local same_spells = 0
- for spellid, _ in _pairs(actor.spells._ActorTable) do
+ for spellid, _ in pairs(actor.spells._ActorTable) do
if (my_spells [spellid]) then
same_spells = same_spells + 1
end
@@ -5513,7 +5513,7 @@ local row_on_mousedown = function(self, button)
return
end
- self.mouse_down = _GetTime()
+ self.mouse_down = GetTime()
local x, y = _GetCursorPosition()
self.x = _math_floor(x)
self.y = _math_floor(y)
@@ -5540,7 +5540,7 @@ local row_on_mouseup = function(self, button)
local x, y = _GetCursorPosition()
x = _math_floor(x)
y = _math_floor(y)
- if ((self.mouse_down+0.4 > _GetTime() and (x == self.x and y == self.y)) or (x == self.x and y == self.y)) then
+ if ((self.mouse_down+0.4 > GetTime() and (x == self.x and y == self.y)) or (x == self.x and y == self.y)) then
--setar os textos
if (self.isMain) then --se n�o for uma barra de alvo
@@ -5688,7 +5688,7 @@ local target_on_enter = function(self)
end
--add and sort
- for target_name, amount in _pairs(ActorTargetsContainer) do
+ for target_name, amount in pairs(ActorTargetsContainer) do
--print(target_name, amount)
ActorTargetsSortTable [#ActorTargetsSortTable+1] = {target_name, amount or 0}
total = total + (amount or 0)
diff --git a/frames/window_profiler.lua b/frames/window_profiler.lua
index aebe2e56..0dad992b 100644
--- a/frames/window_profiler.lua
+++ b/frames/window_profiler.lua
@@ -34,11 +34,11 @@ function Details:OpenProfiler()
logo:SetPoint("center", f, "center", 0, 0)
logo:SetPoint("top", f, "top", 20, 20)
- local string_profiler = f:CreateFontString (nil, "artwork", "GameFontNormal")
+ local string_profiler = f:CreateFontString(nil, "artwork", "GameFontNormal")
string_profiler:SetPoint("top", logo, "bottom", -20, 10)
string_profiler:SetText("Profiler!")
- local string_profiler = f:CreateFontString (nil, "artwork", "GameFontNormal")
+ local string_profiler = f:CreateFontString(nil, "artwork", "GameFontNormal")
string_profiler:SetPoint("topleft", f, "topleft", 10, -130)
string_profiler:SetText(L["STRING_OPTIONS_PROFILE_SELECTEXISTING"])
string_profiler:SetWidth(230)
diff --git a/frames/window_runcode.lua b/frames/window_runcode.lua
index 809c97de..3f87ef2a 100644
--- a/frames/window_runcode.lua
+++ b/frames/window_runcode.lua
@@ -81,7 +81,7 @@ function Details.OpenRunCodeWindow()
local script = code_editor:GetText()
local func, errortext = loadstring (script, "Q")
if (not func) then
- local firstLine = strsplit ("\n", script, 2)
+ local firstLine = strsplit("\n", script, 2)
errortext = errortext:gsub (firstLine, "")
errortext = errortext:gsub ("%[string \"", "")
errortext = errortext:gsub ("...\"]:", "")
diff --git a/frames/window_statistics.lua b/frames/window_statistics.lua
index 2895a726..809d70fd 100644
--- a/frames/window_statistics.lua
+++ b/frames/window_statistics.lua
@@ -189,7 +189,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild
local rotation = DF:CreateAnimation(animationHub, "ROTATION", 1, 3, -360)
rotation:SetTarget (f.SyncTextureCircle)
- f.SyncText = workingFrame:CreateFontString (nil, "border", "GameFontNormal")
+ f.SyncText = workingFrame:CreateFontString(nil, "border", "GameFontNormal")
f.SyncText:SetPoint("right", f.SyncTextureBackground, "left", 0, 0)
f.SyncText:SetText("working")
diff --git a/frames/window_switch.lua b/frames/window_switch.lua
index 83b4afd3..5b3a91d2 100644
--- a/frames/window_switch.lua
+++ b/frames/window_switch.lua
@@ -188,7 +188,7 @@ do
texture_highlight_frame.texture = button.texture
texture_highlight_frame.MainFrame = button
- button.text = button:CreateFontString (nil, "overlay", "GameFontNormal")
+ button.text = button:CreateFontString(nil, "overlay", "GameFontNormal")
button.text:SetPoint("left", button.texture, "right", 2, 0)
button.attribute = attribute
button.sub_attribute = sub_attribute
@@ -225,7 +225,7 @@ do
title_icon:SetTexture(texture)
title_icon:SetTexCoord (l, r, t, b)
title_icon:SetSize(18, 18)
- local title_str = allDisplaysFrame:CreateFontString (nil, "overlay", "GameFontNormal")
+ local title_str = allDisplaysFrame:CreateFontString(nil, "overlay", "GameFontNormal")
title_str:SetPoint("left", title_icon, "right", 2, 0)
title_str:SetText(loc_attribute_name)
@@ -266,7 +266,7 @@ do
title_icon:SetTexCoord(412/512, 441/512, 43/512, 79/512)
title_icon:SetVertexColor(.7, .6, .5, 1)
title_icon:SetSize(16, 16)
- local title_str = allDisplaysFrame:CreateFontString (nil, "overlay", "GameFontNormal")
+ local title_str = allDisplaysFrame:CreateFontString(nil, "overlay", "GameFontNormal")
title_str:SetPoint("left", title_icon, "right", 2, 0)
title_str:SetText("Scripts")
diff --git a/frames/window_wa.lua b/frames/window_wa.lua
index 3cf635bb..28638b82 100644
--- a/frames/window_wa.lua
+++ b/frames/window_wa.lua
@@ -2039,7 +2039,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr
f.Close:SetScript("OnClick", function() f:Hide() end)
--title
- f.Title = f.TitleBar:CreateFontString ("$parentTitle", "overlay", "GameFontNormal")
+ f.Title = f.TitleBar:CreateFontString("$parentTitle", "overlay", "GameFontNormal")
f.Title:SetPoint("center", f.TitleBar, "center")
f.Title:SetText("Details! Create Aura")
diff --git a/frames/window_welcome.lua b/frames/window_welcome.lua
index 5dce3e39..1d7eaf5b 100644
--- a/frames/window_welcome.lua
+++ b/frames/window_welcome.lua
@@ -65,7 +65,7 @@ function _detalhes:OpenWelcomeWindow()
cancel:GetNormalTexture():SetDesaturated(true)
cancel:Disable()
- local cancelText = cancel:CreateFontString (nil, "overlay", "GameFontNormal")
+ local cancelText = cancel:CreateFontString(nil, "overlay", "GameFontNormal")
cancelText:SetTextColor (1, 1, 1)
cancelText:SetPoint("left", cancel, "right", 2, 0)
cancelText:SetText(Loc ["STRING_WELCOME_69"])
@@ -243,7 +243,7 @@ local window_openned_at = time()
angel:SetHeight(256)
angel:SetAlpha(.2)
- local texto1 = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ local texto1 = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto1:SetPoint("topleft", window, "topleft", 13, -220)
texto1:SetText(Loc ["STRING_WELCOME_1"])
texto1:SetJustifyH("left")
@@ -265,11 +265,11 @@ local window_openned_at = time()
bg55:SetAlpha(.05)
bg55:SetTexCoord (1, 0, 0, 1)
- local texto55 = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ local texto55 = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto55:SetPoint("topleft", window, "topleft", 20, -80)
texto55:SetText(Loc ["STRING_WELCOME_42"])
- local texto555 = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ local texto555 = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto555:SetText(Loc ["STRING_WELCOME_45"])
texto555:SetTextColor (1, 1, 1, 1)
@@ -278,7 +278,7 @@ local window_openned_at = time()
window.changemind55Label:SetPoint("bottom", window, "bottom", 0, 19)
window.changemind55Label.align = "|"
- local texto_appearance = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ local texto_appearance = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto_appearance:SetPoint("topleft", window, "topleft", 30, -110)
texto_appearance:SetText(Loc ["STRING_WELCOME_43"])
texto_appearance:SetWidth(460)
@@ -329,7 +329,7 @@ local window_openned_at = time()
--alphabet selection
- local texto_alphabet = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ local texto_alphabet = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto_alphabet:SetPoint("topleft", window, "topleft", 30, -110)
texto_alphabet:SetText(Loc ["STRING_WELCOME_73"]) --"Select the Alphabet or Region:"
texto_alphabet:SetJustifyH("left")
@@ -704,7 +704,7 @@ local window_openned_at = time()
window.changemindNumeralLabel:SetPoint("bottom", window, "bottom", 0, 19)
window.changemindNumeralLabel.align = "|"
- local texto2Numeral = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ local texto2Numeral = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto2Numeral:SetPoint("topleft", window, "topleft", 20, -80)
texto2Numeral:SetText(Loc ["STRING_NUMERALSYSTEM_DESC"] .. ":")
@@ -757,7 +757,7 @@ local window_openned_at = time()
thedude2:SetTexCoord (0, 1, 0, 1)
thedude2:SetDrawLayer ("overlay", 3)
- local NumeralType1_text = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ local NumeralType1_text = window:CreateFontString(nil, "overlay", "GameFontNormal")
NumeralType1_text:SetText("1K = 1.000 |cFFFFCC00| |r10K = 10.000 |cFFFFCC00| |r100K = 100.000 |cFFFFCC00| |r1M = 1.000.000")
NumeralType1_text:SetWidth(500)
NumeralType1_text:SetHeight(40)
@@ -766,7 +766,7 @@ local window_openned_at = time()
NumeralType1_text:SetTextColor (.8, .8, .8, 1)
NumeralType1_text:SetPoint("topleft", window, "topleft", 40, -150)
- local NumeralType2_text = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ local NumeralType2_text = window:CreateFontString(nil, "overlay", "GameFontNormal")
local asian1K, asian10K, asian1B = _detalhes.gump:GetAsianNumberSymbols()
@@ -823,7 +823,7 @@ local window_openned_at = time()
window.changemind2Label:SetPoint("bottom", window, "bottom", 0, 19)
window.changemind2Label.align = "|"
- local texto2 = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ local texto2 = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto2:SetPoint("topleft", window, "topleft", 20, -80)
texto2:SetText(Loc ["STRING_WELCOME_3"])
@@ -876,7 +876,7 @@ local window_openned_at = time()
thedude:SetTexCoord (0, 1, 0, 1)
thedude:SetDrawLayer ("overlay", 3)
- local chronometer_text = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ local chronometer_text = window:CreateFontString(nil, "overlay", "GameFontNormal")
chronometer_text:SetText(Loc ["STRING_WELCOME_6"])
chronometer_text:SetWidth(360)
chronometer_text:SetHeight(40)
@@ -885,7 +885,7 @@ local window_openned_at = time()
chronometer_text:SetTextColor (.8, .8, .8, 1)
chronometer_text:SetPoint("topleft", window.ChronometerLabel.widget, "topright", 20, 0)
- local continuous_text = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ local continuous_text = window:CreateFontString(nil, "overlay", "GameFontNormal")
continuous_text:SetText(Loc ["STRING_WELCOME_7"])
continuous_text:SetWidth(340)
continuous_text:SetHeight(40)
@@ -902,7 +902,7 @@ local window_openned_at = time()
continuous:SetValue(true)
end
- local pleasewait = window:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ local pleasewait = window:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
pleasewait:SetPoint("bottomright", forward, "topright")
local free_frame3 = CreateFrame("frame", nil, window)
@@ -963,11 +963,11 @@ local window_openned_at = time()
window.changemind4Label:SetPoint("bottom", window, "bottom", 0, 19)
window.changemind4Label.align = "|"
- local texto4 = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ local texto4 = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto4:SetPoint("topleft", window, "topleft", 20, -80)
texto4:SetText(Loc ["STRING_WELCOME_41"])
- local interval_text = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ local interval_text = window:CreateFontString(nil, "overlay", "GameFontNormal")
interval_text:SetText(Loc ["STRING_WELCOME_12"])
interval_text:SetWidth(460)
interval_text:SetHeight(40)
@@ -976,7 +976,7 @@ local window_openned_at = time()
interval_text:SetTextColor (1, 1, 1, .9)
interval_text:SetPoint("topleft", window, "topleft", 30, -110)
- local dance_text = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ local dance_text = window:CreateFontString(nil, "overlay", "GameFontNormal")
dance_text:SetText("") --loc removed
dance_text:SetWidth(460)
dance_text:SetHeight(40)
@@ -1125,11 +1125,11 @@ local window_openned_at = time()
bg6:SetAlpha(.1)
bg6:SetTexCoord (1, 0, 0, 1)
- local texto5 = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ local texto5 = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto5:SetPoint("topleft", window, "topleft", 20, -80)
texto5:SetText(Loc ["STRING_WELCOME_26"])
- local texto_stretch = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ local texto_stretch = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto_stretch:SetPoint("topleft", window, "topleft", 181, -105)
texto_stretch:SetText(Loc ["STRING_WELCOME_27"])
texto_stretch:SetWidth(310)
@@ -1183,11 +1183,11 @@ local window_openned_at = time()
bg6:SetAlpha(.1)
bg6:SetTexCoord (1, 0, 0, 1)
- local texto6 = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ local texto6 = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto6:SetPoint("topleft", window, "topleft", 20, -80)
texto6:SetText(Loc ["STRING_WELCOME_28"])
- local texto_instance_button = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ local texto_instance_button = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto_instance_button:SetPoint("topleft", window, "topleft", 25, -105)
texto_instance_button:SetText(Loc ["STRING_WELCOME_29"])
texto_instance_button:SetWidth(270)
@@ -1239,11 +1239,11 @@ local window_openned_at = time()
bg7:SetAlpha(.1)
bg7:SetTexCoord (1, 0, 0, 1)
- local texto7 = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ local texto7 = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto7:SetPoint("topleft", window, "topleft", 20, -80)
texto7:SetText(Loc ["STRING_WELCOME_30"])
- local texto_shortcut = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ local texto_shortcut = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto_shortcut:SetPoint("topleft", window, "topleft", 25, -105)
texto_shortcut:SetText(Loc ["STRING_WELCOME_31"])
texto_shortcut:SetWidth(290)
@@ -1274,7 +1274,7 @@ local window_openned_at = time()
local desc_anchor_bottomleft = _detalhes.gump:NewImage (bookmark_frame, [[Interface\AddOns\Details\images\options_window]], 75, 106, "artwork", {0.2724609375, 0.19921875, 0.783203125, 0.6796875}, "descAnchorTopLeftImage", "$parentDescAnchorTopLeftImage") --204 696 279 802
desc_anchor_bottomleft:SetPoint("bottomright", bookmark_frame, "bottomright", 5, -5)
- local bmf_string = bookmark_frame:CreateFontString ("overlay", nil, "GameFontNormal")
+ local bmf_string = bookmark_frame:CreateFontString("overlay", nil, "GameFontNormal")
bmf_string:SetPoint("center", bookmark_frame, "center")
bmf_string:SetText(Loc ["STRING_WELCOME_65"])
@@ -1308,11 +1308,11 @@ local window_openned_at = time()
bg77:SetAlpha(.1)
bg77:SetTexCoord (1, 0, 0, 1)
- local texto77 = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ local texto77 = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto77:SetPoint("topleft", window, "topleft", 20, -80)
texto77:SetText(Loc ["STRING_WELCOME_32"])
- local texto_snap = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ local texto_snap = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto_snap:SetPoint("topleft", window, "topleft", 25, -101)
texto_snap:SetText(Loc ["STRING_WELCOME_66"])
texto_snap:SetWidth(160)
@@ -1354,11 +1354,11 @@ local window_openned_at = time()
bg88:SetAlpha(.1)
bg88:SetTexCoord (1, 0, 0, 1)
- local texto88 = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ local texto88 = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto88:SetPoint("topleft", window, "topleft", 20, -80)
texto88:SetText(Loc ["STRING_WELCOME_34"])
- local texto_micro_display = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ local texto_micro_display = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto_micro_display:SetPoint("topleft", window, "topleft", 25, -101)
texto_micro_display:SetText(Loc ["STRING_WELCOME_67"])
texto_micro_display:SetWidth(300)
@@ -1477,11 +1477,11 @@ local window_openned_at = time()
bg11:SetAlpha(.1)
bg11:SetTexCoord (1, 0, 0, 1)
- local texto11 = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ local texto11 = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto11:SetPoint("topleft", window, "topleft", 20, -80)
texto11:SetText(Loc ["STRING_WELCOME_36"])
- local texto_plugins = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ local texto_plugins = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto_plugins:SetPoint("topleft", window, "topleft", 25, -101)
texto_plugins:SetText(Loc ["STRING_WELCOME_68"])
texto_plugins:SetWidth(220)
@@ -1516,11 +1516,11 @@ local window_openned_at = time()
bg8:SetAlpha(.1)
bg8:SetTexCoord (1, 0, 0, 1)
- local texto8 = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ local texto8 = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto8:SetPoint("topleft", window, "topleft", 20, -80)
texto8:SetText(Loc ["STRING_WELCOME_38"])
- local texto = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ local texto = window:CreateFontString(nil, "overlay", "GameFontNormal")
texto:SetPoint("topleft", window, "topleft", 25, -110)
texto:SetText(Loc ["STRING_WELCOME_39"])
texto:SetWidth(410)
diff --git a/functions/buff.lua b/functions/buff.lua
index 527d6ade..d0d24ff5 100644
--- a/functions/buff.lua
+++ b/functions/buff.lua
@@ -20,7 +20,7 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--local pointers
- local _pairs = pairs --lua local
+ local pairs = pairs --lua local
local ipairs = ipairs --lua local
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -29,14 +29,14 @@
--return if the buff is already registred or not
function _detalhes.Buffs:IsRegistred (buff)
if (type(buff) == "number") then
- for _, buffObject in _pairs(_detalhes.Buffs.BuffsTable) do
+ for _, buffObject in pairs(_detalhes.Buffs.BuffsTable) do
if (buffObject.id == buff) then
return true
end
end
return false
elseif (type(buff) == "string") then
- for name, _ in _pairs(_detalhes.Buffs.BuffsTable) do
+ for name, _ in pairs(_detalhes.Buffs.BuffsTable) do
if (name == buff) then
return true
end
@@ -70,7 +70,7 @@
--return a list of registred buffs
function _detalhes.Buffs:GetBuffList()
local list = {}
- for name, _ in _pairs(_detalhes.Buffs.BuffsTable) do
+ for name, _ in pairs(_detalhes.Buffs.BuffsTable) do
list [#list+1] = name
end
return list
@@ -79,7 +79,7 @@
--return a list of registred buffs ids
function _detalhes.Buffs:GetBuffListIds()
local list = {}
- for name, buffObject in _pairs(_detalhes.Buffs.BuffsTable) do
+ for name, buffObject in pairs(_detalhes.Buffs.BuffsTable) do
list [#list+1] = buffObject.id
end
return list
@@ -153,7 +153,7 @@
_detalhes.Buffs:BuildTables()
end
- for _, BuffTable in _pairs(_detalhes.Buffs.BuffsTable) do
+ for _, BuffTable in pairs(_detalhes.Buffs.BuffsTable) do
if (BuffTable.active) then
BuffTable.start = _detalhes._tempo
BuffTable.castedAmt = 1
@@ -180,7 +180,7 @@
end
--[[
- for index, BuffName in _pairs(_detalhes.SoloTables.BuffsTableNameCache) do
+ for index, BuffName in pairs(_detalhes.SoloTables.BuffsTableNameCache) do
if (BuffName == name) then
local BuffObject = _detalhes.SoloTables.SoloBuffUptime [name]
if (not BuffObject) then
diff --git a/functions/deathmenu.lua b/functions/deathmenu.lua
index 6bab9225..5dee383e 100644
--- a/functions/deathmenu.lua
+++ b/functions/deathmenu.lua
@@ -238,7 +238,7 @@ function detailsOnDeathMenu.CanShowPanel()
if (isInInstance) then
--check if all players in the raid are out of combat
for i = 1, GetNumGroupMembers() do
- if (UnitAffectingCombat ("raid" .. i)) then
+ if (UnitAffectingCombat("raid" .. i)) then
C_Timer.After(0.5, detailsOnDeathMenu.ShowPanel)
return false
end
diff --git a/functions/deathrecap.lua b/functions/deathrecap.lua
index 212279b4..ac1ea80d 100644
--- a/functions/deathrecap.lua
+++ b/functions/deathrecap.lua
@@ -38,16 +38,16 @@ local create_deathrecap_line = function(parent, n)
line:SetSize(300, 21)
- local timeAt = line:CreateFontString (nil, "overlay", "GameFontNormal")
+ local timeAt = line:CreateFontString(nil, "overlay", "GameFontNormal")
local backgroundTexture = line:CreateTexture(nil, "border")
local backgroundTextureOverlay = line:CreateTexture(nil, "artwork")
local spellIcon = line:CreateTexture(nil, "overlay")
local spellIconBorder = line:CreateTexture(nil, "overlay")
spellIcon:SetDrawLayer ("overlay", 1)
spellIconBorder:SetDrawLayer ("overlay", 2)
- local sourceName = line:CreateFontString (nil, "overlay", "GameFontNormal")
- local amount = line:CreateFontString (nil, "overlay", "GameFontNormal")
- local lifePercent = line:CreateFontString (nil, "overlay", "GameFontNormal")
+ local sourceName = line:CreateFontString(nil, "overlay", "GameFontNormal")
+ local amount = line:CreateFontString(nil, "overlay", "GameFontNormal")
+ local lifePercent = line:CreateFontString(nil, "overlay", "GameFontNormal")
local lifeStatusBar = line:CreateTexture(nil, "border", nil, -3)
--grave icon
@@ -274,7 +274,7 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
segmentButton:SetSize(16, 20)
segmentButton:SetPoint("topright", DeathRecapFrame, "topright", (-abs(i-6) * 22) - 10, -5)
- local text = segmentButton:CreateFontString (nil, "overlay", "GameFontNormal")
+ local text = segmentButton:CreateFontString(nil, "overlay", "GameFontNormal")
segmentButton.text = text
text:SetText("#" .. i)
text:SetPoint("center")
diff --git a/functions/mythicdungeon.lua b/functions/mythicdungeon.lua
index 06791d6b..77a10b46 100644
--- a/functions/mythicdungeon.lua
+++ b/functions/mythicdungeon.lua
@@ -434,7 +434,7 @@ function DetailsMythicPlusFrame.BossDefeated (this_is_end_end, encounterID, enco
DetailsMythicPlusFrame.TrashMergeScheduled = segmentsToMerge
--there's no more script run too long
- --if (not InCombatLockdown() and not UnitAffectingCombat ("player")) then
+ --if (not InCombatLockdown() and not UnitAffectingCombat("player")) then
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print("Details!", "BossDefeated() > not in combat, merging trash now")
end
@@ -560,7 +560,7 @@ function DetailsMythicPlusFrame.MythicDungeonFinished (fromZoneLeft)
DetailsMythicPlusFrame.TrashMergeScheduled2_OverallCombat = latestTrashOverall
--there's no more script ran too long
- --if (not InCombatLockdown() and not UnitAffectingCombat ("player")) then
+ --if (not InCombatLockdown() and not UnitAffectingCombat("player")) then
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print("Details!", "MythicDungeonFinished() > not in combat, merging last pack of trash now")
end
@@ -577,7 +577,7 @@ function DetailsMythicPlusFrame.MythicDungeonFinished (fromZoneLeft)
--merge segments
if (_detalhes.mythic_plus.make_overall_when_done and not Details.MythicPlus.IsRestoredState and not fromZoneLeft) then
- --if (not InCombatLockdown() and not UnitAffectingCombat ("player")) then
+ --if (not InCombatLockdown() and not UnitAffectingCombat("player")) then
if (DetailsMythicPlusFrame.DevelopmentDebug) then
print("Details!", "MythicDungeonFinished() > not in combat, creating overall segment now")
end
diff --git a/functions/playerclass.lua b/functions/playerclass.lua
index 6e1f2550..f1a1ce6b 100644
--- a/functions/playerclass.lua
+++ b/functions/playerclass.lua
@@ -4,10 +4,10 @@ do
local _detalhes = _G._detalhes
local _
- local _pairs = pairs
+ local pairs = pairs
local ipairs = ipairs
local _UnitClass = UnitClass
- local _select = select
+ local select = select
local _unpack = unpack
local openRaidLib = LibStub:GetLibrary("LibOpenRaid-1.0", true)
@@ -172,7 +172,7 @@ do
end
if (Actor.spells) then --correcao pros containers misc, precisa pegar os diferentes tipos de containers de l�
- for spellid, _ in _pairs(Actor.spells._ActorTable) do
+ for spellid, _ in pairs(Actor.spells._ActorTable) do
local class = _detalhes.ClassSpellList [spellid]
if (class) then
Actor.classe = class
@@ -322,7 +322,7 @@ do
end
else
if (Actor.spells) then
- for spellid, _ in _pairs(Actor.spells._ActorTable) do
+ for spellid, _ in pairs(Actor.spells._ActorTable) do
local spec = SpecSpellList [spellid]
if (spec) then
if (spec ~= Actor.spec) then
@@ -356,7 +356,7 @@ do
local misc_actor = container_misc._ActorTable [index]
local buffs = misc_actor.buff_uptime_spells and misc_actor.buff_uptime_spells._ActorTable
if (buffs) then
- for spellid, spell in _pairs(buffs) do
+ for spellid, spell in pairs(buffs) do
local spec = SpecSpellList [spellid]
if (spec) then
if (spec ~= Actor.spec) then
@@ -453,7 +453,7 @@ do
end
else
if (Actor.spells) then --correcao pros containers misc, precisa pegar os diferentes tipos de containers de l�
- for spellid, _ in _pairs(Actor.spells._ActorTable) do
+ for spellid, _ in pairs(Actor.spells._ActorTable) do
local spec = SpecSpellList [spellid]
if (spec) then
_detalhes.cached_specs [Actor.serial] = spec
@@ -481,7 +481,7 @@ do
else
if (Actor.spells) then --correcao pros containers misc, precisa pegar os diferentes tipos de containers de l�
- for spellid, _ in _pairs(Actor.spells._ActorTable) do
+ for spellid, _ in pairs(Actor.spells._ActorTable) do
local spec = SpecSpellList [spellid]
if (spec) then
_detalhes.cached_specs [Actor.serial] = spec
@@ -514,7 +514,7 @@ do
local misc_actor = container_misc._ActorTable [index]
local buffs = misc_actor.buff_uptime_spells and misc_actor.buff_uptime_spells._ActorTable
if (buffs) then
- for spellid, spell in _pairs(buffs) do
+ for spellid, spell in pairs(buffs) do
local spec = SpecSpellList [spellid]
if (spec) then
diff --git a/functions/profiles.lua b/functions/profiles.lua
index ef99a501..91a1decc 100644
--- a/functions/profiles.lua
+++ b/functions/profiles.lua
@@ -194,7 +194,7 @@ function _detalhes:CreatePanicWarning()
_detalhes.instance_load_failed = CreateFrame("frame", "DetailsPanicWarningFrame", UIParent,"BackdropTemplate")
_detalhes.instance_load_failed:SetHeight(80)
--tinsert(UISpecialFrames, "DetailsPanicWarningFrame")
- _detalhes.instance_load_failed.text = _detalhes.instance_load_failed:CreateFontString (nil, "overlay", "GameFontNormal")
+ _detalhes.instance_load_failed.text = _detalhes.instance_load_failed:CreateFontString(nil, "overlay", "GameFontNormal")
_detalhes.instance_load_failed.text:SetPoint("center", _detalhes.instance_load_failed, "center")
_detalhes.instance_load_failed.text:SetTextColor (1, 0.6, 0)
_detalhes.instance_load_failed:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
@@ -247,7 +247,7 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
--the key exist and is a table, check for missing values on sub tables
elseif (type(value) == "table") then
--deploy only copy non existing data
- _detalhes.table.deploy (profile [key], value)
+ _detalhes.table.deploy(profile [key], value)
end
end
@@ -740,7 +740,7 @@ local default_profile = {
0.125, -- [4]
},
},
-
+
class_colors = {
["DEMONHUNTER"] = {
0.64,
@@ -846,9 +846,12 @@ local default_profile = {
},
["EVOKER"] = {
- 0.31764705882353, -- [1]
- 0.24313725490196, -- [2]
- 0.91372549019608, -- [3]
+ --0.31764705882353, -- [1]
+ --0.24313725490196, -- [2]
+ --0.91372549019608, -- [3]
+ 0.2000,
+ 0.4980,
+ 0.5764,
},
},
diff --git a/functions/slash.lua b/functions/slash.lua
index 42d95115..b921c388 100644
--- a/functions/slash.lua
+++ b/functions/slash.lua
@@ -578,7 +578,7 @@ function SlashCmdList.DETAILS (msg, editbox)
row:SetWidth(200)
row:SetHeight(20)
row:SetBackdrop({bgFile = "Interface\\AddOns\\Details\\images\\background", tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}})
- local t = row:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ local t = row:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
t:SetPoint("left", row, "left")
row.text = t
rows [#rows+1] = row
@@ -1944,7 +1944,7 @@ function _detalhes:CreateListPanel()
function _detalhes.ListPanel:add (text, index, filter)
local row = _detalhes.ListPanel.barras [index]
if (not row) then
- row = {text = _detalhes.ListPanel.container:CreateFontString (nil, "overlay", "GameFontNormal")}
+ row = {text = _detalhes.ListPanel.container:CreateFontString(nil, "overlay", "GameFontNormal")}
_detalhes.ListPanel.barras [index] = row
row.text:SetPoint("topleft", _detalhes.ListPanel.container, "topleft", 0, -index * 15)
end
diff --git a/functions/spellcache.lua b/functions/spellcache.lua
index 55c22759..a1cded6d 100644
--- a/functions/spellcache.lua
+++ b/functions/spellcache.lua
@@ -317,7 +317,7 @@ do
load_frame = CreateFrame("frame", "DetailsLoadSpellCache", UIParent)
load_frame:SetFrameStrata("DIALOG")
- local progress_label = load_frame:CreateFontString ("DetailsLoadSpellCacheProgress", "overlay", "GameFontHighlightSmall")
+ local progress_label = load_frame:CreateFontString("DetailsLoadSpellCacheProgress", "overlay", "GameFontHighlightSmall")
progress_label:SetText("Loading Spells: 0%")
function _detalhes:BuildSpellListSlowTick()
progress_label:SetText("Loading Spells: " .. load_frame:GetProgress() .. "%")
diff --git a/plugins/Details_EncounterDetails/Details_EncounterDetails.lua b/plugins/Details_EncounterDetails/Details_EncounterDetails.lua
index 4b3b8cc6..23321c75 100644
--- a/plugins/Details_EncounterDetails/Details_EncounterDetails.lua
+++ b/plugins/Details_EncounterDetails/Details_EncounterDetails.lua
@@ -11,14 +11,14 @@ local function DebugMessage (...)
end
--Needed locals
-local _GetTime = GetTime --wow api local
+local GetTime = GetTime --wow api local
local _UFC = UnitAffectingCombat --wow api local
-local _IsInRaid = IsInRaid --wow api local
-local _IsInGroup = IsInGroup --wow api local
+local IsInRaid = IsInRaid --wow api local
+local IsInGroup = IsInGroup --wow api local
local _UnitAura = UnitAura --wow api local
local _GetSpellInfo = _detalhes.getspellinfo --wow api local
local _CreateFrame = CreateFrame --wow api local
-local _GetTime = GetTime --wow api local
+local GetTime = GetTime --wow api local
local _GetCursorPosition = GetCursorPosition --wow api local
local _GameTooltip = GameTooltip --wow api local
@@ -27,9 +27,9 @@ local GameCooltip = GameCooltip2
local _math_floor = math.floor --lua library local
local _cstr = string.format --lua library local
local ipairs = ipairs --lua library local
-local _pairs = pairs --lua library local
+local pairs = pairs --lua library local
local _table_sort = table.sort --lua library local
-local _table_insert = table.insert --lua library local
+local tinsert = table.insert --lua library local
local _unpack = unpack --lua library local
local _bit_band = bit.band
@@ -752,7 +752,7 @@ local function DispellInfo (dispell, barra)
local jogadores = dispell [1] --[nome od jogador] = total
local tabela_jogadores = {}
- for nome, tabela in _pairs(jogadores) do --tabela = [1] total tomado [2] classe
+ for nome, tabela in pairs(jogadores) do --tabela = [1] total tomado [2] classe
tabela_jogadores [#tabela_jogadores + 1] = {nome, tabela [1], tabela [2]}
end
@@ -792,7 +792,7 @@ local function KickBy (magia, barra)
local jogadores = magia [1] --[nome od jogador] = total
local tabela_jogadores = {}
- for nome, tabela in _pairs(jogadores) do --tabela = [1] total tomado [2] classe
+ for nome, tabela in pairs(jogadores) do --tabela = [1] total tomado [2] classe
tabela_jogadores [#tabela_jogadores + 1] = {nome, tabela [1], tabela [2]}
end
@@ -840,7 +840,7 @@ local function EnemySkills (habilidade, barra)
local tabela_jogadores = {}
local total = 0
- for nome, tabela in _pairs(jogadores) do --tabela = [1] total tomado [2] classe
+ for nome, tabela in pairs(jogadores) do --tabela = [1] total tomado [2] classe
tabela_jogadores [#tabela_jogadores + 1] = {nome, tabela[1], tabela[2]}
total = total + tabela[1]
end
@@ -900,13 +900,13 @@ local function DamageTakenDetails (jogador, barra)
local meus_agressores = {}
- for nome, _ in _pairs(agressores) do --agressores seria a lista de nomes
+ for nome, _ in pairs(agressores) do --agressores seria a lista de nomes
local este_agressor = showing._ActorTable[showing._NameIndexTable[nome]]
if (este_agressor) then --checagem por causa do total e do garbage collector que n�o limpa os nomes que deram dano
local habilidades = este_agressor.spells._ActorTable
- for id, habilidade in _pairs(habilidades) do
+ for id, habilidade in pairs(habilidades) do
local alvos = habilidade.targets
- for target_name, amount in _pairs(alvos) do
+ for target_name, amount in pairs(alvos) do
if (target_name == jogador.nome) then
meus_agressores [#meus_agressores+1] = {id, amount, este_agressor.nome}
end
@@ -1021,7 +1021,7 @@ function EncounterDetails:SetRowScripts (barra, index, container)
return
end
- self.mouse_down = _GetTime()
+ self.mouse_down = GetTime()
local x, y = _GetCursorPosition()
self.x = _math_floor(x)
self.y = _math_floor(y)
@@ -1047,7 +1047,7 @@ function EncounterDetails:SetRowScripts (barra, index, container)
x = _math_floor(x)
y = _math_floor(y)
- if ((self.mouse_down+0.4 > _GetTime() and (x == self.x and y == self.y)) or (x == self.x and y == self.y)) then
+ if ((self.mouse_down+0.4 > GetTime() and (x == self.x and y == self.y)) or (x == self.x and y == self.y)) then
_detalhes:BossInfoRowClick (self)
end
end)
@@ -1382,7 +1382,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
local habilidades_usadas = {}
local have_pool = false
- for spellid, _ in _pairs(habilidades_poll) do
+ for spellid, _ in pairs(habilidades_poll) do
have_pool = true
break
end
@@ -1399,7 +1399,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
local habilidades = jogador.spells._ActorTable
- for id, habilidade in _pairs(habilidades) do
+ for id, habilidade in pairs(habilidades) do
--if (habilidades_poll [id]) then
--esse jogador usou uma habilidade do boss
local esta_habilidade = habilidades_usadas [id] --tabela n�o numerica, pq diferentes monstros podem castar a mesma magia
@@ -1420,7 +1420,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
--pega os alvos e adiciona ao [2]
local alvos = habilidade.targets
- for target_name, amount in _pairs(alvos) do
+ for target_name, amount in pairs(alvos) do
--ele tem o nome do jogador, vamos ver se este alvo � realmente um jogador verificando na tabela do combate
local tabela_dano_do_jogador = DamageContainer._ActorTable [DamageContainer._NameIndexTable [target_name]]
@@ -1438,7 +1438,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
--check if the spell id is in the spell poll.
local habilidades = jogador.spells._ActorTable
- for id, habilidade in _pairs(habilidades) do
+ for id, habilidade in pairs(habilidades) do
if (habilidades_poll [id]) then
--esse jogador usou uma habilidade do boss
local esta_habilidade = habilidades_usadas [id] --tabela n�o numerica, pq diferentes monstros podem castar a mesma magia
@@ -1459,7 +1459,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
--pega os alvos e adiciona ao [2]
local alvos = habilidade.targets
- for target_name, amount in _pairs(alvos) do
+ for target_name, amount in pairs(alvos) do
--ele tem o nome do jogador, vamos ver se este alvo � realmente um jogador verificando na tabela do combate
local tabela_dano_do_jogador = DamageContainer._ActorTable [DamageContainer._NameIndexTable [target_name]]
@@ -1479,7 +1479,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
local tabela_em_ordem = {}
local jaFoi = {}
- for id, tabela in _pairs(habilidades_usadas) do
+ for id, tabela in pairs(habilidades_usadas) do
local spellname = Details.GetSpellInfo(tabela [4])
if (not jaFoi [spellname]) then
@@ -1608,7 +1608,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
tabela.total = jogador.total
--em quem ele deu dano
- for target_name, amount in _pairs(jogador.targets) do
+ for target_name, amount in pairs(jogador.targets) do
local este_jogador = _combat_object (1, target_name)
if (este_jogador) then
if (este_jogador.classe ~= "PET" and este_jogador.classe ~= "UNGROUPPLAYER" and este_jogador.classe ~= "UNKNOW") then
@@ -1620,11 +1620,11 @@ function EncounterDetails:OpenAndRefresh (_, segment)
_table_sort (tabela.dano_em, _detalhes.Sort2)
--quem deu dano nele
- for agressor, _ in _pairs(jogador.damage_from) do
+ for agressor, _ in pairs(jogador.damage_from) do
--local este_jogador = DamageContainer._ActorTable [DamageContainer._NameIndexTable [agressor]]
local este_jogador = _combat_object (1, agressor)
if (este_jogador and este_jogador:IsPlayer()) then
- for target_name, amount in _pairs(este_jogador.targets) do
+ for target_name, amount in pairs(este_jogador.targets) do
if (target_name == nome) then
tabela.damage_from [#tabela.damage_from+1] = {agressor, amount, este_jogador.classe}
tabela.damage_from_total = tabela.damage_from_total + amount
@@ -1661,7 +1661,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
local topDamage = dano_em[1] and dano_em[1][2]
local dano_em_total = tabela.dano_em_total
- for _, esta_tabela in _pairs(dano_em) do
+ for _, esta_tabela in pairs(dano_em) do
local coords = EncounterDetails.class_coords [esta_tabela[3]]
GameCooltip:AddLine(EncounterDetails:GetOnlyName(esta_tabela[1]), _detalhes:ToK (esta_tabela[2]).." (".. _cstr ("%.1f", esta_tabela[2]/dano_em_total*100) .."%)", 1, "white", "orange")
@@ -1708,7 +1708,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
local damage_from_total = tabela.damage_from_total
local topDamage = damage_from[1] and damage_from[1][2]
- for _, esta_tabela in _pairs(damage_from) do
+ for _, esta_tabela in pairs(damage_from) do
local coords = EncounterDetails.class_coords [esta_tabela[3]]
if (coords) then
@@ -1866,7 +1866,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
local oque_interrompi = jogador.interrompeu_oque
--vai ter [spellid] = quantidade
- for spellid, amt in _pairs(oque_interrompi) do
+ for spellid, amt in pairs(oque_interrompi) do
if (not habilidades_interrompidas [spellid]) then --se a spell n�o tiver na pool, cria a tabela dela
habilidades_interrompidas [spellid] = {{}, 0, spellid} --tabela com quem interrompeu e o total de vezes que a habilidade foi interrompida
end
@@ -1884,7 +1884,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
--por em ordem
tabela_em_ordem = {}
- for spellid, tabela in _pairs(habilidades_interrompidas) do
+ for spellid, tabela in pairs(habilidades_interrompidas) do
tabela_em_ordem [#tabela_em_ordem+1] = tabela
end
_table_sort (tabela_em_ordem, _detalhes.Sort2)
@@ -1978,7 +1978,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
--print("dispell: " .. jogador.classe .. " nome: " .. jogador.nome)
- for spellid, amt in _pairs(oque_dispelei) do
+ for spellid, amt in pairs(oque_dispelei) do
if (not habilidades_dispeladas [spellid]) then --se a spell n�o tiver na pool, cria a tabela dela
habilidades_dispeladas [spellid] = {{}, 0, spellid} --tabela com quem dispolou e o total de vezes que a habilidade foi dispelada
end
@@ -1998,7 +1998,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
--por em ordem
tabela_em_ordem = {}
- for spellid, tabela in _pairs(habilidades_dispeladas) do
+ for spellid, tabela in pairs(habilidades_dispeladas) do
tabela_em_ordem [#tabela_em_ordem+1] = tabela
end
_table_sort (tabela_em_ordem, _detalhes.Sort2)
@@ -2066,7 +2066,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
local habilidades_info = boss_info and boss_info.spell_mechanics or {} --barra.extra pega esse cara aqui --ent�o esse erro � das habilidades que n�o tao
for index, tabela in ipairs(mortes) do
- --{esta_morte, time, este_jogador.nome, este_jogador.classe, _UnitHealthMax (alvo_name), minutos.."m "..segundos.."s", ["dead"] = true}
+ --{esta_morte, time, este_jogador.nome, este_jogador.classe, UnitHealthMax (alvo_name), minutos.."m "..segundos.."s", ["dead"] = true}
local barra = container.barras [index]
if (not barra) then
barra = EncounterDetails:CreateRow (index, container, 3, 0, 1)
diff --git a/plugins/Details_EncounterDetails/frames.lua b/plugins/Details_EncounterDetails/frames.lua
index d15938b1..2124a65c 100644
--- a/plugins/Details_EncounterDetails/frames.lua
+++ b/plugins/Details_EncounterDetails/frames.lua
@@ -189,12 +189,12 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
row.textura:SetStatusBarColor (.5, .5, .5, 0)
row.textura:SetMinMaxValues(0,100)
- row.lineText1 = row.textura:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
+ row.lineText1 = row.textura:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
row.lineText1:SetPoint("LEFT", row.textura, "LEFT", 22, -1)
row.lineText1:SetJustifyH("LEFT")
row.lineText1:SetTextColor (1,1,1,1)
- row.lineText4 = row.textura:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
+ row.lineText4 = row.textura:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
row.lineText4:SetPoint("RIGHT", row.textura, "RIGHT", -2, 0)
row.lineText4:SetJustifyH("RIGHT")
row.lineText4:SetTextColor (1,1,1,1)
@@ -994,7 +994,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
texture:SetHeight(9)
texture:SetPoint("TOPLEFT", EncounterDetails.Frame, "TOPLEFT", (i*65) + 499, -81)
texture:SetColorTexture (unpack(grafico_cores[i]))
- local text = g:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
+ local text = g:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
text:SetPoint("LEFT", texture, "right", 2, 0)
text:SetJustifyH("LEFT")
if (i == 1) then
@@ -1579,13 +1579,13 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
line.icon:SetPoint("left", line, "left", 2, 0)
line.icon:SetSize(14, 14)
- line.lefttext = line:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ line.lefttext = line:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
line.lefttext:SetPoint("left", line.icon, "right", 2, 0)
line.lefttext:SetWidth(line:GetWidth() - 26)
line.lefttext:SetHeight(14)
line.lefttext:SetJustifyH("left")
- line.righttext = line:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ line.righttext = line:CreateFontString(nil, "overlay", "GameFontHighlightSmall")
line.righttext:SetPoint("left", line.icon, "right", 46, 0)
line.righttext:SetWidth(line:GetWidth() - 60)
line.righttext:SetHeight(14)
@@ -1916,7 +1916,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails)
spellinfo:SetScript("OnEnter", info_onenter)
spellinfo:SetScript("OnLeave", info_onleave)
- local spellinfotext = spellinfo:CreateFontString (nil, "overlay", "GameFontNormal")
+ local spellinfotext = spellinfo:CreateFontString(nil, "overlay", "GameFontNormal")
spellinfotext:SetPoint("center", spellinfo, "center")
spellinfotext:SetText("info")
spellinfo:SetPoint("left", spellname.widget, "right", 4, 0)
@@ -2380,13 +2380,13 @@ local ScrollCreateLine = function(self, index)
local icon = statusBar:CreateTexture("$parentIcon", "overlay")
icon:SetSize(ScrollLineHeight, ScrollLineHeight)
- local name = statusBar:CreateFontString ("$parentName", "overlay", "GameFontNormal")
+ local name = statusBar:CreateFontString("$parentName", "overlay", "GameFontNormal")
_detalhes.gump:SetFontSize (name, 10)
icon:SetPoint("left", line, "left", 2, 0)
name:SetPoint("left", icon, "right", 2, 0)
_detalhes.gump:SetFontColor(name, "white")
- local done = statusBar:CreateFontString ("$parentDone", "overlay", "GameFontNormal")
+ local done = statusBar:CreateFontString("$parentDone", "overlay", "GameFontNormal")
_detalhes.gump:SetFontSize (done, 10)
_detalhes.gump:SetFontColor(done, "white")
done:SetPoint("right", line, "right", -2, 0)
@@ -2456,9 +2456,9 @@ for i = 1, 10 do
local icon = line:CreateTexture("$parentIcon", "overlay")
icon:SetSize(16, 16)
icon:SetTexture([[Interface\AddOns\Details\images\clock]])
- local name = line:CreateFontString ("$parentName", "overlay", "GameFontNormal")
+ local name = line:CreateFontString("$parentName", "overlay", "GameFontNormal")
_detalhes.gump:SetFontSize (name, 10)
- local done = line:CreateFontString ("$parentDone", "overlay", "GameFontNormal")
+ local done = line:CreateFontString("$parentDone", "overlay", "GameFontNormal")
_detalhes.gump:SetFontSize (done, 10)
icon:SetPoint("left", line, "left", 2, 0)
@@ -2484,11 +2484,11 @@ for i = 1, 20 do
line:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
line:SetBackdropColor(unpack(BGColorDefault))
line:Hide()
- local name = line:CreateFontString ("$parentName", "overlay", "GameFontNormal")
+ local name = line:CreateFontString("$parentName", "overlay", "GameFontNormal")
_detalhes.gump:SetFontSize (name, 9)
name:SetPoint("left", line, "left", 2, 0)
- local done = line:CreateFontString ("$parentDone", "overlay", "GameFontNormal")
+ local done = line:CreateFontString("$parentDone", "overlay", "GameFontNormal")
_detalhes.gump:SetFontSize (done, 9)
done:SetPoint("right", line, "right", -2, 0)
diff --git a/plugins/Details_Streamer/Details_Streamer.lua b/plugins/Details_Streamer/Details_Streamer.lua
index 31499907..74ab8b87 100644
--- a/plugins/Details_Streamer/Details_Streamer.lua
+++ b/plugins/Details_Streamer/Details_Streamer.lua
@@ -145,7 +145,7 @@ local function CreatePluginFrames()
titlebar:SetPoint("bottomright", SOF, "topright")
titlebar:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}})
titlebar:SetBackdropColor(.1, .1, .1, .9)
- titlebar.text = titlebar:CreateFontString (nil, "overlay", "GameFontNormal")
+ titlebar.text = titlebar:CreateFontString(nil, "overlay", "GameFontNormal")
titlebar.text:SetPoint("center", titlebar, "center")
titlebar.text:SetText("Details! Streamer: Action Tracker")
titlebar:SetScript("OnEnter", function(self)
@@ -609,8 +609,8 @@ local function CreatePluginFrames()
local arrow = statusbar:CreateTexture(nil, "overlay")
- local text1 = statusbar:CreateFontString (nil, "overlay", "GameFontNormal")
- local text2 = statusbar:CreateFontString (nil, "overlay", "GameFontNormal")
+ local text1 = statusbar:CreateFontString(nil, "overlay", "GameFontNormal")
+ local text2 = statusbar:CreateFontString(nil, "overlay", "GameFontNormal")
icon1:SetPoint("left", f, "left", 2, 0) --player spell icon
text1:SetPoint("left", icon1, "right", 2, 0) --player spell name
@@ -1610,7 +1610,7 @@ screen_frame:SetScript("OnLeave", function()
end)
-local screen_frame_text = screen_frame:CreateFontString ("StreamerOverlayDpsHpsFrameText", "overlay", "GameFontNormal")
+local screen_frame_text = screen_frame:CreateFontString("StreamerOverlayDpsHpsFrameText", "overlay", "GameFontNormal")
screen_frame_text:SetPoint("center", screen_frame, "center")
screen_frame.text = screen_frame_text
@@ -2219,7 +2219,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
--get the selected profile and overwrite the settings
local ptable = Details_StreamerDB.profiles [profileName]
- _detalhes.table.deploy (ptable, StreamOverlay.DefaultConfigTable) --update with any new config from the default table
+ _detalhes.table.deploy(ptable, StreamOverlay.DefaultConfigTable) --update with any new config from the default table
_detalhes.table.overwrite (StreamOverlay.db, ptable) --overwrite the local settings with the profile settings
Details_StreamerDB.characters [pname] = profileName
@@ -2269,7 +2269,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel)
--load dbtable
Details_StreamerDB.profiles [pname] = {}
_detalhes.table.overwrite (Details_StreamerDB.profiles [pname], StreamOverlay.db)
- _detalhes.table.deploy (Details_StreamerDB.profiles [pname], StreamOverlay.DefaultConfigTable) --update with any new config from the default table
+ _detalhes.table.deploy(Details_StreamerDB.profiles [pname], StreamOverlay.DefaultConfigTable) --update with any new config from the default table
--StreamOverlay.db = Details_StreamerDB.profiles [pname] --no can't change the local database table
optionsFrame.NewProfileButton:Hide()
@@ -2456,7 +2456,7 @@ function StreamOverlay:OnEvent (_, event, ...)
local icon = welcomeWindow:CreateTexture(nil, "overlay")
icon:SetTexture([[Interface\MINIMAP\MOVIERECORDINGICON]])
- local title = welcomeWindow:CreateFontString (nil, "overlay", "GameFontNormal")
+ local title = welcomeWindow:CreateFontString(nil, "overlay", "GameFontNormal")
title:SetText("Details!: Action Tracker (plugin)")
StreamOverlay:SetFontSize (title, 20)
@@ -2466,11 +2466,11 @@ function StreamOverlay:OnEvent (_, event, ...)
youtubeTwitchIcons:SetSize(109, 413 - 370)
youtubeTwitchIcons:SetPoint("topleft", welcomeWindow, "topleft", 123, -61)
- local text1 = welcomeWindow:CreateFontString (nil, "overlay", "GameFontNormal")
+ local text1 = welcomeWindow:CreateFontString(nil, "overlay", "GameFontNormal")
text1:SetText("SHOW TO YOUR VIEWERS YOUR ROTATION\nThis way they can learn while watching your content")
- local text2 = welcomeWindow:CreateFontString (nil, "overlay", "GameFontNormal")
+ local text2 = welcomeWindow:CreateFontString(nil, "overlay", "GameFontNormal")
text2:SetText("Use the command:")
- local text3 = welcomeWindow:CreateFontString (nil, "overlay", "GameFontNormal")
+ local text3 = welcomeWindow:CreateFontString(nil, "overlay", "GameFontNormal")
text3:SetText("/streamer")
DetailsFramework:SetFontSize(text3, 16)
@@ -2513,7 +2513,7 @@ function StreamOverlay:OnEvent (_, event, ...)
--load dbtable
local ptable = Details_StreamerDB.profiles [ Details_StreamerDB.characters [pname] ] or {} --already existen config set or empty table
_detalhes.table.overwrite (StreamOverlay.db, ptable) --profile overwrite the local settings
- _detalhes.table.deploy (ptable, StreamOverlay.db) --local settings deploy stuff which non exist on profile
+ _detalhes.table.deploy(ptable, StreamOverlay.db) --local settings deploy stuff which non exist on profile
Details_StreamerDB.profiles [ Details_StreamerDB.characters [pname] ] = ptable
end
diff --git a/plugins/Details_TinyThreat/Details_TinyThreat.lua b/plugins/Details_TinyThreat/Details_TinyThreat.lua
index 9a681413..c5d7676d 100644
--- a/plugins/Details_TinyThreat/Details_TinyThreat.lua
+++ b/plugins/Details_TinyThreat/Details_TinyThreat.lua
@@ -2,11 +2,11 @@ local AceLocale = LibStub("AceLocale-3.0")
local Loc = AceLocale:GetLocale ("Details_Threat")
local _GetNumSubgroupMembers = GetNumSubgroupMembers --wow api
-local _GetNumGroupMembers = GetNumGroupMembers --wow api
+local GetNumGroupMembers = GetNumGroupMembers --wow api
local _UnitIsFriend = UnitIsFriend --wow api
local _UnitName = UnitName --wow api
-local _IsInRaid = IsInRaid --wow api
-local _IsInGroup = IsInGroup --wow api
+local IsInRaid = IsInRaid --wow api
+local IsInGroup = IsInGroup --wow api
local _UnitGroupRolesAssigned = DetailsFramework.UnitGroupRolesAssigned --wow api
local GetUnitName = GetUnitName
@@ -102,7 +102,7 @@ local function CreatePluginFrames (data)
ThreatMeter.Actived = false
- if (ThreatMeter:IsInCombat() or UnitAffectingCombat ("player")) then
+ if (ThreatMeter:IsInCombat() or UnitAffectingCombat("player")) then
if (not ThreatMeter.initialized) then
return
end
@@ -323,8 +323,8 @@ local function CreatePluginFrames (data)
if (ThreatMeter.Actived and UnitExists(unitId) and not _UnitIsFriend("player", unitId)) then
--get the threat of all players
- if (_IsInRaid()) then
- for i = 1, _GetNumGroupMembers(), 1 do
+ if (IsInRaid()) then
+ for i = 1, GetNumGroupMembers(), 1 do
local thisplayer_name = GetUnitName("raid"..i, true)
local threat_table_index = ThreatMeter.player_list_hash [thisplayer_name]
@@ -340,8 +340,8 @@ local function CreatePluginFrames (data)
end
- elseif (_IsInGroup()) then
- for i = 1, _GetNumGroupMembers()-1, 1 do
+ elseif (IsInGroup()) then
+ for i = 1, GetNumGroupMembers()-1, 1 do
local thisplayer_name = GetUnitName("party"..i, true)
local threat_table_index = ThreatMeter.player_list_hash [thisplayer_name]
local threat_table = ThreatMeter.player_list_indexes [threat_table_index]
@@ -661,8 +661,8 @@ local function CreatePluginFrames (data)
ThreatMeter.player_list_hash = {}
--pre build player list
- if (_IsInRaid()) then
- for i = 1, _GetNumGroupMembers(), 1 do
+ if (IsInRaid()) then
+ for i = 1, GetNumGroupMembers(), 1 do
local thisplayer_name = GetUnitName("raid"..i, true)
local role = _UnitGroupRolesAssigned(thisplayer_name)
local _, class = UnitClass (thisplayer_name)
@@ -671,8 +671,8 @@ local function CreatePluginFrames (data)
ThreatMeter.player_list_hash [thisplayer_name] = #ThreatMeter.player_list_indexes
end
- elseif (_IsInGroup()) then
- for i = 1, _GetNumGroupMembers()-1, 1 do
+ elseif (IsInGroup()) then
+ for i = 1, GetNumGroupMembers()-1, 1 do
local thisplayer_name = GetUnitName("party"..i, true)
local role = _UnitGroupRolesAssigned(thisplayer_name)
local _, class = UnitClass (thisplayer_name)
diff --git a/plugins/Details_Vanguard/Details_Vanguard.lua b/plugins/Details_Vanguard/Details_Vanguard.lua
index a2a2f17a..0d722a85 100644
--- a/plugins/Details_Vanguard/Details_Vanguard.lua
+++ b/plugins/Details_Vanguard/Details_Vanguard.lua
@@ -15,14 +15,14 @@ local DF = _G.DetailsFramework
--ignorar bloodlust, shield d priest
--reler os tanks ao sair de um grupo
-local _GetTime = GetTime --wow api local
+local GetTime = GetTime --wow api local
local _UFC = UnitAffectingCombat --wow api local
-local _IsInRaid = IsInRaid --wow api local
-local _IsInGroup = IsInGroup --wow api local
+local IsInRaid = IsInRaid --wow api local
+local IsInGroup = IsInGroup --wow api local
local _UnitName = UnitName --wow api local
local _UnitGroupRolesAssigned = DetailsFramework.UnitGroupRolesAssigned
-local _UnitHealth = UnitHealth --wow api local
-local _UnitHealthMax = UnitHealthMax --wow api local
+local UnitHealth = UnitHealth --wow api local
+local UnitHealthMax = UnitHealthMax --wow api local
local _UnitIsPlayer = UnitIsPlayer --wow api local
local _UnitClass = UnitClass --wow api local
local _UnitDebuff = UnitDebuff --wow api local
@@ -36,10 +36,10 @@ local CONST_DEBUFF_AMOUNT = 5
local CONST_MAX_TANKS = 2
local _cstr = string.format --lua library local
-local _table_insert = table.insert --lua library local
+local tinsert = table.insert --lua library local
local _table_remove = table.remove --lua library local
local ipairs = ipairs --lua library local
-local _pairs = pairs --lua library local
+local pairs = pairs --lua library local
local _math_floor = math.floor --lua library local
local abs = math.abs --lua library local
local _math_min = math.min --lua library local
@@ -499,7 +499,7 @@ local function CreatePluginFrames (data)
elevateStringsFrame:SetFrameLevel(dblock:GetFrameLevel()+10)
elevateStringsFrame:EnableMouse(false)
- local stack = elevateStringsFrame:CreateFontString (elevateStringsFrame:GetName() .. "_StackText", "overlay", "GameFontNormal")
+ local stack = elevateStringsFrame:CreateFontString(elevateStringsFrame:GetName() .. "_StackText", "overlay", "GameFontNormal")
stack:SetPoint("bottomright", dblock, "bottomright", 0, 0)
DetailsFramework:SetFontColor(stack, "yellow")
diff --git a/startup.lua b/startup.lua
index 2afb0216..be8244cf 100644
--- a/startup.lua
+++ b/startup.lua
@@ -571,6 +571,13 @@ function Details:StartMeUp() --I'll never stop!
--shutdown the old OnDeathMenu
--cleanup: this line can be removed after the first month of dragonflight
Details.on_death_menu = false
+
+ --reset to default the evoker color
+ local defaultEvokerColor = _detalhes.default_profile.class_colors.EVOKER
+ local currentEvokerColorTable = _detalhes.class_colors.EVOKER
+ currentEvokerColorTable[1] = defaultEvokerColor[1]
+ currentEvokerColorTable[2] = defaultEvokerColor[2]
+ currentEvokerColorTable[3] = defaultEvokerColor[3]
end
Details.AddOnLoadFilesTime = _G.GetTime()