diff --git a/Bindings.xml b/Bindings.xml index 0843ae07e..ddc3cf8af 100644 --- a/Bindings.xml +++ b/Bindings.xml @@ -1,74 +1 @@ - - - _detalhes.tabela_historico:resetar() - - - - DetailsKeyBindScrollDown() - - - - DetailsKeyBindScrollUp() - - - - _detalhes:FastReportWindow (1) - - - _detalhes:FastReportWindow (2) - - - - _detalhes:ToggleWindows() - - - - _detalhes:ToggleWindow (1) - - - _detalhes:ToggleWindow (2) - - - _detalhes:ToggleWindow (3) - - - _detalhes:ToggleWindow (4) - - - _detalhes:ToggleWindow (5) - - - - - DetailsChangeDisplayFromBookmark (1); - - - DetailsChangeDisplayFromBookmark (2); - - - DetailsChangeDisplayFromBookmark (3); - - - DetailsChangeDisplayFromBookmark (4); - - - DetailsChangeDisplayFromBookmark (5); - - - DetailsChangeDisplayFromBookmark (6); - - - DetailsChangeDisplayFromBookmark (7); - - - DetailsChangeDisplayFromBookmark (8); - - - DetailsChangeDisplayFromBookmark (9); - - - DetailsChangeDisplayFromBookmark (10); - - - - + \ No newline at end of file diff --git a/Details.xml b/Details.xml index 10df081c9..22744c6a6 100644 --- a/Details.xml +++ b/Details.xml @@ -7,7 +7,7 @@ - self:RegisterEvent ("ADDON_LOADED"); + self:RegisterEvent("ADDON_LOADED"); _detalhes.OnEvent (self, event, ...); diff --git a/Libs/DF/fw.lua b/Libs/DF/fw.lua index c82204f80..be61dfa8c 100644 --- a/Libs/DF/fw.lua +++ b/Libs/DF/fw.lua @@ -725,15 +725,15 @@ function DF:SetFontColor(fontString, r, g, b, a) fontString:SetTextColor(r, g, b, a) end -function DF:SetFontShadow (fontString, r, g, b, a, x, y) +function DF:SetFontShadow(fontString, r, g, b, a, x, y) r, g, b, a = DF:ParseColors(r, g, b, a) - fontString:SetShadowColor (r, g, b, a) + fontString:SetShadowColor(r, g, b, a) local offSetX, offSetY = fontString:GetShadowOffset() x = x or offSetX y = y or offSetY - - fontString:SetShadowOffset (x, y) + + fontString:SetShadowOffset(x, y) end function DF:SetFontRotation(fontString, degrees) @@ -815,6 +815,7 @@ function DF:GetFontSize(fontString) local _, size = fontString:GetFont() return size end + function DF:GetFontFace(fontString) local fontface = fontString:GetFont() return fontface @@ -1083,119 +1084,119 @@ end ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --anchoring - function DF:CheckPoints(point1, point2, point3, point4, point5, object) - if (not point1 and not point2) then - return "topleft", object.widget:GetParent(), "topleft", 0, 0 - end - - if (type(point1) == "string") then - local frameGlobal = _G[point1] - if (frameGlobal and type(frameGlobal) == "table" and frameGlobal.GetObjectType) then - return DF:CheckPoints(frameGlobal, point2, point3, point4, point5, object) - end +function DF:CheckPoints(point1, point2, point3, point4, point5, object) + if (not point1 and not point2) then + return "topleft", object.widget:GetParent(), "topleft", 0, 0 + end - elseif (type(point2) == "string") then - local frameGlobal = _G[point2] - if (frameGlobal and type(frameGlobal) == "table" and frameGlobal.GetObjectType) then - return DF:CheckPoints(point1, frameGlobal, point3, point4, point5, object) - end + if (type(point1) == "string") then + local frameGlobal = _G[point1] + if (frameGlobal and type(frameGlobal) == "table" and frameGlobal.GetObjectType) then + return DF:CheckPoints(frameGlobal, point2, point3, point4, point5, object) end - if (type(point1) == "string" and type(point2) == "table") then --setpoint("left", frame, _, _, _) - if (not point3 or type(point3) == "number") then --setpoint("left", frame, 10, 10) - point1, point2, point3, point4, point5 = point1, point2, point1, point3, point4 - end + elseif (type(point2) == "string") then + local frameGlobal = _G[point2] + if (frameGlobal and type(frameGlobal) == "table" and frameGlobal.GetObjectType) then + return DF:CheckPoints(point1, frameGlobal, point3, point4, point5, object) + end + end - elseif (type(point1) == "string" and type(point2) == "number") then --setpoint("topleft", x, y) - point1, point2, point3, point4, point5 = point1, object.widget:GetParent(), point1, point2, point3 + if (type(point1) == "string" and type(point2) == "table") then --setpoint("left", frame, _, _, _) + if (not point3 or type(point3) == "number") then --setpoint("left", frame, 10, 10) + point1, point2, point3, point4, point5 = point1, point2, point1, point3, point4 + end - elseif (type(point1) == "number") then --setpoint(x, y) - point1, point2, point3, point4, point5 = "topleft", object.widget:GetParent(), "topleft", point1, point2 + elseif (type(point1) == "string" and type(point2) == "number") then --setpoint("topleft", x, y) + point1, point2, point3, point4, point5 = point1, object.widget:GetParent(), point1, point2, point3 - elseif (type(point1) == "table") then --setpoint(frame, x, y) - point1, point2, point3, point4, point5 = "topleft", point1, "topleft", point2, point3 - end + elseif (type(point1) == "number") then --setpoint(x, y) + point1, point2, point3, point4, point5 = "topleft", object.widget:GetParent(), "topleft", point1, point2 - if (not point2) then - point2 = object.widget:GetParent() - elseif (point2.dframework) then - point2 = point2.widget - end + elseif (type(point1) == "table") then --setpoint(frame, x, y) + point1, point2, point3, point4, point5 = "topleft", point1, "topleft", point2, point3 + end - return point1 or "topleft", point2, point3 or "topleft", point4 or 0, point5 or 0 + if (not point2) then + point2 = object.widget:GetParent() + elseif (point2.dframework) then + point2 = point2.widget end - local anchoringFunctions = { - function(frame, anchorTo, offSetX, offSetY) --1 TOP LEFT - frame:ClearAllPoints() - frame:SetPoint("bottomleft", anchorTo, "topleft", offSetX, offSetY) - end, + return point1 or "topleft", point2, point3 or "topleft", point4 or 0, point5 or 0 +end - function(frame, anchorTo, offSetX, offSetY) --2 LEFT - frame:ClearAllPoints() - frame:SetPoint("right", anchorTo, "left", offSetX, offSetY) - end, +local anchoringFunctions = { + function(frame, anchorTo, offSetX, offSetY) --1 TOP LEFT + frame:ClearAllPoints() + frame:SetPoint("bottomleft", anchorTo, "topleft", offSetX, offSetY) + end, - function(frame, anchorTo, offSetX, offSetY) --3 BOTTOM LEFT - frame:ClearAllPoints() - frame:SetPoint("topleft", anchorTo, "bottomleft", offSetX, offSetY) - end, + function(frame, anchorTo, offSetX, offSetY) --2 LEFT + frame:ClearAllPoints() + frame:SetPoint("right", anchorTo, "left", offSetX, offSetY) + end, - function(frame, anchorTo, offSetX, offSetY) --4 BOTTOM - frame:ClearAllPoints() - frame:SetPoint("top", anchorTo, "bottom", offSetX, offSetY) - end, + function(frame, anchorTo, offSetX, offSetY) --3 BOTTOM LEFT + frame:ClearAllPoints() + frame:SetPoint("topleft", anchorTo, "bottomleft", offSetX, offSetY) + end, - function(frame, anchorTo, offSetX, offSetY) --5 BOTTOM RIGHT - frame:ClearAllPoints() - frame:SetPoint("topright", anchorTo, "bottomright", offSetX, offSetY) - end, + function(frame, anchorTo, offSetX, offSetY) --4 BOTTOM + frame:ClearAllPoints() + frame:SetPoint("top", anchorTo, "bottom", offSetX, offSetY) + end, - function(frame, anchorTo, offSetX, offSetY) --6 RIGHT - frame:ClearAllPoints() - frame:SetPoint("left", anchorTo, "right", offSetX, offSetY) - end, + function(frame, anchorTo, offSetX, offSetY) --5 BOTTOM RIGHT + frame:ClearAllPoints() + frame:SetPoint("topright", anchorTo, "bottomright", offSetX, offSetY) + end, - function(frame, anchorTo, offSetX, offSetY) --7 TOP RIGHT - frame:ClearAllPoints() - frame:SetPoint("bottomright", anchorTo, "topright", offSetX, offSetY) - end, + function(frame, anchorTo, offSetX, offSetY) --6 RIGHT + frame:ClearAllPoints() + frame:SetPoint("left", anchorTo, "right", offSetX, offSetY) + end, - function(frame, anchorTo, offSetX, offSetY) --8 TOP - frame:ClearAllPoints() - frame:SetPoint("bottom", anchorTo, "top", offSetX, offSetY) - end, + function(frame, anchorTo, offSetX, offSetY) --7 TOP RIGHT + frame:ClearAllPoints() + frame:SetPoint("bottomright", anchorTo, "topright", offSetX, offSetY) + end, - function(frame, anchorTo, offSetX, offSetY) --9 CENTER - frame:ClearAllPoints() - frame:SetPoint("center", anchorTo, "center", offSetX, offSetY) - end, + function(frame, anchorTo, offSetX, offSetY) --8 TOP + frame:ClearAllPoints() + frame:SetPoint("bottom", anchorTo, "top", offSetX, offSetY) + end, - function(frame, anchorTo, offSetX, offSetY) --10 - frame:ClearAllPoints() - frame:SetPoint("left", anchorTo, "left", offSetX, offSetY) - end, + function(frame, anchorTo, offSetX, offSetY) --9 CENTER + frame:ClearAllPoints() + frame:SetPoint("center", anchorTo, "center", offSetX, offSetY) + end, - function(frame, anchorTo, offSetX, offSetY) --11 - frame:ClearAllPoints() - frame:SetPoint("right", anchorTo, "right", offSetX, offSetY) - end, + function(frame, anchorTo, offSetX, offSetY) --10 + frame:ClearAllPoints() + frame:SetPoint("left", anchorTo, "left", offSetX, offSetY) + end, - function(frame, anchorTo, offSetX, offSetY) --12 - frame:ClearAllPoints() - frame:SetPoint("top", anchorTo, "top", offSetX, offSetY) - end, + function(frame, anchorTo, offSetX, offSetY) --11 + frame:ClearAllPoints() + frame:SetPoint("right", anchorTo, "right", offSetX, offSetY) + end, - function(frame, anchorTo, offSetX, offSetY) --13 - frame:ClearAllPoints() - frame:SetPoint("bottom", anchorTo, "bottom", offSetX, offSetY) - end - } + function(frame, anchorTo, offSetX, offSetY) --12 + frame:ClearAllPoints() + frame:SetPoint("top", anchorTo, "top", offSetX, offSetY) + end, - function DF:SetAnchor(widget, config, anchorTo) - anchorTo = anchorTo or widget:GetParent() - anchoringFunctions[config.side](widget, anchorTo, config.x, config.y) + function(frame, anchorTo, offSetX, offSetY) --13 + frame:ClearAllPoints() + frame:SetPoint("bottom", anchorTo, "bottom", offSetX, offSetY) end +} + +function DF:SetAnchor(widget, config, anchorTo) + anchorTo = anchorTo or widget:GetParent() + anchoringFunctions[config.side](widget, anchorTo, config.x, config.y) +end ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --colors @@ -1341,24 +1342,6 @@ end ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --menus - --get the text for the widget name and description from the language system - local parseWidgetNameAndDesc = function(languageTable, namePhraseId, descPhraseId, widgetName, widgetDesc) - local returnedName = widgetName - local returnedDesc = widgetDesc - - if (languageTable) then - if (namePhraseId) then - returnedName = languageTable[namePhraseId] or namePhraseId - end - if (descPhraseId) then - returnedDesc = languageTable[descPhraseId] or descPhraseId - end - return returnedName, returnedDesc - else - return returnedName, returnedDesc - end - end - local formatOptionNameWithColon = function(text, useColon) if (text) then if (useColon) then @@ -1370,7 +1353,7 @@ end end end - local disable_on_combat = {} + local widgetsToDisableOnCombat = {} local getMenuWidgetVolative = function(parent, widgetType, indexTable) local widgetObject @@ -1465,9 +1448,9 @@ end end --if the widget is inside the no combat table, remove it - for i = 1, #disable_on_combat do - if (disable_on_combat[i] == widgetObject) then - tremove(disable_on_combat, i) + for i = 1, #widgetsToDisableOnCombat do + if (widgetsToDisableOnCombat[i] == widgetObject) then + tremove(widgetsToDisableOnCombat, i) break end end @@ -1884,7 +1867,7 @@ end end --end loop if (widgetTable.nocombat) then - tinsert(disable_on_combat, widgetCreated) + tinsert(widgetsToDisableOnCombat, widgetCreated) end if (not widgetTable.inline) then @@ -2315,7 +2298,7 @@ end end if (widgetTable.nocombat) then - tinsert(disable_on_combat, widgetCreated) + tinsert(widgetsToDisableOnCombat, widgetCreated) end if (not widgetTable.inline) then @@ -2342,23 +2325,23 @@ end DF.RefreshUnsafeOptionsWidgets() end - local lock_notsafe_widgets = function() - for _, widget in ipairs(disable_on_combat) do + local lockNotSafeWidgetsForCombat = function() + for _, widget in ipairs(widgetsToDisableOnCombat) do widget:Disable() end end - local unlock_notsafe_widgets = function() - for _, widget in ipairs(disable_on_combat) do + local unlockNotSafeWidgetsForCombat = function() + for _, widget in ipairs(widgetsToDisableOnCombat) do widget:Enable() end end function DF.RefreshUnsafeOptionsWidgets() if (DF.PlayerHasCombatFlag) then - lock_notsafe_widgets() + lockNotSafeWidgetsForCombat() else - unlock_notsafe_widgets() + unlockNotSafeWidgetsForCombat() end end @@ -2383,7 +2366,6 @@ end elseif (event == "PLAYER_REGEN_DISABLED") then DF.PlayerHasCombatFlag = true DF.RefreshUnsafeOptionsWidgets() - end end) @@ -2392,36 +2374,36 @@ end error("Details! Framework: CreateInCombatTexture invalid frame on parameter 1.") end - local in_combat_background = DF:CreateImage(frame) - in_combat_background:SetColorTexture(.6, 0, 0, .1) - in_combat_background:Hide() + local inCombatBackgroundTexture = DF:CreateImage(frame) + inCombatBackgroundTexture:SetColorTexture(.6, 0, 0, .1) + inCombatBackgroundTexture:Hide() + + local inCombatLabel = Plater:CreateLabel(frame, "you are in combat", 24, "silver") + inCombatLabel:SetPoint("right", inCombatBackgroundTexture, "right", -10, 0) + inCombatLabel:Hide() - local in_combat_label = Plater:CreateLabel(frame, "you are in combat", 24, "silver") - in_combat_label:SetPoint("right", in_combat_background, "right", -10, 0) - in_combat_label:Hide() + frame:RegisterEvent("PLAYER_REGEN_DISABLED") + frame:RegisterEvent("PLAYER_REGEN_ENABLED") - frame:RegisterEvent ("PLAYER_REGEN_DISABLED") - frame:RegisterEvent ("PLAYER_REGEN_ENABLED") frame:SetScript("OnEvent", function(self, event) if (event == "PLAYER_REGEN_DISABLED") then - in_combat_background:Show() - in_combat_label:Show() + inCombatBackgroundTexture:Show() + inCombatLabel:Show() + elseif (event == "PLAYER_REGEN_ENABLED") then - in_combat_background:Hide() - in_combat_label:Hide() + inCombatBackgroundTexture:Hide() + inCombatLabel:Hide() end end) - - return in_combat_background + + return inCombatBackgroundTexture end ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --tutorials - - function DF:ShowTutorialAlertFrame (maintext, desctext, clickfunc) - + function DF:ShowTutorialAlertFrame(maintext, desctext, clickfunc) local TutorialAlertFrame = _G.DetailsFrameworkAlertFrame - + if (not TutorialAlertFrame) then TutorialAlertFrame = CreateFrame("frame", "DetailsFrameworkAlertFrame", UIParent, "MicroButtonAlertTemplate") @@ -2429,8 +2411,8 @@ end TutorialAlertFrame:SetPoint("left", UIParent, "left", -20, 100) TutorialAlertFrame:SetFrameStrata("TOOLTIP") TutorialAlertFrame:Hide() - - TutorialAlertFrame:SetScript("OnMouseUp", function(self) + + TutorialAlertFrame:SetScript("OnMouseUp", function(self) if (self.clickfunc and type(self.clickfunc) == "function") then self.clickfunc() end @@ -2438,16 +2420,16 @@ end end) TutorialAlertFrame:Hide() end - + -- TutorialAlertFrame.label = type(maintext) == "string" and maintext or type(desctext) == "string" and desctext or "" MicroButtonAlert_SetText (TutorialAlertFrame, alert.label) -- - + TutorialAlertFrame.clickfunc = clickfunc TutorialAlertFrame:Show() end - + local refresh_options = function(self) for _, widget in ipairs(self.widget_list) do if (widget._get) then @@ -2455,16 +2437,21 @@ end if (widget._get()) then widget:SetText(widget._get()) end + elseif (widget.widget_type == "select") then widget:Select(widget._get()) + elseif (widget.widget_type == "toggle" or widget.widget_type == "range") then widget:SetValue(widget._get()) + elseif (widget.widget_type == "textentry") then widget:SetText(widget._get()) + elseif (widget.widget_type == "color") then local default_value, g, b, a = widget._get() if (type(default_value) == "table") then widget:SetColor (unpack(default_value)) + else widget:SetColor (default_value, g, b, a) end @@ -2472,7 +2459,7 @@ end end end end - + local get_frame_by_id = function(self, id) return self.widgetids [id] end @@ -2488,7 +2475,7 @@ end table.wipe(frame.widgetids) end - function DF:SetAsOptionsPanel (frame) + function DF:SetAsOptionsPanel(frame) frame.RefreshOptions = refresh_options frame.widget_list = {} frame.widget_list_by_type = { @@ -2503,113 +2490,110 @@ end frame.widgetids = {} frame.GetWidgetById = get_frame_by_id end - - function DF:CreateOptionsFrame (name, title, template) - + + function DF:CreateOptionsFrame(name, title, template) template = template or 1 - + if (template == 2) then - local options_frame = CreateFrame("frame", name, UIParent, "ButtonFrameTemplate") + local newOptionsFrame = CreateFrame("frame", name, UIParent, "ButtonFrameTemplate") tinsert(UISpecialFrames, name) - options_frame:SetSize(500, 200) - options_frame.RefreshOptions = refresh_options - options_frame.widget_list = {} - - options_frame:SetScript("OnMouseDown", function(self, button) + + newOptionsFrame:SetSize(500, 200) + newOptionsFrame.RefreshOptions = refresh_options + newOptionsFrame.widget_list = {} + + newOptionsFrame:SetScript("OnMouseDown", function(self, button) if (button == "RightButton") then - if (self.moving) then + if (self.moving) then self.moving = false self:StopMovingOrSizing() end - return options_frame:Hide() + return newOptionsFrame:Hide() elseif (button == "LeftButton" and not self.moving) then self.moving = true self:StartMoving() end end) - options_frame:SetScript("OnMouseUp", function(self) - if (self.moving) then + + newOptionsFrame:SetScript("OnMouseUp", function(self) + if (self.moving) then self.moving = false self:StopMovingOrSizing() end end) - - options_frame:SetMovable(true) - options_frame:EnableMouse(true) - options_frame:SetFrameStrata("DIALOG") - options_frame:SetToplevel (true) - - options_frame:Hide() - - options_frame:SetPoint("center", UIParent, "center") - options_frame.TitleText:SetText(title) --10.0 fuck - --options_frame.portrait:SetTexture([[Interface\CHARACTERFRAME\TEMPORARYPORTRAIT-FEMALE-BLOODELF]]) - - return options_frame - + + newOptionsFrame:SetMovable(true) + newOptionsFrame:EnableMouse(true) + newOptionsFrame:SetFrameStrata("DIALOG") + newOptionsFrame:SetToplevel(true) + newOptionsFrame:Hide() + newOptionsFrame:SetPoint("center", UIParent, "center") + newOptionsFrame.TitleText:SetText(title) + + return newOptionsFrame + elseif (template == 1) then - - local options_frame = CreateFrame("frame", name, UIParent) + local newOptionsFrame = CreateFrame("frame", name, UIParent) tinsert(UISpecialFrames, name) - options_frame:SetSize(500, 200) - options_frame.RefreshOptions = refresh_options - options_frame.widget_list = {} - options_frame:SetScript("OnMouseDown", function(self, button) + newOptionsFrame:SetSize(500, 200) + newOptionsFrame.RefreshOptions = refresh_options + newOptionsFrame.widget_list = {} + + newOptionsFrame:SetScript("OnMouseDown", function(self, button) if (button == "RightButton") then - if (self.moving) then + if (self.moving) then self.moving = false self:StopMovingOrSizing() end - return options_frame:Hide() + return newOptionsFrame:Hide() elseif (button == "LeftButton" and not self.moving) then self.moving = true self:StartMoving() end end) - options_frame:SetScript("OnMouseUp", function(self) - if (self.moving) then + + newOptionsFrame:SetScript("OnMouseUp", function(self) + if (self.moving) then self.moving = false self:StopMovingOrSizing() end end) - - options_frame:SetMovable(true) - options_frame:EnableMouse(true) - options_frame:SetFrameStrata("DIALOG") - options_frame:SetToplevel (true) - - options_frame:Hide() - - options_frame:SetPoint("center", UIParent, "center") - - options_frame:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16, + + newOptionsFrame:SetMovable(true) + newOptionsFrame:EnableMouse(true) + newOptionsFrame:SetFrameStrata("DIALOG") + newOptionsFrame:SetToplevel(true) + newOptionsFrame:Hide() + newOptionsFrame:SetPoint("center", UIParent, "center") + + newOptionsFrame:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, insets = {left = 1, right = 1, top = 1, bottom = 1}}) - options_frame:SetBackdropColor(0, 0, 0, .7) - - local texturetitle = options_frame:CreateTexture(nil, "artwork") - texturetitle:SetTexture([[Interface\CURSOR\Interact]]) - texturetitle:SetTexCoord(0, 1, 0, 1) - texturetitle:SetVertexColor(1, 1, 1, 1) - texturetitle:SetPoint("topleft", options_frame, "topleft", 2, -3) - texturetitle:SetWidth(36) - texturetitle:SetHeight(36) - - local titleLabel = DF:NewLabel(options_frame, nil, "$parentTitle", nil, title, nil, 20, "yellow") - titleLabel:SetPoint("left", texturetitle, "right", 2, -1) + newOptionsFrame:SetBackdropColor(0, 0, 0, .7) + + local textureTitle = newOptionsFrame:CreateTexture(nil, "artwork") + textureTitle:SetTexture([[Interface\CURSOR\Interact]]) + textureTitle:SetTexCoord(0, 1, 0, 1) + textureTitle:SetVertexColor(1, 1, 1, 1) + textureTitle:SetPoint("topleft", newOptionsFrame, "topleft", 2, -3) + textureTitle:SetWidth(36) + textureTitle:SetHeight(36) + + local titleLabel = DF:NewLabel(newOptionsFrame, nil, "$parentTitle", nil, title, nil, 20, "yellow") + titleLabel:SetPoint("left", textureTitle, "right", 2, -1) DF:SetFontOutline (titleLabel, true) - local c = CreateFrame("Button", nil, options_frame, "UIPanelCloseButton") - c:SetWidth(32) - c:SetHeight(32) - c:SetPoint("TOPRIGHT", options_frame, "TOPRIGHT", -3, -3) - c:SetFrameLevel(options_frame:GetFrameLevel()+1) - - return options_frame + local closeButton = CreateFrame("Button", nil, newOptionsFrame, "UIPanelCloseButton") + closeButton:SetWidth(32) + closeButton:SetHeight(32) + closeButton:SetPoint("TOPRIGHT", newOptionsFrame, "TOPRIGHT", -3, -3) + closeButton:SetFrameLevel(newOptionsFrame:GetFrameLevel()+1) + + return newOptionsFrame end - end - + end + ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --~templates @@ -2789,7 +2773,7 @@ DF.slider_templates["OPTIONS_SLIDER_TEMPLATE"] = { thumbcolor = {0, 0, 0, 0.5}, } -function DF:InstallTemplate (widgetType, templateName, template, parentName) +function DF:InstallTemplate(widgetType, templateName, template, parentName) local newTemplate = {} --if has a parent, just copy the parent to the new template @@ -2833,22 +2817,27 @@ function DF:InstallTemplate (widgetType, templateName, template, parentName) return newTemplate end -function DF:GetTemplate(widget_type, template_name) - widget_type = string.lower(widget_type) +function DF:GetTemplate(widgetType, templateName) + widgetType = string.lower(widgetType) + local templateTable + + if (widgetType == "font") then + templateTable = DF.font_templates - local template_table - if (widget_type == "font") then - template_table = DF.font_templates - elseif (widget_type == "dropdown") then - template_table = DF.dropdown_templates - elseif (widget_type == "button") then - template_table = DF.button_templates - elseif (widget_type == "switch") then - template_table = DF.switch_templates - elseif (widget_type == "slider") then - template_table = DF.slider_templates + elseif (widgetType == "dropdown") then + templateTable = DF.dropdown_templates + + elseif (widgetType == "button") then + templateTable = DF.button_templates + + elseif (widgetType == "switch") then + templateTable = DF.switch_templates + + elseif (widgetType == "slider") then + templateTable = DF.slider_templates end - return template_table [template_name] + + return templateTable[templateName] end function DF.GetParentName(frame) @@ -2881,16 +2870,16 @@ DF.GlobalWidgetControlNames = { timebar = "DF_TimeBarMetaFunctions", } -function DF:AddMemberForWidget (widgetName, memberType, memberName, func) - if (DF.GlobalWidgetControlNames [widgetName]) then +function DF:AddMemberForWidget(widgetName, memberType, memberName, func) + if (DF.GlobalWidgetControlNames[widgetName]) then if (type(memberName) == "string" and (memberType == "SET" or memberType == "GET")) then if (func) then - local widgetControlObject = _G [DF.GlobalWidgetControlNames [widgetName]] - + local widgetControlObject = _G [DF.GlobalWidgetControlNames[widgetName]] + if (memberType == "SET") then - widgetControlObject ["SetMembers"] [memberName] = func + widgetControlObject["SetMembers"][memberName] = func elseif (memberType == "GET") then - widgetControlObject ["GetMembers"] [memberName] = func + widgetControlObject["GetMembers"][memberName] = func end else if (DF.debug) then @@ -2938,7 +2927,7 @@ function DF:OpenInterfaceProfile() return end end - + -- fallback (broken as of ElvUI Skins in version 12.18+... maybe fix/change will come) InterfaceOptionsFrame_OpenToCategory (self.__name) InterfaceOptionsFrame_OpenToCategory (self.__name) @@ -3037,11 +3026,11 @@ FrameshakeUpdateFrame.RegisteredFrames = FrameshakeUpdateFrame.RegisteredFrames FrameshakeUpdateFrame.RegisterFrame = function(newFrame) --add the frame into the registered frames to update - DF.table.addunique (FrameshakeUpdateFrame.RegisteredFrames, newFrame) + DF.table.addunique(FrameshakeUpdateFrame.RegisteredFrames, newFrame) end --forward declared -local frameshake_do_update +local frameshake_DoUpdate FrameshakeUpdateFrame:SetScript("OnUpdate", function(self, deltaTime) for i = 1, #FrameshakeUpdateFrame.RegisteredFrames do @@ -3052,43 +3041,43 @@ FrameshakeUpdateFrame:SetScript("OnUpdate", function(self, deltaTime) for i = 1, #parent.__frameshakes do local shakeObject = parent.__frameshakes [i] if (shakeObject.IsPlaying) then - frameshake_do_update (parent, shakeObject, deltaTime) + frameshake_DoUpdate(parent, shakeObject, deltaTime) end end - end + end end end) -local frameshake_shake_finished = function(parent, shakeObject) +local frameshake_ShakeFinished = function(parent, shakeObject) if (shakeObject.IsPlaying) then shakeObject.IsPlaying = false shakeObject.TimeLeft = 0 shakeObject.IsFadingOut = false shakeObject.IsFadingIn = false - + --update the amount of shake running on this frame parent.__frameshakes.enabled = parent.__frameshakes.enabled - 1 - + --restore the default anchors, in case where deltaTime was too small that didn't triggered an update for i = 1, #shakeObject.Anchors do local anchor = shakeObject.Anchors [i] - + --automatic anchoring and reanching needs to the reviwed in the future if (#anchor == 1) then local anchorTo = unpack(anchor) parent:ClearAllPoints() parent:SetPoint(anchorTo) - + elseif (#anchor == 2) then local anchorTo, point1 = unpack(anchor) parent:ClearAllPoints() parent:SetPoint(anchorTo, point1) - + elseif (#anchor == 3) then local anchorTo, point1, point2 = unpack(anchor) parent:SetPoint(anchorTo, point1, point2) - + elseif (#anchor == 5) then local anchorName1, anchorTo, anchorName2, point1, point2 = unpack(anchor) parent:SetPoint(anchorName1, anchorTo, anchorName2, point1, point2) @@ -3098,11 +3087,10 @@ local frameshake_shake_finished = function(parent, shakeObject) end --already declared above the update function -frameshake_do_update = function(parent, shakeObject, deltaTime) - +frameshake_DoUpdate = function(parent, shakeObject, deltaTime) --check delta time deltaTime = deltaTime or 0 - + --update time left shakeObject.TimeLeft = max(shakeObject.TimeLeft - deltaTime, 0) @@ -3119,73 +3107,72 @@ frameshake_do_update = function(parent, shakeObject, deltaTime) if (shakeObject.IsFadingIn and shakeObject.IsFadingInTime > shakeObject.FadeInTime) then shakeObject.IsFadingIn = false end - + --check if can enable fade out if (not shakeObject.IsFadingOut and shakeObject.TimeLeft < shakeObject.FadeOutTime) then shakeObject.IsFadingOut = true shakeObject.IsFadingOutTime = shakeObject.FadeOutTime - shakeObject.TimeLeft end - + --update position - local scaleShake = min (shakeObject.IsFadingIn and (shakeObject.IsFadingInTime / shakeObject.FadeInTime) or 1, shakeObject.IsFadingOut and (1 - shakeObject.IsFadingOutTime / shakeObject.FadeOutTime) or 1) + local scaleShake = min(shakeObject.IsFadingIn and (shakeObject.IsFadingInTime / shakeObject.FadeInTime) or 1, shakeObject.IsFadingOut and (1 - shakeObject.IsFadingOutTime / shakeObject.FadeOutTime) or 1) if (scaleShake > 0) then --delate the time by the frequency on both X and Y offsets shakeObject.XSineOffset = shakeObject.XSineOffset + (deltaTime * shakeObject.Frequency) shakeObject.YSineOffset = shakeObject.YSineOffset + (deltaTime * shakeObject.Frequency) - + --calc the new position local newX, newY if (shakeObject.AbsoluteSineX) then --absoluting only the sine wave, passing a negative scale will reverse the absolute direction - newX = shakeObject.Amplitude * abs(math.sin (shakeObject.XSineOffset)) * scaleShake * shakeObject.ScaleX + newX = shakeObject.Amplitude * abs(math.sin(shakeObject.XSineOffset)) * scaleShake * shakeObject.ScaleX else - newX = shakeObject.Amplitude * math.sin (shakeObject.XSineOffset) * scaleShake * shakeObject.ScaleX + newX = shakeObject.Amplitude * math.sin(shakeObject.XSineOffset) * scaleShake * shakeObject.ScaleX end - + if (shakeObject.AbsoluteSineY) then - newY = shakeObject.Amplitude * abs(math.sin (shakeObject.YSineOffset)) * scaleShake * shakeObject.ScaleY + newY = shakeObject.Amplitude * abs(math.sin(shakeObject.YSineOffset)) * scaleShake * shakeObject.ScaleY else - newY = shakeObject.Amplitude * math.sin (shakeObject.YSineOffset) * scaleShake * shakeObject.ScaleY + newY = shakeObject.Amplitude * math.sin(shakeObject.YSineOffset) * scaleShake * shakeObject.ScaleY end - + --apply the offset to the frame anchors for i = 1, #shakeObject.Anchors do local anchor = shakeObject.Anchors [i] - + if (#anchor == 1 or #anchor == 3) then local anchorTo, point1, point2 = unpack(anchor) point1 = point1 or 0 point2 = point2 or 0 parent:SetPoint(anchorTo, point1 + newX, point2 + newY) - + elseif (#anchor == 5) then local anchorName1, anchorTo, anchorName2, point1, point2 = unpack(anchor) --parent:ClearAllPoints() - + parent:SetPoint(anchorName1, anchorTo, anchorName2, point1 + newX, point2 + newY) end end - + end else - frameshake_shake_finished (parent, shakeObject) + frameshake_ShakeFinished(parent, shakeObject) end end local frameshake_stop = function(parent, shakeObject) - frameshake_shake_finished (parent, shakeObject) + frameshake_ShakeFinished(parent, shakeObject) end --scale direction scales the X and Y coordinates, scale strength scales the amplitude and frequency local frameshake_play = function(parent, shakeObject, scaleDirection, scaleAmplitude, scaleFrequency, scaleDuration) - --check if is already playing if (shakeObject.TimeLeft > 0) then --reset the time left shakeObject.TimeLeft = shakeObject.Duration - + if (shakeObject.IsFadingOut) then if (shakeObject.FadeInTime > 0) then shakeObject.IsFadingIn = true @@ -3195,7 +3182,7 @@ local frameshake_play = function(parent, shakeObject, scaleDirection, scaleAmpli shakeObject.IsFadingIn = false shakeObject.IsFadingInTime = 0 end - + --disable fade out and enable fade in shakeObject.IsFadingOut = false shakeObject.IsFadingOutTime = 0 @@ -3204,55 +3191,55 @@ local frameshake_play = function(parent, shakeObject, scaleDirection, scaleAmpli --create a new random offset shakeObject.XSineOffset = math.pi * 2 * math.random() shakeObject.YSineOffset = math.pi * 2 * math.random() - + --store the initial position if case it needs a reset shakeObject.StartedXSineOffset = shakeObject.XSineOffset shakeObject.StartedYSineOffset = shakeObject.YSineOffset - + --check if there's a fade in time if (shakeObject.FadeInTime > 0) then shakeObject.IsFadingIn = true else shakeObject.IsFadingIn = false end - + shakeObject.IsFadingInTime = 0 shakeObject.IsFadingOut = false shakeObject.IsFadingOutTime = 0 - + --apply custom scale shakeObject.ScaleX = (scaleDirection or 1) * shakeObject.OriginalScaleX shakeObject.ScaleY = (scaleDirection or 1) * shakeObject.OriginalScaleY shakeObject.Frequency = (scaleFrequency or 1) * shakeObject.OriginalFrequency shakeObject.Amplitude = (scaleAmplitude or 1) * shakeObject.OriginalAmplitude shakeObject.Duration = (scaleDuration or 1) * shakeObject.OriginalDuration - + --update the time left shakeObject.TimeLeft = shakeObject.Duration - + --check if is dynamic points if (shakeObject.IsDynamicAnchor) then - wipe (shakeObject.Anchors) + wipe(shakeObject.Anchors) for i = 1, parent:GetNumPoints() do - local p1, p2, p3, p4, p5 = parent:GetPoint (i) - shakeObject.Anchors [#shakeObject.Anchors+1] = {p1, p2, p3, p4, p5} + local p1, p2, p3, p4, p5 = parent:GetPoint(i) + shakeObject.Anchors[#shakeObject.Anchors+1] = {p1, p2, p3, p4, p5} end end - + --update the amount of shake running on this frame parent.__frameshakes.enabled = parent.__frameshakes.enabled + 1 - + if (not parent:GetScript("OnUpdate")) then parent:SetScript("OnUpdate", function()end) end end shakeObject.IsPlaying = true - - frameshake_do_update (parent, shakeObject) + + frameshake_DoUpdate(parent, shakeObject) end -local frameshake_set_config = function(parent, shakeObject, duration, amplitude, frequency, absoluteSineX, absoluteSineY, scaleX, scaleY, fadeInTime, fadeOutTime, anchorPoints) +local frameshake_SetConfig = function(parent, shakeObject, duration, amplitude, frequency, absoluteSineX, absoluteSineY, scaleX, scaleY, fadeInTime, fadeOutTime, anchorPoints) shakeObject.Amplitude = amplitude or shakeObject.Amplitude shakeObject.Frequency = frequency or shakeObject.Frequency shakeObject.Duration = duration or shakeObject.Duration @@ -3260,14 +3247,15 @@ local frameshake_set_config = function(parent, shakeObject, duration, amplitude, shakeObject.FadeOutTime = fadeOutTime or shakeObject.FadeOutTime shakeObject.ScaleX = scaleX or shakeObject.ScaleX shakeObject.ScaleY = scaleY or shakeObject.ScaleY - + if (absoluteSineX ~= nil) then shakeObject.AbsoluteSineX = absoluteSineX end + if (absoluteSineY ~= nil) then shakeObject.AbsoluteSineY = absoluteSineY end - + shakeObject.OriginalScaleX = shakeObject.ScaleX shakeObject.OriginalScaleY = shakeObject.ScaleY shakeObject.OriginalFrequency = shakeObject.Frequency @@ -3275,7 +3263,7 @@ local frameshake_set_config = function(parent, shakeObject, duration, amplitude, shakeObject.OriginalDuration = shakeObject.Duration end -function DF:CreateFrameShake (parent, duration, amplitude, frequency, absoluteSineX, absoluteSineY, scaleX, scaleY, fadeInTime, fadeOutTime, anchorPoints) +function DF:CreateFrameShake(parent, duration, amplitude, frequency, absoluteSineX, absoluteSineY, scaleX, scaleY, fadeInTime, fadeOutTime, anchorPoints) --create the shake table local frameShake = { @@ -3292,20 +3280,20 @@ function DF:CreateFrameShake (parent, duration, amplitude, frequency, absoluteSi IsPlaying = false, TimeLeft = 0, } - + frameShake.OriginalScaleX = frameShake.ScaleX frameShake.OriginalScaleY = frameShake.ScaleY frameShake.OriginalFrequency = frameShake.Frequency frameShake.OriginalAmplitude = frameShake.Amplitude frameShake.OriginalDuration = frameShake.Duration - + if (type(anchorPoints) ~= "table") then frameShake.IsDynamicAnchor = true frameShake.Anchors = {} - else + else frameShake.Anchors = anchorPoints end - + --inject frame shake table into the frame if (not parent.__frameshakes) then parent.__frameshakes = { @@ -3313,15 +3301,15 @@ function DF:CreateFrameShake (parent, duration, amplitude, frequency, absoluteSi } parent.PlayFrameShake = frameshake_play parent.StopFrameShake = frameshake_stop - parent.UpdateFrameShake = frameshake_do_update - parent.SetFrameShakeSettings = frameshake_set_config - + parent.UpdateFrameShake = frameshake_DoUpdate + parent.SetFrameShakeSettings = frameshake_SetConfig + --register the frame within the frame shake updater FrameshakeUpdateFrame.RegisterFrame (parent) end tinsert(parent.__frameshakes, frameShake) - + return frameShake end @@ -3363,7 +3351,7 @@ local glow_overlay_setcolor = function(self, antsColor, glowColor) self.AntsColor.b = b self.AntsColor.a = a end - + if (glowColor) then local r, g, b, a = DF:ParseColors(glowColor) self.outerGlow:SetVertexColor(r, g, b, a) @@ -3387,31 +3375,31 @@ function DF:CreateGlowOverlay (parent, antsColor, glowColor) local glowFrame = CreateFrame("frame", parent:GetName() and "$parentGlow2" or "OverlayActionGlow" .. math.random(1, 10000000), parent, "ActionBarButtonSpellActivationAlert") glowFrame:HookScript ("OnShow", glow_overlay_onshow) glowFrame:HookScript ("OnHide", glow_overlay_onhide) - + glowFrame.Play = glow_overlay_play glowFrame.Stop = glow_overlay_stop glowFrame.SetColor = glow_overlay_setcolor - + glowFrame:Hide() - + parent.overlay = glowFrame local frameWidth, frameHeight = parent:GetSize() - + local scale = 1.4 - + --Make the height/width available before the next frame: parent.overlay:SetSize(frameWidth * scale, frameHeight * scale) parent.overlay:SetPoint("TOPLEFT", parent, "TOPLEFT", -frameWidth * 0.32, frameHeight * 0.36) parent.overlay:SetPoint("BOTTOMRIGHT", parent, "BOTTOMRIGHT", frameWidth * 0.32, -frameHeight * 0.36) - + local r, g, b, a = DF:ParseColors(antsColor or defaultColor) glowFrame.ants:SetVertexColor(r, g, b, a) glowFrame.AntsColor = {r, g, b, a} - + local r, g, b, a = DF:ParseColors(glowColor or defaultColor) glowFrame.outerGlow:SetVertexColor(r, g, b, a) glowFrame.GlowColor = {r, g, b, a} - + glowFrame.outerGlow:SetScale(1.2) glowFrame:EnableMouse(false) return glowFrame @@ -3434,33 +3422,33 @@ function DF:CreateAnts (parent, antTable, leftOffset, rightOffset, topOffset, bo rightOffset = rightOffset or 0 topOffset = topOffset or 0 bottomOffset = bottomOffset or 0 - + local f = CreateFrame("frame", nil, parent) f:SetPoint("topleft", leftOffset, topOffset) f:SetPoint("bottomright", rightOffset, bottomOffset) - + f.SetOffset = ants_set_texture_offset - + local t = f:CreateTexture(nil, "overlay") t:SetAllPoints() t:SetTexture(antTable.Texture) t:SetBlendMode(antTable.BlendMode or "ADD") t:SetVertexColor(DF:ParseColors(antTable.Color or "white")) f.Texture = t - + f.AntTable = antTable - + f:SetScript("OnUpdate", function(self, deltaTime) AnimateTexCoords (t, self.AntTable.TextureWidth, self.AntTable.TextureHeight, self.AntTable.TexturePartsWidth, self.AntTable.TexturePartsHeight, self.AntTable.AmountParts, deltaTime, self.AntTable.Throttle or 0.025) end) - + return f end --[=[ --test ants do local f = DF:CreateAnts (UIParent) -end +end --]=] ----------------------------- @@ -3474,7 +3462,7 @@ local SetBorderAlpha = function(self, alpha1, alpha2, alpha3) self.Borders.Alpha1 = alpha1 or self.Borders.Alpha1 self.Borders.Alpha2 = alpha2 or self.Borders.Alpha2 self.Borders.Alpha3 = alpha3 or self.Borders.Alpha3 - + for _, texture in ipairs(self.Borders.Layer1) do texture:SetAlpha(self.Borders.Alpha1) end @@ -3499,23 +3487,20 @@ local SetBorderColor = function(self, r, g, b) end local SetLayerVisibility = function(self, layer1Shown, layer2Shown, layer3Shown) - for _, texture in ipairs(self.Borders.Layer1) do texture:SetShown (layer1Shown) end - + for _, texture in ipairs(self.Borders.Layer2) do texture:SetShown (layer2Shown) end - + for _, texture in ipairs(self.Borders.Layer3) do texture:SetShown (layer3Shown) end - end -function DF:CreateBorder (parent, alpha1, alpha2, alpha3) - +function DF:CreateBorder(parent, alpha1, alpha2, alpha3) parent.Borders = { Layer1 = {}, Layer2 = {}, @@ -3524,11 +3509,11 @@ function DF:CreateBorder (parent, alpha1, alpha2, alpha3) Alpha2 = alpha2 or default_border_color2, Alpha3 = alpha3 or default_border_color3, } - + parent.SetBorderAlpha = SetBorderAlpha parent.SetBorderColor = SetBorderColor parent.SetLayerVisibility = SetLayerVisibility - + local border1 = parent:CreateTexture(nil, "background") PixelUtil.SetPoint(border1, "topleft", parent, "topleft", -1, 1) PixelUtil.SetPoint(border1, "bottomleft", parent, "bottomleft", -1, -1) @@ -3541,11 +3526,11 @@ function DF:CreateBorder (parent, alpha1, alpha2, alpha3) PixelUtil.SetPoint(border3, "topleft", parent, "topleft", -3, 3) PixelUtil.SetPoint(border3, "bottomleft", parent, "bottomleft", -3, -3) border3:SetColorTexture(0, 0, 0, alpha3 or default_border_color3) - + tinsert(parent.Borders.Layer1, border1) tinsert(parent.Borders.Layer2, border2) tinsert(parent.Borders.Layer3, border3) - + local border1 = parent:CreateTexture(nil, "background") PixelUtil.SetPoint(border1, "topleft", parent, "topleft", 0, 1) PixelUtil.SetPoint(border1, "topright", parent, "topright", 1, 1) @@ -3558,11 +3543,11 @@ function DF:CreateBorder (parent, alpha1, alpha2, alpha3) PixelUtil.SetPoint(border3, "topleft", parent, "topleft", -2, 3) PixelUtil.SetPoint(border3, "topright", parent, "topright", 3, 3) border3:SetColorTexture(0, 0, 0, alpha3 or default_border_color3) - + tinsert(parent.Borders.Layer1, border1) tinsert(parent.Borders.Layer2, border2) - tinsert(parent.Borders.Layer3, border3) - + tinsert(parent.Borders.Layer3, border3) + local border1 = parent:CreateTexture(nil, "background") PixelUtil.SetPoint(border1, "topright", parent, "topright", 1, 0) PixelUtil.SetPoint(border1, "bottomright", parent, "bottomright", 1, -1) @@ -3575,11 +3560,11 @@ function DF:CreateBorder (parent, alpha1, alpha2, alpha3) PixelUtil.SetPoint(border3, "topright", parent, "topright", 3, 2) PixelUtil.SetPoint(border3, "bottomright", parent, "bottomright", 3, -3) border3:SetColorTexture(0, 0, 0, alpha3 or default_border_color3) - + tinsert(parent.Borders.Layer1, border1) tinsert(parent.Borders.Layer2, border2) - tinsert(parent.Borders.Layer3, border3) - + tinsert(parent.Borders.Layer3, border3) + local border1 = parent:CreateTexture(nil, "background") PixelUtil.SetPoint(border1, "bottomleft", parent, "bottomleft", 0, -1) PixelUtil.SetPoint(border1, "bottomright", parent, "bottomright", 0, -1) @@ -3592,11 +3577,10 @@ function DF:CreateBorder (parent, alpha1, alpha2, alpha3) PixelUtil.SetPoint(border3, "bottomleft", parent, "bottomleft", -2, -3) PixelUtil.SetPoint(border3, "bottomright", parent, "bottomright", 2, -3) border3:SetColorTexture(0, 0, 0, alpha3 or default_border_color3) - + tinsert(parent.Borders.Layer1, border1) tinsert(parent.Borders.Layer2, border2) tinsert(parent.Borders.Layer3, border3) - end --DFNamePlateBorder as copy from "NameplateFullBorderTemplate" -> DF:CreateFullBorder (name, parent) @@ -3654,7 +3638,7 @@ function DF:CreateFullBorder (name, parent) border:SetFrameLevel(border:GetParent():GetFrameLevel()) border.Textures = {} Mixin(border, DFNamePlateBorderTemplateMixin) - + local left = border:CreateTexture("$parentLeft", "BACKGROUND", nil, -8) --left:SetDrawLayer("BACKGROUND", -8) left:SetColorTexture(1, 1, 1, 1) @@ -3663,7 +3647,7 @@ function DF:CreateFullBorder (name, parent) left:SetPoint("BOTTOMRIGHT", border, "BOTTOMLEFT", 0, -1.0) border.Left = left tinsert(border.Textures, left) - + local right = border:CreateTexture("$parentRight", "BACKGROUND", nil, -8) --right:SetDrawLayer("BACKGROUND", -8) right:SetColorTexture(1, 1, 1, 1) @@ -3672,7 +3656,7 @@ function DF:CreateFullBorder (name, parent) right:SetPoint("BOTTOMLEFT", border, "BOTTOMRIGHT", 0, -1.0) border.Right = right tinsert(border.Textures, right) - + local bottom = border:CreateTexture("$parentBottom", "BACKGROUND", nil, -8) --bottom:SetDrawLayer("BACKGROUND", -8) bottom:SetColorTexture(1, 1, 1, 1) @@ -3681,7 +3665,7 @@ function DF:CreateFullBorder (name, parent) bottom:SetPoint("TOPRIGHT", border, "BOTTOMRIGHT", 0, 0) border.Bottom = bottom tinsert(border.Textures, bottom) - + local top = border:CreateTexture("$parentTop", "BACKGROUND", nil, -8) --top:SetDrawLayer("BACKGROUND", -8) top:SetColorTexture(1, 1, 1, 1) @@ -3690,7 +3674,7 @@ function DF:CreateFullBorder (name, parent) top:SetPoint("BOTTOMRIGHT", border, "TOPRIGHT", 0, 0) border.Top = top tinsert(border.Textures, top) - + return border end @@ -3698,8 +3682,7 @@ function DF:CreateBorderSolid (parent, size) end -function DF:CreateBorderWithSpread (parent, alpha1, alpha2, alpha3, size, spread) - +function DF:CreateBorderWithSpread(parent, alpha1, alpha2, alpha3, size, spread) parent.Borders = { Layer1 = {}, Layer2 = {}, @@ -3708,106 +3691,106 @@ function DF:CreateBorderWithSpread (parent, alpha1, alpha2, alpha3, size, spread Alpha2 = alpha2 or default_border_color2, Alpha3 = alpha3 or default_border_color3, } - + parent.SetBorderAlpha = SetBorderAlpha parent.SetBorderColor = SetBorderColor parent.SetLayerVisibility = SetLayerVisibility - + size = size or 1 local minPixels = 1 local spread = 0 - + --left local border1 = parent:CreateTexture(nil, "background") border1:SetColorTexture(0, 0, 0, alpha1 or default_border_color1) PixelUtil.SetPoint(border1, "topleft", parent, "topleft", -1 + spread, 1 + (-spread), 0, 0) PixelUtil.SetPoint(border1, "bottomleft", parent, "bottomleft", -1 + spread, -1 + spread, 0, 0) PixelUtil.SetWidth (border1, size, minPixels) - + local border2 = parent:CreateTexture(nil, "background") PixelUtil.SetPoint(border2, "topleft", parent, "topleft", -2 + spread, 2 + (-spread)) PixelUtil.SetPoint(border2, "bottomleft", parent, "bottomleft", -2 + spread, -2 + spread) border2:SetColorTexture(0, 0, 0, alpha2 or default_border_color2) PixelUtil.SetWidth (border2, size, minPixels) - + local border3 = parent:CreateTexture(nil, "background") PixelUtil.SetPoint(border3, "topleft", parent, "topleft", -3 + spread, 3 + (-spread)) PixelUtil.SetPoint(border3, "bottomleft", parent, "bottomleft", -3 + spread, -3 + spread) border3:SetColorTexture(0, 0, 0, alpha3 or default_border_color3) PixelUtil.SetWidth (border3, size, minPixels) - + tinsert(parent.Borders.Layer1, border1) tinsert(parent.Borders.Layer2, border2) tinsert(parent.Borders.Layer3, border3) - + --top local border1 = parent:CreateTexture(nil, "background") PixelUtil.SetPoint(border1, "topleft", parent, "topleft", 0 + spread, 1 + (-spread)) PixelUtil.SetPoint(border1, "topright", parent, "topright", 1 + (-spread), 1 + (-spread)) border1:SetColorTexture(0, 0, 0, alpha1 or default_border_color1) PixelUtil.SetHeight(border1, size, minPixels) - + local border2 = parent:CreateTexture(nil, "background") PixelUtil.SetPoint(border2, "topleft", parent, "topleft", -1 + spread, 2 + (-spread)) PixelUtil.SetPoint(border2, "topright", parent, "topright", 2 + (-spread), 2 + (-spread)) border2:SetColorTexture(0, 0, 0, alpha2 or default_border_color2) PixelUtil.SetHeight(border2, size, minPixels) - + local border3 = parent:CreateTexture(nil, "background") PixelUtil.SetPoint(border3, "topleft", parent, "topleft", -2 + spread, 3 + (-spread)) PixelUtil.SetPoint(border3, "topright", parent, "topright", 3 + (-spread), 3 + (-spread)) border3:SetColorTexture(0, 0, 0, alpha3 or default_border_color3) PixelUtil.SetHeight(border3, size, minPixels) - + tinsert(parent.Borders.Layer1, border1) tinsert(parent.Borders.Layer2, border2) - tinsert(parent.Borders.Layer3, border3) - + tinsert(parent.Borders.Layer3, border3) + --right local border1 = parent:CreateTexture(nil, "background") PixelUtil.SetPoint(border1, "topright", parent, "topright", 1 + (-spread), 0 + (-spread)) PixelUtil.SetPoint(border1, "bottomright", parent, "bottomright", 1 + (-spread), -1 + spread) border1:SetColorTexture(0, 0, 0, alpha1 or default_border_color1) PixelUtil.SetWidth (border1, size, minPixels) - + local border2 = parent:CreateTexture(nil, "background") PixelUtil.SetPoint(border2, "topright", parent, "topright", 2 + (-spread), 1 + (-spread)) PixelUtil.SetPoint(border2, "bottomright", parent, "bottomright", 2 + (-spread), -2 + spread) border2:SetColorTexture(0, 0, 0, alpha2 or default_border_color2) PixelUtil.SetWidth (border2, size, minPixels) - + local border3 = parent:CreateTexture(nil, "background") PixelUtil.SetPoint(border3, "topright", parent, "topright", 3 + (-spread), 2 + (-spread)) PixelUtil.SetPoint(border3, "bottomright", parent, "bottomright", 3 + (-spread), -3 + spread) border3:SetColorTexture(0, 0, 0, alpha3 or default_border_color3) PixelUtil.SetWidth (border3, size, minPixels) - + tinsert(parent.Borders.Layer1, border1) tinsert(parent.Borders.Layer2, border2) - tinsert(parent.Borders.Layer3, border3) - + tinsert(parent.Borders.Layer3, border3) + local border1 = parent:CreateTexture(nil, "background") PixelUtil.SetPoint(border1, "bottomleft", parent, "bottomleft", 0 + spread, -1 + spread) PixelUtil.SetPoint(border1, "bottomright", parent, "bottomright", 0 + (-spread), -1 + spread) border1:SetColorTexture(0, 0, 0, alpha1 or default_border_color1) PixelUtil.SetHeight(border1, size, minPixels) - + local border2 = parent:CreateTexture(nil, "background") PixelUtil.SetPoint(border2, "bottomleft", parent, "bottomleft", -1 + spread, -2 + spread) PixelUtil.SetPoint(border2, "bottomright", parent, "bottomright", 1 + (-spread), -2 + spread) border2:SetColorTexture(0, 0, 0, alpha2 or default_border_color2) PixelUtil.SetHeight(border2, size, minPixels) - + local border3 = parent:CreateTexture(nil, "background") PixelUtil.SetPoint(border3, "bottomleft", parent, "bottomleft", -2 + spread, -3 + spread) PixelUtil.SetPoint(border3, "bottomright", parent, "bottomright", 2 + (-spread), -3 + spread) border3:SetColorTexture(0, 0, 0, alpha3 or default_border_color3) PixelUtil.SetHeight(border3, size, minPixels) - + tinsert(parent.Borders.Layer1, border1) tinsert(parent.Borders.Layer2, border2) tinsert(parent.Borders.Layer3, border3) - + end function DF:ReskinSlider(slider, heightOffset) @@ -3840,7 +3823,7 @@ function DF:ReskinSlider(slider, heightOffset) slider.slider.thumb:SetTexCoord(482/512, 492/512, 104/512, 120/512) slider.slider.thumb:SetSize(12, 12) slider.slider.thumb:SetVertexColor(0.6, 0.6, 0.6, 0.95) - + else --up button local offset = 1 --space between the scrollbox and the scrollar @@ -3849,14 +3832,14 @@ function DF:ReskinSlider(slider, heightOffset) local normalTexture = slider.ScrollBar.ScrollUpButton.Normal normalTexture:SetTexture([[Interface\Buttons\Arrow-Up-Up]]) normalTexture:SetTexCoord(0, 1, .2, 1) - + normalTexture:SetPoint("topleft", slider.ScrollBar.ScrollUpButton, "topleft", offset, 0) normalTexture:SetPoint("bottomright", slider.ScrollBar.ScrollUpButton, "bottomright", offset, 0) - + local pushedTexture = slider.ScrollBar.ScrollUpButton.Pushed pushedTexture:SetTexture([[Interface\Buttons\Arrow-Up-Down]]) pushedTexture:SetTexCoord(0, 1, .2, 1) - + pushedTexture:SetPoint("topleft", slider.ScrollBar.ScrollUpButton, "topleft", offset, 0) pushedTexture:SetPoint("bottomright", slider.ScrollBar.ScrollUpButton, "bottomright", offset, 0) @@ -3864,40 +3847,40 @@ function DF:ReskinSlider(slider, heightOffset) disabledTexture:SetTexture([[Interface\Buttons\Arrow-Up-Disabled]]) disabledTexture:SetTexCoord(0, 1, .2, 1) disabledTexture:SetAlpha(.5) - + disabledTexture:SetPoint("topleft", slider.ScrollBar.ScrollUpButton, "topleft", offset, 0) disabledTexture:SetPoint("bottomright", slider.ScrollBar.ScrollUpButton, "bottomright", offset, 0) - + slider.ScrollBar.ScrollUpButton:SetSize(16, 16) end - + --down button do local normalTexture = slider.ScrollBar.ScrollDownButton.Normal normalTexture:SetTexture([[Interface\Buttons\Arrow-Down-Up]]) normalTexture:SetTexCoord(0, 1, 0, .8) - + normalTexture:SetPoint("topleft", slider.ScrollBar.ScrollDownButton, "topleft", offset, -4) normalTexture:SetPoint("bottomright", slider.ScrollBar.ScrollDownButton, "bottomright", offset, -4) - + local pushedTexture = slider.ScrollBar.ScrollDownButton.Pushed pushedTexture:SetTexture([[Interface\Buttons\Arrow-Down-Down]]) pushedTexture:SetTexCoord(0, 1, 0, .8) - + pushedTexture:SetPoint("topleft", slider.ScrollBar.ScrollDownButton, "topleft", offset, -4) pushedTexture:SetPoint("bottomright", slider.ScrollBar.ScrollDownButton, "bottomright", offset, -4) - + local disabledTexture = slider.ScrollBar.ScrollDownButton.Disabled disabledTexture:SetTexture([[Interface\Buttons\Arrow-Down-Disabled]]) disabledTexture:SetTexCoord(0, 1, 0, .8) disabledTexture:SetAlpha(.5) - + disabledTexture:SetPoint("topleft", slider.ScrollBar.ScrollDownButton, "topleft", offset, -4) disabledTexture:SetPoint("bottomright", slider.ScrollBar.ScrollDownButton, "bottomright", offset, -4) - + slider.ScrollBar.ScrollDownButton:SetSize(16, 16) end - + --if the parent has a editbox, this is a code editor if (slider:GetParent().editbox) then slider.ScrollBar:SetPoint("TOPLEFT", slider, "TOPRIGHT", 12 + offset, -6) @@ -3999,7 +3982,7 @@ function DF:CoreDispatch(context, func, ...) local errortext = "D!Framework " .. context .. " error: invalid function to call\n====================\n" .. stack .. "\n====================\n" error(errortext) end - + local okay, result1, result2, result3, result4 = xpcall(func, geterrorhandler(), ...) --if (not okay) then --when using pcall @@ -4007,7 +3990,7 @@ function DF:CoreDispatch(context, func, ...) --local errortext = "D!Framework (" .. context .. ") error: " .. result1 .. "\n====================\n" .. stack .. "\n====================\n" --error(errortext) --end - + return result1, result2, result3, result4 end @@ -4051,7 +4034,7 @@ function DF:GetClassList() if (next (DF.ClassCache)) then return DF.ClassCache end - + for className, classIndex in pairs(DF.ClassFileNameToIndex) do local classTable = C_CreatureInfo.GetClassInfo (classIndex) if classTable then @@ -4065,9 +4048,9 @@ function DF:GetClassList() tinsert(DF.ClassCache, t) end end - + return DF.ClassCache - + end --hardcoded race list @@ -4129,13 +4112,13 @@ function DF:GetCharacterRaceList() if (next (DF.RaceCache)) then return DF.RaceCache end - + for i = 1, 100 do local raceInfo = C_CreatureInfo.GetRaceInfo (i) if (raceInfo and DF.RaceList [raceInfo.raceID]) then tinsert(DF.RaceCache, {Name = raceInfo.raceName, FileString = raceInfo.clientFileString, ID = raceInfo.raceID}) end - + if IS_WOW_PROJECT_MAINLINE then local alliedRaceInfo = C_AlliedRaces.GetRaceInfoByID (i) if (alliedRaceInfo and DF.AlliedRaceList [alliedRaceInfo.raceID]) then @@ -4143,16 +4126,16 @@ function DF:GetCharacterRaceList() end end end - + return DF.RaceCache end --get a list of talents for the current spec the player is using --if onlySelected return an index table with only the talents the character has selected ---if onlySelectedHash return a hash table with [spelID] = true +--if onlySelectedHash return a hash table with [spelID] = true function DF:GetCharacterTalents (onlySelected, onlySelectedHash) local talentList = {} - + for i = 1, 7 do for o = 1, 3 do local talentID, name, texture, selected, available = GetTalentInfo (i, o, 1) @@ -4171,7 +4154,7 @@ function DF:GetCharacterTalents (onlySelected, onlySelectedHash) end end end - + return talentList end @@ -4188,8 +4171,8 @@ function DF:GetCharacterPvPTalents (onlySelected, onlySelectedHash) end end return talentList - - else + + else local alreadyAdded = {} local talentList = {} for i = 1, 4 do --4 slots - get talents available in each one @@ -4305,7 +4288,7 @@ end DF.ClassSpecs = { ["DEMONHUNTER"] = { - [577] = true, + [577] = true, [581] = true, }, ["DEATHKNIGHT"] = { @@ -4325,7 +4308,7 @@ DF.ClassSpecs = { }, ["ROGUE"] = { [259] = true, - [260] = true, + [260] = true, [261] = true, }, ["DRUID"] = { @@ -4336,7 +4319,7 @@ DF.ClassSpecs = { }, ["HUNTER"] = { [253] = true, - [254] = true, + [254] = true, [255] = true, }, ["SHAMAN"] = { @@ -4360,9 +4343,9 @@ DF.ClassSpecs = { [70] = true, }, ["MONK"] = { - [268] = true, - [269] = true, - [270] = true, + [268] = true, + [269] = true, + [270] = true, }, ["EVOKER"] = { [1467] = true, @@ -4372,7 +4355,7 @@ DF.ClassSpecs = { DF.SpecListByClass = { ["DEMONHUNTER"] = { - 577, + 577, 581, }, ["DEATHKNIGHT"] = { @@ -4392,7 +4375,7 @@ DF.SpecListByClass = { }, ["ROGUE"] = { 259, - 260, + 260, 261, }, ["DRUID"] = { @@ -4403,7 +4386,7 @@ DF.SpecListByClass = { }, ["HUNTER"] = { 253, - 254, + 254, 255, }, ["SHAMAN"] = { @@ -4427,9 +4410,9 @@ DF.SpecListByClass = { 70, }, ["MONK"] = { - 268, - 269, - 270, + 268, + 269, + 270, }, ["EVOKER"] = { 1467, @@ -4493,7 +4476,7 @@ end local classLoc, class = UnitClass(unitId) local spec = GetSpecialization() - + if (spec and class) then --prist if (class == "PRIEST") then @@ -4507,7 +4490,7 @@ end end end end - + elseif (class == "MAGE") then --playing fire mage? local specID = GetSpecializationInfo(spec) @@ -4519,7 +4502,7 @@ end end end end - + elseif (class == "WARRIOR") then --is playing as a Arms warrior? local specID = GetSpecializationInfo(spec) @@ -4537,7 +4520,7 @@ end return 0.20 end end - + elseif (class == "HUNTER") then local specID = GetSpecializationInfo(spec) if (specID and specID ~= 0) then @@ -4563,7 +4546,7 @@ end end end end - end + end ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ @@ -4596,12 +4579,12 @@ end local aceComm = LibStub:GetLibrary ("AceComm-3.0", true) local LibAceSerializer = LibStub:GetLibrary ("AceSerializer-3.0", true) local LibDeflate = LibStub:GetLibrary ("LibDeflate", true) - + DF.RegisteredScriptsComm = DF.RegisteredScriptsComm or {} - + function DF.OnReceiveScriptComm (...) local prefix, encodedString, channel, commSource = ... - + local decodedString = LibDeflate:DecodeForWoWAddonChannel (encodedString) if (decodedString) then local uncompressedString = LibDeflate:DecompressDeflate (decodedString) @@ -4623,7 +4606,7 @@ end end end end - + function DF:RegisterScriptComm (ID, func) if (ID) then if (type(func) == "function") then @@ -4633,7 +4616,7 @@ end end end end - + function DF:SendScriptComm (ID, ...) if (DF.RegisteredScriptsComm [ID]) then local sourceName = UnitName ("player") .. "-" .. GetRealmName() @@ -4643,11 +4626,11 @@ end aceComm:SendCommMessage ("_GSC", data, "PARTY") end end - + if (aceComm and LibAceSerializer and LibDeflate) then aceComm:RegisterComm ("_GSC", DF.OnReceiveScriptComm) end - + ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --debug @@ -4658,30 +4641,30 @@ DF.DebugMixin = { CheckPoint = function(self, checkPointName, ...) print(self:GetName(), checkPointName, ...) end, - + CheckVisibilityState = function(self, widget) - + self = widget or self - + local width, height = self:GetSize() width = floor(width) height = floor(height) - + local numPoints = self:GetNumPoints() - + print("shown:", self:IsShown(), "visible:", self:IsVisible(), "alpha:", self:GetAlpha(), "size:", width, height, "points:", numPoints) end, - + CheckStack = function(self) local stack = debugstack() Details:Dump (stack) end, - + } ----------------------------------------------------------------------------------------------------------------------------------------------------------- - ---returns if the unit is tapped (gray health color when another player hit the unit first) + +--returns if the unit is tapped (gray health color when another player hit the unit first) function DF:IsUnitTapDenied (unitId) return unitId and not UnitPlayerControlled(unitId) and UnitIsTapDenied(unitId) end @@ -4755,7 +4738,7 @@ do end end - --return the amount of objects + --return the amount of objects local getamount = function(self) return #self.notUse + #self.inUse, #self.notUse, #self.inUse end @@ -4899,7 +4882,7 @@ end end end end - + DF.DefaultSecureScriptEnvironmentHandle = { __index = function(env, key) @@ -4908,7 +4891,7 @@ end elseif (key == "_G") then return env - + elseif (C_SubFunctionsTable[key]) then return C_SubFunctionsTable[key] end diff --git a/Libs/DF/help.lua b/Libs/DF/help.lua index 2874dd968..ccf283765 100644 --- a/Libs/DF/help.lua +++ b/Libs/DF/help.lua @@ -6,8 +6,8 @@ if (not DF or not DetailsFrameworkCanLoad) then end local _ -local _rawset = rawset --lua local -local _rawget = rawget --lua local +local rawset = rawset --lua local +local rawget = rawget --lua local local APIHelpFunctions = false local HelpMetaFunctions = {} @@ -21,7 +21,7 @@ local HelpMetaFunctions = {} return func (_table, _member_requested) end - local fromMe = _rawget (_table, _member_requested) + local fromMe = rawget (_table, _member_requested) if (fromMe) then return fromMe end @@ -36,7 +36,7 @@ local HelpMetaFunctions = {} if (func) then return func (_table, _value) else - return _rawset (_table, _key, _value) + return rawset (_table, _key, _value) end end diff --git a/Libs/DF/math.lua b/Libs/DF/math.lua index 11ffe6157..793b9ddad 100644 --- a/Libs/DF/math.lua +++ b/Libs/DF/math.lua @@ -1,61 +1,60 @@ - -local DF = _G ["DetailsFramework"] +local DF = _G["DetailsFramework"] if (not DF or not DetailsFrameworkCanLoad) then - return + return end local UnitExists = UnitExists local atan2 = math.atan2 local pi = math.pi -local abs = math.abs +local abs = math.abs SMALL_FLOAT = 0.000001 --find distance between two players -function DF:GetDistance_Unit (unit1, unit2) +function DF:GetDistance_Unit(unit1, unit2) if (UnitExists(unit1) and UnitExists(unit2)) then - local u1X, u1Y = UnitPosition (unit1) - local u2X, u2Y = UnitPosition (unit2) - + local u1X, u1Y = UnitPosition(unit1) + local u2X, u2Y = UnitPosition(unit2) + local dX = u2X - u1X local dY = u2Y - u1Y - + return ((dX*dX) + (dY*dY)) ^ .5 end return 0 end --find distance between two points -function DF:GetDistance_Point (x1, y1, x2, y2) +function DF:GetDistance_Point(x1, y1, x2, y2) local dx = x2 - x1 local dy = y2 - y1 return ((dx * dx) + (dy * dy)) ^ .5 end --find a rotation for an object from a point to another point -function DF:FindLookAtRotation (x1, y1, x2, y2) +function DF:FindLookAtRotation(x1, y1, x2, y2) return atan2 (y2 - y1, x2 - x1) + pi end --find the value scale between two given values. e.g: value of 500 in a range 0-100 result in 10 in a scale for 0-10 function DF:MapRangeClamped(inputX, inputY, outputX, outputY, value) - return DF:GetRangeValue (outputX, outputY, Clamp (DF:GetRangePercent (inputX, inputY, value), 0, 1)) + return DF:GetRangeValue(outputX, outputY, Clamp(DF:GetRangePercent(inputX, inputY, value), 0, 1)) end --find the value scale between two given values. e.g: value of 75 in a range 0-100 result in 7.5 in a scale for 0-10 -function DF:MapRangeUnclamped (inputX, inputY, outputX, outputY, value) - return DF:GetRangeValue (outputX, outputY, DF:GetRangePercent (inputX, inputY, value)) +function DF:MapRangeUnclamped(inputX, inputY, outputX, outputY, value) + return DF:GetRangeValue(outputX, outputY, DF:GetRangePercent(inputX, inputY, value)) end --find the normalized percent of the value in the range. e.g range of 200-400 and a value of 250 result in 0.25 -function DF:GetRangePercent (minValue, maxValue, value) +function DF:GetRangePercent(minValue, maxValue, value) return (value - minValue) / max((maxValue - minValue), SMALL_FLOAT) end --find the value in the range given from a normalized percent. e.g range of 200-400 and a percent of 0.8 result in 360 -function DF:GetRangeValue (minValue, maxValue, percent) - return Lerp (minValue, maxValue, percent) +function DF:GetRangeValue(minValue, maxValue, percent) + return Lerp(minValue, maxValue, percent) end function DF:GetColorRangeValue(r1, g1, b1, r2, g2, b2, value) @@ -66,7 +65,7 @@ function DF:GetColorRangeValue(r1, g1, b1, r2, g2, b2, value) end --dot product of two 2D Vectors -function DF:GetDotProduct (value1, value2) +function DF:GetDotProduct(value1, value2) return (value1.x * value2.x) + (value1.y * value2.y) end @@ -77,12 +76,12 @@ function DF:GetBezierPoint(value, point1, point2, point3) end --normalized value 0-1 result in the value on the range given, e.g 200-400 range with a value of .5 result in 300 -function DF:LerpNorm (minValue, maxValue, value) +function DF:LerpNorm(minValue, maxValue, value) return (minValue + value * (maxValue - minValue)) end --change the color by the deltaTime -function DF:LerpLinearColor (deltaTime, interpSpeed, r1, g1, b1, r2, g2, b2) +function DF:LerpLinearColor(deltaTime, interpSpeed, r1, g1, b1, r2, g2, b2) deltaTime = deltaTime * interpSpeed local r = r1 + (r2 - r1) * deltaTime local g = g1 + (g2 - g1) * deltaTime @@ -91,37 +90,37 @@ function DF:LerpLinearColor (deltaTime, interpSpeed, r1, g1, b1, r2, g2, b2) end --check if a number is near another number by a tolerance -function DF:IsNearlyEqual (value1, value2, tolerance) +function DF:IsNearlyEqual(value1, value2, tolerance) tolerance = tolerance or SMALL_FLOAT return abs(value1 - value2) <= tolerance end --check if a number is near zero -function DF:IsNearlyZero (value, tolerance) +function DF:IsNearlyZero(value, tolerance) tolerance = tolerance or SMALL_FLOAT return abs(value) <= tolerance end --check if a number is within a two other numbers, if isInclusive is true, it'll include the max value -function DF:IsWithin (minValue, maxValue, value, isInclusive) +function DF:IsWithin(minValue, maxValue, value, isInclusive) if (isInclusive) then - return ((value >= minValue) and (value <= maxValue)) + return ((value >= minValue) and (value <= maxValue)) else return ((value >= minValue) and (value < maxValue)) end end --dont allow a number ot be lower or bigger than a certain range -function DF:Clamp (minValue, maxValue, value) +function DF:Clamp(minValue, maxValue, value) return value < minValue and minValue or value < maxValue and value or maxValue end --from http://lua-users.org/wiki/SimpleRound cut fractions on a float -function DF:Round (num, numDecimalPlaces) +function DF:Round(num, numDecimalPlaces) local mult = 10^(numDecimalPlaces or 0) return math.floor(num * mult + 0.5) / mult end -function DF:ScaleBack () +function DF:ScaleBack() end diff --git a/Libs/DF/normal_bar.lua b/Libs/DF/normal_bar.lua index 19e9b1757..3ddce3c35 100644 --- a/Libs/DF/normal_bar.lua +++ b/Libs/DF/normal_bar.lua @@ -1,20 +1,15 @@ -local DF = _G ["DetailsFramework"] +local DF = _G["DetailsFramework"] if (not DF or not DetailsFrameworkCanLoad) then - return + return end local _ -local _rawset = rawset --lua locals -local _rawget = rawget --lua locals -local _setmetatable = setmetatable --lua locals -local _unpack = unpack --lua locals -local type = type --lua locals -local _math_floor = math.floor --lua locals +local _unpack = unpack +local type = type +local _math_floor = math.floor -local SharedMedia = LibStub:GetLibrary ("LibSharedMedia-3.0") - -local cleanfunction = function() end +local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0") local APIBarFunctions do @@ -26,7 +21,7 @@ do --check if there's a metaPrototype already existing if (_G[DF.GlobalWidgetControlNames["normal_bar"]]) then --get the already existing metaPrototype - local oldMetaPrototype = _G[DF.GlobalWidgetControlNames ["normal_bar"]] + local oldMetaPrototype = _G[DF.GlobalWidgetControlNames["normal_bar"]] --check if is older if ( (not oldMetaPrototype.dversion) or (oldMetaPrototype.dversion < DF.dversion) ) then --the version is older them the currently loading one @@ -37,7 +32,7 @@ do end else --first time loading the framework - _G[DF.GlobalWidgetControlNames ["normal_bar"]] = metaPrototype + _G[DF.GlobalWidgetControlNames["normal_bar"]] = metaPrototype end end @@ -47,15 +42,15 @@ DF:Mixin(BarMetaFunctions, DF.ScriptHookMixin) ------------------------------------------------------------------------------------------------------------ --metatables - BarMetaFunctions.__call = function(_table, value) + BarMetaFunctions.__call = function(object, value) if (not value) then - return _table.statusbar:GetValue() + return object.statusbar:GetValue() else - return _table.statusbar:SetValue(value) + return object.statusbar:SetValue(value) end end - BarMetaFunctions.__add = function(v1, v2) + BarMetaFunctions.__add = function(v1, v2) if (type(v1) == "table") then local v = v1.statusbar:GetValue() v = v + v2 @@ -67,7 +62,7 @@ DF:Mixin(BarMetaFunctions, DF.ScriptHookMixin) end end - BarMetaFunctions.__sub = function(v1, v2) + BarMetaFunctions.__sub = function(v1, v2) if (type(v1) == "table") then local v = v1.statusbar:GetValue() v = v - v2 @@ -168,7 +163,7 @@ DF:Mixin(BarMetaFunctions, DF.ScriptHookMixin) return func (_table, _member_requested) end - local fromMe = _rawget (_table, _member_requested) + local fromMe = rawget (_table, _member_requested) if (fromMe) then return fromMe end @@ -350,7 +345,7 @@ DF:Mixin(BarMetaFunctions, DF.ScriptHookMixin) if (func) then return func (_table, _value) else - return _rawset (_table, _key, _value) + return rawset (_table, _key, _value) end end @@ -444,13 +439,13 @@ DF:Mixin(BarMetaFunctions, DF.ScriptHookMixin) -- tooltip function BarMetaFunctions: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 BarMetaFunctions:GetTooltip() - return _rawget (self, "have_tooltip") + return rawget (self, "have_tooltip") end -- frame levels @@ -855,7 +850,7 @@ function DF:NewBar (parent, container, name, member, w, h, value, texture_name) BarObject.statusbar:SetScript("OnMouseUp", OnMouseUp) --set class - _setmetatable(BarObject, BarMetaFunctions) + setmetatable(BarObject, BarMetaFunctions) --set texture if (texture_name) then diff --git a/Libs/DF/panel.lua b/Libs/DF/panel.lua index f21cf46d0..3279fe07d 100644 --- a/Libs/DF/panel.lua +++ b/Libs/DF/panel.lua @@ -298,10 +298,10 @@ detailsFramework.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 @@ -313,7 +313,7 @@ detailsFramework.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 {} @@ -332,7 +332,7 @@ detailsFramework.LayoutFrame = { if (func) then return func (_table, _value) else - return rawset (_table, _key, _value) + return rawset(_table, _key, _value) end end @@ -451,9 +451,9 @@ detailsFramework.LayoutFrame = { -- 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() @@ -5644,18 +5644,18 @@ local default_load_conditions_frame_options = { function detailsFramework:CreateLoadFilterParser (callback) local f = CreateFrame("frame") - f:RegisterEvent ("PLAYER_ENTERING_WORLD") + f:RegisterEvent("PLAYER_ENTERING_WORLD") if IS_WOW_PROJECT_MAINLINE then - f:RegisterEvent ("PLAYER_SPECIALIZATION_CHANGED") - f:RegisterEvent ("PLAYER_TALENT_UPDATE") + f:RegisterEvent("PLAYER_SPECIALIZATION_CHANGED") + f:RegisterEvent("PLAYER_TALENT_UPDATE") end - f:RegisterEvent ("PLAYER_ROLES_ASSIGNED") - f:RegisterEvent ("ZONE_CHANGED_NEW_AREA") + f:RegisterEvent("PLAYER_ROLES_ASSIGNED") + f:RegisterEvent("ZONE_CHANGED_NEW_AREA") if IS_WOW_PROJECT_MAINLINE then - f:RegisterEvent ("CHALLENGE_MODE_START") + f:RegisterEvent("CHALLENGE_MODE_START") end - f:RegisterEvent ("ENCOUNTER_START") - f:RegisterEvent ("PLAYER_REGEN_ENABLED") + f:RegisterEvent("ENCOUNTER_START") + f:RegisterEvent("PLAYER_REGEN_ENABLED") f:SetScript("OnEvent", function(self, event, ...) if (event == "ENCOUNTER_START") then @@ -7031,7 +7031,7 @@ detailsFramework.StatusBarFunctions = { if (isUnitEvent) then self:RegisterUnitEvent (event, self.displayedUnit, self.unit) else - self:RegisterEvent (event) + self:RegisterEvent(event) end end end @@ -7362,7 +7362,7 @@ detailsFramework.PowerFrameFunctions = { if (isUnitEvent) then self:RegisterUnitEvent (event, self.displayedUnit) else - self:RegisterEvent (event) + self:RegisterEvent(event) end end @@ -7799,7 +7799,7 @@ detailsFramework.CastFrameFunctions = { if (isUnitEvent) then self:RegisterUnitEvent (event, unit) else - self:RegisterEvent (event) + self:RegisterEvent(event) end end end @@ -8777,7 +8777,7 @@ end for index, eventTable in ipairs(self.UnitFrameEvents) do local event, isUnitEvent = unpack(eventTable) if (not isUnitEvent) then - self:RegisterEvent (event) + self:RegisterEvent(event) else self:RegisterUnitEvent (event, self.unit, self.displayedUnit ~= unit and self.displayedUnit or nil) end diff --git a/Libs/DF/pictureedit.lua b/Libs/DF/pictureedit.lua index 18a385057..826d49736 100644 --- a/Libs/DF/pictureedit.lua +++ b/Libs/DF/pictureedit.lua @@ -71,7 +71,7 @@ local CreateImageEditorFrame = function() local topSlider = DF:NewSlider (editorWindow, nil, "$parentTopSlider", "topSlider", 100, 100, 0.1, 100, 0.1, 0) topSlider:SetAllPoints(editorWindow.widget) - topSlider:SetOrientation ("VERTICAL") + topSlider:SetOrientation("VERTICAL") topSlider.backdrop = nil topSlider.fractional = true topSlider:SetHook("OnEnter", function() return true end) @@ -102,7 +102,7 @@ local CreateImageEditorFrame = function() local bottomSlider = DF:NewSlider (editorWindow, nil, "$parentBottomSlider", "bottomSlider", 100, 100, 0.1, 100, 0.1, 100) bottomSlider:SetAllPoints(editorWindow.widget) - bottomSlider:SetOrientation ("VERTICAL") + bottomSlider:SetOrientation("VERTICAL") bottomSlider.backdrop = nil bottomSlider.fractional = true bottomSlider:SetHook("OnEnter", function() return true end) @@ -311,7 +311,7 @@ local CreateImageEditorFrame = function() alphaFrame:Hide() local alphaSlider = DF:NewSlider (alphaFrame, nil, "$parentAlphaSlider", "alphaSlider", 30, 220, 1, 100, 1, edit_texture:GetAlpha()*100) alphaSlider:SetPoint("top", alphaFrame, "top", 0, -5) - alphaSlider:SetOrientation ("VERTICAL") + alphaSlider:SetOrientation("VERTICAL") alphaSlider.thumb:SetSize(40, 30) --leftSlider.backdrop = nil --leftSlider.fractional = true diff --git a/Libs/DF/schedules.lua b/Libs/DF/schedules.lua index 2e9814e58..a4d62b234 100644 --- a/Libs/DF/schedules.lua +++ b/Libs/DF/schedules.lua @@ -1,11 +1,11 @@ -local DF = _G ["DetailsFramework"] +local DF = _G["DetailsFramework"] if (not DF or not DetailsFrameworkCanLoad) then return end local C_Timer = _G.C_Timer -local unpack = _G.unpack +local unpack = table.unpack or _G.unpack --make a namespace for schedules DF.Schedules = DF.Schedules or {} diff --git a/Libs/DF/slider.lua b/Libs/DF/slider.lua index baf044bee..75ef682c9 100644 --- a/Libs/DF/slider.lua +++ b/Libs/DF/slider.lua @@ -603,7 +603,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.ScriptHookMixin) DFSliderMetaFunctions.editbox_typevalue = editbox end - local pvalue = self.previous_value [2] + local pvalue = self.previous_value[2] self:SetValue(pvalue) self.typing_value = true @@ -628,190 +628,176 @@ DF:Mixin(DFSliderMetaFunctions, DF.ScriptHookMixin) end local OnMouseDown = function(slider, button) - slider.MyObject.IsValueChanging = true + local object = slider.MyObject + object.IsValueChanging = true - local capsule = slider.MyObject - local kill = capsule:RunHooksForWidget("OnMouseDown", slider, button, capsule) + local kill = object:RunHooksForWidget("OnMouseDown", slider, button, object) if (kill) then return end if (button == "RightButton") then - slider.MyObject:TypeValue() + object:TypeValue() end end local OnMouseUp = function(slider, button) - slider.MyObject.IsValueChanging = nil + local object = slider.MyObject + object.IsValueChanging = nil - local capsule = slider.MyObject - local kill = capsule:RunHooksForWidget("OnMouseUp", slider, button, capsule) + local kill = object:RunHooksForWidget("OnMouseUp", slider, button, object) if (kill) then return end end local OnHide = function(slider) - local capsule = slider.MyObject - local kill = capsule:RunHooksForWidget("OnHide", slider, capsule) + local object = slider.MyObject + local kill = object:RunHooksForWidget("OnHide", slider, object) if (kill) then return end - if (slider.MyObject.typing_value) then + if (object.typing_value) then DFSliderMetaFunctions.editbox_typevalue:ClearFocus() DFSliderMetaFunctions.editbox_typevalue:SetText("") - slider.MyObject.typing_valu = false + object.typing_valu = false end end local OnShow = function(slider) - local capsule = slider.MyObject - local kill = capsule:RunHooksForWidget("OnShow", slider, capsule) + local object = slider.MyObject + local kill = object:RunHooksForWidget("OnShow", slider, object) if (kill) then return end end - local table_insert = table.insert - local table_remove = table.remove - local OnValueChanged = function(slider) + local object = slider.MyObject local amt - if (slider.MyObject.useDecimals) then + if (object.useDecimals) then amt = slider:GetValue() else amt = do_precision(slider:GetValue()) end - if (slider.MyObject.typing_value and not slider.MyObject.typing_can_change) then - slider.MyObject:SetValue(slider.MyObject.typing_value_started) + if (object.typing_value and not object.typing_can_change) then + object:SetValue(object.typing_value_started) return end - table_insert (slider.MyObject.previous_value, 1, amt) - table_remove (slider.MyObject.previous_value, 4) - - local capsule = slider.MyObject + table.insert(object.previous_value, 1, amt) + table.remove(object.previous_value, 4) --some plugins registered OnValueChanged and others with OnValueChange - local kill = capsule:RunHooksForWidget("OnValueChanged", slider, capsule.FixedValue, amt, capsule) + local kill = object:RunHooksForWidget("OnValueChanged", slider, object.FixedValue, amt, object) if (kill) then return end - local kill = capsule:RunHooksForWidget("OnValueChange", slider, capsule.FixedValue, amt, capsule) + + local kill = object:RunHooksForWidget("OnValueChange", slider, object.FixedValue, amt, object) if (kill) then return end - if (slider.MyObject.OnValueChanged) then - slider.MyObject.OnValueChanged (slider, slider.MyObject.FixedValue, amt) + if (object.OnValueChanged) then + object.OnValueChanged(slider, object.FixedValue, amt) end if (amt < 10 and amt >= 1) then - amt = "0"..amt + amt = "0" .. amt end - if (slider.MyObject.useDecimals) then + if (object.useDecimals) then slider.amt:SetText(string.format("%.2f", amt)) else slider.amt:SetText(math.floor(amt)) end - slider.MyObject.ivalue = amt - + object.ivalue = amt end ------------------------------------------------------------------------------------------------------------ --object constructor local SwitchOnClick = function(self, button, forced_value, value) + local object = self.MyObject - local slider = self.MyObject - - if (rawget(slider, "lockdown")) then + if (rawget(object, "lockdown")) then return end if (forced_value) then - rawset (slider, "value", not value) + rawset(object, "value", not value) end - if (rawget(slider, "value")) then --actived - rawset (slider, "value", false) + if (rawget(object, "value")) then --actived + rawset(object, "value", false) - if (slider.backdrop_disabledcolor) then - slider:SetBackdropColor(unpack(slider.backdrop_disabledcolor)) + if (object.backdrop_disabledcolor) then + object:SetBackdropColor(unpack(object.backdrop_disabledcolor)) else - slider:SetBackdropColor(1, 0, 0, 0.4) + object:SetBackdropColor(1, 0, 0, 0.4) end - if (slider.is_checkbox) then - slider.checked_texture:Hide() + if (object.is_checkbox) then + object.checked_texture:Hide() else - slider._text:SetText(slider._ltext) - slider._thumb:ClearAllPoints() - slider._thumb:SetPoint("left", slider.widget, "left") + object._text:SetText(object._ltext) + object._thumb:ClearAllPoints() + object._thumb:SetPoint("left", object.widget, "left") end else - rawset (slider, "value", true) - if (slider.backdrop_enabledcolor) then - slider:SetBackdropColor(unpack(slider.backdrop_enabledcolor)) + rawset(object, "value", true) + if (object.backdrop_enabledcolor) then + object:SetBackdropColor(unpack(object.backdrop_enabledcolor)) else - slider:SetBackdropColor(0, 0, 1, 0.4) + object:SetBackdropColor(0, 0, 1, 0.4) end - if (slider.is_checkbox) then - slider.checked_texture:Show() + if (object.is_checkbox) then + object.checked_texture:Show() else - slider._text:SetText(slider._rtext) - slider._thumb:ClearAllPoints() - slider._thumb:SetPoint("right", slider.widget, "right") + object._text:SetText(object._rtext) + object._thumb:ClearAllPoints() + object._thumb:SetPoint("right", object.widget, "right") end end - if (slider.OnSwitch and not forced_value) then - local value = rawget(slider, "value") - if (slider.return_func) then - value = slider:return_func (value) + if (object.OnSwitch and not forced_value) then + local value = rawget(object, "value") + if (object.return_func) then + value = object:return_func (value) end - local success, errorText = xpcall(slider.OnSwitch, geterrorhandler(), slider, slider.FixedValue, value) + local success, errorText = xpcall(object.OnSwitch, geterrorhandler(), object, object.FixedValue, value) if (not success) then return end --trigger hooks - slider:RunHooksForWidget("OnSwitch", slider, slider.FixedValue, value) + object:RunHooksForWidget("OnSwitch", object, object.FixedValue, value) end end -local default_switch_func = function(self, passed_value) - if (self.value) then - return false - else - return true - end -end - local switch_get_value = function(self) return self.value end local switch_set_value = function(self, value) if (self.switch_func) then - value = self:switch_func (value) + value = self:switch_func(value) end SwitchOnClick (self.widget, nil, true, value) end local switch_set_fixparameter = function(self, value) - rawset (self, "FixedValue", value) + rawset(self, "FixedValue", value) end local switch_disable = function(self) - if (self.is_checkbox) then self.checked_texture:Hide() else @@ -825,8 +811,9 @@ local switch_disable = function(self) end self:SetAlpha(.4) - rawset (self, "lockdown", true) + rawset(self, "lockdown", true) end + local switch_enable = function(self) if (self.is_checkbox) then if (rawget(self, "value")) then @@ -845,7 +832,7 @@ local switch_enable = function(self) end self:SetAlpha(1) - return rawset (self, "lockdown", false) + return rawset(self, "lockdown", false) end local set_switch_func = function(self, newFunction) @@ -858,12 +845,11 @@ local set_as_checkbok = function(self) checked:SetTexture([[Interface\Buttons\UI-CheckBox-Check]]) checked:SetPoint("center", self.button, "center", -1, -1) local size_pct = self:GetWidth()/32 - checked:SetSize(32*size_pct, 32*size_pct) + checked:SetSize(32 * size_pct, 32 * size_pct) self.checked_texture = checked self._thumb:Hide() self._text:Hide() - self.is_checkbox = true if (rawget(self, "value")) then @@ -881,39 +867,39 @@ local set_as_checkbok = function(self) self:SetBackdropColor(0, 0, 1, 0.4) end end - end -function DF:CreateSwitch(parent, on_switch, default_value, w, h, ltext, rtext, member, name, color_inverted, switch_func, return_func, with_label, switch_template, label_template) - local switch, label = DF:NewSwitch (parent, parent, name, member, w or 60, h or 20, ltext, rtext, default_value, color_inverted, switch_func, return_func, with_label, switch_template, label_template) - if (on_switch) then - switch.OnSwitch = on_switch +function DF:CreateSwitch(parent, onSwitch, defaultValue, width, height, leftText, rightText, member, name, colorInverted, switchFunc, returnFunc, withLabel, switch_template, label_template) + local switch, label = DF:NewSwitch(parent, parent, name, member, width or 60, height or 20, leftText, rightText, defaultValue, colorInverted, switchFunc, returnFunc, withLabel, switch_template, label_template) + if (onSwitch) then + switch.OnSwitch = onSwitch end return switch, label end -function DF:NewSwitch (parent, container, name, member, w, h, ltext, rtext, default_value, color_inverted, switch_func, return_func, with_label, switch_template, label_template) - +function DF:NewSwitch(parent, container, name, member, width, height, leftText, rightText, defaultValue, colorInverted, switch_func, return_func, with_label, switch_template, label_template) --early checks if (not name) then name = "DetailsFrameWorkSlider" .. DF.SwitchCounter DF.SwitchCounter = DF.SwitchCounter + 1 + elseif (not parent) then return error("Details! FrameWork: parent not found.", 2) end + if (not container) then container = parent end --defaults - ltext = ltext or "OFF" - rtext = rtext or "ON" + leftText = leftText or "OFF" + rightText = rightText or "ON" --build frames - w = w or 60 - h = h or 20 + width = width or 60 + height = height or 20 - local slider = DF:NewButton(parent, container, name, member, w, h) + local slider = DF:NewButton(parent, container, name, member, width, height) slider.HookList.OnSwitch = {} slider.switch_func = switch_func @@ -928,7 +914,7 @@ function DF:NewSwitch (parent, container, name, member, w, h, ltext, rtext, defa slider.SetSwitchFunction = set_switch_func if (member) then - parent [member] = slider + parent[member] = slider end slider:SetBackdrop({edgeFile = [[Interface\Buttons\UI-SliderBar-Border]], edgeSize = 8, @@ -936,7 +922,7 @@ function DF:NewSwitch (parent, container, name, member, w, h, ltext, rtext, defa local thumb = slider:CreateTexture(nil, "artwork") thumb:SetTexture("Interface\\Buttons\\UI-ScrollBar-Knob") - thumb:SetSize(34+(h*0.2), h*1.2) + thumb:SetSize(34+(height*0.2), height*1.2) thumb:SetAlpha(0.7) thumb:SetPoint("left", slider.widget, "left") @@ -946,15 +932,15 @@ function DF:NewSwitch (parent, container, name, member, w, h, ltext, rtext, defa slider._text = text slider._thumb = thumb - slider._ltext = ltext - slider._rtext = rtext + slider._ltext = leftText + slider._rtext = rightText slider.thumb = thumb - slider.invert_colors = color_inverted + slider.invert_colors = colorInverted slider:SetScript("OnClick", SwitchOnClick) - slider:SetValue(default_value) + slider:SetValue(defaultValue) slider.isSwitch = true @@ -977,7 +963,6 @@ function DF:NewSwitch (parent, container, name, member, w, h, ltext, rtext, defa end function DFSliderMetaFunctions:SetTemplate(template) - --slider e switch if (template.width) then self:SetWidth(template.width) @@ -1052,9 +1037,11 @@ function DF:NewSlider (parent, container, name, member, width, height, minValue, name = "DetailsFrameworkSlider" .. DF.SliderCounter DF.SliderCounter = DF.SliderCounter + 1 end + if (not parent) then return error("Details! FrameWork: parent not found.", 2) end + if (not container) then container = parent end @@ -1067,7 +1054,7 @@ function DF:NewSlider (parent, container, name, member, width, height, minValue, local SliderObject = {type = "slider", dframework = true} if (member) then - parent [member] = SliderObject + parent[member] = SliderObject end if (parent.dframework) then @@ -1077,7 +1064,7 @@ function DF:NewSlider (parent, container, name, member, width, height, minValue, container = container.widget end ---defaults + --defaults minValue = minValue or 1 maxValue = maxValue or 2 step = step or 1 @@ -1086,9 +1073,9 @@ function DF:NewSlider (parent, container, name, member, width, height, minValue, width = width or 130 height = height or 19 - --default members: - SliderObject.lockdown = false - SliderObject.container = container + --default members + SliderObject.lockdown = false + SliderObject.container = container SliderObject.slider = CreateFrame("slider", name, parent,"BackdropTemplate") SliderObject.widget = SliderObject.slider @@ -1107,7 +1094,7 @@ function DF:NewSlider (parent, container, name, member, width, height, minValue, for funcName, funcAddress in pairs(idx) do if (not DFSliderMetaFunctions[funcName]) then DFSliderMetaFunctions[funcName] = function(object, ...) - local x = loadstring ( "return _G['"..object.slider:GetName().."']:"..funcName.."(...)") + local x = loadstring( "return _G['" .. object.slider:GetName() .. "']:" .. funcName .. "(...)") return x(...) end end @@ -1117,7 +1104,7 @@ function DF:NewSlider (parent, container, name, member, width, height, minValue, SliderObject.slider.MyObject = SliderObject SliderObject.slider:SetWidth(width) SliderObject.slider:SetHeight(height) - SliderObject.slider:SetOrientation ("horizontal") + SliderObject.slider:SetOrientation("horizontal") SliderObject.slider:SetMinMaxValues(minValue, maxValue) SliderObject.slider:SetValue(defaultValue) SliderObject.ivalue = defaultValue @@ -1284,14 +1271,14 @@ DF.AdjustmentSliderFunctions = { --button can be the left or right button OnButtonDownkHook = function(button) - button = button.MyObject + local object = button.MyObject --change the icon - if (button.direction == "center") then + if (object.direction == "center") then DF:DisableOnEnterScripts() end - local adjustmentSlider = button:GetParent() + local adjustmentSlider = object:GetParent() adjustmentSlider.NextTick = GetTime() + 0.05 --save where the mouse is on the moment of the click @@ -1301,7 +1288,7 @@ DF.AdjustmentSliderFunctions = { adjustmentSlider.initialMouseX = mouseX adjustmentSlider.initialMouseY = mouseY - adjustmentSlider.buttonPressed = button.direction + adjustmentSlider.buttonPressed = object.direction --start monitoring the mouse moviment adjustmentSlider.buttonPressedTime = GetTime() @@ -1310,21 +1297,21 @@ DF.AdjustmentSliderFunctions = { --button can be the left or right button OnButtonUpHook = function(button) - button = button.MyObject + local object = button.MyObject --change the icon - if (button.direction == "center") then + if (object.direction == "center") then DF:EnableOnEnterScripts() end - local adjustmentSlider = button:GetParent() + local adjustmentSlider = object:GetParent() --check if the mouse did not moved at all, if not send a callback with a value of 1 local mouseX, mouseY = GetCursorPosition() if (mouseX == adjustmentSlider.MouseX and mouseY == adjustmentSlider.MouseY and adjustmentSlider.buttonPressedTime+0.5 > GetTime()) then - if (button.direction == "left") then + if (object.direction == "left") then DF.AdjustmentSliderFunctions.RunCallback(adjustmentSlider, -1, 0, true) - elseif (button.direction == "right") then + elseif (object.direction == "right") then DF.AdjustmentSliderFunctions.RunCallback(adjustmentSlider, 1, 0, true) end end diff --git a/Libs/DF/split_bar.lua b/Libs/DF/split_bar.lua index e5c2aeaee..5a102cb90 100644 --- a/Libs/DF/split_bar.lua +++ b/Libs/DF/split_bar.lua @@ -5,9 +5,9 @@ if (not DF or not DetailsFrameworkCanLoad) then end local _ -local _rawset = rawset --lua local -local _rawget = rawget --lua local -local _setmetatable = setmetatable --lua local +local rawset = rawset --lua local +local rawget = rawget --lua local +local setmetatable = setmetatable --lua local local _unpack = unpack --lua local local type = type --lua local local _math_floor = math.floor --lua local @@ -175,7 +175,7 @@ DF:Mixin(SplitBarMetaFunctions, DF.ScriptHookMixin) return func (_table, _member_requested) end - local fromMe = _rawget (_table, _member_requested) + local fromMe = rawget (_table, _member_requested) if (fromMe) then return fromMe end @@ -324,7 +324,7 @@ DF:Mixin(SplitBarMetaFunctions, DF.ScriptHookMixin) if (func) then return func (_table, _value) else - return _rawset (_table, _key, _value) + return rawset (_table, _key, _value) end end @@ -433,13 +433,13 @@ DF:Mixin(SplitBarMetaFunctions, DF.ScriptHookMixin) -- tooltip function SplitBarMetaFunctions: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 SplitBarMetaFunctions:GetTooltip() - return _rawget (self, "have_tooltip") + return rawget (self, "have_tooltip") end -- frame levels @@ -798,7 +798,7 @@ function DF:NewSplitBar (parent, container, name, member, w, h) SplitBarObject.statusbar:SetScript("OnMouseUp", OnMouseUp) SplitBarObject.statusbar:SetScript("OnSizeChanged", OnSizeChanged) - _setmetatable(SplitBarObject, SplitBarMetaFunctions) + setmetatable(SplitBarObject, SplitBarMetaFunctions) return SplitBarObject end diff --git a/Libs/DF/textentry.lua b/Libs/DF/textentry.lua index 7f403f92d..c6f4c1d15 100644 --- a/Libs/DF/textentry.lua +++ b/Libs/DF/textentry.lua @@ -5,7 +5,6 @@ if (not DF or not DetailsFrameworkCanLoad) then end local _ -local loadstring = loadstring --lua local local APITextEntryFunctions = false do @@ -624,8 +623,8 @@ function DF:NewTextEntry(parent, container, name, member, width, height, func, p return newTextEntryObject, withLabel end -function DF:NewSpellEntry(parent, func, w, h, param1, param2, member, name) - local editbox = DF:NewTextEntry(parent, parent, name, member, w, h, func, param1, param2) +function DF:NewSpellEntry(parent, func, width, height, param1, param2, member, name) + local editbox = DF:NewTextEntry(parent, parent, name, member, width, height, func, param1, param2) return editbox end @@ -645,114 +644,6 @@ local function_setfocus = function(self) return self.editbox:SetFocus(true) end ------------------------------------------------------------------------------------- ---auto complete - --- block ------------------- ---code author Saiket from http://www.wowinterface.com/forums/showpost.php?p=245759&postcount=6 ---- @return StartPos, EndPos of highlight in this editbox. -local function GetTextHighlight ( self ) - local Text, Cursor = self:GetText(), self:GetCursorPosition(); - self:Insert( "" ); -- Delete selected text - local TextNew, CursorNew = self:GetText(), self:GetCursorPosition(); - -- Restore previous text - self:SetText( Text ); - self:SetCursorPosition( Cursor ); - local Start, End = CursorNew, #Text - ( #TextNew - CursorNew ); - self:HighlightText( Start, End ); - return Start, End; -end -local StripColors; -do - local CursorPosition, CursorDelta; - --- Callback for gsub to remove unescaped codes. - local function StripCodeGsub ( Escapes, Code, End ) - if ( #Escapes % 2 == 0 ) then -- Doesn't escape Code - if ( CursorPosition and CursorPosition >= End - 1 ) then - CursorDelta = CursorDelta - #Code; - end - return Escapes; - end - end - --- Removes a single escape sequence. - local function StripCode ( Pattern, Text, OldCursor ) - CursorPosition, CursorDelta = OldCursor, 0; - return Text:gsub( Pattern, StripCodeGsub ), OldCursor and CursorPosition + CursorDelta; - end - --- Strips Text of all color escape sequences. - -- @param Cursor Optional cursor position to keep track of. - -- @return Stripped text, and the updated cursor position if Cursor was given. - function StripColors ( Text, Cursor ) - Text, Cursor = StripCode( "(|*)(|c%x%x%x%x%x%x%x%x)()", Text, Cursor ); - return StripCode( "(|*)(|r)()", Text, Cursor ); - end -end - -local COLOR_END = "|r"; ---- Wraps this editbox's selected text with the given color. -local function ColorSelection ( self, ColorCode ) - local Start, End = GetTextHighlight( self ); - local Text, Cursor = self:GetText(), self:GetCursorPosition(); - if ( Start == End ) then -- Nothing selected - --Start, End = Cursor, Cursor; -- Wrap around cursor - return; -- Wrapping the cursor in a color code and hitting backspace crashes the client! - end - -- Find active color code at the end of the selection - local ActiveColor; - if ( End < #Text ) then -- There is text to color after the selection - local ActiveEnd; - local CodeEnd, _, Escapes, Color = 0; - while ( true ) do - _, CodeEnd, Escapes, Color = Text:find( "(|*)(|c%x%x%x%x%x%x%x%x)", CodeEnd + 1 ); - if ( not CodeEnd or CodeEnd > End ) then - break; - end - if ( #Escapes % 2 == 0 ) then -- Doesn't escape Code - ActiveColor, ActiveEnd = Color, CodeEnd; - end - end - - if ( ActiveColor ) then - -- Check if color gets terminated before selection ends - CodeEnd = 0; - while ( true ) do - _, CodeEnd, Escapes = Text:find( "(|*)|r", CodeEnd + 1 ); - if ( not CodeEnd or CodeEnd > End ) then - break; - end - if ( CodeEnd > ActiveEnd and #Escapes % 2 == 0 ) then -- Terminates ActiveColor - ActiveColor = nil; - break; - end - end - end - end - - local Selection = Text:sub( Start + 1, End ); - -- Remove color codes from the selection - local Replacement, CursorReplacement = StripColors( Selection, Cursor - Start ); - - self:SetText( ( "" ):join( - Text:sub( 1, Start ), - ColorCode, Replacement, COLOR_END, - ActiveColor or "", Text:sub( End + 1 ) - ) ); - - -- Restore cursor and highlight, adjusting for wrapper text - Cursor = Start + CursorReplacement; - if ( CursorReplacement > 0 ) then -- Cursor beyond start of color code - Cursor = Cursor + #ColorCode; - end - if ( CursorReplacement >= #Replacement ) then -- Cursor beyond end of color - Cursor = Cursor + #COLOR_END; - end - - self:SetCursorPosition( Cursor ); - -- Highlight selection and wrapper - self:HighlightText( Start, #ColorCode + ( #Replacement - #Selection ) + #COLOR_END + End ); -end --- end of the block --------------------- - local get_last_word = function(self) self.lastword = "" local cursor_pos = self.editbox:GetCursorPosition() @@ -951,8 +842,7 @@ local AutoComplete_OnChar = function(editboxWidget, char, capsule) editboxWidget.ignore_input = false end -function TextEntryMetaFunctions:SetAsAutoComplete (poolName, poolTable, shouldOptimize) - +function TextEntryMetaFunctions:SetAsAutoComplete(poolName, poolTable, shouldOptimize) if (not self.SetHook) then --self is borderframe self = self.editbox @@ -996,23 +886,21 @@ end local set_speciallua_editor_font_size = function(borderFrame, newSize) local file, size, flags = borderFrame.editbox:GetFont() - borderFrame.editbox:SetFont (file, newSize, flags) - - borderFrame.editboxlines:SetFont (file, newSize, flags) + borderFrame.editbox:SetFont(file, newSize, flags) + borderFrame.editboxlines:SetFont(file, newSize, flags) end -function DF:NewSpecialLuaEditorEntry (parent, w, h, member, name, nointent, showLineNumbers) - +function DF:NewSpecialLuaEditorEntry(parent, width, height, member, name, nointent, showLineNumbers) if (name:find("$parent")) then local parentName = DF.GetParentName(parent) name = name:gsub("$parent", parentName) end local borderframe = CreateFrame("Frame", name, parent,"BackdropTemplate") - borderframe:SetSize(w, h) + borderframe:SetSize(width, height) if (member) then - parent [member] = borderframe + parent[member] = borderframe end local scrollframe = CreateFrame("ScrollFrame", name, borderframe, "UIPanelScrollFrameTemplate, BackdropTemplate") @@ -1024,7 +912,7 @@ function DF:NewSpecialLuaEditorEntry (parent, w, h, member, name, nointent, show scrollframe.editbox:SetScript("OnCursorChanged", _G.ScrollingEdit_OnCursorChanged) scrollframe.editbox:SetScript("OnEscapePressed", _G.EditBox_ClearFocus) scrollframe.editbox:SetFontObject("GameFontHighlightSmall") - scrollframe:SetScrollChild (scrollframe.editbox) + scrollframe:SetScrollChild(scrollframe.editbox) --line number if (showLineNumbers) then @@ -1039,7 +927,7 @@ function DF:NewSpecialLuaEditorEntry (parent, w, h, member, name, nointent, show scrollframeNumberLines.editbox:SetPoint("topleft", borderframe, "topleft", 10, -10) scrollframeNumberLines.editbox:SetPoint("bottomright", borderframe, "bottomright", -30, 10) - scrollframeNumberLines:SetScrollChild (scrollframeNumberLines.editbox) + scrollframeNumberLines:SetScrollChild(scrollframeNumberLines.editbox) scrollframeNumberLines:EnableMouseWheel(false) for i = 1, 1000 do @@ -1111,7 +999,7 @@ function DF:NewSpecialLuaEditorEntry (parent, w, h, member, name, nointent, show borderframe.SetTemplate = TextEntryMetaFunctions.SetTemplate if (not nointent) then - IndentationLib.enable (scrollframe.editbox, nil, 4) + IndentationLib.enable(scrollframe.editbox, nil, 4) end borderframe:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]], @@ -1133,51 +1021,4 @@ function DF:NewSpecialLuaEditorEntry (parent, w, h, member, name, nointent, show borderframe.editbox.borderframe = borderframe return borderframe -end - --- encryption table -local base64chars = {[0]='A',[1]='B',[2]='C',[3]='D',[4]='E',[5]='F',[6]='G',[7]='H',[8]='I',[9]='J',[10]='K',[11]='L',[12]='M',[13]='N',[14]='O',[15]='P',[16]='Q',[17]='R',[18]='S',[19]='T',[20]='U',[21]='V',[22]='W',[23]='X',[24]='Y',[25]='Z',[26]='a',[27]='b',[28]='c',[29]='d',[30]='e',[31]='f',[32]='g',[33]='h',[34]='i',[35]='j',[36]='k',[37]='l',[38]='m',[39]='n',[40]='o',[41]='p',[42]='q',[43]='r',[44]='s',[45]='t',[46]='u',[47]='v',[48]='w',[49]='x',[50]='y',[51]='z',[52]='0',[53]='1',[54]='2',[55]='3',[56]='4',[57]='5',[58]='6',[59]='7',[60]='8',[61]='9',[62]='-',[63]='_'} - --- decryption table -local base64bytes = {['A']=0,['B']=1,['C']=2,['D']=3,['E']=4,['F']=5,['G']=6,['H']=7,['I']=8,['J']=9,['K']=10,['L']=11,['M']=12,['N']=13,['O']=14,['P']=15,['Q']=16,['R']=17,['S']=18,['T']=19,['U']=20,['V']=21,['W']=22,['X']=23,['Y']=24,['Z']=25,['a']=26,['b']=27,['c']=28,['d']=29,['e']=30,['f']=31,['g']=32,['h']=33,['i']=34,['j']=35,['k']=36,['l']=37,['m']=38,['n']=39,['o']=40,['p']=41,['q']=42,['r']=43,['s']=44,['t']=45,['u']=46,['v']=47,['w']=48,['x']=49,['y']=50,['z']=51,['0']=52,['1']=53,['2']=54,['3']=55,['4']=56,['5']=57,['6']=58,['7']=59,['8']=60,['9']=61,['-']=62,['_']=63,['=']=nil} - --- shift left -local function lsh (value,shift) - return (value*(2^shift)) % 256 -end - --- shift right -local function rsh (value,shift) - return math.floor(value/2^shift) % 256 -end - --- return single bit (for OR) -local function bit (x,b) - return (x % 2^b - x % 2^(b-1) > 0) -end - -local function lor (x,y) - local result = 0 - for p=1,8 do result = result + (((bit(x,p) or bit(y,p)) == true) and 2^(p-1) or 0) end - return result -end - -function DF.EncodeString (data) - local bytes = {} - local result = "" - for spos=0,string.len(data)-1,3 do - for byte=1,3 do bytes[byte] = string.byte(string.sub(data,(spos+byte))) or 0 end - result = string.format('%s%s%s%s%s',result,base64chars[rsh(bytes[1],2)],base64chars[lor(lsh((bytes[1] % 4),4), rsh(bytes[2],4))] or "=",((#data-spos) > 1) and base64chars[lor(lsh(bytes[2] % 16,2), rsh(bytes[3],6))] or "=",((#data-spos) > 2) and base64chars[(bytes[3] % 64)] or "=") - end - return result -end - -function DF.DecodeString (data) - local chars = {} - local result="" - for dpos=0,string.len(data)-1,4 do - for char=1,4 do chars[char] = base64bytes[(string.sub(data,(dpos+char),(dpos+char)) or "=")] end - result = string.format('%s%s%s%s',result,string.char(lor(lsh(chars[1],2), rsh(chars[2],4))),(chars[3] ~= nil) and string.char(lor(lsh(chars[2],4), rsh(chars[3],2))) or "",(chars[4] ~= nil) and string.char(lor(lsh(chars[3],6) % 192, (chars[4]))) or "") - end - return result end \ No newline at end of file diff --git a/Libs/LibOpenRaid/LibOpenRaid.lua b/Libs/LibOpenRaid/LibOpenRaid.lua index 787919dc6..f2e5dbab0 100644 --- a/Libs/LibOpenRaid/LibOpenRaid.lua +++ b/Libs/LibOpenRaid/LibOpenRaid.lua @@ -68,7 +68,7 @@ if (WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE and not isExpansion_Dragonflight()) t end local major = "LibOpenRaid-1.0" -local CONST_LIB_VERSION = 62 +local CONST_LIB_VERSION = 63 LIB_OPEN_RAID_CAN_LOAD = false local unpack = table.unpack or _G.unpack @@ -242,7 +242,7 @@ end function tempCache.RestoreData() local data = C_CVar.GetCVar(CONST_CVAR_TEMPCACHE) - if (data and type(data) == "string" and data ~= "") then + if (data and type(data) == "string" and string.len(data) > 1) then local LibAceSerializer = LibStub:GetLibrary("AceSerializer-3.0", true) if (LibAceSerializer) then local okay, cacheInfo = LibAceSerializer:Deserialize(data) @@ -279,13 +279,21 @@ function tempCache.RestoreData() tempCache.AddDebugText("invalid GearInfo") end else - tempCache.AddDebugText("Deserialization not okay") + tempCache.AddDebugText("Deserialization not okay, reason: " .. cacheInfo) end else tempCache.AddDebugText("LibAceSerializer not found") end else - tempCache.AddDebugText("invalid temporary cache, isn't string or cvar not found") + if (not data) then + tempCache.AddDebugText("invalid temporary cache: getCVar returned nil") + elseif (type(data) ~= "string") then + tempCache.AddDebugText("invalid temporary cache: getCVar did not returned a string") + elseif (string.len(data) < 2) then + tempCache.AddDebugText("invalid temporary cache: data length lower than 2 bytes (first login?)") + else + tempCache.AddDebugText("invalid temporary cache: no reason found") + end end end diff --git a/Libs/LibOpenRaid/ThingsToMantain_Dragonflight.lua b/Libs/LibOpenRaid/ThingsToMantain_Dragonflight.lua index 7dedf84c5..4d69a4d8f 100644 --- a/Libs/LibOpenRaid/ThingsToMantain_Dragonflight.lua +++ b/Libs/LibOpenRaid/ThingsToMantain_Dragonflight.lua @@ -269,6 +269,7 @@ LIB_OPEN_RAID_COOLDOWNS_INFO = { -- 4 raid defensive cooldown -- 5 personal utility cooldown -- 6 interrupt + -- 8 crowd control --interrupts [6552] = {class = "WARRIOR", specs = {71, 72, 73}, cooldown = 15, silence = 4, talent = false, cooldownWithTalent = false, cooldownTalentId = false, type = 6, charges = 1}, --Pummel @@ -292,131 +293,130 @@ LIB_OPEN_RAID_COOLDOWNS_INFO = { -- 66 - Protection -- 70 - Retribution - [31884] = {cooldown = 120, duration = 20, specs = {65,66,70}, talent =false, charges = 1, class = "PALADIN", type = 1}, --Avenging Wrath - [216331] = {cooldown = 120, duration = 20, specs = {65}, talent =22190, charges = 1, class = "PALADIN", type = 1}, --Avenging Crusader (talent) - [498] = {cooldown = 60, duration = 8, specs = {65}, talent =false, charges = 1, class = "PALADIN", type = 2}, --Divine Protection - [642] = {cooldown = 300, duration = 8, specs = {65,66,70}, talent =false, charges = 1, class = "PALADIN", type = 2}, --Divine Shield - [105809] = {cooldown = 90, duration = 20, specs = {65,66,70}, talent =22164, charges = 1, class = "PALADIN", type = 2}, --Holy Avenger (talent) - [152262] = {cooldown = 45, duration = 15, specs = {65,66,70}, talent =17601, charges = 1, class = "PALADIN", type = 2}, --Seraphim - [633] = {cooldown = 600, duration = false, specs = {65,66,70}, talent =false, charges = 1, class = "PALADIN", type = 3}, --Lay on Hands - [1022] = {cooldown = 300, duration = 10, specs = {65,66,70}, talent =false, charges = 1, class = "PALADIN", type = 3}, --Blessing of Protection - [6940] = {cooldown = 120, duration = 12, specs = {65,66,70}, talent =false, charges = 1, class = "PALADIN", type = 3}, --Blessing of Sacrifice - [31821] = {cooldown = 180, duration = 8, specs = {65}, talent =false, charges = 1, class = "PALADIN", type = 4}, --Aura Mastery - [1044] = {cooldown = 25, duration = 8, specs = {65,66,70}, talent =false, charges = 1, class = "PALADIN", type = 5}, --Blessing of Freedom - [853] = {cooldown = 60, duration = 6, specs = {65,66,70}, talent =false, charges = 1, class = "PALADIN", type = 5}, --Hammer of Justice - [115750] = {cooldown = 90, duration = 6, specs = {65,66,70}, talent =21811, charges = 1, class = "PALADIN", type = 5}, --Blinding Light(talent) - [327193] = {cooldown = 90, duration = 15, specs = {66}, talent =23468, charges = 1, class = "PALADIN", type = 1}, --Moment of Glory (talent) - [31850] = {cooldown = 120, duration = 8, specs = {66}, talent =false, charges = 1, class = "PALADIN", type = 2}, --Ardent Defender - [86659] = {cooldown = 300, duration = 8, specs = {66}, talent =false, charges = 1, class = "PALADIN", type = 2}, --Guardian of Ancient Kings - [204018] = {cooldown = 180, duration = 10, specs = {66}, talent =22435, charges = 1, class = "PALADIN", type = 3}, --Blessing of Spellwarding (talent) - [231895] = {cooldown = 120, duration = 25, specs = {70}, talent =22215, charges = 1, class = "PALADIN", type = 1}, --Crusade (talent) - [205191] = {cooldown = 60, duration = 10, specs = {70}, talent =22183, charges = 1, class = "PALADIN", type = 2}, --Eye for an Eye (talent) - [184662] = {cooldown = 120, duration = 15, specs = {70}, talent =false, charges = 1, class = "PALADIN", type = 2}, --Shield of Vengeance + [31884] = {cooldown = 120, duration = 20, specs = {65,66,70}, talent = false, charges = 1, class = "PALADIN", type = 1}, --Avenging Wrath + [216331] = {cooldown = 120, duration = 20, specs = {65}, talent = false, charges = 1, class = "PALADIN", type = 1}, --Avenging Crusader + [498] = {cooldown = 60, duration = 8, specs = {65}, talent = false, charges = 1, class = "PALADIN", type = 2}, --Divine Protection + [642] = {cooldown = 300, duration = 8, specs = {65,66,70}, talent = false, charges = 1, class = "PALADIN", type = 2}, --Divine Shield + [105809] = {cooldown = 90, duration = 20, specs = {65,66,70}, talent = false, charges = 1, class = "PALADIN", type = 2}, --Holy Avenger + [152262] = {cooldown = 45, duration = 15, specs = {65,66,70}, talent = false, charges = 1, class = "PALADIN", type = 2}, --Seraphim + [633] = {cooldown = 600, duration = false, specs = {65,66,70}, talent = false, charges = 1, class = "PALADIN", type = 3}, --Lay on Hands + [1022] = {cooldown = 300, duration = 10, specs = {65,66,70}, talent = false, charges = 1, class = "PALADIN", type = 3}, --Blessing of Protection + [6940] = {cooldown = 120, duration = 12, specs = {65,66,70}, talent = false, charges = 1, class = "PALADIN", type = 3}, --Blessing of Sacrifice + [31821] = {cooldown = 180, duration = 8, specs = {65}, talent = false, charges = 1, class = "PALADIN", type = 4}, --Aura Mastery + [1044] = {cooldown = 25, duration = 8, specs = {65,66,70}, talent = false, charges = 1, class = "PALADIN", type = 5}, --Blessing of Freedom + [853] = {cooldown = 60, duration = 6, specs = {65,66,70}, talent = false, charges = 1, class = "PALADIN", type = 5}, --Hammer of Justice + [115750] = {cooldown = 90, duration = 6, specs = {65,66,70}, talent = false, charges = 1, class = "PALADIN", type = 5}, --Blinding Light(talent) + [327193] = {cooldown = 90, duration = 15, specs = {66}, talent = false, charges = 1, class = "PALADIN", type = 1}, --Moment of Glory + [31850] = {cooldown = 120, duration = 8, specs = {66}, talent = false, charges = 1, class = "PALADIN", type = 2}, --Ardent Defender + [86659] = {cooldown = 300, duration = 8, specs = {66}, talent = false, charges = 1, class = "PALADIN", type = 2}, --Guardian of Ancient Kings + [204018] = {cooldown = 180, duration = 10, specs = {66}, talent = false, charges = 1, class = "PALADIN", type = 3}, --Blessing of Spellwarding + [231895] = {cooldown = 120, duration = 25, specs = {70}, talent = false, charges = 1, class = "PALADIN", type = 1}, --Crusade + [205191] = {cooldown = 60, duration = 10, specs = {70}, talent = false, charges = 1, class = "PALADIN", type = 2}, --Eye for an Eye + [184662] = {cooldown = 120, duration = 15, specs = {70}, talent = false, charges = 1, class = "PALADIN", type = 2}, --Shield of Vengeance --warrior -- 71 - Arms -- 72 - Fury -- 73 - Protection - [107574] = {cooldown = 90, duration = 20, specs = {71,73}, talent =22397, charges = 1, class = "WARRIOR", type = 1}, --Avatar - [227847] = {cooldown = 90, duration = 5, specs = {71}, talent =false, charges = 1, class = "WARRIOR", type = 1}, --Bladestorm - [46924] = {cooldown = 60, duration = 4, specs = {72}, talent =22400, charges = 1, class = "WARRIOR", type = 1}, --Bladestorm (talent) - [152277] = {cooldown = 60, duration = 6, specs = {71}, talent =21667, charges = 1, class = "WARRIOR", type = 1}, --Ravager (talent) - [228920] = {cooldown = 60, duration = 6, specs = {73}, talent =23099, charges = 1, class = "WARRIOR", type = 1}, --Ravager (talent) - [118038] = {cooldown = 180, duration = 8, specs = {71}, talent =false, charges = 1, class = "WARRIOR", type = 2}, --Die by the Sword - [97462] = {cooldown = 180, duration = 10, specs = {71,72,73}, talent =false, charges = 1, class = "WARRIOR", type = 4}, --Rallying Cry - [1719] = {cooldown = 90, duration = 10, specs = {72}, talent =false, charges = 1, class = "WARRIOR", type = 1}, --Recklessness - [184364] = {cooldown = 120, duration = 8, specs = {72}, talent =false, charges = 1, class = "WARRIOR", type = 2}, --Enraged Regeneration - [12975] = {cooldown = 180, duration = 15, specs = {73}, talent =false, charges = 1, class = "WARRIOR", type = 2}, --Last Stand - [871] = {cooldown = 8, duration = 240, specs = {73}, talent =false, charges = 1, class = "WARRIOR", type = 2}, --Shield Wall - [64382] = {cooldown = 180, duration = false, specs = {71,72,73}, talent =false, charges = 1, class = "WARRIOR", type = 5}, --Shattering Throw - [5246] = {cooldown = 90, duration = 8, specs = {71,72,73}, talent =false, charges = 1, class = "WARRIOR", type = 5}, --Intimidating Shout + [107574] = {cooldown = 90, duration = 20, specs = {71,73}, talent = false, charges = 1, class = "WARRIOR", type = 1}, --Avatar + [227847] = {cooldown = 90, duration = 5, specs = {71}, talent = false, charges = 1, class = "WARRIOR", type = 1}, --Bladestorm + [46924] = {cooldown = 60, duration = 4, specs = {72}, talent = false, charges = 1, class = "WARRIOR", type = 1}, --Bladestorm + [152277] = {cooldown = 60, duration = 6, specs = {71}, talent = false, charges = 1, class = "WARRIOR", type = 1}, --Ravager + [228920] = {cooldown = 60, duration = 6, specs = {73}, talent = false, charges = 1, class = "WARRIOR", type = 1}, --Ravager + [118038] = {cooldown = 180, duration = 8, specs = {71}, talent = false, charges = 1, class = "WARRIOR", type = 2}, --Die by the Sword + [97462] = {cooldown = 180, duration = 10, specs = {71,72,73}, talent = false, charges = 1, class = "WARRIOR", type = 4}, --Rallying Cry + [1719] = {cooldown = 90, duration = 10, specs = {72}, talent = false, charges = 1, class = "WARRIOR", type = 1}, --Recklessness + [184364] = {cooldown = 120, duration = 8, specs = {72}, talent = false, charges = 1, class = "WARRIOR", type = 2}, --Enraged Regeneration + [12975] = {cooldown = 180, duration = 15, specs = {73}, talent = false, charges = 1, class = "WARRIOR", type = 2}, --Last Stand + [871] = {cooldown = 8, duration = 240, specs = {73}, talent = false, charges = 1, class = "WARRIOR", type = 2}, --Shield Wall + [64382] = {cooldown = 180, duration = false, specs = {71,72,73}, talent = false, charges = 1, class = "WARRIOR", type = 5}, --Shattering Throw + [5246] = {cooldown = 90, duration = 8, specs = {71,72,73}, talent = false, charges = 1, class = "WARRIOR", type = 5}, --Intimidating Shout --warlock -- 265 - Affliction -- 266 - Demonology -- 267 - Destruction - [205180] = {cooldown = 180, duration = 20, specs = {265}, talent =false, charges = 1, class = "WARLOCK", type = 1}, --Summon Darkglare - --[342601] = {cooldown = 3600, duration = false, specs = {}, talent =false, charges = 1, class = "WARLOCK", type = 1}, --Ritual of Doom - [113860] = {cooldown = 120, duration = 20, specs = {265}, talent =19293, charges = 1, class = "WARLOCK", type = 1}, --Dark Soul: Misery (talent) - [104773] = {cooldown = 180, duration = 8, specs = {265,266,267}, talent =false, charges = 1, class = "WARLOCK", type = 2}, --Unending Resolve - [108416] = {cooldown = 60, duration = 20, specs = {265,266,267}, talent =19286, charges = 1, class = "WARLOCK", type = 2}, --Dark Pact (talent) - [265187] = {cooldown = 90, duration = 15, specs = {266}, talent =false, charges = 1, class = "WARLOCK", type = 1}, --Summon Demonic Tyrant - [111898] = {cooldown = 120, duration = 15, specs = {266}, talent =21717, charges = 1, class = "WARLOCK", type = 1}, --Grimoire: Felguard (talent) - [267171] = {cooldown = 60, duration = false, specs = {266}, talent =23138, charges = 1, class = "WARLOCK", type = 1}, --Demonic Strength (talent) - [267217] = {cooldown = 180, duration = 20, specs = {266}, talent =23091, charges = 1, class = "WARLOCK", type = 1}, --Nether Portal - [1122] = {cooldown = 180, duration = 30, specs = {267}, talent =false, charges = 1, class = "WARLOCK", type = 1}, --Summon Infernal - [113858] = {cooldown = 120, duration = 20, specs = {267}, talent =23092, charges = 1, class = "WARLOCK", type = 1}, --Dark Soul: Instability (talent) - [30283] = {cooldown = 60, duration = 3, specs = {265,266,267}, talent =false, charges = 1, class = "WARLOCK", type = 5}, --Shadowfury - [333889] = {cooldown = 180, duration = 15, specs = {265,266,267}, talent =false, charges = 1, class = "WARLOCK", type = 5}, --Fel Domination - [5484] = {cooldown = 40, duration = 20, specs = {265,266,267}, talent =23465, charges = 1, class = "WARLOCK", type = 5}, --Howl of Terror (talent) + [205180] = {cooldown = 180, duration = 20, specs = {265}, talent = false, charges = 1, class = "WARLOCK", type = 1}, --Summon Darkglare + [113860] = {cooldown = 120, duration = 20, specs = {265}, talent = false, charges = 1, class = "WARLOCK", type = 1}, --Dark Soul: Misery + [104773] = {cooldown = 180, duration = 8, specs = {265,266,267}, talent = false, charges = 1, class = "WARLOCK", type = 2}, --Unending Resolve + [108416] = {cooldown = 60, duration = 20, specs = {265,266,267}, talent = false, charges = 1, class = "WARLOCK", type = 2}, --Dark Pact + [265187] = {cooldown = 90, duration = 15, specs = {266}, talent = false, charges = 1, class = "WARLOCK", type = 1}, --Summon Demonic Tyrant + [111898] = {cooldown = 120, duration = 15, specs = {266}, talent = false, charges = 1, class = "WARLOCK", type = 1}, --Grimoire: Felguard + [267171] = {cooldown = 60, duration = false, specs = {266}, talent = false, charges = 1, class = "WARLOCK", type = 1}, --Demonic Strength + [267217] = {cooldown = 180, duration = 20, specs = {266}, talent = false, charges = 1, class = "WARLOCK", type = 1}, --Nether Portal + [1122] = {cooldown = 180, duration = 30, specs = {267}, talent = false, charges = 1, class = "WARLOCK", type = 1}, --Summon Infernal + [113858] = {cooldown = 120, duration = 20, specs = {267}, talent = false, charges = 1, class = "WARLOCK", type = 1}, --Dark Soul: Instability + [30283] = {cooldown = 60, duration = 3, specs = {265,266,267}, talent = false, charges = 1, class = "WARLOCK", type = 5}, --Shadowfury + [333889] = {cooldown = 180, duration = 15, specs = {265,266,267}, talent = false, charges = 1, class = "WARLOCK", type = 5}, --Fel Domination + [5484] = {cooldown = 40, duration = 20, specs = {265,266,267}, talent = false, charges = 1, class = "WARLOCK", type = 5}, --Howl of Terror --shaman -- 262 - Elemental -- 263 - Enchancment -- 264 - Restoration - [198067] = {cooldown = 150, duration = 30, specs = {262}, talent =false, charges = 1, class = "SHAMAN", type = 1}, --Fire Elemental - [192249] = {cooldown = 150, duration = 30, specs = {262}, talent =19272, charges = 1, class = "SHAMAN", type = 1}, --Storm Elemental (talent) - [108271] = {cooldown = 90, duration = 8, specs = {262,263,264}, talent =false, charges = 1, class = "SHAMAN", type = 2}, --Astral Shift - [108281] = {cooldown = 120, duration = 10, specs = {262,263}, talent =22172, charges = 1, class = "SHAMAN", type = 4}, --Ancestral Guidance (talent) - [51533] = {cooldown = 120, duration = 15, specs = {263}, talent =false, charges = 1, class = "SHAMAN", type = 1}, --Feral Spirit - [114050] = {cooldown = 180, duration = 15, specs = {262}, talent =21675, charges = 1, class = "SHAMAN", type = 1}, --Ascendance (talent) - [114051] = {cooldown = 180, duration = 15, specs = {263}, talent =21972, charges = 1, class = "SHAMAN", type = 1}, --Ascendance (talent) - [114052] = {cooldown = 180, duration = 15, specs = {264}, talent =22359, charges = 1, class = "SHAMAN", type = 4}, --Ascendance (talent) - [98008] = {cooldown = 180, duration = 6, specs = {264}, talent =false, charges = 1, class = "SHAMAN", type = 4}, --Spirit Link Totem - [108280] = {cooldown = 180, duration = 10, specs = {264}, talent =false, charges = 1, class = "SHAMAN", type = 4}, --Healing Tide Totem - [207399] = {cooldown = 240, duration = 30, specs = {264}, talent =22323, charges = 1, class = "SHAMAN", type = 4}, --Ancestral Protection Totem (talent) - [16191] = {cooldown = 180, duration = 8, specs = {264}, talent =false, charges = 1, class = "SHAMAN", type = 4}, --Mana Tide Totem - [198103] = {cooldown = 300, duration = 60, specs = {262,263,264}, talent =false, charges = 1, class = "SHAMAN", type = 2}, --Earth Elemental - [192058] = {cooldown = 60, duration = false, specs = {262,263,264}, talent =false, charges = 1, class = "SHAMAN", type = 5}, --Capacitor Totem - [8143] = {cooldown = 60, duration = 10, specs = {262,263,264}, talent =false, charges = 1, class = "SHAMAN", type = 5}, --Tremor Totem - [192077] = {cooldown = 120, duration = 15, specs = {262,263,264}, talent =21966, charges = 1, class = "SHAMAN", type = 5}, --Wind Rush Totem (talent) + [198067] = {cooldown = 150, duration = 30, specs = {262}, talent = false, charges = 1, class = "SHAMAN", type = 1}, --Fire Elemental + [192249] = {cooldown = 150, duration = 30, specs = {262}, talent = false, charges = 1, class = "SHAMAN", type = 1}, --Storm Elemental + [108271] = {cooldown = 90, duration = 8, specs = {262,263,264}, talent = false, charges = 1, class = "SHAMAN", type = 2}, --Astral Shift + [108281] = {cooldown = 120, duration = 10, specs = {262,263}, talent = false, charges = 1, class = "SHAMAN", type = 4}, --Ancestral Guidance + [51533] = {cooldown = 120, duration = 15, specs = {263}, talent = false, charges = 1, class = "SHAMAN", type = 1}, --Feral Spirit + [114050] = {cooldown = 180, duration = 15, specs = {262}, talent = false, charges = 1, class = "SHAMAN", type = 1}, --Ascendance + [114051] = {cooldown = 180, duration = 15, specs = {263}, talent = false, charges = 1, class = "SHAMAN", type = 1}, --Ascendance + [114052] = {cooldown = 180, duration = 15, specs = {264}, talent = false, charges = 1, class = "SHAMAN", type = 4}, --Ascendance + [98008] = {cooldown = 180, duration = 6, specs = {264}, talent = false, charges = 1, class = "SHAMAN", type = 4}, --Spirit Link Totem + [108280] = {cooldown = 180, duration = 10, specs = {264}, talent = false, charges = 1, class = "SHAMAN", type = 4}, --Healing Tide Totem + [207399] = {cooldown = 240, duration = 30, specs = {264}, talent = false, charges = 1, class = "SHAMAN", type = 4}, --Ancestral Protection Totem + [16191] = {cooldown = 180, duration = 8, specs = {264}, talent = false, charges = 1, class = "SHAMAN", type = 4}, --Mana Tide Totem + [198103] = {cooldown = 300, duration = 60, specs = {262,263,264}, talent = false, charges = 1, class = "SHAMAN", type = 2}, --Earth Elemental + [192058] = {cooldown = 60, duration = false, specs = {262,263,264}, talent = false, charges = 1, class = "SHAMAN", type = 5}, --Capacitor Totem + [8143] = {cooldown = 60, duration = 10, specs = {262,263,264}, talent = false, charges = 1, class = "SHAMAN", type = 5}, --Tremor Totem + [192077] = {cooldown = 120, duration = 15, specs = {262,263,264}, talent = false, charges = 1, class = "SHAMAN", type = 5}, --Wind Rush Totem --monk -- 268 - Brewmaster -- 269 - Windwalker -- 270 - Restoration - [132578] = {cooldown = 180, duration = 25, specs = {268}, talent =false, charges = 1, class = "MONK", type = 1}, --Invoke Niuzao, the Black Ox - [115080] = {cooldown = 180, duration = false, specs = {268,269,270}, talent =false, charges = 1, class = "MONK", type = 1}, --Touch of Death - [115203] = {cooldown = 420, duration = 15, specs = {268}, talent =false, charges = 1, class = "MONK", type = 2}, --Fortifying Brew - [115176] = {cooldown = 300, duration = 8, specs = {268}, talent =false, charges = 1, class = "MONK", type = 2}, --Zen Meditation - [115399] = {cooldown = 120, duration = false, specs = {268}, talent =19992, charges = 1, class = "MONK", type = 2}, --Black Ox brew (talent) - [122278] = {cooldown = 120, duration = 10, specs = {268,269,270}, talent =20175, charges = 1, class = "MONK", type = 2}, --Dampen Harm (talent) - [137639] = {cooldown = 90, duration = 15, specs = {269}, talent =false, charges = 1, class = "MONK", type = 1}, --Storm, Earth, and Fire - [123904] = {cooldown = 120, duration = 24, specs = {269}, talent =false, charges = 1, class = "MONK", type = 1}, --Invoke Xuen, the White Tiger - [152173] = {cooldown = 90, duration = 12, specs = {269}, talent =21191, charges = 1, class = "MONK", type = 1}, --Serenity (talent) - [122470] = {cooldown = 90, duration = 6, specs = {269}, talent =false, charges = 1, class = "MONK", type = 2}, --Touch of Karma - [322118] = {cooldown = 180, duration = 25, specs = {270}, talent =false, charges = 1, class = "MONK", type = 4}, --Invoke Yulon, the Jade serpent - [243435] = {cooldown = 90, duration = 15, specs = {269,270}, talent =false, charges = 1, class = "MONK", type = 2}, --Fortifying Brew - [122783] = {cooldown = 90, duration = 6, specs = {269,270}, talent =20173, charges = 1, class = "MONK", type = 2}, --Diffuse Magic (talent) - [116849] = {cooldown = 120, duration = 12, specs = {270}, talent =false, charges = 1, class = "MONK", type = 3}, --Life Cocoon - [115310] = {cooldown = 180, duration = false, specs = {270}, talent =false, charges = 1, class = "MONK", type = 4}, --Revival - [197908] = {cooldown = 90, duration = 10, specs = {270}, talent =22166, charges = 1, class = "MONK", type = 5}, --Mana tea (talent) - [116844] = {cooldown = 45, duration = 5, specs = {268,269,270}, talent =19995, charges = 1, class = "MONK", type = 5}, --Ring of peace (talent) - [119381] = {cooldown = 50, duration = 3, specs = {268,269,270}, talent =false, charges = 1, class = "MONK", type = 5}, --Leg Sweep + [132578] = {cooldown = 180, duration = 25, specs = {268}, talent = false, charges = 1, class = "MONK", type = 1}, --Invoke Niuzao, the Black Ox + [115080] = {cooldown = 180, duration = false, specs = {268,269,270}, talent = false, charges = 1, class = "MONK", type = 1}, --Touch of Death + [115203] = {cooldown = 420, duration = 15, specs = {268}, talent = false, charges = 1, class = "MONK", type = 2}, --Fortifying Brew + [115176] = {cooldown = 300, duration = 8, specs = {268}, talent = false, charges = 1, class = "MONK", type = 2}, --Zen Meditation + [115399] = {cooldown = 120, duration = false, specs = {268}, talent = false, charges = 1, class = "MONK", type = 2}, --Black Ox brew + [122278] = {cooldown = 120, duration = 10, specs = {268,269,270}, talent = false, charges = 1, class = "MONK", type = 2}, --Dampen Harm + [137639] = {cooldown = 90, duration = 15, specs = {269}, talent = false, charges = 1, class = "MONK", type = 1}, --Storm, Earth, and Fire + [123904] = {cooldown = 120, duration = 24, specs = {269}, talent = false, charges = 1, class = "MONK", type = 1}, --Invoke Xuen, the White Tiger + [152173] = {cooldown = 90, duration = 12, specs = {269}, talent = false, charges = 1, class = "MONK", type = 1}, --Serenity + [122470] = {cooldown = 90, duration = 6, specs = {269}, talent = false, charges = 1, class = "MONK", type = 2}, --Touch of Karma + [322118] = {cooldown = 180, duration = 25, specs = {270}, talent = false, charges = 1, class = "MONK", type = 4}, --Invoke Yulon, the Jade serpent + [243435] = {cooldown = 90, duration = 15, specs = {269,270}, talent = false, charges = 1, class = "MONK", type = 2}, --Fortifying Brew + [122783] = {cooldown = 90, duration = 6, specs = {269,270}, talent = false, charges = 1, class = "MONK", type = 2}, --Diffuse Magic + [116849] = {cooldown = 120, duration = 12, specs = {270}, talent = false, charges = 1, class = "MONK", type = 3}, --Life Cocoon + [115310] = {cooldown = 180, duration = false, specs = {270}, talent = false, charges = 1, class = "MONK", type = 4}, --Revival + [197908] = {cooldown = 90, duration = 10, specs = {270}, talent = false, charges = 1, class = "MONK", type = 5}, --Mana tea + [116844] = {cooldown = 45, duration = 5, specs = {268,269,270}, talent = false, charges = 1, class = "MONK", type = 5}, --Ring of peace + [119381] = {cooldown = 50, duration = 3, specs = {268,269,270}, talent = false, charges = 1, class = "MONK", type = 5}, --Leg Sweep --hunter -- 253 - Beast Mastery -- 254 - Marksmenship -- 255 - Survival - [193530] = {cooldown = 120, duration = 20, specs = {253}, talent =false, charges = 1, class = "HUNTER", type = 1}, --Aspect of the Wild - [19574] = {cooldown = 90, duration = 12, specs = {253}, talent =false, charges = 1, class = "HUNTER", type = 1}, --Bestial Wrath - [201430] = {cooldown = 180, duration = 12, specs = {253}, talent =23044, charges = 1, class = "HUNTER", type = 1}, --Stampede (talent) - [288613] = {cooldown = 180, duration = 15, specs = {254}, talent =false, charges = 1, class = "HUNTER", type = 1}, --Trueshot - [199483] = {cooldown = 60, duration = 60, specs = {253,254,255}, talent =23100, charges = 1, class = "HUNTER", type = 2}, --Camouflage (talent) - [281195] = {cooldown = 180, duration = 6, specs = {253,254,255}, talent =false, charges = 1, class = "HUNTER", type = 2}, --Survival of the Fittest - [266779] = {cooldown = 120, duration = 20, specs = {255}, talent =false, charges = 1, class = "HUNTER", type = 1}, --Coordinated Assault - [186265] = {cooldown = 180, duration = 8, specs = {253,254,255}, talent =false, charges = 1, class = "HUNTER", type = 2}, --Aspect of the Turtle - [109304] = {cooldown = 120, duration = false, specs = {253,254,255}, talent =false, charges = 1, class = "HUNTER", type = 2}, --Exhilaration - [186257] = {cooldown = 144, duration = 14, specs = {253,254,255}, talent =false, charges = 1, class = "HUNTER", type = 5}, --Aspect of the cheetah - [19577] = {cooldown = 60, duration = 5, specs = {253,255}, talent =false, charges = 1, class = "HUNTER", type = 5}, --Intimidation - [109248] = {cooldown = 45, duration = 10, specs = {253,254,255}, talent =22499, charges = 1, class = "HUNTER", type = 5}, --Binding Shot (talent) - [187650] = {cooldown = 25, duration = 60, specs = {253,254,255}, talent =false, charges = 1, class = "HUNTER", type = 5}, --Freezing Trap - [186289] = {cooldown = 72, duration = 15, specs = {255}, talent =false, charges = 1, class = "HUNTER", type = 5}, --Aspect of the eagle + [193530] = {cooldown = 120, duration = 20, specs = {253}, talent = false, charges = 1, class = "HUNTER", type = 1}, --Aspect of the Wild + [19574] = {cooldown = 90, duration = 12, specs = {253}, talent = false, charges = 1, class = "HUNTER", type = 1}, --Bestial Wrath + [201430] = {cooldown = 180, duration = 12, specs = {253}, talent = false, charges = 1, class = "HUNTER", type = 1}, --Stampede + [288613] = {cooldown = 180, duration = 15, specs = {254}, talent = false, charges = 1, class = "HUNTER", type = 1}, --Trueshot + [199483] = {cooldown = 60, duration = 60, specs = {253,254,255}, talent = false, charges = 1, class = "HUNTER", type = 2}, --Camouflage + [281195] = {cooldown = 180, duration = 6, specs = {253,254,255}, talent = false, charges = 1, class = "HUNTER", type = 2}, --Survival of the Fittest + [266779] = {cooldown = 120, duration = 20, specs = {255}, talent = false, charges = 1, class = "HUNTER", type = 1}, --Coordinated Assault + [186265] = {cooldown = 180, duration = 8, specs = {253,254,255}, talent = false, charges = 1, class = "HUNTER", type = 2}, --Aspect of the Turtle + [109304] = {cooldown = 120, duration = false, specs = {253,254,255}, talent = false, charges = 1, class = "HUNTER", type = 2}, --Exhilaration + [186257] = {cooldown = 144, duration = 14, specs = {253,254,255}, talent = false, charges = 1, class = "HUNTER", type = 5}, --Aspect of the cheetah + [19577] = {cooldown = 60, duration = 5, specs = {253,255}, talent = false, charges = 1, class = "HUNTER", type = 5}, --Intimidation + [109248] = {cooldown = 45, duration = 10, specs = {253,254,255}, talent = false, charges = 1, class = "HUNTER", type = 5}, --Binding Shot + [187650] = {cooldown = 25, duration = 60, specs = {253,254,255}, talent = false, charges = 1, class = "HUNTER", type = 5}, --Freezing Trap + [186289] = {cooldown = 72, duration = 15, specs = {255}, talent = false, charges = 1, class = "HUNTER", type = 5}, --Aspect of the eagle --druid -- 102 - Balance @@ -424,135 +424,142 @@ LIB_OPEN_RAID_COOLDOWNS_INFO = { -- 104 - Guardian -- 105 - Restoration - [77761] = {cooldown = 120, duration = 8, specs = {102,103,104,105}, talent =false, charges = 1, class = "DRUID", type = 4}, --Stampeding Roar - [194223] = {cooldown = 180, duration = 20, specs = {102}, talent =false, charges = 1, class = "DRUID", type = 1}, --Celestial Alignment - [102560] = {cooldown = 180, duration = 30, specs = {102}, talent =21702, charges = 1, class = "DRUID", type = 1}, --Incarnation: Chosen of Elune (talent) - [22812] = {cooldown = 60, duration = 12, specs = {102,103,104,105}, talent =false, charges = 1, class = "DRUID", type = 2}, --Barkskin - [108238] = {cooldown = 90, duration = false, specs = {102,103,104,105}, talent =18570, charges = 1, class = "DRUID", type = 2}, --Renewal (talent) - [29166] = {cooldown = 180, duration = 12, specs = {102,105}, talent =false, charges = 1, class = "DRUID", type = 3}, --Innervate - [106951] = {cooldown = 180, duration = 15, specs = {103,104}, talent =false, charges = 1, class = "DRUID", type = 1}, --Berserk - [102543] = {cooldown = 30, duration = 180, specs = {103}, talent =21704, charges = 1, class = "DRUID", type = 1}, --Incarnation: King of the Jungle (talent) - [61336] = {cooldown = 120, duration = 6, specs = {103,104}, talent =false, charges = 2, class = "DRUID", type = 2}, --Survival Instincts (2min feral 4min guardian, same spellid) - [102558] = {cooldown = 180, duration = 30, specs = {104}, talent =22388, charges = 1, class = "DRUID", type = 2}, --Incarnation: Guardian of Ursoc (talent) - [33891] = {cooldown = 180, duration = 30, specs = {105}, talent =22421, charges = 1, class = "DRUID", type = 2}, --Incarnation: Tree of Life (talent) - [102342] = {cooldown = 60, duration = 12, specs = {105}, talent =false, charges = 1, class = "DRUID", type = 3}, --Ironbark - [203651] = {cooldown = 60, duration = false, specs = {105}, talent =22422, charges = 1, class = "DRUID", type = 3}, --Overgrowth (talent) - [740] = {cooldown = 180, duration = 8, specs = {105}, talent =false, charges = 1, class = "DRUID", type = 4}, --Tranquility - [197721] = {cooldown = 90, duration = 8, specs = {105}, talent =22404, charges = 1, class = "DRUID", type = 4}, --Flourish (talent) - [132469] = {cooldown = 30, duration = false, specs = {102,103,104,105}, talent =false, charges = 1, class = "DRUID", type = 5}, --Typhoon - [319454] = {cooldown = 300, duration = 45, specs = {102,103,104,105}, talent =18577, charges = 1, class = "DRUID", type = 5}, --Heart of the Wild (talent) - [102793] = {cooldown = 60, duration = 10, specs = {102,103,104,105}, talent =false, charges = 1, class = "DRUID", type = 5}, --Ursol's Vortex + [22812] = {cooldown = 60, duration = 12, specs = {102, 103, 104, 105}, talent = false, charges = 1, class = "DRUID", type = 2}, --Barkskin + [106951] = {cooldown = 180, duration = 15, specs = {103, 104}, talent = false, charges = 1, class = "DRUID", type = 1}, --Berserk + [194223] = {cooldown = 180, duration = 20, specs = {102}, talent = false, charges = 1, class = "DRUID", type = 1}, --Celestial Alignment + [391528] = {cooldown = 120, duration = 4, specs = {102, 103, 104, 105}, talent = false, charges = 1, class = "DRUID", type = 1}, --Convoke the Spirits + [197721] = {cooldown = 90, duration = 8, specs = {105}, talent = false, charges = 1, class = "DRUID", type = 4}, --Flourish + [319454] = {cooldown = 300, duration = 45, specs = {102, 103, 104, 105}, talent = false, charges = 1, class = "DRUID", type = 1}, --Heart of the Wild + [102543] = {cooldown = 30, duration = 180, specs = {103}, talent = false, charges = 1, class = "DRUID", type = 1}, --Incarnation: Avatar of Ashamane + [102560] = {cooldown = 180, duration = 30, specs = {102}, talent = false, charges = 1, class = "DRUID", type = 1}, --Incarnation: Chosen of Elune + [102558] = {cooldown = 180, duration = 30, specs = {104}, talent = false, charges = 1, class = "DRUID", type = 2}, --Incarnation: Guardian of Ursoc + [33891] = {cooldown = 180, duration = 30, specs = {105}, talent = false, charges = 1, class = "DRUID", type = 4}, --Incarnation: Tree of Life + [99] = {cooldown = 30, duration = 3, specs = {102, 103, 104, 105}, talent = false, charges = 1, class = "DRUID", type = 8}, --Incapacitating Roar + [29166] = {cooldown = 180, duration = 12, specs = {102, 105}, talent = false, charges = 1, class = "DRUID", type = 5}, --Innervate + [102342] = {cooldown = 60, duration = 12, specs = {105}, talent = false, charges = 1, class = "DRUID", type = 3}, --Ironbark + [203651] = {cooldown = 60, duration = 0, specs = {105}, talent = false, charges = 1, class = "DRUID", type = 3}, --Overgrowth + [108238] = {cooldown = 90, duration = 0, specs = {102, 103, 104, 105}, talent = false, charges = 1, class = "DRUID", type = 2}, --Renewal + [77761] = {cooldown = 120, duration = 8, specs = {102, 103, 104, 105}, talent = false, charges = 1, class = "DRUID", type = 4}, --Stampeding Roar | 106898 + [61336] = {cooldown = 120, duration = 6, specs = {103, 104}, talent = false, charges = 1, class = "DRUID", type = 2}, --Survival Instincts + [740] = {cooldown = 180, duration = 8, specs = {105}, talent = false, charges = 1, class = "DRUID", type = 4}, --Tranquility + [132469] = {cooldown = 30, duration = 0, specs = {102, 103, 104, 105}, talent = false, charges = 1, class = "DRUID", type = 8}, --Typhoon + [102793] = {cooldown = 60, duration = 10, specs = {102, 103, 104, 105}, talent = false, charges = 1, class = "DRUID", type = 8}, --Ursol's Vortex --death knight -- 252 - Unholy -- 251 - Frost -- 252 - Blood - [275699] = {cooldown = 90, duration = 15, specs = {252}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 1}, --Apocalypse - [42650] = {cooldown = 480, duration = 30, specs = {252}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 1}, --Army of the Dead - [49206] = {cooldown = 180, duration = 30, specs = {252}, talent =22110, charges = 1, class = "DEATHKNIGHT", type = 1}, --Summon Gargoyle (talent) - [207289] = {cooldown = 78, duration = 12, specs = {252}, talent =22538, charges = 1, class = "DEATHKNIGHT", type = 1}, --Unholy Assault (talent) - [48743] = {cooldown = 120, duration = 15, specs = {250,251,252}, talent =23373, charges = 1, class = "DEATHKNIGHT", type = 2}, --Death Pact (talent) - [48707] = {cooldown = 60, duration = 10, specs = {250,251,252}, talent =23373, charges = 1, class = "DEATHKNIGHT", type = 2}, --Anti-magic Shell - [152279] = {cooldown = 120, duration = 5, specs = {251}, talent =22537, charges = 1, class = "DEATHKNIGHT", type = 1}, --Breath of Sindragosa (talent) - [47568] = {cooldown = 120, duration = 20, specs = {251}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 1}, --Empower Rune Weapon - [279302] = {cooldown = 120, duration = 10, specs = {251}, talent =22535, charges = 1, class = "DEATHKNIGHT", type = 1}, --Frostwyrm's Fury (talent) - [49028] = {cooldown = 120, duration = 8, specs = {250}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 1}, --Dancing Rune Weapon - [55233] = {cooldown = 90, duration = 10, specs = {250}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 2}, --Vampiric Blood - [48792] = {cooldown = 120, duration = 8, specs = {250,251,252}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 2}, --Icebound Fortitude - [51052] = {cooldown = 120, duration = 10, specs = {250,251,252}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 4}, --Anti-magic Zone - [219809] = {cooldown = 60, duration = 8, specs = {250}, talent =23454, charges = 1, class = "DEATHKNIGHT", type = 2}, --Tombstone (talent) - [108199] = {cooldown = 120, duration = false, specs = {250}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 5}, --Gorefiend's Grasp - [207167] = {cooldown = 60, duration = 5, specs = {251}, talent =22519, charges = 1, class = "DEATHKNIGHT", type = 5}, --Blinding Sleet (talent) - [108194] = {cooldown = 45, duration = 4, specs = {251,252}, talent =22520, charges = 1, class = "DEATHKNIGHT", type = 5}, --Asphyxiate (talent) - [221562] = {cooldown = 45, duration = 5, specs = {250}, talent =false, charges = 1, class = "DEATHKNIGHT", type = 5}, --Asphyxiate - [212552] = {cooldown = 60, duration = 4, specs = {250,251,252}, talent =19228, charges = 1, class = "DEATHKNIGHT", type = 5}, --Wraith walk (talent) + [383269] = {cooldown = 120, duration = 12, specs = {250, 251, 252}, talent = false, charges = 1, class = "DEATHKNIGHT", type = 1}, --Abomination Limb + [48707] = {cooldown = 60, duration = 10, specs = {250, 251, 252}, talent = false, charges = 1, class = "DEATHKNIGHT", type = 2}, --Anti-Magic Shell + [51052] = {cooldown = 120, duration = 10, specs = {250, 251, 252}, talent = false, charges = 1, class = "DEATHKNIGHT", type = 4}, --Anti-Magic Zone + [275699] = {cooldown = 90, duration = 15, specs = {252}, talent = false, charges = 1, class = "DEATHKNIGHT", type = 1}, --Apocalypse + [42650] = {cooldown = 480, duration = 30, specs = {252}, talent = false, charges = 1, class = "DEATHKNIGHT", type = 1}, --Army of the Dead + [221562] = {cooldown = 45, duration = 5, specs = {250}, talent = false, charges = 1, class = "DEATHKNIGHT", type = 8}, --Asphyxiate + [108194] = {cooldown = 45, duration = 4, specs = {251, 252}, talent = false, charges = 1, class = "DEATHKNIGHT", type = 8}, --Asphyxiate + [207167] = {cooldown = 60, duration = 5, specs = {251}, talent = false, charges = 1, class = "DEATHKNIGHT", type = 8}, --Blinding Sleet + [152279] = {cooldown = 120, duration = 5, specs = {251}, talent = false, charges = 1, class = "DEATHKNIGHT", type = 1}, --Breath of Sindragosa + [49028] = {cooldown = 120, duration = 8, specs = {250}, talent = false, charges = 1, class = "DEATHKNIGHT", type = 1}, --Dancing Rune Weapon + [48743] = {cooldown = 120, duration = 15, specs = {250, 251, 252}, talent = false, charges = 1, class = "DEATHKNIGHT", type = 2}, --Death Pact + [47568] = {cooldown = 120, duration = 20, specs = {251}, talent = false, charges = 1, class = "DEATHKNIGHT", type = 1}, --Empower Rune Weapon + [279302] = {cooldown = 120, duration = 10, specs = {251}, talent = false, charges = 1, class = "DEATHKNIGHT", type = 1}, --Frostwyrm's Fury + [108199] = {cooldown = 120, duration = 0, specs = {250}, talent = false, charges = 1, class = "DEATHKNIGHT", type = 5}, --Gorefiend's Grasp + [48792] = {cooldown = 120, duration = 8, specs = {250, 251, 252}, talent = false, charges = 1, class = "DEATHKNIGHT", type = 2}, --Icebound Fortitude + [46585] = {cooldown = 120, duration = 60, specs = {250, 251, 252}, talent = false, charges = 1, class = "DEATHKNIGHT", type = 1}, --Raise Dead + [49206] = {cooldown = 180, duration = 30, specs = {252}, talent = false, charges = 1, class = "DEATHKNIGHT", type = 1}, --Summon Gargoyle + [219809] = {cooldown = 60, duration = 8, specs = {250}, talent = false, charges = 1, class = "DEATHKNIGHT", type = 2}, --Tombstone + [207289] = {cooldown = 78, duration = 12, specs = {252}, talent = false, charges = 1, class = "DEATHKNIGHT", type = 1}, --Unholy Assault + [55233] = {cooldown = 90, duration = 10, specs = {250}, talent = false, charges = 1, class = "DEATHKNIGHT", type = 2}, --Vampiric Blood + [212552] = {cooldown = 60, duration = 4, specs = {250, 251, 252}, talent = false, charges = 1, class = "DEATHKNIGHT", type = 2}, --Wraith Walk + --demon hunter -- 577 - Havoc -- 581 - Vengance - [191427] = {cooldown = 240, duration = 30, specs = {577}, talent =false, charges = 1, class = "DEMONHUNTER", type = 1}, --Metamorphosis - [198589] = {cooldown = 60, duration = 10, specs = {577}, talent =false, charges = 1, class = "DEMONHUNTER", type = 2}, --Blur - [196555] = {cooldown = 120, duration = 5, specs = {577}, talent =21865, charges = 1, class = "DEMONHUNTER", type = 2}, --Netherwalk (talent) - [187827] = {cooldown = 180, duration = 15, specs = {581}, talent =false, charges = 1, class = "DEMONHUNTER", type = 2}, --Metamorphosis - [196718] = {cooldown = 180, duration = 8, specs = {577}, talent =false, charges = 1, class = "DEMONHUNTER", type = 4}, --Darkness - [188501] = {cooldown = 30, duration = 10, specs = {577,581}, talent =false, charges = 1, class = "DEMONHUNTER", type = 5}, --Spectral Sight - [179057] = {cooldown = 60, duration = 2, specs = {577}, talent =false, charges = 1, class = "DEMONHUNTER", type = 5}, --Chaos Nova - [211881] = {cooldown = 30, duration = 4, specs = {577}, talent =22767, charges = 1, class = "DEMONHUNTER", type = 5}, --Fel Eruption (talent) - [320341] = {cooldown = 90, duration = false, specs = {581}, talent =21902, charges = 1, class = "DEMONHUNTER", type = 1}, --Bulk Extraction (talent) - [204021] = {cooldown = 60, duration = 10, specs = {581}, talent =false, charges = 1, class = "DEMONHUNTER", type = 2}, --Fiery Brand - [263648] = {cooldown = 30, duration = 12, specs = {581}, talent =22768, charges = 1, class = "DEMONHUNTER", type = 2}, --Soul Barrier (talent) - [207684] = {cooldown = 90, duration = 12, specs = {581}, talent =false, charges = 1, class = "DEMONHUNTER", type = 5}, --Sigil of Misery - [202137] = {cooldown = 60, duration = 8, specs = {581}, talent =false, charges = 1, class = "DEMONHUNTER", type = 5}, --Sigil of Silence - [202138] = {cooldown = 90, duration = 6, specs = {581}, talent =22511, charges = 1, class = "DEMONHUNTER", type = 5}, --Sigil of Chains (talent) - + [198589] = {cooldown = 60, duration = 10, specs = {577}, talent = false, charges = 1, class = "DEMONHUNTER", type = 2}, --Blur + [320341] = {cooldown = 90, duration = 0, specs = {581}, talent = false, charges = 1, class = "DEMONHUNTER", type = 2}, --Bulk Extraction + [179057] = {cooldown = 60, duration = 2, specs = {577}, talent = false, charges = 1, class = "DEMONHUNTER", type = 8}, --Chaos Nova + [196718] = {cooldown = 180, duration = 8, specs = {577}, talent = false, charges = 1, class = "DEMONHUNTER", type = 4}, --Darkness + [211881] = {cooldown = 30, duration = 4, specs = {577}, talent = false, charges = 1, class = "DEMONHUNTER", type = 5}, --Fel Eruption + [204021] = {cooldown = 60, duration = 10, specs = {581}, talent = false, charges = 1, class = "DEMONHUNTER", type = 2}, --Fiery Brand + [217832] = {cooldown = 45, duration = 0, specs = {577, 581}, talent = false, charges = 1, class = "DEMONHUNTER", type = 8}, --Imprison + [187827] = {cooldown = 180, duration = 15, specs = {581}, talent = false, charges = 1, class = "DEMONHUNTER", type = 2}, --Metamorphosis + [191427] = {cooldown = 240, duration = 30, specs = {577}, talent = false, charges = 1, class = "DEMONHUNTER", type = 1}, --Metamorphosis + [196555] = {cooldown = 120, duration = 5, specs = {577}, talent = false, charges = 1, class = "DEMONHUNTER", type = 2}, --Netherwalk + [202138] = {cooldown = 90, duration = 6, specs = {581}, talent = false, charges = 1, class = "DEMONHUNTER", type = 8}, --Sigil of Chains + [207684] = {cooldown = 90, duration = 12, specs = {581}, talent = false, charges = 1, class = "DEMONHUNTER", type = 8}, --Sigil of Misery + [202137] = {cooldown = 60, duration = 8, specs = {581}, talent = false, charges = 1, class = "DEMONHUNTER", type = 6}, --Sigil of Silence + [263648] = {cooldown = 30, duration = 12, specs = {581}, talent = false, charges = 1, class = "DEMONHUNTER", type = 2}, --Soul Barrier + [188501] = {cooldown = 30, duration = 10, specs = {577, 581}, talent = false, charges = 1, class = "DEMONHUNTER", type = 5}, --Spectral Sight + --mage -- 62 - Arcane -- 63 - Fire -- 64 - Frost - - [12042] = {cooldown = 90, duration = 10, specs = {62}, talent =false, charges = 1, class = "MAGE", type = 1}, --Arcane Power - [12051] = {cooldown = 90, duration = 6, specs = {62}, talent =false, charges = 1, class = "MAGE", type = 1}, --Evocation - [110960] = {cooldown = 120, duration = 20, specs = {62}, talent =false, charges = 1, class = "MAGE", type = 2}, --Greater Invisibility - [235450] = {cooldown = 25, duration = 60, specs = {62}, talent =false, charges = 1, class = "MAGE", type = 5}, --Prismatic Barrier - [235313] = {cooldown = 25, duration = 60, specs = {63}, talent =false, charges = 1, class = "MAGE", type = 5}, --Blazing Barrier - [11426] = {cooldown = 25, duration = 60, specs = {64}, talent =false, charges = 1, class = "MAGE", type = 5}, --Ice Barrier - [190319] = {cooldown = 120, duration = 10, specs = {63}, talent =false, charges = 1, class = "MAGE", type = 1}, --Combustion - [55342] = {cooldown = 120, duration = 40, specs = {62,63,64}, talent =22445, charges = 1, class = "MAGE", type = 1}, --Mirror Image - [66] = {cooldown = 300, duration = 20, specs = {63,64}, talent =false, charges = 1, class = "MAGE", type = 2}, --Invisibility - [12472] = {cooldown = 180, duration = 20, specs = {64}, talent =false, charges = 1, class = "MAGE", type = 1}, --Icy Veins - [205021] = {cooldown = 78, duration = 5, specs = {64}, talent =22309, charges = 1, class = "MAGE", type = 1}, --Ray of Frost (talent) - [45438] = {cooldown = 240, duration = 10, specs = {62,63,64}, talent =false, charges = 1, class = "MAGE", type = 2}, --Ice Block - [235219] = {cooldown = 300, duration = false, specs = {64}, talent =false, charges = 1, class = "MAGE", type = 5}, --Cold Snap - [113724] = {cooldown = 45, duration = 10, specs = {62,63,64}, talent =22471, charges = 1, class = "MAGE", type = 5}, --Ring of Frost (talent) + [12042] = {cooldown = 90, duration = 10, specs = {62}, talent = false, charges = 1, class = "MAGE", type = 1}, --Arcane Power + [235313] = {cooldown = 25, duration = 60, specs = {63}, talent = false, charges = 1, class = "MAGE", type = 5}, --Blazing Barrier + [235219] = {cooldown = 300, duration = 0, specs = {64}, talent = false, charges = 1, class = "MAGE", type = 2}, --Cold Snap + [190319] = {cooldown = 120, duration = 10, specs = {63}, talent = false, charges = 1, class = "MAGE", type = 1}, --Combustion + [12051] = {cooldown = 90, duration = 6, specs = {62}, talent = false, charges = 1, class = "MAGE", type = 1}, --Evocation + [110960] = {cooldown = 120, duration = 20, specs = {62}, talent = false, charges = 1, class = "MAGE", type = 2}, --Greater Invisibility | 110959 + [11426] = {cooldown = 25, duration = 60, specs = {64}, talent = false, charges = 1, class = "MAGE", type = 2}, --Ice Barrier + [45438] = {cooldown = 240, duration = 10, specs = {62, 63, 64}, talent = false, charges = 1, class = "MAGE", type = 2}, --Ice Block + [12472] = {cooldown = 180, duration = 20, specs = {64}, talent = false, charges = 1, class = "MAGE", type = 1}, --Icy Veins + [66] = {cooldown = 300, duration = 20, specs = {63, 64}, talent = false, charges = 1, class = "MAGE", type = 2}, --Invisibility + [383121] = {cooldown = 60, duration = 0, specs = {62, 63, 64}, talent = false, charges = 1, class = "MAGE", type = 8}, --Mass Polymorph + [55342] = {cooldown = 120, duration = 40, specs = {62, 63, 64}, talent = false, charges = 1, class = "MAGE", type = 2}, --Mirror Image + [235450] = {cooldown = 25, duration = 60, specs = {62}, talent = false, charges = 1, class = "MAGE", type = 5}, --Prismatic Barrier + [205021] = {cooldown = 78, duration = 5, specs = {64}, talent = false, charges = 1, class = "MAGE", type = 1}, --Ray of Frost + [113724] = {cooldown = 45, duration = 10, specs = {62, 63, 64}, talent = false, charges = 1, class = "MAGE", type = 8}, --Ring of Frost --priest -- 256 - Discipline -- 257 - Holy -- 258 - Shadow - [10060] = {cooldown = 120, duration = 20, specs = {256,257,258}, talent =false, charges = 1, class = "PRIEST", type = 1}, --Power Infusion - [34433] = {cooldown = 180, duration = 15, specs = {256,258}, talent =false, charges = 1, class = "PRIEST", type = 1, ignoredIfTalent = 21719}, --Shadowfiend - [200174] = {cooldown = 60, duration = 15, specs = {258}, talent =21719, charges = 1, class = "PRIEST", type = 1}, --Mindbender (talent) - [123040] = {cooldown = 60, duration = 12, specs = {256}, talent =22094, charges = 1, class = "PRIEST", type = 1}, --Mindbender (talent) - [33206] = {cooldown = 180, duration = 8, specs = {256}, talent =false, charges = 1, class = "PRIEST", type = 3}, --Pain Suppression - [62618] = {cooldown = 180, duration = 10, specs = {256}, talent =false, charges = 1, class = "PRIEST", type = 4}, --Power Word: Barrier - [271466] = {cooldown = 180, duration = 10, specs = {256}, talent =21184, charges = 1, class = "PRIEST", type = 4}, --Luminous Barrier (talent) - [47536] = {cooldown = 90, duration = 10, specs = {256}, talent =false, charges = 1, class = "PRIEST", type = 5}, --Rapture - [19236] = {cooldown = 90, duration = 10, specs = {256,257,258}, talent =false, charges = 1, class = "PRIEST", type = 5}, --Desperate Prayer - [200183] = {cooldown = 120, duration = 20, specs = {257}, talent =21644, charges = 1, class = "PRIEST", type = 2}, --Apotheosis (talent) - [47788] = {cooldown = 180, duration = 10, specs = {257}, talent =false, charges = 1, class = "PRIEST", type = 3}, --Guardian Spirit - [64843] = {cooldown = 180, duration = 8, specs = {257}, talent =false, charges = 1, class = "PRIEST", type = 4}, --Divine Hymn - [64901] = {cooldown = 300, duration = 6, specs = {257}, talent =false, charges = 1, class = "PRIEST", type = 4}, --Symbol of Hope - [265202] = {cooldown = 720, duration = false, specs = {257}, talent =23145, charges = 1, class = "PRIEST", type = 4}, --Holy Word: Salvation (talent) - [109964] = {cooldown = 60, duration = 12, specs = {256}, talent =21184, charges = 1, class = "PRIEST", type = 4}, --Spirit Shell (talent) - [8122] = {cooldown = 60, duration = 8, specs = {256,257,258}, talent =false, charges = 1, class = "PRIEST", type = 5}, --Psychic Scream - [193223] = {cooldown = 240, duration = 60, specs = {258}, talent =21979, charges = 1, class = "PRIEST", type = 1}, --Surrender to Madness (talent) - [47585] = {cooldown = 120, duration = 6, specs = {258}, talent =false, charges = 1, class = "PRIEST", type = 2}, --Dispersion - [15286] = {cooldown = 120, duration = 15, specs = {258}, talent =false, charges = 1, class = "PRIEST", type = 4}, --Vampiric Embrace - [64044] = {cooldown = 45, duration = 4, specs = {258}, talent =21752, charges = 1, class = "PRIEST", type = 5}, --Psychic Horror - [205369] = {cooldown = 30, duration = 6, specs = {258}, talent =23375, charges = 1, class = "PRIEST", type = 5}, --Mind Bomb - [228260] = {cooldown = 90, duration = 15, specs = {258}, talent =false, charges = 1, class = "PRIEST", type = 1}, --Void Erruption - [73325] = {cooldown = 90, duration = false, specs = {256,257,258}, talent =false, charges = 1, class = "PRIEST", type = 5}, --Leap of Faith + [200183] = {cooldown = 120, duration = 20, specs = {257}, talent = false, charges = 1, class = "PRIEST", type = 2}, --Apotheosis + [19236] = {cooldown = 90, duration = 10, specs = {256, 257, 258}, talent = false, charges = 1, class = "PRIEST", type = 2}, --Desperate Prayer + [47585] = {cooldown = 120, duration = 6, specs = {258}, talent = false, charges = 1, class = "PRIEST", type = 2}, --Dispersion + [64843] = {cooldown = 180, duration = 8, specs = {257}, talent = false, charges = 1, class = "PRIEST", type = 4}, --Divine Hymn + [246287] = {cooldown = 90, duration = 0, specs = {256}, talent = false, charges = 1, class = "PRIEST", type = 4}, --Evangelism + [47788] = {cooldown = 180, duration = 10, specs = {257}, talent = false, charges = 1, class = "PRIEST", type = 3}, --Guardian Spirit + [265202] = {cooldown = 720, duration = 0, specs = {257}, talent = false, charges = 1, class = "PRIEST", type = 4}, --Holy Word: Salvation + [372835] = {cooldown = 180, duration = 0, specs = {257}, talent = false, charges = 1, class = "PRIEST", type = 4}, --Lightwell + [73325] = {cooldown = 90, duration = 0, specs = {256, 257, 258}, talent = false, charges = 1, class = "PRIEST", type = 5}, --Leap of Faith + [271466] = {cooldown = 180, duration = 10, specs = {256}, talent = false, charges = 1, class = "PRIEST", type = 4}, --Luminous Barrier + [205369] = {cooldown = 30, duration = 6, specs = {258}, talent = false, charges = 1, class = "PRIEST", type = 5}, --Mind Bomb + [200174] = {cooldown = 60, duration = 15, specs = {258}, talent = false, charges = 1, class = "PRIEST", type = 1}, --Mindbender spec 258 + [123040] = {cooldown = 60, duration = 12, specs = {256}, talent = false, charges = 1, class = "PRIEST", type = 1}, --Mindbender spec 256 + [33206] = {cooldown = 180, duration = 8, specs = {256}, talent = false, charges = 1, class = "PRIEST", type = 3}, --Pain Suppression + [10060] = {cooldown = 120, duration = 20, specs = {256, 257, 258}, talent = false, charges = 1, class = "PRIEST", type = 1}, --Power Infusion + [62618] = {cooldown = 180, duration = 10, specs = {256}, talent = false, charges = 1, class = "PRIEST", type = 4}, --Power Word: Barrier + [64044] = {cooldown = 45, duration = 4, specs = {258}, talent = false, charges = 1, class = "PRIEST", type = 8}, --Psychic Horror + [8122] = {cooldown = 60, duration = 8, specs = {256, 257, 258}, talent = false, charges = 1, class = "PRIEST", type = 8}, --Psychic Scream + [47536] = {cooldown = 90, duration = 10, specs = {256}, talent = false, charges = 1, class = "PRIEST", type = 5}, --Rapture + [34433] = {cooldown = 180, duration = 15, specs = {256, 258}, talent = false, charges = 1, class = "PRIEST", type = 1}, --Shadowfiend + [109964] = {cooldown = 60, duration = 12, specs = {256}, talent = false, charges = 1, class = "PRIEST", type = 4}, --Spirit Shell + [64901] = {cooldown = 300, duration = 6, specs = {257}, talent = false, charges = 1, class = "PRIEST", type = 4}, --Symbol of Hope + [15286] = {cooldown = 120, duration = 15, specs = {258}, talent = false, charges = 1, class = "PRIEST", type = 4}, --Vampiric Embrace + [228260] = {cooldown = 90, duration = 15, specs = {258}, talent = false, charges = 1, class = "PRIEST", type = 1}, --Void Eruption --rogue -- 259 - Assasination -- 260 - Outlaw -- 261 - Subtlety - [79140] = {cooldown = 120, duration = 20, specs = {259}, talent =false, charges = 1, class = "ROGUE", type = 1}, --Vendetta - [1856] = {cooldown = 120, duration = 3, specs = {259,260,261}, talent =false, charges = 1, class = "ROGUE", type = 2}, --Vanish - [5277] = {cooldown = 120, duration = 10, specs = {259,260,261}, talent =false, charges = 1, class = "ROGUE", type = 2}, --Evasion - [31224] = {cooldown = 120, duration = 5, specs = {259,260,261}, talent =false, charges = 1, class = "ROGUE", type = 2}, --Cloak of Shadows - [2094] = {cooldown = 120, duration = 60, specs = {259,260,261}, talent =false, charges = 1, class = "ROGUE", type = 5}, --Blind - [114018] = {cooldown = 360, duration = 15, specs = {259,260,261}, talent =false, charges = 1, class = "ROGUE", type = 5}, --Shroud of Concealment - [185311] = {cooldown = 30, duration = 15, specs = {259,260,261}, talent =false, charges = 1, class = "ROGUE", type = 5}, --Crimson Vial - [13750] = {cooldown = 180, duration = 20, specs = {260}, talent =false, charges = 1, class = "ROGUE", type = 1}, --Adrenaline Rush - [51690] = {cooldown = 120, duration = 2, specs = {260}, talent =23175, charges = 1, class = "ROGUE", type = 1}, --Killing Spree (talent) - [199754] = {cooldown = 120, duration = 10, specs = {260}, talent =false, charges = 1, class = "ROGUE", type = 2}, --Riposte - [343142] = {cooldown = 90, duration = 10, specs = {260}, talent =19250, charges = 1, class = "ROGUE", type = 5}, --Dreadblades - [121471] = {cooldown = 180, duration = 20, specs = {261}, talent =false, charges = 1, class = "ROGUE", type = 1}, --Shadow Blades + [13750] = {cooldown = 180, duration = 20, specs = {260}, talent = false, charges = 1, class = "ROGUE", type = 1}, --Adrenaline Rush + [2094] = {cooldown = 120, duration = 60, specs = {259, 260, 261}, talent = false, charges = 1, class = "ROGUE", type = 8}, --Blind + [31224] = {cooldown = 120, duration = 5, specs = {259, 260, 261}, talent = false, charges = 1, class = "ROGUE", type = 2}, --Cloak of Shadows + [185311] = {cooldown = 30, duration = 15, specs = {259, 260, 261}, talent = false, charges = 1, class = "ROGUE", type = 2}, --Crimson Vial + [343142] = {cooldown = 90, duration = 10, specs = {260}, talent = false, charges = 1, class = "ROGUE", type = 1}, --Dreadblades + [5277] = {cooldown = 120, duration = 10, specs = {259, 260, 261}, talent = false, charges = 1, class = "ROGUE", type = 2}, --Evasion + [51690] = {cooldown = 120, duration = 2, specs = {260}, talent = false, charges = 1, class = "ROGUE", type = 1}, --Killing Spree + [199754] = {cooldown = 120, duration = 10, specs = {260}, talent = false, charges = 1, class = "ROGUE", type = 2}, --Riposte + [121471] = {cooldown = 180, duration = 20, specs = {261}, talent = false, charges = 1, class = "ROGUE", type = 1}, --Shadow Blades + [114018] = {cooldown = 360, duration = 15, specs = {259, 260, 261}, talent = false, charges = 1, class = "ROGUE", type = 5}, --Shroud of Concealment + [1856] = {cooldown = 120, duration = 3, specs = {259, 260, 261}, talent = false, charges = 1, class = "ROGUE", type = 1}, --Vanish + [79140] = {cooldown = 120, duration = 20, specs = {259}, talent = false, charges = 1, class = "ROGUE", type = 1}, --Vendetta } LIB_OPEN_RAID_COOLDOWNS_BY_SPEC = {}; diff --git a/Libs/NickTag-1.0/NickTag-1.0.lua b/Libs/NickTag-1.0/NickTag-1.0.lua index 389b0fe82..0e00f1b08 100644 --- a/Libs/NickTag-1.0/NickTag-1.0.lua +++ b/Libs/NickTag-1.0/NickTag-1.0.lua @@ -321,8 +321,8 @@ end --when the roster changes or the player enters the game, send the persona to guild mates --send on roster update can only happen every 30 seconds, if is on cooldown, it'll schedule an update - NickTag.EventFrame:RegisterEvent ("GROUP_ROSTER_UPDATE") - NickTag.EventFrame:RegisterEvent ("PLAYER_LOGIN") + NickTag.EventFrame:RegisterEvent("GROUP_ROSTER_UPDATE") + NickTag.EventFrame:RegisterEvent("PLAYER_LOGIN") NickTag.EventFrame:SetScript("OnEvent", NickTag.OnEvent) diff --git a/boot.lua b/boot.lua index c19a37b60..77bac1dab 100644 --- a/boot.lua +++ b/boot.lua @@ -36,13 +36,16 @@ Details.gameVersionPrefix = gameVersionPrefix function Details.GetVersionString() - local alphaId = _detalhes.curseforgeVersion:match("%-(%d+)%-") + local curseforgeVersion = _detalhes.curseforgeVersion or "" + local alphaId = curseforgeVersion:match("%-(%d+)%-") + if (not alphaId) then --this is a release version alphaId = "R1" else alphaId = "A" .. alphaId end + return Details.gameVersionPrefix .. Details.build_counter .. "." .. Details.acounter .. "." .. alphaId .. "(" .. Details.game_version .. ")" end @@ -572,7 +575,7 @@ do _detalhes.gump:NewColor("DETAILS_PLUGIN_BUTTONTEXT_COLOR", 0.9999, 0.8196, 0, 1) - _detalhes.gump:InstallTemplate ("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE", + _detalhes.gump:InstallTemplate("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE", { backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}, backdropcolor = {0, 0, 0, .5}, @@ -580,7 +583,7 @@ do onentercolor = {0.3, 0.3, 0.3, .5}, } ) - _detalhes.gump:InstallTemplate ("button", "DETAILS_PLUGINPANEL_BUTTONSELECTED_TEMPLATE", + _detalhes.gump:InstallTemplate("button", "DETAILS_PLUGINPANEL_BUTTONSELECTED_TEMPLATE", { backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}, backdropcolor = {0, 0, 0, .5}, @@ -589,7 +592,7 @@ do } ) - _detalhes.gump:InstallTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE", + _detalhes.gump:InstallTemplate("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE", { backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}, backdropcolor = {1, 1, 1, .5}, @@ -601,7 +604,7 @@ do height = 20, } ) - _detalhes.gump:InstallTemplate ("button", "DETAILS_PLUGIN_BUTTONSELECTED_TEMPLATE", + _detalhes.gump:InstallTemplate("button", "DETAILS_PLUGIN_BUTTONSELECTED_TEMPLATE", { backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}, backdropcolor = {1, 1, 1, .5}, @@ -614,14 +617,14 @@ do } ) - _detalhes.gump:InstallTemplate ("button", "DETAILS_TAB_BUTTON_TEMPLATE", + _detalhes.gump:InstallTemplate("button", "DETAILS_TAB_BUTTON_TEMPLATE", { width = 100, height = 20, }, "DETAILS_PLUGIN_BUTTON_TEMPLATE" ) - _detalhes.gump:InstallTemplate ("button","DETAILS_TAB_BUTTONSELECTED_TEMPLATE", + _detalhes.gump:InstallTemplate("button","DETAILS_TAB_BUTTONSELECTED_TEMPLATE", { width = 100, height = 20, @@ -868,7 +871,7 @@ do --Event Frame _detalhes.listener = CreateFrame("Frame", nil, UIParent) - _detalhes.listener:RegisterEvent ("ADDON_LOADED") + _detalhes.listener:RegisterEvent("ADDON_LOADED") _detalhes.listener:SetFrameStrata("LOW") _detalhes.listener:SetFrameLevel(9) _detalhes.listener.FrameTime = 0 @@ -926,7 +929,7 @@ do self.isMoving = nil end end) - f:SetToplevel (true) + f:SetToplevel(true) f:SetMovable(true) end @@ -942,6 +945,8 @@ do --register textures and fonts for shared media local SharedMedia = LibStub:GetLibrary ("LibSharedMedia-3.0") --default bars + SharedMedia:Register("statusbar", "Details Hyanda", [[Interface\AddOns\Details\images\bar_hyanda]]) + SharedMedia:Register("statusbar", "Details D'ictum", [[Interface\AddOns\Details\images\bar4]]) SharedMedia:Register("statusbar", "Details Vidro", [[Interface\AddOns\Details\images\bar4_vidro]]) SharedMedia:Register("statusbar", "Details D'ictum (reverse)", [[Interface\AddOns\Details\images\bar4_reverse]]) @@ -1062,6 +1067,7 @@ do Details.failed_to_load = C_Timer.NewTimer(1, function() Details.Schedules.NewTimer(20, _detalhes.WelcomeMsgLogon) end) --key binds + --[=[ --header _G ["BINDING_HEADER_Details"] = "Details!" _G ["BINDING_HEADER_DETAILS_KEYBIND_SEGMENTCONTROL"] = Loc ["STRING_KEYBIND_SEGMENTCONTROL"] @@ -1097,6 +1103,7 @@ do _G ["BINDING_NAME_DETAILS_BOOKMARK8"] = format(Loc ["STRING_KEYBIND_BOOKMARK_NUMBER"], 8) _G ["BINDING_NAME_DETAILS_BOOKMARK9"] = format(Loc ["STRING_KEYBIND_BOOKMARK_NUMBER"], 9) _G ["BINDING_NAME_DETAILS_BOOKMARK10"] = format(Loc ["STRING_KEYBIND_BOOKMARK_NUMBER"], 10) + --]=] end diff --git a/classes/class_damage.lua b/classes/class_damage.lua index 574880e4b..bb96f9d05 100644 --- a/classes/class_damage.lua +++ b/classes/class_damage.lua @@ -14,11 +14,11 @@ local _table_sort = table.sort --lua local local tinsert = table.insert --lua local local _table_size = table.getn --lua local - local _setmetatable = setmetatable --lua local + local setmetatable = setmetatable --lua local local _getmetatable = getmetatable --lua local local ipairs = ipairs --lua local local pairs = pairs --lua local - local _rawget= rawget --lua local + local rawget= rawget --lua local local _math_min = math.min --lua local local _math_max = math.max --lua local local abs = math.abs --lua local @@ -440,7 +440,7 @@ end spells = container_habilidades:NovoContainer (container_damage) } - _setmetatable(_new_damageActor, atributo_damage) + setmetatable(_new_damageActor, atributo_damage) return _new_damageActor end @@ -950,7 +950,7 @@ end thisLine.colocacao = colocacao if (not _getmetatable (tabela)) then - _setmetatable(tabela, {__call = RefreshBarraBySpell}) + setmetatable(tabela, {__call = RefreshBarraBySpell}) tabela._custom = true end @@ -1141,7 +1141,7 @@ end thisLine.colocacao = colocacao if (not _getmetatable (tabela)) then - _setmetatable(tabela, {__call = RefreshBarraFrags}) + setmetatable(tabela, {__call = RefreshBarraFrags}) tabela._custom = true end @@ -5875,7 +5875,7 @@ end function Details.refresh:r_atributo_damage (este_jogador, shadow) --restaura metas do ator - _setmetatable(este_jogador, Details.atributo_damage) + setmetatable(este_jogador, Details.atributo_damage) este_jogador.__index = Details.atributo_damage --restaura as metas dos containers Details.refresh:r_container_habilidades (este_jogador.spells, shadow and shadow.spells) diff --git a/classes/class_heal.lua b/classes/class_heal.lua index 57889b452..84b5a655f 100644 --- a/classes/class_heal.lua +++ b/classes/class_heal.lua @@ -2,7 +2,7 @@ --lua locals local _cstr = string.format local _math_floor = math.floor -local _setmetatable = setmetatable +local setmetatable = setmetatable local pairs = pairs local ipairs = ipairs local _unpack = unpack @@ -112,7 +112,7 @@ function atributo_heal:NovaTabela (serial, nome, link) targets_absorbs = {} } - _setmetatable(_new_healActor, atributo_heal) + setmetatable(_new_healActor, atributo_heal) return _new_healActor end @@ -2915,7 +2915,7 @@ atributo_heal.__sub = function(tabela1, tabela2) end function _detalhes.refresh:r_atributo_heal (este_jogador, shadow) - _setmetatable(este_jogador, atributo_heal) + setmetatable(este_jogador, atributo_heal) este_jogador.__index = atributo_heal _detalhes.refresh:r_container_habilidades (este_jogador.spells, shadow and shadow.spells) diff --git a/classes/class_instance.lua b/classes/class_instance.lua index 06de13b7a..886aa1508 100644 --- a/classes/class_instance.lua +++ b/classes/class_instance.lua @@ -9,7 +9,7 @@ local _math_floor = math.floor --lua local local abs = math.abs --lua local local _table_remove = table.remove --lua local local _getmetatable = getmetatable --lua local -local _setmetatable = setmetatable --lua local +local setmetatable = setmetatable --lua local local _string_len = string.len --lua local local _unpack = unpack --lua local local _cstr = string.format --lua local @@ -49,7 +49,7 @@ local segmentos = _detalhes.segmentos for index = 1, #_detalhes.tabela_instancias do local instancia = _detalhes.tabela_instancias [index] if (not _getmetatable (instancia)) then - _setmetatable(_detalhes.tabela_instancias[index], _detalhes) + setmetatable(_detalhes.tabela_instancias[index], _detalhes) end end @@ -1353,7 +1353,7 @@ end LastModo = modo_grupo, } - _setmetatable(new_instance, _detalhes) + setmetatable(new_instance, _detalhes) _detalhes.tabela_instancias [#_detalhes.tabela_instancias+1] = new_instance --fill the empty instance with default values @@ -1375,7 +1375,7 @@ end function _detalhes:NovaInstancia (ID) local new_instance = {} - _setmetatable(new_instance, _detalhes) + setmetatable(new_instance, _detalhes) _detalhes.tabela_instancias [#_detalhes.tabela_instancias+1] = new_instance --instance number @@ -3012,7 +3012,7 @@ function _detalhes:FormatReportLines (report_table, data, f1, f2, f3) fontSize = 10 end local fonte, _, flags = _detalhes.fontstring_len:GetFont() - _detalhes.fontstring_len:SetFont (fonte, fontSize, flags) + _detalhes.fontstring_len:SetFont(fonte, fontSize, flags) _detalhes.fontstring_len:SetText("DEFAULT NAME") local biggest_len = _detalhes.fontstring_len:GetStringWidth() diff --git a/classes/class_resources.lua b/classes/class_resources.lua index 3161fd5d5..17ca06e9d 100644 --- a/classes/class_resources.lua +++ b/classes/class_resources.lua @@ -4,10 +4,10 @@ local _cstr = string.format local _math_floor = math.floor local _table_sort = table.sort local tinsert = table.insert -local _setmetatable = setmetatable +local setmetatable = setmetatable local ipairs = ipairs local pairs = pairs -local _rawget= rawget +local rawget= rawget local _math_min = math.min local _math_max = math.max local _bit_band = bit.band @@ -87,7 +87,7 @@ function atributo_energy:NovaTabela (serial, nome, link) spells = container_habilidades:NovoContainer (container_energy), } - _setmetatable(_new_energyActor, atributo_energy) + setmetatable(_new_energyActor, atributo_energy) return _new_energyActor end @@ -1523,7 +1523,7 @@ function atributo_energy:ColetarLixo (lastevent) end function _detalhes.refresh:r_atributo_energy (este_jogador, shadow) - _setmetatable(este_jogador, _detalhes.atributo_energy) + setmetatable(este_jogador, _detalhes.atributo_energy) este_jogador.__index = _detalhes.atributo_energy _detalhes.refresh:r_container_habilidades (este_jogador.spells, shadow and shadow.spells) diff --git a/classes/class_spelldamage.lua b/classes/class_spelldamage.lua index 6e50d6e84..bd965ec46 100644 --- a/classes/class_spelldamage.lua +++ b/classes/class_spelldamage.lua @@ -1,32 +1,23 @@ -- damage ability file - local _detalhes = _G._detalhes local _ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --local pointers - local ipairs = ipairs--lua local - local pairs = pairs--lua local - local _UnitAura = UnitAura--api local + local ipairs = ipairs + local pairs = pairs + local _UnitAura = UnitAura ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --constants - - local alvo_da_habilidade = _detalhes.alvo_da_habilidade local habilidade_dano = _detalhes.habilidade_dano - local container_combatentes = _detalhes.container_combatentes - local container_damage_target = _detalhes.container_type.CONTAINER_DAMAGETARGET_CLASS - local container_playernpc = _detalhes.container_type.CONTAINER_PLAYERNPC - local _recording_ability_with_buffs = false ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --internals - function habilidade_dano:NovaTabela (id, link, token) - + function habilidade_dano:NovaTabela(id, link, token) local _newDamageSpell = { - total = 0, --total damage counter = 0, --counter id = id, --spellid @@ -37,7 +28,7 @@ n_max = 0, n_amt = 0, n_dmg = 0, - + --critical hits c_min = 0, c_max = 0, @@ -47,11 +38,11 @@ --glacing hits g_amt = 0, g_dmg = 0, - + --resisted r_amt = 0, r_dmg = 0, - + --blocked b_amt = 0, b_dmg = 0, @@ -59,29 +50,29 @@ --obsorved a_amt = 0, a_dmg = 0, - + targets = {}, extra = {} } - + if (token == "SPELL_PERIODIC_DAMAGE") then _detalhes:SpellIsDot (id) end - + return _newDamageSpell end function habilidade_dano:AddMiss (serial, nome, flags, who_nome, missType) self.counter = self.counter + 1 self [missType] = (self [missType] or 0) + 1 - + self.targets [nome] = self.targets [nome] or 0 end function habilidade_dano:Add (serial, nome, flag, amount, who_nome, resisted, blocked, absorbed, critical, glacing, token, isoffhand, isreflected) self.total = self.total + amount - + --if is reflected add the spellId into the extra table --this is too show which spells has been reflected if (isreflected) then @@ -89,24 +80,24 @@ end self.targets [nome] = (self.targets [nome] or 0) + amount - + self.counter = self.counter + 1 - + if (resisted and resisted > 0) then self.r_dmg = self.r_dmg+amount --tabela.total � o total de dano self.r_amt = self.r_amt+1 --tabela.total � o total de dano end - + if (blocked and blocked > 0) then self.b_dmg = self.b_dmg+amount --amount � o total de dano self.b_amt = self.b_amt+1 --amount � o total de dano end - + if (absorbed and absorbed > 0) then self.a_dmg = self.a_dmg+amount --amount � o total de dano self.a_amt = self.a_amt+1 --amount � o total de dano end - + if (glacing) then self.g_dmg = self.g_dmg+amount --amount � o total de dano self.g_amt = self.g_amt+1 --amount � o total de dano @@ -120,7 +111,7 @@ if (self.c_min > amount or self.c_min == 0) then self.c_min = amount end - + else self.n_dmg = self.n_dmg+amount self.n_amt = self.n_amt+1 @@ -132,18 +123,18 @@ end end - + if (_recording_ability_with_buffs) then if (who_nome == _detalhes.playername) then --aqui ele vai detalhar tudo sobre a magia usada - + local buffsNames = _detalhes.SoloTables.BuffsTableNameCache - + local SpellBuffDetails = self.BuffTable if (not SpellBuffDetails) then self.BuffTable = {} SpellBuffDetails = self.BuffTable end - + if (token == "SPELL_PERIODIC_DAMAGE") then --precisa ver se ele tinha na hora que aplicou local SoloDebuffPower = _detalhes.tabela_vigente.SoloDebuffPower @@ -165,7 +156,7 @@ end end end - + else for BuffName, _ in pairs(_detalhes.Buffs.BuffsTable) do diff --git a/classes/class_spellresources.lua b/classes/class_spellresources.lua index 935b40b1d..f40971389 100644 --- a/classes/class_spellresources.lua +++ b/classes/class_spellresources.lua @@ -6,7 +6,7 @@ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --local pointers - local _setmetatable = setmetatable --lua local + local setmetatable = setmetatable --lua local local ipairs = ipairs --lua local local _UnitAura = UnitAura --api local diff --git a/classes/class_spellutility.lua b/classes/class_spellutility.lua index 89a16d856..1d144e8d1 100644 --- a/classes/class_spellutility.lua +++ b/classes/class_spellutility.lua @@ -5,7 +5,7 @@ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --local pointers - local _setmetatable = setmetatable --lua local + local setmetatable = setmetatable --lua local local ipairs = ipairs --lua local local _UnitAura = UnitAura --api local diff --git a/classes/class_utility.lua b/classes/class_utility.lua index 7d2762cd2..4211b2fde 100644 --- a/classes/class_utility.lua +++ b/classes/class_utility.lua @@ -5,7 +5,7 @@ local tinsert = table.insert local _table_size = table.getn local ipairs = ipairs local pairs = pairs -local _rawget= rawget +local rawget= rawget local min = math.min local _math_max = math.max local abs = math.abs @@ -434,7 +434,7 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia) fontSize = 10 end local fonte, _, flags = _detalhes.fontstring_len:GetFont() - _detalhes.fontstring_len:SetFont (fonte, fontSize, flags) + _detalhes.fontstring_len:SetFont(fonte, fontSize, flags) _detalhes.fontstring_len:SetText("thisisspacement") end local default_len = _detalhes.fontstring_len:GetStringWidth() diff --git a/classes/container_actors.lua b/classes/container_actors.lua index dd8cd400e..3f1ed2bcf 100644 --- a/classes/container_actors.lua +++ b/classes/container_actors.lua @@ -15,7 +15,7 @@ local UnitGUID = UnitGUID --api local local strsplit = strsplit --api local - local _setmetatable = setmetatable --lua local + local setmetatable = setmetatable --lua local local _getmetatable = getmetatable --lua local local _bit_band = bit.band --lua local local _table_sort = table.sort --lua local @@ -160,7 +160,7 @@ _NameIndexTable = {} } - _setmetatable(_newContainer, container_combatentes) + setmetatable(_newContainer, container_combatentes) return _newContainer end @@ -876,7 +876,7 @@ function _detalhes.refresh:r_container_combatentes (container, shadow) --reconstr�i meta e indexes - _setmetatable(container, _detalhes.container_combatentes) + setmetatable(container, _detalhes.container_combatentes) container.__index = _detalhes.container_combatentes container.funcao_de_criacao = container_combatentes:FuncaoDeCriacao (container.tipo) diff --git a/classes/container_pets.lua b/classes/container_pets.lua index c9a87c2ed..0fe953d90 100644 --- a/classes/container_pets.lua +++ b/classes/container_pets.lua @@ -11,7 +11,7 @@ local IsInGroup = _G.IsInGroup local GetNumGroupMembers = _G.GetNumGroupMembers -- lua locals -local _setmetatable = setmetatable +local setmetatable = setmetatable local _bit_band = bit.band --lua local local pairs = pairs local ipairs = ipairs @@ -22,7 +22,7 @@ local is_ignored = _detalhes.pets_ignored function container_pets:NovoContainer() local esta_tabela = {} - _setmetatable(esta_tabela, _detalhes.container_pets) + setmetatable(esta_tabela, _detalhes.container_pets) esta_tabela.pets = {} --armazena a pool -> uma dictionary com o [serial do pet] -> nome do dono esta_tabela._ActorTable = {} --armazena os 15 ultimos pets do jogador -> [jogador nome] -> {nil, nil, nil, ...} return esta_tabela @@ -256,6 +256,6 @@ function _detalhes:SchedulePetUpdate(seconds) end function _detalhes.refresh:r_container_pets (container) - _setmetatable(container, container_pets) + setmetatable(container, container_pets) end diff --git a/classes/container_spells.lua b/classes/container_spells.lua index 37a11520b..63cfcbed2 100644 --- a/classes/container_spells.lua +++ b/classes/container_spells.lua @@ -6,7 +6,7 @@ local _ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --local pointers - local _setmetatable = setmetatable --lua local + local setmetatable = setmetatable --lua local ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --constants @@ -39,7 +39,7 @@ local _ _ActorTable = {} } - _setmetatable(_newContainer, container_habilidades) + setmetatable(_newContainer, container_habilidades) return _newContainer end @@ -101,7 +101,7 @@ local _ function _detalhes.refresh:r_container_habilidades (container, shadow) --reconstr�i meta e indexes - _setmetatable(container, _detalhes.container_habilidades) + setmetatable(container, _detalhes.container_habilidades) container.__index = _detalhes.container_habilidades local func_criacao = container_habilidades:FuncaoDeCriacao (container.tipo) container.funcao_de_criacao = func_criacao diff --git a/classes/custom_damagedone.lua b/classes/custom_damagedone.lua index 94ee605d9..aea20b3b1 100644 --- a/classes/custom_damagedone.lua +++ b/classes/custom_damagedone.lua @@ -21,10 +21,10 @@ local _math_floor = math.floor --lua local local _table_sort = table.sort --lua local local tinsert = table.insert --lua local local _table_size = table.getn --lua local -local _setmetatable = setmetatable --lua local +local setmetatable = setmetatable --lua local local ipairs = ipairs --lua local local pairs = pairs --lua local -local _rawget= rawget --lua local +local rawget= rawget --lua local local _math_min = math.min --lua local local _math_max = math.max --lua local local _bit_band = bit.band --lua local diff --git a/classes/custom_healingdone.lua b/classes/custom_healingdone.lua index 566e672ae..970662cbc 100644 --- a/classes/custom_healingdone.lua +++ b/classes/custom_healingdone.lua @@ -14,10 +14,10 @@ local _table_sort = table.sort --lua local local tinsert = table.insert --lua local local _table_size = table.getn --lua local - local _setmetatable = setmetatable --lua local + local setmetatable = setmetatable --lua local local ipairs = ipairs --lua local local pairs = pairs --lua local - local _rawget= rawget --lua local + local rawget= rawget --lua local local _math_min = math.min --lua local local _math_max = math.max --lua local local _bit_band = bit.band --lua local diff --git a/core/gears.lua b/core/gears.lua index 2a9648da1..f37d6dcbc 100644 --- a/core/gears.lua +++ b/core/gears.lua @@ -1811,11 +1811,11 @@ local ilvl_core = _detalhes:CreateEventListener() ilvl_core.amt_inspecting = 0 _detalhes.ilevel.core = ilvl_core -ilvl_core:RegisterEvent ("GROUP_ONENTER", "OnEnter") -ilvl_core:RegisterEvent ("GROUP_ONLEAVE", "OnLeave") -ilvl_core:RegisterEvent ("COMBAT_PLAYER_ENTER", "EnterCombat") -ilvl_core:RegisterEvent ("COMBAT_PLAYER_LEAVE", "LeaveCombat") -ilvl_core:RegisterEvent ("ZONE_TYPE_CHANGED", "ZoneChanged") +ilvl_core:RegisterEvent("GROUP_ONENTER", "OnEnter") +ilvl_core:RegisterEvent("GROUP_ONLEAVE", "OnLeave") +ilvl_core:RegisterEvent("COMBAT_PLAYER_ENTER", "EnterCombat") +ilvl_core:RegisterEvent("COMBAT_PLAYER_LEAVE", "LeaveCombat") +ilvl_core:RegisterEvent("ZONE_TYPE_CHANGED", "ZoneChanged") local inspecting = {} ilvl_core.forced_inspects = {} @@ -1828,7 +1828,7 @@ function ilvl_core:HasQueuedInspec (unitName) end local inspect_frame = CreateFrame("frame") -inspect_frame:RegisterEvent ("INSPECT_READY") +inspect_frame:RegisterEvent("INSPECT_READY") local two_hand = { ["INVTYPE_2HWEAPON"] = true, @@ -2939,6 +2939,7 @@ function Details.GenerateSpecSpellList() end) end +--fill the passed table with spells from talents and spellbook, affect only the active spec function Details.FillTableWithPlayerSpells(completeListOfSpells) local specId, specName, _, specIconTexture = GetSpecializationInfo(GetSpecialization()) local classNameLoc, className, classId = UnitClass("player") @@ -3105,4 +3106,47 @@ function Details:HandleRogueCombatSpecIconByGameVersion() rogueCombatCoords[3] = 384 / 512 rogueCombatCoords[4] = 448 / 512 end +end + +function CopyText(text) + if (not Details.CopyTextField) then + Details.CopyTextField = CreateFrame("Frame", "DetailsCopyText", UIParent, "BackdropTemplate") + Details.CopyTextField:SetHeight(14) + Details.CopyTextField:SetWidth(120) + Details.CopyTextField:SetPoint("center", UIParent, "center") + Details.CopyTextField:SetBackdrop(backdrop) + + DetailsFramework:ApplyStandardBackdrop(Details.CopyTextField) + + tinsert(UISpecialFrames, "DetailsCopyText") + + Details.CopyTextField.textField = CreateFrame("editbox", nil, Details.CopyTextField, "BackdropTemplate") + Details.CopyTextField.textField:SetPoint("topleft", Details.CopyTextField, "topleft") + Details.CopyTextField.textField:SetAutoFocus(false) + Details.CopyTextField.textField:SetFontObject("GameFontHighlightSmall") + Details.CopyTextField.textField:SetAllPoints() + Details.CopyTextField.textField:EnableMouse(true) + + Details.CopyTextField.textField:SetScript("OnEnterPressed", function() + Details.CopyTextField.textField:ClearFocus() + Details.CopyTextField:Hide() + end) + + Details.CopyTextField.textField:SetScript("OnEscapePressed", function() + Details.CopyTextField.textField:ClearFocus() + Details.CopyTextField:Hide() + end) + + Details.CopyTextField.textField:SetScript("OnChar", function() + Details.CopyTextField.textField:ClearFocus() + Details.CopyTextField:Hide() + end) + end + + C_Timer.After(0.1, function() + Details.CopyTextField:Show() + Details.CopyTextField.textField:SetFocus() + Details.CopyTextField.textField:SetText(text) + Details.CopyTextField.textField:HighlightText() + end) end \ No newline at end of file diff --git a/core/meta.lua b/core/meta.lua index 046bc65d8..dfb6a061b 100644 --- a/core/meta.lua +++ b/core/meta.lua @@ -8,8 +8,8 @@ local _ local pairs = pairs --lua local local ipairs = ipairs --lua local - local _rawget = rawget --lua local - local _setmetatable = setmetatable --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 wipe = table.wipe --lua local diff --git a/core/parser.lua b/core/parser.lua index e3b86ac20..266f717fa 100755 --- a/core/parser.lua +++ b/core/parser.lua @@ -3497,15 +3497,15 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 local AlternatePowerEnableFrame = CreateFrame("frame") local AlternatePowerMonitorFrame = CreateFrame("frame") - AlternatePowerEnableFrame:RegisterEvent ("UNIT_POWER_BAR_SHOW") - --AlternatePowerEnableFrame:RegisterEvent ("UNIT_POWER_BAR_HIDE") - AlternatePowerEnableFrame:RegisterEvent ("ENCOUNTER_END") - --AlternatePowerEnableFrame:RegisterEvent ("PLAYER_REGEN_ENABLED") + AlternatePowerEnableFrame:RegisterEvent("UNIT_POWER_BAR_SHOW") + --AlternatePowerEnableFrame:RegisterEvent("UNIT_POWER_BAR_HIDE") + AlternatePowerEnableFrame:RegisterEvent("ENCOUNTER_END") + --AlternatePowerEnableFrame:RegisterEvent("PLAYER_REGEN_ENABLED") AlternatePowerEnableFrame.IsRunning = false AlternatePowerEnableFrame:SetScript("OnEvent", function(self, event) if (event == "UNIT_POWER_BAR_SHOW") then - AlternatePowerMonitorFrame:RegisterEvent ("UNIT_POWER_UPDATE") -- 8.0 + AlternatePowerMonitorFrame:RegisterEvent("UNIT_POWER_UPDATE") -- 8.0 AlternatePowerEnableFrame.IsRunning = true elseif (AlternatePowerEnableFrame.IsRunning and (event == "ENCOUNTER_END" or event == "PLAYER_REGEN_ENABLED")) then -- and not InCombatLockdown() AlternatePowerMonitorFrame:UnregisterEvent ("UNIT_POWER_UPDATE") diff --git a/core/plugins.lua b/core/plugins.lua index 1726f1e4a..deee9a58a 100644 --- a/core/plugins.lua +++ b/core/plugins.lua @@ -273,7 +273,7 @@ end local register_event_func = function(self, event) - self.Frame:RegisterEvent (event) + self.Frame:RegisterEvent(event) end local unregister_event_func = function(self, event) self.Frame:UnregisterEvent (event) @@ -285,8 +285,8 @@ local NewPlugin = {__options = PluginOptions, __enabled = true, RegisterEvent = register_event_func, UnregisterEvent = unregister_event_func} local Frame = CreateFrame("Frame", FrameName, UIParent,"BackdropTemplate") - Frame:RegisterEvent ("PLAYER_LOGIN") - Frame:RegisterEvent ("PLAYER_LOGOUT") + Frame:RegisterEvent("PLAYER_LOGIN") + Frame:RegisterEvent("PLAYER_LOGOUT") Frame:SetScript("OnEvent", function(self, event, ...) if (NewPlugin.OnEvent) then @@ -360,7 +360,7 @@ options_frame:SetMovable(true) options_frame:EnableMouse(true) options_frame:SetFrameStrata("DIALOG") - options_frame:SetToplevel (true) + options_frame:SetToplevel(true) options_frame:Hide() @@ -398,7 +398,7 @@ options_frame:SetMovable(true) options_frame:EnableMouse(true) options_frame:SetFrameStrata("DIALOG") - options_frame:SetToplevel (true) + options_frame:SetToplevel(true) options_frame:Hide() diff --git a/core/plugins_statusbar.lua b/core/plugins_statusbar.lua index bac305d4b..aa5fae018 100644 --- a/core/plugins_statusbar.lua +++ b/core/plugins_statusbar.lua @@ -707,10 +707,10 @@ do --Register needed events -- here we are redirecting the event to an specified function, otherwise events need to be handle inside "PDps:OnDetailsEvent (event)" - _detalhes:RegisterEvent (PDps, "DETAILS_INSTANCE_CHANGESEGMENT", PDps.ChangeSegment) - _detalhes:RegisterEvent (PDps, "DETAILS_DATA_RESET", PDps.DataReset) - _detalhes:RegisterEvent (PDps, "COMBAT_PLAYER_ENTER", PDps.PlayerEnterCombat) - _detalhes:RegisterEvent (PDps, "COMBAT_PLAYER_LEAVE", PDps.PlayerLeaveCombat) + _detalhes:RegisterEvent(PDps, "DETAILS_INSTANCE_CHANGESEGMENT", PDps.ChangeSegment) + _detalhes:RegisterEvent(PDps, "DETAILS_DATA_RESET", PDps.DataReset) + _detalhes:RegisterEvent(PDps, "COMBAT_PLAYER_ENTER", PDps.PlayerEnterCombat) + _detalhes:RegisterEvent(PDps, "COMBAT_PLAYER_LEAVE", PDps.PlayerLeaveCombat) end @@ -860,9 +860,9 @@ do end --Register needed events - _detalhes:RegisterEvent (PSegment, "DETAILS_INSTANCE_CHANGESEGMENT", PSegment.OnSegmentChange) - _detalhes:RegisterEvent (PSegment, "DETAILS_DATA_RESET", PSegment.Change) - _detalhes:RegisterEvent (PSegment, "COMBAT_PLAYER_ENTER", PSegment.NewCombat) + _detalhes:RegisterEvent(PSegment, "DETAILS_INSTANCE_CHANGESEGMENT", PSegment.OnSegmentChange) + _detalhes:RegisterEvent(PSegment, "DETAILS_DATA_RESET", PSegment.Change) + _detalhes:RegisterEvent(PSegment, "COMBAT_PLAYER_ENTER", PSegment.NewCombat) end @@ -908,7 +908,7 @@ do end --Register needed events - _detalhes:RegisterEvent (PAttribute, "DETAILS_INSTANCE_CHANGEATTRIBUTE", PAttribute.Change) + _detalhes:RegisterEvent(PAttribute, "DETAILS_INSTANCE_CHANGEATTRIBUTE", PAttribute.Change) end @@ -1066,11 +1066,11 @@ do end --Register needed events - _detalhes:RegisterEvent (Clock, "COMBAT_PLAYER_ENTER", Clock.PlayerEnterCombat) - _detalhes:RegisterEvent (Clock, "COMBAT_PLAYER_LEAVE", Clock.PlayerLeaveCombat) - _detalhes:RegisterEvent (Clock, "DETAILS_INSTANCE_CHANGESEGMENT", _detalhes.ClockPluginTickOnSegment) - _detalhes:RegisterEvent (Clock, "DETAILS_DATA_SEGMENTREMOVED", _detalhes.ClockPluginTick) - _detalhes:RegisterEvent (Clock, "DETAILS_DATA_RESET", Clock.DataReset) + _detalhes:RegisterEvent(Clock, "COMBAT_PLAYER_ENTER", Clock.PlayerEnterCombat) + _detalhes:RegisterEvent(Clock, "COMBAT_PLAYER_LEAVE", Clock.PlayerLeaveCombat) + _detalhes:RegisterEvent(Clock, "DETAILS_INSTANCE_CHANGESEGMENT", _detalhes.ClockPluginTickOnSegment) + _detalhes:RegisterEvent(Clock, "DETAILS_DATA_SEGMENTREMOVED", _detalhes.ClockPluginTick) + _detalhes:RegisterEvent(Clock, "DETAILS_DATA_RESET", Clock.DataReset) end @@ -1138,7 +1138,7 @@ do local new_child = _detalhes.StatusBar:CreateChildTable (instance, Threat, myframe) - myframe.widget:RegisterEvent ("PLAYER_TARGET_CHANGED") + myframe.widget:RegisterEvent("PLAYER_TARGET_CHANGED") myframe.widget:SetScript("OnEvent", function() _detalhes:ThreatPluginTick() end) @@ -1154,8 +1154,8 @@ do end --Register needed events - _detalhes:RegisterEvent (Threat, "COMBAT_PLAYER_ENTER", Threat.PlayerEnterCombat) - _detalhes:RegisterEvent (Threat, "COMBAT_PLAYER_LEAVE", Threat.PlayerLeaveCombat) + _detalhes:RegisterEvent(Threat, "COMBAT_PLAYER_ENTER", Threat.PlayerEnterCombat) + _detalhes:RegisterEvent(Threat, "COMBAT_PLAYER_LEAVE", Threat.PlayerLeaveCombat) end @@ -1280,12 +1280,12 @@ do end function PDurability:OnEnable() - self.frame.widget:RegisterEvent ("PLAYER_DEAD") - self.frame.widget:RegisterEvent ("PLAYER_UNGHOST") - self.frame.widget:RegisterEvent ("UPDATE_INVENTORY_DURABILITY") - self.frame.widget:RegisterEvent ("MERCHANT_SHOW") - self.frame.widget:RegisterEvent ("MERCHANT_CLOSED") - self.frame.widget:RegisterEvent ("ZONE_CHANGED_NEW_AREA") + self.frame.widget:RegisterEvent("PLAYER_DEAD") + self.frame.widget:RegisterEvent("PLAYER_UNGHOST") + self.frame.widget:RegisterEvent("UPDATE_INVENTORY_DURABILITY") + self.frame.widget:RegisterEvent("MERCHANT_SHOW") + self.frame.widget:RegisterEvent("MERCHANT_CLOSED") + self.frame.widget:RegisterEvent("ZONE_CHANGED_NEW_AREA") self:UpdateDurability() end @@ -1356,8 +1356,8 @@ do texture:SetHeight(12) myframe.texture = texture - myframe.widget:RegisterEvent ("PLAYER_MONEY") - myframe.widget:RegisterEvent ("PLAYER_ENTERING_WORLD") + myframe.widget:RegisterEvent("PLAYER_MONEY") + myframe.widget:RegisterEvent("PLAYER_ENTERING_WORLD") myframe.widget:SetScript("OnEvent", function(event) if (event == "PLAYER_ENTERING_WORLD") then return PGold:ScheduleTimer("GoldPluginTick", 10) diff --git a/core/plugins_toolbar.lua b/core/plugins_toolbar.lua index 16633abe7..bda56f206 100644 --- a/core/plugins_toolbar.lua +++ b/core/plugins_toolbar.lua @@ -237,8 +237,8 @@ end end end - _detalhes:RegisterEvent (_detalhes.ToolBar, "DETAILS_INSTANCE_OPEN", "OnInstanceOpen") - _detalhes:RegisterEvent (_detalhes.ToolBar, "DETAILS_INSTANCE_CLOSE", "OnInstanceClose") + _detalhes:RegisterEvent(_detalhes.ToolBar, "DETAILS_INSTANCE_OPEN", "OnInstanceOpen") + _detalhes:RegisterEvent(_detalhes.ToolBar, "DETAILS_INSTANCE_CLOSE", "OnInstanceClose") _detalhes.ToolBar.Enabled = true --must have this member or wont receive the event _detalhes.ToolBar.__enabled = true diff --git a/core/util.lua b/core/util.lua index a978499ef..7b8b8fc0d 100644 --- a/core/util.lua +++ b/core/util.lua @@ -1026,7 +1026,7 @@ end --font size function _detalhes:SetFontSize(fontString, ...) local fonte, _, flags = fontString:GetFont() - fontString:SetFont (fonte, _math_max (...), flags) + fontString:SetFont(fonte, _math_max (...), flags) end function _detalhes:GetFontSize (fontString) local _, size = fontString:GetFont() @@ -1036,7 +1036,7 @@ end --font face function _detalhes:SetFontFace (fontString, fontface) local _, size, flags = fontString:GetFont() - fontString:SetFont (fontface, size, flags) + fontString:SetFont(fontface, size, flags) end function _detalhes:GetFontFace (fontString) local fontface = fontString:GetFont() @@ -1066,7 +1066,7 @@ end end end - fontString:SetFont (fonte, size, outline) + fontString:SetFont(fonte, size, outline) end function _detalhes:UseOutline (outline) diff --git a/frames/anime.lua b/frames/anime.lua index 505948af0..7898b89d2 100644 --- a/frames/anime.lua +++ b/frames/anime.lua @@ -290,7 +290,7 @@ function _detalhes.PlayBestDamageOnGuild (damage) ---------------------------------------------- local NewDamageRecord = DetailsNewDamageRecord:CreateFontString("NewDamageRecordFontString", "OVERLAY") - NewDamageRecord:SetFont ([=[Fonts\FRIZQT__.TTF]=], 12, "OUTLINE") + NewDamageRecord:SetFont([=[Fonts\FRIZQT__.TTF]=], 12, "OUTLINE") NewDamageRecord:SetText("Damage Record!") NewDamageRecord:SetDrawLayer("OVERLAY", 0) NewDamageRecord:SetPoint("center", DetailsNewDamageRecord, "center", 18, 7) @@ -329,7 +329,7 @@ function _detalhes.PlayBestDamageOnGuild (damage) ---------------------------------------------- local DamageAmount = DetailsNewDamageRecord:CreateFontString("DamageAmountFontString", "OVERLAY") - DamageAmount:SetFont ([=[Fonts\FRIZQT__.TTF]=], 12, "THICKOUTLINE") + DamageAmount:SetFont([=[Fonts\FRIZQT__.TTF]=], 12, "THICKOUTLINE") DamageAmount:SetText(_detalhes:comma_value (damage)) DamageAmount:SetDrawLayer("OVERLAY", 0) DamageAmount:SetPoint("center", DetailsNewDamageRecord, "center", 18, -7) diff --git a/frames/fw_mods.lua b/frames/fw_mods.lua index e7407adb6..b1d8256dc 100644 --- a/frames/fw_mods.lua +++ b/frames/fw_mods.lua @@ -507,7 +507,7 @@ function gump:NewScrollBar2 (master, slave, x, y) slider_gump.thumb:SetSize(29, 30) slider_gump:SetThumbTexture (slider_gump.thumb) - slider_gump:SetOrientation ("VERTICAL") + slider_gump:SetOrientation("VERTICAL") slider_gump:SetSize(16, 100) slider_gump:SetMinMaxValues(0, slider_gump.scrollMax) slider_gump:SetValue(0) diff --git a/frames/window_benchmark.lua b/frames/window_benchmark.lua index c10ae79af..df0588e6a 100644 --- a/frames/window_benchmark.lua +++ b/frames/window_benchmark.lua @@ -61,7 +61,7 @@ local libwindow = LibStub("LibWindow-1.1") f.Title:SetTextColor(.8, .8, .8, 1) f.Title:SetText("Details! Benchmark") - DF:InstallTemplate ("font", "DETAILS_BENCHMARK_NORMAL", {color = "white", size = 10, font = "Friz Quadrata TT"}) + DF:InstallTemplate("font", "DETAILS_BENCHMARK_NORMAL", {color = "white", size = 10, font = "Friz Quadrata TT"}) function f.CreateCombatObject() local t = {} @@ -93,8 +93,8 @@ local libwindow = LibStub("LibWindow-1.1") end --events - f:RegisterEvent ("PLAYER_REGEN_DISABLED") - f:RegisterEvent ("PLAYER_REGEN_ENABLED") + f:RegisterEvent("PLAYER_REGEN_DISABLED") + f:RegisterEvent("PLAYER_REGEN_ENABLED") f:SetScript("OnEvent", function(self, event, ...) if (event == "PLAYER_REGEN_DISABLED") then diff --git a/frames/window_brokertexteditor.lua b/frames/window_brokertexteditor.lua index 4fe62e409..110aad3be 100644 --- a/frames/window_brokertexteditor.lua +++ b/frames/window_brokertexteditor.lua @@ -17,7 +17,7 @@ function Details:OpenBrokerTextEditor() local titleBar = DF:CreateTitleBar (panel, "Broker Text Editor") - local textentry = DF:NewSpecialLuaEditorEntry (panel, 650, 270, "editbox", "$parentEntry", true) + local textentry = DF:NewSpecialLuaEditorEntry(panel, 650, 270, "editbox", "$parentEntry", true) textentry:SetPoint("topleft", panel, "topleft", 2, -25) DF:ApplyStandardBackdrop(textentry) diff --git a/frames/window_copy.lua b/frames/window_copy.lua index a1ca2acfd..14763018c 100644 --- a/frames/window_copy.lua +++ b/frames/window_copy.lua @@ -13,7 +13,7 @@ do panel:SetFrameStrata("TOOLTIP") panel:SetPoint("center", UIParent, "center") panel.locked = false - panel:SetToplevel (true) + panel:SetToplevel(true) panel:SetMovable(true) panel:SetScript("OnMouseDown", function(self, button) if (self.isMoving) then diff --git a/frames/window_currentdps.lua b/frames/window_currentdps.lua index 5303551bd..f86724e61 100644 --- a/frames/window_currentdps.lua +++ b/frames/window_currentdps.lua @@ -901,11 +901,11 @@ function Details:CreateCurrentDpsFrame(parent, name) end end - eventListener:RegisterEvent ("COMBAT_ARENA_START", "ArenaStarted") - eventListener:RegisterEvent ("COMBAT_ARENA_END", "ArenaEnded") - eventListener:RegisterEvent ("COMBAT_MYTHICDUNGEON_START", "MythicDungeonStarted") - eventListener:RegisterEvent ("COMBAT_MYTHICDUNGEON_END", "MythicDungeonEnded") - eventListener:RegisterEvent ("COMBAT_PLAYER_ENTER", "ResetBuffer") + eventListener:RegisterEvent("COMBAT_ARENA_START", "ArenaStarted") + eventListener:RegisterEvent("COMBAT_ARENA_END", "ArenaEnded") + eventListener:RegisterEvent("COMBAT_MYTHICDUNGEON_START", "MythicDungeonStarted") + eventListener:RegisterEvent("COMBAT_MYTHICDUNGEON_END", "MythicDungeonEnded") + eventListener:RegisterEvent("COMBAT_PLAYER_ENTER", "ResetBuffer") _detalhes.Broadcaster_CurrentDpsLoaded = true _detalhes.Broadcaster_CurrentDpsFrame = f diff --git a/frames/window_custom.lua b/frames/window_custom.lua index 51939f3b5..b9ed9e556 100644 --- a/frames/window_custom.lua +++ b/frames/window_custom.lua @@ -21,7 +21,7 @@ local _table_sort = table.sort --lua local local tinsert = table.insert --lua local local _unpack = unpack --lua local - local _setmetatable = setmetatable --lua local + local setmetatable = setmetatable --lua local local _GetSpellInfo = _detalhes.getspellinfo --api local local CreateFrame = CreateFrame --api local @@ -56,7 +56,7 @@ local CONST_BUTTON_TEMPLATE = gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE") local CONST_TEXTENTRY_TEMPLATE = gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE") - gump:InstallTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BUTTONS", + gump:InstallTemplate("button", "DETAILS_CUSTOMDISPLAY_CODE_BUTTONS", { icon = {texture = [[Interface\BUTTONS\UI-GuildButton-PublicNote-Up]]}, width = 160, @@ -64,24 +64,24 @@ "DETAILS_PLUGIN_BUTTON_TEMPLATE" ) - gump:InstallTemplate ("button", "DETAILS_CUSTOMDISPLAY_REGULAR_BUTTON", + gump:InstallTemplate("button", "DETAILS_CUSTOMDISPLAY_REGULAR_BUTTON", { width = 130, }, "DETAILS_PLUGIN_BUTTON_TEMPLATE" ) - gump:InstallTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX", { + gump:InstallTemplate("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX", { backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}, backdropcolor = {.2, .2, .2, 0.6}, backdropbordercolor = {0, 0, 0, 1}, }) - gump:InstallTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX_EXPANDED", { + gump:InstallTemplate("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX_EXPANDED", { backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}, backdropcolor = {.2, .2, .2, 1}, backdropbordercolor = {0, 0, 0, 1}, }) - gump:InstallTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX_BUTTON", { + gump:InstallTemplate("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX_BUTTON", { backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}, backdropcolor = {.2, .2, .2, 1}, backdropbordercolor = {0, 0, 0, 1}, @@ -508,7 +508,7 @@ } tinsert(_detalhes.custom, new_custom_object) - _setmetatable(new_custom_object, _detalhes.atributo_custom) + setmetatable(new_custom_object, _detalhes.atributo_custom) new_custom_object.__index = _detalhes.atributo_custom _detalhes:Msg(Loc ["STRING_CUSTOM_CREATED"]) end @@ -591,7 +591,7 @@ end tinsert(_detalhes.custom, new_custom_object) - _setmetatable(new_custom_object, _detalhes.atributo_custom) + setmetatable(new_custom_object, _detalhes.atributo_custom) new_custom_object.__index = _detalhes.atributo_custom _detalhes:Msg(Loc ["STRING_CUSTOM_CREATED"]) end @@ -1725,7 +1725,7 @@ box2:Hide() --create the code editbox - local code_editor = gump:NewSpecialLuaEditorEntry (custom_window, CONST_EDITBOX_WIDTH, CONST_EDITBOX_HEIGHT, "codeeditor", "$parentCodeEditor") + local code_editor = gump:NewSpecialLuaEditorEntry(custom_window, CONST_EDITBOX_WIDTH, CONST_EDITBOX_HEIGHT, "codeeditor", "$parentCodeEditor") code_editor:SetPoint("topleft", custom_window, "topleft", CONST_MENU_X_POSITION, CONST_EDITBOX_Y_POSITION) code_editor:SetFrameLevel(custom_window:GetFrameLevel()+4) code_editor:SetBackdrop(nil) @@ -1754,7 +1754,7 @@ code_editor.font_size = 11 local file, size, flags = code_editor.editbox:GetFont() - code_editor.editbox:SetFont (file, 11, flags) + code_editor.editbox:SetFont(file, 11, flags) local expand_func = function() if (code_editor.expanded) then @@ -1778,11 +1778,11 @@ if (increase) then local file, size, flags = code_editor.editbox:GetFont() code_editor.font_size = code_editor.font_size + 1 - code_editor.editbox:SetFont (file, code_editor.font_size, flags) + code_editor.editbox:SetFont(file, code_editor.font_size, flags) else local file, size, flags = code_editor.editbox:GetFont() code_editor.font_size = code_editor.font_size - 1 - code_editor.editbox:SetFont (file, code_editor.font_size, flags) + code_editor.editbox:SetFont(file, code_editor.font_size, flags) end end diff --git a/frames/window_custom_scripts.lua b/frames/window_custom_scripts.lua index 435138c2c..f9df7c97f 100644 --- a/frames/window_custom_scripts.lua +++ b/frames/window_custom_scripts.lua @@ -26,7 +26,7 @@ local CONST_EDITBOX_BUTTON_HEIGHT = 20 local CONST_BUTTON_TEMPLATE = DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE") local CONST_TEXTENTRY_TEMPLATE = DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE") -DF:InstallTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BUTTONS", +DF:InstallTemplate("button", "DETAILS_CUSTOMDISPLAY_CODE_BUTTONS", { icon = {texture = [[Interface\BUTTONS\UI-GuildButton-PublicNote-Up]]}, width = 160, @@ -34,24 +34,24 @@ DF:InstallTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BUTTONS", "DETAILS_PLUGIN_BUTTON_TEMPLATE" ) -DF:InstallTemplate ("button", "DETAILS_CUSTOMDISPLAY_REGULAR_BUTTON", +DF:InstallTemplate("button", "DETAILS_CUSTOMDISPLAY_REGULAR_BUTTON", { width = 130, }, "DETAILS_PLUGIN_BUTTON_TEMPLATE" ) -DF:InstallTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX", { +DF:InstallTemplate("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX", { backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}, backdropcolor = {.2, .2, .2, 0.6}, backdropbordercolor = {0, 0, 0, 1}, }) -DF:InstallTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX_EXPANDED", { +DF:InstallTemplate("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX_EXPANDED", { backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}, backdropcolor = {.2, .2, .2, 1}, backdropbordercolor = {0, 0, 0, 1}, }) -DF:InstallTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX_BUTTON", { +DF:InstallTemplate("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX_BUTTON", { backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}, backdropcolor = {.2, .2, .2, 1}, backdropbordercolor = {0, 0, 0, 1}, diff --git a/frames/window_dump.lua b/frames/window_dump.lua index f538cf414..65884b01d 100644 --- a/frames/window_dump.lua +++ b/frames/window_dump.lua @@ -23,7 +23,7 @@ function Details:Dump (...) DetailsDumpFrame:SetSize(700, 600) DetailsDumpFrame:SetTitle("Details! Dump Table [|cFFFF3333Ready Only|r]") - local text_editor = DetailsFramework:NewSpecialLuaEditorEntry (DetailsDumpFrame, 680, 560, "Editbox", "$parentEntry", true) + local text_editor = DetailsFramework:NewSpecialLuaEditorEntry(DetailsDumpFrame, 680, 560, "Editbox", "$parentEntry", true) text_editor:SetPoint("topleft", DetailsDumpFrame, "topleft", 10, -30) text_editor.scroll:SetBackdrop(nil) @@ -85,7 +85,7 @@ function _detalhes:ShowImportWindow (defaultText, confirmFunc, titleText) importWindow:SetPoint("center") DetailsFramework:ApplyStandardBackdrop(importWindow, false, 1.2) - local importTextEditor = DetailsFramework:NewSpecialLuaEditorEntry (importWindow, 780, 540, "ImportEditor", "$parentEditor", true) + local importTextEditor = DetailsFramework:NewSpecialLuaEditorEntry(importWindow, 780, 540, "ImportEditor", "$parentEditor", true) importTextEditor:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}) importTextEditor:SetBackdropColor(.2, .2, .2, .5) importTextEditor:SetBackdropBorderColor(0, 0, 0, 1) diff --git a/frames/window_eventtracker.lua b/frames/window_eventtracker.lua index a59ee0682..0c3098ae2 100644 --- a/frames/window_eventtracker.lua +++ b/frames/window_eventtracker.lua @@ -725,7 +725,7 @@ function Details:CreateEventTrackerFrame(parent, name) local crowdControlFromFramework = DetailsFramework.CrowdControlSpells local combatLog = CreateFrame("frame") - combatLog:RegisterEvent ("COMBAT_LOG_EVENT_UNFILTERED") + combatLog:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") local OBJECT_TYPE_PLAYER = 0x00000400 local OBJECT_TYPE_ENEMY = 0x00000040 diff --git a/frames/window_forge.lua b/frames/window_forge.lua index 40d338070..eb0f2be0f 100644 --- a/frames/window_forge.lua +++ b/frames/window_forge.lua @@ -47,7 +47,7 @@ function Details:OpenForge() local f = DetailsForgePanel or Details.gump:CreateSimplePanel(UIParent, 960, 600, "Details! " .. L["STRING_SPELLLIST"], "DetailsForgePanel") f:SetPoint("center", UIParent, "center") f:SetFrameStrata("HIGH") - f:SetToplevel (true) + f:SetToplevel(true) f:SetMovable(true) f.Title:SetTextColor(1, .8, .2) diff --git a/frames/window_main.lua b/frames/window_main.lua index 4c2d64061..82bb59d95 100644 --- a/frames/window_main.lua +++ b/frames/window_main.lua @@ -3101,7 +3101,7 @@ local function CreateAlertFrame(baseframe, instancia) frame_lower:SetHeight(25) frame_lower:SetPoint("left", frame_upper, "left") frame_lower:SetPoint("right", frame_upper, "right") - frame_upper:SetScrollChild (frame_lower) + frame_upper:SetScrollChild(frame_lower) local alert_bg = CreateFrame("frame", "DetailsAlertFrame" .. instancia.meu_id, frame_lower,"BackdropTemplate") alert_bg:SetPoint("bottom", baseframe, "bottom") @@ -3551,7 +3551,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando) scrollbar:Show() --config set - scrollbar:SetOrientation ("VERTICAL") + scrollbar:SetOrientation("VERTICAL") scrollbar.scrollMax = 0 scrollbar:SetMinMaxValues(0, 0) scrollbar:SetValue(0) @@ -3612,7 +3612,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando) -- background window config ------------------------------------------------------------------------------------------------------------------------------------------------- backgroundframe:SetAllPoints(baseframe) - backgroundframe:SetScrollChild (backgrounddisplay) + backgroundframe:SetScrollChild(backgrounddisplay) backgrounddisplay:SetResizable(true) backgrounddisplay:SetPoint("topleft", baseframe, "topleft") @@ -7332,8 +7332,8 @@ function updateClickThroughListener:LeaveCombat() end) end -updateClickThroughListener:RegisterEvent ("COMBAT_PLAYER_ENTER", "EnterCombat") -updateClickThroughListener:RegisterEvent ("COMBAT_PLAYER_LEAVE", "EnterCombat") +updateClickThroughListener:RegisterEvent("COMBAT_PLAYER_ENTER", "EnterCombat") +updateClickThroughListener:RegisterEvent("COMBAT_PLAYER_LEAVE", "EnterCombat") function Details:UpdateClickThroughSettings (inCombat, window, bars, toolbaricons) if (inCombat ~= nil) then diff --git a/frames/window_news.lua b/frames/window_news.lua index d1ac19382..5615ff2c9 100644 --- a/frames/window_news.lua +++ b/frames/window_news.lua @@ -103,7 +103,7 @@ function Details:CreateOrOpenNewsWindow() tile = true, tileSize = 16, insets = {left = 1, right = 1, top = 0, bottom = 1},}) frameUpper:SetBackdropColor(.1, .1, .1, .3) - frameUpper:SetScrollChild (frameLower) + frameUpper:SetScrollChild(frameLower) local slider = CreateFrame("slider", "DetailsNewsWindowSlider", frame, "BackdropTemplate") slider.bg = slider:CreateTexture(nil, "background") @@ -115,7 +115,7 @@ function Details:CreateOrOpenNewsWindow() slider.thumb:SetSize(25, 25) slider:SetThumbTexture (slider.thumb) - slider:SetOrientation ("vertical"); + slider:SetOrientation("vertical"); slider:SetSize(16, 499) slider:SetPoint("topleft", frameUpper, "topright") slider:SetMinMaxValues(0, 2000) diff --git a/frames/window_options2_sections.lua b/frames/window_options2_sections.lua index d305b46b9..e3acbe430 100644 --- a/frames/window_options2_sections.lua +++ b/frames/window_options2_sections.lua @@ -3560,7 +3560,7 @@ do y = y - 20 --plugins installed, adding their abs name - DF.table.addunique (installedToolbarPlugins, absName) + DF.table.addunique(installedToolbarPlugins, absName) end @@ -3698,7 +3698,7 @@ do end --plugins installed, adding their abs name - DF.table.addunique (installedRaidPlugins, absName) + DF.table.addunique(installedRaidPlugins, absName) i = i + 1 y = y - 20 @@ -6418,7 +6418,7 @@ do sectionFrame.userTimeCaptureFillPanel:Refresh() end - local big_code_editor = DF:NewSpecialLuaEditorEntry (sectionFrame, 683, 422, "bigCodeEditor", "$parentBigCodeEditor") + local big_code_editor = DF:NewSpecialLuaEditorEntry(sectionFrame, 683, 422, "bigCodeEditor", "$parentBigCodeEditor") big_code_editor:SetPoint("topleft", sectionFrame, "topleft", startX, startY - 70) big_code_editor:SetFrameLevel(sectionFrame:GetFrameLevel()+6) big_code_editor:SetBackdrop({bgFile = [[Interface\AddOns\Details\images\background]], edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1,tile = 1, tileSize = 16}) @@ -6488,7 +6488,7 @@ do sectionFrame.userTimeCaptureFillPanel:Refresh() end - local big_code_editor2 = DF:NewSpecialLuaEditorEntry (sectionFrame, 643, 402, "exportEditor", "$parentExportEditor", true) + local big_code_editor2 = DF:NewSpecialLuaEditorEntry(sectionFrame, 643, 402, "exportEditor", "$parentExportEditor", true) big_code_editor2:SetPoint("topleft", sectionFrame, "topleft", 7, -70) big_code_editor2:SetFrameLevel(sectionFrame:GetFrameLevel()+6) big_code_editor2:SetBackdrop({bgFile = [[Interface\AddOns\Details\images\background]], edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1,tile = 1, tileSize = 16}) @@ -6606,7 +6606,7 @@ do --function local capture_func = DF:NewLabel(addframe, nil, "$parentFunctionLabel", "functionLabel", Loc ["STRING_OPTIONS_CHART_ADDCODE"]) - local capture_func_entry = DF:NewSpecialLuaEditorEntry (addframe.widget, 300, 200, "funcEntry", "$parentFuncEntry") + local capture_func_entry = DF:NewSpecialLuaEditorEntry(addframe.widget, 300, 200, "funcEntry", "$parentFuncEntry") capture_func_entry:SetPoint("topleft", capture_func.widget, "topright", 2, 0) capture_func_entry:SetSize(500, 220) capture_func_entry:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}) @@ -6655,9 +6655,9 @@ do --open import panel button - local importframe = DF:NewSpecialLuaEditorEntry (sectionFrame, 683, 422, "importEditor", "$parentImportEditor", true) + local importframe = DF:NewSpecialLuaEditorEntry(sectionFrame, 683, 422, "importEditor", "$parentImportEditor", true) local font, size, flag = importframe.editbox:GetFont() - importframe.editbox:SetFont (font, 9, flag) + importframe.editbox:SetFont(font, 9, flag) importframe:SetPoint("topleft", sectionFrame, "topleft", startX, startY - 70) importframe:SetFrameLevel(sectionFrame:GetFrameLevel()+6) importframe:SetBackdrop({bgFile = [[Interface\AddOns\Details\images\background]], edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1,tile = 1, tileSize = 16}) diff --git a/frames/window_playerbreakdown.lua b/frames/window_playerbreakdown.lua index a746eb1f7..6aa695188 100644 --- a/frames/window_playerbreakdown.lua +++ b/frames/window_playerbreakdown.lua @@ -875,7 +875,7 @@ local function cria_container_barras (este_gump, SWW) container_barras_window:SetWidth(300) container_barras_window:SetHeight(145) - container_barras_window:SetScrollChild (container_barras) + container_barras_window:SetScrollChild(container_barras) container_barras_window:SetPoint("TOPLEFT", este_gump, "TOPLEFT", 21, -76) container_barras_window:SetScript("OnSizeChanged", function(self) @@ -958,7 +958,7 @@ local function cria_container_alvos (este_gump, SWW) container_alvos_window:SetWidth(300) container_alvos_window:SetHeight(100) - container_alvos_window:SetScrollChild (container_alvos) + container_alvos_window:SetScrollChild(container_alvos) container_alvos_window:SetPoint("BOTTOMLEFT", este_gump, "BOTTOMLEFT", 20, 6) --56 default container_alvos_window:SetScript("OnSizeChanged", function(self) @@ -1627,7 +1627,7 @@ function gump:CriaJanelaInfo() este_gump.Loaded = true este_gump:SetFrameStrata("HIGH") - este_gump:SetToplevel (true) + este_gump:SetToplevel(true) este_gump.extra_frames = {} @@ -4438,7 +4438,7 @@ function gump:CriaJanelaInfo() local _, size, flags = bar.lefttext:GetFont() local font = SharedMedia:Fetch ("font", "Arial Narrow") - bar.lefttext:SetFont (font, 11) + bar.lefttext:SetFont(font, 11) bar.lefttext:SetPoint("left", bar, "left", 4, 0) bar.lefttext:SetJustifyH("left") @@ -4455,7 +4455,7 @@ function gump:CriaJanelaInfo() local _, size, flags = bar.righttext:GetFont() local font = SharedMedia:Fetch ("font", "Arial Narrow") - bar.righttext:SetFont (font, 11) + bar.righttext:SetFont(font, 11) bar.righttext:SetPoint("right", bar, "right", -2, 0) bar.righttext:SetJustifyH("right") @@ -4465,7 +4465,7 @@ function gump:CriaJanelaInfo() local _, size, flags = bar.righttext2:GetFont() local font = SharedMedia:Fetch ("font", "Arial Narrow") - bar.righttext2:SetFont (font, 11) + bar.righttext2:SetFont(font, 11) bar.righttext2:SetPoint("right", bar, "right", -42, 0) bar.righttext2:SetJustifyH("right") @@ -4636,7 +4636,7 @@ function gump:CriaJanelaInfo() 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) + bar.lefttext:SetFont(font, 11) bar.lefttext:SetPoint("left", bar, "left", 2, 0) bar.lefttext:SetJustifyH("left") bar.lefttext:SetTextColor(1, 1, 1, 1) @@ -4652,7 +4652,7 @@ function gump:CriaJanelaInfo() 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) + bar.righttext:SetFont(font, 11) bar.righttext:SetPoint("right", bar, "right", -2, 0) bar.righttext:SetJustifyH("right") bar.righttext:SetTextColor(1, 1, 1, 1) @@ -4660,7 +4660,7 @@ function gump:CriaJanelaInfo() 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) + bar.righttext2:SetFont(font, 11) bar.righttext2:SetPoint("right", bar, "right", -46, 0) bar.righttext2:SetJustifyH("right") bar.righttext2:SetTextColor(1, 1, 1, 1) diff --git a/frames/window_rowtexteditor.lua b/frames/window_rowtexteditor.lua index 0126d92f2..ac96093e8 100644 --- a/frames/window_rowtexteditor.lua +++ b/frames/window_rowtexteditor.lua @@ -33,7 +33,7 @@ end local y = -32 local buttonTemplate = DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE") -local textentry = DF:NewSpecialLuaEditorEntry (panel, scrollWidth, 555, "editbox", "$parentEntry") +local textentry = DF:NewSpecialLuaEditorEntry(panel, scrollWidth, 555, "editbox", "$parentEntry") textentry:SetPoint("topleft", panel, "topleft", 10, y) DF:ApplyStandardBackdrop(textentry) DF:SetFontSize(textentry.editbox, 14) diff --git a/frames/window_runcode.lua b/frames/window_runcode.lua index fe3dafe55..218c0c657 100644 --- a/frames/window_runcode.lua +++ b/frames/window_runcode.lua @@ -33,7 +33,7 @@ function Details.OpenRunCodeWindow() local f = DetailsRunCodePanel or DF:CreateSimplePanel(UIParent, 700, 480, "Details! Run Code", "DetailsRunCodePanel") --lua editor - local code_editor = DF:NewSpecialLuaEditorEntry (f, 885, 510, "text", "$parentCodeEditorWindow") + local code_editor = DF:NewSpecialLuaEditorEntry(f, 885, 510, "text", "$parentCodeEditorWindow") f.CodeEditor = code_editor code_editor:SetPoint("topleft", f, "topleft", 20, -56) diff --git a/frames/window_statistics.lua b/frames/window_statistics.lua index 9e498fe2c..afc0a0908 100644 --- a/frames/window_statistics.lua +++ b/frames/window_statistics.lua @@ -36,7 +36,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild local f = DetailsRaidHistoryWindow or CreateFrame("frame", "DetailsRaidHistoryWindow", UIParent,"BackdropTemplate") --, "ButtonFrameTemplate" f:SetPoint("center", UIParent, "center") f:SetFrameStrata("HIGH") - f:SetToplevel (true) + f:SetToplevel(true) f:SetMovable(true) f:SetWidth(850) @@ -257,8 +257,8 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild end end - eventListener:RegisterEvent ("COMM_EVENT_RECEIVED", "OnCommReceived") - eventListener:RegisterEvent ("COMM_EVENT_SENT", "OnCommSent") + eventListener:RegisterEvent("COMM_EVENT_RECEIVED", "OnCommReceived") + eventListener:RegisterEvent("COMM_EVENT_SENT", "OnCommSent") --report results function f.BuildReport() diff --git a/frames/window_wa.lua b/frames/window_wa.lua index 3fac47cca..1f837164c 100644 --- a/frames/window_wa.lua +++ b/frames/window_wa.lua @@ -1986,7 +1986,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr f:SetFrameStrata("DIALOG") f:EnableMouse(true) f:SetMovable(true) - f:SetToplevel (true) + f:SetToplevel(true) --background f.bg1 = f:CreateTexture(nil, "background") diff --git a/frames/window_welcome.lua b/frames/window_welcome.lua index ecd0cba99..21bf2eca5 100644 --- a/frames/window_welcome.lua +++ b/frames/window_welcome.lua @@ -1321,7 +1321,7 @@ local window_openned_at = time() texto_snap:SetJustifyV ("top") texto_snap:SetTextColor(1, 1, 1, 1) local fonte, _, flags = texto_snap:GetFont() - texto_snap:SetFont (fonte, 11, flags) + texto_snap:SetFont(fonte, 11, flags) local snap_image1 = window:CreateTexture(nil, "overlay") snap_image1:SetTexture([[Interface\Addons\Details\images\icons]]) @@ -1402,14 +1402,14 @@ local window_openned_at = time() --local t = {esta_morte, time(), joe.nome, joe.classe, 400000, "52m 12s", ["dead"] = true} --table.insert(current_combat.last_events_tables, #current_combat.last_events_tables+1, t) - rawset (_detalhes.spellcache, 300000, {"A Gun in Your Hand", 300000, [[Interface\ICONS\INV_Legendary_Gun]]}) - rawset (_detalhes.spellcache, 300001, {"Shot", 300001, [[Interface\ICONS\INV_Archaeology_Ogres_HarGunn_Eye]]}) - rawset (_detalhes.spellcache, 300002, {"Mexico Travel", 300002, [[Interface\ICONS\Achievement_Dungeon_Gundrak_Normal]]}) - rawset (_detalhes.spellcache, 300003, {"Rope", 300003, [[Interface\ICONS\Creatureportrait_RopeLadder01]]}) - rawset (_detalhes.spellcache, 300004, {"A Guitar Solo", 300004, [[Interface\ICONS\INV_Staff_2h_DraenorDungeon_C_05]]}) - rawset (_detalhes.spellcache, 300005, {"Watchtower", 300005, [[Interface\ICONS\Achievement_BG_DefendXtowers_AV]]}) - rawset (_detalhes.spellcache, 300006, {"Oh! Hey There!", 300006, [[Interface\ICONS\Spell_Shadow_SummonSuccubus]]}) - rawset (_detalhes.spellcache, 300007, {"I'm an Ability!", 300007, [[Interface\ICONS\Spell_Nature_Polymorph]]}) + rawset(_detalhes.spellcache, 300000, {"A Gun in Your Hand", 300000, [[Interface\ICONS\INV_Legendary_Gun]]}) + rawset(_detalhes.spellcache, 300001, {"Shot", 300001, [[Interface\ICONS\INV_Archaeology_Ogres_HarGunn_Eye]]}) + rawset(_detalhes.spellcache, 300002, {"Mexico Travel", 300002, [[Interface\ICONS\Achievement_Dungeon_Gundrak_Normal]]}) + rawset(_detalhes.spellcache, 300003, {"Rope", 300003, [[Interface\ICONS\Creatureportrait_RopeLadder01]]}) + rawset(_detalhes.spellcache, 300004, {"A Guitar Solo", 300004, [[Interface\ICONS\INV_Staff_2h_DraenorDungeon_C_05]]}) + rawset(_detalhes.spellcache, 300005, {"Watchtower", 300005, [[Interface\ICONS\Achievement_BG_DefendXtowers_AV]]}) + rawset(_detalhes.spellcache, 300006, {"Oh! Hey There!", 300006, [[Interface\ICONS\Spell_Shadow_SummonSuccubus]]}) + rawset(_detalhes.spellcache, 300007, {"I'm an Ability!", 300007, [[Interface\ICONS\Spell_Nature_Polymorph]]}) joe.targets ["My Old Lady"] = 3500000 joe.targets ["My Self"] = 2000000 @@ -1490,7 +1490,7 @@ local window_openned_at = time() texto_plugins:SetJustifyV ("top") texto_plugins:SetTextColor(1, 1, 1, 1) --local fonte, _, flags = texto_plugins:GetFont() - --texto_plugins:SetFont (fonte, 11, flags) + --texto_plugins:SetFont(fonte, 11, flags) local plugins_image1 = window:CreateTexture(nil, "overlay") plugins_image1:SetTexture([[Interface\Addons\Details\images\icons2]]) diff --git a/functions/bossmods.lua b/functions/bossmods.lua index b3c21986f..65cbccb92 100644 --- a/functions/bossmods.lua +++ b/functions/bossmods.lua @@ -137,9 +137,9 @@ function Details:CreateCallbackListeners() wipe (current_table_bigwigs) end end) - event_frame:RegisterEvent ("ENCOUNTER_START") - event_frame:RegisterEvent ("ENCOUNTER_END") - event_frame:RegisterEvent ("PLAYER_REGEN_ENABLED") + event_frame:RegisterEvent("ENCOUNTER_START") + event_frame:RegisterEvent("ENCOUNTER_END") + event_frame:RegisterEvent("PLAYER_REGEN_ENABLED") if (_G.DBM) then local dbm_timer_callback = function(bar_type, id, msg, timer, icon, bartype, spellId, colorId, modid) diff --git a/functions/deathmenu.lua b/functions/deathmenu.lua index 4aebfab2d..98edb9ce2 100644 --- a/functions/deathmenu.lua +++ b/functions/deathmenu.lua @@ -10,8 +10,8 @@ local detailsOnDeathMenu = CreateFrame("frame", "DetailsOnDeathMenu", UIParent, detailsOnDeathMenu:SetHeight(30) detailsOnDeathMenu.Debug = false -detailsOnDeathMenu:RegisterEvent ("PLAYER_REGEN_ENABLED") -detailsOnDeathMenu:RegisterEvent ("ENCOUNTER_END") +detailsOnDeathMenu:RegisterEvent("PLAYER_REGEN_ENABLED") +detailsOnDeathMenu:RegisterEvent("ENCOUNTER_END") DetailsFramework:ApplyStandardBackdrop(detailsOnDeathMenu) detailsOnDeathMenu:SetAlpha(0.75) diff --git a/functions/dungeon.lua b/functions/dungeon.lua index 15035a824..347656a14 100644 --- a/functions/dungeon.lua +++ b/functions/dungeon.lua @@ -265,9 +265,9 @@ function mythicDungeonCharts:OnEndMythicDungeon() end end -mythicDungeonCharts:RegisterEvent ("COMBAT_MYTHICDUNGEON_START", "OnStartMythicDungeon") -mythicDungeonCharts:RegisterEvent ("COMBAT_MYTHICDUNGEON_END", "OnEndMythicDungeon") -mythicDungeonCharts:RegisterEvent ("COMBAT_BOSS_DEFEATED", "OnBossDefeated") +mythicDungeonCharts:RegisterEvent("COMBAT_MYTHICDUNGEON_START", "OnStartMythicDungeon") +mythicDungeonCharts:RegisterEvent("COMBAT_MYTHICDUNGEON_END", "OnEndMythicDungeon") +mythicDungeonCharts:RegisterEvent("COMBAT_BOSS_DEFEATED", "OnBossDefeated") -- /run _G.DetailsMythicDungeonChartHandler.ShowChart(); DetailsMythicDungeonChartFrame.ShowChartFrame() -- /run _G.DetailsMythicDungeonChartHandler.ShowReadyPanel() diff --git a/functions/events.lua b/functions/events.lua index 6ea4098a0..99ede30e0 100644 --- a/functions/events.lua +++ b/functions/events.lua @@ -126,7 +126,7 @@ local common_events = { ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --register a event - function _detalhes:RegisterEvent (object, event, func) + function _detalhes:RegisterEvent(object, event, func) if (not _detalhes.RegistredEvents [event]) then if (object.Msg) then @@ -391,8 +391,8 @@ local common_events = { local listener_meta = setmetatable({}, _detalhes) listener_meta.__index = listener_meta - function listener_meta:RegisterEvent (event, func) - return _detalhes:RegisterEvent (self, event, func) + function listener_meta:RegisterEvent(event, func) + return _detalhes:RegisterEvent(self, event, func) end function listener_meta:UnregisterEvent (event) return _detalhes:UnregisterEvent (self, event) diff --git a/functions/mythicdungeon.lua b/functions/mythicdungeon.lua index 65f7591cd..a99895b95 100644 --- a/functions/mythicdungeon.lua +++ b/functions/mythicdungeon.lua @@ -19,11 +19,11 @@ DetailsMythicPlusFrame.DevelopmentDebug = false --disabling the mythic+ feature if the user is playing in wow classic if (not DF.IsTimewalkWoW()) then - DetailsMythicPlusFrame:RegisterEvent ("CHALLENGE_MODE_START") - DetailsMythicPlusFrame:RegisterEvent ("CHALLENGE_MODE_COMPLETED") - DetailsMythicPlusFrame:RegisterEvent ("ZONE_CHANGED_NEW_AREA") - DetailsMythicPlusFrame:RegisterEvent ("ENCOUNTER_END") - DetailsMythicPlusFrame:RegisterEvent ("START_TIMER") + DetailsMythicPlusFrame:RegisterEvent("CHALLENGE_MODE_START") + DetailsMythicPlusFrame:RegisterEvent("CHALLENGE_MODE_COMPLETED") + DetailsMythicPlusFrame:RegisterEvent("ZONE_CHANGED_NEW_AREA") + DetailsMythicPlusFrame:RegisterEvent("ENCOUNTER_END") + DetailsMythicPlusFrame:RegisterEvent("START_TIMER") end --[[ @@ -713,12 +713,12 @@ end --make an event listener to sync combat data DetailsMythicPlusFrame.EventListener = Details:CreateEventListener() -DetailsMythicPlusFrame.EventListener:RegisterEvent ("COMBAT_ENCOUNTER_START") -DetailsMythicPlusFrame.EventListener:RegisterEvent ("COMBAT_ENCOUNTER_END") -DetailsMythicPlusFrame.EventListener:RegisterEvent ("COMBAT_PLAYER_ENTER") -DetailsMythicPlusFrame.EventListener:RegisterEvent ("COMBAT_PLAYER_LEAVE") -DetailsMythicPlusFrame.EventListener:RegisterEvent ("COMBAT_MYTHICDUNGEON_START") -DetailsMythicPlusFrame.EventListener:RegisterEvent ("COMBAT_MYTHICDUNGEON_END") +DetailsMythicPlusFrame.EventListener:RegisterEvent("COMBAT_ENCOUNTER_START") +DetailsMythicPlusFrame.EventListener:RegisterEvent("COMBAT_ENCOUNTER_END") +DetailsMythicPlusFrame.EventListener:RegisterEvent("COMBAT_PLAYER_ENTER") +DetailsMythicPlusFrame.EventListener:RegisterEvent("COMBAT_PLAYER_LEAVE") +DetailsMythicPlusFrame.EventListener:RegisterEvent("COMBAT_MYTHICDUNGEON_START") +DetailsMythicPlusFrame.EventListener:RegisterEvent("COMBAT_MYTHICDUNGEON_END") function DetailsMythicPlusFrame.EventListener.OnDetailsEvent(contextObject, event, ...) --these events triggers within Details control functions, they run exactly after details! creates or close a segment diff --git a/functions/plater.lua b/functions/plater.lua index 20e5a36cf..547d632a0 100644 --- a/functions/plater.lua +++ b/functions/plater.lua @@ -117,7 +117,7 @@ function Details:RefreshPlaterIntegration() wipe (plater_integration_frame.DamageTaken) --read cleu events - plater_integration_frame:RegisterEvent ("COMBAT_LOG_EVENT_UNFILTERED") + plater_integration_frame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") --start the real time dps updater plater_integration_frame.OnTickFrame.NextUpdate = CONST_REALTIME_UPDATE_TIME diff --git a/functions/profiles.lua b/functions/profiles.lua index 24736b8aa..f9c0c4020 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -126,9 +126,9 @@ function _detalhes:SetProfileCProp (name, cprop, value) if (profile) then if (type(value) == "table") then - rawset (profile, cprop, Details.CopyTable(value)) + rawset(profile, cprop, Details.CopyTable(value)) else - rawset (profile, cprop, value) + rawset(profile, cprop, value) end else return diff --git a/functions/skins.lua b/functions/skins.lua index 7d399caaf..bb8a5dfbd 100644 --- a/functions/skins.lua +++ b/functions/skins.lua @@ -473,7 +473,7 @@ local _ ["textL_custom_text"] = "{data1}. {data3}{data2}", ["font_size"] = 16, ["height"] = 21, - ["texture_file"] = "Interface\\AddOns\\Details\\images\\bar_skyline", + ["texture_file"] = "Interface\\AddOns\\Details\\images\\bar_hyanda", ["icon_file"] = "Interface\\AddOns\\Details\\images\\classes_small", ["textR_bracket"] = "(", ["textR_enable_custom_text"] = false, @@ -484,7 +484,7 @@ local _ }, ["textL_show_number"] = true, ["textR_custom_text"] = "{data1} ({data2}, {data3}%)", - ["texture"] = "Skyline", + ["texture"] = "Details Hyanda", ["use_spec_icons"] = true, ["textR_class_colors"] = false, ["textL_class_colors"] = false, diff --git a/functions/slash.lua b/functions/slash.lua index 41ba60cb3..cbbbbe687 100644 --- a/functions/slash.lua +++ b/functions/slash.lua @@ -233,7 +233,7 @@ function SlashCmdList.DETAILS (msg, editbox) } for i = 1, window1.baseframe:GetNumPoints() do - state ["Point" .. i] = {window1.baseframe:GetPoint (i)} + state ["Point" .. i] = {window1.baseframe:GetPoint(i)} end local parent = window1.baseframe:GetParent() @@ -733,7 +733,7 @@ function SlashCmdList.DETAILS (msg, editbox) local barra = instancia.barras [whichRowLine] for i = 1, barra:GetNumPoints() do - local point, relativeTo, relativePoint, xOfs, yOfs = barra:GetPoint (i) + local point, relativeTo, relativePoint, xOfs, yOfs = barra:GetPoint(i) print(point, relativeTo, relativePoint, xOfs, yOfs) end @@ -1928,7 +1928,7 @@ function _detalhes:CreateListPanel() container_barras_window:SetWidth(460) container_barras_window:SetHeight(550) - container_barras_window:SetScrollChild (container_barras) + container_barras_window:SetScrollChild(container_barras) container_barras_window:SetPoint("TOPLEFT", _detalhes.ListPanel.widget, "TOPLEFT", 21, -10) _detalhes.gump:NewScrollBar (container_barras_window, container_barras, -10, -17) diff --git a/functions/spellcache.lua b/functions/spellcache.lua index a1cded6d6..f67785670 100644 --- a/functions/spellcache.lua +++ b/functions/spellcache.lua @@ -8,9 +8,9 @@ do local _detalhes = _G._detalhes local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" ) local _ - local _rawget = rawget - local _rawset = rawset - local _setmetatable = setmetatable + local rawget = rawget + local rawset = rawset + local setmetatable = setmetatable local _GetSpellInfo = GetSpellInfo local _unpack = unpack @@ -61,9 +61,9 @@ do --reset spell cache function _detalhes:ClearSpellCache() - _detalhes.spellcache = _setmetatable({}, + _detalhes.spellcache = setmetatable({}, {__index = function(tabela, valor) - local esta_magia = _rawget (tabela, valor) + local esta_magia = rawget (tabela, valor) if (esta_magia) then return esta_magia end @@ -85,19 +85,19 @@ do end}) --default overwrites - --_rawset (_detalhes.spellcache, 1, {Loc ["STRING_MELEE"], 1, "Interface\\AddOns\\Details\\images\\melee.tga"}) - --_rawset (_detalhes.spellcache, 2, {Loc ["STRING_AUTOSHOT"], 1, "Interface\\AddOns\\Details\\images\\autoshot.tga"}) + --rawset (_detalhes.spellcache, 1, {Loc ["STRING_MELEE"], 1, "Interface\\AddOns\\Details\\images\\melee.tga"}) + --rawset (_detalhes.spellcache, 2, {Loc ["STRING_AUTOSHOT"], 1, "Interface\\AddOns\\Details\\images\\autoshot.tga"}) --built-in overwrites for spellId, spellTable in pairs(_detalhes.SpellOverwrite) do local name, _, icon = _GetSpellInfo(spellId) - _rawset (_detalhes.spellcache, spellId, {spellTable.name or name, 1, spellTable.icon or icon}) + rawset (_detalhes.spellcache, spellId, {spellTable.name or name, 1, spellTable.icon or icon}) end --user overwrites -- [1] spellid [2] spellname [3] spellicon for index, spellTable in ipairs(_detalhes.savedCustomSpells) do - _rawset (_detalhes.spellcache, spellTable [1], {spellTable [2], 1, spellTable [3]}) + rawset (_detalhes.spellcache, spellTable [1], {spellTable [2], 1, spellTable [3]}) end end @@ -194,7 +194,7 @@ do local t = _detalhes.savedCustomSpells[index] if (t) then t [2], t [3] = name or t [2], icon or t [3] - return _rawset (_detalhes.spellcache, t [1], {t [2], 1, t [3]}) + return rawset (_detalhes.spellcache, t [1], {t [2], 1, t [3]}) else return false end @@ -218,7 +218,7 @@ do icon = [[Interface\InventoryItems\WoWUnknownItem01]] end - _rawset (_detalhes.spellcache, spellid, {name, 1, icon}) + rawset (_detalhes.spellcache, spellid, {name, 1, icon}) t[2] = name t[3] = icon @@ -267,7 +267,7 @@ do if (not is_overwrite) then tinsert(_detalhes.savedCustomSpells, {spellid, name, icon}) end - return _rawset (_detalhes.spellcache, spellid, {name, 1, icon}) + return rawset (_detalhes.spellcache, spellid, {name, 1, icon}) end function _detalhes:UserCustomSpellRemove (index) @@ -276,7 +276,7 @@ do local spellid = t [1] local name, _, icon = _GetSpellInfo(spellid) if (name) then - _rawset (_detalhes.spellcache, spellid, {name, 1, icon}) + rawset (_detalhes.spellcache, spellid, {name, 1, icon}) end return tremove(_detalhes.savedCustomSpells, index) end @@ -294,9 +294,9 @@ do local spellName, rank, spellIcon = _GetSpellInfo(spellid) if (spellName) then - _rawset (_detalhes.spellcache, spellid, {spellName .. Loc ["STRING_DOT"], rank, spellIcon}) + rawset (_detalhes.spellcache, spellid, {spellName .. Loc ["STRING_DOT"], rank, spellIcon}) else - _rawset (_detalhes.spellcache, spellid, {"Unknown DoT Spell? " .. Loc ["STRING_DOT"], rank, [[Interface\InventoryItems\WoWUnknownItem01]]}) + rawset (_detalhes.spellcache, spellid, {"Unknown DoT Spell? " .. Loc ["STRING_DOT"], rank, [[Interface\InventoryItems\WoWUnknownItem01]]}) end end diff --git a/functions/testbars.lua b/functions/testbars.lua index 985828263..422d0076f 100644 --- a/functions/testbars.lua +++ b/functions/testbars.lua @@ -252,7 +252,7 @@ function Details:CreateTestBars (alphabet, isArena) table.insert(current_combat.last_events_tables, #current_combat.last_events_tables+1, t) elseif (robot.nome == "Mr. President") then - rawset (Details.spellcache, 56488, {"Nuke", 56488, [[Interface\ICONS\inv_gizmo_supersappercharge]]}) + rawset(Details.spellcache, 56488, {"Nuke", 56488, [[Interface\ICONS\inv_gizmo_supersappercharge]]}) robot.spells:PegaHabilidade (56488, true, "SPELL_DAMAGE") robot.spells._ActorTable [56488].total = robot.total end diff --git a/images/bar_hyanda.tga b/images/bar_hyanda.tga new file mode 100644 index 000000000..f514ab478 Binary files /dev/null and b/images/bar_hyanda.tga differ diff --git a/images/spec_icons_normal.tga b/images/spec_icons_normal.tga index 6618a26e5..d9099d723 100644 Binary files a/images/spec_icons_normal.tga and b/images/spec_icons_normal.tga differ diff --git a/plugins/Details_DataStorage/Details_DataStorage.lua b/plugins/Details_DataStorage/Details_DataStorage.lua index 51c564f4a..2d7e0cf9a 100644 --- a/plugins/Details_DataStorage/Details_DataStorage.lua +++ b/plugins/Details_DataStorage/Details_DataStorage.lua @@ -15,7 +15,7 @@ end local f = CreateFrame("frame", nil, UIParent) f:Hide() -f:RegisterEvent ("ADDON_LOADED") +f:RegisterEvent("ADDON_LOADED") f:SetScript("OnEvent", function(self, event, addonName) diff --git a/plugins/Details_EncounterDetails/Details_EncounterDetails.lua b/plugins/Details_EncounterDetails/Details_EncounterDetails.lua index a5fb2b1f6..3bae5db01 100644 --- a/plugins/Details_EncounterDetails/Details_EncounterDetails.lua +++ b/plugins/Details_EncounterDetails/Details_EncounterDetails.lua @@ -307,9 +307,9 @@ local function CreatePluginFrames (data) wipe (current_table_bigwigs) end end) - event_frame:RegisterEvent ("ENCOUNTER_START") - event_frame:RegisterEvent ("ENCOUNTER_END") - event_frame:RegisterEvent ("PLAYER_REGEN_ENABLED") + event_frame:RegisterEvent("ENCOUNTER_START") + event_frame:RegisterEvent("ENCOUNTER_END") + event_frame:RegisterEvent("PLAYER_REGEN_ENABLED") --DBM_TimerStart Timer183828cdcount 2 Death Brand CD (2) 42.5 Interface\Icons\warlock_summon_doomguard cdcount 183828 1 1438 --DBM_TimerStart Timer183828cdcount 3 Death Brand CD (3) 42.5 Interface\Icons\warlock_summon_doomguard cdcount 183828 1 1438 diff --git a/plugins/Details_EncounterDetails/frames.lua b/plugins/Details_EncounterDetails/frames.lua index be1cdc557..1107dc7bb 100644 --- a/plugins/Details_EncounterDetails/frames.lua +++ b/plugins/Details_EncounterDetails/frames.lua @@ -1027,7 +1027,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) local DetailsFrameWork = _detalhes.gump BossFrame:SetFrameStrata("HIGH") - BossFrame:SetToplevel (true) + BossFrame:SetToplevel(true) BossFrame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true}) BossFrame:SetBackdropColor(.5, .5, .5, .5) @@ -2707,7 +2707,7 @@ end container_damagetaken_window:SetWidth(BOX_WIDTH) container_damagetaken_window:SetHeight(BOX_HEIGHT) - container_damagetaken_window:SetScrollChild (container_damagetaken_frame) + container_damagetaken_window:SetScrollChild(container_damagetaken_frame) container_damagetaken_window:SetPoint("TOPLEFT", frame, "TOPLEFT", 10, -92) DetailsFrameWork:NewScrollBar (container_damagetaken_window, container_damagetaken_frame, 4, -16) @@ -2760,7 +2760,7 @@ end container_habilidades_window:SetWidth(BOX_WIDTH) container_habilidades_window:SetHeight(BOX_HEIGHT) - container_habilidades_window:SetScrollChild (container_habilidades_frame) + container_habilidades_window:SetScrollChild(container_habilidades_frame) container_habilidades_window:SetPoint("TOPLEFT", container_damagetaken_window, "bottomleft", 0, CONST_BOX_VERTICAL_SPACING) --LOCATION DetailsFrameWork:NewScrollBar (container_habilidades_window, container_habilidades_frame, 4, -16) @@ -2803,7 +2803,7 @@ end container_adds_window:SetWidth(BOX_WIDTH) container_adds_window:SetHeight(BOX_HEIGHT_UPPER) - container_adds_window:SetScrollChild (container_adds_frame) + container_adds_window:SetScrollChild(container_adds_frame) container_adds_window:SetPoint("TOPLEFT", container_damagetaken_window, "topright", CONST_BOX_HORIZONTAL_SPACING, 0) DetailsFrameWork:NewLabel(container_adds_window, container_adds_window, nil, "titulo", "Enemy Damage Taken", "GameFontHighlight") @@ -2848,7 +2848,7 @@ end container_interrupt_window:SetWidth(BOX_WIDTH) container_interrupt_window:SetHeight(BOX_HEIGHT_UPPER) - container_interrupt_window:SetScrollChild (container_interrupt_frame) + container_interrupt_window:SetScrollChild(container_interrupt_frame) container_interrupt_window:SetPoint("TOPLEFT", container_adds_window, "TOPRIGHT", CONST_BOX_HORIZONTAL_SPACING, 0) DetailsFrameWork:NewLabel(container_interrupt_window, container_interrupt_window, nil, "titulo", Loc ["STRING_INTERRUPTS"], "GameFontHighlight") @@ -2894,7 +2894,7 @@ end container_dispell_window:SetWidth(BOX_WIDTH) container_dispell_window:SetHeight(BOX_HEIGHT_UPPER) - container_dispell_window:SetScrollChild (container_dispell_frame) + container_dispell_window:SetScrollChild(container_dispell_frame) container_dispell_window:SetPoint("TOPLEFT", container_adds_window, "BOTTOMLEFT", 0, CONST_BOX_VERTICAL_SPACING) DetailsFrameWork:NewLabel(container_dispell_window, container_dispell_window, nil, "titulo", Loc ["STRING_DISPELLS"], "GameFontHighlight") @@ -2944,7 +2944,7 @@ end container_dead_window:SetWidth(BOX_WIDTH) container_dead_window:SetHeight(BOX_HEIGHT_UPPER) - container_dead_window:SetScrollChild (container_dead_frame) + container_dead_window:SetScrollChild(container_dead_frame) container_dead_window:SetPoint("TOPLEFT", container_dispell_window, "TOPRIGHT", CONST_BOX_HORIZONTAL_SPACING, 0) DetailsFrameWork:NewLabel(container_dead_window, container_dead_window, nil, "titulo", Loc ["STRING_DEATH_LOG"], "GameFontHighlight") @@ -2965,13 +2965,13 @@ end --emotes frame local emote_frame = CreateFrame("frame", "DetailsEncountersEmoteFrame", UIParent, "BackdropTemplate") - emote_frame:RegisterEvent ("CHAT_MSG_RAID_BOSS_EMOTE") - emote_frame:RegisterEvent ("CHAT_MSG_RAID_BOSS_WHISPER") - emote_frame:RegisterEvent ("CHAT_MSG_MONSTER_EMOTE") - emote_frame:RegisterEvent ("CHAT_MSG_MONSTER_SAY") - emote_frame:RegisterEvent ("CHAT_MSG_MONSTER_WHISPER") - emote_frame:RegisterEvent ("CHAT_MSG_MONSTER_PARTY") - emote_frame:RegisterEvent ("CHAT_MSG_MONSTER_YELL") + emote_frame:RegisterEvent("CHAT_MSG_RAID_BOSS_EMOTE") + emote_frame:RegisterEvent("CHAT_MSG_RAID_BOSS_WHISPER") + emote_frame:RegisterEvent("CHAT_MSG_MONSTER_EMOTE") + emote_frame:RegisterEvent("CHAT_MSG_MONSTER_SAY") + emote_frame:RegisterEvent("CHAT_MSG_MONSTER_WHISPER") + emote_frame:RegisterEvent("CHAT_MSG_MONSTER_PARTY") + emote_frame:RegisterEvent("CHAT_MSG_MONSTER_YELL") local emote_table = { ["CHAT_MSG_RAID_BOSS_EMOTE"] = 1, diff --git a/plugins/Details_Streamer/Details_Streamer.lua b/plugins/Details_Streamer/Details_Streamer.lua index 978e8a2c7..98f958c52 100644 --- a/plugins/Details_Streamer/Details_Streamer.lua +++ b/plugins/Details_Streamer/Details_Streamer.lua @@ -1291,21 +1291,21 @@ eventFrame.track_spell_cast = function() end function eventFrame:RegisterMyEvents() - eventFrame:RegisterEvent ("UNIT_SPELLCAST_START") - eventFrame:RegisterEvent ("UNIT_SPELLCAST_SENT") - eventFrame:RegisterEvent ("UNIT_SPELLCAST_SUCCEEDED") - eventFrame:RegisterEvent ("UNIT_SPELLCAST_INTERRUPTED") - eventFrame:RegisterEvent ("UNIT_SPELLCAST_FAILED_QUIET") - eventFrame:RegisterEvent ("UNIT_SPELLCAST_FAILED") - eventFrame:RegisterEvent ("UNIT_SPELLCAST_DELAYED") - eventFrame:RegisterEvent ("UNIT_SPELLCAST_CHANNEL_START") - eventFrame:RegisterEvent ("UNIT_SPELLCAST_CHANNEL_STOP") - eventFrame:RegisterEvent ("UNIT_SPELLCAST_CHANNEL_UPDATE") - eventFrame:RegisterEvent ("UNIT_SPELLCAST_STOP") + eventFrame:RegisterEvent("UNIT_SPELLCAST_START") + eventFrame:RegisterEvent("UNIT_SPELLCAST_SENT") + eventFrame:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED") + eventFrame:RegisterEvent("UNIT_SPELLCAST_INTERRUPTED") + eventFrame:RegisterEvent("UNIT_SPELLCAST_FAILED_QUIET") + eventFrame:RegisterEvent("UNIT_SPELLCAST_FAILED") + eventFrame:RegisterEvent("UNIT_SPELLCAST_DELAYED") + eventFrame:RegisterEvent("UNIT_SPELLCAST_CHANNEL_START") + eventFrame:RegisterEvent("UNIT_SPELLCAST_CHANNEL_STOP") + eventFrame:RegisterEvent("UNIT_SPELLCAST_CHANNEL_UPDATE") + eventFrame:RegisterEvent("UNIT_SPELLCAST_STOP") if (not DetailsFramework.IsTBCWow() and not DetailsFramework.IsWotLKWow()) then - eventFrame:RegisterEvent ("UNIT_SPELLCAST_INTERRUPTIBLE") - eventFrame:RegisterEvent ("UNIT_SPELLCAST_NOT_INTERRUPTIBLE") + eventFrame:RegisterEvent("UNIT_SPELLCAST_INTERRUPTIBLE") + eventFrame:RegisterEvent("UNIT_SPELLCAST_NOT_INTERRUPTIBLE") end end @@ -1340,8 +1340,8 @@ local AMP_Tick = C_Timer.NewTicker(1, function() ACTIONS = 0 end) local APM_FRAME = CreateFrame("frame", "DetailsAPMFrame", UIParent, "BackdropTemplate") -APM_FRAME:RegisterEvent ("PLAYER_STARTED_MOVING") -APM_FRAME:RegisterEvent ("PLAYER_STOPPED_MOVING") +APM_FRAME:RegisterEvent("PLAYER_STARTED_MOVING") +APM_FRAME:RegisterEvent("PLAYER_STOPPED_MOVING") APM_FRAME:SetScript("OnEvent", function() ACTIONS = ACTIONS + 1 end) @@ -2500,7 +2500,7 @@ function StreamOverlay:OnEvent (_, event, ...) end --wipe (StreamOverlay.db) - SOF:RegisterEvent ("PLAYER_LOGOUT") + SOF:RegisterEvent("PLAYER_LOGOUT") --profile name SOF.PlayerNameProfile = UnitName("player") .. " - " .. GetRealmName() diff --git a/plugins/Details_TinyThreat/Details_TinyThreat.lua b/plugins/Details_TinyThreat/Details_TinyThreat.lua index f6faaa284..348f1e1a8 100644 --- a/plugins/Details_TinyThreat/Details_TinyThreat.lua +++ b/plugins/Details_TinyThreat/Details_TinyThreat.lua @@ -143,9 +143,9 @@ local function CreatePluginFrames (data) ThreatMeterFrame:UnregisterEvent ("PLAYER_REGEN_ENABLED") elseif (event == "PLUGIN_ENABLED") then - ThreatMeterFrame:RegisterEvent ("PLAYER_TARGET_CHANGED") - ThreatMeterFrame:RegisterEvent ("PLAYER_REGEN_DISABLED") - ThreatMeterFrame:RegisterEvent ("PLAYER_REGEN_ENABLED") + ThreatMeterFrame:RegisterEvent("PLAYER_TARGET_CHANGED") + ThreatMeterFrame:RegisterEvent("PLAYER_REGEN_DISABLED") + ThreatMeterFrame:RegisterEvent("PLAYER_REGEN_ENABLED") end end @@ -863,17 +863,17 @@ function ThreatMeter:OnEvent (_, event, ...) end --Register needed events - _G._detalhes:RegisterEvent (ThreatMeter, "COMBAT_PLAYER_ENTER") - _G._detalhes:RegisterEvent (ThreatMeter, "COMBAT_PLAYER_LEAVE") - _G._detalhes:RegisterEvent (ThreatMeter, "DETAILS_INSTANCE_ENDRESIZE") - _G._detalhes:RegisterEvent (ThreatMeter, "DETAILS_INSTANCE_SIZECHANGED") - _G._detalhes:RegisterEvent (ThreatMeter, "DETAILS_INSTANCE_STARTSTRETCH") - _G._detalhes:RegisterEvent (ThreatMeter, "DETAILS_INSTANCE_ENDSTRETCH") - _G._detalhes:RegisterEvent (ThreatMeter, "DETAILS_OPTIONS_MODIFIED") - - ThreatMeterFrame:RegisterEvent ("PLAYER_TARGET_CHANGED") - ThreatMeterFrame:RegisterEvent ("PLAYER_REGEN_DISABLED") - ThreatMeterFrame:RegisterEvent ("PLAYER_REGEN_ENABLED") + _G._detalhes:RegisterEvent(ThreatMeter, "COMBAT_PLAYER_ENTER") + _G._detalhes:RegisterEvent(ThreatMeter, "COMBAT_PLAYER_LEAVE") + _G._detalhes:RegisterEvent(ThreatMeter, "DETAILS_INSTANCE_ENDRESIZE") + _G._detalhes:RegisterEvent(ThreatMeter, "DETAILS_INSTANCE_SIZECHANGED") + _G._detalhes:RegisterEvent(ThreatMeter, "DETAILS_INSTANCE_STARTSTRETCH") + _G._detalhes:RegisterEvent(ThreatMeter, "DETAILS_INSTANCE_ENDSTRETCH") + _G._detalhes:RegisterEvent(ThreatMeter, "DETAILS_OPTIONS_MODIFIED") + + ThreatMeterFrame:RegisterEvent("PLAYER_TARGET_CHANGED") + ThreatMeterFrame:RegisterEvent("PLAYER_REGEN_DISABLED") + ThreatMeterFrame:RegisterEvent("PLAYER_REGEN_ENABLED") --Saved data ThreatMeter.saveddata = saveddata or {} diff --git a/plugins/Details_Vanguard/Details_Vanguard.lua b/plugins/Details_Vanguard/Details_Vanguard.lua index 575ef53f3..7dcecc216 100644 --- a/plugins/Details_Vanguard/Details_Vanguard.lua +++ b/plugins/Details_Vanguard/Details_Vanguard.lua @@ -111,9 +111,9 @@ local function CreatePluginFrames (data) Vanguard.CurrentInstance = Vanguard:GetInstance(Vanguard.instance_id) - VanguardFrame:RegisterEvent ("ROLE_CHANGED_INFORM") - VanguardFrame:RegisterEvent ("GROUP_ROSTER_UPDATE") - VanguardFrame:RegisterEvent ("PLAYER_TARGET_CHANGED") + VanguardFrame:RegisterEvent("ROLE_CHANGED_INFORM") + VanguardFrame:RegisterEvent("GROUP_ROSTER_UPDATE") + VanguardFrame:RegisterEvent("PLAYER_TARGET_CHANGED") Vanguard:ResetBars() @@ -1138,15 +1138,15 @@ function Vanguard:OnEvent (_, event, arg1, token, time, who_serial, who_name, wh CreatePluginFrames() --Register needed events - _G._detalhes:RegisterEvent (Vanguard, "COMBAT_PLAYER_ENTER") - _G._detalhes:RegisterEvent (Vanguard, "COMBAT_PLAYER_LEAVE") - _G._detalhes:RegisterEvent (Vanguard, "DETAILS_INSTANCE_ENDRESIZE") - _G._detalhes:RegisterEvent (Vanguard, "DETAILS_INSTANCE_SIZECHANGED") - _G._detalhes:RegisterEvent (Vanguard, "GROUP_ONLEAVE") - _G._detalhes:RegisterEvent (Vanguard, "DETAILS_OPTIONS_MODIFIED") + _G._detalhes:RegisterEvent(Vanguard, "COMBAT_PLAYER_ENTER") + _G._detalhes:RegisterEvent(Vanguard, "COMBAT_PLAYER_LEAVE") + _G._detalhes:RegisterEvent(Vanguard, "DETAILS_INSTANCE_ENDRESIZE") + _G._detalhes:RegisterEvent(Vanguard, "DETAILS_INSTANCE_SIZECHANGED") + _G._detalhes:RegisterEvent(Vanguard, "GROUP_ONLEAVE") + _G._detalhes:RegisterEvent(Vanguard, "DETAILS_OPTIONS_MODIFIED") - VanguardFrame:RegisterEvent ("ZONE_CHANGED_NEW_AREA") - VanguardFrame:RegisterEvent ("PLAYER_ENTERING_WORLD") + VanguardFrame:RegisterEvent("ZONE_CHANGED_NEW_AREA") + VanguardFrame:RegisterEvent("PLAYER_ENTERING_WORLD") end end diff --git a/startup.lua b/startup.lua index 1c4311fc1..58f3a4575 100644 --- a/startup.lua +++ b/startup.lua @@ -269,7 +269,7 @@ function Details:StartMeUp() --I'll never stop! self.listener:RegisterEvent("CHALLENGE_MODE_COMPLETED") end - self.parser_frame:RegisterEvent ("COMBAT_LOG_EVENT_UNFILTERED") + self.parser_frame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") --update is in group self.details_users = {}