diff --git a/API UI.txt b/API UI.txt index d0c103d95..658f38263 100644 --- a/API UI.txt +++ b/API UI.txt @@ -1,5 +1,5 @@ -local instance = Details:GetInstance (number) +local instance = Details:GetInstance(number) returns the window object. ============================================================= @@ -32,7 +32,7 @@ side = number, 1 = top side of the window, 2 = bottom. instance:MicroDisplaysLock (is_locked) is_locked = boolean, true is the micro displays are locked and cannot interact with the mouse. -instance:SetAutoHideMenu (enabled) +instance:SetAutoHideMenu(enabled) enabled = boolean, if true, the buttons on window's title bar auto hide when the player isn't interacting with the window. instance:SetBackdropTexture (texturename) @@ -51,7 +51,7 @@ shadow = boolean, draw the outline shadow to the text. instance:LeftMenuAnchorSide (side) side = number, 1 = left, 2 = right, set the anchor point for buttons on window's title bar. -instance:SetFrameStrata (strata) +instance:SetFrameStrata(strata) strata = string, "BACKGROUND", "LOW", "MEDIUM", "HIGH" or "DIALOG". instance:ChangeSkin (skin_name) @@ -146,7 +146,7 @@ direction = 1 top to bottom / 2 bottom to top instance:HideStatusBar() // instance:ShowStatusBar() Show or hide the statusbar for the window. -instance:StatusBarColor (r, g, b, a, no_save) +instance:StatusBarColor(r, g, b, a, no_save) r, g, b, a = number, color to set, no_save = boolean, if true, the values isn't set on the instance config table. @@ -180,7 +180,7 @@ clickfunc = table {function, param1, param2, "left" or "right" button} -------------------- -Details:SetTooltipBackdrop (border_texture, border_size, border_color) +Details:SetTooltipBackdrop(border_texture, border_size, border_color) border_texture = string, border name for SharedMedia. border_size = number, border size. border_color = table {r, g, b, a} @@ -204,7 +204,7 @@ returns a table with instances objects of all instances inside the group. -------------------- -Details:SetWindowUpdateSpeed (interval, nosave) +Details:SetWindowUpdateSpeed(interval, nosave) set the update speed of all windows, if nosave is true, it won't save this change (apply only). Details:SetUseAnimations (enabled, nosave) @@ -231,7 +231,7 @@ Open Forge Window. Details:OpenRaidHistoryWindow() Open Raid History Window. -Details.switch:ShowMe (instance object) +Details.switch:ShowMe(instance object) Open the bookmark panel on the top of the desired window. Details.switch:CloseMe() diff --git a/API.txt b/API.txt index de95609dc..e005a9666 100644 --- a/API.txt +++ b/API.txt @@ -658,7 +658,7 @@ there is two ways for do this: for i, actor in damageContainer:ListActors() do local amount = actor.targets [targetName] if (amount and amount >= 1) then - tinsert (actorsAmount, {name = actor:name(), total = amount}) + tinsert(actorsAmount, {name = actor:name(), total = amount}) end end @@ -705,7 +705,7 @@ end local source = damageContainer:GetActor (sourceNpc) local felfireVolleySpell = source:GetSpell (targetSpell) if (felfireVolleySpell) then - for playerName, amount in pairs (felfireVolleySpell.targets) do + for playerName, amount in pairs(felfireVolleySpell.targets) do --players who took damage from this ability --now this result may be placed on a external table or .custom may also be used local targetActor = damageContainer:GetActor (playerName) @@ -755,7 +755,7 @@ Details.cache_npc_ids [90409] = npcName --for details! for i, actor in damageContainer:ListActors() do actor.custom = 0 end - for playerName, _ in pairs (actor.damage_from) do + for playerName, _ in pairs(actor.damage_from) do local player = damageContainer:GetActor (playerName) if (player:IsPlayer()) then --we only want players. pets always has their damage merged on its owner damage. player.custom = actor.targets [npcName] diff --git a/Libs/DF/auras.lua b/Libs/DF/auras.lua index 8caeb6727..86a1aa862 100644 --- a/Libs/DF/auras.lua +++ b/Libs/DF/auras.lua @@ -53,7 +53,7 @@ function DF:LoadAllSpells (hashMap, indexTable, allSpellsSameName) DF.LoadingAuraAlertFrame = CreateFrame("frame", "DetailsFrameworkLoadingAurasAlert", UIParent, "BackdropTemplate") DF.LoadingAuraAlertFrame:SetSize(340, 75) DF.LoadingAuraAlertFrame:SetPoint("center") - DF.LoadingAuraAlertFrame:SetFrameStrata ("TOOLTIP") + DF.LoadingAuraAlertFrame:SetFrameStrata("TOOLTIP") DF:ApplyStandardBackdrop (DF.LoadingAuraAlertFrame) DF.LoadingAuraAlertFrame:SetBackdropBorderColor(1, 0.8, 0.1) @@ -698,7 +698,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t if not flag then GameCooltip2:Preset (2) - GameCooltip2:SetOwner (self, "left", "right", 2, 0) + GameCooltip2:SetOwner(self, "left", "right", 2, 0) GameCooltip2:SetOption("TextSize", 10) local spellName, _, spellIcon = GetSpellInfo(value) @@ -720,7 +720,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t if (spellsWithSameName) then GameCooltip2:Preset (2) - GameCooltip2:SetOwner (self, "left", "right", 2, 0) + GameCooltip2:SetOwner(self, "left", "right", 2, 0) GameCooltip2:SetOption("TextSize", 10) for i, spellID in ipairs(spellsWithSameName) do @@ -779,7 +779,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t local lineOnEnter = function(self) self:SetBackdropColor(unpack (backdropColor_OnEnter)) - --GameTooltip:SetOwner (self, "ANCHOR_CURSOR") + --GameTooltip:SetOwner(self, "ANCHOR_CURSOR") --GameTooltip:SetSpellByID(self.SpellID) --GameTooltip:AddLine (" ") --GameTooltip:Show() @@ -842,11 +842,11 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t function scroll:DoRefresh() local t = {} local added = {} - for spellID, flag in pairs (scroll.OriginalData) do + for spellID, flag in pairs(scroll.OriginalData) do local spellName, _, spellIcon = GetSpellInfo(spellID) if (spellName and not added[tonumber(spellID) or 0]) then local lowerSpellName = spellName:lower() - tinsert (t, {spellID, spellName, spellIcon, lowerSpellName, flag}) + tinsert(t, {spellID, spellName, spellIcon, lowerSpellName, flag}) added[tonumber(spellID) or 0] = true end end @@ -956,7 +956,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t self:SetBackdropColor(unpack (backdrop_color_on_enter)) local spellid = select (7, GetSpellInfo(self.value)) if (spellid) then - GameTooltip:SetOwner (self, "ANCHOR_CURSOR") + GameTooltip:SetOwner(self, "ANCHOR_CURSOR") GameTooltip:SetSpellByID(spellid) GameTooltip:AddLine (" ") GameTooltip:Show() @@ -1090,12 +1090,12 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t local spellID = get_spellID_from_string (spellName) if (spellID) then - tinsert (f.db.aura_tracker.buff, spellID) + tinsert(f.db.aura_tracker.buff, spellID) --[[ if not tonumber(spellName) then - tinsert (f.db.aura_tracker.buff, spellName) + tinsert(f.db.aura_tracker.buff, spellName) else - tinsert (f.db.aura_tracker.buff, spellID) + tinsert(f.db.aura_tracker.buff, spellID) end ]]-- else @@ -1110,12 +1110,12 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t return end - tinsert (f.db.aura_tracker.buff, spellID) + tinsert(f.db.aura_tracker.buff, spellID) --[[ if not tonumber(text) then - tinsert (f.db.aura_tracker.buff, text) + tinsert(f.db.aura_tracker.buff, text) else - tinsert (f.db.aura_tracker.buff, spellID) + tinsert(f.db.aura_tracker.buff, spellID) end ]]-- end @@ -1137,12 +1137,12 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t local spellID = get_spellID_from_string (spellName) if (spellID) then - tinsert (f.db.aura_tracker.debuff, spellID) + tinsert(f.db.aura_tracker.debuff, spellID) --[[ if not tonumber(spellName) then - tinsert (f.db.aura_tracker.debuff, spellName) + tinsert(f.db.aura_tracker.debuff, spellName) else - tinsert (f.db.aura_tracker.debuff, spellID) + tinsert(f.db.aura_tracker.debuff, spellID) end ]]-- else @@ -1157,14 +1157,14 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t return end - tinsert (f.db.aura_tracker.debuff, spellID) + tinsert(f.db.aura_tracker.debuff, spellID) --[[ if not tonumber(text) then print(text) - tinsert (f.db.aura_tracker.debuff, text) + tinsert(f.db.aura_tracker.debuff, text) else print(spellID) - tinsert (f.db.aura_tracker.debuff, spellID) + tinsert(f.db.aura_tracker.debuff, spellID) end ]]-- end @@ -1247,9 +1247,9 @@ function DF:GetAllPlayerSpells (include_lower_case) local spellType, spellId = GetSpellBookItemInfo (index, "player") if (spellType == "SPELL") then local spellName = GetSpellInfo(spellId) - tinsert (playerSpells, spellName) + tinsert(playerSpells, spellName) if (include_lower_case) then - tinsert (playerSpells, lower (spellName)) + tinsert(playerSpells, lower (spellName)) end end end diff --git a/Libs/DF/colors.lua b/Libs/DF/colors.lua index c434481bb..453c51013 100644 --- a/Libs/DF/colors.lua +++ b/Libs/DF/colors.lua @@ -172,7 +172,7 @@ do return defaultColors end - for colorName, colorTable in pairs (defaultColors) do + for colorName, colorTable in pairs(defaultColors) do DF.alias_text_colors [colorName] = colorTable end diff --git a/Libs/DF/fw.lua b/Libs/DF/fw.lua index a16324e0a..bba23d5b2 100644 --- a/Libs/DF/fw.lua +++ b/Libs/DF/fw.lua @@ -530,7 +530,7 @@ end --copy values that does exist on table2 but not on table1 function DF.table.deploy(t1, t2) - for key, value in pairs (t2) do + for key, value in pairs(t2) do if (type(value) == "table") then t1 [key] = t1 [key] or {} DF.table.deploy(t1 [key], t2 [key]) @@ -2435,7 +2435,7 @@ end TutorialAlertFrame = CreateFrame("frame", "DetailsFrameworkAlertFrame", UIParent, "MicroButtonAlertTemplate") TutorialAlertFrame.isFirst = true TutorialAlertFrame:SetPoint("left", UIParent, "left", -20, 100) - TutorialAlertFrame:SetFrameStrata ("TOOLTIP") + TutorialAlertFrame:SetFrameStrata("TOOLTIP") TutorialAlertFrame:Hide() TutorialAlertFrame:SetScript("OnMouseUp", function(self) @@ -2464,7 +2464,7 @@ end widget:SetText(widget._get()) end elseif (widget.widget_type == "select") then - widget:Select (widget._get()) + 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 @@ -2518,7 +2518,7 @@ end if (template == 2) then local options_frame = CreateFrame("frame", name, UIParent, "ButtonFrameTemplate") - tinsert (UISpecialFrames, name) + tinsert(UISpecialFrames, name) options_frame:SetSize(500, 200) options_frame.RefreshOptions = refresh_options options_frame.widget_list = {} @@ -2544,7 +2544,7 @@ end options_frame:SetMovable (true) options_frame:EnableMouse (true) - options_frame:SetFrameStrata ("DIALOG") + options_frame:SetFrameStrata("DIALOG") options_frame:SetToplevel (true) options_frame:Hide() @@ -2558,7 +2558,7 @@ end elseif (template == 1) then local options_frame = CreateFrame("frame", name, UIParent) - tinsert (UISpecialFrames, name) + tinsert(UISpecialFrames, name) options_frame:SetSize(500, 200) options_frame.RefreshOptions = refresh_options options_frame.widget_list = {} @@ -2584,7 +2584,7 @@ end options_frame:SetMovable (true) options_frame:EnableMouse (true) - options_frame:SetFrameStrata ("DIALOG") + options_frame:SetFrameStrata("DIALOG") options_frame:SetToplevel (true) options_frame:Hide() @@ -2859,7 +2859,7 @@ function DF:SetHook(hookType, func) end end if (not isRemoval) then - tinsert (self.HookList [hookType], func) + tinsert(self.HookList [hookType], func) end else if (DF.debug) then @@ -3275,7 +3275,7 @@ local frameshake_play = function(parent, shakeObject, scaleDirection, scaleAmpli --update the amount of shake running on this frame parent.__frameshakes.enabled = parent.__frameshakes.enabled + 1 - if (not parent:GetScript ("OnUpdate")) then + if (not parent:GetScript("OnUpdate")) then parent:SetScript("OnUpdate", function()end) end end @@ -3353,7 +3353,7 @@ function DF:CreateFrameShake (parent, duration, amplitude, frequency, absoluteSi FrameshakeUpdateFrame.RegisterFrame (parent) end - tinsert (parent.__frameshakes, frameShake) + tinsert(parent.__frameshakes, frameShake) return frameShake end @@ -3575,9 +3575,9 @@ function DF:CreateBorder (parent, alpha1, alpha2, alpha3) 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) + 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) @@ -3592,9 +3592,9 @@ function DF:CreateBorder (parent, alpha1, alpha2, alpha3) 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.Layer1, border1) + tinsert(parent.Borders.Layer2, border2) + tinsert(parent.Borders.Layer3, border3) local border1 = parent:CreateTexture(nil, "background") PixelUtil.SetPoint (border1, "topright", parent, "topright", 1, 0) @@ -3609,9 +3609,9 @@ function DF:CreateBorder (parent, alpha1, alpha2, alpha3) 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.Layer1, border1) + tinsert(parent.Borders.Layer2, border2) + tinsert(parent.Borders.Layer3, border3) local border1 = parent:CreateTexture(nil, "background") PixelUtil.SetPoint (border1, "bottomleft", parent, "bottomleft", 0, -1) @@ -3626,9 +3626,9 @@ function DF:CreateBorder (parent, alpha1, alpha2, alpha3) 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) + tinsert(parent.Borders.Layer1, border1) + tinsert(parent.Borders.Layer2, border2) + tinsert(parent.Borders.Layer3, border3) end @@ -3769,9 +3769,9 @@ function DF:CreateBorderWithSpread (parent, alpha1, alpha2, alpha3, size, 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.Layer1, border1) + tinsert(parent.Borders.Layer2, border2) + tinsert(parent.Borders.Layer3, border3) --top local border1 = parent:CreateTexture(nil, "background") @@ -3792,9 +3792,9 @@ function DF:CreateBorderWithSpread (parent, alpha1, alpha2, alpha3, size, 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.Layer1, border1) + tinsert(parent.Borders.Layer2, border2) + tinsert(parent.Borders.Layer3, border3) --right local border1 = parent:CreateTexture(nil, "background") @@ -3815,9 +3815,9 @@ function DF:CreateBorderWithSpread (parent, alpha1, alpha2, alpha3, size, 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.Layer1, border1) + tinsert(parent.Borders.Layer2, border2) + tinsert(parent.Borders.Layer3, border3) local border1 = parent:CreateTexture(nil, "background") PixelUtil.SetPoint (border1, "bottomleft", parent, "bottomleft", 0 + spread, -1 + spread) @@ -3837,9 +3837,9 @@ function DF:CreateBorderWithSpread (parent, alpha1, alpha2, alpha3, size, 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.Layer1, border1) + tinsert(parent.Borders.Layer2, border2) + tinsert(parent.Borders.Layer3, border3) end @@ -4100,7 +4100,7 @@ function DF:GetClassList() return DF.ClassCache end - for className, classIndex in pairs (DF.ClassFileNameToIndex) do + for className, classIndex in pairs(DF.ClassFileNameToIndex) do local classTable = C_CreatureInfo.GetClassInfo (classIndex) if classTable then local t = { @@ -4110,7 +4110,7 @@ function DF:GetClassList() TexCoord = CLASS_ICON_TCOORDS [className], FileString = className, } - tinsert (DF.ClassCache, t) + tinsert(DF.ClassCache, t) end end @@ -4181,13 +4181,13 @@ function DF:GetCharacterRaceList() 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}) + 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 - tinsert (DF.RaceCache, {Name = alliedRaceInfo.maleName, FileString = alliedRaceInfo.raceFileString, ID = alliedRaceInfo.raceID}) + tinsert(DF.RaceCache, {Name = alliedRaceInfo.maleName, FileString = alliedRaceInfo.raceFileString, ID = alliedRaceInfo.raceID}) end end end @@ -4211,11 +4211,11 @@ function DF:GetCharacterTalents (onlySelected, onlySelectedHash) end elseif (onlySelected) then if (selected) then - tinsert (talentList, {Name = name, ID = talentID, Texture = texture, IsSelected = selected}) + tinsert(talentList, {Name = name, ID = talentID, Texture = texture, IsSelected = selected}) break end else - tinsert (talentList, {Name = name, ID = talentID, Texture = texture, IsSelected = selected}) + tinsert(talentList, {Name = name, ID = talentID, Texture = texture, IsSelected = selected}) end end end @@ -4232,7 +4232,7 @@ function DF:GetCharacterPvPTalents (onlySelected, onlySelectedHash) if (onlySelectedHash) then talentList [talentID] = true else - tinsert (talentList, {Name = talentName, ID = talentID, Texture = texture, IsSelected = true}) + tinsert(talentList, {Name = talentName, ID = talentID, Texture = texture, IsSelected = true}) end end return talentList @@ -4246,7 +4246,7 @@ function DF:GetCharacterPvPTalents (onlySelected, onlySelectedHash) for _, talentID in ipairs(slotInfo.availableTalentIDs) do if (not alreadyAdded [talentID]) then local _, talentName, texture, selected = GetPvpTalentInfoByID (talentID) - tinsert (talentList, {Name = talentName, ID = talentID, Texture = texture, IsSelected = selected}) + tinsert(talentList, {Name = talentName, ID = talentID, Texture = texture, IsSelected = selected}) alreadyAdded [talentID] = true end end diff --git a/Libs/DF/help.lua b/Libs/DF/help.lua index a1ab154e6..6b95c7977 100644 --- a/Libs/DF/help.lua +++ b/Libs/DF/help.lua @@ -81,7 +81,7 @@ function DF:NewHelp (parent, width, height, x, y, buttonWidth, buttonHeight, nam if (not APIHelpFunctions) then APIHelpFunctions = true local idx = getmetatable (helpButton).__index - for funcName, funcAddress in pairs (idx) do + for funcName, funcAddress in pairs(idx) do if (not HelpMetaFunctions [funcName]) then HelpMetaFunctions [funcName] = function(object, ...) local x = loadstring ( "return _G."..object.button:GetName()..":"..funcName.."(...)") diff --git a/Libs/DF/mixins.lua b/Libs/DF/mixins.lua index f51ae0670..5355fa51e 100644 --- a/Libs/DF/mixins.lua +++ b/Libs/DF/mixins.lua @@ -242,7 +242,7 @@ detailsFramework.OptionsFunctions = { GetAllOptions = function(self) if (self.options) then local optionsTable = {} - for key, _ in pairs (self.options) do + for key, _ in pairs(self.options) do optionsTable [#optionsTable + 1] = key end return optionsTable diff --git a/Libs/DF/normal_bar.lua b/Libs/DF/normal_bar.lua index 4ad7fdba4..9822a24db 100644 --- a/Libs/DF/normal_bar.lua +++ b/Libs/DF/normal_bar.lua @@ -472,11 +472,11 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]] function BarMetaFunctions:SetFrameStrata() return self.statusbar:GetFrameStrata() end - function BarMetaFunctions:SetFrameStrata (strata) + function BarMetaFunctions:SetFrameStrata(strata) if (_type(strata) == "table") then - self.statusbar:SetFrameStrata (strata:GetFrameStrata()) + self.statusbar:SetFrameStrata(strata:GetFrameStrata()) else - self.statusbar:SetFrameStrata (strata) + self.statusbar:SetFrameStrata(strata) end end @@ -500,7 +500,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]] if (frame.MyObject.have_tooltip) then GameCooltip2:Reset() GameCooltip2:AddLine (frame.MyObject.have_tooltip) - GameCooltip2:ShowCooltip (frame, "tooltip") + GameCooltip2:ShowCooltip(frame, "tooltip") end end @@ -515,7 +515,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]] frame.MyObject.background:Hide() if (frame.MyObject.have_tooltip) then - GameCooltip2:ShowMe (false) + GameCooltip2:ShowMe(false) end end @@ -588,7 +588,7 @@ local BarMetaFunctions = _G[DF.GlobalWidgetControlNames ["normal_bar"]] DF:CancelTimer (self.TimerScheduled) self.TimerScheduled = nil else - if (self.statusbar:GetScript ("OnUpdate")) then + if (self.statusbar:GetScript("OnUpdate")) then self.statusbar:SetScript("OnUpdate", nil) end end @@ -806,7 +806,7 @@ function DF:NewBar (parent, container, name, member, w, h, value, texture_name) if (not APIBarFunctions) then APIBarFunctions = true local idx = getmetatable (BarObject.statusbar).__index - for funcName, funcAddress in pairs (idx) do + for funcName, funcAddress in pairs(idx) do if (not BarMetaFunctions [funcName]) then BarMetaFunctions [funcName] = function(object, ...) local x = loadstring ( "return _G['"..object.statusbar:GetName().."']:"..funcName.."(...)") diff --git a/Libs/DF/panel.lua b/Libs/DF/panel.lua index d96708b3f..0970bccb6 100644 --- a/Libs/DF/panel.lua +++ b/Libs/DF/panel.lua @@ -405,7 +405,7 @@ DF.LayoutFrame = { -- clear function PanelMetaFunctions:HideWidgets() - for widgetName, widgetSelf in pairs (self) do + for widgetName, widgetSelf in pairs(self) do if (type(widgetSelf) == "table" and widgetSelf.dframework) then widgetSelf:Hide() end @@ -484,11 +484,11 @@ DF.LayoutFrame = { function PanelMetaFunctions:SetFrameStrata() return self.widget:GetFrameStrata() end - function PanelMetaFunctions:SetFrameStrata (strata) + function PanelMetaFunctions:SetFrameStrata(strata) if (_type(strata) == "table") then - self.widget:SetFrameStrata (strata:GetFrameStrata()) + self.widget:SetFrameStrata(strata:GetFrameStrata()) else - self.widget:SetFrameStrata (strata) + self.widget:SetFrameStrata(strata) end end @@ -507,7 +507,7 @@ DF.LayoutFrame = { GameCooltip2:SetType ("tooltip") GameCooltip2:SetColor ("main", "transparent") GameCooltip2:AddLine (frame.MyObject.have_tooltip) - GameCooltip2:SetOwner (frame) + GameCooltip2:SetOwner(frame) GameCooltip2:ShowCooltip() end end @@ -520,7 +520,7 @@ DF.LayoutFrame = { end if (frame.MyObject.have_tooltip) then - GameCooltip2:ShowMe (false) + GameCooltip2:ShowMe(false) end end @@ -643,7 +643,7 @@ function DF:NewPanel (parent, container, name, member, w, h, backdrop, backdropc if (not APIFrameFunctions) then APIFrameFunctions = {} local idx = getmetatable (PanelObject.frame).__index - for funcName, funcAddress in pairs (idx) do + for funcName, funcAddress in pairs(idx) do if (not PanelMetaFunctions [funcName]) then PanelMetaFunctions [funcName] = function(object, ...) local x = loadstring ( "return _G['"..object.frame:GetName().."']:"..funcName.."(...)") @@ -731,8 +731,8 @@ local add_row = function(self, t, need_update) text:SetPoint("left", thisrow, "left", 2, 0) text:SetText(t.name) - tinsert (self._raw_rows, t) - tinsert (self.rows, thisrow) + tinsert(self._raw_rows, t) + tinsert(self.rows, thisrow) if (need_update) then self:AlignRows() @@ -765,12 +765,12 @@ local align_rows = function(self) row.width = row_width end row:SetPoint("topleft", self, "topleft", cur_width, -1) - tinsert (self._anchors, cur_width) + tinsert(self._anchors, cur_width) cur_width = cur_width + row_width + 1 else row:SetPoint("topleft", self, "topleft", cur_width, -1) row.width = self._raw_rows [index].width - tinsert (self._anchors, cur_width) + tinsert(self._anchors, cur_width) cur_width = cur_width + self._raw_rows [index].width + 1 end @@ -786,7 +786,7 @@ local align_rows = function(self) self:CreateRowText (line) text = tremove (line.text_available) end - tinsert (line.text_inuse, text) + tinsert(line.text_inuse, text) text:SetPoint("left", line, "left", self._anchors [#self._anchors], 0) text:SetWidth(row.width) @@ -801,7 +801,7 @@ local align_rows = function(self) self:CreateRowEntry (line) entry = tremove (line.entry_available) end - tinsert (line.entry_inuse, entry) + tinsert(line.entry_inuse, entry) entry:SetPoint("left", line, "left", self._anchors [#self._anchors], 0) if (sindex == rows_shown) then entry:SetWidth(row.width - 25) @@ -830,7 +830,7 @@ local align_rows = function(self) checkbox = tremove (line.checkbox_available) end - tinsert (line.checkbox_inuse, checkbox) + tinsert(line.checkbox_inuse, checkbox) checkbox:SetPoint("left", line, "left", self._anchors [#self._anchors] + ((row.width - 20) / 2), 0) if (sindex == rows_shown) then @@ -852,7 +852,7 @@ local align_rows = function(self) self:CreateRowButton (line) button = tremove (line.button_available) end - tinsert (line.button_inuse, button) + tinsert(line.button_inuse, button) button:SetPoint("left", line, "left", self._anchors [#self._anchors], 0) if (sindex == rows_shown) then button:SetWidth(row.width - 25) @@ -898,7 +898,7 @@ local align_rows = function(self) self:CreateRowIcon (line) icon = tremove (line.icon_available) end - tinsert (line.icon_inuse, icon) + tinsert(line.icon_inuse, icon) icon:SetPoint("left", line, "left", self._anchors [#self._anchors] + ( ((row.width or 22) - 22) / 2), 0) icon.func = row.func end @@ -911,7 +911,7 @@ local align_rows = function(self) self:CreateRowTexture (line) texture = tremove (line.texture_available) end - tinsert (line.texture_inuse, texture) + tinsert(line.texture_inuse, texture) texture:SetPoint("left", line, "left", self._anchors [#self._anchors] + ( ((row.width or 22) - 22) / 2), 0) end @@ -974,42 +974,42 @@ local update_rows = function(self, updated_rows) for index, row in ipairs(self.scrollframe.lines) do for i = #row.text_inuse, 1, -1 do - tinsert (row.text_available, tremove (row.text_inuse, i)) + tinsert(row.text_available, tremove (row.text_inuse, i)) end for i = 1, #row.text_available do row.text_available[i]:Hide() end for i = #row.entry_inuse, 1, -1 do - tinsert (row.entry_available, tremove (row.entry_inuse, i)) + tinsert(row.entry_available, tremove (row.entry_inuse, i)) end for i = 1, #row.entry_available do row.entry_available[i]:Hide() end for i = #row.button_inuse, 1, -1 do - tinsert (row.button_available, tremove (row.button_inuse, i)) + tinsert(row.button_available, tremove (row.button_inuse, i)) end for i = 1, #row.button_available do row.button_available[i]:Hide() end for i = #row.checkbox_inuse, 1, -1 do - tinsert (row.checkbox_available, tremove (row.checkbox_inuse, i)) + tinsert(row.checkbox_available, tremove (row.checkbox_inuse, i)) end for i = 1, #row.checkbox_available do row.checkbox_available[i]:Hide() end for i = #row.icon_inuse, 1, -1 do - tinsert (row.icon_available, tremove (row.icon_inuse, i)) + tinsert(row.icon_available, tremove (row.icon_inuse, i)) end for i = 1, #row.icon_available do row.icon_available[i]:Hide() end for i = #row.texture_inuse, 1, -1 do - tinsert (row.texture_available, tremove (row.texture_inuse, i)) + tinsert(row.texture_available, tremove (row.texture_inuse, i)) end for i = 1, #row.texture_available do row.texture_available[i]:Hide() @@ -1025,7 +1025,7 @@ end local create_panel_text = function(self, row) row.text_total = row.text_total + 1 local text = DF:NewLabel(row, nil, self._name .. "$parentLabel" .. row.text_total, "text" .. row.text_total) - tinsert (row.text_available, text) + tinsert(row.text_available, text) end local create_panel_entry = function(self, row) @@ -1056,7 +1056,7 @@ local create_panel_entry = function(self, row) editbox:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")) editbox:SetBackdropColor(.2, .2, .2, 0.7) - tinsert (row.entry_available, editbox) + tinsert(row.entry_available, editbox) end local create_panel_checkbox = function(self, row) @@ -1067,12 +1067,12 @@ local create_panel_checkbox = function(self, row) switch:SetAsCheckBox() switch:SetTemplate(DF:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")) - tinsert (row.checkbox_available, switch) + tinsert(row.checkbox_available, switch) end local create_panel_button = function(self, row) row.button_total = row.button_total + 1 - local button = DF:NewButton (row, nil, "$parentButton" .. row.button_total, "button" .. row.button_total, 120, 20) + local button = DF:NewButton(row, nil, "$parentButton" .. row.button_total, "button" .. row.button_total, 120, 20) --create icon and the text local icon = DF:NewImage (button, nil, 20, 20) @@ -1084,7 +1084,7 @@ local create_panel_button = function(self, row) button:SetHook("OnEnter", button_on_enter) button:SetHook("OnLeave", button_on_leave) - tinsert (row.button_available, button) + tinsert(row.button_available, button) end local icon_onclick = function(texture, iconbutton) @@ -1094,7 +1094,7 @@ end local create_panel_icon = function(self, row) row.icon_total = row.icon_total + 1 - local iconbutton = DF:NewButton (row, nil, "$parentIconButton" .. row.icon_total, "iconbutton", 22, 20) + local iconbutton = DF:NewButton(row, nil, "$parentIconButton" .. row.icon_total, "iconbutton", 22, 20) iconbutton:SetHook("OnEnter", button_on_enter) iconbutton:SetHook("OnLeave", button_on_leave) @@ -1109,13 +1109,13 @@ local create_panel_icon = function(self, row) icon:SetPoint("center", iconbutton, "center", 0, 0) - tinsert (row.icon_available, iconbutton) + tinsert(row.icon_available, iconbutton) end local create_panel_texture = function(self, row) row.texture_total = row.texture_total + 1 local texture = DF:NewImage (row, nil, 20, 20, "artwork", nil, "_icon" .. row.texture_total, "$parentIcon" .. row.texture_total) - tinsert (row.texture_available, texture) + tinsert(row.texture_available, texture) end local set_fill_function = function(self, func) @@ -1260,13 +1260,13 @@ function DF:NewFillPanel(parent, rows, name, member, w, h, total_lines, fill_row t.func (real_index, results [index].value) panel:Refresh() end - buttonwidget:SetClickFunction (func) + buttonwidget:SetClickFunction(func) else local func = function() t.func (real_index, index) panel:Refresh() end - buttonwidget:SetClickFunction (func) + buttonwidget:SetClickFunction(func) end buttonwidget.id = results [index].id @@ -1278,7 +1278,7 @@ function DF:NewFillPanel(parent, rows, name, member, w, h, total_lines, fill_row t.func (real_index, index) panel:Refresh() end - buttonwidget:SetClickFunction (func) + buttonwidget:SetClickFunction(func) buttonwidget:SetText(results [index]) end @@ -1412,7 +1412,7 @@ function DF:NewFillPanel(parent, rows, name, member, w, h, total_lines, fill_row row:SetPoint("topleft", scrollframe, "topleft", 0, (i-1) * size * -1) row:SetPoint("topright", scrollframe, "topright", 0, (i-1) * size * -1) - tinsert (scrollframe.lines, row) + tinsert(scrollframe.lines, row) row.text_available = {} row.text_inuse = {} @@ -1477,7 +1477,7 @@ function DF:ColorPick (frame, r, g, b, alpha, callback) ColorPickerFrame.previousValues = {r, g, b} ColorPickerFrame:SetParent(UIParent) - ColorPickerFrame:SetFrameStrata ("tooltip") + ColorPickerFrame:SetFrameStrata("tooltip") ColorPickerFrame:SetColorRGB (r, g, b) ColorPickerFrame:Show() @@ -1491,8 +1491,8 @@ function DF:IconPick (callback, close_when_select, param1, param2) local string_lower = string.lower DF.IconPickFrame = CreateFrame("frame", "DetailsFrameworkIconPickFrame", UIParent, "BackdropTemplate") - tinsert (UISpecialFrames, "DetailsFrameworkIconPickFrame") - DF.IconPickFrame:SetFrameStrata ("FULLSCREEN") + tinsert(UISpecialFrames, "DetailsFrameworkIconPickFrame") + DF.IconPickFrame:SetFrameStrata("FULLSCREEN") DF.IconPickFrame:SetPoint("center", UIParent, "center") DF.IconPickFrame:SetWidth(416) @@ -1525,7 +1525,7 @@ function DF:IconPick (callback, close_when_select, param1, param2) DF.IconPickFrame.callback = DF.IconPickFrame.emptyFunction DF.IconPickFrame.preview = CreateFrame("frame", nil, UIParent, "BackdropTemplate") - DF.IconPickFrame.preview:SetFrameStrata ("tooltip") + DF.IconPickFrame.preview:SetFrameStrata("tooltip") DF.IconPickFrame.preview:SetFrameLevel (6001) DF.IconPickFrame.preview:SetSize(76, 76) @@ -1997,7 +1997,7 @@ function DF:CreateSimplePanel (parent, w, h, title, name, panel_options, db) local f = CreateFrame("frame", name, UIParent,"BackdropTemplate") f:SetSize(w or 400, h or 250) f:SetPoint("center", UIParent, "center", 0, 0) - f:SetFrameStrata ("FULLSCREEN") + f:SetFrameStrata("FULLSCREEN") f:EnableMouse() f:SetMovable (true) f:SetBackdrop(SimplePanel_frame_backdrop) @@ -2007,7 +2007,7 @@ function DF:CreateSimplePanel (parent, w, h, title, name, panel_options, db) f.DontRightClickClose = panel_options.DontRightClickClose if (not panel_options.NoTUISpecialFrame) then - tinsert (UISpecialFrames, name) + tinsert(UISpecialFrames, name) end local title_bar = CreateFrame("frame", name .. "TitleBar", f,"BackdropTemplate") @@ -2174,13 +2174,13 @@ local Panel1PxHasPosition = function(self) end end -function DF:Create1PxPanel (parent, w, h, title, name, config, title_anchor, no_special_frame) +function DF:Create1PxPanel(parent, w, h, title, name, config, title_anchor, no_special_frame) local f = CreateFrame("frame", name, parent or UIParent, "BackdropTemplate") f:SetSize(w or 100, h or 75) f:SetPoint("center", UIParent, "center") if (name and not no_special_frame) then - tinsert (UISpecialFrames, name) + tinsert(UISpecialFrames, name) end f:SetScript("OnMouseDown", simple_panel_mouse_down) @@ -2265,12 +2265,12 @@ function DF:ShowPromptPanel (message, func_true, func_false, no_repeated, width) if (not DetailsFrameworkPromptSimple) then local f = CreateFrame("frame", "DetailsFrameworkPromptSimple", UIParent, "BackdropTemplate") f:SetSize(400, 80) - f:SetFrameStrata ("DIALOG") + f:SetFrameStrata("DIALOG") f:SetPoint("center", UIParent, "center", 0, 300) f:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}) f:SetBackdropColor(0, 0, 0, 0.8) f:SetBackdropBorderColor(0, 0, 0, 1) - tinsert (UISpecialFrames, "DetailsFrameworkPromptSimple") + tinsert(UISpecialFrames, "DetailsFrameworkPromptSimple") DF:CreateTitleBar (f, "Prompt!") DF:ApplyStandardBackdrop (f) @@ -2291,7 +2291,7 @@ function DF:ShowPromptPanel (message, func_true, func_false, no_repeated, width) button_false:SetPoint("bottomleft", f, "bottomleft", 5, 5) f.button_false = button_false - button_true:SetClickFunction (function() + button_true:SetClickFunction(function() local my_func = button_true.true_function if (my_func) then local okey, errormessage = pcall (my_func, true) @@ -2302,7 +2302,7 @@ function DF:ShowPromptPanel (message, func_true, func_false, no_repeated, width) end end) - button_false:SetClickFunction (function() + button_false:SetClickFunction(function() local my_func = button_false.false_function if (my_func) then local okey, errormessage = pcall (my_func, true) @@ -2366,7 +2366,7 @@ function DF:ShowTextPromptPanel (message, callback) local f = CreateFrame("frame", "DetailsFrameworkPrompt", UIParent, "BackdropTemplate") f:SetSize(400, 120) - f:SetFrameStrata ("FULLSCREEN") + f:SetFrameStrata("FULLSCREEN") f:SetPoint("center", UIParent, "center", 0, 100) f:EnableMouse (true) f:SetMovable (true) @@ -2374,7 +2374,7 @@ function DF:ShowTextPromptPanel (message, callback) f:SetScript("OnDragStart", function() f:StartMoving() end) f:SetScript("OnDragStop", function() f:StopMovingOrSizing() end) f:SetScript("OnMouseDown", function(self, button) if (button == "RightButton") then f.EntryBox:ClearFocus() f:Hide() end end) - tinsert (UISpecialFrames, "DetailsFrameworkPrompt") + tinsert(UISpecialFrames, "DetailsFrameworkPrompt") DF:CreateTitleBar (f, "Prompt!") DF:ApplyStandardBackdrop (f) @@ -2412,7 +2412,7 @@ function DF:ShowTextPromptPanel (message, callback) end end - button_true:SetClickFunction (function() + button_true:SetClickFunction(function() executeCallback() end) @@ -2451,7 +2451,7 @@ function DF:CreateOptionsButton (parent, callback, name) b:SetScript("OnEnter", function(self) GameCooltip2:Reset() GameCooltip2:AddLine ("Options") - GameCooltip2:ShowCooltip (self, "tooltip") + GameCooltip2:ShowCooltip(self, "tooltip") end) b:SetScript("OnLeave", function(self) GameCooltip2:Hide() @@ -2471,7 +2471,7 @@ function DF:CreateFeedbackButton (parent, callback, name) b:SetScript("OnEnter", function(self) GameCooltip2:Reset() GameCooltip2:AddLine ("Send Feedback") - GameCooltip2:ShowCooltip (self, "tooltip") + GameCooltip2:ShowCooltip(self, "tooltip") end) b:SetScript("OnLeave", function(self) GameCooltip2:Hide() @@ -2604,7 +2604,7 @@ local on_enter_addon = function(self) GameCooltip2:AddLine ("|cFFFFFF00" .. self.name .. "|r") GameCooltip2:AddLine ("") GameCooltip2:AddLine (self.tooltip) - GameCooltip2:ShowCooltip (self, "tooltip") + GameCooltip2:ShowCooltip(self, "tooltip") end self.icon:SetBlendMode("ADD") end @@ -2722,8 +2722,8 @@ function DF:ShowFeedbackPanel (addon_name, version, feedback_methods, more_addon local f = _G.AddonFeedbackPanel if (not f) then - f = DF:Create1PxPanel (UIParent, 400, 100, addon_name .. " Feedback", "AddonFeedbackPanel", nil) - f:SetFrameStrata ("FULLSCREEN") + f = DF:Create1PxPanel(UIParent, 400, 100, addon_name .. " Feedback", "AddonFeedbackPanel", nil) + f:SetFrameStrata("FULLSCREEN") f:SetPoint("center", UIParent, "center") f:SetBackdropColor(0, 0, 0, 0.8) f.feedback_lines = {} @@ -3085,7 +3085,7 @@ local draw_overlay = function(self, this_overlay, overlayData, color) local this_block = this_overlay [index] if (not this_block) then this_block = self.Graphic:CreateTexture(nil, "border") - tinsert (this_overlay, this_block) + tinsert(this_overlay, this_block) end this_block:SetHeight(self.Graphic:GetHeight()) @@ -3118,12 +3118,12 @@ local chart_panel_add_overlay = function(self, overlayData, color, name, icon) local this_overlay = self.Overlays [self.OverlaysAmount] if (not this_overlay) then this_overlay = {} - tinsert (self.Overlays, this_overlay) + tinsert(self.Overlays, this_overlay) end draw_overlay (self, this_overlay, overlayData, color) - tinsert (self.OData, {overlayData, color or line_default_color}) + tinsert(self.OData, {overlayData, color or line_default_color}) if (name and self.HeaderShowOverlays) then self:AddLabel (color or line_default_color, name, "overlay", #self.OData) end @@ -3274,10 +3274,10 @@ local chart_panel_add_data = function(self, graphicData, color, name, elapsed_ti local scaleW = 1/self:GetWidth() local content = graphicData - tinsert (content, 1, 0) - tinsert (content, 1, 0) - tinsert (content, #content+1, 0) - tinsert (content, #content+1, 0) + tinsert(content, 1, 0) + tinsert(content, 1, 0) + tinsert(content, #content+1, 0) + tinsert(content, #content+1, 0) local _i = 3 @@ -3363,7 +3363,7 @@ local chart_panel_add_data = function(self, graphicData, color, name, elapsed_ti end - tinsert (f.GData, {_data, color or line_default_color, lineTexture, max_value, elapsed_time}) + tinsert(f.GData, {_data, color or line_default_color, lineTexture, max_value, elapsed_time}) if (name) then f:AddLabel (color or line_default_color, name, "graphic", #f.GData) end @@ -3684,7 +3684,7 @@ local gframe_reset = function(self) if (self.GraphLib_Lines_Used) then for i = #self.GraphLib_Lines_Used, 1, -1 do local line = tremove (self.GraphLib_Lines_Used) - tinsert (self.GraphLib_Lines, line) + tinsert(self.GraphLib_Lines, line) line:Hide() end end @@ -3981,8 +3981,8 @@ function DF:CreateTabContainer (parent, title, frame_name, frameList, options_ta f:SetScript("OnMouseDown", DF.TabContainerFunctions.OnMouseDown) f:SetScript("OnMouseUp", DF.TabContainerFunctions.OnMouseUp) - tinsert (mainFrame.AllFrames, f) - tinsert (mainFrame.AllButtons, tabButton) + tinsert(mainFrame.AllFrames, f) + tinsert(mainFrame.AllButtons, tabButton) end --order buttons @@ -4071,7 +4071,7 @@ local simple_list_box_GetOrCreateWidget = function(self) widget.XButton:Hide() end - tinsert (self.widgets, widget) + tinsert(self.widgets, widget) end self.nextWidget = self.nextWidget + 1 return widget @@ -4080,15 +4080,15 @@ end local simple_list_box_RefreshWidgets = function(self) self:ResetWidgets() local amt = 0 - for value, _ in pairs (self.list_table) do + for value, _ in pairs(self.list_table) do local widget = self:GetOrCreateWidget() widget:SetPoint("topleft", self, "topleft", 1, -self.options.row_height * (self.nextWidget-2) - 4) widget:SetPoint("topright", self, "topright", -1, -self.options.row_height * (self.nextWidget-2) - 4) - widget:SetClickFunction (self.func, value) + widget:SetClickFunction(self.func, value) if (self.options.show_x_button) then - widget.XButton:SetClickFunction (self.options.x_button_func, value) + widget.XButton:SetClickFunction(self.options.x_button_func, value) widget.XButton.value = value widget.XButton:Show() else @@ -4426,7 +4426,7 @@ function DF:CreateKeybindBox (parent, name, data, callback, width, height, line_ local button = new_keybind_frame ["SpecButton" .. index] local spec_id, spec_name, spec_description, spec_icon, spec_background, spec_role, spec_class = DetailsFramework.GetSpecializationInfoByID (specId) button.text = spec_name - button:SetClickFunction (switch_spec, specId) + button:SetClickFunction(switch_spec, specId) button:SetIcon (spec_icon) button.specID = specId @@ -4438,7 +4438,7 @@ function DF:CreateKeybindBox (parent, name, data, callback, width, height, line_ end button.selectedTexture = selectedTexture - tinsert (allSpecButtons, button) + tinsert(allSpecButtons, button) i = i + 1 end @@ -4455,7 +4455,7 @@ function DF:CreateKeybindBox (parent, name, data, callback, width, height, line_ end local enter_the_key = CreateFrame("frame", nil, new_keybind_frame, "BackdropTemplate") - enter_the_key:SetFrameStrata ("tooltip") + enter_the_key:SetFrameStrata("tooltip") enter_the_key:SetSize(200, 60) enter_the_key:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1}) enter_the_key:SetBackdropColor(0, 0, 0, 1) @@ -4505,7 +4505,7 @@ function DF:CreateKeybindBox (parent, name, data, callback, width, height, line_ end local new_key_bind = function(self, button, specID) - tinsert (new_keybind_frame.CurrentKeybindEditingSet, {key = "-none-", action = "_target", actiontext = ""}) + tinsert(new_keybind_frame.CurrentKeybindEditingSet, {key = "-none-", action = "_target", actiontext = ""}) FauxScrollFrame_SetOffset (new_keybind_frame.keybindScroll, max (#new_keybind_frame.CurrentKeybindEditingSet-SCROLL_ROLL_AMOUNT, 0)) new_keybind_frame.keybindScroll:UpdateScroll() end @@ -4548,7 +4548,7 @@ function DF:CreateKeybindBox (parent, name, data, callback, width, height, line_ if (type(dispel) == "table") then local dispelString = "\n" - for specID, spellid in pairs (dispel) do + for specID, spellid in pairs(dispel) do local specid, specName = DetailsFramework.GetSpecializationInfoByID (specID) local spellName = GetSpellInfo(spellid) dispelString = dispelString .. "|cFFE5E5E5" .. (specName or "") .. "|r: |cFFFFFFFF" .. spellName .. "\n" @@ -4570,11 +4570,11 @@ function DF:CreateKeybindBox (parent, name, data, callback, width, height, line_ local copy_keybind = function(self, button, keybindIndex) local keybind = new_keybind_frame.CurrentKeybindEditingSet [keybindIndex] - for specID, t in pairs (new_keybind_frame.Data) do + for specID, t in pairs(new_keybind_frame.Data) do if (specID ~= new_keybind_frame.EditingSpec) then local key = CopyTable (keybind) local specid, specName = DetailsFramework.GetSpecializationInfoByID (specID) - tinsert (new_keybind_frame.Data [specID], key) + tinsert(new_keybind_frame.Data [specID], key) DF:Msg ("Keybind copied to " .. (specName or "")) end end @@ -4615,11 +4615,11 @@ function DF:CreateKeybindBox (parent, name, data, callback, width, height, line_ keyBindText = keyBindText:gsub ("type3", "MiddleButton") f.KeyBind.text = keyBindText - f.KeyBind:SetClickFunction (set_keybind_key, index, nil, "left") - f.KeyBind:SetClickFunction (set_keybind_key, index, nil, "right") + f.KeyBind:SetClickFunction(set_keybind_key, index, nil, "left") + f.KeyBind:SetClickFunction(set_keybind_key, index, nil, "right") --action - f.ActionDrop:SetFixedParameter (index) - f.ActionDrop:Select (data.action) + f.ActionDrop:SetFixedParameter(index) + f.ActionDrop:Select(data.action) --action text f.ActionText.text = data.actiontext f.ActionText:SetEnterFunction (set_action_text, index) @@ -4632,9 +4632,9 @@ function DF:CreateKeybindBox (parent, name, data, callback, width, height, line_ end --copy - f.Copy:SetClickFunction (copy_keybind, index) + f.Copy:SetClickFunction(copy_keybind, index) --delete - f.Delete:SetClickFunction (delete_keybind, index) + f.Delete:SetClickFunction(delete_keybind, index) f:Show() else @@ -4671,7 +4671,7 @@ function DF:CreateKeybindBox (parent, name, data, callback, width, height, line_ f:SetBackdropColor(unpack (backdropColor)) f:SetScript("OnEnter", on_enter) f:SetScript("OnLeave", on_leave) - tinsert (keybindScroll.Frames, f) + tinsert(keybindScroll.Frames, f) f.Index = DF:CreateLabel(f, "1") f.KeyBind = DF:CreateButton (f, set_key_bind, 100, 20, "", _, _, _, "SetNewKeybindButton", _, 0, options_button_template, options_text_template) @@ -4704,7 +4704,7 @@ function DF:CreateKeybindBox (parent, name, data, callback, width, height, line_ local spellType, spellId = GetSpellBookItemInfo (index, "player") if (spellType == "SPELL") then local spellName = GetSpellInfo(spellId) - tinsert (playerSpells, spellName) + tinsert(playerSpells, spellName) end end f.ActionText.WordList = playerSpells @@ -6173,7 +6173,7 @@ function DF:PassLoadFilters (loadTable, encounterID) if (IS_WOW_PROJECT_MAINLINE and loadTable.talent.Enabled) then local talentsInUse = DF:GetCharacterTalents (false, true) local hasTalent - for talentID, _ in pairs (talentsInUse) do + for talentID, _ in pairs(talentsInUse) do if talentID and (loadTable.talent [talentID] or loadTable.talent [talentID .. ""]) then hasTalent = true break @@ -6188,7 +6188,7 @@ function DF:PassLoadFilters (loadTable, encounterID) if (IS_WOW_PROJECT_MAINLINE and loadTable.pvptalent.Enabled) then local talentsInUse = DF:GetCharacterPvPTalents (false, true) local hasTalent - for talentID, _ in pairs (talentsInUse) do + for talentID, _ in pairs(talentsInUse) do if talentID and (loadTable.pvptalent [talentID] or loadTable.pvptalent [talentID .. ""]) then hasTalent = true break @@ -6248,7 +6248,7 @@ function DF:PassLoadFilters (loadTable, encounterID) return end local hasEncounter - for _, ID in pairs (loadTable.encounter_ids) do + for _, ID in pairs(loadTable.encounter_ids) do if (ID == encounterID) then hasEncounter = true break @@ -6265,7 +6265,7 @@ function DF:PassLoadFilters (loadTable, encounterID) local uiMapID = C_Map.GetBestMapForUnit ("player") local hasMapID - for _, ID in pairs (loadTable.map_ids) do + for _, ID in pairs(loadTable.map_ids) do if (ID == zoneMapID or ID == uiMapID) then hasMapID = true break @@ -6355,8 +6355,8 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions) --create the radio group for classes local classes = {} - for _, classTable in pairs (DF:GetClassList()) do - tinsert (classes, { + for _, classTable in pairs(DF:GetClassList()) do + tinsert(classes, { name = classTable.Name, set = f.OnRadioCheckboxClick, param = classTable.FileString, @@ -6369,14 +6369,14 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions) local classGroup = DF:CreateCheckboxGroup (f, classes, name, {width = 200, height = 200, title = "Character Class"}, {offset_x = 130, amount_per_line = 3}) classGroup:SetPoint("topleft", f, "topleft", anchorPositions.class [1], anchorPositions.class [2]) classGroup.DBKey = "class" - tinsert (f.AllRadioGroups, classGroup) + tinsert(f.AllRadioGroups, classGroup) --create the radio group for character spec if IS_WOW_PROJECT_MAINLINE then local specs = {} for _, specID in ipairs(DF:GetClassSpecIDs (select (2, UnitClass ("player")))) do local specID, specName, specDescription, specIcon, specBackground, specRole, specClass = DetailsFramework.GetSpecializationInfoByID (specID) - tinsert (specs, { + tinsert(specs, { name = specName, set = f.OnRadioCheckboxClick, param = specID, @@ -6387,13 +6387,13 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions) local specGroup = DF:CreateCheckboxGroup (f, specs, name, {width = 200, height = 200, title = "Character Spec"}, {offset_x = 130, amount_per_line = 4}) specGroup:SetPoint("topleft", f, "topleft", anchorPositions.spec [1], anchorPositions.spec [2]) specGroup.DBKey = "spec" - tinsert (f.AllRadioGroups, specGroup) + tinsert(f.AllRadioGroups, specGroup) end --create radio group for character races local raceList = {} for _, raceTable in ipairs(DF:GetCharacterRaceList()) do - tinsert (raceList, { + tinsert(raceList, { name = raceTable.Name, set = f.OnRadioCheckboxClick, param = raceTable.FileString, @@ -6403,13 +6403,13 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions) local raceGroup = DF:CreateCheckboxGroup (f, raceList, name, {width = 200, height = 200, title = "Character Race"}) raceGroup:SetPoint("topleft", f, "topleft", anchorPositions.race [1], anchorPositions.race [2]) raceGroup.DBKey = "race" - tinsert (f.AllRadioGroups, raceGroup) + tinsert(f.AllRadioGroups, raceGroup) --create radio group for talents if IS_WOW_PROJECT_MAINLINE then local talentList = {} for _, talentTable in ipairs(DF:GetCharacterTalents()) do - tinsert (talentList, { + tinsert(talentList, { name = talentTable.Name, set = f.OnRadioCheckboxClick, param = talentTable.ID, @@ -6420,7 +6420,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions) local talentGroup = DF:CreateCheckboxGroup (f, talentList, name, {width = 200, height = 200, title = "Characer Talents"}, {offset_x = 150, amount_per_line = 3}) talentGroup:SetPoint("topleft", f, "topleft", anchorPositions.talent [1], anchorPositions.talent [2]) talentGroup.DBKey = "talent" - tinsert (f.AllRadioGroups, talentGroup) + tinsert(f.AllRadioGroups, talentGroup) f.TalentGroup = talentGroup do @@ -6442,14 +6442,14 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions) local playerTalents = DF:GetCharacterTalents() local indexedTalents = {} for _, talentTable in ipairs(playerTalents) do - tinsert (indexedTalents, talentTable.ID) + tinsert(indexedTalents, talentTable.ID) end --talents selected to load GameCooltip2:AddLine ("select a talent to remove it (added from a different spec or character)", "", 1, "orange", "orange", 9) GameCooltip2:AddLine ("$div", nil, nil, -1, -1) - for talentID, _ in pairs (f.OptionsTable.talent) do + for talentID, _ in pairs(f.OptionsTable.talent) do if (type(talentID) == "number" and not DF.table.find (indexedTalents, talentID)) then local talentID, name, texture, selected, available = GetTalentInfoByID (talentID) if (name) then @@ -6492,9 +6492,9 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions) local playerTalents = DF:GetCharacterTalents() local indexedTalents = {} for _, talentTable in ipairs(playerTalents) do - tinsert (indexedTalents, talentTable.ID) + tinsert(indexedTalents, talentTable.ID) end - for talentID, _ in pairs (f.OptionsTable.talent) do + for talentID, _ in pairs(f.OptionsTable.talent) do if (type(talentID) == "number" and not DF.table.find (indexedTalents, talentID)) then otherTalents:Show() return @@ -6509,7 +6509,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions) if IS_WOW_PROJECT_MAINLINE then local pvpTalentList = {} for _, talentTable in ipairs(DF:GetCharacterPvPTalents()) do - tinsert (pvpTalentList, { + tinsert(pvpTalentList, { name = talentTable.Name, set = f.OnRadioCheckboxClick, param = talentTable.ID, @@ -6520,7 +6520,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions) local pvpTalentGroup = DF:CreateCheckboxGroup (f, pvpTalentList, name, {width = 200, height = 200, title = "Characer PvP Talents"}, {offset_x = 150, amount_per_line = 3}) pvpTalentGroup:SetPoint("topleft", f, "topleft", anchorPositions.pvptalent [1], anchorPositions.pvptalent [2]) pvpTalentGroup.DBKey = "pvptalent" - tinsert (f.AllRadioGroups, pvpTalentGroup) + tinsert(f.AllRadioGroups, pvpTalentGroup) f.PvPTalentGroup = pvpTalentGroup do @@ -6542,14 +6542,14 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions) local playerTalents = DF:GetCharacterPvPTalents() local indexedTalents = {} for _, talentTable in ipairs(playerTalents) do - tinsert (indexedTalents, talentTable.ID) + tinsert(indexedTalents, talentTable.ID) end --talents selected to load GameCooltip2:AddLine ("select a talent to remove it (added from a different spec or character)", "", 1, "orange", "orange", 9) GameCooltip2:AddLine ("$div", nil, nil, -1, -1) - for talentID, _ in pairs (f.OptionsTable.pvptalent) do + for talentID, _ in pairs(f.OptionsTable.pvptalent) do if (type(talentID) == "number" and not DF.table.find (indexedTalents, talentID)) then local _, name, texture = GetPvpTalentInfoByID (talentID) if (name) then @@ -6592,9 +6592,9 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions) local playerTalents = DF:GetCharacterPvPTalents() local indexedTalents = {} for _, talentTable in ipairs(playerTalents) do - tinsert (indexedTalents, talentTable.ID) + tinsert(indexedTalents, talentTable.ID) end - for talentID, _ in pairs (f.OptionsTable.pvptalent) do + for talentID, _ in pairs(f.OptionsTable.pvptalent) do if (type(talentID) == "number" and not DF.table.find (indexedTalents, talentID)) then otherTalents:Show() return @@ -6608,7 +6608,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions) --create radio for group types local groupTypes = {} for _, groupTable in ipairs(DF:GetGroupTypes()) do - tinsert (groupTypes, { + tinsert(groupTypes, { name = groupTable.Name, set = f.OnRadioCheckboxClick, param = groupTable.ID, @@ -6618,12 +6618,12 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions) local groupTypesGroup = DF:CreateCheckboxGroup (f, groupTypes, name, {width = 200, height = 200, title = "Group Types"}) groupTypesGroup:SetPoint("topleft", f, "topleft", anchorPositions.group [1], anchorPositions.group [2]) groupTypesGroup.DBKey = "group" - tinsert (f.AllRadioGroups, groupTypesGroup) + tinsert(f.AllRadioGroups, groupTypesGroup) --create radio for character roles local roleTypes = {} for _, roleTable in ipairs(DF:GetRoleTypes()) do - tinsert (roleTypes, { + tinsert(roleTypes, { name = roleTable.Texture .. " " .. roleTable.Name, set = f.OnRadioCheckboxClick, param = roleTable.ID, @@ -6633,7 +6633,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions) local roleTypesGroup = DF:CreateCheckboxGroup (f, roleTypes, name, {width = 200, height = 200, title = "Role Types"}) roleTypesGroup:SetPoint("topleft", f, "topleft", anchorPositions.role [1], anchorPositions.role [2]) roleTypesGroup.DBKey = "role" - tinsert (f.AllRadioGroups, roleTypesGroup) + tinsert(f.AllRadioGroups, roleTypesGroup) --create radio group for mythic+ affixes if IS_WOW_PROJECT_MAINLINE then @@ -6641,7 +6641,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions) for i = 2, 1000 do local affixName, desc, texture = C_ChallengeMode.GetAffixInfo (i) if (affixName) then - tinsert (affixes, { + tinsert(affixes, { name = affixName, set = f.OnRadioCheckboxClick, param = i, @@ -6653,7 +6653,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions) local affixTypesGroup = DF:CreateCheckboxGroup (f, affixes, name, {width = 200, height = 200, title = "M+ Affixes"}) affixTypesGroup:SetPoint("topleft", f, "topleft", anchorPositions.affix [1], anchorPositions.affix [2]) affixTypesGroup.DBKey = "affix" - tinsert (f.AllRadioGroups, affixTypesGroup) + tinsert(f.AllRadioGroups, affixTypesGroup) end --text entries functions @@ -6676,7 +6676,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions) ID = DF:trim (ID) ID = tonumber (ID) if (ID) then - tinsert (f.OptionsTable [self.DBKey], ID) + tinsert(f.OptionsTable [self.DBKey], ID) f.OptionsTable [self.DBKey].Enabled = true end end @@ -6694,7 +6694,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions) encounterIDEditbox.tooltip = encounterIDEditbox.tooltip .. encounterTable.ID .. " - " .. encounterTable.Name .. "\n" end encounterIDEditbox:SetHook("OnEnterPressed", textEntryOnEnterPressed) - tinsert (f.AllTextEntries, encounterIDEditbox) + tinsert(f.AllTextEntries, encounterIDEditbox) --create the text entry for map ID local mapIDLabel = DF:CreateLabel(f, "Map ID", DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")) @@ -6705,14 +6705,14 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions) mapIDEditbox.Refresh = textEntryRefresh mapIDEditbox.tooltip = "Enter multiple IDs separating with a whitespace\nExample: 35 45 95" mapIDEditbox:SetHook("OnEnterPressed", textEntryOnEnterPressed) - tinsert (f.AllTextEntries, mapIDEditbox) + tinsert(f.AllTextEntries, mapIDEditbox) function f.Refresh (self) if IS_WOW_PROJECT_MAINLINE then --update the talents (might have changed if the player changed its specialization) local talentList = {} for _, talentTable in ipairs(DF:GetCharacterTalents()) do - tinsert (talentList, { + tinsert(talentList, { name = talentTable.Name, set = DetailsFrameworkLoadConditionsPanel.OnRadioCheckboxClick, param = talentTable.ID, @@ -6726,7 +6726,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions) if IS_WOW_PROJECT_MAINLINE then local pvpTalentList = {} for _, talentTable in ipairs(DF:GetCharacterPvPTalents()) do - tinsert (pvpTalentList, { + tinsert(pvpTalentList, { name = talentTable.Name, set = DetailsFrameworkLoadConditionsPanel.OnRadioCheckboxClick, param = talentTable.ID, @@ -6785,7 +6785,7 @@ DF.DataScrollFunctions = { for i = 1, #data do for o = 1, #data[i] do if (data[i][o]:find (filter)) then - tinsert (currentData, data[i]) + tinsert(currentData, data[i]) break end end @@ -6993,7 +6993,7 @@ end function DF:CreateNewsFrame (parent, name, options, newsTable, db) local f = DF:CreateSimplePanel (parent, 400, 700, options and options.title or default_newsframe_options.title, name, {UseScaleBar = db and true}, db) - f:SetFrameStrata ("MEDIUM") + f:SetFrameStrata("MEDIUM") DF:ApplyStandardBackdrop (f) DF:Mixin (f, DF.OptionsFunctions) @@ -7350,11 +7350,11 @@ DF.StatusBarFunctions = { end function UnitFrameStats() - for functionName, functionTable in pairs (debugPerformance.CPUUsageByFunction) do + for functionName, functionTable in pairs(debugPerformance.CPUUsageByFunction) do debugPerformance.CPUUsageByFunction [functionName] = floor (functionTable.usage) end - for functionName, functionTable in pairs (debugPerformance.CPUUsageByFunction) do + for functionName, functionTable in pairs(debugPerformance.CPUUsageByFunction) do debugPerformance.CPUUsageByFunction [functionName] = {usage = 0, last = 0, active = false} end end @@ -9055,7 +9055,7 @@ function DF:CreateBorderFrame (parent, name) local leftBorder = f:CreateTexture(nil, "overlay") leftBorder:SetDrawLayer ("overlay", 7) leftBorder:SetColorTexture (1, 1, 1, 1) - tinsert (f.allTextures, leftBorder) + tinsert(f.allTextures, leftBorder) f.leftBorder = leftBorder PixelUtil.SetPoint (leftBorder, "topright", f, "topleft", 0, 1, 0, 1) PixelUtil.SetPoint (leftBorder, "bottomright", f, "bottomleft", 0, -1, 0, -1) @@ -9065,7 +9065,7 @@ function DF:CreateBorderFrame (parent, name) local rightBorder = f:CreateTexture(nil, "overlay") rightBorder:SetDrawLayer ("overlay", 7) rightBorder:SetColorTexture (1, 1, 1, 1) - tinsert (f.allTextures, rightBorder) + tinsert(f.allTextures, rightBorder) f.rightBorder = rightBorder PixelUtil.SetPoint (rightBorder, "topleft", f, "topright", 0, 1, 0, 1) PixelUtil.SetPoint (rightBorder, "bottomleft", f, "bottomright", 0, -1, 0, -1) @@ -9075,7 +9075,7 @@ function DF:CreateBorderFrame (parent, name) local topBorder = f:CreateTexture(nil, "overlay") topBorder:SetDrawLayer ("overlay", 7) topBorder:SetColorTexture (1, 1, 1, 1) - tinsert (f.allTextures, topBorder) + tinsert(f.allTextures, topBorder) f.topBorder = topBorder PixelUtil.SetPoint (topBorder, "bottomleft", f, "topleft", 0, 0, 0, 0) PixelUtil.SetPoint (topBorder, "bottomright", f, "topright", 0, 0, 0, 0) @@ -9085,7 +9085,7 @@ function DF:CreateBorderFrame (parent, name) local bottomBorder = f:CreateTexture(nil, "overlay") bottomBorder:SetDrawLayer ("overlay", 7) bottomBorder:SetColorTexture (1, 1, 1, 1) - tinsert (f.allTextures, bottomBorder) + tinsert(f.allTextures, bottomBorder) f.bottomBorder = bottomBorder PixelUtil.SetPoint (bottomBorder, "topleft", f, "bottomleft", 0, 0, 0, 0) PixelUtil.SetPoint (bottomBorder, "topright", f, "bottomright", 0, 0, 0, 0) @@ -10289,7 +10289,7 @@ function DF:ShowErrorMessage (errorMessage, titleText) if (not DF.ErrorMessagePanel) then local f = CreateFrame("frame", "DetailsFrameworkErrorMessagePanel", UIParent, "BackdropTemplate") f:SetSize(400, 120) - f:SetFrameStrata ("FULLSCREEN") + f:SetFrameStrata("FULLSCREEN") f:SetPoint("center", UIParent, "center", 0, 100) f:EnableMouse (true) f:SetMovable (true) @@ -10297,7 +10297,7 @@ function DF:ShowErrorMessage (errorMessage, titleText) f:SetScript("OnDragStart", function() f:StartMoving() end) f:SetScript("OnDragStop", function() f:StopMovingOrSizing() end) f:SetScript("OnMouseDown", function(self, button) if (button == "RightButton") then f:Hide() end end) - tinsert (UISpecialFrames, "DetailsFrameworkErrorMessagePanel") + tinsert(UISpecialFrames, "DetailsFrameworkErrorMessagePanel") DF.ErrorMessagePanel = f DF:CreateTitleBar (f, "Details! Framework Error!") @@ -10316,7 +10316,7 @@ function DF:ShowErrorMessage (errorMessage, titleText) closeButton:SetPoint("bottom", f, "bottom", 0, 5) f.closeButton = closeButton - closeButton:SetClickFunction (function() + closeButton:SetClickFunction(function() f:Hide() end) diff --git a/Libs/DF/pictureedit.lua b/Libs/DF/pictureedit.lua index 3c0ce753a..474e50393 100644 --- a/Libs/DF/pictureedit.lua +++ b/Libs/DF/pictureedit.lua @@ -13,7 +13,7 @@ local CreateImageEditorFrame = function() editorWindow:SetResizable(true) editorWindow:SetMovable (true) editorWindow:SetClampedToScreen (true) - tinsert (UISpecialFrames, "DetailsFrameworkImageEdit") + tinsert(UISpecialFrames, "DetailsFrameworkImageEdit") editorWindow:SetFrameStrata("TOOLTIP") if (not DetailsFramework.IsDragonflight()) then @@ -196,7 +196,7 @@ local CreateImageEditorFrame = function() buttonsBackground:SetPoint("topright", background_frame, "topright", -8, -10) buttonsBackground:Hide() --buttonsBackground:SetMovable (true) - tinsert (UISpecialFrames, "DetailsFrameworkImageEditButtonsBg") + tinsert(UISpecialFrames, "DetailsFrameworkImageEditButtonsBg") buttonsBackground:SetFrameStrata("TOOLTIP") local alphaFrameShown = false @@ -367,7 +367,7 @@ local CreateImageEditorFrame = function() resizer:SetFrameLevel (editorWindow.widget:GetFrameLevel() + 2) resizer:SetScript("OnMouseDown", function(self, button) - editorWindow.widget:StartSizing ("BOTTOMRIGHT") + editorWindow.widget:StartSizing("BOTTOMRIGHT") end) resizer:SetScript("OnMouseUp", function(self, button) diff --git a/Libs/DF/slider.lua b/Libs/DF/slider.lua index f600eae65..160931446 100644 --- a/Libs/DF/slider.lua +++ b/Libs/DF/slider.lua @@ -318,7 +318,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin) return end - DetailsFrameworkSliderButtons1:ShowMe (slider) + DetailsFrameworkSliderButtons1:ShowMe(slider) local capsule = slider.MyObject local kill = capsule:RunHooksForWidget ("OnEnter", slider, capsule) @@ -335,12 +335,12 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin) if (slider.MyObject.have_tooltip and slider.MyObject.have_tooltip ~= "Right Click to Type the Value") then GameCooltip2:Preset (2) GameCooltip2:AddLine (slider.MyObject.have_tooltip) - GameCooltip2:ShowCooltip (slider, "tooltip") + GameCooltip2:ShowCooltip(slider, "tooltip") else GameCooltip2:Preset (2) GameCooltip2:AddLine ("Right Click to Type the Value", "", 1, "", "", 10) GameCooltip2:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 16, 16, 0.015625, 0.15671875, 0.640625, 0.798828125) - GameCooltip2:ShowCooltip (slider, "tooltip") + GameCooltip2:ShowCooltip(slider, "tooltip") end end @@ -364,7 +364,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin) slider:SetBackdropBorderColor(unpack (slider.MyObject.onleave_backdrop_border_color)) end - GameCooltip2:ShowMe (false) + GameCooltip2:ShowMe(false) end @@ -390,7 +390,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin) f:SetPoint("bottomleft", host, "topleft", -5, -5) f:SetPoint("bottomright", host, "topright", 5, -5) - f:SetFrameStrata ("FULLSCREEN") + f:SetFrameStrata("FULLSCREEN") f:SetFrameLevel (host:GetFrameLevel() + 1000) f:Show() if (f.isGoingToHide) then @@ -409,8 +409,8 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin) local buttonPlus = CreateFrame("button", "DetailsFrameworkSliderButtonsPlusButton", f, "BackdropTemplate") local buttonMinor = CreateFrame("button", "DetailsFrameworkSliderButtonsMinorButton", f, "BackdropTemplate") - buttonPlus:SetFrameStrata (f:GetFrameStrata()) - buttonMinor:SetFrameStrata (f:GetFrameStrata()) + buttonPlus:SetFrameStrata(f:GetFrameStrata()) + buttonMinor:SetFrameStrata(f:GetFrameStrata()) buttonPlus:SetScript("OnEnter", function(self) if (f.isGoingToHide) then @@ -470,13 +470,13 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin) if (f.host.fine_tuning) then f.host:SetValue(current + f.host.fine_tuning) if (editbox and DFSliderMetaFunctions.editbox_typevalue:IsShown()) then - DFSliderMetaFunctions.editbox_typevalue:SetText(tostring (string.format ("%.2f", current + f.host.fine_tuning))) + DFSliderMetaFunctions.editbox_typevalue:SetText(tostring (string.format("%.2f", current + f.host.fine_tuning))) end else if (f.host.useDecimals) then f.host:SetValue(current + 0.1) if (editbox and DFSliderMetaFunctions.editbox_typevalue:IsShown()) then - DFSliderMetaFunctions.editbox_typevalue:SetText(string.format ("%.2f", current + 0.1)) + DFSliderMetaFunctions.editbox_typevalue:SetText(string.format("%.2f", current + 0.1)) end else f.host:SetValue(current + 1) @@ -522,13 +522,13 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin) if (f.host.fine_tuning) then f.host:SetValue(current - f.host.fine_tuning) if (editbox and DFSliderMetaFunctions.editbox_typevalue:IsShown()) then - DFSliderMetaFunctions.editbox_typevalue:SetText(tostring (string.format ("%.2f", current - f.host.fine_tuning))) + DFSliderMetaFunctions.editbox_typevalue:SetText(tostring (string.format("%.2f", current - f.host.fine_tuning))) end else if (f.host.useDecimals) then f.host:SetValue(current - 0.1) if (editbox and DFSliderMetaFunctions.editbox_typevalue:IsShown()) then - DFSliderMetaFunctions.editbox_typevalue:SetText(string.format ("%.2f", current - 0.1)) + DFSliderMetaFunctions.editbox_typevalue:SetText(string.format("%.2f", current - 0.1)) end else f.host:SetValue(current - 1) @@ -634,7 +634,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin) DFSliderMetaFunctions.editbox_typevalue:SetFrameLevel (self.widget:GetFrameLevel()+1) if (self.useDecimals) then - DFSliderMetaFunctions.editbox_typevalue:SetText(tostring (string.format ("%.1f", self.value))) + DFSliderMetaFunctions.editbox_typevalue:SetText(tostring (string.format("%.1f", self.value))) else DFSliderMetaFunctions.editbox_typevalue:SetText(tostring (math.floor (self.value))) end @@ -732,7 +732,7 @@ DF:Mixin(DFSliderMetaFunctions, DF.FrameMixin) end if (slider.MyObject.useDecimals) then - slider.amt:SetText(string.format ("%.2f", amt)) + slider.amt:SetText(string.format("%.2f", amt)) else slider.amt:SetText(math.floor (amt)) end @@ -931,7 +931,7 @@ function DF:NewSwitch (parent, container, name, member, w, h, ltext, rtext, defa w = w or 60 h = h or 20 - local slider = DF:NewButton (parent, container, name, member, w, h) + local slider = DF:NewButton(parent, container, name, member, w, h) slider.HookList.OnSwitch = {} slider.switch_func = switch_func @@ -1124,7 +1124,7 @@ function DF:NewSlider (parent, container, name, member, w, h, min, max, step, de if (not APISliderFunctions) then APISliderFunctions = true local idx = getmetatable (SliderObject.slider).__index - for funcName, funcAddress in pairs (idx) do + for funcName, funcAddress in pairs(idx) do if (not DFSliderMetaFunctions [funcName]) then DFSliderMetaFunctions [funcName] = function(object, ...) local x = loadstring ( "return _G['"..object.slider:GetName().."']:"..funcName.."(...)") @@ -1166,7 +1166,7 @@ function DF:NewSlider (parent, container, name, member, w, h, min, max, step, de end if (SliderObject.useDecimals) then - SliderObject.amt:SetText(string.format ("%.2f", amt)) + SliderObject.amt:SetText(string.format("%.2f", amt)) else SliderObject.amt:SetText(math.floor (amt)) end diff --git a/Libs/DF/spells.lua b/Libs/DF/spells.lua index b1f07a6f1..2167a89c5 100644 --- a/Libs/DF/spells.lua +++ b/Libs/DF/spells.lua @@ -1231,9 +1231,9 @@ DF.CooldownsRaid = {} DF.CooldownsAllDeffensive = {} -for specId, cooldownTable in pairs (DF.CooldownsBySpec) do +for specId, cooldownTable in pairs(DF.CooldownsBySpec) do - for spellId, cooldownType in pairs (cooldownTable) do + for spellId, cooldownType in pairs(cooldownTable) do if (cooldownType == 1) then DF.CooldownsAttack [spellId] = true @@ -1260,7 +1260,7 @@ for specId, cooldownTable in pairs (DF.CooldownsBySpec) do end function DF:FindClassForCooldown (spellId) - for specId, cooldownTable in pairs (DF.CooldownsBySpec) do + for specId, cooldownTable in pairs(DF.CooldownsBySpec) do local hasCooldown = cooldownTable [spellId] if (hasCooldown) then return DF.SpecIds [specId] @@ -1441,15 +1441,15 @@ function DF:GetSpellsForEncounterFromJournal (instanceEJID, encounterEJID) if (sectionInfo) then if (sectionInfo.spellID and type (sectionInfo.spellID) == "number" and sectionInfo.spellID ~= 0) then - tinsert (spellIDs, sectionInfo.spellID) + tinsert(spellIDs, sectionInfo.spellID) end local nextChild, nextSibling = sectionInfo.firstChildSectionID, sectionInfo.siblingSectionID if (nextSibling) then - tinsert (nextID, nextSibling) + tinsert(nextID, nextSibling) end if (nextChild) then - tinsert (nextID, nextChild) + tinsert(nextID, nextChild) end else break diff --git a/Libs/DF/split_bar.lua b/Libs/DF/split_bar.lua index 8df1b4d87..f0773977d 100644 --- a/Libs/DF/split_bar.lua +++ b/Libs/DF/split_bar.lua @@ -458,11 +458,11 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]] end -- frame stratas - function SplitBarMetaFunctions:SetFrameStrata (strata) + function SplitBarMetaFunctions:SetFrameStrata(strata) if (_type(strata) == "table") then - self.statusbar:SetFrameStrata (strata:GetFrameStrata()) + self.statusbar:SetFrameStrata(strata:GetFrameStrata()) else - self.statusbar:SetFrameStrata (strata) + self.statusbar:SetFrameStrata(strata) end end @@ -572,7 +572,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]] if (frame.MyObject.have_tooltip) then GameCooltip2:Reset() GameCooltip2:AddLine (frame.MyObject.have_tooltip) - GameCooltip2:ShowCooltip (frame, "tooltip") + GameCooltip2:ShowCooltip(frame, "tooltip") end end @@ -584,7 +584,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]] end if (frame.MyObject.have_tooltip) then - DF.popup:ShowMe (false) + DF.popup:ShowMe(false) end end @@ -755,7 +755,7 @@ function DF:NewSplitBar (parent, container, name, member, w, h) if (not APISplitBarFunctions) then APISplitBarFunctions = true local idx = getmetatable (SplitBarObject.statusbar).__index - for funcName, funcAddress in pairs (idx) do + for funcName, funcAddress in pairs(idx) do if (not SplitBarMetaFunctions [funcName]) then SplitBarMetaFunctions [funcName] = function(object, ...) local x = loadstring ( "return _G['"..object.statusbar:GetName().."']:"..funcName.."(...)") diff --git a/Libs/DF/textentry.lua b/Libs/DF/textentry.lua index 8fe520164..77b9f0d47 100644 --- a/Libs/DF/textentry.lua +++ b/Libs/DF/textentry.lua @@ -296,7 +296,7 @@ DF.TextEntryCounter = DF.TextEntryCounter or 1 if (capsule.have_tooltip) then GameCooltip2:Preset (2) GameCooltip2:AddLine (capsule.have_tooltip) - GameCooltip2:ShowCooltip (textentry, "tooltip") + GameCooltip2:ShowCooltip(textentry, "tooltip") end textentry.mouse_over = true @@ -316,7 +316,7 @@ DF.TextEntryCounter = DF.TextEntryCounter or 1 end if (textentry.MyObject.have_tooltip) then - GameCooltip2:ShowMe (false) + GameCooltip2:ShowMe(false) end textentry.mouse_over = false @@ -580,7 +580,7 @@ function DF:NewTextEntry (parent, container, name, member, w, h, func, param1, p if (not APITextEntryFunctions) then APITextEntryFunctions = true local idx = getmetatable (TextEntryObject.editbox).__index - for funcName, funcAddress in pairs (idx) do + for funcName, funcAddress in pairs(idx) do if (not TextEntryMetaFunctions [funcName]) then TextEntryMetaFunctions [funcName] = function(object, ...) local x = loadstring ( "return _G['"..object.editbox:GetName().."']:"..funcName.."(...)") @@ -1099,7 +1099,7 @@ function DF:NewSpecialLuaEditorEntry (parent, w, h, member, name, nointent, show scrollframeNumberLines.editbox:SetPoint("bottomright", borderframe, "bottomright", -30, 10) scrollframeNumberLines:SetScrollChild (scrollframeNumberLines.editbox) - scrollframeNumberLines:EnableMouseWheel (false) + scrollframeNumberLines:EnableMouseWheel(false) for i = 1, 1000 do scrollframeNumberLines.editbox:Insert (i .. "\n") diff --git a/Libs/LibOpenRaid/LibOpenRaid.lua b/Libs/LibOpenRaid/LibOpenRaid.lua index f5466a0b5..49ec45964 100644 --- a/Libs/LibOpenRaid/LibOpenRaid.lua +++ b/Libs/LibOpenRaid/LibOpenRaid.lua @@ -385,7 +385,7 @@ LIB_OPEN_RAID_CAN_LOAD = false function openRaidLib.Schedules.CancelAllUniqueTimers() local registeredUniqueTimers = openRaidLib.Schedules.registeredUniqueTimers for namespace, schedulesTable in pairs(registeredUniqueTimers) do - for scheduleName, timerObject in pairs (schedulesTable) do + for scheduleName, timerObject in pairs(schedulesTable) do if (timerObject and not timerObject:IsCancelled()) then timerObject:Cancel() end diff --git a/Libs/NickTag-1.0/NickTag-1.0.lua b/Libs/NickTag-1.0/NickTag-1.0.lua index e14d4c3b9..618ee94b4 100644 --- a/Libs/NickTag-1.0/NickTag-1.0.lua +++ b/Libs/NickTag-1.0/NickTag-1.0.lua @@ -69,7 +69,7 @@ end "ResetPlayerPersona" } function NickTag:Embed (target) - for k, v in pairs (embed_functions) do + for k, v in pairs(embed_functions) do target[v] = self[v] end self.embeds [target] = true @@ -391,7 +391,7 @@ end if (playerName) then local player = NickTag:GetNicknameTable (playerName) if (player and pool.last_version == minor) then - for thisPlayerName, _ in pairs (pool) do + for thisPlayerName, _ in pairs(pool) do if (thisPlayerName ~= playerName) then pool [thisPlayerName] = nil end @@ -418,7 +418,7 @@ end siblingsPools [#siblingsPools + 1] = _table --copy all players into the sibling table - for key, value in pairs (pool) do + for key, value in pairs(pool) do _table [key] = value end @@ -445,7 +445,7 @@ end function NickTag:SyncSiblings() --copy all data into siblings table for _, syblingTable in ipairs(siblingsPools) do - for key, value in pairs (pool) do + for key, value in pairs(pool) do syblingTable [key] = value end end @@ -829,7 +829,7 @@ end --choose avatar window do local avatar_pick_frame = CreateFrame("frame", "AvatarPickFrame", UIParent,"BackdropTemplate") - avatar_pick_frame:SetFrameStrata ("DIALOG") + avatar_pick_frame:SetFrameStrata("DIALOG") avatar_pick_frame:SetBackdrop({bgFile = [[Interface\FrameGeneral\UI-Background-Marble]], edgeFile = [[Interface\DialogFrame\UI-DialogBox-Border]], tile = true, tileSize = 256, edgeSize = 32, insets = {left = 11, right = 12, top = 12, bottom = 11}}) avatar_pick_frame:SetBackdropColor(.3, .3, .3, .9) avatar_pick_frame:SetWidth(460) diff --git a/boot.lua b/boot.lua index db5eb2095..ac012815a 100644 --- a/boot.lua +++ b/boot.lua @@ -6,8 +6,8 @@ local version, build, date, tocversion = GetBuildInfo() - _detalhes.build_counter = 10135 - _detalhes.alpha_build_counter = 10135 --if this is higher than the regular counter, use it instead + _detalhes.build_counter = 10136 + _detalhes.alpha_build_counter = 10136 --if this is higher than the regular counter, use it instead _detalhes.dont_open_news = true _detalhes.game_version = version _detalhes.userversion = version .. " " .. _detalhes.build_counter @@ -868,12 +868,12 @@ do --Event Frame _detalhes.listener = _CreateFrame ("Frame", nil, _UIParent) _detalhes.listener:RegisterEvent ("ADDON_LOADED") - _detalhes.listener:SetFrameStrata ("LOW") + _detalhes.listener:SetFrameStrata("LOW") _detalhes.listener:SetFrameLevel (9) _detalhes.listener.FrameTime = 0 _detalhes.overlay_frame = _CreateFrame ("Frame", nil, _UIParent) - _detalhes.overlay_frame:SetFrameStrata ("TOOLTIP") + _detalhes.overlay_frame:SetFrameStrata("TOOLTIP") --Pet Owner Finder _CreateFrame ("GameTooltip", "DetailsPetOwnerFinder", nil, "GameTooltipTemplate") @@ -989,7 +989,7 @@ do if (type(t) ~= "table") then return end - for a,b in pairs (t) do + for a,b in pairs(t) do print (a,b) end end diff --git a/classes/class_combat.lua b/classes/class_combat.lua index 85fc4b3fe..d9da206bb 100644 --- a/classes/class_combat.lua +++ b/classes/class_combat.lua @@ -714,7 +714,7 @@ end --frags - for fragName, fragAmount in pairs (combate2.frags) do + for fragName, fragAmount in pairs(combate2.frags) do if (fragAmount) then if (combate1.frags [fragName]) then combate1.frags [fragName] = combate1.frags [fragName] - fragAmount @@ -727,7 +727,7 @@ --alternate power local overallPowerTable = combate1.alternate_power - for actorName, powerTable in pairs (combate2.alternate_power) do + for actorName, powerTable in pairs(combate2.alternate_power) do local power = overallPowerTable [actorName] if (power) then power.total = power.total - powerTable.total @@ -769,7 +769,7 @@ --alternate power local overallPowerTable = combate1.alternate_power - for actorName, powerTable in pairs (combate2.alternate_power) do + for actorName, powerTable in pairs(combate2.alternate_power) do local power = overallPowerTable [actorName] if (not power) then power = combate1:CreateAlternatePowerTable (actorName) diff --git a/classes/class_custom.lua b/classes/class_custom.lua index 4e6fa2dbf..bd04a44ac 100644 --- a/classes/class_custom.lua +++ b/classes/class_custom.lua @@ -1234,7 +1234,7 @@ --get the spell buff uptime container local buff_uptime_container = player.buff_uptime and player.buff_uptime_spells and player.buff_uptime_spells._ActorTable if (buff_uptime_container) then - for spellId, _ in pairs (DetailsFramework.PotionIDs) do + for spellId, _ in pairs(DetailsFramework.PotionIDs) do local potionUsed = buff_uptime_container [spellId] if (potionUsed) then @@ -1282,7 +1282,7 @@ --get the misc actor container local buff_uptime_container = player.buff_uptime and player.buff_uptime_spells and player.buff_uptime_spells._ActorTable if (buff_uptime_container) then - for spellId, _ in pairs (DetailsFramework.PotionIDs) do + for spellId, _ in pairs(DetailsFramework.PotionIDs) do local potionUsed = buff_uptime_container [spellId] if (potionUsed) then @@ -1337,7 +1337,7 @@ for index, character in ipairs(AllHealCharacters) do local AllSpells = character:GetSpellList() local found = false - for spellid, spell in pairs (AllSpells) do + for spellid, spell in pairs(AllSpells) do if (DETAILS_HEALTH_POTION_LIST [spellid]) then instance_container:AddValue (character, spell.total) total = total + spell.total @@ -1436,7 +1436,7 @@ ]], percent_script = [[ local value, top, total, combat, instance = ... - return string.format ("%.1f", value/top*100) + return string.format("%.1f", value/top*100) ]], script = [[ --init: @@ -1500,7 +1500,7 @@ ]], percent_script = [[ local value, top, total, combat, instance = ... - return string.format ("%.1f", value/top*100) + return string.format("%.1f", value/top*100) ]], script = [[ --init: @@ -1584,8 +1584,8 @@ tooltip = [[ local actor, combat, instance = ... local spells = {} - for spellid, spell in pairs (actor.cc_done_spells._ActorTable) do - tinsert (spells, {spellid, spell.counter}) + for spellid, spell in pairs(actor.cc_done_spells._ActorTable) do + tinsert(spells, {spellid, spell.counter}) end table.sort (spells, _detalhes.Sort2) @@ -1598,8 +1598,8 @@ end local targets = {} - for playername, amount in pairs (actor.cc_done_targets) do - tinsert (targets, {playername, amount}) + for playername, amount in pairs(actor.cc_done_targets) do + tinsert(targets, {playername, amount}) end table.sort (targets, _detalhes.Sort2) @@ -1644,7 +1644,7 @@ for i, custom in ipairs(self.custom) do if (custom.name == Loc ["STRING_CUSTOM_CC_DONE"]) then table.remove (self.custom, i) - tinsert (self.custom, i, CC_Done) + tinsert(self.custom, i, CC_Done) have = true end end @@ -1676,7 +1676,7 @@ for index, character in ipairs(misc_actors) do if (character.cc_done and character:IsPlayer()) then - for player_name, amount in pairs (character.cc_done_targets) do + for player_name, amount in pairs(character.cc_done_targets) do local target = combat (1, player_name) or combat (2, player_name) if (target and target:IsPlayer()) then instance_container:AddValue (target, amount) @@ -1706,9 +1706,9 @@ if (character.cc_done and character:IsPlayer()) then local on_actor = character.cc_done_targets [name] if (on_actor) then - tinsert (from, {character:name(), on_actor}) + tinsert(from, {character:name(), on_actor}) - for spellid, spell in pairs (character.cc_done_spells._ActorTable) do + for spellid, spell in pairs(character.cc_done_spells._ActorTable) do local spell_on_actor = spell.targets [name] if (spell_on_actor) then @@ -1720,7 +1720,7 @@ end end if (not has_spell) then - tinsert (spells, {spellid, spell_on_actor}) + tinsert(spells, {spellid, spell_on_actor}) end end @@ -1778,7 +1778,7 @@ for i, custom in ipairs(self.custom) do if (custom.name == Loc ["STRING_CUSTOM_CC_RECEIVED"]) then table.remove (self.custom, i) - tinsert (self.custom, i, CC_Received) + tinsert(self.custom, i, CC_Received) have = true end end @@ -1827,7 +1827,7 @@ if (player) then local spells = player:GetSpellList() - for spellid, spell in pairs (spells) do + for spellid, spell in pairs(spells) do instance_container:AddValue (spell, spell.total) total = total + spell.total if (top < spell.total) then @@ -1839,7 +1839,7 @@ for _, PetName in ipairs(player.pets) do local pet = combat (pet_attribute, PetName) if (pet) then - for spellid, spell in pairs (pet:GetSpellList()) do + for spellid, spell in pairs(pet:GetSpellList()) do instance_container:AddValue (spell, spell.total, nil, " (" .. PetName:gsub ((" <.*"), "") .. ")") total = total + spell.total if (top < spell.total) then @@ -1895,7 +1895,7 @@ if (not spell_cast and misc_actor.spell_cast) then local spellname = GetSpellInfo(spell.id) - for casted_spellid, amount in pairs (misc_actor.spell_cast) do + for casted_spellid, amount in pairs(misc_actor.spell_cast) do local casted_spellname = GetSpellInfo(casted_spellid) if (casted_spellname == spellname) then spell_cast = amount .. " (|cFFFFFF00?|r)" @@ -2027,7 +2027,7 @@ percent_script = [[ local value, top, total, combat, instance = ... local dps = _detalhes:ToK (floor (value) / combat:GetCombatTime()) - local percent = string.format ("%.1f", value/total*100) + local percent = string.format("%.1f", value/total*100) return dps .. ", " .. percent ]], } @@ -2046,7 +2046,7 @@ for i, custom in ipairs(self.custom) do if (custom.name == Loc ["STRING_CUSTOM_MYSPELLS"]) then table.remove (self.custom, i) - tinsert (self.custom, i, MySpells) + tinsert(self.custom, i, MySpells) have = true end end @@ -2138,7 +2138,7 @@ for i, custom in ipairs(self.custom) do if (custom.name == Loc ["STRING_CUSTOM_DAMAGEONSKULL"]) then table.remove (self.custom, i) - tinsert (self.custom, i, DamageOnSkullTarget) + tinsert(self.custom, i, DamageOnSkullTarget) have = true end end @@ -2268,7 +2268,7 @@ for i, custom in ipairs(self.custom) do if (custom.name == Loc ["STRING_CUSTOM_DAMAGEONANYMARKEDTARGET"]) then table.remove (self.custom, i) - tinsert (self.custom, i, DamageOnAnyTarget) + tinsert(self.custom, i, DamageOnAnyTarget) have = true end end @@ -2357,7 +2357,7 @@ if (player) then playerTotal = playerTotal + player.total local playerSpells = player:GetSpellList() - for spellID, spellTable in pairs (playerSpells) do + for spellID, spellTable in pairs(playerSpells) do AllSpells [spellID] = spellTable.total end end @@ -2367,15 +2367,15 @@ if (player) then playerTotal = playerTotal + player.total local playerSpells = player:GetSpellList() - for spellID, spellTable in pairs (playerSpells) do + for spellID, spellTable in pairs(playerSpells) do AllSpells [spellID] = (AllSpells [spellID] or 0) + (spellTable.total or 0) end end end local sortedList = {} - for spellID, total in pairs (AllSpells) do - tinsert (sortedList, {spellID, total}) + for spellID, total in pairs(AllSpells) do + tinsert(sortedList, {spellID, total}) end table.sort (sortedList, Details.Sort2) diff --git a/classes/class_damage.lua b/classes/class_damage.lua index fbd3f9878..1fb5f3332 100644 --- a/classes/class_damage.lua +++ b/classes/class_damage.lua @@ -685,7 +685,7 @@ end Details:AddTooltipReportLineText() GameCooltip:SetOption("YSpacingMod", 0) - GameCooltip:SetOwner (thisLine) + GameCooltip:SetOwner(thisLine) GameCooltip:Show() end @@ -695,7 +695,7 @@ end end local on_switch_DTBS_show = function(instance) - instance:TrocaTabela (instance, true, 1, 8) + instance:TrocaTabela(instance, true, 1, 8) return true end @@ -882,7 +882,7 @@ end if (not CustomObject.OnSwitchShow) then CustomObject.OnSwitchShow = on_switch_DTBS_show end - return instance:TrocaTabela (instance.segmento, 5, index) + return instance:TrocaTabela(instance.segmento, 5, index) end end @@ -906,11 +906,11 @@ end new_code = new_code:gsub ("@SPELLID@", spell [1]) new_custom_object.script = new_code - tinsert (Details.custom, new_custom_object) + tinsert(Details.custom, new_custom_object) setmetatable (new_custom_object, Details.atributo_custom) new_custom_object.__index = Details.atributo_custom - return instance:TrocaTabela (instance.segmento, 5, #Details.custom) + return instance:TrocaTabela(instance.segmento, 5, #Details.custom) end local DTBS_format_name = function(player_name) return Details:GetOnlyName (player_name) end @@ -1210,7 +1210,7 @@ end ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --void zones local on_switch_AVZ_show = function(instance) - instance:TrocaTabela (instance, true, 1, 7) + instance:TrocaTabela(instance, true, 1, 7) return true end @@ -1260,7 +1260,7 @@ end local t = tooltip_void_zone_temp [i] if (not t) then t = {} - tinsert (tooltip_void_zone_temp, t) + tinsert(tooltip_void_zone_temp, t) end local target_actor = combat (1, target_name) or combat (2, target_name) or combat (4, target_name) @@ -1319,7 +1319,7 @@ end if (not CustomObject.OnSwitchShow) then CustomObject.OnSwitchShow = on_switch_AVZ_show end - return instance:TrocaTabela (instance.segmento, 5, index) + return instance:TrocaTabela(instance.segmento, 5, index) end end @@ -1348,11 +1348,11 @@ end new_total_code = new_total_code:gsub ("@SPELLID@", spellid) new_custom_object.total_script = new_total_code - tinsert (Details.custom, new_custom_object) + tinsert(Details.custom, new_custom_object) setmetatable (new_custom_object, Details.atributo_custom) new_custom_object.__index = Details.atributo_custom - return instance:TrocaTabela (instance.segmento, 5, #Details.custom) + return instance:TrocaTabela(instance.segmento, 5, #Details.custom) end function atributo_damage:ReportSingleVoidZoneLine (actor, instance, ShiftKeyDown, ControlKeyDown) @@ -1448,7 +1448,7 @@ end local t = tooltip_void_zone_temp [i] if (not t) then t = {} - tinsert (tooltip_void_zone_temp, t) + tinsert(tooltip_void_zone_temp, t) end t[1] = target_name @@ -2279,16 +2279,16 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then for i = instancia.barraS[1], iterLast-1, 1 do if (actorTableContent[i]) then - actorTableContent[i]:RefreshLine (instancia, lineContainer, whichRowLine, i, total, subAttribute, forcar, keyName, combatTime, percentageType, useAnimations, barsShowData, barsBrackets, barsSeparator) + actorTableContent[i]:RefreshLine(instancia, lineContainer, whichRowLine, i, total, subAttribute, forcar, keyName, combatTime, percentageType, useAnimations, barsShowData, barsBrackets, barsSeparator) whichRowLine = whichRowLine+1 end end - actorTableContent[myPos]:RefreshLine (instancia, lineContainer, whichRowLine, myPos, total, subAttribute, forcar, keyName, combatTime, percentageType, useAnimations, barsShowData, barsBrackets, barsSeparator) + actorTableContent[myPos]:RefreshLine(instancia, lineContainer, whichRowLine, myPos, total, subAttribute, forcar, keyName, combatTime, percentageType, useAnimations, barsShowData, barsBrackets, barsSeparator) whichRowLine = whichRowLine+1 else for i = instancia.barraS[1], iterLast, 1 do if (actorTableContent[i]) then - actorTableContent[i]:RefreshLine (instancia, lineContainer, whichRowLine, i, total, subAttribute, forcar, keyName, combatTime, percentageType, useAnimations, barsShowData, barsBrackets, barsSeparator) + actorTableContent[i]:RefreshLine(instancia, lineContainer, whichRowLine, i, total, subAttribute, forcar, keyName, combatTime, percentageType, useAnimations, barsShowData, barsBrackets, barsSeparator) whichRowLine = whichRowLine+1 end end @@ -2298,18 +2298,18 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then for i = instancia.barraS[1], instancia.barraS[2]-1, 1 do if (actorTableContent[i]) then - actorTableContent[i]:RefreshLine (instancia, lineContainer, whichRowLine, i, total, subAttribute, forcar, keyName, combatTime, percentageType, useAnimations, barsShowData, barsBrackets, barsSeparator) + actorTableContent[i]:RefreshLine(instancia, lineContainer, whichRowLine, i, total, subAttribute, forcar, keyName, combatTime, percentageType, useAnimations, barsShowData, barsBrackets, barsSeparator) whichRowLine = whichRowLine+1 end end - actorTableContent[myPos]:RefreshLine (instancia, lineContainer, whichRowLine, myPos, total, subAttribute, forcar, keyName, combatTime, percentageType, useAnimations, barsShowData, barsBrackets, barsSeparator) + actorTableContent[myPos]:RefreshLine(instancia, lineContainer, whichRowLine, myPos, total, subAttribute, forcar, keyName, combatTime, percentageType, useAnimations, barsShowData, barsBrackets, barsSeparator) whichRowLine = whichRowLine+1 else for i = instancia.barraS[1], instancia.barraS[2], 1 do if (actorTableContent[i]) then - actorTableContent[i]:RefreshLine (instancia, lineContainer, whichRowLine, i, total, subAttribute, forcar, keyName, combatTime, percentageType, useAnimations, barsShowData, barsBrackets, barsSeparator) + actorTableContent[i]:RefreshLine(instancia, lineContainer, whichRowLine, i, total, subAttribute, forcar, keyName, combatTime, percentageType, useAnimations, barsShowData, barsBrackets, barsSeparator) whichRowLine = whichRowLine+1 end end @@ -2349,29 +2349,29 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta totalBarIsShown = true if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then - actorTableContent[myPos]:RefreshLine (instancia, lineContainer, whichRowLine, myPos, total, subAttribute, forcar, keyName, combatTime, percentageType, useAnimations, barsShowData, barsBrackets, barsSeparator) + actorTableContent[myPos]:RefreshLine(instancia, lineContainer, whichRowLine, myPos, total, subAttribute, forcar, keyName, combatTime, percentageType, useAnimations, barsShowData, barsBrackets, barsSeparator) whichRowLine = whichRowLine+1 for i = iter_last-1, instancia.barraS[1], -1 do if (actorTableContent[i]) then - actorTableContent[i]:RefreshLine (instancia, lineContainer, whichRowLine, i, total, subAttribute, forcar, keyName, combatTime, percentageType, useAnimations, barsShowData, barsBrackets, barsSeparator) + actorTableContent[i]:RefreshLine(instancia, lineContainer, whichRowLine, i, total, subAttribute, forcar, keyName, combatTime, percentageType, useAnimations, barsShowData, barsBrackets, barsSeparator) whichRowLine = whichRowLine+1 end end else for i = iter_last, instancia.barraS[1], -1 do if (actorTableContent[i]) then - actorTableContent[i]:RefreshLine (instancia, lineContainer, whichRowLine, i, total, subAttribute, forcar, keyName, combatTime, percentageType, useAnimations, barsShowData, barsBrackets, barsSeparator) + actorTableContent[i]:RefreshLine(instancia, lineContainer, whichRowLine, i, total, subAttribute, forcar, keyName, combatTime, percentageType, useAnimations, barsShowData, barsBrackets, barsSeparator) whichRowLine = whichRowLine+1 end end end else if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then - actorTableContent[myPos]:RefreshLine (instancia, lineContainer, whichRowLine, myPos, total, subAttribute, forcar, keyName, combatTime, percentageType, useAnimations, barsShowData, barsBrackets, barsSeparator) + actorTableContent[myPos]:RefreshLine(instancia, lineContainer, whichRowLine, myPos, total, subAttribute, forcar, keyName, combatTime, percentageType, useAnimations, barsShowData, barsBrackets, barsSeparator) whichRowLine = whichRowLine+1 for i = instancia.barraS[2]-1, instancia.barraS[1], -1 do if (actorTableContent[i]) then - actorTableContent[i]:RefreshLine (instancia, lineContainer, whichRowLine, i, total, subAttribute, forcar, keyName, combatTime, percentageType, useAnimations, barsShowData, barsBrackets, barsSeparator) + actorTableContent[i]:RefreshLine(instancia, lineContainer, whichRowLine, i, total, subAttribute, forcar, keyName, combatTime, percentageType, useAnimations, barsShowData, barsBrackets, barsSeparator) whichRowLine = whichRowLine+1 end end @@ -2379,7 +2379,7 @@ function atributo_damage:RefreshWindow (instancia, combatObject, forcar, exporta -- /run print (Details:GetInstance(1).barraS[2]) -- vai do 5 ao 1 -- qual barra come�a no 1 -- i = 5 at� 1 -- player 5 atualiza na barra 1 / player 1 atualiza na barra 5 for i = instancia.barraS[2], instancia.barraS[1], -1 do if (actorTableContent[i]) then - actorTableContent[i]:RefreshLine (instancia, lineContainer, whichRowLine, i, total, subAttribute, forcar, keyName, combatTime, percentageType, useAnimations, barsShowData, barsBrackets, barsSeparator) + actorTableContent[i]:RefreshLine(instancia, lineContainer, whichRowLine, i, total, subAttribute, forcar, keyName, combatTime, percentageType, useAnimations, barsShowData, barsBrackets, barsSeparator) whichRowLine = whichRowLine+1 end end @@ -2578,7 +2578,7 @@ local actor_class_color_r, actor_class_color_g, actor_class_color_b end -- ~atualizar ~barra ~update -function atributo_damage:RefreshLine (instance, lineContainer, whichRowLine, rank, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) +function atributo_damage:RefreshLine(instance, lineContainer, whichRowLine, rank, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) local thisLine = lineContainer[whichRowLine] if (not thisLine) then @@ -3454,7 +3454,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown) local allPlayers = {} --all players for this phase for playerName, amount in pairs(playersTable) do - tinsert (allPlayers, {playerName, amount}) + tinsert(allPlayers, {playerName, amount}) totalDamage = totalDamage + amount end table.sort (allPlayers, function(a, b) return a[2] > b[2] end) @@ -3467,7 +3467,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown) end end - tinsert (playerPhases, {phase, playersTable [self.nome] or 0, myRank, (playersTable [self.nome] or 0) / totalDamage * 100}) + tinsert(playerPhases, {phase, playersTable [self.nome] or 0, myRank, (playersTable [self.nome] or 0) / totalDamage * 100}) end table.sort (playerPhases, function(a, b) return a[1] < b[1] end) @@ -3486,12 +3486,12 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown) end local on_switch_show_enemies = function(instance) - instance:TrocaTabela (instance, true, 1, 6) + instance:TrocaTabela(instance, true, 1, 6) return true end local on_switch_show_frags = function(instance) - instance:TrocaTabela (instance, true, 1, 5) + instance:TrocaTabela(instance, true, 1, 5) return true end @@ -3510,7 +3510,7 @@ function atributo_damage:ReportEnemyDamageTaken (actor, instance, ShiftKeyDown, if (not CustomObject.OnSwitchShow) then CustomObject.OnSwitchShow = fromFrags and on_switch_show_frags or on_switch_show_enemies end - return instance:TrocaTabela (instance.segmento, 5, index) + return instance:TrocaTabela(instance.segmento, 5, index) end end @@ -3529,11 +3529,11 @@ function atributo_damage:ReportEnemyDamageTaken (actor, instance, ShiftKeyDown, OnSwitchShow = fromFrags and on_switch_show_frags or on_switch_show_enemies, } - tinsert (Details.custom, new_custom_object) + tinsert(Details.custom, new_custom_object) setmetatable (new_custom_object, Details.atributo_custom) new_custom_object.__index = Details.atributo_custom - return instance:TrocaTabela (instance.segmento, 5, #Details.custom) + return instance:TrocaTabela(instance.segmento, 5, #Details.custom) end local report_table = {"Details!: " .. actor.nome .. " - " .. Loc ["STRING_ATTRIBUTE_DAMAGE_TAKEN"]} @@ -3778,7 +3778,7 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown) for spellid, spell in _pairs(aggressor.spells._ActorTable) do local on_target = spell.targets [self.nome] if (on_target) then - tinsert (all_spells, {spellid, on_target, aggressor.nome}) + tinsert(all_spells, {spellid, on_target, aggressor.nome}) end end @@ -3786,7 +3786,7 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown) local friendlyFire = aggressor.friendlyfire [self.nome] if (friendlyFire) then for spellid, amount in _pairs(friendlyFire.spells) do - tinsert (all_spells, {spellid, amount, aggressor.nome}) + tinsert(all_spells, {spellid, amount, aggressor.nome}) end end @@ -4472,7 +4472,7 @@ function atributo_damage:MontaInfoDamageDone() if (barra.mouse_over) then --atualizar o tooltip if (barra.isAlvo) then GameTooltip:Hide() - GameTooltip:SetOwner (barra, "ANCHOR_TOPRIGHT") + GameTooltip:SetOwner(barra, "ANCHOR_TOPRIGHT") if (not barra.minha_tabela:MontaTooltipDamageTaken (barra, index)) then return end @@ -4548,7 +4548,7 @@ function atributo_damage:MontaInfoDamageDone() if (barra.mouse_over) then --atualizar o tooltip if (barra.isAlvo) then --GameTooltip:Hide() - --GameTooltip:SetOwner (barra, "ANCHOR_TOPRIGHT") + --GameTooltip:SetOwner(barra, "ANCHOR_TOPRIGHT") if (not barra.minha_tabela:MontaTooltipAlvos (barra, index, instancia)) then return end @@ -4646,10 +4646,10 @@ function atributo_damage:MontaDetalhesEnemy (spellid, barra) end if (barra.lineText1:IsTruncated()) then - Details:CooltipPreset (2) + Details:CooltipPreset(2) GameCooltip:SetOption("FixedWidth", nil) GameCooltip:AddLine (barra.lineText1.text) - GameCooltip:SetOwner (barra, "bottomleft", "topleft", 5, -10) + GameCooltip:SetOwner(barra, "bottomleft", "topleft", 5, -10) GameCooltip:ShowCooltip() end @@ -5066,7 +5066,7 @@ function Details:BuildPlayerDetailsSpellChart() for i = 1, 200 do local texture = playerDetailSmallChart:CreateTexture(nil, "artwork") texture:SetColorTexture (1, 1, 1, 1) - tinsert (playerDetailSmallChart.Lines, texture) + tinsert(playerDetailSmallChart.Lines, texture) end --Details.playerDetailWindow.grupos_detalhes [index] diff --git a/classes/class_heal.lua b/classes/class_heal.lua index 0da96eb51..63f681f20 100644 --- a/classes/class_heal.lua +++ b/classes/class_heal.lua @@ -455,18 +455,18 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then for i = instancia.barraS[1], iter_last-1, 1 do --vai atualizar s� o range que esta sendo mostrado if (conteudo[i]) then - conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) + conteudo[i]:RefreshLine(instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) whichRowLine = whichRowLine+1 end end - conteudo[myPos]:RefreshLine (instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) + conteudo[myPos]:RefreshLine(instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) whichRowLine = whichRowLine+1 else for i = instancia.barraS[1], iter_last, 1 do --vai atualizar s� o range que esta sendo mostrado if (conteudo[i]) then - conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) + conteudo[i]:RefreshLine(instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) whichRowLine = whichRowLine+1 end end @@ -476,17 +476,17 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then for i = instancia.barraS[1], instancia.barraS[2]-1, 1 do --vai atualizar s� o range que esta sendo mostrado if (conteudo[i]) then - conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) + conteudo[i]:RefreshLine(instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) whichRowLine = whichRowLine+1 end end - conteudo[myPos]:RefreshLine (instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) + conteudo[myPos]:RefreshLine(instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) whichRowLine = whichRowLine+1 else for i = instancia.barraS[1], instancia.barraS[2], 1 do --vai atualizar s� o range que esta sendo mostrado if (conteudo[i]) then - conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) + conteudo[i]:RefreshLine(instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) whichRowLine = whichRowLine+1 end end @@ -523,36 +523,36 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo Details.FadeHandler.Fader(row1, "out") if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then - conteudo[myPos]:RefreshLine (instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) + conteudo[myPos]:RefreshLine(instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) whichRowLine = whichRowLine+1 for i = iter_last-1, instancia.barraS[1], -1 do --vai atualizar s� o range que esta sendo mostrado if (conteudo[i]) then - conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) + conteudo[i]:RefreshLine(instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) whichRowLine = whichRowLine+1 end end else for i = iter_last, instancia.barraS[1], -1 do --vai atualizar s� o range que esta sendo mostrado if (conteudo[i]) then - conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) + conteudo[i]:RefreshLine(instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) whichRowLine = whichRowLine+1 end end end else if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then - conteudo[myPos]:RefreshLine (instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) + conteudo[myPos]:RefreshLine(instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) whichRowLine = whichRowLine+1 for i = instancia.barraS[2]-1, instancia.barraS[1], -1 do --vai atualizar s� o range que esta sendo mostrado if (conteudo[i]) then - conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) + conteudo[i]:RefreshLine(instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) whichRowLine = whichRowLine+1 end end else for i = instancia.barraS[2], instancia.barraS[1], -1 do --vai atualizar s� o range que esta sendo mostrado if (conteudo[i]) then - conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) + conteudo[i]:RefreshLine(instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) whichRowLine = whichRowLine+1 end end @@ -594,7 +594,7 @@ end local actor_class_color_r, actor_class_color_g, actor_class_color_b ---function atributo_heal:RefreshLine (instancia, whichRowLine, lugar, total, sub_atributo, forcar) +--function atributo_heal:RefreshLine(instancia, whichRowLine, lugar, total, sub_atributo, forcar) function atributo_heal:RefreshLine(instancia, barras_container, whichRowLine, lugar, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) local thisLine = instancia.barras[whichRowLine] --pega a refer�ncia da barra na janela @@ -1049,7 +1049,7 @@ function atributo_heal:ToolTip_HealingDenied (instancia, numero, barra, keydown) for spellID, spell in _pairs (self.spells._ActorTable) do if (spell.totaldenied > 0 and spell.heal_denied) then --my spells which denied heal - tinsert (spellList, {spell, spell.totaldenied}) + tinsert(spellList, {spell, spell.totaldenied}) --players affected for playerName, amount in _pairs (spell.targets) do @@ -1108,7 +1108,7 @@ function atributo_heal:ToolTip_HealingDenied (instancia, numero, barra, keydown) --Target Players local playerSorted = {} for playerName, amount in _pairs (targetList) do - tinsert (playerSorted, {playerName, amount}) + tinsert(playerSorted, {playerName, amount}) end table.sort (playerSorted, _detalhes.Sort2) _detalhes:AddTooltipSpellHeaderText ("Targets", headerColor, #playerSorted, [[Interface\TUTORIALFRAME\UI-TutorialFrame-LevelUp]], 0.10546875, 0.89453125, 0.05859375, 0.6796875) @@ -1154,7 +1154,7 @@ function atributo_heal:ToolTip_HealingDenied (instancia, numero, barra, keydown) -- Spells Affected local spellsSorted = {} for spellID, amount in _pairs (spellsDenied) do - tinsert (spellsSorted, {spellID, amount}) + tinsert(spellsSorted, {spellID, amount}) end table.sort (spellsSorted, _detalhes.Sort2) _detalhes:AddTooltipSpellHeaderText ("Spells Affected", headerColor, #spellsSorted, [[Interface\TUTORIALFRAME\UI-TutorialFrame-LevelUp]], 0.10546875, 0.89453125, 0.05859375, 0.6796875) @@ -1191,7 +1191,7 @@ function atributo_heal:ToolTip_HealingDenied (instancia, numero, barra, keydown) local healersSorted = {} for healerName, amount in _pairs (healersDenied) do - tinsert (healersSorted, {healerName, amount}) + tinsert(healersSorted, {healerName, amount}) end table.sort (healersSorted, _detalhes.Sort2) @@ -1624,11 +1624,11 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown) local playerPhases = {} local totalDamage = 0 - for phase, playersTable in pairs (phasesInfo.heal) do --each phase + for phase, playersTable in pairs(phasesInfo.heal) do --each phase local allPlayers = {} --all players for this phase - for playerName, amount in pairs (playersTable) do - tinsert (allPlayers, {playerName, amount}) + for playerName, amount in pairs(playersTable) do + tinsert(allPlayers, {playerName, amount}) totalDamage = totalDamage + amount end table.sort (allPlayers, function(a, b) return a[2] > b[2] end) @@ -1641,7 +1641,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown) end end - tinsert (playerPhases, {phase, playersTable [self.nome] or 0, myRank, (playersTable [self.nome] or 0) / totalDamage * 100}) + tinsert(playerPhases, {phase, playersTable [self.nome] or 0, myRank, (playersTable [self.nome] or 0) / totalDamage * 100}) end table.sort (playerPhases, function(a, b) return a[1] < b[1] end) diff --git a/classes/class_instance.lua b/classes/class_instance.lua index 42859b058..77d8609a8 100644 --- a/classes/class_instance.lua +++ b/classes/class_instance.lua @@ -174,7 +174,7 @@ function _detalhes:GetMode() return self.modo end -function _detalhes:GetInstance (id) +function _detalhes:GetInstance(id) return _detalhes.tabela_instancias [id] end --user friendly alias @@ -249,7 +249,7 @@ end function _detalhes:ResetAttribute() if (self.iniciada) then - self:TrocaTabela (nil, 1, 1, true) + self:TrocaTabela(nil, 1, 1, true) else self.atributo = 1 self.sub_atributo = 1 @@ -501,7 +501,7 @@ end end function _detalhes:ToggleWindow (index) - local window = _detalhes:GetInstance (index) + local window = _detalhes:GetInstance(index) if (window and _getmetatable (window)) then if (window:IsEnabled()) then @@ -526,8 +526,8 @@ end end function _detalhes:CheckCoupleWindows (instance1, instance2) - instance1 = instance1 or _detalhes:GetInstance (1) - instance2 = instance2 or _detalhes:GetInstance (2) + instance1 = instance1 or _detalhes:GetInstance(1) + instance2 = instance2 or _detalhes:GetInstance(2) if (instance1 and instance2 and not instance1.ignore_mass_showhide and not instance1.ignore_mass_showhide) then @@ -560,7 +560,7 @@ end local instance for i = 1, #_detalhes.tabela_instancias do - local this_instance = _detalhes:GetInstance (i) + local this_instance = _detalhes:GetInstance(i) if (this_instance and not this_instance.ignore_mass_showhide) then instance = this_instance break @@ -590,7 +590,7 @@ end -- reabre todas as instancias function _detalhes:ReabrirTodasInstancias (temp) for index = math.min (#_detalhes.tabela_instancias, _detalhes.instances_amount), 1, -1 do - local instancia = _detalhes:GetInstance (index) + local instancia = _detalhes:GetInstance(index) if (instancia and not instancia.ignore_mass_showhide) then instancia:AtivarInstancia (temp, true) end @@ -670,7 +670,7 @@ end end self:ChangeSkin() --carrega a skin aqui que era antes feito dentro do restaura janela - _detalhes:TrocaTabela (self, nil, nil, nil, true) + _detalhes:TrocaTabela(self, nil, nil, nil, true) if (self.hide_icon) then Details.FadeHandler.Fader(self.baseframe.cabecalho.atributo_icon, 1) @@ -743,14 +743,14 @@ end function _detalhes:DeleteInstance (id) - local instance = _detalhes:GetInstance (id) + local instance = _detalhes:GetInstance(id) if (not instance) then return false end --break snaps of previous and next window - local left_instance = _detalhes:GetInstance (id-1) + local left_instance = _detalhes:GetInstance(id-1) if (left_instance) then for snap_side, instance_id in _pairs (left_instance.snap) do if (instance_id == id) then --snap na proxima instancia @@ -758,7 +758,7 @@ end end end end - local right_instance = _detalhes:GetInstance (id+1) + local right_instance = _detalhes:GetInstance(id+1) if (right_instance) then for snap_side, instance_id in _pairs (right_instance.snap) do if (instance_id == id) then --snap na proxima instancia @@ -769,7 +769,7 @@ end --re align snaps for higher instances for i = id+1, #_detalhes.tabela_instancias do - local this_instance = _detalhes:GetInstance (i) + local this_instance = _detalhes:GetInstance(i) --fix the snaps for snap_side, instance_id in _pairs (this_instance.snap) do if (instance_id == i+1) then --snap na proxima instancia @@ -815,7 +815,7 @@ end local new_instance = _detalhes:NovaInstancia (next_id) if (_detalhes.standard_skin) then - for key, value in pairs (_detalhes.standard_skin) do + for key, value in pairs(_detalhes.standard_skin) do if (type(value) == "table") then new_instance [key] = Details.CopyTable (value) else @@ -828,7 +828,7 @@ end --se n�o tiver um padr�o, criar de outra inst�ncia j� aberta. local copy_from for i = 1, next_id-1 do - local opened_instance = _detalhes:GetInstance (i) + local opened_instance = _detalhes:GetInstance(i) if (opened_instance and opened_instance:IsEnabled() and opened_instance.baseframe) then copy_from = opened_instance break @@ -836,7 +836,7 @@ end end if (copy_from) then - for key, value in pairs (copy_from) do + for key, value in pairs(copy_from) do if (_detalhes.instance_defaults [key] ~= nil) then if (type(value) == "table") then new_instance [key] = Details.CopyTable (value) @@ -900,7 +900,7 @@ end ------------------------------------------------------------------------------------------------------------------------ --self � a inst�ncia que esta sendo movida.. instancia � a que esta parada -function _detalhes:EstaAgrupada (esta_instancia, lado) --lado //// 1 = encostou na esquerda // 2 = escostou emaixo // 3 = encostou na direita // 4 = encostou em cima +function _detalhes:EstaAgrupada(esta_instancia, lado) --lado //// 1 = encostou na esquerda // 2 = escostou emaixo // 3 = encostou na direita // 4 = encostou em cima --local meu_snap = self.snap --pegou a tabela com {side, side, side, side} if (esta_instancia.snap [lado]) then @@ -1069,7 +1069,7 @@ function _detalhes:BaseFrameSnap() end end -function _detalhes:agrupar_janelas (lados) +function _detalhes:agrupar_janelas(lados) local instancia = self @@ -1162,7 +1162,7 @@ function _detalhes:agrupar_janelas (lados) _detalhes.temp_table1.IconSize = 32 _detalhes.temp_table1.TextHeightMod = -6 - _detalhes.popup:ShowMe (instancia.break_snap_button, "tooltip", "Interface\\Buttons\\LockButton-Unlocked-Up", Loc ["STRING_UNLOCK"], 150, _detalhes.temp_table1) + _detalhes.popup:ShowMe(instancia.break_snap_button, "tooltip", "Interface\\Buttons\\LockButton-Unlocked-Up", Loc ["STRING_UNLOCK"], 150, _detalhes.temp_table1) --UIFrameFlash (instancia.break_snap_button, .5, .5, 5, false, 0, 0) _detalhes.tutorial.unlock_button = _detalhes.tutorial.unlock_button + 1 @@ -1448,7 +1448,7 @@ end new_instance.LastModo = modo_grupo --change the attribute - _detalhes:TrocaTabela (new_instance, 0, 1, 1) + _detalhes:TrocaTabela(new_instance, 0, 1, 1) --internal stuff new_instance.row_height = new_instance.row_info.height + new_instance.row_info.space.between @@ -1480,7 +1480,7 @@ end instance:ChangeSkin (skin) --overwrite all instance parameters with saved ones - for key, value in pairs (style) do + for key, value in pairs(style) do if (key ~= "skin") then if (type(value) == "table") then instance [key] = Details.CopyTable (value) @@ -1546,13 +1546,13 @@ function _detalhes:RestauraJanela(index, temp, load_only) self.bgframe = _bgframe self.bgdisplay = _bgframe_display self.scroll = _scrollframe - _baseframe:EnableMouseWheel (false) + _baseframe:EnableMouseWheel(false) self.alturaAntiga = _baseframe:GetHeight() --self.isLocked = isLocked --window isn't locked when just created it --change the attribute - _detalhes:TrocaTabela (self, self.segmento, self.atributo, self.sub_atributo, true) --passando true no 5� valor para a fun��o ignorar a checagem de valores iguais + _detalhes:TrocaTabela(self, self.segmento, self.atributo, self.sub_atributo, true) --passando true no 5� valor para a fun��o ignorar a checagem de valores iguais --set wallpaper if (self.wallpaper.enabled) then @@ -1656,7 +1656,7 @@ function _detalhes:SwitchBack() _detalhes.SoloTables:switch (nil, prev_switch [6]) else - _detalhes:TrocaTabela (self, prev_switch [4], prev_switch [2], prev_switch [3]) + _detalhes:TrocaTabela(self, prev_switch [4], prev_switch [2], prev_switch [3]) end self.auto_switch_to_old = nil @@ -1692,7 +1692,7 @@ function _detalhes:SwitchTo (switch_table, nosave) if (self.modo ~= _detalhes._detalhes_props["MODO_GROUP"]) then _detalhes:AlteraModo (self, _detalhes._detalhes_props["MODO_GROUP"]) end - _detalhes:TrocaTabela (self, nil, switch_table [1], switch_table [2]) + _detalhes:TrocaTabela(self, nil, switch_table [1], switch_table [2]) end end @@ -1729,7 +1729,7 @@ function _detalhes:CheckSwitchOnCombatEnd (nowipe, warning) local current_attribute, current_sub_atribute = self:GetDisplay() if (current_attribute ~= old_attribute or current_sub_atribute ~= old_sub_atribute) then local attribute_name = self:GetInstanceAttributeText() - self:InstanceAlert (string.format (Loc ["STRING_SWITCH_WARNING"], attribute_name), {[[Interface\CHARACTERFRAME\UI-StateIcon]], 18, 18, false, 0.5, 1, 0, 0.5}, 4) + self:InstanceAlert (string.format(Loc ["STRING_SWITCH_WARNING"], attribute_name), {[[Interface\CHARACTERFRAME\UI-StateIcon]], 18, 18, false, 0.5, 1, 0, 0.5}, 4) end end @@ -1783,7 +1783,7 @@ function _detalhes:CheckSwitchOnCombatStart (check_segment) if (check_segment and got_switch) then if (self:GetSegment() ~= 0) then - self:TrocaTabela (0) + self:TrocaTabela(0) end end @@ -1813,7 +1813,7 @@ function _detalhes:ExportSkin() } --export the keys - for key, value in pairs (self) do + for key, value in pairs(self) do if (_detalhes.instance_defaults [key] ~= nil) then if (type(value) == "table") then exported [key] = Details.CopyTable (value) @@ -1880,7 +1880,7 @@ function _detalhes:ApplySavedSkin (style) self:ChangeSkin (skin) --overwrite all instance parameters with saved ones - for key, value in pairs (style) do + for key, value in pairs(style) do if (key ~= "skin") then if (type(value) == "table") then self [key] = Details.CopyTable (value) @@ -1891,9 +1891,9 @@ function _detalhes:ApplySavedSkin (style) end --check for new keys inside tables - for key, value in pairs (_detalhes.instance_defaults) do + for key, value in pairs(_detalhes.instance_defaults) do if (type(value) == "table") then - for key2, value2 in pairs (value) do + for key2, value2 in pairs(value) do if (self [key] [key2] == nil) then if (type(value2) == "table") then self [key] [key2] = Details.CopyTable (_detalhes.instance_defaults [key] [key2]) @@ -2198,7 +2198,7 @@ function _detalhes:SetDisplay(segment, attribute, subAttribute, isInstanceStarup return self:TrocaTabela(self, segment, attribute, subAttribute, isInstanceStarup, instanceMode) end -function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, iniciando_instancia, InstanceMode) +function _detalhes:TrocaTabela(instancia, segmento, atributo, sub_atributo, iniciando_instancia, InstanceMode) if (self and self.meu_id and not instancia) then --self � uma inst�ncia InstanceMode = iniciando_instancia @@ -2324,7 +2324,7 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini end if (update_coolTip) then - _detalhes.popup:Select (1, segmento+2) + _detalhes.popup:Select(1, segmento+2) end if (instancia.showing and instancia.showing.contra) then @@ -2393,10 +2393,10 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini if (instancia.modo == modo_alone and not (_detalhes.initializing or iniciando_instancia)) then if (_detalhes.SoloTables.Mode == #_detalhes.SoloTables.Plugins) then - _detalhes.popup:Select (1, 1) + _detalhes.popup:Select(1, 1) else if (_detalhes.PluginCount.SOLO > 0) then - _detalhes.popup:Select (1, _detalhes.SoloTables.Mode+1) + _detalhes.popup:Select(1, _detalhes.SoloTables.Mode+1) end end return _detalhes.SoloTables.switch (nil, nil, -1) @@ -2413,8 +2413,8 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini instancia:ChangeIcon() if (update_coolTip) then - _detalhes.popup:Select (1, atributo) - _detalhes.popup:Select (2, instancia.sub_atributo, atributo) + _detalhes.popup:Select(1, atributo) + _detalhes.popup:Select(2, instancia.sub_atributo, atributo) end if (_detalhes.cloud_process) then @@ -2948,10 +2948,10 @@ function _detalhes:AlteraModo (instancia, qual, from_mode_menu) checked = 3 end - _detalhes.popup:Select (1, checked) + _detalhes.popup:Select(1, checked) if (from_mode_menu) then - instancia.baseframe.cabecalho.modo_selecao:GetScript ("OnEnter")(instancia.baseframe.cabecalho.modo_selecao, _, true) + instancia.baseframe.cabecalho.modo_selecao:GetScript("OnEnter")(instancia.baseframe.cabecalho.modo_selecao, _, true) --running OnEnter does also trigger an instance enter event, so we need to manually leave the instance: _detalhes.OnLeaveMainWindow(instancia, instancia.baseframe.cabecalho.modo_selecao) @@ -3140,13 +3140,13 @@ function _detalhes:monta_relatorio (este_relatorio, custom) --push it to front local t = tremove (_detalhes.latest_report_table, already_exists) t [4] = amt - tinsert (_detalhes.latest_report_table, 1, t) + tinsert(_detalhes.latest_report_table, 1, t) else if (self.atributo == 5) then local custom_name = self:GetCustomObject():GetName() - tinsert (_detalhes.latest_report_table, 1, {self.meu_id, self.atributo, self.sub_atributo, amt, _detalhes.report_where, custom_name}) + tinsert(_detalhes.latest_report_table, 1, {self.meu_id, self.atributo, self.sub_atributo, amt, _detalhes.report_where, custom_name}) else - tinsert (_detalhes.latest_report_table, 1, {self.meu_id, self.atributo, self.sub_atributo, amt, _detalhes.report_where}) + tinsert(_detalhes.latest_report_table, 1, {self.meu_id, self.atributo, self.sub_atributo, amt, _detalhes.report_where}) end end @@ -3170,7 +3170,7 @@ function _detalhes:monta_relatorio (este_relatorio, custom) if (self.sub_atributo == 5) then --frags local frags = self.showing.frags local reportarFrags = {} - for name, amount in pairs (frags) do + for name, amount in pairs(frags) do --string para imprimir direto sem calculos reportarFrags [#reportarFrags+1] = {frag = tostring (amount), nome = name} end @@ -3284,7 +3284,7 @@ function _detalhes:monta_relatorio (este_relatorio, custom) if (is_reverse) then local t = {} for i = #raw_data_to_report, 1, -1 do - tinsert (t, raw_data_to_report [i]) + tinsert(t, raw_data_to_report [i]) if (#t >= amt) then break end diff --git a/classes/class_resources.lua b/classes/class_resources.lua index d52b1627e..6b4cb4f7f 100644 --- a/classes/class_resources.lua +++ b/classes/class_resources.lua @@ -542,15 +542,15 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then for i = instancia.barraS[1], iter_last-1, 1 do --vai atualizar s� o range que esta sendo mostrado - conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra + conteudo[i]:RefreshLine(instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra whichRowLine = whichRowLine+1 end - conteudo[myPos]:RefreshLine (instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra + conteudo[myPos]:RefreshLine(instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra whichRowLine = whichRowLine+1 else for i = instancia.barraS[1], iter_last, 1 do --vai atualizar s� o range que esta sendo mostrado - conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra + conteudo[i]:RefreshLine(instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra whichRowLine = whichRowLine+1 end end @@ -558,15 +558,15 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex else if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then for i = instancia.barraS[1], instancia.barraS[2]-1, 1 do --vai atualizar s� o range que esta sendo mostrado - conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra + conteudo[i]:RefreshLine(instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra whichRowLine = whichRowLine+1 end - conteudo[myPos]:RefreshLine (instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra + conteudo[myPos]:RefreshLine(instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra whichRowLine = whichRowLine+1 else for i = instancia.barraS[1], instancia.barraS[2], 1 do --vai atualizar s� o range que esta sendo mostrado - conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra + conteudo[i]:RefreshLine(instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra whichRowLine = whichRowLine+1 end end @@ -602,29 +602,29 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex Details.FadeHandler.Fader(row1, "out") if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then - conteudo[myPos]:RefreshLine (instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra + conteudo[myPos]:RefreshLine(instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra whichRowLine = whichRowLine+1 for i = iter_last-1, instancia.barraS[1], -1 do --vai atualizar s� o range que esta sendo mostrado - conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra + conteudo[i]:RefreshLine(instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra whichRowLine = whichRowLine+1 end else for i = iter_last, instancia.barraS[1], -1 do --vai atualizar s� o range que esta sendo mostrado - conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra + conteudo[i]:RefreshLine(instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra whichRowLine = whichRowLine+1 end end else if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then - conteudo[myPos]:RefreshLine (instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra + conteudo[myPos]:RefreshLine(instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra whichRowLine = whichRowLine+1 for i = instancia.barraS[2]-1, instancia.barraS[1], -1 do --vai atualizar s� o range que esta sendo mostrado - conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra + conteudo[i]:RefreshLine(instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra whichRowLine = whichRowLine+1 end else for i = instancia.barraS[2], instancia.barraS[1], -1 do --vai atualizar s� o range que esta sendo mostrado - conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra + conteudo[i]:RefreshLine(instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --inst�ncia, index, total, valor da 1� barra whichRowLine = whichRowLine+1 end end @@ -648,7 +648,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex end -function atributo_energy:RefreshLine (instancia, barras_container, whichRowLine, lugar, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) +function atributo_energy:RefreshLine(instancia, barras_container, whichRowLine, lugar, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) local esta_barra = instancia.barras[whichRowLine] --pega a refer�ncia da barra na janela @@ -1002,7 +1002,7 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown local allGeneratorSpells = {} local allGenerated = 0 for spellid, spellObject in _pairs (self.spells._ActorTable) do - tinsert (allGeneratorSpells, {spellObject, spellObject.total, spellObject.totalover}) + tinsert(allGeneratorSpells, {spellObject, spellObject.total, spellObject.totalover}) allGenerated = allGenerated + spellObject.total end @@ -1193,7 +1193,7 @@ function atributo_energy:MontaInfoRegenRecebido() if (barra.mouse_over) then --atualizar o tooltip if (barra.isAlvo) then GameTooltip:Hide() - GameTooltip:SetOwner (barra, "ANCHOR_TOPRIGHT") + GameTooltip:SetOwner(barra, "ANCHOR_TOPRIGHT") if (not barra.minha_tabela:MontaTooltipAlvos (barra, index)) then return end diff --git a/classes/class_utility.lua b/classes/class_utility.lua index ea121a170..bcc70fe53 100644 --- a/classes/class_utility.lua +++ b/classes/class_utility.lua @@ -160,7 +160,7 @@ end --try to find a spell with the same name and get the amount of casts of that spell object if (not spell_cast and misc_actor.spell_cast) then local spellname = GetSpellInfo(spellId) - for casted_spellid, amount in pairs (misc_actor.spell_cast) do + for casted_spellid, amount in pairs(misc_actor.spell_cast) do local casted_spellname = GetSpellInfo(casted_spellid) if (casted_spellname == spellname) then return amount, true @@ -391,7 +391,7 @@ local ReportSingleDeathFunc = function(IsCurrent, IsReverse, AmtLines) local title = tremove (t, 1) t = _detalhes.table.reverse (t) - tinsert (t, 1, title) + tinsert(t, 1, title) _detalhes:SendReportLines (t) @@ -444,7 +444,7 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia) hp = 100 end - tinsert (report_array, {elapsed .. " ", spelllink, " (" .. source .. ")", "-" .. _detalhes:ToK (amount) .. " (" .. hp .. "%) "}) + tinsert(report_array, {elapsed .. " ", spelllink, " (" .. source .. ")", "-" .. _detalhes:ToK (amount) .. " (" .. hp .. "%) "}) end elseif (not evento [1] and type (evento [1]) == "boolean") then --heal @@ -463,9 +463,9 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia) end if (_detalhes.report_heal_links) then - tinsert (report_array, {elapsed .. " ", spelllink, " (" .. source .. ")", "+" .. _detalhes:ToK (amount) .. " (" .. hp .. "%) "}) + tinsert(report_array, {elapsed .. " ", spelllink, " (" .. source .. ")", "+" .. _detalhes:ToK (amount) .. " (" .. hp .. "%) "}) else - tinsert (report_array, {elapsed .. " ", spellname, " (" .. source .. ")", "+" .. _detalhes:ToK (amount) .. " (" .. hp .. "%) "}) + tinsert(report_array, {elapsed .. " ", spellname, " (" .. source .. ")", "+" .. _detalhes:ToK (amount) .. " (" .. hp .. "%) "}) end end @@ -481,7 +481,7 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia) hp = 100 end - tinsert (report_array, {elapsed .. " ", "x" .. stacks .. "" .. spelllink, " (" .. source .. ")", "(" .. hp .. "%) "}) + tinsert(report_array, {elapsed .. " ", "x" .. stacks .. "" .. spelllink, " (" .. source .. ")", "(" .. hp .. "%) "}) end end @@ -502,7 +502,7 @@ function atributo_misc:ReportSingleCooldownLine (misc_actor, instancia) local cooldowns = misc_actor.cooldowns_defensive_spells._ActorTable local cooldowns_used = {} - for spellid, spell in pairs (cooldowns) do + for spellid, spell in pairs(cooldowns) do cooldowns_used [#cooldowns_used+1] = {spellid, spell.counter, spell} end table.sort (cooldowns_used, _detalhes.Sort2) @@ -512,7 +512,7 @@ function atributo_misc:ReportSingleCooldownLine (misc_actor, instancia) local spelllink = GetSpellLink(spell [1]) reportar [#reportar+1] = spelllink .. ": " .. spell [2] - for target_name, amount in pairs (spell[3].targets) do + for target_name, amount in pairs(spell[3].targets) do if (target_name ~= misc_actor.nome and target_name ~= Loc ["STRING_RAID_WIDE"] and amount > 0) then reportar [#reportar+1] = " -" .. target_name .. ": " .. amount end @@ -544,7 +544,7 @@ function atributo_misc:ReportSingleBuffUptimeLine (misc_actor, instance) local buffs = {} local combat_time = instance.showing:GetCombatTime() - for spellid, spell in pairs (misc_actor.buff_uptime_spells._ActorTable) do + for spellid, spell in pairs(misc_actor.buff_uptime_spells._ActorTable) do local percent = spell.uptime / combat_time * 100 if (percent < 99.5) then buffs [#buffs+1] = {spellid, {spell.uptime, percent}} @@ -562,7 +562,7 @@ function atributo_misc:ReportSingleDebuffUptimeLine (misc_actor, instance) local debuffs = {} local combat_time = instance.showing:GetCombatTime() - for spellid, spell in pairs (misc_actor.debuff_uptime_spells._ActorTable) do + for spellid, spell in pairs(misc_actor.debuff_uptime_spells._ActorTable) do local percent = spell.uptime / combat_time * 100 debuffs [#debuffs+1] = {spellid, {spell.uptime, percent}} end @@ -842,14 +842,14 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo if (instancia.bars_sort_direction == 1) then --top to bottom for i = instancia.barraS[1], instancia.barraS[2], 1 do --vai atualizar s� o range que esta sendo mostrado - conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, nil, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) + conteudo[i]:RefreshLine(instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, nil, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) whichRowLine = whichRowLine+1 end elseif (instancia.bars_sort_direction == 2) then --bottom to top for i = instancia.barraS[2], instancia.barraS[1], -1 do --vai atualizar s� o range que esta sendo mostrado if (conteudo[i]) then - conteudo[i]:RefreshLine (instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, nil, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) + conteudo[i]:RefreshLine(instancia, barras_container, whichRowLine, i, total, sub_atributo, forcar, keyName, nil, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) whichRowLine = whichRowLine+1 end end @@ -886,7 +886,7 @@ end local actor_class_color_r, actor_class_color_g, actor_class_color_b -function atributo_misc:RefreshLine (instancia, barras_container, whichRowLine, lugar, total, sub_atributo, forcar, keyName, is_dead, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) +function atributo_misc:RefreshLine(instancia, barras_container, whichRowLine, lugar, total, sub_atributo, forcar, keyName, is_dead, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) local esta_barra = instancia.barras[whichRowLine] --pega a refer�ncia da barra na janela @@ -1093,7 +1093,7 @@ function atributo_misc:ToolTipCC (instancia, numero, barra) local lineHeight = _detalhes.tooltip.line_height local icon_border = _detalhes.tooltip.icon_border_texcoord - for _spellid, _tabela in pairs (habilidades) do + for _spellid, _tabela in pairs(habilidades) do --quantidade local nome_magia, _, icone_magia = _GetSpellInfo(_spellid) @@ -1103,7 +1103,7 @@ function atributo_misc:ToolTipCC (instancia, numero, barra) --o que quebrou local quebrou_oque = _tabela.cc_break_oque - for spellid_quebrada, amt_quebrada in pairs (_tabela.cc_break_oque) do + for spellid_quebrada, amt_quebrada in pairs(_tabela.cc_break_oque) do local nome_magia, _, icone_magia = _GetSpellInfo(spellid_quebrada) GameCooltip:AddLine (nome_magia, amt_quebrada .. " ") GameCooltip:AddIcon ([[Interface\Buttons\UI-GroupLoot-Pass-Down]], nil, 1, 14, 14) @@ -1112,7 +1112,7 @@ function atributo_misc:ToolTipCC (instancia, numero, barra) end --em quem quebrou - for target_name, amount in pairs (_tabela.targets) do + for target_name, amount in pairs(_tabela.targets) do GameCooltip:AddLine (target_name .. ": ", amount .. " ") local classe = _detalhes:GetClass (target_name) @@ -1145,7 +1145,7 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra) --habilidade usada para dispelar local meus_dispells = {} - for _spellid, _tabela in pairs (habilidades) do + for _spellid, _tabela in pairs(habilidades) do if (_tabela.dispell) then meus_dispells [#meus_dispells+1] = {_spellid, _math_floor(_tabela.dispell)} --_math_floor valor é nil, uma magia na tabela de dispel, sem dispel? else @@ -1174,7 +1174,7 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra) --quais habilidades foram dispaladas local buffs_dispelados = {} - for _spellid, amt in pairs (self.dispell_oque) do + for _spellid, amt in pairs(self.dispell_oque) do buffs_dispelados [#buffs_dispelados+1] = {_spellid, amt} end table.sort (buffs_dispelados, _detalhes.Sort2) @@ -1195,7 +1195,7 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra) --alvos dispelados local alvos_dispelados = {} - for target_name, amount in pairs (self.dispell_targets) do + for target_name, amount in pairs(self.dispell_targets) do alvos_dispelados [#alvos_dispelados + 1] = {target_name, _math_floor(amount), amount / meu_total * 100} end table.sort (alvos_dispelados, _detalhes.Sort2) @@ -1312,7 +1312,7 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN" for _, actor in ipairs(misc_container) do if (actor.debuff_uptime) then - for spellid, spell in pairs (actor.debuff_uptime_spells._ActorTable) do + for spellid, spell in pairs(actor.debuff_uptime_spells._ActorTable) do if (spell.actived and spell.actived_at) then spell.uptime = spell.uptime + _detalhes._tempo - spell.actived_at actor.debuff_uptime = actor.debuff_uptime + _detalhes._tempo - spell.actived_at @@ -1481,7 +1481,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out) if (in_or_out == "BUFF_UPTIME_IN") then local string_output = "pre-potion: " --localize-me - for playername, potspellid in pairs (pot_usage) do + for playername, potspellid in pairs(pot_usage) do local name, _, icon = _GetSpellInfo(potspellid) local _, class = UnitClass (playername) local class_color = "" @@ -1553,7 +1553,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out) if (in_or_out == "BUFF_UPTIME_IN") then local string_output = "pre-potion: " - for playername, potspellid in pairs (pot_usage) do + for playername, potspellid in pairs(pot_usage) do local name, _, icon = _GetSpellInfo(potspellid) local _, class = UnitClass (playername) local class_color = "" @@ -1594,7 +1594,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out) --[ if (in_or_out == "BUFF_UPTIME_IN") then local string_output = "pre-potion: " - for playername, potspellid in pairs (pot_usage) do + for playername, potspellid in pairs(pot_usage) do local name, _, icon = _GetSpellInfo(potspellid) local _, class = UnitClass (playername) local class_color = "" @@ -1635,7 +1635,7 @@ function atributo_misc:ToolTipDebuffUptime (instancia, numero, barra) local _combat_time = instancia.showing:GetCombatTime() - for _spellid, _tabela in pairs (minha_tabela) do + for _spellid, _tabela in pairs(minha_tabela) do debuffs_usados [#debuffs_usados+1] = {_spellid, _tabela.uptime} end table.sort (debuffs_usados, _detalhes.Sort2) @@ -1747,7 +1747,7 @@ function atributo_misc:ToolTipDefensiveCooldowns (instancia, numero, barra) --spells local cooldowns_usados = {} - for _spellid, _tabela in pairs (minha_tabela) do + for _spellid, _tabela in pairs(minha_tabela) do cooldowns_usados [#cooldowns_usados+1] = {_spellid, _tabela.counter} end table.sort (cooldowns_usados, _detalhes.Sort2) @@ -1775,7 +1775,7 @@ function atributo_misc:ToolTipDefensiveCooldowns (instancia, numero, barra) local meus_alvos = self.cooldowns_defensive_targets local alvos = {} - for target_name, amount in pairs (meus_alvos) do + for target_name, amount in pairs(meus_alvos) do alvos [#alvos+1] = {target_name, amount} end table.sort (alvos, _detalhes.Sort2) @@ -1833,7 +1833,7 @@ function atributo_misc:ToolTipRess (instancia, numero, barra) --habilidade usada para interromper local meus_ress = {} - for _spellid, _tabela in pairs (minha_tabela) do + for _spellid, _tabela in pairs(minha_tabela) do meus_ress [#meus_ress+1] = {_spellid, _tabela.ress} end table.sort (meus_ress, _detalhes.Sort2) @@ -1857,7 +1857,7 @@ function atributo_misc:ToolTipRess (instancia, numero, barra) local meus_alvos = self.ress_targets local alvos = {} - for target_name, amount in pairs (meus_alvos) do + for target_name, amount in pairs(meus_alvos) do alvos [#alvos+1] = {target_name, amount} end table.sort (alvos, _detalhes.Sort2) @@ -1915,7 +1915,7 @@ function atributo_misc:ToolTipInterrupt (instancia, numero, barra) --habilidade usada para interromper local meus_interrupts = {} - for _spellid, _tabela in pairs (minha_tabela) do + for _spellid, _tabela in pairs(minha_tabela) do meus_interrupts [#meus_interrupts+1] = {_spellid, _tabela.counter} end table.sort (meus_interrupts, _detalhes.Sort2) @@ -1938,7 +1938,7 @@ function atributo_misc:ToolTipInterrupt (instancia, numero, barra) --quais habilidades foram interrompidas local habilidades_interrompidas = {} - for _spellid, amt in pairs (self.interrompeu_oque) do + for _spellid, amt in pairs(self.interrompeu_oque) do habilidades_interrompidas [#habilidades_interrompidas+1] = {_spellid, amt} end table.sort (habilidades_interrompidas, _detalhes.Sort2) @@ -2046,7 +2046,7 @@ function atributo_misc:MontaInfoInterrupt() local meus_interrupts = {} --player - for _spellid, _tabela in pairs (minha_tabela) do --da foreach em cada spellid do container + for _spellid, _tabela in pairs(minha_tabela) do --da foreach em cada spellid do container local nome, _, icone = _GetSpellInfo(_spellid) _table_insert (meus_interrupts, {_spellid, _tabela.counter, _tabela.counter/meu_total*100, nome, icone}) end @@ -2057,7 +2057,7 @@ function atributo_misc:MontaInfoInterrupt() local PetActor = instancia.showing (class_type, PetName) if (PetActor and PetActor.interrupt and PetActor.interrupt > 0) then local PetSkillsContainer = PetActor.interrupt_spells._ActorTable - for _spellid, _skill in pairs (PetSkillsContainer) do --da foreach em cada spellid do container + for _spellid, _skill in pairs(PetSkillsContainer) do --da foreach em cada spellid do container local nome, _, icone = _GetSpellInfo(_spellid) _table_insert (meus_interrupts, {_spellid, _skill.counter, _skill.counter/meu_total*100, nome .. " (|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r)", icone, PetActor}) end @@ -2125,7 +2125,7 @@ function atributo_misc:MontaInfoInterrupt() --Alvos do interrupt local meus_alvos = {} - for target_name, amount in pairs (self.interrupt_targets) do + for target_name, amount in pairs(self.interrupt_targets) do meus_alvos [#meus_alvos+1] = {target_name, amount} end table.sort (meus_alvos, _detalhes.Sort2) @@ -2160,7 +2160,7 @@ function atributo_misc:MontaInfoInterrupt() if (barra.mouse_over) then --atualizar o tooltip if (barra.isAlvo) then GameTooltip:Hide() - GameTooltip:SetOwner (barra, "ANCHOR_TOPRIGHT") + GameTooltip:SetOwner(barra, "ANCHOR_TOPRIGHT") if (not barra.minha_tabela:MontaTooltipAlvos (barra, index)) then return end @@ -2206,7 +2206,7 @@ function atributo_misc:MontaDetalhesInterrupt (spellid, barra) local instancia = info.instancia local habilidades_alvos = {} - for spellid, amt in pairs (esta_magia.interrompeu_oque) do + for spellid, amt in pairs(esta_magia.interrompeu_oque) do habilidades_alvos [#habilidades_alvos+1] = {spellid, amt} end table.sort (habilidades_alvos, _detalhes.Sort2) @@ -2256,7 +2256,7 @@ function atributo_misc:MontaTooltipAlvos (esta_barra, index) local habilidades = {} local total = self.interrupt - for spellid, tabela in pairs (container) do + for spellid, tabela in pairs(container) do --tabela = classe_damage_habilidade local alvos = tabela.targets for target_name, amount in ipairs(alvos) do @@ -2328,12 +2328,12 @@ end end local refresh_alvos = function(container1, container2) - for target_name, amount in pairs (container2) do + for target_name, amount in pairs(container2) do container1 [target_name] = container1 [target_name] or 0 end end local refresh_habilidades = function(container1, container2) - for spellid, habilidade in pairs (container2._ActorTable) do + for spellid, habilidade in pairs(container2._ActorTable) do local habilidade_shadow = container1:PegaHabilidade (spellid, true, nil, true) refresh_alvos (habilidade_shadow.targets , habilidade.targets) end @@ -2369,7 +2369,7 @@ function atributo_misc:r_onlyrefresh_shadow (actor) if (not shadow.spell_cast) then shadow.spell_cast = {} end - for spellid, _ in pairs (actor.spell_cast) do + for spellid, _ in pairs(actor.spell_cast) do shadow.spell_cast [spellid] = shadow.spell_cast [spellid] or 0 end end @@ -2407,7 +2407,7 @@ function atributo_misc:r_onlyrefresh_shadow (actor) if (actor.interrupt) then refresh_alvos (shadow.interrupt_targets, actor.interrupt_targets) refresh_habilidades (shadow.interrupt_spells, actor.interrupt_spells) - for spellid, habilidade in pairs (actor.interrupt_spells._ActorTable) do + for spellid, habilidade in pairs(actor.interrupt_spells._ActorTable) do local habilidade_shadow = shadow.interrupt_spells:PegaHabilidade (spellid, true, nil, true) habilidade_shadow.interrompeu_oque = habilidade_shadow.interrompeu_oque or {} end @@ -2423,7 +2423,7 @@ function atributo_misc:r_onlyrefresh_shadow (actor) if (actor.dispell) then refresh_alvos (shadow.dispell_targets, actor.dispell_targets) refresh_habilidades (shadow.dispell_spells, actor.dispell_spells) - for spellid, habilidade in pairs (actor.dispell_spells._ActorTable) do + for spellid, habilidade in pairs(actor.dispell_spells._ActorTable) do local habilidade_shadow = shadow.dispell_spells:PegaHabilidade (spellid, true, nil, true) habilidade_shadow.dispell_oque = habilidade_shadow.dispell_oque or {} end @@ -2433,7 +2433,7 @@ function atributo_misc:r_onlyrefresh_shadow (actor) if (actor.cc_break) then refresh_alvos (shadow.cc_break_targets, actor.cc_break_targets) refresh_habilidades (shadow.cc_break_spells, actor.cc_break_spells) - for spellid, habilidade in pairs (actor.cc_break_spells._ActorTable) do + for spellid, habilidade in pairs(actor.cc_break_spells._ActorTable) do local habilidade_shadow = shadow.cc_break_spells:PegaHabilidade (spellid, true, nil, true) habilidade_shadow.cc_break_oque = habilidade_shadow.cc_break_oque or {} end @@ -2444,7 +2444,7 @@ function atributo_misc:r_onlyrefresh_shadow (actor) end local somar_keys = function(habilidade, habilidade_tabela1) - for key, value in pairs (habilidade) do + for key, value in pairs(habilidade) do if (_type(value) == "number") then if (key ~= "id" and key ~= "spellschool") then habilidade_tabela1 [key] = (habilidade_tabela1 [key] or 0) + value @@ -2453,12 +2453,12 @@ local somar_keys = function(habilidade, habilidade_tabela1) end end local somar_alvos = function(container1, container2) - for target_name, amount in pairs (container2) do + for target_name, amount in pairs(container2) do container1 [target_name] = (container1 [target_name] or 0) + amount end end local somar_habilidades = function(container1, container2) - for spellid, habilidade in pairs (container2._ActorTable) do + for spellid, habilidade in pairs(container2._ActorTable) do local habilidade_tabela1 = container1:PegaHabilidade (spellid, true, nil, false) somar_alvos (habilidade_tabela1.targets, habilidade.targets) somar_keys (habilidade, habilidade_tabela1) @@ -2506,7 +2506,7 @@ function atributo_misc:r_connect_shadow (actor, no_refresh, combat_object) shadow.spell_cast = {} end - for spellid, amount in pairs (actor.spell_cast) do + for spellid, amount in pairs(actor.spell_cast) do shadow.spell_cast [spellid] = (shadow.spell_cast [spellid] or 0) + amount end end @@ -2572,7 +2572,7 @@ function atributo_misc:r_connect_shadow (actor, no_refresh, combat_object) shadow.debuff_uptime = shadow.debuff_uptime + actor.debuff_uptime - for target_name, amount in pairs (actor.debuff_uptime_targets) do + for target_name, amount in pairs(actor.debuff_uptime_targets) do if (_type(amount) == "table") then --boss debuff local t = shadow.debuff_uptime_targets [target_name] if (not t) then @@ -2609,16 +2609,16 @@ function atributo_misc:r_connect_shadow (actor, no_refresh, combat_object) somar_alvos (shadow.interrupt_targets, actor.interrupt_targets) somar_habilidades (shadow.interrupt_spells, actor.interrupt_spells) - for spellid, habilidade in pairs (actor.interrupt_spells._ActorTable) do + for spellid, habilidade in pairs(actor.interrupt_spells._ActorTable) do local habilidade_shadow = shadow.interrupt_spells:PegaHabilidade (spellid, true, nil, true) habilidade_shadow.interrompeu_oque = habilidade_shadow.interrompeu_oque or {} - for _spellid, amount in pairs (habilidade.interrompeu_oque) do + for _spellid, amount in pairs(habilidade.interrompeu_oque) do habilidade_shadow.interrompeu_oque [_spellid] = (habilidade_shadow.interrompeu_oque [_spellid] or 0) + amount end end - for spellid, amount in pairs (actor.interrompeu_oque) do + for spellid, amount in pairs(actor.interrompeu_oque) do shadow.interrompeu_oque [spellid] = (shadow.interrompeu_oque [spellid] or 0) + amount end end @@ -2659,15 +2659,15 @@ function atributo_misc:r_connect_shadow (actor, no_refresh, combat_object) somar_alvos (shadow.dispell_targets, actor.dispell_targets) somar_habilidades (shadow.dispell_spells, actor.dispell_spells) - for spellid, habilidade in pairs (actor.dispell_spells._ActorTable) do + for spellid, habilidade in pairs(actor.dispell_spells._ActorTable) do local habilidade_shadow = shadow.dispell_spells:PegaHabilidade (spellid, true, nil, true) habilidade_shadow.dispell_oque = habilidade_shadow.dispell_oque or {} - for _spellid, amount in pairs (habilidade.dispell_oque) do + for _spellid, amount in pairs(habilidade.dispell_oque) do habilidade_shadow.dispell_oque [_spellid] = (habilidade_shadow.dispell_oque [_spellid] or 0) + amount end end - for spellid, amount in pairs (actor.dispell_oque) do + for spellid, amount in pairs(actor.dispell_oque) do shadow.dispell_oque [spellid] = (shadow.dispell_oque [spellid] or 0) + amount end end @@ -2689,14 +2689,14 @@ function atributo_misc:r_connect_shadow (actor, no_refresh, combat_object) somar_alvos (shadow.cc_break_targets, actor.cc_break_targets) somar_habilidades (shadow.cc_break_spells, actor.cc_break_spells) - for spellid, habilidade in pairs (actor.cc_break_spells._ActorTable) do + for spellid, habilidade in pairs(actor.cc_break_spells._ActorTable) do local habilidade_shadow = shadow.cc_break_spells:PegaHabilidade (spellid, true, nil, true) habilidade_shadow.cc_break_oque = habilidade_shadow.cc_break_oque or {} - for _spellid, amount in pairs (habilidade.cc_break_oque) do + for _spellid, amount in pairs(habilidade.cc_break_oque) do habilidade_shadow.cc_break_oque [_spellid] = (habilidade_shadow.cc_break_oque [_spellid] or 0) + amount end end - for spellid, amount in pairs (actor.cc_break_oque) do + for spellid, amount in pairs(actor.cc_break_oque) do shadow.cc_break_oque [spellid] = (shadow.cc_break_oque [spellid] or 0) + amount end end @@ -2857,7 +2857,7 @@ end atributo_misc.__add = function(tabela1, tabela2) if (tabela2.spell_cast) then - for spellid, amount in pairs (tabela2.spell_cast) do + for spellid, amount in pairs(tabela2.spell_cast) do tabela1.spell_cast [spellid] = (tabela1.spell_cast [spellid] or 0) + amount end end @@ -2865,14 +2865,14 @@ atributo_misc.__add = function(tabela1, tabela2) if (tabela2.cc_done) then tabela1.cc_done = tabela1.cc_done + tabela2.cc_done - for target_name, amount in pairs (tabela2.cc_done_targets) do + for target_name, amount in pairs(tabela2.cc_done_targets) do tabela1.cc_done_targets [target_name] = (tabela1.cc_done_targets [target_name] or 0) + amount end - for spellid, habilidade in pairs (tabela2.cc_done_spells._ActorTable) do + for spellid, habilidade in pairs(tabela2.cc_done_spells._ActorTable) do local habilidade_tabela1 = tabela1.cc_done_spells:PegaHabilidade (spellid, true, nil, false) - for target_name, amount in pairs (habilidade.targets) do + for target_name, amount in pairs(habilidade.targets) do habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) + amount end @@ -2892,24 +2892,24 @@ atributo_misc.__add = function(tabela1, tabela2) --total de interrupts tabela1.interrupt = tabela1.interrupt + tabela2.interrupt --soma o interrompeu o que - for spellid, amount in pairs (tabela2.interrompeu_oque) do + for spellid, amount in pairs(tabela2.interrompeu_oque) do tabela1.interrompeu_oque [spellid] = (tabela1.interrompeu_oque [spellid] or 0) + amount end --soma os containers de alvos - for target_name, amount in pairs (tabela2.interrupt_targets) do + for target_name, amount in pairs(tabela2.interrupt_targets) do tabela1.interrupt_targets [target_name] = (tabela1.interrupt_targets [target_name] or 0) + amount end --soma o container de habilidades - for spellid, habilidade in pairs (tabela2.interrupt_spells._ActorTable) do + for spellid, habilidade in pairs(tabela2.interrupt_spells._ActorTable) do local habilidade_tabela1 = tabela1.interrupt_spells:PegaHabilidade (spellid, true, nil, false) habilidade_tabela1.interrompeu_oque = habilidade_tabela1.interrompeu_oque or {} - for _spellid, amount in pairs (habilidade.interrompeu_oque) do + for _spellid, amount in pairs(habilidade.interrompeu_oque) do habilidade_tabela1.interrompeu_oque [_spellid] = (habilidade_tabela1.interrompeu_oque [_spellid] or 0) + amount end - for target_name, amount in pairs (habilidade.targets) do + for target_name, amount in pairs(habilidade.targets) do habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) + amount end @@ -2927,14 +2927,14 @@ atributo_misc.__add = function(tabela1, tabela2) tabela1.buff_uptime = tabela1.buff_uptime + tabela2.buff_uptime - for target_name, amount in pairs (tabela2.buff_uptime_targets) do + for target_name, amount in pairs(tabela2.buff_uptime_targets) do tabela1.buff_uptime_targets [target_name] = (tabela1.buff_uptime_targets [target_name] or 0) + amount end - for spellid, habilidade in pairs (tabela2.buff_uptime_spells._ActorTable) do + for spellid, habilidade in pairs(tabela2.buff_uptime_spells._ActorTable) do local habilidade_tabela1 = tabela1.buff_uptime_spells:PegaHabilidade (spellid, true, nil, false) - for target_name, amount in pairs (habilidade.targets) do + for target_name, amount in pairs(habilidade.targets) do habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) + amount end @@ -2960,7 +2960,7 @@ atributo_misc.__add = function(tabela1, tabela2) tabela1.debuff_uptime = tabela1.debuff_uptime + tabela2.debuff_uptime - for target_name, amount in pairs (tabela2.debuff_uptime_targets) do + for target_name, amount in pairs(tabela2.debuff_uptime_targets) do if (_type(amount) == "table") then --boss debuff local t = tabela1.debuff_uptime_targets [target_name] if (not t) then @@ -2976,10 +2976,10 @@ atributo_misc.__add = function(tabela1, tabela2) end end - for spellid, habilidade in pairs (tabela2.debuff_uptime_spells._ActorTable) do + for spellid, habilidade in pairs(tabela2.debuff_uptime_spells._ActorTable) do local habilidade_tabela1 = tabela1.debuff_uptime_spells:PegaHabilidade (spellid, true, nil, false) - for target_name, amount in pairs (habilidade.targets) do + for target_name, amount in pairs(habilidade.targets) do habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) + amount end @@ -2996,14 +2996,14 @@ atributo_misc.__add = function(tabela1, tabela2) tabela1.cooldowns_defensive = tabela1.cooldowns_defensive + tabela2.cooldowns_defensive - for target_name, amount in pairs (tabela2.cooldowns_defensive_targets) do + for target_name, amount in pairs(tabela2.cooldowns_defensive_targets) do tabela1.cooldowns_defensive_targets [target_name] = (tabela1.cooldowns_defensive_targets [target_name] or 0) + amount end - for spellid, habilidade in pairs (tabela2.cooldowns_defensive_spells._ActorTable) do + for spellid, habilidade in pairs(tabela2.cooldowns_defensive_spells._ActorTable) do local habilidade_tabela1 = tabela1.cooldowns_defensive_spells:PegaHabilidade (spellid, true, nil, false) - for target_name, amount in pairs (habilidade.targets) do + for target_name, amount in pairs(habilidade.targets) do habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) + amount end @@ -3020,14 +3020,14 @@ atributo_misc.__add = function(tabela1, tabela2) tabela1.ress = tabela1.ress + tabela2.ress - for target_name, amount in pairs (tabela2.ress_targets) do + for target_name, amount in pairs(tabela2.ress_targets) do tabela1.ress_targets [target_name] = (tabela1.ress_targets [target_name] or 0) + amount end - for spellid, habilidade in pairs (tabela2.ress_spells._ActorTable) do + for spellid, habilidade in pairs(tabela2.ress_spells._ActorTable) do local habilidade_tabela1 = tabela1.ress_spells:PegaHabilidade (spellid, true, nil, false) - for target_name, amount in pairs (habilidade.targets) do + for target_name, amount in pairs(habilidade.targets) do habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) + amount end @@ -3046,27 +3046,27 @@ atributo_misc.__add = function(tabela1, tabela2) tabela1.dispell = tabela1.dispell + tabela2.dispell - for target_name, amount in pairs (tabela2.dispell_targets) do + for target_name, amount in pairs(tabela2.dispell_targets) do tabela1.dispell_targets [target_name] = (tabela1.dispell_targets [target_name] or 0) + amount end - for spellid, habilidade in pairs (tabela2.dispell_spells._ActorTable) do + for spellid, habilidade in pairs(tabela2.dispell_spells._ActorTable) do local habilidade_tabela1 = tabela1.dispell_spells:PegaHabilidade (spellid, true, nil, false) habilidade_tabela1.dispell_oque = habilidade_tabela1.dispell_oque or {} - for _spellid, amount in pairs (habilidade.dispell_oque) do + for _spellid, amount in pairs(habilidade.dispell_oque) do habilidade_tabela1.dispell_oque [_spellid] = (habilidade_tabela1.dispell_oque [_spellid] or 0) + amount end - for target_name, amount in pairs (habilidade.targets) do + for target_name, amount in pairs(habilidade.targets) do habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) + amount end somar_keys (habilidade, habilidade_tabela1) end - for spellid, amount in pairs (tabela2.dispell_oque) do + for spellid, amount in pairs(tabela2.dispell_oque) do tabela1.dispell_oque [spellid] = (tabela1.dispell_oque [spellid] or 0) + amount end @@ -3083,26 +3083,26 @@ atributo_misc.__add = function(tabela1, tabela2) tabela1.cc_break = tabela1.cc_break + tabela2.cc_break - for target_name, amount in pairs (tabela2.cc_break_targets) do + for target_name, amount in pairs(tabela2.cc_break_targets) do tabela1.cc_break_targets [target_name] = (tabela1.cc_break_targets [target_name] or 0) + amount end - for spellid, habilidade in pairs (tabela2.cc_break_spells._ActorTable) do + for spellid, habilidade in pairs(tabela2.cc_break_spells._ActorTable) do local habilidade_tabela1 = tabela1.cc_break_spells:PegaHabilidade (spellid, true, nil, false) habilidade_tabela1.cc_break_oque = habilidade_tabela1.cc_break_oque or {} - for _spellid, amount in pairs (habilidade.cc_break_oque) do + for _spellid, amount in pairs(habilidade.cc_break_oque) do habilidade_tabela1.cc_break_oque [_spellid] = (habilidade_tabela1.cc_break_oque [_spellid] or 0) + amount end - for target_name, amount in pairs (habilidade.targets) do + for target_name, amount in pairs(habilidade.targets) do habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) + amount end somar_keys (habilidade, habilidade_tabela1) end - for spellid, amount in pairs (tabela2.cc_break_oque) do + for spellid, amount in pairs(tabela2.cc_break_oque) do tabela1.cc_break_oque [spellid] = (tabela1.cc_break_oque [spellid] or 0) + amount end end @@ -3111,7 +3111,7 @@ atributo_misc.__add = function(tabela1, tabela2) end local subtrair_keys = function(habilidade, habilidade_tabela1) - for key, value in pairs (habilidade) do + for key, value in pairs(habilidade) do if (_type(value) == "number") then if (key ~= "id" and key ~= "spellschool") then habilidade_tabela1 [key] = (habilidade_tabela1 [key] or 0) - value @@ -3123,7 +3123,7 @@ end atributo_misc.__sub = function(tabela1, tabela2) if (tabela2.spell_cast) then - for spellid, amount in pairs (tabela2.spell_cast) do + for spellid, amount in pairs(tabela2.spell_cast) do tabela1.spell_cast [spellid] = (tabela1.spell_cast [spellid] or 0) - amount end end @@ -3131,14 +3131,14 @@ atributo_misc.__sub = function(tabela1, tabela2) if (tabela2.cc_done) then tabela1.cc_done = tabela1.cc_done - tabela2.cc_done - for target_name, amount in pairs (tabela2.cc_done_targets) do + for target_name, amount in pairs(tabela2.cc_done_targets) do tabela1.cc_done_targets [target_name] = (tabela1.cc_done_targets [target_name] or 0) - amount end - for spellid, habilidade in pairs (tabela2.cc_done_spells._ActorTable) do + for spellid, habilidade in pairs(tabela2.cc_done_spells._ActorTable) do local habilidade_tabela1 = tabela1.cc_done_spells:PegaHabilidade (spellid, true, nil, false) - for target_name, amount in pairs (habilidade.targets) do + for target_name, amount in pairs(habilidade.targets) do habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) - amount end @@ -3150,24 +3150,24 @@ atributo_misc.__sub = function(tabela1, tabela2) --total de interrupts tabela1.interrupt = tabela1.interrupt - tabela2.interrupt --soma o interrompeu o que - for spellid, amount in pairs (tabela2.interrompeu_oque) do + for spellid, amount in pairs(tabela2.interrompeu_oque) do tabela1.interrompeu_oque [spellid] = (tabela1.interrompeu_oque [spellid] or 0) - amount end --soma os containers de alvos - for target_name, amount in pairs (tabela2.interrupt_targets) do + for target_name, amount in pairs(tabela2.interrupt_targets) do tabela1.interrupt_targets [target_name] = (tabela1.interrupt_targets [target_name] or 0) - amount end --soma o container de habilidades - for spellid, habilidade in pairs (tabela2.interrupt_spells._ActorTable) do + for spellid, habilidade in pairs(tabela2.interrupt_spells._ActorTable) do local habilidade_tabela1 = tabela1.interrupt_spells:PegaHabilidade (spellid, true, nil, false) habilidade_tabela1.interrompeu_oque = habilidade_tabela1.interrompeu_oque or {} - for _spellid, amount in pairs (habilidade.interrompeu_oque) do + for _spellid, amount in pairs(habilidade.interrompeu_oque) do habilidade_tabela1.interrompeu_oque [_spellid] = (habilidade_tabela1.interrompeu_oque [_spellid] or 0) - amount end - for target_name, amount in pairs (habilidade.targets) do + for target_name, amount in pairs(habilidade.targets) do habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) - amount end @@ -3178,14 +3178,14 @@ atributo_misc.__sub = function(tabela1, tabela2) if (tabela2.buff_uptime) then tabela1.buff_uptime = tabela1.buff_uptime - tabela2.buff_uptime - for target_name, amount in pairs (tabela2.buff_uptime_targets) do + for target_name, amount in pairs(tabela2.buff_uptime_targets) do tabela1.buff_uptime_targets [target_name] = (tabela1.buff_uptime_targets [target_name] or 0) - amount end - for spellid, habilidade in pairs (tabela2.buff_uptime_spells._ActorTable) do + for spellid, habilidade in pairs(tabela2.buff_uptime_spells._ActorTable) do local habilidade_tabela1 = tabela1.buff_uptime_spells:PegaHabilidade (spellid, true, nil, false) - for target_name, amount in pairs (habilidade.targets) do + for target_name, amount in pairs(habilidade.targets) do habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) - amount end @@ -3196,7 +3196,7 @@ atributo_misc.__sub = function(tabela1, tabela2) if (tabela2.debuff_uptime) then tabela1.debuff_uptime = tabela1.debuff_uptime - tabela2.debuff_uptime - for target_name, amount in pairs (tabela2.debuff_uptime_targets) do + for target_name, amount in pairs(tabela2.debuff_uptime_targets) do if (_type(amount) == "table") then --boss debuff local t = tabela1.debuff_uptime_targets [target_name] if (not t) then @@ -3212,10 +3212,10 @@ atributo_misc.__sub = function(tabela1, tabela2) end end - for spellid, habilidade in pairs (tabela2.debuff_uptime_spells._ActorTable) do + for spellid, habilidade in pairs(tabela2.debuff_uptime_spells._ActorTable) do local habilidade_tabela1 = tabela1.debuff_uptime_spells:PegaHabilidade (spellid, true, nil, false) - for target_name, amount in pairs (habilidade.targets) do + for target_name, amount in pairs(habilidade.targets) do habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) - amount end @@ -3226,14 +3226,14 @@ atributo_misc.__sub = function(tabela1, tabela2) if (tabela2.cooldowns_defensive) then tabela1.cooldowns_defensive = tabela1.cooldowns_defensive - tabela2.cooldowns_defensive - for target_name, amount in pairs (tabela2.cooldowns_defensive_targets) do + for target_name, amount in pairs(tabela2.cooldowns_defensive_targets) do tabela1.cooldowns_defensive_targets [target_name] = (tabela1.cooldowns_defensive_targets [target_name] or 0) - amount end - for spellid, habilidade in pairs (tabela2.cooldowns_defensive_spells._ActorTable) do + for spellid, habilidade in pairs(tabela2.cooldowns_defensive_spells._ActorTable) do local habilidade_tabela1 = tabela1.cooldowns_defensive_spells:PegaHabilidade (spellid, true, nil, false) - for target_name, amount in pairs (habilidade.targets) do + for target_name, amount in pairs(habilidade.targets) do habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) - amount end @@ -3244,14 +3244,14 @@ atributo_misc.__sub = function(tabela1, tabela2) if (tabela2.ress) then tabela1.ress = tabela1.ress - tabela2.ress - for target_name, amount in pairs (tabela2.ress_targets) do + for target_name, amount in pairs(tabela2.ress_targets) do tabela1.ress_targets [target_name] = (tabela1.ress_targets [target_name] or 0) - amount end - for spellid, habilidade in pairs (tabela2.ress_spells._ActorTable) do + for spellid, habilidade in pairs(tabela2.ress_spells._ActorTable) do local habilidade_tabela1 = tabela1.ress_spells:PegaHabilidade (spellid, true, nil, false) - for target_name, amount in pairs (habilidade.targets) do + for target_name, amount in pairs(habilidade.targets) do habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) - amount end @@ -3262,27 +3262,27 @@ atributo_misc.__sub = function(tabela1, tabela2) if (tabela2.dispell) then tabela1.dispell = tabela1.dispell - tabela2.dispell - for target_name, amount in pairs (tabela2.dispell_targets) do + for target_name, amount in pairs(tabela2.dispell_targets) do tabela1.dispell_targets [target_name] = (tabela1.dispell_targets [target_name] or 0) - amount end - for spellid, habilidade in pairs (tabela2.dispell_spells._ActorTable) do + for spellid, habilidade in pairs(tabela2.dispell_spells._ActorTable) do local habilidade_tabela1 = tabela1.dispell_spells:PegaHabilidade (spellid, true, nil, false) habilidade_tabela1.dispell_oque = habilidade_tabela1.dispell_oque or {} - for _spellid, amount in pairs (habilidade.dispell_oque) do + for _spellid, amount in pairs(habilidade.dispell_oque) do habilidade_tabela1.dispell_oque [_spellid] = (habilidade_tabela1.dispell_oque [_spellid] or 0) - amount end - for target_name, amount in pairs (habilidade.targets) do + for target_name, amount in pairs(habilidade.targets) do habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) - amount end subtrair_keys (habilidade, habilidade_tabela1) end - for spellid, amount in pairs (tabela2.dispell_oque) do + for spellid, amount in pairs(tabela2.dispell_oque) do tabela1.dispell_oque [spellid] = (tabela1.dispell_oque [spellid] or 0) - amount end end @@ -3291,26 +3291,26 @@ atributo_misc.__sub = function(tabela1, tabela2) tabela1.cc_break = tabela1.cc_break - tabela2.cc_break - for target_name, amount in pairs (tabela2.cc_break_targets) do + for target_name, amount in pairs(tabela2.cc_break_targets) do tabela1.cc_break_targets [target_name] = (tabela1.cc_break_targets [target_name] or 0) - amount end - for spellid, habilidade in pairs (tabela2.cc_break_spells._ActorTable) do + for spellid, habilidade in pairs(tabela2.cc_break_spells._ActorTable) do local habilidade_tabela1 = tabela1.cc_break_spells:PegaHabilidade (spellid, true, nil, false) habilidade_tabela1.cc_break_oque = habilidade_tabela1.cc_break_oque or {} - for _spellid, amount in pairs (habilidade.cc_break_oque) do + for _spellid, amount in pairs(habilidade.cc_break_oque) do habilidade_tabela1.cc_break_oque [_spellid] = (habilidade_tabela1.cc_break_oque [_spellid] or 0) - amount end - for target_name, amount in pairs (habilidade.targets) do + for target_name, amount in pairs(habilidade.targets) do habilidade_tabela1.targets [target_name] = (habilidade_tabela1.targets [target_name] or 0) - amount end subtrair_keys (habilidade, habilidade_tabela1) end - for spellid, amount in pairs (tabela2.cc_break_oque) do + for spellid, amount in pairs(tabela2.cc_break_oque) do tabela1.cc_break_oque [spellid] = (tabela1.cc_break_oque [spellid] or 0) - amount end end diff --git a/classes/container_actors.lua b/classes/container_actors.lua index ed8528f84..b7adb6605 100644 --- a/classes/container_actors.lua +++ b/classes/container_actors.lua @@ -474,7 +474,7 @@ return end - pet_tooltip_frame:SetOwner (WorldFrame, "ANCHOR_NONE") + pet_tooltip_frame:SetOwner(WorldFrame, "ANCHOR_NONE") pet_tooltip_frame:SetHyperlink ("unit:" .. serial or "") Details.tabela_vigente.raid_roster_indexed = Details.tabela_vigente.raid_roster_indexed or {} diff --git a/classes/container_segments.lua b/classes/container_segments.lua index 5bf4a86a0..d04d1cd46 100644 --- a/classes/container_segments.lua +++ b/classes/container_segments.lua @@ -93,7 +93,7 @@ function historico:adicionar_overall (tabela) local combatTime = tabela:GetCombatTime() local combatType = tabela:GetCombatType() - tinsert (_detalhes.tabela_overall.segments_added, 1, {name = combatName, elapsed = combatTime, clock = this_clock, type = combatType}) + tinsert(_detalhes.tabela_overall.segments_added, 1, {name = combatName, elapsed = combatTime, clock = this_clock, type = combatType}) if (#_detalhes.tabela_overall.segments_added > 40) then tremove (_detalhes.tabela_overall.segments_added, 41) @@ -142,7 +142,7 @@ function _detalhes:ScheduleAddCombatToOverall (combat) --deprecated (15/03/2019) local canAdd = _detalhes:CanAddCombatToOverall (combat) if (canAdd) then _detalhes.schedule_add_to_overall = _detalhes.schedule_add_to_overall or {} - tinsert (_detalhes.schedule_add_to_overall, combat) + tinsert(_detalhes.schedule_add_to_overall, combat) end end diff --git a/classes/container_spells.lua b/classes/container_spells.lua index 5fb9643be..fd2b1dc0f 100644 --- a/classes/container_spells.lua +++ b/classes/container_spells.lua @@ -56,7 +56,7 @@ local _ end function container_habilidades:ListActors() - return pairs (self._ActorTable) + return pairs(self._ActorTable) end function container_habilidades:GetOrCreateSpell(id, shouldCreate, token) diff --git a/classes/include_instance.lua b/classes/include_instance.lua index 6de2dcbaa..09fd06d88 100644 --- a/classes/include_instance.lua +++ b/classes/include_instance.lua @@ -11,7 +11,7 @@ local _detalhes = _G._detalhes local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0") function _detalhes:ResetInstanceConfig (maintainsnap) - for key, value in pairs (_detalhes.instance_defaults) do + for key, value in pairs(_detalhes.instance_defaults) do if (type(value) == "table") then self [key] = Details.CopyTable (value) else @@ -57,7 +57,7 @@ _detalhes.instance_skin_ignored_values = { } function _detalhes:ResetInstanceConfigKeepingValues (maintainsnap) - for key, value in pairs (_detalhes.instance_defaults) do + for key, value in pairs(_detalhes.instance_defaults) do if (not _detalhes.instance_skin_ignored_values [key]) then if (type(value) == "table") then self [key] = Details.CopyTable (value) @@ -75,7 +75,7 @@ function _detalhes:ResetInstanceConfigKeepingValues (maintainsnap) end function _detalhes:LoadInstanceConfig() - for key, value in pairs (_detalhes.instance_defaults) do + for key, value in pairs(_detalhes.instance_defaults) do if (self [key] == nil) then if (type(value) == "table") then self [key] = Details.CopyTable (_detalhes.instance_defaults [key]) @@ -84,7 +84,7 @@ function _detalhes:LoadInstanceConfig() end elseif (type(value) == "table") then - for key2, value2 in pairs (value) do + for key2, value2 in pairs(value) do if (self [key] [key2] == nil) then if (type(value2) == "table") then self [key] [key2] = Details.CopyTable (_detalhes.instance_defaults [key] [key2]) diff --git a/core/control.lua b/core/control.lua index 6bfdde801..aba9094cb 100644 --- a/core/control.lua +++ b/core/control.lua @@ -65,7 +65,7 @@ for _, actor in ipairs(Details.tabela_vigente[class_type_dano]._ActorTable) do if (not actor.grupo and not actor.owner and not actor.nome:find ("[*]") and _bit_band (actor.flag_original, 0x00000060) ~= 0) then --0x20+0x40 neutral + enemy reaction - for name, _ in pairs (actor.targets) do + for name, _ in pairs(actor.targets) do if (name == Details.playername) then return actor.nome else @@ -82,7 +82,7 @@ for _, actor in ipairs(Details.tabela_vigente[class_type_dano]._ActorTable) do if (actor.grupo and not actor.owner) then - for target_name, _ in pairs (actor.targets) do + for target_name, _ in pairs(actor.targets) do return target_name end end @@ -438,7 +438,7 @@ function Details:DelayedSyncAlert() local lower_instance = Details:GetLowerInstanceNumber() if (lower_instance) then - lower_instance = Details:GetInstance (lower_instance) + lower_instance = Details:GetInstance(lower_instance) if (lower_instance) then if (not lower_instance:HaveInstanceAlert()) then lower_instance:InstanceAlert (Loc ["STRING_EQUILIZING"], {[[Interface\COMMON\StreamCircle]], 22, 22, true}, 5, {function() end}) @@ -472,7 +472,7 @@ Details.last_closed_combat = Details.tabela_vigente --if (Details.statistics) then - -- for k, v in pairs (Details.statistics) do + -- for k, v in pairs(Details.statistics) do -- print (k, v) -- end --end @@ -784,13 +784,13 @@ if (Details.tabela_vigente.is_boss.killed) then cleuIDData.kills = cleuIDData.kills + 1 cleuIDData.best_try = 0 - tinsert (cleuIDData.try_history, {0, Details.tabela_vigente:GetCombatTime()}) + tinsert(cleuIDData.try_history, {0, Details.tabela_vigente:GetCombatTime()}) --print ("KILL", "best try", cleuIDData.best_try, "amt kills", cleuIDData.kills, "wipes", cleuIDData.wipes, "longest", cleuIDData.longest) else cleuIDData.wipes = cleuIDData.wipes + 1 if (Details.boss1_health_percent and Details.boss1_health_percent < cleuIDData.best_try) then cleuIDData.best_try = Details.boss1_health_percent - tinsert (cleuIDData.try_history, {Details.boss1_health_percent, Details.tabela_vigente:GetCombatTime()}) + tinsert(cleuIDData.try_history, {Details.boss1_health_percent, Details.tabela_vigente:GetCombatTime()}) end --print ("WIPE", "best try", cleuIDData.best_try, "amt kills", cleuIDData.kills, "wipes", cleuIDData.wipes, "longest", cleuIDData.longest) end @@ -811,11 +811,11 @@ invalid_combat = Details.tabela_vigente --tutorial about the combat time < then 'minimum_combat_time' - local hasSeenTutorial = Details:GetTutorialCVar ("MIN_COMBAT_TIME") + local hasSeenTutorial = Details:GetTutorialCVar("MIN_COMBAT_TIME") if (not hasSeenTutorial) then local lower_instance = Details:GetLowerInstanceNumber() if (lower_instance) then - lower_instance = Details:GetInstance (lower_instance) + lower_instance = Details:GetInstance(lower_instance) if (lower_instance) then lower_instance:InstanceAlert ("combat ignored: less than 5 seconds.", {[[Interface\BUTTONS\UI-GROUPLOOT-PASS-DOWN]], 18, 18, false, 0, 1, 0, 1}, 20, {function() Details:Msg("combat ignored: elapsed time less than 5 seconds."); Details:Msg("add '|cFFFFFF00Details.minimum_combat_time = 2;|r' on Auto Run Code to change the minimum time.") end}) Details:SetTutorialCVar ("MIN_COMBAT_TIME", true) @@ -1108,7 +1108,7 @@ end if (playerSpecID and playerClass) then - for spellID, t in pairs (validSpells) do + for spellID, t in pairs(validSpells) do if (playerClass == t.class and playerSpecID == t.spec) then Details:SendMissData (spellID, t.container, Details.network.ids [t.commID]) end @@ -1438,7 +1438,7 @@ if (actor.grupo) then if (class_type == 1 or class_type == 2) then - for target_name, amount in pairs (actor.targets) do + for target_name, amount in pairs(actor.targets) do local target_object = container._ActorTable [container._NameIndexTable [target_name]] if (target_object) then target_object.fight_component = true @@ -1446,7 +1446,7 @@ end end if (class_type == 1) then - for damager_actor, _ in pairs (actor.damage_from) do + for damager_actor, _ in pairs(actor.damage_from) do local target_object = container._ActorTable [container._NameIndexTable [damager_actor]] if (target_object) then target_object.fight_component = true @@ -1454,7 +1454,7 @@ end end elseif (class_type == 2) then - for healer_actor, _ in pairs (actor.healing_from) do + for healer_actor, _ in pairs(actor.healing_from) do local target_object = container._ActorTable [container._NameIndexTable [healer_actor]] if (target_object) then target_object.fight_component = true @@ -1472,11 +1472,11 @@ function Details:AtualizarJanela (instancia, _segmento) if (_segmento) then --apenas atualizar janelas que estejam mostrando o segmento solicitado if (_segmento == instancia.segmento) then - instancia:TrocaTabela (instancia, instancia.segmento, instancia.atributo, instancia.sub_atributo, true) + instancia:TrocaTabela(instancia, instancia.segmento, instancia.atributo, instancia.sub_atributo, true) end else if (instancia.modo == modo_GROUP or instancia.modo == modo_ALL) then - instancia:TrocaTabela (instancia, instancia.segmento, instancia.atributo, instancia.sub_atributo, true) + instancia:TrocaTabela(instancia, instancia.segmento, instancia.atributo, instancia.sub_atributo, true) end end end @@ -1748,7 +1748,7 @@ if (instancia.rows_showing == 0 and instancia:GetSegment() == -1) then -- -1 overall data if (not instancia:IsShowingOverallDataWarning()) then - local tutorial = Details:GetTutorialCVar ("OVERALLDATA_WARNING1") or 0 + local tutorial = Details:GetTutorialCVar("OVERALLDATA_WARNING1") or 0 if ((type(tutorial) == "number") and (tutorial < 60)) then Details:SetTutorialCVar ("OVERALLDATA_WARNING1", tutorial + 1) instancia:ShowOverallDataWarning (true) diff --git a/core/gears.lua b/core/gears.lua index 77d7fb5dd..f5481806a 100644 --- a/core/gears.lua +++ b/core/gears.lua @@ -84,7 +84,7 @@ end if (is_enabled) then --was disabled, so we need to save the current window positions. if (not current_enabled_state) then - local window1 = _detalhes:GetInstance (1) + local window1 = _detalhes:GetInstance(1) if (window1) then window1:SaveMainWindowPosition() if (window1.libwindow) then @@ -92,7 +92,7 @@ end _detalhes.chat_tab_embed.w1_pos = pos end end - local window2 = _detalhes:GetInstance (2) + local window2 = _detalhes:GetInstance(2) if (window2) then window2:SaveMainWindowPosition() if (window2.libwindow) then @@ -150,7 +150,7 @@ end end if (ChatFrame) then - for index, t in pairs (ChatFrame.messageTypeList) do + for index, t in pairs(ChatFrame.messageTypeList) do ChatFrame_RemoveMessageGroup (ChatFrame, t) ChatFrame.messageTypeList [index] = nil end @@ -159,7 +159,7 @@ end if (_detalhes.chat_tab_embed.single_window) then --only one window - local window1 = _detalhes:GetInstance (1) + local window1 = _detalhes:GetInstance(1) window1:UngroupInstance() window1.baseframe:ClearAllPoints() @@ -183,7 +183,7 @@ end window1:LockInstance (true) window1:SaveMainWindowPosition() - local window2 = _detalhes:GetInstance (2) + local window2 = _detalhes:GetInstance(2) if (window2 and window2.baseframe) then if (window2.baseframe:GetParent() == ChatFrame) then --need to detach @@ -193,8 +193,8 @@ end else --window #1 and #2 - local window1 = _detalhes:GetInstance (1) - local window2 = _detalhes:GetInstance (2) + local window1 = _detalhes:GetInstance(1) + local window2 = _detalhes:GetInstance(2) if (not window2) then window2 = _detalhes:CriarInstancia() end @@ -249,8 +249,8 @@ end function _detalhes.chat_embed:ReleaseEmbed (second_window) --release - local window1 = _detalhes:GetInstance (1) - local window2 = _detalhes:GetInstance (2) + local window1 = _detalhes:GetInstance(1) + local window2 = _detalhes:GetInstance(2) if (second_window) then window2.baseframe:ClearAllPoints() @@ -336,7 +336,7 @@ function _detalhes:SetDeathLogLimit (limit) local combat = _detalhes.tabela_vigente local wipe = table.wipe - for player_name, event_table in pairs (combat.player_last_events) do + for player_name, event_table in pairs(combat.player_last_events) do if (limit > #event_table) then for i = #event_table + 1, limit do event_table [i] = {} @@ -362,7 +362,7 @@ function _detalhes:TrackSpecsNow (track_everything) if (not track_everything) then for _, actor in _detalhes.tabela_vigente[1]:ListActors() do if (actor:IsPlayer()) then - for spellid, spell in pairs (actor:GetSpellList()) do + for spellid, spell in pairs(actor:GetSpellList()) do if (spelllist [spell.id]) then actor.spec = spelllist [spell.id] _detalhes.cached_specs [actor.serial] = actor.spec @@ -374,7 +374,7 @@ function _detalhes:TrackSpecsNow (track_everything) for _, actor in _detalhes.tabela_vigente[2]:ListActors() do if (actor:IsPlayer()) then - for spellid, spell in pairs (actor:GetSpellList()) do + for spellid, spell in pairs(actor:GetSpellList()) do if (spelllist [spell.id]) then actor.spec = spelllist [spell.id] _detalhes.cached_specs [actor.serial] = actor.spec @@ -386,15 +386,15 @@ function _detalhes:TrackSpecsNow (track_everything) else local combatlist = {} for _, combat in ipairs(_detalhes.tabela_historico.tabelas) do - tinsert (combatlist, combat) + tinsert(combatlist, combat) end - tinsert (combatlist, _detalhes.tabela_vigente) - tinsert (combatlist, _detalhes.tabela_overall) + tinsert(combatlist, _detalhes.tabela_vigente) + tinsert(combatlist, _detalhes.tabela_overall) for _, combat in ipairs(combatlist) do for _, actor in combat[1]:ListActors() do if (actor:IsPlayer()) then - for spellid, spell in pairs (actor:GetSpellList()) do + for spellid, spell in pairs(actor:GetSpellList()) do if (spelllist [spell.id]) then actor.spec = spelllist [spell.id] _detalhes.cached_specs [actor.serial] = actor.spec @@ -406,7 +406,7 @@ function _detalhes:TrackSpecsNow (track_everything) for _, actor in combat[2]:ListActors() do if (actor:IsPlayer()) then - for spellid, spell in pairs (actor:GetSpellList()) do + for spellid, spell in pairs(actor:GetSpellList()) do if (spelllist [spell.id]) then actor.spec = spelllist [spell.id] _detalhes.cached_specs [actor.serial] = actor.spec @@ -672,7 +672,7 @@ function _detalhes:DoBackgroundTasks() local t = time() - for taskName, taskTable in pairs (background_tasks) do + for taskName, taskTable in pairs(background_tasks) do if (t > taskTable.nextexec) then if (type(taskTable.func) == "string") then taskTable.object [taskTable.func] (taskTable.object, unpack (taskTable.args, 1, taskTable.args_amt)) @@ -790,7 +790,7 @@ function _detalhes.storage:GetBestFromGuild (diff, encounter_id, role, dps, guil if (encounter.guild == guild_name) then local players = encounter [role] if (players) then - for playername, t in pairs (players) do + for playername, t in pairs(players) do if (dps) then if (t[1]/encounter.elapsed > bestdps) then bestdps = t[1]/encounter.elapsed @@ -855,7 +855,7 @@ function _detalhes.storage:GetPlayerGuildRank (diff, encounter_id, role, playern for index, encounter in ipairs(encounters) do if (encounter.guild == guild_name) then local roleTable = encounter [role] - for playerName, playerTable in pairs (roleTable) do + for playerName, playerTable in pairs(roleTable) do if (not playerScore [playerName]) then playerScore [playerName] = {0, 0, {}} @@ -888,9 +888,9 @@ function _detalhes.storage:GetPlayerGuildRank (diff, encounter_id, role, playern end local t = {} - for playerName, playerTable in pairs (playerScore) do + for playerName, playerTable in pairs(playerScore) do playerTable [5] = playerName - tinsert (t, playerTable) + tinsert(t, playerTable) end table.sort (t, dps and _detalhes.Sort2 or _detalhes.Sort1) @@ -986,9 +986,9 @@ local have_encounter = function(db, ID) local minTime = ID - 120 local maxTime = ID + 120 - for diff, diffTable in pairs (db or {}) do + for diff, diffTable in pairs(db or {}) do if (type(diffTable) == "table") then - for encounterID, encounterTable in pairs (diffTable) do + for encounterID, encounterTable in pairs(diffTable) do for index, encounter in ipairs(encounterTable) do --check if the encounter fits in the timespam window if (encounter.time >= minTime and encounter.time <= maxTime) then @@ -1010,7 +1010,7 @@ local have_recent_requested_encounter = function(ID) local minTime = ID - 120 local maxTime = ID + 120 - for requestedID, _ in pairs (_detalhes.RecentRequestedIDs) do + for requestedID, _ in pairs(_detalhes.RecentRequestedIDs) do if (requestedID >= minTime and requestedID <= maxTime) then return true end @@ -1029,14 +1029,14 @@ function _detalhes.storage:GetIDsToGuildSync() local myGuildName = GetGuildInfo("player") --build the encounter ID list - for diff, diffTable in pairs (db or {}) do + for diff, diffTable in pairs(db or {}) do if (type(diffTable) == "table") then - for encounterID, encounterTable in pairs (diffTable) do + for encounterID, encounterTable in pairs(diffTable) do if (encounter_is_current_tier (encounterID)) then for index, encounter in ipairs(encounterTable) do if (encounter.servertime) then if (myGuildName == encounter.guild) then - tinsert (IDs, encounter.servertime) + tinsert(IDs, encounter.servertime) end end end @@ -1078,7 +1078,7 @@ function _detalhes.storage:CheckMissingIDsToGuildSync (IDsList) for index, ID in ipairs(IDsList) do if (not have_encounter (db, ID)) then if (not have_recent_requested_encounter (ID)) then - tinsert (RequestIDs, ID) + tinsert(RequestIDs, ID) _detalhes.RecentRequestedIDs [ID] = true end end @@ -1108,7 +1108,7 @@ function _detalhes.storage:BuildEncounterDataToGuildSync (IDsList) local EncounterList = {} local CurrentTable = {} - tinsert (EncounterList, CurrentTable) + tinsert(EncounterList, CurrentTable) local AmtToSend = 0 local MaxAmount = 0 @@ -1119,9 +1119,9 @@ function _detalhes.storage:BuildEncounterDataToGuildSync (IDsList) for index, ID in ipairs(IDsList) do - for diff, diffTable in pairs (db or {}) do + for diff, diffTable in pairs(db or {}) do if (type(diffTable) == "table") then - for encounterID, encounterTable in pairs (diffTable) do + for encounterID, encounterTable in pairs(diffTable) do for index, encounter in ipairs(encounterTable) do if (ID == encounter.time or ID == encounter.servertime) then --the time here is always exactly @@ -1129,14 +1129,14 @@ function _detalhes.storage:BuildEncounterDataToGuildSync (IDsList) CurrentTable [diff] = CurrentTable [diff] or {} CurrentTable [diff] [encounterID] = CurrentTable [diff] [encounterID] or {} - tinsert (CurrentTable [diff] [encounterID], encounter) + tinsert(CurrentTable [diff] [encounterID], encounter) AmtToSend = AmtToSend + 1 MaxAmount = MaxAmount + 1 if (MaxAmount == 3) then CurrentTable = {} - tinsert (EncounterList, CurrentTable) + tinsert(EncounterList, CurrentTable) MaxAmount = 0 end end @@ -1166,9 +1166,9 @@ function _detalhes.storage:AddGuildSyncData (data, source) local AddedAmount = 0 _detalhes.LastGuildSyncReceived = GetTime() - for diff, diffTable in pairs (data) do + for diff, diffTable in pairs(data) do if (type(diff) == "number" and type (diffTable) == "table") then - for encounterID, encounterTable in pairs (diffTable) do + for encounterID, encounterTable in pairs(diffTable) do if (type(encounterID) == "number" and type (encounterTable) == "table") then for index, encounter in ipairs(encounterTable) do --validate the encounter @@ -1180,7 +1180,7 @@ function _detalhes.storage:AddGuildSyncData (data, source) db [diff] = db [diff] or {} db [diff] [encounterID] = db [diff] [encounterID] or {} - tinsert (db [diff] [encounterID], encounter) + tinsert(db [diff] [encounterID], encounter) if (_G.DetailsRaidHistoryWindow and _G.DetailsRaidHistoryWindow:IsShown()) then _G.DetailsRaidHistoryWindow:Refresh() @@ -1226,8 +1226,8 @@ function _detalhes.storage:ListDiffs() end local t = {} - for diff, _ in pairs (db) do - tinsert (t, diff) + for diff, _ in pairs(db) do + tinsert(t, diff) end return t end @@ -1243,14 +1243,14 @@ function _detalhes.storage:ListEncounters (diff) if (diff) then local table = db [diff] if (table) then - for encounter_id, _ in pairs (table) do - tinsert (t, {diff, encounter_id}) + for encounter_id, _ in pairs(table) do + tinsert(t, {diff, encounter_id}) end end else - for diff, table in pairs (db) do - for encounter_id, _ in pairs (table) do - tinsert (t, {diff, encounter_id}) + for diff, table in pairs(db) do + for encounter_id, _ in pairs(table) do + tinsert(t, {diff, encounter_id}) end end end @@ -1270,7 +1270,7 @@ function _detalhes.storage:GetPlayerData (diff, encounter_id, playername) if (not diff) then - for diff, table in pairs (db) do + for diff, table in pairs(db) do if (encounter_id) then local encounters = table [encounter_id] if (encounters) then @@ -1278,17 +1278,17 @@ function _detalhes.storage:GetPlayerData (diff, encounter_id, playername) local encounter = encounters [i] local player = encounter.healing [playername] or encounter.damage [playername] if (player) then - tinsert (t, player) + tinsert(t, player) end end end else - for encounter_id, encounters in pairs (table) do + for encounter_id, encounters in pairs(table) do for i = 1, #encounters do local encounter = encounters [i] local player = encounter.healing [playername] or encounter.damage [playername] if (player) then - tinsert (t, player) + tinsert(t, player) end end end @@ -1304,17 +1304,17 @@ function _detalhes.storage:GetPlayerData (diff, encounter_id, playername) local encounter = encounters [i] local player = encounter.healing [playername] or encounter.damage [playername] if (player) then - tinsert (t, player) + tinsert(t, player) end end end else - for encounter_id, encounters in pairs (table) do + for encounter_id, encounters in pairs(table) do for i = 1, #encounters do local encounter = encounters [i] local player = encounter.healing [playername] or encounter.damage [playername] if (player) then - tinsert (t, player) + tinsert(t, player) end end end @@ -1350,10 +1350,10 @@ function _detalhes.storage:GetEncounterData (diff, encounter_id, guild) if (guild) then if (encounter.guild == guild) then - tinsert (t, encounter) + tinsert(t, encounter) end else - tinsert (t, encounter) + tinsert(t, encounter) end end @@ -1748,7 +1748,7 @@ function Details.Database.StoreEncounter(combat) end --add the encounter data - tinsert (encounter_database, this_combat_data) + tinsert(encounter_database, this_combat_data) if (_detalhes.debug) then print ("|cFFFFFF00Details! Storage|r: combat data added to encounter database.") end @@ -1780,7 +1780,7 @@ function Details.Database.StoreEncounter(combat) local lower_instance = _detalhes:GetLowerInstanceNumber() if (lower_instance) then - local instance = _detalhes:GetInstance (lower_instance) + local instance = _detalhes:GetInstance(lower_instance) if (instance) then local my_role = UnitGroupRolesAssigned ("player") if (my_role == "TANK") then @@ -1962,7 +1962,7 @@ function ilvl_core:CalcItemLevel (unitid, guid, shout) --need to review this in classic local talentID, name, texture, selected, available = GetTalentInfo (i, o, 1, true, unitid) if (selected) then - tinsert (talents, talentID) + tinsert(talents, talentID) break end end @@ -2093,7 +2093,7 @@ function ilvl_core:Reset() ilvl_core.raid_id = 1 ilvl_core.amt_inspecting = 0 - for guid, t in pairs (inspecting) do + for guid, t in pairs(inspecting) do ilvl_core:CancelTimer (t[2]) inspecting [guid] = nil end @@ -2418,7 +2418,7 @@ if (DetailsFramework.IsWotLKWow()) then --tab information local name, iconTexture, pointsSpent, fileName = GetTalentTabInfo (i) if (name) then - tinsert (pointsPerSpec, {name, pointsSpent, fileName}) + tinsert(pointsPerSpec, {name, pointsSpent, fileName}) end --talents information @@ -2431,7 +2431,7 @@ if (DetailsFramework.IsWotLKWow()) then if (name and rank and type (rank) == "number") then --send the specID instead of the specName local specID = Details.textureToSpec [fileName] - tinsert (talentsSelected, {iconTexture, rank, tier, column, i, specID, maxRank}) + tinsert(talentsSelected, {iconTexture, rank, tier, column, i, specID, maxRank}) end end end diff --git a/core/meta.lua b/core/meta.lua index 45e856373..80ba51e7a 100644 --- a/core/meta.lua +++ b/core/meta.lua @@ -181,7 +181,7 @@ combate_overall.segments_added =combate_overall.segments_added or {} local date_start, date_end = combate:GetDate() - tinsert (combate_overall.segments_added, {name = combate:GetCombatName (true), elapsed = combate:GetCombatTime(), clock = date_start}) + tinsert(combate_overall.segments_added, {name = combate:GetCombatName (true), elapsed = combate:GetCombatTime(), clock = date_start}) end @@ -385,7 +385,7 @@ local combats = _detalhes.tabela_historico.tabelas or {} local overall_added if (not _detalhes.overall_clear_logout) then - tinsert (combats, _detalhes.tabela_overall) + tinsert(combats, _detalhes.tabela_overall) overall_added = true end @@ -406,7 +406,7 @@ local combats = _detalhes.tabela_historico.tabelas or {} local overall_added if (not _detalhes.overall_clear_logout) then - tinsert (combats, _detalhes.tabela_overall) + tinsert(combats, _detalhes.tabela_overall) overall_added = true end @@ -440,7 +440,7 @@ local combats = _detalhes.tabela_historico.tabelas or {} local overall_added if (not _detalhes.overall_clear_logout) then - tinsert (combats, _detalhes.tabela_overall) + tinsert(combats, _detalhes.tabela_overall) overall_added = true end @@ -460,7 +460,7 @@ local combats = _detalhes.tabela_historico.tabelas or {} local overall_added if (not _detalhes.overall_clear_logout) then - tinsert (combats, _detalhes.tabela_overall) + tinsert(combats, _detalhes.tabela_overall) overall_added = true end diff --git a/core/parser.lua b/core/parser.lua index f0e58700c..ca4d8efb7 100755 --- a/core/parser.lua +++ b/core/parser.lua @@ -4604,7 +4604,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 if (time) then local schedule_id = math.random (1, 10000000) local new_schedule = _detalhes:ScheduleTimer ("CaptureTimeout", time, {capture_type, schedule_id}) - tinsert (_detalhes.capture_schedules, {new_schedule, schedule_id}) + tinsert(_detalhes.capture_schedules, {new_schedule, schedule_id}) end end @@ -4838,7 +4838,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 } function parser:RefreshFunctions() - for CLUE_ID, token in pairs (all_parser_tokens) do + for CLUE_ID, token in pairs(all_parser_tokens) do if (token_list [CLUE_ID]) then --not disabled token_list [CLUE_ID] = parser [token] end @@ -4887,7 +4887,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 local lower_instance = _detalhes:GetLowerInstanceNumber() if (lower_instance) then - lower_instance = _detalhes:GetInstance (lower_instance) + lower_instance = _detalhes:GetInstance(lower_instance) lower_instance:InstanceAlert (Loc ["STRING_WIPE_ALERT"], {[[Interface\CHARACTERFRAME\UI-StateIcon]], 18, 18, false, 0.5, 1, 0, 0.5}, 4) end else @@ -5873,10 +5873,10 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 --do not save window pos if (_detalhes.tabela_instancias) then currentStep = "Dealing With Instances" - tinsert (_detalhes_global.exit_log, "2 - Clearing user place from instances.") + tinsert(_detalhes_global.exit_log, "2 - Clearing user place from instances.") for id, instance in _detalhes:ListInstances() do if (id) then - tinsert (_detalhes_global.exit_log, " - " .. id .. " has baseFrame: " .. (instance.baseframe and "yes" or "no") .. ".") + tinsert(_detalhes_global.exit_log, " - " .. id .. " has baseFrame: " .. (instance.baseframe and "yes" or "no") .. ".") if (instance.baseframe) then instance.baseframe:SetUserPlaced (false) instance.baseframe:SetDontSavePosition (true) @@ -5887,36 +5887,36 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 --leave combat start save tables if (_detalhes.in_combat and _detalhes.tabela_vigente) then - tinsert (_detalhes_global.exit_log, "3 - Leaving current combat.") + tinsert(_detalhes_global.exit_log, "3 - Leaving current combat.") currentStep = "Leaving Current Combat" xpcall (_detalhes.SairDoCombate, saver_error) _detalhes.can_panic_mode = true end if (_detalhes.CheckSwitchOnLogon and _detalhes.tabela_instancias[1] and _detalhes.tabela_instancias and getmetatable (_detalhes.tabela_instancias[1])) then - tinsert (_detalhes_global.exit_log, "4 - Reversing switches.") + tinsert(_detalhes_global.exit_log, "4 - Reversing switches.") currentStep = "Check Switch on Logon" xpcall (_detalhes.CheckSwitchOnLogon, saver_error) end if (_detalhes.wipe_full_config) then - tinsert (_detalhes_global.exit_log, "5 - Is a full config wipe.") + tinsert(_detalhes_global.exit_log, "5 - Is a full config wipe.") _detalhes_global = nil _detalhes_database = nil return end --save the config - tinsert (_detalhes_global.exit_log, "6 - Saving Config.") + tinsert(_detalhes_global.exit_log, "6 - Saving Config.") currentStep = "Saving Config" xpcall (_detalhes.SaveConfig, saver_error) - tinsert (_detalhes_global.exit_log, "7 - Saving Profiles.") + tinsert(_detalhes_global.exit_log, "7 - Saving Profiles.") currentStep = "Saving Profile" xpcall (_detalhes.SaveProfile, saver_error) --save the nicktag cache - tinsert (_detalhes_global.exit_log, "8 - Saving nicktag cache.") + tinsert(_detalhes_global.exit_log, "8 - Saving nicktag cache.") local saveNicktabCache = function() _detalhes_database.nick_tag_cache = Details.CopyTable(_detalhes_database.nick_tag_cache) @@ -5951,37 +5951,37 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 function _detalhes:PrintParserCacheIndexes() local amount = 0 - for n, nn in pairs (damage_cache) do + for n, nn in pairs(damage_cache) do amount = amount + 1 end print ("parser damage_cache", amount) amount = 0 - for n, nn in pairs (damage_cache_pets) do + for n, nn in pairs(damage_cache_pets) do amount = amount + 1 end print ("parser damage_cache_pets", amount) amount = 0 - for n, nn in pairs (damage_cache_petsOwners) do + for n, nn in pairs(damage_cache_petsOwners) do amount = amount + 1 end print ("parser damage_cache_petsOwners", amount) amount = 0 - for n, nn in pairs (healing_cache) do + for n, nn in pairs(healing_cache) do amount = amount + 1 end print ("parser healing_cache", amount) amount = 0 - for n, nn in pairs (energy_cache) do + for n, nn in pairs(energy_cache) do amount = amount + 1 end print ("parser energy_cache", amount) amount = 0 - for n, nn in pairs (misc_cache) do + for n, nn in pairs(misc_cache) do amount = amount + 1 end print ("parser misc_cache", amount) diff --git a/core/plugins.lua b/core/plugins.lua index fb86d9b2b..d837781a9 100644 --- a/core/plugins.lua +++ b/core/plugins.lua @@ -52,7 +52,7 @@ local id = plugin.instance_id if (id) then - return _detalhes:GetInstance (id) + return _detalhes:GetInstance(id) end end @@ -91,7 +91,7 @@ end function _detalhes:CheckDefaultTable (current, default) - for key, value in pairs (default) do + for key, value in pairs(default) do if (type(value) == "table") then if (type(current [key]) ~= "table") then current [key] = Details.CopyTable (value) @@ -240,7 +240,7 @@ local OnEnableFunction = function(self) self.__parent.Enabled = true --self = frame __parent = plugin object - local instance = _detalhes:GetInstance (self.__parent.instance_id) + local instance = _detalhes:GetInstance(self.__parent.instance_id) if (instance) then self:SetParent(instance.baseframe) end @@ -299,7 +299,7 @@ end end) - Frame:SetFrameStrata ("HIGH") + Frame:SetFrameStrata("HIGH") Frame:SetFrameLevel (6) Frame:Hide() @@ -335,7 +335,7 @@ if (template == 2) then local options_frame = CreateFrame("frame", name, UIParent, "ButtonFrameTemplate,BackdropTemplate") - tinsert (UISpecialFrames, name) + tinsert(UISpecialFrames, name) options_frame:SetSize(500, 200) options_frame:SetScript("OnMouseDown", function(self, button) @@ -359,7 +359,7 @@ options_frame:SetMovable (true) options_frame:EnableMouse (true) - options_frame:SetFrameStrata ("DIALOG") + options_frame:SetFrameStrata("DIALOG") options_frame:SetToplevel (true) options_frame:Hide() @@ -373,7 +373,7 @@ elseif (template == 1) then local options_frame = CreateFrame("frame", name, UIParent,"BackdropTemplate") - tinsert (UISpecialFrames, name) + tinsert(UISpecialFrames, name) options_frame:SetSize(500, 200) options_frame:SetScript("OnMouseDown", function(self, button) @@ -397,7 +397,7 @@ options_frame:SetMovable (true) options_frame:EnableMouse (true) - options_frame:SetFrameStrata ("DIALOG") + options_frame:SetFrameStrata("DIALOG") options_frame:SetToplevel (true) options_frame:Hide() @@ -632,7 +632,7 @@ newButton:SetIcon (pluginObject.__icon, nil, nil, nil, pluginObject.__iconcoords, pluginObject.__iconcolor, 4) --add it to menu table - tinsert (f.MenuButtons, newButton) + tinsert(f.MenuButtons, newButton) return newButton end diff --git a/core/plugins_raid.lua b/core/plugins_raid.lua index 7503df24c..1d2afd917 100644 --- a/core/plugins_raid.lua +++ b/core/plugins_raid.lua @@ -111,7 +111,7 @@ if (from_mode_menu) then --refresh - instance.baseframe.cabecalho.modo_selecao:GetScript ("OnEnter")(instance.baseframe.cabecalho.modo_selecao, _, true) + instance.baseframe.cabecalho.modo_selecao:GetScript("OnEnter")(instance.baseframe.cabecalho.modo_selecao, _, true) end else if (not instance.wait_for_plugin) then @@ -126,7 +126,7 @@ local available = {} for index, plugin in ipairs(self.Menu) do if (not self.PluginsInUse [ plugin [4] ] and plugin [3].__enabled) then -- 3 = plugin object 4 = absolute name - tinsert (available, plugin) + tinsert(available, plugin) end end return available diff --git a/core/plugins_solo.lua b/core/plugins_solo.lua index d16d5061a..419a2a37d 100644 --- a/core/plugins_solo.lua +++ b/core/plugins_solo.lua @@ -57,11 +57,11 @@ instance:AlteraModo (instance, DETAILS_MODE_GROUP) button.close_confirmation:Hide() - instance.baseframe.cabecalho.modo_selecao:GetScript ("OnEnter")(instance.baseframe.cabecalho.modo_selecao) + instance.baseframe.cabecalho.modo_selecao:GetScript("OnEnter")(instance.baseframe.cabecalho.modo_selecao) end - local close_window = gump:NewButton (button.close_confirmation, nil, "$parentCloseWindowButton", "CloseWindowButton", 140, 20, close_func, nil, nil, nil, Loc ["STRING_MENU_CLOSE_INSTANCE"], 1, gump:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")) - local back_to_group_and_raid = gump:NewButton (button.close_confirmation, nil, "$parentBackToGroupButton", "BackToGroupButton", 140, 20, group_func, nil, nil, nil, Loc ["STRING_SWITCH_TO"] .. ": " .. Loc ["STRING_MODE_GROUP"], 2, gump:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")) + local close_window = gump:NewButton(button.close_confirmation, nil, "$parentCloseWindowButton", "CloseWindowButton", 140, 20, close_func, nil, nil, nil, Loc ["STRING_MENU_CLOSE_INSTANCE"], 1, gump:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")) + local back_to_group_and_raid = gump:NewButton(button.close_confirmation, nil, "$parentBackToGroupButton", "BackToGroupButton", 140, 20, group_func, nil, nil, nil, Loc ["STRING_SWITCH_TO"] .. ": " .. Loc ["STRING_MODE_GROUP"], 2, gump:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")) close_window:SetIcon ([[Interface\Buttons\UI-Panel-MinimizeButton-Up]], nil, nil, nil, {0.143125, 0.8653125, 0.1446875, 0.8653125}, nil, nil, 2) back_to_group_and_raid:SetIcon ([[Interface\AddOns\Details\images\modo_icones]], nil, nil, nil, {32/256, 32/256*2, 0, 1}, nil, nil, 2) @@ -94,7 +94,7 @@ end self.need_rolagem = false - self.baseframe:EnableMouseWheel (false) + self.baseframe:EnableMouseWheel(false) Details.FadeHandler.Fader(self, 1, nil, "barras") --escondendo a janela da inst�ncia [inst�ncia [force hide [velocidade [hidar o que]]]] self.mostrando = "solo" end diff --git a/core/plugins_statusbar.lua b/core/plugins_statusbar.lua index e633b67f3..056ad78a7 100644 --- a/core/plugins_statusbar.lua +++ b/core/plugins_statusbar.lua @@ -307,7 +307,7 @@ frame:SetBackdropColor(0.7, 0.7, 0.7, 0.6) GameCooltip:Reset() - GameCooltip:AddFromTable (onEnterCooltipTexts) + GameCooltip:AddFromTable(onEnterCooltipTexts) GameCooltip:SetOption("TextSize", 9) GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true) @@ -316,7 +316,7 @@ GameCooltip:SetOption("YSpacingMod", -4) GameCooltip:SetOption("FixedHeight", 46) - GameCooltip:ShowCooltip (frame, "tooltip") + GameCooltip:ShowCooltip(frame, "tooltip") return true end @@ -368,7 +368,7 @@ GameCooltip:SetOption("HeightAnchorMod", -12) GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true) - GameCooltip:ShowCooltip (frame, "menu") + GameCooltip:ShowCooltip(frame, "menu") end return true end @@ -840,8 +840,8 @@ do --ExtraOptionsOnOpen is called when options are opened and plugin have custom options --here we setup options widgets for get the values of clicked child and also for tell options window what child we are configuring function PSegment:ExtraOptionsOnOpen (child) - _G.DetailsStatusBarOptions2SegmentTypeDropdown.MyObject:SetFixedParameter (child) - _G.DetailsStatusBarOptions2SegmentTypeDropdown.MyObject:Select (child.options.segmentType, true) + _G.DetailsStatusBarOptions2SegmentTypeDropdown.MyObject:SetFixedParameter(child) + _G.DetailsStatusBarOptions2SegmentTypeDropdown.MyObject:Select(child.options.segmentType, true) end --Create Plugin Frames (must have) @@ -1027,8 +1027,8 @@ do --ExtraOptionsOnOpen is called when options are opened and plugin have custom options --here we setup options widgets for get the values of clicked child and also for tell options window what child we are configuring function Clock:ExtraOptionsOnOpen (child) - _G.DetailsStatusBarOptions2ClockTypeDropdown.MyObject:SetFixedParameter (child) - _G.DetailsStatusBarOptions2ClockTypeDropdown.MyObject:Select (child.options.timeType, true) + _G.DetailsStatusBarOptions2ClockTypeDropdown.MyObject:SetFixedParameter(child) + _G.DetailsStatusBarOptions2ClockTypeDropdown.MyObject:Select(child.options.timeType, true) end --Create Plugin Frames @@ -1441,8 +1441,8 @@ do --ExtraOptionsOnOpen is called when options are opened and plugin have custom options --here we setup options widgets for get the values of clicked child and also for tell options window what child we are configuring function PTime:ExtraOptionsOnOpen (child) - _G.DetailsStatusBarOptions2TimeTypeDropdown.MyObject:SetFixedParameter (child) - _G.DetailsStatusBarOptions2TimeTypeDropdown.MyObject:Select (child.options.timeType, true) + _G.DetailsStatusBarOptions2TimeTypeDropdown.MyObject:SetFixedParameter(child) + _G.DetailsStatusBarOptions2TimeTypeDropdown.MyObject:Select(child.options.timeType, true) end --Create Plugin Frames (must have) @@ -1465,13 +1465,13 @@ end ---------default options panel ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- local window = _detalhes.gump:NewPanel (UIParent, nil, "DetailsStatusBarOptions", nil, 300, 180) -tinsert (UISpecialFrames, "DetailsStatusBarOptions") +tinsert(UISpecialFrames, "DetailsStatusBarOptions") window:SetPoint("center", UIParent, "center") window.locked = false window.close_with_right = true window.child = nil window.instance = nil -window:SetFrameStrata ("FULLSCREEN") +window:SetFrameStrata("FULLSCREEN") DetailsFramework:ApplyStandardBackdrop(window) --window:SetBackdrop({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16, edgeFile = [[Interface\AddOns\Details\images\border_2]], edgeSize=12}) @@ -1552,7 +1552,7 @@ end) window.textcolortexture:SetPoint("left", window.textcolor, "right", 2) window.textcolortexture:SetTexture(1, 1, 1) - _detalhes.gump:NewButton (window, _, "$parentTextColorButton", "textcolorbutton", 160, 20, colorpick) + _detalhes.gump:NewButton(window, _, "$parentTextColorButton", "textcolorbutton", 160, 20, colorpick) window.textcolorbutton:SetPoint("left", window.textcolor, "right", 2) --window.textcolorbutton:InstallCustomTexture() @@ -1584,7 +1584,7 @@ end) local buildFontMenu = function() local fontObjects = SharedMedia:HashTable ("font") local fontTable = {} - for name, fontPath in pairs (fontObjects) do + for name, fontPath in pairs(fontObjects) do fontTable[#fontTable+1] = {value = name, label = name, onclick = onSelectFont, font = fontPath} end return fontTable @@ -1630,20 +1630,20 @@ end) window.child = child window.instance = child.instance - _G.DetailsStatusBarOptionsTextStyleDropdown.MyObject:Select (child.options.textStyle, true) + _G.DetailsStatusBarOptionsTextStyleDropdown.MyObject:Select(child.options.textStyle, true) _G.DetailsStatusBarOptionsTextColorTexture:SetColorTexture (child.options.textColor[1], child.options.textColor[2], child.options.textColor[3], child.options.textColor[4]) - _G.DetailsStatusBarOptionsSliderFontSize.MyObject:SetFixedParameter (child) + _G.DetailsStatusBarOptionsSliderFontSize.MyObject:SetFixedParameter(child) _G.DetailsStatusBarOptionsSliderFontSize.MyObject:SetValue(child.options.textSize) - _G.DetailsStatusBarOptionsFontDropdown.MyObject:SetFixedParameter (child) - _G.DetailsStatusBarOptionsFontDropdown.MyObject:Select (child.options.textFace) + _G.DetailsStatusBarOptionsFontDropdown.MyObject:SetFixedParameter(child) + _G.DetailsStatusBarOptionsFontDropdown.MyObject:Select(child.options.textFace) - _G.DetailsStatusBarOptionsSliderAlignX.MyObject:SetFixedParameter (child) + _G.DetailsStatusBarOptionsSliderAlignX.MyObject:SetFixedParameter(child) _G.DetailsStatusBarOptionsSliderAlignX.MyObject:SetValue(child.options.textXMod) - _G.DetailsStatusBarOptionsSliderAlignY.MyObject:SetFixedParameter (child) + _G.DetailsStatusBarOptionsSliderAlignY.MyObject:SetFixedParameter(child) _G.DetailsStatusBarOptionsSliderAlignY.MyObject:SetValue(child.options.textYMod) _G.DetailsStatusBarOptions:Show() @@ -1656,7 +1656,7 @@ end) extraWindow:HideWidgets() - for _, widget in pairs (child.ExtraOptions) do + for _, widget in pairs(child.ExtraOptions) do widget:Show() end diff --git a/core/plugins_toolbar.lua b/core/plugins_toolbar.lua index fd6ab6873..bd186b549 100644 --- a/core/plugins_toolbar.lua +++ b/core/plugins_toolbar.lua @@ -71,7 +71,7 @@ return end - local instance = _detalhes:GetInstance (lower_instance) + local instance = _detalhes:GetInstance(lower_instance) if (#_detalhes.ToolBar.Shown > 0) then --already shown @@ -133,7 +133,7 @@ --internal functions do local PluginDescPanel = CreateFrame("frame", "DetailsPluginDescPanel", UIParent) - PluginDescPanel:SetFrameStrata ("tooltip") + PluginDescPanel:SetFrameStrata("tooltip") PluginDescPanel:Hide() PluginDescPanel:SetWidth(205) PluginDescPanel.BackdropTable = {} @@ -161,7 +161,7 @@ end local lower_instance = _detalhes:GetLowerInstanceNumber() if (lower_instance) then - _detalhes.OnEnterMainWindow(_detalhes:GetInstance (lower_instance), button, 3) + _detalhes.OnEnterMainWindow(_detalhes:GetInstance(lower_instance), button, 3) end if (button.tooltip) then @@ -229,7 +229,7 @@ end local lower_instance = _detalhes:GetLowerInstanceNumber() if (lower_instance) then - _detalhes.OnLeaveMainWindow(_detalhes:GetInstance (lower_instance), button, 3) + _detalhes.OnLeaveMainWindow(_detalhes:GetInstance(lower_instance), button, 3) end if (button.tooltip) then @@ -260,10 +260,10 @@ end return end - local instance = _detalhes:GetInstance (lower_instance) + local instance = _detalhes:GetInstance(lower_instance) if (not just_refresh) then - for _, instancia in pairs (_detalhes.tabela_instancias) do + for _, instancia in pairs(_detalhes.tabela_instancias) do if (instancia.baseframe and instancia:IsAtiva()) then instancia:ReajustaGump() end @@ -272,7 +272,7 @@ end instance:ChangeSkin() else instance:ToolbarMenuButtons() - instance:SetAutoHideMenu (nil, nil, true) + instance:SetAutoHideMenu(nil, nil, true) end return true diff --git a/core/util.lua b/core/util.lua index fa6cff0b5..b1673aff2 100644 --- a/core/util.lua +++ b/core/util.lua @@ -524,14 +524,14 @@ wipe (_detalhes.ToKFunctions) - tinsert (_detalhes.ToKFunctions, _detalhes.NoToK) - tinsert (_detalhes.ToKFunctions, _detalhes.ToK) - tinsert (_detalhes.ToKFunctions, _detalhes.ToK2) - tinsert (_detalhes.ToKFunctions, _detalhes.ToK0) - tinsert (_detalhes.ToKFunctions, _detalhes.ToKMin) - tinsert (_detalhes.ToKFunctions, _detalhes.ToK2Min) - tinsert (_detalhes.ToKFunctions, _detalhes.ToK0Min) - tinsert (_detalhes.ToKFunctions, _detalhes.comma_value) + tinsert(_detalhes.ToKFunctions, _detalhes.NoToK) + tinsert(_detalhes.ToKFunctions, _detalhes.ToK) + tinsert(_detalhes.ToKFunctions, _detalhes.ToK2) + tinsert(_detalhes.ToKFunctions, _detalhes.ToK0) + tinsert(_detalhes.ToKFunctions, _detalhes.ToKMin) + tinsert(_detalhes.ToKFunctions, _detalhes.ToK2Min) + tinsert(_detalhes.ToKFunctions, _detalhes.ToK0Min) + tinsert(_detalhes.ToKFunctions, _detalhes.comma_value) end @@ -657,14 +657,14 @@ wipe (_detalhes.ToKFunctions) - tinsert (_detalhes.ToKFunctions, _detalhes.NoToK) - tinsert (_detalhes.ToKFunctions, _detalhes.ToK) - tinsert (_detalhes.ToKFunctions, _detalhes.ToK2) - tinsert (_detalhes.ToKFunctions, _detalhes.ToK0) - tinsert (_detalhes.ToKFunctions, _detalhes.ToKMin) - tinsert (_detalhes.ToKFunctions, _detalhes.ToK2Min) - tinsert (_detalhes.ToKFunctions, _detalhes.ToK0Min) - tinsert (_detalhes.ToKFunctions, _detalhes.comma_value) + tinsert(_detalhes.ToKFunctions, _detalhes.NoToK) + tinsert(_detalhes.ToKFunctions, _detalhes.ToK) + tinsert(_detalhes.ToKFunctions, _detalhes.ToK2) + tinsert(_detalhes.ToKFunctions, _detalhes.ToK0) + tinsert(_detalhes.ToKFunctions, _detalhes.ToKMin) + tinsert(_detalhes.ToKFunctions, _detalhes.ToK2Min) + tinsert(_detalhes.ToKFunctions, _detalhes.ToK0Min) + tinsert(_detalhes.ToKFunctions, _detalhes.comma_value) -- end @@ -809,7 +809,7 @@ --yah, i know function _detalhes.table.copy (t1, t2) - for key, value in pairs (t2) do + for key, value in pairs(t2) do if (type(value) == "table") then t1 [key] = Details.CopyTable (value) else @@ -820,7 +820,7 @@ end function _detalhes.table.deploy (t1, t2) - for key, value in pairs (t2) do + for key, value in pairs(t2) do if (type(value) == "table") then t1 [key] = t1 [key] or {} _detalhes.table.deploy (t1 [key], t2 [key]) @@ -831,7 +831,7 @@ end function _detalhes.table.overwrite (t1, t2) - for key, value in pairs (t2) do + for key, value in pairs(t2) do if (type(value) == "table") then t1 [key] = t1 [key] or {} _detalhes.table.overwrite (t1 [key], t2 [key]) @@ -854,7 +854,7 @@ space = space .. " " end - for key, value in pairs (t) do + for key, value in pairs(t) do local tpe = type (value) @@ -1323,7 +1323,7 @@ end Object.HaveGradientEffect = true GradientFrameControl.HaveGradientEffect = true - if (not GradientFrameControl:GetScript ("OnUpdate")) then + if (not GradientFrameControl:GetScript("OnUpdate")) then GradientFrameControl:SetScript("OnUpdate", frame_task) end diff --git a/core/windows.lua b/core/windows.lua index 438498ec4..ba32673c9 100644 --- a/core/windows.lua +++ b/core/windows.lua @@ -879,7 +879,7 @@ _detalhes.cooltip_preset2_backdrop = preset2_backdrop --"Details BarBorder 3" - function _detalhes:CooltipPreset (preset) + function _detalhes:CooltipPreset(preset) local GameCooltip = GameCooltip GameCooltip:Reset() @@ -945,8 +945,8 @@ _detalhes.yesNo ["ask"]:SetWidth(480) _detalhes.yesNo ["ask"]:SetJustifyH("center") _detalhes.yesNo ["ask"]:SetHeight(22) - _detalhes.gump:NewButton (_detalhes.yesNo, _, "$parentNo", "no", 100, 30, function() _detalhes.yesNo:Hide() end, nil, nil, nil, Loc ["STRING_NO"]) - _detalhes.gump:NewButton (_detalhes.yesNo, _, "$parentYes", "yes", 100, 30, nil, nil, nil, nil, Loc ["STRING_YES"]) + _detalhes.gump:NewButton(_detalhes.yesNo, _, "$parentNo", "no", 100, 30, function() _detalhes.yesNo:Hide() end, nil, nil, nil, Loc ["STRING_NO"]) + _detalhes.gump:NewButton(_detalhes.yesNo, _, "$parentYes", "yes", 100, 30, nil, nil, nil, nil, Loc ["STRING_YES"]) _detalhes.yesNo ["no"]:SetPoint(10, -45) _detalhes.yesNo ["yes"]:SetPoint(390, -45) _detalhes.yesNo ["no"]:InstallCustomTexture() @@ -955,7 +955,7 @@ function _detalhes:Ask (msg, func, ...) _detalhes.yesNo ["ask"].text = msg local p1, p2 = ... - _detalhes.yesNo ["yes"]:SetClickFunction (func, p1, p2) + _detalhes.yesNo ["yes"]:SetClickFunction(func, p1, p2) _detalhes.yesNo:Show() end _detalhes.yesNo:Hide() @@ -1246,7 +1246,7 @@ end end end - _detalhes:OpenOptionsWindow (_detalhes:GetInstance (lower_instance)) + _detalhes:OpenOptionsWindow (_detalhes:GetInstance(lower_instance)) end) --create new window f.new_window_button = CreateFrame("button", nil, f) @@ -1263,8 +1263,8 @@ if (not _G.DetailsUpdateDialog) then local updatewindow_frame = CreateFrame("frame", "DetailsUpdateDialog", UIParent, "ButtonFrameTemplate") - updatewindow_frame:SetFrameStrata ("LOW") - tinsert (UISpecialFrames, "DetailsUpdateDialog") + updatewindow_frame:SetFrameStrata("LOW") + tinsert(UISpecialFrames, "DetailsUpdateDialog") updatewindow_frame:SetPoint("center", UIParent, "center") updatewindow_frame:SetSize(512, 200) --updatewindow_frame.portrait:SetTexture([[Interface\CHARACTERFRAME\TEMPORARYPORTRAIT-FEMALE-GNOME]]) @@ -1358,11 +1358,11 @@ local lower_instance = _detalhes:GetLowerInstanceNumber() if (not lower_instance) then - local instance = _detalhes:GetInstance (1) + local instance = _detalhes:GetInstance(1) _detalhes.CriarInstancia (_, _, 1) _detalhes:OpenOptionsWindow (instance) else - _detalhes:OpenOptionsWindow (_detalhes:GetInstance (lower_instance)) + _detalhes:OpenOptionsWindow (_detalhes:GetInstance(lower_instance)) end --2 = reset data @@ -1446,7 +1446,7 @@ GameCooltip:SetBackdrop(1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color) GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0.64453125, 0}, {.8, .8, .8, 0.2}, true) - GameCooltip:SetOwner (self, "topright", "bottomleft") + GameCooltip:SetOwner(self, "topright", "bottomleft") GameCooltip:ShowCooltip() @@ -1481,11 +1481,11 @@ if (_detalhes.hotcorner_topleft.onclick_what_todo == 1) then local lower_instance = _detalhes:GetLowerInstanceNumber() if (not lower_instance) then - local instance = _detalhes:GetInstance (1) + local instance = _detalhes:GetInstance(1) _detalhes.CriarInstancia (_, _, 1) _detalhes:OpenOptionsWindow (instance) else - _detalhes:OpenOptionsWindow (_detalhes:GetInstance (lower_instance)) + _detalhes:OpenOptionsWindow (_detalhes:GetInstance(lower_instance)) end elseif (_detalhes.hotcorner_topleft.onclick_what_todo == 2) then @@ -1500,11 +1500,11 @@ local quickclick_func2 = function(frame, button) local lower_instance = _detalhes:GetLowerInstanceNumber() if (not lower_instance) then - local instance = _detalhes:GetInstance (1) + local instance = _detalhes:GetInstance(1) _detalhes.CriarInstancia (_, _, 1) _detalhes:OpenOptionsWindow (instance) else - _detalhes:OpenOptionsWindow (_detalhes:GetInstance (lower_instance)) + _detalhes:OpenOptionsWindow (_detalhes:GetInstance(lower_instance)) end end diff --git a/frames/fw_mods.lua b/frames/fw_mods.lua index d3b41d5ac..49589f0a5 100644 --- a/frames/fw_mods.lua +++ b/frames/fw_mods.lua @@ -190,7 +190,7 @@ function gump:NewDetailsButton (parent, container, instancia, func, param1, para GameCooltip:SetType ("tooltip") GameCooltip:SetColor ("main", "transparent") GameCooltip:AddLine (new_button.tooltip) - GameCooltip:SetOwner (new_button) + GameCooltip:SetOwner(new_button) GameCooltip:ShowCooltip() end @@ -208,7 +208,7 @@ function gump:NewDetailsButton (parent, container, instancia, func, param1, para new_button.enter = false if (new_button.tooltip) then - _detalhes.popup:ShowMe (false) + _detalhes.popup:ShowMe(false) end if (new_button.texture) then @@ -375,7 +375,7 @@ function gump:NewTextBox (parent, container, member, func, param1, param2, w, h, GameCooltip:SetType ("tooltip") GameCooltip:SetColor ("main", "transparent") GameCooltip:AddLine (editbox.tooltip) - GameCooltip:SetOwner (editbox) + GameCooltip:SetOwner(editbox) GameCooltip:ShowCooltip() end @@ -398,7 +398,7 @@ function gump:NewTextBox (parent, container, member, func, param1, param2, w, h, if (editbox.tooltip) then if (not editbox.HaveMenu) then - _detalhes.popup:ShowMe (false) + _detalhes.popup:ShowMe(false) end end @@ -684,7 +684,7 @@ function gump:NewScrollBar2 (master, slave, x, y) slider_gump:Disable() slider_gump:SetValue(0) slider_gump.ativo = false - master:EnableMouseWheel (false) + master:EnableMouseWheel(false) return end @@ -694,13 +694,13 @@ function gump:NewScrollBar2 (master, slave, x, y) if (not slider_gump.ativo) then slider_gump:Enable() slider_gump.ativo = true - master:EnableMouseWheel (true) + master:EnableMouseWheel(true) end else slider_gump:Disable() slider_gump:SetValue(0) slider_gump.ativo = false - master:EnableMouseWheel (false) + master:EnableMouseWheel(false) end end diff --git a/frames/window_api.lua b/frames/window_api.lua index 897a8db98..6e6af6728 100644 --- a/frames/window_api.lua +++ b/frames/window_api.lua @@ -27,7 +27,7 @@ function Details:CreateAPI2Frame() --local Api2Frame = DetailsFramework:CreateSimplePanel (UIParent, panelWidth, panelHeight, "Details! API 2.0", "DetailsAPI2Frame") local Api2Frame = _G.DetailsAPI2Frame - Api2Frame:SetFrameStrata ("FULLSCREEN") + Api2Frame:SetFrameStrata("FULLSCREEN") Api2Frame:SetPoint("center") DetailsFramework:ApplyStandardBackdrop (Api2Frame, false, 1.2) @@ -143,7 +143,7 @@ function Details:CreateAPI2Frame() end for apiIndex, apiDesc in ipairs(api) do - tinsert (apiFunctionNames, apiDesc.name) + tinsert(apiFunctionNames, apiDesc.name) end local api2ScrollMenu = DetailsFramework:CreateScrollBox (Api2Frame, "$parentApi2MenuScroll", apiMenuScrollRefresh, apiFunctionNames, scrollWidth, scrollHeight, lineAmount, lineHeight) @@ -166,7 +166,7 @@ function Details:CreateAPI2Frame() end GameCooltip2:Preset(2) - GameCooltip2:SetOwner (self, "left", "right", 2, 0) + GameCooltip2:SetOwner(self, "left", "right", 2, 0) GameCooltip2:AddLine (apiInfo.desc) GameCooltip2:ShowCooltip() end @@ -247,7 +247,7 @@ function Details:CreateAPI2Frame() local parameterOnEnter = function(self) GameCooltip2:Preset(2) - GameCooltip2:SetOwner (self) + GameCooltip2:SetOwner(self) --fill the box in the right with information about the API local apiInfo = api [currentSelected] @@ -286,7 +286,7 @@ function Details:CreateAPI2Frame() f.required:SetPoint("left", f, "left", space2, 0) f.default:SetPoint("left", f, "left", space3, 0) - tinsert (parametersLines, f) + tinsert(parametersLines, f) end --return value box @@ -339,7 +339,7 @@ function Details:CreateAPI2Frame() f.desc:SetPoint("topleft", f.name, "bottomleft", 0, -5) - tinsert (returnLines, f) + tinsert(returnLines, f) end function Api2Frame.Refresh() diff --git a/frames/window_benchmark.lua b/frames/window_benchmark.lua index e09883727..c6ec39af2 100644 --- a/frames/window_benchmark.lua +++ b/frames/window_benchmark.lua @@ -19,7 +19,7 @@ local libwindow = LibStub("LibWindow-1.1") local f = CreateFrame("frame", "DetailsBenchmark", UIParent,"BackdropTemplate") f:SetSize(800, 600) f:SetPoint("left", UIParent, "left") - f:SetFrameStrata ("LOW") + f:SetFrameStrata("LOW") f:EnableMouse (true) f:SetMovable (true) f:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}) diff --git a/frames/window_bookmark.lua b/frames/window_bookmark.lua index 9cd5a90db..2d721747e 100644 --- a/frames/window_bookmark.lua +++ b/frames/window_bookmark.lua @@ -38,7 +38,7 @@ function Details:OpenBookmarkConfig() panel.selecting_slot = id GameCooltip:Reset() GameCooltip:SetType (3) - GameCooltip:SetOwner (self) + GameCooltip:SetOwner(self) Details:MontaAtributosOption (Details:GetInstance(1), select_attribute) GameCooltip:SetColor (1, cooltip_color) GameCooltip:SetColor (2, cooltip_color) @@ -93,7 +93,7 @@ function Details:OpenBookmarkConfig() local label = DF:CreateLabel(set, "") label:SetPoint("left", icon, "right", 2, 0) - tinsert (panel.blocks, {icon = icon, label = label, bg = set.bg, button = set}) + tinsert(panel.blocks, {icon = icon, label = label, bg = set.bg, button = set}) end local normal_coords = {0, 1, 0, 1} diff --git a/frames/window_brokertexteditor.lua b/frames/window_brokertexteditor.lua index 327b158ad..0065b872d 100644 --- a/frames/window_brokertexteditor.lua +++ b/frames/window_brokertexteditor.lua @@ -60,7 +60,7 @@ function Details:OpenBrokerTextEditor() local optiontable = {"{dmg}", "{dps}", "{dpos}", "{ddiff}", "{heal}", "{hps}", "{hpos}", "{hdiff}", "{time}"} - local add_button = DF:NewButton (panel, nil, "$parentAddButton", nil, 20, 20, function() + local add_button = DF:NewButton(panel, nil, "$parentAddButton", nil, 20, 20, function() textentry.editbox:Insert (optiontable [option_selected]) end, nil, nil, nil, "<-") @@ -194,17 +194,17 @@ function Details:OpenBrokerTextEditor() panel:Hide() end - local ok_button = DF:NewButton (panel, nil, "$parentButtonOk", nil, 80, 20, done, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_DONE"], 1) + local ok_button = DF:NewButton(panel, nil, "$parentButtonOk", nil, 80, 20, done, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_DONE"], 1) ok_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_DONE_TOOLTIP"] ok_button:SetPoint("topright", panel, "topright", -12, -174) ok_button:SetTemplate(DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")) - local reset_button = DF:NewButton (panel, nil, "$parentDefaultOk", nil, 80, 20, function() textentry.editbox:SetText("") end, nil, nil, nil, "Reset", 1) + local reset_button = DF:NewButton(panel, nil, "$parentDefaultOk", nil, 80, 20, function() textentry.editbox:SetText("") end, nil, nil, nil, "Reset", 1) reset_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_RESET_TOOLTIP"] reset_button:SetPoint("topright", panel, "topright", -100, -152) reset_button:SetTemplate(DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")) - local cancel_button = DF:NewButton (panel, nil, "$parentDefaultCancel", nil, 80, 20, function() textentry.editbox:SetText(panel.default_text); done(); end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_CANCEL"], 1) + local cancel_button = DF:NewButton(panel, nil, "$parentDefaultCancel", nil, 80, 20, function() textentry.editbox:SetText(panel.default_text); done(); end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_CANCEL"], 1) cancel_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_CANCEL_TOOLTIP"] cancel_button:SetPoint("topright", panel, "topright", -100, -174) cancel_button:SetTemplate(DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")) diff --git a/frames/window_classcolor.lua b/frames/window_classcolor.lua index e72ba5b3d..5a5653951 100644 --- a/frames/window_classcolor.lua +++ b/frames/window_classcolor.lua @@ -44,7 +44,7 @@ function Details:OpenClassColorsConfig() end local on_enter = function(self, capsule) - --Details:CooltipPreset (1) + --Details:CooltipPreset(1) --GameCooltip:AddLine ("right click to reset") --GameCooltip:Show (self) end @@ -88,7 +88,7 @@ function Details:OpenClassColorsConfig() button.my_class = className button:SetHook("OnEnter", on_enter) button:SetHook("OnLeave", on_leave) - button:SetClickFunction (reset_color, nil, nil, "RightClick") + button:SetClickFunction(reset_color, nil, nil, "RightClick") panel.buttons [className] = button end @@ -130,7 +130,7 @@ function Details:OpenClassColorsConfig() local colortable = colorTable[1] local colorname = colorTable[2] local value = colorname .. "@" .. barType - tinsert (result, {label = colorname, value = value, color = colortable, onclick = colorSelected}) + tinsert(result, {label = colorname, value = value, color = colortable, onclick = colorSelected}) end return result @@ -197,7 +197,7 @@ function Details:OpenClassColorsConfig() deathLogColorsLabel:SetPoint("topleft", panel, "topleft", 5, -265) end - for class, button in pairs (_G.DetailsClassColorManager.buttons) do + for class, button in pairs(_G.DetailsClassColorManager.buttons) do button.my_texture:SetVertexColor (unpack (Details.class_colors [class])) end diff --git a/frames/window_copy.lua b/frames/window_copy.lua index 2d5b93f7a..14279b7ed 100644 --- a/frames/window_copy.lua +++ b/frames/window_copy.lua @@ -9,8 +9,8 @@ do local panel = CreateFrame("frame", "DetailsCopy", UIParent, "ButtonFrameTemplate") panel:SetSize(512, 148) - tinsert (UISpecialFrames, "DetailsCopy") - panel:SetFrameStrata ("TOOLTIP") + tinsert(UISpecialFrames, "DetailsCopy") + panel:SetFrameStrata("TOOLTIP") panel:SetPoint("center", UIParent, "center") panel.locked = false panel:SetToplevel (true) diff --git a/frames/window_currentdps.lua b/frames/window_currentdps.lua index 71cf1424b..27fb9bacd 100644 --- a/frames/window_currentdps.lua +++ b/frames/window_currentdps.lua @@ -658,7 +658,7 @@ function Details:CreateCurrentDpsFrame(parent, name) end --frame strata - f:SetFrameStrata (_detalhes.realtime_dps_meter.frame_settings.strata) + f:SetFrameStrata(_detalhes.realtime_dps_meter.frame_settings.strata) --calcule buffer size f.MaxBufferIndex = f.SampleSize * time_fraction * 100 --sample size in seconds * fraction * tick milliseconds @@ -713,8 +713,8 @@ function Details:CreateCurrentDpsFrame(parent, name) local yellowDamageDone = thisTickYellowDamage - f.LastYellowDamage --add the damage to buffer - tinsert (f.PlayerTeamBuffer, 1, playerTeamDamageDone) - tinsert (f.YellowTeamBuffer, 1, yellowDamageDone) + tinsert(f.PlayerTeamBuffer, 1, playerTeamDamageDone) + tinsert(f.YellowTeamBuffer, 1, yellowDamageDone) --save the current damage amount f.LastPlayerTeamDamage = thisTickPlayerTeamDamage @@ -811,7 +811,7 @@ function Details:CreateCurrentDpsFrame(parent, name) local groupDamageDoneOnThisTick = thisTickGroupDamage - f.LastTickGroupDamage --add the damage to buffer - tinsert (f.GroupBuffer, 1, groupDamageDoneOnThisTick) + tinsert(f.GroupBuffer, 1, groupDamageDoneOnThisTick) --save the current damage amount f.LastTickGroupDamage = thisTickGroupDamage diff --git a/frames/window_custom.lua b/frames/window_custom.lua index 4cb65c13a..4ad19acc6 100644 --- a/frames/window_custom.lua +++ b/frames/window_custom.lua @@ -193,7 +193,7 @@ GameCooltip:Hide() end) - tinsert (UISpecialFrames, "DetailsCustomPanel") + tinsert(UISpecialFrames, "DetailsCustomPanel") --menu title bar @@ -285,7 +285,7 @@ DetailsCustomPanel.code4_default = [[ local value, top, total, combat, instance = ... - return string.format ("%.1f", value/total*100) + return string.format("%.1f", value/total*100) ]] DetailsCustomPanel.code4 = DetailsCustomPanel.code4_default @@ -303,10 +303,10 @@ self.author_field:SetText(UnitName ("player") .. "-" .. GetRealmName()) self.author_field:Enable() - self.source_dropdown:Select (1, true) + self.source_dropdown:Select(1, true) self.source_field:SetText("") - self.target_dropdown:Select (1, true) + self.target_dropdown:Select(1, true) self.target_field:SetText("") self.spellid_entry:SetText("") @@ -377,19 +377,19 @@ local source = custom_object:GetSource() if (source == "[all]") then - self.source_dropdown:Select (1, true) + self.source_dropdown:Select(1, true) self.source_field:SetText("") self.source_field:Disable() elseif (source == "[raid]") then - self.source_dropdown:Select (2, true) + self.source_dropdown:Select(2, true) self.source_field:SetText("") self.source_field:Disable() elseif (source == "[player]") then - self.source_dropdown:Select (3, true) + self.source_dropdown:Select(3, true) self.source_field:SetText("") self.source_field:Disable() else - self.source_dropdown:Select (4, true) + self.source_dropdown:Select(4, true) self.source_field:SetText(source) self.source_field:Enable() end @@ -397,23 +397,23 @@ local target = custom_object:GetTarget() if (not target) then - self.target_dropdown:Select (5, true) + self.target_dropdown:Select(5, true) self.target_field:SetText("") self.target_field:Disable() elseif (target == "[all]") then - self.target_dropdown:Select (1, true) + self.target_dropdown:Select(1, true) self.target_field:SetText("") self.target_field:Disable() elseif (target == "[raid]") then - self.target_dropdown:Select (2, true) + self.target_dropdown:Select(2, true) self.target_field:SetText("") self.target_field:Disable() elseif (target == "[player]") then - self.target_dropdown:Select (3, true) + self.target_dropdown:Select(3, true) self.target_field:SetText("") self.target_field:Disable() else - self.target_dropdown:Select (4, true) + self.target_dropdown:Select(4, true) self.target_field:SetText(target) self.target_field:Enable() end @@ -486,7 +486,7 @@ end if (DetailsCustomPanel.IsImporting) then - tinsert (_detalhes.custom, object) + tinsert(_detalhes.custom, object) end DetailsCustomPanel.IsEditing = false @@ -507,7 +507,7 @@ ["tooltip"] = false, } - tinsert (_detalhes.custom, new_custom_object) + tinsert(_detalhes.custom, new_custom_object) _setmetatable (new_custom_object, _detalhes.atributo_custom) new_custom_object.__index = _detalhes.atributo_custom _detalhes:Msg (Loc ["STRING_CUSTOM_CREATED"]) @@ -554,7 +554,7 @@ end if (DetailsCustomPanel.IsImporting) then - tinsert (_detalhes.custom, object) + tinsert(_detalhes.custom, object) end DetailsCustomPanel.IsEditing = false @@ -590,7 +590,7 @@ new_custom_object.percent_script = false end - tinsert (_detalhes.custom, new_custom_object) + tinsert(_detalhes.custom, new_custom_object) _setmetatable (new_custom_object, _detalhes.atributo_custom) new_custom_object.__index = _detalhes.atributo_custom _detalhes:Msg (Loc ["STRING_CUSTOM_CREATED"]) @@ -752,7 +752,7 @@ function custom_window:CreateMenuButton (label, icon, clickfunc, param1, param2, tooltip, name, coords) local index = #custom_window.menu+1 - local button = gump:NewButton (self, nil, "$parent" .. name, nil, CONST_MENU_WIDTH, CONST_MENU_HEIGHT, clickfunc, param1, param2, nil, label) + local button = gump:NewButton(self, nil, "$parent" .. name, nil, CONST_MENU_WIDTH, CONST_MENU_HEIGHT, clickfunc, param1, param2, nil, label) button:SetPoint("topleft", self, "topleft", CONST_MENU_X_POSITION, CONST_MENU_Y_POSITION + ((index-1)*-23)) --button:SetTemplate (CONST_BUTTON_TEMPLATE) @@ -811,7 +811,7 @@ local export_object = {} - for key, value in pairs (custom_object) do + for key, value in pairs(custom_object) do if (object_keys [key]) then if (type(value) == "table") then export_object [key] = Details.CopyTable (value) @@ -906,7 +906,7 @@ custom_window.ImportConfirm:Hide() end - local okey_button = gump:NewButton (custom_window, nil, "$parentImportConfirm", "ImportConfirm", CONST_EDITBOX_BUTTON_WIDTH, CONST_EDITBOX_BUTTON_HEIGHT, import, nil, nil, nil, Loc ["STRING_CUSTOM_IMPORT_BUTTON"]) + local okey_button = gump:NewButton(custom_window, nil, "$parentImportConfirm", "ImportConfirm", CONST_EDITBOX_BUTTON_WIDTH, CONST_EDITBOX_BUTTON_HEIGHT, import, nil, nil, nil, Loc ["STRING_CUSTOM_IMPORT_BUTTON"]) okey_button:SetTemplate (CONST_BUTTON_TEMPLATE) okey_button:SetPoint("left", editbox, "right", 2, 0) end @@ -1072,20 +1072,20 @@ gump:IconPick (pickicon_callback, true) end local icon_image = gump:NewImage (box0, [[Interface\ICONS\TEMP]], 20, 20, nil, nil, "icontexture", "$parentIconTexture") - local icon_button = gump:NewButton (box0, nil, "$parentIconButton", "IconButton", 20, 20, pickicon) + local icon_button = gump:NewButton(box0, nil, "$parentIconButton", "IconButton", 20, 20, pickicon) icon_button:InstallCustomTexture() icon_button:SetPoint("left", icon_label, "left", 64, 0) icon_image:SetPoint("left", icon_label, "left", 64, 0) custom_window.icon_image = icon_image --cancel - local cancel_button = gump:NewButton (box0, nil, "$parentCancelButton", "cancelbutton", 130, 20, DetailsCustomPanel.CancelFunc, nil, nil, nil, Loc ["STRING_CUSTOM_CANCEL"]) + local cancel_button = gump:NewButton(box0, nil, "$parentCancelButton", "cancelbutton", 130, 20, DetailsCustomPanel.CancelFunc, nil, nil, nil, Loc ["STRING_CUSTOM_CANCEL"]) --cancel_button:SetPoint("bottomleft", attribute_box, "bottomleft", 2, 0) cancel_button:SetPoint("topleft", icon_label, "bottomleft", 0, -10) cancel_button:SetTemplate (CONST_REGULAR_BUTTON_TEMPLATE) --accept - local accept_button = gump:NewButton (box0, nil, "$parentAcceptButton", "acceptbutton", 130, 20, DetailsCustomPanel.AcceptFunc, nil, nil, nil, Loc ["STRING_CUSTOM_CREATE"]) + local accept_button = gump:NewButton(box0, nil, "$parentAcceptButton", "acceptbutton", 130, 20, DetailsCustomPanel.AcceptFunc, nil, nil, nil, Loc ["STRING_CUSTOM_CREATE"]) accept_button:SetPoint("left", cancel_button, "right", 2, 0) accept_button:SetTemplate (CONST_REGULAR_BUTTON_TEMPLATE) @@ -1168,7 +1168,7 @@ local selectedEncounterActor = function(actorName, model) source_field:SetText(actorName) - source_dropdown:Select (4, true) + source_dropdown:Select(4, true) box1.sourceentry:Enable() actorsFrame:Hide() GameCooltip:Hide() @@ -1180,7 +1180,7 @@ button.MyObject.image:SetBlendMode("ADD") button.MyObject.line:SetBlendMode("ADD") button.MyObject.label:SetTextColor (1, 1, 1, 1) - GameTooltip:SetOwner (button, "ANCHOR_TOPLEFT") + GameTooltip:SetOwner(button, "ANCHOR_TOPLEFT") GameTooltip:AddLine (button.MyObject.actor) GameTooltip:Show() @@ -1216,12 +1216,12 @@ local y = 10 local i = 1 - for actor, actorTable in pairs (actors) do + for actor, actorTable in pairs(actors) do local thisButton = actorsFrameButtons [i] if (not thisButton) then - thisButton = gump:NewButton (actorsFrame.frame, actorsFrame.frame, "DetailsCustomActorsFrame2Button"..i, "button"..i, 130, 20, selectedEncounterSpell) + thisButton = gump:NewButton(actorsFrame.frame, actorsFrame.frame, "DetailsCustomActorsFrame2Button"..i, "button"..i, 130, 20, selectedEncounterSpell) thisButton:SetPoint("topleft", "DetailsCustomActorsFrame2", "topleft", x, -y) thisButton:SetHook("OnEnter", buttonMouseOver) thisButton:SetHook("OnLeave", buttonMouseOut) @@ -1258,7 +1258,7 @@ end thisButton.label:SetText(actor) - thisButton:SetClickFunction (selectedEncounterActor, actor, actorTable.model) + thisButton:SetClickFunction(selectedEncounterActor, actor, actorTable.model) thisButton.actor = actor thisButton.ej_id = ej_id thisButton.model = actorTable.model @@ -1280,9 +1280,9 @@ GameCooltip:Reset() GameCooltip:SetType ("menu") - GameCooltip:SetOwner (adds_boss) + GameCooltip:SetOwner(adds_boss) - for instanceId, instanceTable in pairs (_detalhes.EncounterInformation) do + for instanceId, instanceTable in pairs(_detalhes.EncounterInformation) do if (_detalhes:InstanceIsRaid (instanceId)) then @@ -1376,7 +1376,7 @@ local selectedEncounterActor = function(actorName) target_field:SetText(actorName) - target_dropdown:Select (4, true) + target_dropdown:Select(4, true) box1.targetentry:Enable() actorsFrame:Hide() GameCooltip:Hide() @@ -1388,7 +1388,7 @@ button.MyObject.image:SetBlendMode("ADD") button.MyObject.line:SetBlendMode("ADD") button.MyObject.label:SetTextColor (1, 1, 1, 1) - GameTooltip:SetOwner (button, "ANCHOR_TOPLEFT") + GameTooltip:SetOwner(button, "ANCHOR_TOPLEFT") GameTooltip:AddLine (button.MyObject.actor) GameTooltip:Show() @@ -1424,12 +1424,12 @@ local y = 10 local i = 1 - for actor, actorTable in pairs (actors) do + for actor, actorTable in pairs(actors) do local thisButton = actorsFrameButtons [i] if (not thisButton) then - thisButton = gump:NewButton (actorsFrame.frame, actorsFrame.frame, "DetailsCustomActorsFrameButton"..i, "button"..i, 130, 20, selectedEncounterSpell) + thisButton = gump:NewButton(actorsFrame.frame, actorsFrame.frame, "DetailsCustomActorsFrameButton"..i, "button"..i, 130, 20, selectedEncounterSpell) thisButton:SetPoint("topleft", "DetailsCustomActorsFrame", "topleft", x, -y) thisButton:SetHook("OnEnter", buttonMouseOver) thisButton:SetHook("OnLeave", buttonMouseOut) @@ -1466,7 +1466,7 @@ end thisButton.label:SetText(actor) - thisButton:SetClickFunction (selectedEncounterActor, actor) + thisButton:SetClickFunction(selectedEncounterActor, actor) thisButton.actor = actor thisButton.ej_id = ej_id thisButton.model = actorTable.model @@ -1488,9 +1488,9 @@ GameCooltip:Reset() GameCooltip:SetType ("menu") - GameCooltip:SetOwner (adds_boss) + GameCooltip:SetOwner(adds_boss) - for instanceId, instanceTable in pairs (_detalhes.EncounterInformation) do + for instanceId, instanceTable in pairs(_detalhes.EncounterInformation) do if (_detalhes:InstanceIsRaid (instanceId)) then @@ -1564,7 +1564,7 @@ button.MyObject.line:SetBlendMode("ADD") button.MyObject.label:SetTextColor (1, 1, 1, 1) - GameTooltip:SetOwner (button, "ANCHOR_TOPLEFT") + GameTooltip:SetOwner(button, "ANCHOR_TOPLEFT") _detalhes:GameTooltipSetSpellByID (button.MyObject.spellid) GameTooltip:Show() end @@ -1589,12 +1589,12 @@ local y = 10 local i = 1 - for spell, _ in pairs (spells) do + for spell, _ in pairs(spells) do local thisButton = spellsFrameButtons [i] if (not thisButton) then - thisButton = gump:NewButton (spellsFrame.frame, spellsFrame.frame, "DetailsCustomSpellsFrameButton"..i, "button"..i, 80, 20, selectedEncounterSpell) + thisButton = gump:NewButton(spellsFrame.frame, spellsFrame.frame, "DetailsCustomSpellsFrameButton"..i, "button"..i, 80, 20, selectedEncounterSpell) thisButton:SetPoint("topleft", "DetailsCustomSpellsFrame", "topleft", x, -y) thisButton:SetHook("OnEnter", buttonMouseOver) thisButton:SetHook("OnLeave", buttonMouseOut) @@ -1629,7 +1629,7 @@ local nome_magia, _, icone_magia = _GetSpellInfo(spell) thisButton.image:SetTexture(icone_magia) thisButton.label:SetText(nome_magia) - thisButton:SetClickFunction (selectedEncounterSpell, spell) + thisButton:SetClickFunction(selectedEncounterSpell, spell) thisButton.spellid = spell thisButton:Show() i = i + 1 @@ -1648,9 +1648,9 @@ GameCooltip:Reset() GameCooltip:SetType ("menu") - GameCooltip:SetOwner (spell_id_boss) + GameCooltip:SetOwner(spell_id_boss) - for instanceId, instanceTable in pairs (_detalhes.EncounterInformation) do + for instanceId, instanceTable in pairs(_detalhes.EncounterInformation) do if (_detalhes:InstanceisRaid (instanceId)) then @@ -1699,25 +1699,25 @@ box2:SetFrameLevel (box0:GetFrameLevel()+1) --edit main code - local maincode_button = gump:NewButton (box2, nil, "$parentMainCodeButton", "maiccodebutton", 160, 20, DetailsCustomPanel.StartEditCode, 1, nil, nil, Loc ["STRING_CUSTOM_EDIT_SEARCH_CODE"]) + local maincode_button = gump:NewButton(box2, nil, "$parentMainCodeButton", "maiccodebutton", 160, 20, DetailsCustomPanel.StartEditCode, 1, nil, nil, Loc ["STRING_CUSTOM_EDIT_SEARCH_CODE"]) maincode_button:SetPoint("topleft", custom_window, "topleft", CONST_EDITBUTTONS_X_POSITION, CONST_MENU_Y_POSITION) maincode_button.tooltip = Loc ["STRING_CUSTOM_EDITCODE_DESC"] maincode_button:SetTemplate (CONST_CODETEXTENTRY_OPENCODEBUTTONS_TEMPLATE) --edit tooltip code - local tooltipcode_button = gump:NewButton (box2, nil, "$parentTooltipCodeButton", "tooltipcodebutton", 160, 20, DetailsCustomPanel.StartEditCode, 2, nil, nil, Loc ["STRING_CUSTOM_EDIT_TOOLTIP_CODE"]) + local tooltipcode_button = gump:NewButton(box2, nil, "$parentTooltipCodeButton", "tooltipcodebutton", 160, 20, DetailsCustomPanel.StartEditCode, 2, nil, nil, Loc ["STRING_CUSTOM_EDIT_TOOLTIP_CODE"]) tooltipcode_button:SetPoint("topleft", maincode_button, "bottomleft", 0, -8) tooltipcode_button.tooltip = Loc ["STRING_CUSTOM_EDITTOOLTIP_DESC"] tooltipcode_button:SetTemplate (CONST_CODETEXTENTRY_OPENCODEBUTTONS_TEMPLATE) --edit total code - local totalcode_button = gump:NewButton (box2, nil, "$parentTotalCodeButton", "totalcodebutton", 160, 20, DetailsCustomPanel.StartEditCode, 3, nil, nil, "Edit Total Code") + local totalcode_button = gump:NewButton(box2, nil, "$parentTotalCodeButton", "totalcodebutton", 160, 20, DetailsCustomPanel.StartEditCode, 3, nil, nil, "Edit Total Code") totalcode_button:SetPoint("topleft", tooltipcode_button, "bottomleft", 0, -8) totalcode_button.tooltip = "This code is responsible for edit the total number shown in the player bar.\n\nThis is not necessary if you want show exactly the value gotten in the search code." totalcode_button:SetTemplate (CONST_CODETEXTENTRY_OPENCODEBUTTONS_TEMPLATE) --edit percent code - local percentcode_button = gump:NewButton (box2, nil, "$parentPercentCodeButton", "percentcodebutton", 160, 20, DetailsCustomPanel.StartEditCode, 4, nil, nil, "Edit Percent Code") + local percentcode_button = gump:NewButton(box2, nil, "$parentPercentCodeButton", "percentcodebutton", 160, 20, DetailsCustomPanel.StartEditCode, 4, nil, nil, "Edit Percent Code") percentcode_button:SetPoint("topleft", totalcode_button, "bottomleft", 0, -8) percentcode_button.tooltip = "Edit the code responsible for the percent number in the player bar.\n\nThis is not required if you want to use simple percentage (comparing with total)." percentcode_button:SetTemplate (CONST_CODETEXTENTRY_OPENCODEBUTTONS_TEMPLATE) @@ -1746,7 +1746,7 @@ end) --create a background area where the code editor is - local codeEditorBackground = gump:NewButton (custom_window, nil, nil, nil, 1, 1, function()end) + local codeEditorBackground = gump:NewButton(custom_window, nil, nil, nil, 1, 1, function()end) codeEditorBackground:SetAllPoints(code_editor) codeEditorBackground:SetTemplate (CONST_CODETEXTENTRY_TEMPLATE) @@ -1832,23 +1832,23 @@ local supportFrame = CreateFrame("frame", "$parentSupportFrame", custom_window) supportFrame:SetFrameLevel (500) - local expand = gump:NewButton (supportFrame, nil, "$parentExpand", "expandbutton", CONST_EDITBOX_BUTTON_WIDTH, CONST_EDITBOX_BUTTON_HEIGHT, expand_func, 4, nil, nil, "Expand") + local expand = gump:NewButton(supportFrame, nil, "$parentExpand", "expandbutton", CONST_EDITBOX_BUTTON_WIDTH, CONST_EDITBOX_BUTTON_HEIGHT, expand_func, 4, nil, nil, "Expand") expand:SetPoint("bottomleft", code_editor, "topleft", 0, 1) expand:SetTemplate (CONST_CODETEXTENTRYBUTTON_TEMPLATE) - local font_size1 = gump:NewButton (supportFrame, nil, "$parentFont1", "font1button", CONST_EDITBOX_BUTTON_WIDTH, CONST_EDITBOX_BUTTON_HEIGHT, font_change, nil, nil, nil, "Aa") + local font_size1 = gump:NewButton(supportFrame, nil, "$parentFont1", "font1button", CONST_EDITBOX_BUTTON_WIDTH, CONST_EDITBOX_BUTTON_HEIGHT, font_change, nil, nil, nil, "Aa") font_size1:SetPoint("left", expand, "right", 2, 0) font_size1:SetTemplate (CONST_CODETEXTENTRYBUTTON_TEMPLATE) - local font_size2 = gump:NewButton (supportFrame, nil, "$parentFont2", "font2button", CONST_EDITBOX_BUTTON_WIDTH, CONST_EDITBOX_BUTTON_HEIGHT, font_change, true, nil, nil, "aA") + local font_size2 = gump:NewButton(supportFrame, nil, "$parentFont2", "font2button", CONST_EDITBOX_BUTTON_WIDTH, CONST_EDITBOX_BUTTON_HEIGHT, font_change, true, nil, nil, "aA") font_size2:SetPoint("left", font_size1, "right", 2, 0) font_size2:SetTemplate (CONST_CODETEXTENTRYBUTTON_TEMPLATE) - local apply1 = gump:NewButton (supportFrame, nil, "$parentApply", "applybutton", CONST_EDITBOX_BUTTON_WIDTH, CONST_EDITBOX_BUTTON_HEIGHT, apply_code, nil, nil, nil, "Apply") + local apply1 = gump:NewButton(supportFrame, nil, "$parentApply", "applybutton", CONST_EDITBOX_BUTTON_WIDTH, CONST_EDITBOX_BUTTON_HEIGHT, apply_code, nil, nil, nil, "Apply") apply1:SetPoint("left", font_size2, "right", 2, 0) apply1:SetTemplate (CONST_CODETEXTENTRYBUTTON_TEMPLATE) - local open_API = gump:NewButton (supportFrame, nil, "$parentOpenAPI", "openAPIbutton", CONST_EDITBOX_BUTTON_WIDTH, CONST_EDITBOX_BUTTON_HEIGHT, function()end, nil, nil, nil, "API") --_detalhes.OpenAPI - opening the api was cancelling the editing process + local open_API = gump:NewButton(supportFrame, nil, "$parentOpenAPI", "openAPIbutton", CONST_EDITBOX_BUTTON_WIDTH, CONST_EDITBOX_BUTTON_HEIGHT, function()end, nil, nil, nil, "API") --_detalhes.OpenAPI - opening the api was cancelling the editing process open_API:SetPoint("left", apply1, "right", 2, 0) open_API:SetTemplate (CONST_CODETEXTENTRYBUTTON_TEMPLATE) diff --git a/frames/window_dump.lua b/frames/window_dump.lua index cb6f95dab..406bd3d9a 100644 --- a/frames/window_dump.lua +++ b/frames/window_dump.lua @@ -81,7 +81,7 @@ end function _detalhes:ShowImportWindow (defaultText, confirmFunc, titleText) if (not _G.DetailsExportWindow) then local importWindow = DetailsFramework:CreateSimplePanel (_G.UIParent, 800, 610, "Details! Dump String", "DetailsExportWindow") - importWindow:SetFrameStrata ("FULLSCREEN") + importWindow:SetFrameStrata("FULLSCREEN") importWindow:SetPoint("center") DetailsFramework:ApplyStandardBackdrop (importWindow, false, 1.2) diff --git a/frames/window_eventtracker.lua b/frames/window_eventtracker.lua index 6c453e0a0..068d7009c 100644 --- a/frames/window_eventtracker.lua +++ b/frames/window_eventtracker.lua @@ -61,7 +61,7 @@ function Details:OpenEventTrackerOptions (from_options_panel) local SharedMedia = _G.LibStub:GetLibrary ("LibSharedMedia-3.0") local textures = SharedMedia:HashTable ("statusbar") local texTable = {} - for name, texturePath in pairs (textures) do + for name, texturePath in pairs(textures) do texTable [#texTable + 1] = {value = name, label = name, statusbar = texturePath, onclick = set_bar_texture} end table.sort (texTable, function(t1, t2) return t1.label < t2.label end) @@ -267,7 +267,7 @@ function Details:CreateEventTrackerFrame(parent, name) left_resize:SetScript("OnMouseDown", function(self) if (not f.resizing and not _detalhes.event_tracker.frame.locked) then f.resizing = true - f:StartSizing ("bottomleft") + f:StartSizing("bottomleft") end end) left_resize:SetScript("OnMouseUp", function(self) @@ -281,7 +281,7 @@ function Details:CreateEventTrackerFrame(parent, name) right_resize:SetScript("OnMouseDown", function(self) if (not f.resizing and not _detalhes.event_tracker.frame.locked) then f.resizing = true - f:StartSizing ("bottomright") + f:StartSizing("bottomright") end end) right_resize:SetScript("OnMouseUp", function(self) @@ -705,7 +705,7 @@ function Details:CreateEventTrackerFrame(parent, name) f:SetBackdropColor(unpack (_detalhes.event_tracker.frame.backdrop_color)) scrollframe.__background:SetVertexColor (unpack (_detalhes.event_tracker.frame.backdrop_color)) - f:SetFrameStrata (_detalhes.event_tracker.frame.strata) + f:SetFrameStrata(_detalhes.event_tracker.frame.strata) _detalhes:UpdateWorldTrackerLines() scrollframe:Refresh() @@ -750,25 +750,25 @@ function Details:CreateEventTrackerFrame(parent, name) --defensive cooldown if (token == "SPELL_CAST_SUCCESS" and (cooldownListFromFramework [spellid]) and is_player (caster_flags)) then - tinsert (CurrentShowing, 1, {SPELLTYPE_COOLDOWN, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial}) + tinsert(CurrentShowing, 1, {SPELLTYPE_COOLDOWN, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial}) added = true --offensive cooldown elseif (token == "SPELL_CAST_SUCCESS" and (attackCooldownsFromFramework [spellid]) and is_player (caster_flags)) then - tinsert (CurrentShowing, 1, {SPELLTYPE_OFFENSIVE, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial}) + tinsert(CurrentShowing, 1, {SPELLTYPE_OFFENSIVE, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial}) added = true --crowd control elseif (token == "SPELL_AURA_APPLIED" and (crowdControlFromFramework [spellid])) then --check if isnt a pet if (target_flags and is_player (target_flags)) then - tinsert (CurrentShowing, 1, {SPELLTYPE_CROWDCONTROL, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial}) + tinsert(CurrentShowing, 1, {SPELLTYPE_CROWDCONTROL, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial}) added = true end --spell interrupt elseif (token == "SPELL_INTERRUPT") then - tinsert (CurrentShowing, 1, {SPELLTYPE_INTERRUPT, spellid, caster_name, target_name, time, extraSpellID, GetTime(), caster_serial, is_enemy (caster_flags), target_serial}) + tinsert(CurrentShowing, 1, {SPELLTYPE_INTERRUPT, spellid, caster_name, target_name, time, extraSpellID, GetTime(), caster_serial, is_enemy (caster_flags), target_serial}) added = true end diff --git a/frames/window_forge.lua b/frames/window_forge.lua index 4ee2c8a3c..3f8be0642 100644 --- a/frames/window_forge.lua +++ b/frames/window_forge.lua @@ -46,14 +46,14 @@ function Details:OpenForge() --main frame local f = DetailsForgePanel or Details.gump:CreateSimplePanel (UIParent, 960, 600, "Details! " .. L["STRING_SPELLLIST"], "DetailsForgePanel") f:SetPoint("center", UIParent, "center") - f:SetFrameStrata ("HIGH") + f:SetFrameStrata("HIGH") f:SetToplevel (true) f:SetMovable (true) f.Title:SetTextColor (1, .8, .2) local have_plugins_enabled - for id, instanceTable in pairs (Details.EncounterInformation) do + for id, instanceTable in pairs(Details.EncounterInformation) do if (Details.InstancesToStoreData [id]) then have_plugins_enabled = true break @@ -70,10 +70,10 @@ function Details:OpenForge() nopluginLabel:SetText(L["STRING_FORGE_ENABLEPLUGINS"]) end - if (not Details:GetTutorialCVar ("FORGE_TUTORIAL") and false) then + if (not Details:GetTutorialCVar("FORGE_TUTORIAL") and false) then local tutorialFrame = CreateFrame("frame", "$parentTutorialFrame", f,"BackdropTemplate") tutorialFrame:SetPoint("center", f, "center") - tutorialFrame:SetFrameStrata ("DIALOG") + tutorialFrame:SetFrameStrata("DIALOG") tutorialFrame:SetSize(400, 300) tutorialFrame:SetBackdrop({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize=1}) @@ -151,7 +151,7 @@ function Details:OpenForge() function f:InstallModule (module) if (module and type (module) == "table") then - tinsert (all_modules, module) + tinsert(all_modules, module) end end @@ -439,7 +439,7 @@ function Details:OpenForge() wipe (spell_already_added) local SpellPoll = Details.spell_pool - for spellID, className in pairs (SpellPoll) do + for spellID, className in pairs(SpellPoll) do if (type(spellID) == "number" and spellID > 12) then @@ -477,7 +477,7 @@ function Details:OpenForge() end if (can_add) then - tinsert (t, {spellID, Details.classid_to_classstring [className] or className}) + tinsert(t, {spellID, Details.classid_to_classstring [className] or className}) end end @@ -488,7 +488,7 @@ function Details:OpenForge() header = { {name = L["STRING_FORGE_HEADER_INDEX"], width = 40, type = "text", func = no_func}, {name = L["STRING_FORGE_HEADER_ICON"], width = 40, type = "texture"}, - {name = L["STRING_FORGE_HEADER_NAME"], width = 150, type = "entry", func = no_func, onenter = function(self) GameTooltip:SetOwner (self.widget, "ANCHOR_TOPLEFT"); Details:GameTooltipSetSpellByID (self.id); GameTooltip:Show() end, onleave = function(self) GameTooltip:Hide() end}, + {name = L["STRING_FORGE_HEADER_NAME"], width = 150, type = "entry", func = no_func, onenter = function(self) GameTooltip:SetOwner(self.widget, "ANCHOR_TOPLEFT"); Details:GameTooltipSetSpellByID (self.id); GameTooltip:Show() end, onleave = function(self) GameTooltip:Hide() end}, {name = L["STRING_FORGE_HEADER_SPELLID"], width = 60, type = "entry", func = no_func}, {name = L["STRING_FORGE_HEADER_SCHOOL"], width = 60, type = "entry", func = no_func}, {name = L["STRING_FORGE_HEADER_CASTER"], width = 100, type = "entry", func = no_func}, @@ -503,7 +503,7 @@ function Details:OpenForge() if (data) then local events = "" if (EncounterSpellEvents and EncounterSpellEvents [data[1]]) then - for token, _ in pairs (EncounterSpellEvents [data[1]].token) do + for token, _ in pairs(EncounterSpellEvents [data[1]].token) do token = token:gsub ("SPELL_", "") events = events .. token .. ", " end @@ -582,7 +582,7 @@ function Details:OpenForge() wipe (spell_already_added) local SpellPoll = Details.encounter_spell_pool - for spellID, spellTable in pairs (SpellPoll) do + for spellID, spellTable in pairs(SpellPoll) do if (spellID > 12) then local encounterID = spellTable [1] @@ -622,7 +622,7 @@ function Details:OpenForge() end if (can_add) then - tinsert (t, {spellID, encounterID, enemyName, bossDetails and bossDetails.boss or "--x--x--"}) + tinsert(t, {spellID, encounterID, enemyName, bossDetails and bossDetails.boss or "--x--x--"}) end end end @@ -633,7 +633,7 @@ function Details:OpenForge() header = { {name = L["STRING_FORGE_HEADER_INDEX"], width = 40, type = "text", func = no_func}, {name = L["STRING_FORGE_HEADER_ICON"], width = 40, type = "texture"}, - {name = L["STRING_FORGE_HEADER_NAME"], width = 151, type = "entry", func = no_func, onenter = function(self) GameTooltip:SetOwner (self.widget, "ANCHOR_TOPLEFT"); Details:GameTooltipSetSpellByID (self.id); GameTooltip:Show() end, onleave = function(self) GameTooltip:Hide() end}, + {name = L["STRING_FORGE_HEADER_NAME"], width = 151, type = "entry", func = no_func, onenter = function(self) GameTooltip:SetOwner(self.widget, "ANCHOR_TOPLEFT"); Details:GameTooltipSetSpellByID (self.id); GameTooltip:Show() end, onleave = function(self) GameTooltip:Hide() end}, {name = L["STRING_FORGE_HEADER_SPELLID"], width = 55, type = "entry", func = no_func}, {name = L["STRING_FORGE_HEADER_SCHOOL"], width = 60, type = "entry", func = no_func}, {name = L["STRING_FORGE_HEADER_CASTER"], width = 80, type = "entry", func = no_func}, @@ -650,7 +650,7 @@ function Details:OpenForge() local events = "" if (EncounterSpellEvents and EncounterSpellEvents [data[1]]) then - for token, _ in pairs (EncounterSpellEvents [data[1]].token) do + for token, _ in pairs(EncounterSpellEvents [data[1]].token) do token = token:gsub ("SPELL_", "") events = events .. token .. ", " end @@ -825,7 +825,7 @@ function Details:OpenForge() local source = Details.boss_mods_timers.encounter_timers_dbm or {} - for key, timer in pairs (source) do + for key, timer in pairs(source) do local can_add = true if (lower_FilterBarName ~= "") then if (not lower (timer [3]):find (lower_FilterBarName)) then @@ -852,7 +852,7 @@ function Details:OpenForge() header = { {name = L["STRING_FORGE_HEADER_INDEX"], width = 40, type = "text", func = no_func}, {name = L["STRING_FORGE_HEADER_ICON"], width = 40, type = "texture"}, - {name = L["STRING_FORGE_HEADER_BARTEXT"], width = 150, type = "entry", func = no_func, onenter = function(self) GameTooltip:SetOwner (self.widget, "ANCHOR_TOPLEFT"); Details:GameTooltipSetSpellByID (self.id); GameTooltip:Show() end, onleave = function(self) GameTooltip:Hide() end}, + {name = L["STRING_FORGE_HEADER_BARTEXT"], width = 150, type = "entry", func = no_func, onenter = function(self) GameTooltip:SetOwner(self.widget, "ANCHOR_TOPLEFT"); Details:GameTooltipSetSpellByID (self.id); GameTooltip:Show() end, onleave = function(self) GameTooltip:Hide() end}, {name = L["STRING_FORGE_HEADER_ID"], width = 130, type = "entry", func = no_func}, {name = L["STRING_FORGE_HEADER_SPELLID"], width = 50, type = "entry", func = no_func}, {name = L["STRING_FORGE_HEADER_TIMER"], width = 40, type = "entry", func = no_func}, @@ -958,7 +958,7 @@ function Details:OpenForge() local source = Details.boss_mods_timers.encounter_timers_bw or {} - for key, timer in pairs (source) do + for key, timer in pairs(source) do local can_add = true if (lower_FilterBarName ~= "") then if (not lower (timer [3]):find (lower_FilterBarName)) then @@ -985,7 +985,7 @@ function Details:OpenForge() header = { {name = L["STRING_FORGE_HEADER_INDEX"], width = 40, type = "text", func = no_func}, {name = L["STRING_FORGE_HEADER_ICON"], width = 40, type = "texture"}, - {name = L["STRING_FORGE_HEADER_BARTEXT"], width = 200, type = "entry", func = no_func, onenter = function(self) GameTooltip:SetOwner (self.widget, "ANCHOR_TOPLEFT"); Details:GameTooltipSetSpellByID (self.id); GameTooltip:Show() end, onleave = function(self) GameTooltip:Hide() end}, + {name = L["STRING_FORGE_HEADER_BARTEXT"], width = 200, type = "entry", func = no_func, onenter = function(self) GameTooltip:SetOwner(self.widget, "ANCHOR_TOPLEFT"); Details:GameTooltipSetSpellByID (self.id); GameTooltip:Show() end, onleave = function(self) GameTooltip:Hide() end}, {name = L["STRING_FORGE_HEADER_SPELLID"], width = 50, type = "entry", func = no_func}, {name = L["STRING_FORGE_HEADER_TIMER"], width = 40, type = "entry", func = no_func}, {name = L["STRING_FORGE_HEADER_ENCOUNTERID"], width = 80, type = "entry", func = no_func}, @@ -1127,7 +1127,7 @@ function Details:OpenForge() end lastButton = b - tinsert (buttons, b) + tinsert(buttons, b) end select_module (nil, nil, 1) diff --git a/frames/window_main.lua b/frames/window_main.lua index 7689962ff..c5df21099 100644 --- a/frames/window_main.lua +++ b/frames/window_main.lua @@ -150,7 +150,7 @@ function Details:RefreshScrollBar(x) --x = amount of bars being refreshed end --self é a janela das barras -local function move_barras (self, elapsed) +local function move_barras(self, elapsed) self._move_func.time = self._move_func.time+elapsed if (self._move_func.time > 0.01) then @@ -179,7 +179,7 @@ local function move_barras (self, elapsed) end --self � a inst�ncia -function Details:MoveBarrasTo (destino) +function Details:MoveBarrasTo(destino) local janela = self.baseframe janela._move_func = { @@ -198,14 +198,14 @@ function Details:MoveBarrasTo (destino) end --almost deprecated -function Details:MostrarScrollBar (sem_animacao) +function Details:MostrarScrollBar(sem_animacao) if (self.rolagem) then return end if (not Details.use_scroll) then - self.baseframe:EnableMouseWheel (true) + self.baseframe:EnableMouseWheel(true) self.scroll:Enable() self.scroll:SetValue(0) self.rolagem = true @@ -229,7 +229,7 @@ function Details:MostrarScrollBar (sem_animacao) self.bgdisplay_loc = mover_para --cancel movement if any - if (self.baseframe:GetScript ("OnUpdate") and self.baseframe:GetScript ("OnUpdate") == move_barras) then + if (self.baseframe:GetScript("OnUpdate") and self.baseframe:GetScript("OnUpdate") == move_barras) then self.baseframe:SetScript("OnUpdate", nil) end end @@ -241,7 +241,7 @@ function Details:MostrarScrollBar (sem_animacao) self.rolagem = true self.scroll:Enable() - main:EnableMouseWheel (true) + main:EnableMouseWheel(true) self.scroll:SetValue(0) --set value pode chamar o atualizador self.baseframe.button_down:Enable() @@ -262,7 +262,7 @@ function Details:EsconderScrollBar (sem_animacao, force) if (not Details.use_scroll and not force) then self.scroll:Disable() - self.baseframe:EnableMouseWheel (false) + self.baseframe:EnableMouseWheel(false) self.rolagem = false return end @@ -278,14 +278,14 @@ function Details:EsconderScrollBar (sem_animacao, force) self.bgdisplay:SetPoint("bottomright", self.baseframe, "bottomright", 0, 0) -- voltar o background na poci��o inicial self.bar_mod = 0 -- zera o bar mod, uma vez que as barras v�o estar na pocis�o inicial self.bgdisplay_loc = -2 - if (self.baseframe:GetScript ("OnUpdate") and self.baseframe:GetScript ("OnUpdate") == move_barras) then + if (self.baseframe:GetScript("OnUpdate") and self.baseframe:GetScript("OnUpdate") == move_barras) then self.baseframe:SetScript("OnUpdate", nil) end end self.rolagem = false self.scroll:Disable() - main:EnableMouseWheel (false) + main:EnableMouseWheel(false) main.resize_direita:SetPoint("bottomright", main, "bottomright", 0, 0) if (main.isLocked) then @@ -294,14 +294,12 @@ function Details:EsconderScrollBar (sem_animacao, force) end local function OnLeaveMainWindow(instancia, self) - instancia.is_interacting = false - instancia:SetMenuAlpha (nil, nil, nil, nil, true) - instancia:SetAutoHideMenu (nil, nil, true) + instancia:SetMenuAlpha(nil, nil, nil, nil, true) + instancia:SetAutoHideMenu(nil, nil, true) instancia:RefreshAttributeTextSize() if (instancia.modo ~= Details._detalhes_props["MODO_ALONE"] and not instancia.baseframe.isLocked) then - --resizes, lock and ungroup buttons if (not Details.disable_lock_ungroup_buttons) then instancia.baseframe.resize_direita:SetAlpha(0) @@ -314,7 +312,6 @@ local function OnLeaveMainWindow(instancia, self) Details.FadeHandler.Fader(instancia.baseframe.button_stretch, "ALPHA", 0) elseif (instancia.modo ~= Details._detalhes_props["MODO_ALONE"] and instancia.baseframe.isLocked) then - --resizes, lock and ungroup buttons if (not Details.disable_lock_ungroup_buttons) then instancia.baseframe.lock_button:SetAlpha(0) @@ -322,15 +319,14 @@ local function OnLeaveMainWindow(instancia, self) end Details.FadeHandler.Fader(instancia.baseframe.button_stretch, "ALPHA", 0) - end end Details.OnLeaveMainWindow = OnLeaveMainWindow local function OnEnterMainWindow(instancia, self) instancia.is_interacting = true - instancia:SetMenuAlpha (nil, nil, nil, nil, true) - instancia:SetAutoHideMenu (nil, nil, true) + instancia:SetMenuAlpha(nil, nil, nil, nil, true) + instancia:SetAutoHideMenu(nil, nil, true) instancia:RefreshAttributeTextSize() if (not instancia.last_interaction or instancia.last_interaction < Details._tempo) then @@ -342,7 +338,6 @@ local function OnEnterMainWindow(instancia, self) end if (instancia.modo ~= Details._detalhes_props["MODO_ALONE"] and not instancia.baseframe.isLocked) then - --resize, lock and ungroup buttons if (not Details.disable_lock_ungroup_buttons) then instancia.baseframe.resize_direita:SetAlpha(1) @@ -350,7 +345,7 @@ local function OnEnterMainWindow(instancia, self) instancia.baseframe.lock_button:SetAlpha(1) --ungroup - for _, instancia_id in pairs (instancia.snap) do + for _, instancia_id in pairs(instancia.snap) do if (instancia_id) then instancia.break_snap_button:SetAlpha(1) break @@ -364,12 +359,11 @@ local function OnEnterMainWindow(instancia, self) end elseif (instancia.modo ~= Details._detalhes_props["MODO_ALONE"] and instancia.baseframe.isLocked) then - if (not Details.disable_lock_ungroup_buttons) then instancia.baseframe.lock_button:SetAlpha(1) --ungroup - for _, instancia_id in pairs (instancia.snap) do + for _, instancia_id in pairs(instancia.snap) do if (instancia_id) then instancia.break_snap_button:Show() instancia.break_snap_button:SetAlpha(1) @@ -383,6 +377,7 @@ local function OnEnterMainWindow(instancia, self) end end end + Details.OnEnterMainWindow = OnEnterMainWindow local function VPL (instancia, esta_instancia) @@ -440,7 +435,6 @@ local color_green = {0.2, 1, 0.2} local pixels_per_arrow = 50 local show_instance_ids = function() - for id, instance in Details:ListInstances() do if (instance:IsEnabled()) then local id_texture1 = instance.baseframe.id_texture1 @@ -540,7 +534,7 @@ local update_line = function(self, target_frame) ball:SetSize(16, 16) ball:SetAlpha(0.3) ball:SetTexCoord(410/512, 426/512, 2/512, 18/512) - tinsert (guide_balls, ball) + tinsert(guide_balls, ball) end ball:ClearAllPoints() @@ -620,7 +614,7 @@ local movement_onupdate = function(self, elapsed) end end - instancia_alvo.h_esquerda:Flash (1, 1, 2.0, false, 0, 0) + instancia_alvo.h_esquerda:Flash(1, 1, 2.0, false, 0, 0) tem_livre = true elseif (lado == 2) then @@ -647,7 +641,7 @@ local movement_onupdate = function(self, elapsed) end end - instancia_alvo.h_baixo:Flash (1, 1, 2.0, false, 0, 0) + instancia_alvo.h_baixo:Flash(1, 1, 2.0, false, 0, 0) tem_livre = true elseif (lado == 3) then @@ -673,7 +667,7 @@ local movement_onupdate = function(self, elapsed) end end - instancia_alvo.h_direita:Flash (1, 1, 2.0, false, 0, 0) + instancia_alvo.h_direita:Flash(1, 1, 2.0, false, 0, 0) tem_livre = true elseif (lado == 4) then @@ -689,7 +683,7 @@ local movement_onupdate = function(self, elapsed) texture:SetPoint("bottomright", instancia_alvo.baseframe, "topright", 0, 0) end - instancia_alvo.h_cima:Flash (1, 1, 2.0, false, 0, 0) + instancia_alvo.h_cima:Flash(1, 1, 2.0, false, 0, 0) tem_livre = true end @@ -702,7 +696,7 @@ local movement_onupdate = function(self, elapsed) Details.snap_alert.playing = true if (not DetailsFramework.IsTimewalkWoW()) then - Details.MicroButtonAlert.Text:SetText(string.format (Loc["STRING_ATACH_DESC"], self.instance.meu_id, instancia_alvo.meu_id)) + Details.MicroButtonAlert.Text:SetText(string.format(Loc["STRING_ATACH_DESC"], self.instance.meu_id, instancia_alvo.meu_id)) Details.MicroButtonAlert:SetPoint("bottom", instancia_alvo.baseframe.cabecalho.modo_selecao.widget, "top", 0, 18) Details.MicroButtonAlert:SetHeight(200) Details.MicroButtonAlert:Show() @@ -723,7 +717,6 @@ local movement_onupdate = function(self, elapsed) end local function move_janela(baseframe, iniciando, instancia, just_updating) - instancia_alvo = Details.tabela_instancias [instancia.meu_id-1] if (Details.disable_window_groups) then instancia_alvo = nil @@ -761,13 +754,13 @@ local function move_janela(baseframe, iniciando, instancia, just_updating) start_draw_lines = 0 need_show_group_guide = nil - for lado, snap_to in pairs (instancia_alvo.snap) do + for lado, snap_to in pairs(instancia_alvo.snap) do if (snap_to == instancia.meu_id) then start_draw_lines = false end end - for lado, snap_to in pairs (instancia_alvo.snap) do + for lado, snap_to in pairs(instancia_alvo.snap) do if (snap_to) then if (snap_to == instancia.meu_id) then tempo_fades = nil @@ -818,7 +811,7 @@ local function move_janela(baseframe, iniciando, instancia, just_updating) else --eh a instancia 1 local got_snap - for side, instance_id in pairs (instancia.snap) do + for side, instance_id in pairs(instancia.snap) do if (instance_id) then got_snap = true end @@ -837,7 +830,6 @@ local function move_janela(baseframe, iniciando, instancia, just_updating) end else - baseframe:StopMovingOrSizing() baseframe.isMoving = false baseframe:SetScript("OnUpdate", nil) @@ -884,7 +876,7 @@ local function move_janela(baseframe, iniciando, instancia, just_updating) end if (_L) then - if (not instancia:EstaAgrupada (instancia_alvo, _L)) then + if (not instancia:EstaAgrupada(instancia_alvo, _L)) then esquerda = instancia_alvo.meu_id instancia.horizontalSnap = true instancia_alvo.horizontalSnap = true @@ -892,7 +884,7 @@ local function move_janela(baseframe, iniciando, instancia, just_updating) end if (_B) then - if (not instancia:EstaAgrupada (instancia_alvo, _B)) then + if (not instancia:EstaAgrupada(instancia_alvo, _B)) then baixo = instancia_alvo.meu_id instancia.verticalSnap = true instancia_alvo.verticalSnap = true @@ -900,7 +892,7 @@ local function move_janela(baseframe, iniciando, instancia, just_updating) end if (_R) then - if (not instancia:EstaAgrupada (instancia_alvo, _R)) then + if (not instancia:EstaAgrupada(instancia_alvo, _R)) then direita = instancia_alvo.meu_id instancia.horizontalSnap = true instancia_alvo.horizontalSnap = true @@ -908,7 +900,7 @@ local function move_janela(baseframe, iniciando, instancia, just_updating) end if (_T) then - if (not instancia:EstaAgrupada (instancia_alvo, _T)) then + if (not instancia:EstaAgrupada(instancia_alvo, _T)) then cima = instancia_alvo.meu_id instancia.verticalSnap = true instancia_alvo.verticalSnap = true @@ -916,10 +908,10 @@ local function move_janela(baseframe, iniciando, instancia, just_updating) end if (esquerda or baixo or direita or cima) then - instancia:agrupar_janelas ({esquerda, baixo, direita, cima}) + instancia:agrupar_janelas({esquerda, baixo, direita, cima}) --tutorial - if (not Details:GetTutorialCVar ("WINDOW_GROUP_MAKING1")) then + if (not Details:GetTutorialCVar("WINDOW_GROUP_MAKING1")) then Details:SetTutorialCVar ("WINDOW_GROUP_MAKING1", true) local group_tutorial = CreateFrame("frame", "DetailsWindowGroupPopUp1", instancia.baseframe, "DetailsHelpBoxTemplate") @@ -983,9 +975,9 @@ local function move_janela(baseframe, iniciando, instancia, just_updating) instancia_alvo.h_direita:Stop() instancia_alvo.h_cima:Stop() end - end end + Details.move_janela_func = move_janela local BGFrame_scripts_onenter = function(self) @@ -997,10 +989,9 @@ local BGFrame_scripts_onleave = function(self) end local BGFrame_scripts_onmousedown = function(self, button) - -- /run Details.disable_stretch_from_toolbar = true if (self.is_toolbar and self._instance.baseframe.isLocked and button == "LeftButton" and not Details.disable_stretch_from_toolbar) then - return self._instance.baseframe.button_stretch:GetScript ("OnMouseDown") (self._instance.baseframe.button_stretch, "LeftButton") + return self._instance.baseframe.button_stretch:GetScript("OnMouseDown") (self._instance.baseframe.button_stretch, "LeftButton") end if (self._instance.baseframe.isMoving) then @@ -1016,6 +1007,7 @@ local BGFrame_scripts_onmousedown = function(self, button) self._instance.menu_attribute_string:SetPoint("bottomleft", self._instance.baseframe.cabecalho.ball, "bottomright", self._instance.attribute_text.anchor [1]+1, self._instance.attribute_text.anchor [2]-1) end end + elseif (button == "RightButton") then if (self.is_toolbar and not Details.disable_alldisplays_window) then self._instance:ShowAllSwitch() @@ -1023,19 +1015,18 @@ local BGFrame_scripts_onmousedown = function(self, button) if (Details.switch.current_instancia and Details.switch.current_instancia == self._instance) then Details.switch:CloseMe() else - Details.switch:ShowMe (self._instance) + Details.switch:ShowMe(self._instance) end end end end local BGFrame_scripts_onmouseup = function(self, button) - if (self.is_toolbar and self._instance.baseframe.isLocked and button == "LeftButton") then if (DetailsWindowLockPopUp1 and DetailsWindowLockPopUp1:IsShown()) then _G ["DetailsWindowLockPopUp1"]:Hide() end - return self._instance.baseframe.button_stretch:GetScript ("OnMouseUp") (self._instance.baseframe.button_stretch, "LeftButton") + return self._instance.baseframe.button_stretch:GetScript("OnMouseUp") (self._instance.baseframe.button_stretch, "LeftButton") end if (self._instance.baseframe.isMoving) then @@ -1057,8 +1048,7 @@ local function BGFrame_scripts(BG, baseframe, instancia) BG:SetScript("OnMouseUp", BGFrame_scripts_onmouseup) end -function gump:RegisterForDetailsMove (frame, instancia) - +function gump:RegisterForDetailsMove(frame, instancia) frame:SetScript("OnMouseDown", function(frame, button) if (not instancia.baseframe.isLocked and button == "LeftButton") then move_janela(instancia.baseframe, true, instancia) --novo movedor da janela @@ -1124,7 +1114,7 @@ end local function instancias_horizontais (instancia, largura, esquerda, direita) if (esquerda) then - for lado, esta_instancia in pairs (instancia.snap) do + for lado, esta_instancia in pairs(instancia.snap) do if (lado == 1) then --movendo para esquerda local instancia = Details.tabela_instancias [esta_instancia] instancia.baseframe:SetWidth(largura) @@ -1138,7 +1128,7 @@ local function instancias_horizontais (instancia, largura, esquerda, direita) end if (direita) then - for lado, esta_instancia in pairs (instancia.snap) do + for lado, esta_instancia in pairs(instancia.snap) do if (lado == 3) then --movendo para esquerda local instancia = Details.tabela_instancias [esta_instancia] instancia.baseframe:SetWidth(largura) @@ -1154,7 +1144,7 @@ end local function instancias_verticais (instancia, altura, esquerda, direita) if (esquerda) then - for lado, esta_instancia in pairs (instancia.snap) do + for lado, esta_instancia in pairs(instancia.snap) do if (lado == 1) then --movendo para esquerda local instancia = Details.tabela_instancias [esta_instancia] if (instancia:IsEnabled()) then @@ -1170,7 +1160,7 @@ local function instancias_verticais (instancia, altura, esquerda, direita) end if (direita) then - for lado, esta_instancia in pairs (instancia.snap) do + for lado, esta_instancia in pairs(instancia.snap) do if (lado == 3) then --movendo para esquerda local instancia = Details.tabela_instancias [esta_instancia] if (instancia:IsEnabled()) then @@ -1187,15 +1177,14 @@ local function instancias_verticais (instancia, altura, esquerda, direita) end local check_snap_side = function(instanceid, snap, id, container) - local instance = Details:GetInstance (instanceid) + local instance = Details:GetInstance(instanceid) if (instance and instance.snap [snap] and instance.snap [snap] == id) then - tinsert (container, instance) + tinsert(container, instance) return true end end -function Details:InstanciasVerticais (instance) - +function Details:InstanciasVerticais(instance) instance = self or instance local on_top = {} @@ -1203,7 +1192,7 @@ function Details:InstanciasVerticais (instance) local id = instance:GetId() --lower instances - local this_instance = Details:GetInstance (id-1) + local this_instance = Details:GetInstance(id-1) if (this_instance) then --top side if (this_instance.snap [2] and this_instance.snap [2] == id) then @@ -1231,7 +1220,7 @@ function Details:InstanciasVerticais (instance) end --upper instances - local this_instance = Details:GetInstance (id+1) + local this_instance = Details:GetInstance(id+1) if (this_instance) then --top side if (this_instance.snap [2] and this_instance.snap [2] == id) then @@ -1285,7 +1274,7 @@ function Details:InstanciasVerticais (instance) end bottom_clamp = bottom_clamp + 20 bottom_clamp = bottom_clamp + this_instance.baseframe:GetHeight() - tinsert (on_top, this_instance) + tinsert(on_top, this_instance) end return on_top, bottom_clamp, top_clamp @@ -1302,8 +1291,7 @@ lado 1 | | lado 3 lado 2 --]] -function Details:InstanciasHorizontais (instancia) - +function Details:InstanciasHorizontais(instancia) instancia = self or instancia local linha_horizontal, esquerda, direita = {}, 0, 0 @@ -1327,6 +1315,7 @@ function Details:InstanciasHorizontais (instancia) break end end + elseif (check_index_anterior.snap[1] and check_index_anterior.snap[1] == instancia.meu_id) then --o index negativo vai para a direita for i = instancia.meu_id-1, 1, -1 do local esta_instancia = Details.tabela_instancias [i] @@ -1360,6 +1349,7 @@ function Details:InstanciasHorizontais (instancia) break end end + elseif (check_index_posterior.snap[1] and check_index_posterior.snap[1] == instancia.meu_id) then --o index posterior vai para a direita for i = instancia.meu_id+1, #Details.tabela_instancias do local esta_instancia = Details.tabela_instancias [i] @@ -1396,7 +1386,7 @@ local resizeTooltip = { --search key: ~resizescript local resize_scripts_onmousedown = function(self, button) - _G.GameCooltip:ShowMe (false) --Hide Cooltip + _G.GameCooltip:ShowMe(false) --Hide Cooltip if (Details.disable_lock_ungroup_buttons) then return @@ -1424,18 +1414,19 @@ local resize_scripts_onmousedown = function(self, button) end end - ---------------- - if (self._myside == "<") then if (_IsShiftKeyDown()) then self._instance.baseframe:StartSizing("left") self._instance.eh_horizontal = true + elseif (_IsAltKeyDown()) then self._instance.baseframe:StartSizing("top") self._instance.eh_vertical = true + elseif (_IsControlKeyDown()) then self._instance.baseframe:StartSizing("bottomleft") self._instance.eh_tudo = true + else self._instance.baseframe:StartSizing("bottomleft") end @@ -1445,16 +1436,19 @@ local resize_scripts_onmousedown = function(self, button) elseif (self._myside == ">") then if (_IsShiftKeyDown()) then - self._instance.baseframe:StartSizing ("right") + self._instance.baseframe:StartSizing("right") self._instance.eh_horizontal = true + elseif (_IsAltKeyDown()) then - self._instance.baseframe:StartSizing ("top") + self._instance.baseframe:StartSizing("top") self._instance.eh_vertical = true + elseif (_IsControlKeyDown()) then - self._instance.baseframe:StartSizing ("bottomright") + self._instance.baseframe:StartSizing("bottomright") self._instance.eh_tudo = true + else - self._instance.baseframe:StartSizing ("bottomright") + self._instance.baseframe:StartSizing("bottomright") end if (self._instance.rolagem and Details.use_scroll) then @@ -1468,15 +1462,13 @@ local resize_scripts_onmousedown = function(self, button) Details:SendEvent("DETAILS_INSTANCE_STARTRESIZE", nil, self._instance) if (Details.update_speed > 0.3) then - Details:SetWindowUpdateSpeed (0.3, true) + Details:SetWindowUpdateSpeed(0.3, true) Details.resize_changed_update_speed = true end - end end -local resize_scripts_onmouseup = function(self, button) - +local resizeScriptsOnMouseUp = function(self, button) if (Details.disable_lock_ungroup_buttons) then return end @@ -1495,7 +1487,6 @@ local resize_scripts_onmouseup = function(self, button) end if (self:GetParent().isResizing) then - self:GetParent():StopMovingOrSizing() self:GetParent().isResizing = false @@ -1519,12 +1510,12 @@ local resize_scripts_onmouseup = function(self, button) local altura = self._instance.baseframe:GetHeight() if (self._instance.eh_horizontal) then - instancias_horizontais (self._instance, largura, true, true) + instancias_horizontais(self._instance, largura, true, true) self._instance.eh_horizontal = nil end --if (instancia.eh_vertical) then - instancias_verticais (self._instance, altura, true, true) + instancias_verticais(self._instance, altura, true, true) self._instance.eh_vertical = nil --end @@ -1565,42 +1556,39 @@ local resize_scripts_onmouseup = function(self, button) end if (Details.resize_changed_update_speed) then - Details:SetWindowUpdateSpeed (false, true) + Details:SetWindowUpdateSpeed(false, true) Details.resize_changed_update_speed = nil end - end end -local resize_scripts_onhide = function(self) +local resizeScriptsOnHide = function(self) if (self.going_hide) then - _G.GameCooltip:ShowMe (false) + _G.GameCooltip:ShowMe(false) self.going_hide = nil end end -local resize_scripts_onenter = function(self) - +local resizeScriptsOnEnter = function(self) if (Details.disable_lock_ungroup_buttons) then return end if (self._instance.modo ~= Details._detalhes_props["MODO_ALONE"] and not self._instance.baseframe.isLocked and not self.mostrando) then - OnEnterMainWindow(self._instance, self) self.texture:SetBlendMode("ADD") self.mostrando = true - Details:CooltipPreset (2.1) - GameCooltip:AddFromTable (resizeTooltip) + Details:CooltipPreset(2.1) + GameCooltip:AddFromTable(resizeTooltip) - GameCooltip:SetOwner (self) + GameCooltip:SetOwner(self) GameCooltip:ShowCooltip() end end -local resize_scripts_onleave = function(self) +local resizeScriptsOnLeave = function(self) if (self.mostrando) then self.going_hide = true if (not self.movendo) then @@ -1610,19 +1598,19 @@ local resize_scripts_onleave = function(self) self.texture:SetBlendMode("BLEND") self.mostrando = false - GameCooltip:ShowMe (false) + GameCooltip:ShowMe(false) end end -local function resize_scripts (resizer, instancia, scrollbar, side, baseframe) +local setWindowResizeScripts = function(resizer, instancia, scrollbar, side, baseframe) resizer._instance = instancia resizer._myside = side resizer:SetScript("OnMouseDown", resize_scripts_onmousedown) - resizer:SetScript("OnMouseUp", resize_scripts_onmouseup) - resizer:SetScript("OnHide", resize_scripts_onhide) - resizer:SetScript("OnEnter", resize_scripts_onenter) - resizer:SetScript("OnLeave", resize_scripts_onleave) + resizer:SetScript("OnMouseUp", resizeScriptsOnMouseUp) + resizer:SetScript("OnHide", resizeScriptsOnHide) + resizer:SetScript("OnEnter", resizeScriptsOnEnter) + resizer:SetScript("OnLeave", resizeScriptsOnLeave) end local lockButtonTooltip = { @@ -1631,7 +1619,6 @@ local lockButtonTooltip = { } local lockFunctionOnEnter = function(self) - if (Details.disable_lock_ungroup_buttons) then return end @@ -1643,11 +1630,11 @@ local lockFunctionOnEnter = function(self) self.label:SetTextColor(1, 1, 1, .6) - Details:CooltipPreset (2.1) + Details:CooltipPreset(2.1) GameCooltip:SetOption("FixedWidth", 180) - GameCooltip:AddFromTable (lockButtonTooltip) + GameCooltip:AddFromTable(lockButtonTooltip) - GameCooltip:SetOwner (self) + GameCooltip:SetOwner(self) GameCooltip:ShowCooltip() end end @@ -1658,20 +1645,20 @@ local lockFunctionOnLeave = function(self) OnLeaveMainWindow(self.instancia, self) self.label:SetTextColor(.6, .6, .6, .7) self.mostrando = false - GameCooltip:ShowMe (false) + GameCooltip:ShowMe(false) end end local lockFunctionOnHide = function(self) if (self.going_hide) then - GameCooltip:ShowMe (false) + GameCooltip:ShowMe(false) self.going_hide = nil end end -function Details:DelayOptionsRefresh (instance, no_reopen) +function Details:DelayOptionsRefresh(instance, noReopen) if (_G.DetailsOptionsWindow and _G.DetailsOptionsWindow:IsShown()) then - Details:ScheduleTimer ("OpenOptionsWindow", 0.1, {instance or _G.DetailsOptionsWindow.instance, no_reopen}) + Details:ScheduleTimer ("OpenOptionsWindow", 0.1, {instance or _G.DetailsOptionsWindow.instance, noReopen}) end end @@ -1695,7 +1682,6 @@ function Details:RefreshLockedState() end local lockFunctionOnClick = function(button, button_type, button2, isFromOptionsButton) - --isFromOptionsButton is true when the call if from the button in the display section of the options panel if (Details.disable_lock_ungroup_buttons and isFromOptionsButton ~= true) then return @@ -1721,7 +1707,7 @@ local lockFunctionOnClick = function(button, button_type, button2, isFromOptions button:SetPoint("right", baseframe.resize_direita, "left", -1, 1.5) else --tutorial - if (not Details:GetTutorialCVar ("WINDOW_LOCK_UNLOCK1") and not Details.initializing) then + if (not Details:GetTutorialCVar("WINDOW_LOCK_UNLOCK1") and not Details.initializing) then Details:SetTutorialCVar ("WINDOW_LOCK_UNLOCK1", true) local lock_tutorial = CreateFrame("frame", "DetailsWindowLockPopUp1", baseframe, "DetailsHelpBoxTemplate") @@ -1756,20 +1742,19 @@ local unSnapButtonTooltip = { } local unSnapButtonOnEnter = function(self) - if (Details.disable_lock_ungroup_buttons) then return end - local have_snap = false - for _, instancia_id in pairs (self.instancia.snap) do + local haveSnap = false + for _, instancia_id in pairs(self.instancia.snap) do if (instancia_id) then - have_snap = true + haveSnap = true break end end - if (not have_snap) then + if (not haveSnap) then OnEnterMainWindow(self.instancia, self) self.mostrando = true return @@ -1778,12 +1763,11 @@ local unSnapButtonOnEnter = function(self) OnEnterMainWindow(self.instancia, self) self.mostrando = true - Details:CooltipPreset (2.1) + Details:CooltipPreset(2.1) GameCooltip:SetOption("FixedWidth", 180) - GameCooltip:AddFromTable (unSnapButtonTooltip) - - GameCooltip:ShowCooltip (self, "tooltip") + GameCooltip:AddFromTable(unSnapButtonTooltip) + GameCooltip:ShowCooltip(self, "tooltip") end local unSnapButtonOnLeave = function(self) @@ -1795,49 +1779,48 @@ local unSnapButtonOnLeave = function(self) end --this should run only when the mouse is over a instance bar -local shift_monitor = function(self) - +local shiftMonitor = function(self) if (not self:IsMouseOver()) then - self:SetScript("OnUpdate", shift_monitor) + self:SetScript("OnUpdate", nil) return end if (_IsShiftKeyDown()) then if (not self.showing_allspells) then self.showing_allspells = true - local instancia = Details:GetInstance (self.instance_id) + local instancia = Details:GetInstance(self.instance_id) instancia:MontaTooltip(self, self.row_id, "shift") end elseif (self.showing_allspells) then self.showing_allspells = false - local instancia = Details:GetInstance (self.instance_id) + local instancia = Details:GetInstance(self.instance_id) instancia:MontaTooltip(self, self.row_id) end if (_IsControlKeyDown()) then if (not self.showing_alltargets) then self.showing_alltargets = true - local instancia = Details:GetInstance (self.instance_id) + local instancia = Details:GetInstance(self.instance_id) instancia:MontaTooltip(self, self.row_id, "ctrl") end elseif (self.showing_alltargets) then self.showing_alltargets = false - local instancia = Details:GetInstance (self.instance_id) + local instancia = Details:GetInstance(self.instance_id) instancia:MontaTooltip(self, self.row_id) end if (_IsAltKeyDown()) then if (not self.showing_allpets) then self.showing_allpets = true - local instancia = Details:GetInstance (self.instance_id) + local instancia = Details:GetInstance(self.instance_id) instancia:MontaTooltip(self, self.row_id, "alt") end elseif (self.showing_allpets) then self.showing_allpets = false - local instancia = Details:GetInstance (self.instance_id) + local instancia = Details:GetInstance(self.instance_id) instancia:MontaTooltip(self, self.row_id) end end @@ -1847,6 +1830,7 @@ local barra_backdrop_onenter = { tile = true, tileSize = 16, insets = {left = 1, right = 1, top = 0, bottom = 1} } + local barra_backdrop_onleave = { bgFile = "", edgeFile = "", tile = true, tileSize = 16, edgeSize = 32, @@ -1857,10 +1841,11 @@ local barra_backdrop_onleave = { Details.left_anti_truncate = CreateFrame("frame", "DetailsLeftTextAntiTruncate", UIParent,"BackdropTemplate") Details.left_anti_truncate:SetBackdrop(defaultBackdropSt) Details.left_anti_truncate:SetBackdropColor(0, 0, 0, 0.8) - Details.left_anti_truncate:SetFrameStrata ("FULLSCREEN") + Details.left_anti_truncate:SetFrameStrata("FULLSCREEN") Details.left_anti_truncate.text = Details.left_anti_truncate:CreateFontString(nil, "overlay", "GameFontNormal") Details.left_anti_truncate.text:SetPoint("left", Details.left_anti_truncate, "left", 3, 0) +--@self: instance line (row) local lineScript_Onenter = function(self) self.mouse_over = true OnEnterMainWindow(self._instance, self) @@ -1892,8 +1877,14 @@ local lineScript_Onenter = function(self) lefttext.untruncated = true end - self:SetScript("OnUpdate", shift_monitor) + self:SetScript("OnUpdate", shiftMonitor) + local classIcon = self:GetClassIcon() + self.iconHighlight:SetTexture(classIcon:GetTexture()) + self.iconHighlight:SetTexCoord(classIcon:GetTexCoord()) + self.iconHighlight:SetVertexColor(classIcon:GetVertexColor()) + self.iconHighlight:SetBlendMode("ADD") + self.iconHighlight:SetAlpha(0.3) self.iconHighlight:Show() end @@ -1902,7 +1893,7 @@ local lineScript_Onleave = function(self) OnLeaveMainWindow(self._instance, self) --_GameTooltip:Hide() - GameCooltip:ShowMe (false) + GameCooltip:ShowMe(false) self:SetBackdrop(barra_backdrop_onleave) self:SetBackdropBorderColor(0, 0, 0, 0) @@ -1934,7 +1925,7 @@ local lineScript_Onmousedown = function(self, button) end if (button == "RightButton") then - return Details.switch:ShowMe (self._instance) + return Details.switch:ShowMe(self._instance) elseif (button == "LeftButton") then @@ -2295,10 +2286,10 @@ end local icon_frame_events = Details:CreateEventListener() function icon_frame_events:EnterCombat() - for anim, _ in pairs (Details.icon_animations.load.in_use) do + for anim, _ in pairs(Details.icon_animations.load.in_use) do anim.anim:Stop() anim:Hide() - tinsert (Details.icon_animations.load.available, anim) + tinsert(Details.icon_animations.load.available, anim) anim.icon_frame.icon_animation = nil anim.icon_frame = nil @@ -2363,7 +2354,7 @@ end local icon_frame_create_animation = function() local f = CreateFrame("frame", nil, UIParent) - f:SetFrameStrata ("FULLSCREEN") + f:SetFrameStrata("FULLSCREEN") f.anim = f:CreateAnimationGroup() f.rotate = f.anim:CreateAnimation("Rotation") f.rotate:SetDegrees(360) @@ -2375,24 +2366,24 @@ local icon_frame_create_animation = function() t:SetAlpha(0.7) t:SetAllPoints() - tinsert (Details.icon_animations.load.available, f) + tinsert(Details.icon_animations.load.available, f) end local icon_frame_on_click_down = function(self) local instanceID = self.instance_id - local instanceObject = Details:GetInstance (instanceID) + local instanceObject = Details:GetInstance(instanceID) self:GetParent():GetParent().icone_classe:SetPoint("left", self:GetParent():GetParent(), "left", instanceObject.row_info.icon_offset[1] + 1, instanceObject.row_info.icon_offset[2] + -1) end local icon_frame_on_click_up = function(self, button) local instanceID = self.instance_id - local instanceObject = Details:GetInstance (instanceID) + local instanceObject = Details:GetInstance(instanceID) self:GetParent():GetParent().icone_classe:SetPoint("left", self:GetParent():GetParent(), "left", instanceObject.row_info.icon_offset[1], instanceObject.row_info.icon_offset[2]) if (button == "LeftButton") then --open the rank panel - local instance = Details:GetInstance (self.row.instance_id) + local instance = Details:GetInstance(self.row.instance_id) if (instance) then local attribute, subattribute = instance:GetDisplay() local combat = instance:GetShowingCombat() @@ -2473,7 +2464,7 @@ local icon_frame_on_click_up = function(self, button) anim:Show() anim:SetParent(self) anim:ClearAllPoints() - anim:SetFrameStrata ("TOOLTIP") + anim:SetFrameStrata("TOOLTIP") anim:SetPoint("center", self, "center") anim:SetSize(self:GetWidth()*1.7, self:GetHeight()*1.7) @@ -2598,10 +2589,10 @@ local function button_stretch_scripts (baseframe, backgrounddisplay, instancia) end if (instancia.stretch_button_side == 1) then - baseframe:StartSizing ("top") + baseframe:StartSizing("top") baseframe.stretch_direction = "top" elseif (instancia.stretch_button_side == 2) then - baseframe:StartSizing ("bottom") + baseframe:StartSizing("bottom") baseframe.stretch_direction = "bottom" end @@ -2657,7 +2648,7 @@ local function button_stretch_scripts (baseframe, backgrounddisplay, instancia) --change the update speed if (Details.update_speed > 0.3) then - Details:SetWindowUpdateSpeed (0.3, true) + Details:SetWindowUpdateSpeed(0.3, true) Details.stretch_changed_update_speed = true end @@ -3014,7 +3005,7 @@ function Details:InstanceAlert (msg, icon, time, clickfunc, doflash, forceAlert) if (not self.meu_id) then local lower = Details:GetLowerInstanceNumber() if (lower) then - self = Details:GetInstance (lower) + self = Details:GetInstance(lower) else return end @@ -3076,8 +3067,8 @@ function Details:InstanceAlert (msg, icon, time, clickfunc, doflash, forceAlert) self.alert:SetPoint("left", self.baseframe, "left", 3, 0) self.alert:SetPoint("right", self.baseframe, "right", -3, 0) - self.alert:SetFrameStrata ("TOOLTIP") - self.alert.button:SetFrameStrata ("TOOLTIP") + self.alert:SetFrameStrata("TOOLTIP") + self.alert.button:SetFrameStrata("TOOLTIP") self.alert:Show() @@ -3106,7 +3097,7 @@ local function CreateAlertFrame (baseframe, instancia) frame_upper:SetPoint("left", baseframe, "left", 3, 0) frame_upper:SetPoint("right", baseframe, "right", -3, 0) frame_upper:SetHeight(13) - frame_upper:SetFrameStrata ("TOOLTIP") + frame_upper:SetFrameStrata("TOOLTIP") local frame_lower = CreateFrame("frame", "DetailsAlertFrameScrollChild" .. instancia.meu_id, frame_upper) frame_lower:SetHeight(25) @@ -3122,7 +3113,7 @@ local function CreateAlertFrame (baseframe, instancia) alert_bg:SetBackdrop({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}}) alert_bg:SetBackdropColor(.1, .1, .1, 1) - alert_bg:SetFrameStrata ("FULLSCREEN") + alert_bg:SetFrameStrata("FULLSCREEN") alert_bg:SetFrameLevel(baseframe:GetFrameLevel() + 6) alert_bg:Hide() @@ -3144,7 +3135,7 @@ local function CreateAlertFrame (baseframe, instancia) rotate_frame:SetWidth(12) rotate_frame:SetPoint("right", alert_bg, "right", -2, 0) rotate_frame:SetHeight(alert_bg:GetWidth()) - rotate_frame:SetFrameStrata ("FULLSCREEN") + rotate_frame:SetFrameStrata("FULLSCREEN") local icon = rotate_frame:CreateTexture(nil, "overlay") icon:SetPoint("center", rotate_frame, "center") @@ -3153,7 +3144,7 @@ local function CreateAlertFrame (baseframe, instancia) local button = CreateFrame("button", "DetailsInstance"..instancia.meu_id.."AlertButton", alert_bg) button:SetAllPoints() - button:SetFrameStrata ("FULLSCREEN") + button:SetFrameStrata("FULLSCREEN") button:SetScript("OnClick", alert_on_click) button._instance = instancia button.func_param = {} @@ -3303,7 +3294,7 @@ end Details.snap_alert = CreateFrame("frame", "DetailsSnapAlertFrame", UIParent, "ActionBarButtonSpellActivationAlert") Details.snap_alert:Hide() -Details.snap_alert:SetFrameStrata ("FULLSCREEN") +Details.snap_alert:SetFrameStrata("FULLSCREEN") function Details:SnapAlert() Details.snap_alert:ClearAllPoints() @@ -3328,7 +3319,7 @@ do tooltip_anchor:SetScript("OnEnter", function(self) tooltip_anchor.alert.animIn:Stop() tooltip_anchor.alert.animOut:Play() - GameTooltip:SetOwner (self, "ANCHOR_TOPLEFT") + GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT") GameTooltip:ClearLines() GameTooltip:AddLine(Loc["STRING_OPTIONS_TOOLTIPS_ANCHOR_TEXT_DESC"]) GameTooltip:Show() @@ -3367,14 +3358,14 @@ do self:SetAlpha(1) self:EnableMouse(true) self:SetMovable (true) - self:SetFrameStrata ("FULLSCREEN") + self:SetFrameStrata("FULLSCREEN") self.locked = false tooltip_anchor.alert.animOut:Stop() tooltip_anchor.alert.animIn:Play() else self:SetAlpha(0) self:EnableMouse(false) - self:SetFrameStrata ("MEDIUM") + self:SetFrameStrata("MEDIUM") self:SetMovable (false) self.locked = true tooltip_anchor.alert.animIn:Stop() @@ -3394,7 +3385,7 @@ do end tooltip_anchor.alert = CreateFrame("frame", "DetailsTooltipAnchorAlert", UIParent, "ActionBarButtonSpellActivationAlert") - tooltip_anchor.alert:SetFrameStrata ("FULLSCREEN") + tooltip_anchor.alert:SetFrameStrata("FULLSCREEN") tooltip_anchor.alert:Hide() tooltip_anchor.alert:SetPoint("topleft", tooltip_anchor, "topleft", -60, 6) tooltip_anchor.alert:SetPoint("bottomright", tooltip_anchor, "bottomright", 40, -6) @@ -3474,7 +3465,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando) --row frame is the parent of rows, it have setallpoints on baseframe local rowframe = CreateFrame("frame", "DetailsRowFrame"..ID, _UIParent) --row frame rowframe:SetAllPoints(baseframe) - rowframe:SetFrameStrata (baseframe_strata) + rowframe:SetFrameStrata(baseframe_strata) rowframe:SetFrameLevel(3) rowframe:EnableMouse(false) instancia.rowframe = rowframe @@ -3487,14 +3478,14 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando) --right click bookmark local switchbutton = CreateFrame("button", "Details_SwitchButtonFrame" .. ID, UIParent) switchbutton:SetAllPoints(baseframe) - switchbutton:SetFrameStrata (baseframe_strata) + switchbutton:SetFrameStrata(baseframe_strata) switchbutton:SetFrameLevel(4) instancia.windowSwitchButton = switchbutton --avoid mouse hover over a high window when the menu is open for a lower instance. local anti_menu_overlap = CreateFrame("frame", "Details_WindowFrameAntiMenuOverlap" .. ID, UIParent) anti_menu_overlap:SetSize(100, 13) - anti_menu_overlap:SetFrameStrata ("DIALOG") + anti_menu_overlap:SetFrameStrata("DIALOG") anti_menu_overlap:EnableMouse(true) anti_menu_overlap:Hide() --anti_menu_overlap:SetBackdrop(gump_fundo_backdrop) --debug @@ -3607,7 +3598,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando) baseframe:SetSize(Details.new_window_size.width, Details.new_window_size.height) baseframe:SetPoint("center", _UIParent) - baseframe:EnableMouseWheel (false) + baseframe:EnableMouseWheel(false) baseframe:EnableMouse(true) if (not DetailsFramework.IsDragonflight()) then @@ -3690,7 +3681,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando) baseframe.resize_direita:SetHeight(16) baseframe.resize_direita:SetPoint("bottomright", baseframe, "bottomright", 0, 0) baseframe.resize_direita:EnableMouse(true) - baseframe.resize_direita:SetFrameStrata ("HIGH") + baseframe.resize_direita:SetFrameStrata("HIGH") baseframe.resize_direita:SetFrameLevel(baseframe:GetFrameLevel() + 6) baseframe.resize_direita.side = 2 @@ -3710,7 +3701,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando) baseframe.lock_button:SetScript("OnEnter", lockFunctionOnEnter) baseframe.lock_button:SetScript("OnLeave", lockFunctionOnLeave) baseframe.lock_button:SetScript("OnHide", lockFunctionOnHide) - baseframe.lock_button:SetFrameStrata ("HIGH") + baseframe.lock_button:SetFrameStrata("HIGH") baseframe.lock_button:SetFrameLevel(baseframe:GetFrameLevel() + 6) baseframe.lock_button.instancia = instancia @@ -3729,7 +3720,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando) baseframe.resize_esquerda:SetHeight(16) baseframe.resize_esquerda:SetPoint("bottomleft", baseframe, "bottomleft", 0, 0) baseframe.resize_esquerda:EnableMouse(true) - baseframe.resize_esquerda:SetFrameStrata ("HIGH") + baseframe.resize_esquerda:SetFrameStrata("HIGH") baseframe.resize_esquerda:SetFrameLevel(baseframe:GetFrameLevel() + 6) baseframe.resize_esquerda:SetAlpha(0) @@ -3823,8 +3814,8 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando) -- scripts ------------------------------------------------------------------------------------------------------------------------------------------------------------ - resize_scripts (baseframe.resize_direita, instancia, scrollbar, ">", baseframe) - resize_scripts (baseframe.resize_esquerda, instancia, scrollbar, "<", baseframe) + setWindowResizeScripts (baseframe.resize_direita, instancia, scrollbar, ">", baseframe) + setWindowResizeScripts (baseframe.resize_esquerda, instancia, scrollbar, "<", baseframe) -- side bars highlights ------------------------------------------------------------------------------------------------------------------------------------------------------------ @@ -4017,6 +4008,18 @@ local windowLineMixin = { GetActor = function(self) return self.minha_tabela end, + + GetInstanceId = function(self) + return self.instance_id + end, + + GetLineId = function(self) + return self.row_id + end, + + GetClassIcon = function(self) + return self.icone_classe + end, } Details.barras_criadas = 0 @@ -4040,6 +4043,7 @@ function gump:CreateNewLine(instance, index) newLine.instance_id = instance.meu_id newLine.animacao_fim = 0 newLine.animacao_fim2 = 0 + newLine.isInstanceLine = true --set point, almost irrelevant here, it recalc this on SetBarGrowDirection() local yOffset = instance.row_height * (index-1) @@ -4113,6 +4117,7 @@ function gump:CreateNewLine(instance, index) --class icon highlight local iconHightlight = newLine.border:CreateTexture(nil, "overlay", nil, 6) iconHightlight:SetAllPoints(classIcon) + iconHightlight:Hide() newLine.iconHighlight = iconHightlight local iconFrame = CreateFrame("frame", "DetailsBarra_IconFrame_" .. instance.meu_id .. "_" .. index, newLine.statusbar) @@ -4139,13 +4144,13 @@ function gump:CreateNewLine(instance, index) end --set the onclick, on enter scripts - setLineScripts (newLine, instance, index) + setLineScripts(newLine, instance, index) --hide Details.FadeHandler.Fader(newLine, 1) --adds the window container - instance.barras [index] = newLine + instance.barras[index] = newLine --set the left text newLine.lineText1:SetText(Loc["STRING_NEWROW"]) @@ -5916,7 +5921,7 @@ local on_leave_menu = function(self, elapsed) parameters_table[2] = parameters_table[2] + elapsed if (parameters_table[2] > 0.3) then if (not _G.GameCooltip.mouseOver and not _G.GameCooltip.buttonOver and (not _G.GameCooltip:GetOwner() or _G.GameCooltip:GetOwner() == self)) then - _G.GameCooltip:ShowMe (false) + _G.GameCooltip:ShowMe(false) end self:SetScript("OnUpdate", nil) end @@ -5931,10 +5936,10 @@ local OnClickNovoMenu = function(_, _, id, instance) end local ninstance = Details.CriarInstancia (_, _, id) - instance.baseframe.cabecalho.modo_selecao:GetScript ("OnEnter")(instance.baseframe.cabecalho.modo_selecao, _, true) + instance.baseframe.cabecalho.modo_selecao:GetScript("OnEnter")(instance.baseframe.cabecalho.modo_selecao, _, true) if (ninstance and is_new) then - ninstance.baseframe.cabecalho.modo_selecao:GetScript ("OnEnter")(ninstance.baseframe.cabecalho.modo_selecao, _, true) + ninstance.baseframe.cabecalho.modo_selecao:GetScript("OnEnter")(ninstance.baseframe.cabecalho.modo_selecao, _, true) end end @@ -6143,9 +6148,9 @@ function Details:SetMenuOwner (self, instance) if (instance.toolbar_side == 1) then if (y+300 > screen_height) then - GameCooltip:SetOwner (self, "top", "bottom", 0, -10) + GameCooltip:SetOwner(self, "top", "bottom", 0, -10) else - GameCooltip:SetOwner (self) + GameCooltip:SetOwner(self) end elseif (instance.toolbar_side == 2) then --bottom @@ -6153,9 +6158,9 @@ function Details:SetMenuOwner (self, instance) local instance_height = instance.baseframe:GetHeight() if (y + math.max (instance_height, 250) > screen_height) then - GameCooltip:SetOwner (self, "top", "bottom", 0, -10) + GameCooltip:SetOwner(self, "top", "bottom", 0, -10) else - GameCooltip:SetOwner (self, "bottom", "top", 0, 0) + GameCooltip:SetOwner(self, "bottom", "top", 0, 0) end end @@ -7015,10 +7020,10 @@ function Details:ChangeSkin(skin_name) local copy = Details.CopyTable(overwrite_cprops) - for cprop, value in pairs (copy) do + for cprop, value in pairs(copy) do if (not Details.instance_skin_ignored_values [cprop]) then if (type(value) == "table") then - for cprop2, value2 in pairs (value) do + for cprop2, value2 in pairs(value) do if (not self[cprop]) then self[cprop] = {} end @@ -7256,7 +7261,7 @@ function Details:ChangeSkin(skin_name) --auto interact if (self.menu_alpha.enabled) then - self:SetMenuAlpha (nil, nil, nil, nil, self.is_interacting) + self:SetMenuAlpha(nil, nil, nil, nil, self.is_interacting) end --set the scale @@ -7690,34 +7695,34 @@ function Details:SetFrameStrata(strata) self.baseframe:SetFrameStrata(strata) if (strata == "BACKGROUND") then - self.break_snap_button:SetFrameStrata ("LOW") - self.baseframe.resize_esquerda:SetFrameStrata ("LOW") - self.baseframe.resize_direita:SetFrameStrata ("LOW") - self.baseframe.lock_button:SetFrameStrata ("LOW") + self.break_snap_button:SetFrameStrata("LOW") + self.baseframe.resize_esquerda:SetFrameStrata("LOW") + self.baseframe.resize_direita:SetFrameStrata("LOW") + self.baseframe.lock_button:SetFrameStrata("LOW") elseif (strata == "LOW") then - self.break_snap_button:SetFrameStrata ("MEDIUM") - self.baseframe.resize_esquerda:SetFrameStrata ("MEDIUM") - self.baseframe.resize_direita:SetFrameStrata ("MEDIUM") - self.baseframe.lock_button:SetFrameStrata ("MEDIUM") + self.break_snap_button:SetFrameStrata("MEDIUM") + self.baseframe.resize_esquerda:SetFrameStrata("MEDIUM") + self.baseframe.resize_direita:SetFrameStrata("MEDIUM") + self.baseframe.lock_button:SetFrameStrata("MEDIUM") elseif (strata == "MEDIUM") then - self.break_snap_button:SetFrameStrata ("HIGH") - self.baseframe.resize_esquerda:SetFrameStrata ("HIGH") - self.baseframe.resize_direita:SetFrameStrata ("HIGH") - self.baseframe.lock_button:SetFrameStrata ("HIGH") + self.break_snap_button:SetFrameStrata("HIGH") + self.baseframe.resize_esquerda:SetFrameStrata("HIGH") + self.baseframe.resize_direita:SetFrameStrata("HIGH") + self.baseframe.lock_button:SetFrameStrata("HIGH") elseif (strata == "HIGH") then - self.break_snap_button:SetFrameStrata ("DIALOG") - self.baseframe.resize_esquerda:SetFrameStrata ("DIALOG") - self.baseframe.resize_direita:SetFrameStrata ("DIALOG") - self.baseframe.lock_button:SetFrameStrata ("DIALOG") + self.break_snap_button:SetFrameStrata("DIALOG") + self.baseframe.resize_esquerda:SetFrameStrata("DIALOG") + self.baseframe.resize_direita:SetFrameStrata("DIALOG") + self.baseframe.lock_button:SetFrameStrata("DIALOG") elseif (strata == "DIALOG") then - self.break_snap_button:SetFrameStrata ("FULLSCREEN") - self.baseframe.resize_esquerda:SetFrameStrata ("FULLSCREEN") - self.baseframe.resize_direita:SetFrameStrata ("FULLSCREEN") - self.baseframe.lock_button:SetFrameStrata ("FULLSCREEN") + self.break_snap_button:SetFrameStrata("FULLSCREEN") + self.baseframe.resize_esquerda:SetFrameStrata("FULLSCREEN") + self.baseframe.resize_direita:SetFrameStrata("FULLSCREEN") + self.baseframe.lock_button:SetFrameStrata("FULLSCREEN") end self:StretchButtonAlwaysOnTop() @@ -8128,7 +8133,7 @@ function Details:SetBackdropTexture (texturename) end -- ~alpha (transparency of buttons on the toolbar) ~autohide �utohide ~menuauto -function Details:SetAutoHideMenu (left, right, interacting) +function Details:SetAutoHideMenu(left, right, interacting) --30/07/2018: the separation by left and right menu icons doesn't exists for years, but it was still active in the code making --the toolbar icons show on initialization even when the options to auto hide them enabled. @@ -8196,7 +8201,7 @@ function Details:SetAutoHideMenu (left, right, interacting) end -- transparency for toolbar, borders and statusbar -function Details:SetMenuAlpha (enabled, onenter, onleave, ignorebars, interacting) +function Details:SetMenuAlpha(enabled, onenter, onleave, ignorebars, interacting) if (interacting) then --called from a onenter or onleave script if (self.menu_alpha.enabled) then @@ -8240,7 +8245,7 @@ function Details:SetMenuAlpha (enabled, onenter, onleave, ignorebars, interactin local r, g, b = unpack(self.color) self:InstanceColor (r, g, b, 1) r, g, b = unpack(self.statusbar_info.overlay) - self:StatusBarColor (r, g, b, 1) + self:StatusBarColor(r, g, b, 1) end if (self.is_interacting) then @@ -8307,12 +8312,11 @@ function Details:MicroDisplaysSide (side, fromuser) elseif (self.micro_displays_side == 1) then Details.StatusBar:Show (self) end - end function Details:IsGroupedWith (instance) local id = instance:GetId() - for side, instanceId in pairs (self.snap) do + for side, instanceId in pairs(self.snap) do if (instanceId == id) then return true end @@ -8321,11 +8325,10 @@ function Details:IsGroupedWith (instance) end function Details:GetInstanceGroup (instance_id) - local instance = self if (instance_id) then - instance = Details:GetInstance (instance_id) + instance = Details:GetInstance(instance_id) if (not instance or not instance:IsEnabled()) then return end @@ -8333,16 +8336,16 @@ function Details:GetInstanceGroup (instance_id) local current_group = {instance} - for side, insId in pairs (instance.snap) do + for side, insId in pairs(instance.snap) do if (insId < instance:GetId()) then local last_id = instance:GetId() for i = insId, 1, -1 do - local this_instance = Details:GetInstance (i) + local this_instance = Details:GetInstance(i) local got = false if (this_instance and this_instance:IsEnabled()) then - for side, id in pairs (this_instance.snap) do + for side, id in pairs(this_instance.snap) do if (id == last_id) then - tinsert (current_group, this_instance) + tinsert(current_group, this_instance) got = true last_id = i end @@ -8355,12 +8358,12 @@ function Details:GetInstanceGroup (instance_id) else local last_id = instance:GetId() for i = insId, Details.instances_amount do - local this_instance = Details:GetInstance (i) + local this_instance = Details:GetInstance(i) local got = false if (this_instance and this_instance:IsEnabled()) then - for side, id in pairs (this_instance.snap) do + for side, id in pairs(this_instance.snap) do if (id == last_id) then - tinsert (current_group, this_instance) + tinsert(current_group, this_instance) got = true last_id = i end @@ -8400,7 +8403,6 @@ function Details:SetWindowScale(scale, fromOptions) end function Details:ToolbarSide (side, only_update_anchors) - if (not side) then side = self.toolbar_side end @@ -8410,7 +8412,6 @@ function Details:ToolbarSide (side, only_update_anchors) local skin = Details.skins [self.skin] if (side == 1) then --top - local anchor_mod = not self.show_sidebars and skin.instance_cprops.show_sidebars_need_resize_by or 0 --icon (ball) point @@ -8457,9 +8458,7 @@ function Details:ToolbarSide (side, only_update_anchors) self.baseframe.UPFrameLeftPart:ClearAllPoints() self.baseframe.UPFrameLeftPart:SetPoint("bottomleft", self.baseframe, "topleft", 0, 0) - else --bottom - local y = 0 if (self.show_statusbar) then y = -14 @@ -8534,7 +8533,6 @@ function Details:ToolbarSide (side, only_update_anchors) end function Details:StretchButtonAlwaysOnTop (on_top) - if (type(on_top) ~= "boolean") then on_top = self.grab_on_top end @@ -8542,21 +8540,18 @@ function Details:StretchButtonAlwaysOnTop (on_top) self.grab_on_top = on_top if (self.grab_on_top) then - self.baseframe.button_stretch:SetFrameStrata ("FULLSCREEN") + self.baseframe.button_stretch:SetFrameStrata("FULLSCREEN") else - self.baseframe.button_stretch:SetFrameStrata (self.strata) + self.baseframe.button_stretch:SetFrameStrata(self.strata) end - end function Details:StretchButtonAnchor (side) - if (not side) then side = self.stretch_button_side end if (side == 1 or string.lower (side) == "top") then - self.baseframe.button_stretch:ClearAllPoints() local y = 0 @@ -8570,7 +8565,6 @@ function Details:StretchButtonAnchor (side) self.stretch_button_side = 1 elseif (side == 2 or string.lower (side) == "bottom") then - self.baseframe.button_stretch:ClearAllPoints() local y = 0 @@ -8588,9 +8582,7 @@ function Details:StretchButtonAnchor (side) self.baseframe.button_stretch.texture:SetTexCoord(r, l, b, t) self.stretch_button_side = 2 - end - end function Details:MenuAnchor (x, y) @@ -8626,7 +8618,6 @@ function Details:MenuAnchor (x, y) else --bottom menu_points [1]:SetPoint("topleft", self.baseframe.cabecalho.ball, "topright", x, (y*-1) - 4) - end elseif (self.menu_anchor.side == 2) then --right @@ -8638,7 +8629,6 @@ function Details:MenuAnchor (x, y) else --bottom menu_points [2]:SetPoint("topleft", self.baseframe.cabecalho.ball_r, "topleft", x, (y*-1) - 4) - end end @@ -8646,13 +8636,11 @@ function Details:MenuAnchor (x, y) end function Details:HideMainIcon (value) - if (type(value) ~= "boolean") then value = self.hide_icon end if (value) then - self.hide_icon = true Details.FadeHandler.Fader(self.baseframe.cabecalho.atributo_icon, 1) @@ -8685,7 +8673,6 @@ function Details:HideMainIcon (value) self.baseframe.cabecalho.emenda:SetTexCoord(unpack(COORDS_LEFT_CONNECTOR)) elseif (self.toolbar_side == 2) then - local l, r, t, b = unpack(COORDS_LEFT_BALL) self.baseframe.cabecalho.ball:SetTexCoord(l, r, b, t) local l, r, t, b = unpack(COORDS_LEFT_CONNECTOR) @@ -8696,13 +8683,11 @@ end --search key: ~desaturate function Details:DesaturateMenu (value) - if (value == nil) then value = self.desaturated_menu end if (value) then - self.desaturated_menu = true self.baseframe.cabecalho.modo_selecao:GetNormalTexture():SetDesaturated(true) self.baseframe.cabecalho.segmento:GetNormalTexture():SetDesaturated(true) @@ -8718,7 +8703,6 @@ function Details:DesaturateMenu (value) end else - self.desaturated_menu = false self.baseframe.cabecalho.modo_selecao:GetNormalTexture():SetDesaturated(false) self.baseframe.cabecalho.segmento:GetNormalTexture():SetDesaturated(false) @@ -8732,7 +8716,6 @@ function Details:DesaturateMenu (value) button:GetNormalTexture():SetDesaturated(false) end end - end end @@ -8793,7 +8776,6 @@ function Details:ShowSideBars (instancia) --self:SetBarGrowDirection() --passando true - apenas atulizar as anchors self:ToolbarSide (nil, true) - end function Details:HideSideBars (instancia) @@ -8865,8 +8847,7 @@ function Details:HideStatusBar (instancia) end end -function Details:StatusBarColor (r, g, b, a, no_save) - +function Details:StatusBarColor(r, g, b, a, no_save) if (not r) then r, g, b = unpack(self.statusbar_info.overlay) a = a or self.statusbar_info.alpha @@ -8889,7 +8870,6 @@ function Details:StatusBarColor (r, g, b, a, no_save) self.baseframe.rodape.esquerdo_nostatusbar:SetAlpha(a) self.baseframe.rodape.top_bg:SetVertexColor(r, g, b) self.baseframe.rodape.top_bg:SetAlpha(a) - end function Details:ShowStatusBar(instancia) @@ -8919,8 +8899,7 @@ function Details:ShowStatusBar(instancia) end end -function Details:SetTooltipBackdrop (border_texture, border_size, border_color) - +function Details:SetTooltipBackdrop(border_texture, border_size, border_color) if (not border_texture) then border_texture = Details.tooltip.border_texture end @@ -8941,12 +8920,10 @@ function Details:SetTooltipBackdrop (border_texture, border_size, border_color) Details.tooltip_backdrop.edgeFile = SharedMedia:Fetch("border", border_texture) Details.tooltip_backdrop.edgeSize = border_size - end --reset button functions local reset_button_onenter = function(self, _, forced, from_click) - if (Details.instances_menu_click_to_open and not forced) then return end @@ -8998,7 +8975,7 @@ end self:GetNormalTexture():SetDesaturated(true) end - hide_anti_overlap (self.instance.baseframe.anti_menu_overlap) + hide_anti_overlap(self.instance.baseframe.anti_menu_overlap) GameCooltip.buttonOver = false self.instance.baseframe.cabecalho.button_mouse_over = false @@ -9009,13 +8986,11 @@ end else self:SetScript("OnUpdate", nil) end - end --close button functions local close_button_onclick = function(self, button_type, button) - if (self and not self.instancia and button and button.instancia) then self = button end @@ -9033,10 +9008,10 @@ end --tutorial, how to fully delete a window --_detalhes:SetTutorialCVar ("FULL_DELETE_WINDOW", false) - if (not Details:GetTutorialCVar ("FULL_DELETE_WINDOW")) then + if (not Details:GetTutorialCVar("FULL_DELETE_WINDOW")) then Details:SetTutorialCVar ("FULL_DELETE_WINDOW", true) - local panel = gump:Create1PxPanel (UIParent, 600, 100, "|cFFFFFFFFDetails!, the window hit the ground, bang bang...|r", nil, nil, nil, nil) + local panel = gump:Create1PxPanel(UIParent, 600, 100, "|cFFFFFFFFDetails!, the window hit the ground, bang bang...|r", nil, nil, nil, nil) panel:SetBackdropColor(0, 0, 0, 0.9) panel:SetPoint("center", UIParent, "center") @@ -9119,7 +9094,6 @@ end else self:SetScript("OnUpdate", nil) end - end ------------------------------------------------------------------------------------------------------------------------------------------------------------------ @@ -9128,7 +9102,7 @@ end local menu_can_open = function() if (GameCooltip.active) then local owner = GameCooltip:GetOwner() - if (owner and owner:GetScript ("OnUpdate") == on_leave_menu) then + if (owner and owner:GetScript("OnUpdate") == on_leave_menu) then owner:SetScript("OnUpdate", nil) end return true @@ -9136,7 +9110,6 @@ local menu_can_open = function() end local report_on_enter = function(self, motion, forced, from_click) - local is_cooltip_opened = menu_can_open() -- and not is_cooltip_opened if (Details.instances_menu_click_to_open and not forced) then return @@ -9200,13 +9173,12 @@ local report_on_enter = function(self, motion, forced, from_click) end local report_on_leave = function(self, motion, forced, from_click) - local instancia = self._instance or self.widget._instance local baseframe = instancia.baseframe OnLeaveMainWindow(instancia, self, 3) - hide_anti_overlap (instancia.baseframe.anti_menu_overlap) + hide_anti_overlap(instancia.baseframe.anti_menu_overlap) GameCooltip.buttonOver = false baseframe.cabecalho.button_mouse_over = false @@ -9224,7 +9196,6 @@ local report_on_leave = function(self, motion, forced, from_click) end local atributo_on_enter = function(self, motion, forced, from_click) - local is_cooltip_opened = menu_can_open() -- and not is_cooltip_opened if (Details.instances_menu_click_to_open and not forced) then return @@ -9246,14 +9217,14 @@ local atributo_on_enter = function(self, motion, forced, from_click) GameCooltip:Reset() GameCooltip:SetType (3) - GameCooltip:SetFixedParameter (instancia) + GameCooltip:SetFixedParameter(instancia) if (Details.solo and Details.solo == instancia.meu_id) then - Details:MontaSoloOption (instancia) + Details:MontaSoloOption(instancia) elseif (instancia:IsRaidMode()) then - local have_plugins = Details:MontaRaidOption (instancia) + local have_plugins = Details:MontaRaidOption(instancia) if (not have_plugins) then GameCooltip:SetType ("tooltip") GameCooltip:SetOption("ButtonsYMod", 0) @@ -9277,7 +9248,7 @@ local atributo_on_enter = function(self, motion, forced, from_click) Details:SetMenuOwner (self, instancia) - GameCooltip:ShowCooltip () + GameCooltip:ShowCooltip() end local atributo_on_leave = function(self, motion, forced, from_click) @@ -9353,7 +9324,6 @@ local segmentButton_OnLeave = function(self, motion, forced, fromClick) end local modo_selecao_on_enter = function(self, motion, forced, from_click) - local is_cooltip_opened = menu_can_open() -- not is_cooltip_opened if (Details.instances_menu_click_to_open and not forced) then return @@ -9395,7 +9365,6 @@ local modo_selecao_on_enter = function(self, motion, forced, from_click) end local modo_selecao_on_leave = function(self) - local instancia = self._instance or self.widget._instance local baseframe = instancia.baseframe @@ -9419,7 +9388,6 @@ local modo_selecao_on_leave = function(self) end - -- these can local title_bar_icons = { {texture = [[Interface\AddOns\Details\images\toolbar_icons]], texcoord = {0/256, 32/256, 0, 1}}, @@ -9428,7 +9396,7 @@ local title_bar_icons = { {texture = [[Interface\AddOns\Details\images\toolbar_icons]], texcoord = {96/256, 128/256, 0, 1}}, {texture = [[Interface\AddOns\Details\images\toolbar_icons]], texcoord = {128/256, 160/256, 0, 1}}, } -function Details:GetTitleBarIconsTexture (button, instance) +function Details:GetTitleBarIconsTexture(button, instance) if (instance or self.meu_id) then local textureFile = self.toolbar_icon_file or instance.toolbar_icon_file local t = title_bar_icons [button] @@ -9463,10 +9431,10 @@ function Details:CreateFakeWindow() local b = tb:CreateTexture(nil, "overlay") b:SetSize(12, 12) b:SetPoint("bottomright", tb, "bottomright", -((abs(i-6)-1)*11) - 1, 2) - local button_texture_texcoord = Details:GetTitleBarIconsTexture (i) + local button_texture_texcoord = Details:GetTitleBarIconsTexture(i) b:SetTexture(button_texture_texcoord.texture) b:SetTexCoord(unpack(button_texture_texcoord.texcoord)) - tinsert (t.TitleIcons, b) + tinsert(t.TitleIcons, b) end t.TitleBar = tb @@ -9489,9 +9457,9 @@ local function click_to_change_segment (instancia, buttontype) local goal = segmento_goal+1 local select_ = math.abs (goal - total_shown) - GameCooltip:Select (1, select_) + GameCooltip:Select(1, select_) - instancia:TrocaTabela (segmento_goal) + instancia:TrocaTabela(segmento_goal) segmentButton_OnEnter (instancia.baseframe.cabecalho.segmento.widget, _, true, true) @@ -9506,9 +9474,9 @@ local function click_to_change_segment (instancia, buttontype) local goal = segmento_goal+1 local select_ = math.abs (goal - total_shown) - GameCooltip:Select (1, select_) + GameCooltip:Select(1, select_) - instancia:TrocaTabela (segmento_goal) + instancia:TrocaTabela(segmento_goal) segmentButton_OnEnter (instancia.baseframe.cabecalho.segmento.widget, _, true, true) elseif (buttontype == "MiddleButton") then @@ -9519,9 +9487,9 @@ local function click_to_change_segment (instancia, buttontype) local goal = segmento_goal+1 local select_ = math.abs (goal - total_shown) - GameCooltip:Select (1, select_) + GameCooltip:Select(1, select_) - instancia:TrocaTabela (segmento_goal) + instancia:TrocaTabela(segmento_goal) segmentButton_OnEnter (instancia.baseframe.cabecalho.segmento.widget, _, true, true) end @@ -9687,7 +9655,7 @@ function gump:CriaCabecalho (baseframe, instancia) local modo_selecao_button_click = function() if (Details.instances_menu_click_to_open) then if (instancia.LastMenuOpened == "mode" and GameCooltipFrame1:IsShown()) then - GameCooltip:ShowMe (false) + GameCooltip:ShowMe(false) instancia.LastMenuOpened = nil else modo_selecao_on_enter (instancia.baseframe.cabecalho.modo_selecao.widget, _, true, true) @@ -9698,7 +9666,7 @@ function gump:CriaCabecalho (baseframe, instancia) end end - baseframe.cabecalho.modo_selecao = gump:NewButton (baseframe, nil, "DetailsModeButton"..instancia.meu_id, nil, 16, 16, modo_selecao_button_click, nil, nil, [[Interface\AddOns\Details\images\modo_icone]]) + baseframe.cabecalho.modo_selecao = gump:NewButton(baseframe, nil, "DetailsModeButton"..instancia.meu_id, nil, 16, 16, modo_selecao_button_click, nil, nil, [[Interface\AddOns\Details\images\modo_icone]]) baseframe.cabecalho.modo_selecao:SetPoint("bottomleft", baseframe.cabecalho.ball, "bottomright", instancia.menu_anchor [1], instancia.menu_anchor [2]) baseframe.cabecalho.modo_selecao:SetFrameLevel(baseframe:GetFrameLevel()+5) baseframe.cabecalho.modo_selecao.widget._instance = instancia @@ -9719,7 +9687,7 @@ function gump:CriaCabecalho (baseframe, instancia) local segmento_button_click = function(self, button, param1) if (Details.instances_menu_click_to_open) then if (instancia.LastMenuOpened == "segments" and GameCooltipFrame1:IsShown()) then - GameCooltip:ShowMe (false) + GameCooltip:ShowMe(false) instancia.LastMenuOpened = nil else segmentButton_OnEnter (instancia.baseframe.cabecalho.segmento.widget, _, true, true) @@ -9730,13 +9698,13 @@ function gump:CriaCabecalho (baseframe, instancia) end end - baseframe.cabecalho.segmento = gump:NewButton (baseframe, nil, "DetailsSegmentButton"..instancia.meu_id, nil, 16, 16, segmento_button_click, nil, nil, [[Interface\AddOns\Details\images\segmentos_icone]]) + baseframe.cabecalho.segmento = gump:NewButton(baseframe, nil, "DetailsSegmentButton"..instancia.meu_id, nil, 16, 16, segmento_button_click, nil, nil, [[Interface\AddOns\Details\images\segmentos_icone]]) baseframe.cabecalho.segmento:SetFrameLevel(baseframe.UPFrame:GetFrameLevel()+1) baseframe.cabecalho.segmento.widget._instance = instancia baseframe.cabecalho.segmento:SetPoint("left", baseframe.cabecalho.modo_selecao, "right", 0, 0) --ativa bot�o do meio e direito - baseframe.cabecalho.segmento:SetClickFunction (segmento_button_click, nil, nil, "rightclick") + baseframe.cabecalho.segmento:SetClickFunction(segmento_button_click, nil, nil, "rightclick") baseframe.cabecalho.segmento:SetScript("OnEnter", segmentButton_OnEnter) baseframe.cabecalho.segmento:SetScript("OnLeave", segmentButton_OnLeave) @@ -9753,7 +9721,7 @@ function gump:CriaCabecalho (baseframe, instancia) local atributo_button_click = function() if (Details.instances_menu_click_to_open) then if (instancia.LastMenuOpened == "attributes" and GameCooltipFrame1:IsShown()) then - GameCooltip:ShowMe (false) + GameCooltip:ShowMe(false) instancia.LastMenuOpened = nil else atributo_on_enter (instancia.baseframe.cabecalho.atributo.widget, _, true, true) @@ -9762,7 +9730,7 @@ function gump:CriaCabecalho (baseframe, instancia) end end - baseframe.cabecalho.atributo = gump:NewButton (baseframe, nil, "DetailsAttributeButton"..instancia.meu_id, nil, 16, 16, atributo_button_click) + baseframe.cabecalho.atributo = gump:NewButton(baseframe, nil, "DetailsAttributeButton"..instancia.meu_id, nil, 16, 16, atributo_button_click) baseframe.cabecalho.atributo:SetFrameLevel(baseframe.UPFrame:GetFrameLevel()+1) baseframe.cabecalho.atributo.widget._instance = instancia baseframe.cabecalho.atributo:SetPoint("left", baseframe.cabecalho.segmento.widget, "right", 0, 0) @@ -9783,7 +9751,7 @@ function gump:CriaCabecalho (baseframe, instancia) instancia:Reportar ("INSTANCE" .. instancia.meu_id) GameCooltip2:Hide() end - baseframe.cabecalho.report = gump:NewButton (baseframe, nil, "DetailsReportButton"..instancia.meu_id, nil, 8, 16, report_func) + baseframe.cabecalho.report = gump:NewButton(baseframe, nil, "DetailsReportButton"..instancia.meu_id, nil, 8, 16, report_func) baseframe.cabecalho.report:SetFrameLevel(baseframe.UPFrame:GetFrameLevel()+1) baseframe.cabecalho.report.widget._instance = instancia baseframe.cabecalho.report:SetPoint("left", baseframe.cabecalho.atributo, "right", -6, 0) @@ -9807,7 +9775,7 @@ function gump:CriaCabecalho (baseframe, instancia) local reset_func = function() if (Details.instances_menu_click_to_open) then if (instancia.LastMenuOpened == "reset" and GameCooltipFrame1:IsShown()) then - GameCooltip:ShowMe (false) + GameCooltip:ShowMe(false) instancia.LastMenuOpened = nil else reset_button_onenter (instancia.baseframe.cabecalho.reset, _, true, true) diff --git a/frames/window_news.lua b/frames/window_news.lua index 5a15d285c..11b3c6e27 100644 --- a/frames/window_news.lua +++ b/frames/window_news.lua @@ -124,7 +124,7 @@ function Details:CreateOrOpenNewsWindow() frameUpper:SetVerticalScroll (self:GetValue()) end) - frameUpper:EnableMouseWheel (true) + frameUpper:EnableMouseWheel(true) frameUpper:SetScript("OnMouseWheel", function(self, delta) local current = slider:GetValue() if (IsShiftKeyDown() and (delta > 0)) then diff --git a/frames/window_options2_sections.lua b/frames/window_options2_sections.lua index 5cbb72087..fa7190325 100644 --- a/frames/window_options2_sections.lua +++ b/frames/window_options2_sections.lua @@ -754,7 +754,7 @@ do local buildSkinMenu = function() local skinOptions = {} - for skin_name, skin_table in pairs (_detalhes.skins) do + for skin_name, skin_table in pairs(_detalhes.skins) do local file = skin_table.file:gsub ([[Interface\AddOns\Details\images\skins\]], "") local desc = "Author: |cFFFFFFFF" .. skin_table.author .. "|r\nVersion: |cFFFFFFFF" .. skin_table.version .. "|r\nSite: |cFFFFFFFF" .. skin_table.site .. "|r\n\nDesc: |cFFFFFFFF" .. skin_table.desc .. "|r\n\nFile: |cFFFFFFFF" .. file .. ".tga|r" skinOptions [#skinOptions+1] = {value = skin_name, label = skin_name, onclick = onSelectSkin, icon = "Interface\\GossipFrame\\TabardGossipIcon", desc = desc} @@ -775,7 +775,7 @@ do name = skinName, } - for key, value in pairs (currentInstance) do + for key, value in pairs(currentInstance) do if (_detalhes.instance_defaults[key] ~= nil) then if (type(value) == "table") then savedObject[key] = Details.CopyTable(value) @@ -802,7 +802,7 @@ do instance:ChangeSkin(skin) --overwrite all instance parameters with saved ones - for key, value in pairs (skinObject) do + for key, value in pairs(skinObject) do if (key ~= "skin" and not _detalhes.instance_skin_ignored_values[key]) then if (type(value) == "table") then instance[key] = Details.CopyTable (value) @@ -937,7 +937,7 @@ do values = function() local loadtable = {} for index, _table in ipairs(_detalhes.savedStyles) do - tinsert (loadtable, {value = index, label = _table.name, onclick = function() loadSkin(currentInstance, _table) end, + tinsert(loadtable, {value = index, label = _table.name, onclick = function() loadSkin(currentInstance, _table) end, icon = "Interface\\GossipFrame\\TabardGossipIcon", iconcolor = {.7, .7, .5, 1}}) end return loadtable @@ -954,7 +954,7 @@ do values = function() local loadtable = {} for index, _table in ipairs(_detalhes.savedStyles) do - tinsert (loadtable, {value = index, label = _table.name, onclick = function(_, _, index) + tinsert(loadtable, {value = index, label = _table.name, onclick = function(_, _, index) table.remove (_detalhes.savedStyles, index) Details.options.SetCurrentInstanceAndRefresh(currentInstance) afterUpdate() @@ -976,7 +976,7 @@ do values = function() local loadtable = {} for index, _table in ipairs(_detalhes.savedStyles) do - tinsert (loadtable, {value = index, label = _table.name, onclick = function(_, _, index) + tinsert(loadtable, {value = index, label = _table.name, onclick = function(_, _, index) local compressedData = Details:CompressData(_detalhes.savedStyles[index], "print") if (compressedData) then _detalhes:ShowImportWindow(compressedData, nil, "Details! Export Skin") @@ -1148,7 +1148,7 @@ do local buildTextureMenu = function() local textures = SharedMedia:HashTable("statusbar") local texTable = {} - for name, texturePath in pairs (textures) do + for name, texturePath in pairs(textures) do texTable[#texTable+1] = {value = name, label = name, iconsize = texture_icon_size, statusbar = texturePath, onclick = onSelectTexture, icon = texture_icon, texcoord = texture_texcoord} end table.sort (texTable, function(t1, t2) return t1.label < t2.label end) @@ -1164,7 +1164,7 @@ do local buildTextureMenu2 = function() local textures2 = SharedMedia:HashTable ("statusbar") local texTable2 = {} - for name, texturePath in pairs (textures2) do + for name, texturePath in pairs(textures2) do texTable2[#texTable2+1] = {value = name, label = name, iconsize = texture_icon_size, statusbar = texturePath, onclick = onSelectTextureBackground, icon = texture_icon, texcoord = texture_texcoord} end table.sort (texTable2, function(t1, t2) return t1.label < t2.label end) @@ -1192,7 +1192,7 @@ do local buildTextureOverlayMenu = function() local textures2 = SharedMedia:HashTable("statusbar") local texTable2 = {} - for name, texturePath in pairs (textures2) do + for name, texturePath in pairs(textures2) do texTable2[#texTable2+1] = {value = name, label = name, iconsize = texture_icon_size, statusbar = texturePath, onclick = onSelectBarTextureOverlay, icon = texture_icon, texcoord = texture_texcoord} end table.sort(texTable2, function(t1, t2) return t1.label < t2.label end) @@ -1812,7 +1812,7 @@ do local buildFontMenu = function() local fontObjects = SharedMedia:HashTable("font") local fontTable = {} - for name, fontPath in pairs (fontObjects) do + for name, fontPath in pairs(fontObjects) do fontTable[#fontTable+1] = {value = name, label = name, icon = font_select_icon, texcoord = font_select_texcoord, onclick = onSelectFont, font = fontPath, descfont = name, desc = Loc ["STRING_MUSIC_DETAILS_ROBERTOCARLOS"]} end table.sort (fontTable, function(t1, t2) return t1.label < t2.label end) @@ -2196,7 +2196,7 @@ do local buildFontMenu = function() local fontObjects = SharedMedia:HashTable ("font") local fontTable = {} - for name, fontPath in pairs (fontObjects) do + for name, fontPath in pairs(fontObjects) do fontTable[#fontTable+1] = {value = name, label = name, icon = font_select_icon, texcoord = font_select_texcoord, onclick = onSelectFont, font = fontPath, descfont = name, desc = Loc ["STRING_MUSIC_DETAILS_ROBERTOCARLOS"]} end table.sort (fontTable, function(t1, t2) return t1.label < t2.label end) @@ -2211,7 +2211,7 @@ do local build_font_menu = function() local fonts = {} - for name, fontPath in pairs (SharedMedia:HashTable ("font")) do + for name, fontPath in pairs(SharedMedia:HashTable ("font")) do fonts [#fonts+1] = {value = name, label = name, icon = font_select_icon, texcoord = font_select_texcoord, onclick = on_select_attribute_font, font = fontPath, descfont = name, desc = "Our thoughts strayed constantly\nAnd without boundary\nThe ringing of the division bell had began."} end table.sort (fonts, function(t1, t2) return t1.label < t2.label end) @@ -2234,7 +2234,7 @@ do local buildTextureCustomTitleBar = function() local textures = SharedMedia:HashTable("statusbar") local texTable = {} - for name, texturePath in pairs (textures) do + for name, texturePath in pairs(textures) do texTable[#texTable+1] = {value = name, label = name, statusbar = texturePath, onclick = onSelectCustomTitleBarTexture} end table.sort(texTable, function(t1, t2) return t1.label < t2.label end) @@ -2751,7 +2751,7 @@ do local buildBackdropMenu = function() local backdropTable = {} - for name, backdropPath in pairs (SharedMedia:HashTable ("background")) do + for name, backdropPath in pairs(SharedMedia:HashTable ("background")) do backdropTable[#backdropTable+1] = {value = name, label = name, onclick = onBackdropSelect, icon = [[Interface\ITEMSOCKETINGFRAME\UI-EMPTYSOCKET]], iconsize = backdrop_icon_size, iconcolor = backdrop_icon_color} end return backdropTable @@ -3132,9 +3132,9 @@ do local center = instance.StatusBar ["center"].__name local right = instance.StatusBar ["right"].__name - _G[sectionFrame:GetName() .. "MicroDisplayLeftDropdown"].MyObject:Select (left) - _G[sectionFrame:GetName() .. "MicroDisplayCenterDropdown"].MyObject:Select (center) - _G[sectionFrame:GetName() .. "MicroDisplayRightDropdown"].MyObject:Select (right) + _G[sectionFrame:GetName() .. "MicroDisplayLeftDropdown"].MyObject:Select(left) + _G[sectionFrame:GetName() .. "MicroDisplayCenterDropdown"].MyObject:Select(center) + _G[sectionFrame:GetName() .. "MicroDisplayRightDropdown"].MyObject:Select(right) if (not instance.show_statusbar and instance.micro_displays_side == 2) then sectionFrame.MicroDisplayWarningLabel:Show() @@ -3273,7 +3273,7 @@ do sectionFrame.MicroDisplayRightDropdown.tooltip = Loc ["STRING_OPTIONS_MICRODISPLAYS_DROPDOWN_TOOLTIP"] - local hideLeftMicroFrameButton = DF:NewButton (sectionFrame.MicroDisplayLeftDropdown, _, "$parenthideLeftMicroFrameButton", "hideLeftMicroFrameButton", 22, 22, function(self, button) + local hideLeftMicroFrameButton = DF:NewButton(sectionFrame.MicroDisplayLeftDropdown, _, "$parenthideLeftMicroFrameButton", "hideLeftMicroFrameButton", 22, 22, function(self, button) if (currentInstance.StatusBar ["left"].options.isHidden) then _detalhes.StatusBar:SetPlugin (currentInstance, currentInstance.StatusBar ["left"].real_name, "left") else @@ -3298,7 +3298,7 @@ do self:GetNormalTexture():SetBlendMode("BLEND") end) - local HideCenterMicroFrameButton = DF:NewButton (sectionFrame.MicroDisplayCenterDropdown, _, "$parentHideCenterMicroFrameButton", "HideCenterMicroFrameButton", 22, 22, function(self) + local HideCenterMicroFrameButton = DF:NewButton(sectionFrame.MicroDisplayCenterDropdown, _, "$parentHideCenterMicroFrameButton", "HideCenterMicroFrameButton", 22, 22, function(self) if (currentInstance.StatusBar ["center"].options.isHidden) then _detalhes.StatusBar:SetPlugin (currentInstance, currentInstance.StatusBar ["center"].real_name, "center") else @@ -3323,7 +3323,7 @@ do self:GetNormalTexture():SetBlendMode("BLEND") end) - local HideRightMicroFrameButton = DF:NewButton (sectionFrame.MicroDisplayRightDropdown, _, "$parentHideRightMicroFrameButton", "HideRightMicroFrameButton", 20, 20, function(self) + local HideRightMicroFrameButton = DF:NewButton(sectionFrame.MicroDisplayRightDropdown, _, "$parentHideRightMicroFrameButton", "HideRightMicroFrameButton", 20, 20, function(self) if (currentInstance.StatusBar ["right"].options.isHidden) then _detalhes.StatusBar:SetPlugin (currentInstance, currentInstance.StatusBar ["right"].real_name, "right") else @@ -3347,7 +3347,7 @@ do self:GetNormalTexture():SetBlendMode("BLEND") end) - local configRightMicroFrameButton = DF:NewButton (sectionFrame.MicroDisplayRightDropdown, _, "$parentconfigRightMicroFrameButton", "configRightMicroFrameButton", 18, 18, function(self) + local configRightMicroFrameButton = DF:NewButton(sectionFrame.MicroDisplayRightDropdown, _, "$parentconfigRightMicroFrameButton", "configRightMicroFrameButton", 18, 18, function(self) currentInstance.StatusBar ["right"]:Setup() currentInstance.StatusBar ["right"]:Setup() end) @@ -3356,7 +3356,7 @@ do configRightMicroFrameButton:SetHighlightTexture([[Interface\Buttons\UI-OptionsButton]]) configRightMicroFrameButton.tooltip = Loc ["STRING_OPTIONS_MICRODISPLAYS_OPTION_TOOLTIP"] - local configCenterMicroFrameButton = DF:NewButton (sectionFrame.MicroDisplayCenterDropdown, _, "$parentconfigCenterMicroFrameButton", "configCenterMicroFrameButton", 18, 18, function(self) + local configCenterMicroFrameButton = DF:NewButton(sectionFrame.MicroDisplayCenterDropdown, _, "$parentconfigCenterMicroFrameButton", "configCenterMicroFrameButton", 18, 18, function(self) currentInstance.StatusBar ["center"]:Setup() currentInstance.StatusBar ["center"]:Setup() end) @@ -3365,7 +3365,7 @@ do configCenterMicroFrameButton:SetHighlightTexture([[Interface\Buttons\UI-OptionsButton]]) configCenterMicroFrameButton.tooltip = Loc ["STRING_OPTIONS_MICRODISPLAYS_OPTION_TOOLTIP"] - local configLeftMicroFrameButton = DF:NewButton (sectionFrame.MicroDisplayLeftDropdown, _, "$parentconfigLeftMicroFrameButton", "configLeftMicroFrameButton", 18, 18, function(self) + local configLeftMicroFrameButton = DF:NewButton(sectionFrame.MicroDisplayLeftDropdown, _, "$parentconfigLeftMicroFrameButton", "configLeftMicroFrameButton", 18, 18, function(self) currentInstance.StatusBar ["left"]:Setup() currentInstance.StatusBar ["left"]:Setup() end) @@ -3427,7 +3427,7 @@ do GameCooltip:Preset (2) GameCooltip:AddLine (desc) GameCooltip:SetType ("tooltip") - GameCooltip:SetOwner (self, "bottomleft", "topleft", 150, -2) + GameCooltip:SetOwner(self, "bottomleft", "topleft", 150, -2) GameCooltip:Show() end end @@ -3436,7 +3436,7 @@ do GameCooltip:Preset (2) GameCooltip:AddLine (self.hasDesc) GameCooltip:SetType ("tooltip") - GameCooltip:SetOwner (self, "bottomleft", "topleft", 150, -2) + GameCooltip:SetOwner(self, "bottomleft", "topleft", 150, -2) GameCooltip:Show() end end @@ -3508,7 +3508,7 @@ do local installedToolbarPlugins = {} local installedRaidPlugins = {} - for absName, pluginObject in pairs (allplugins_toolbar) do + for absName, pluginObject in pairs(allplugins_toolbar) do local bframe = CreateFrame("frame", "OptionsPluginToolbarBG", anchorFrame, "BackdropTemplate") bframe:SetSize(640, 20) @@ -3536,7 +3536,7 @@ do local plugin = _detalhes:GetPlugin (absName) DF:NewSwitch (bframe, _, "$parentToolbarSlider"..i, "toolbarPluginsSlider"..i, 60, 20, _, _, plugin_stable.enabled, nil, nil, nil, nil, options_switch_template) bframe ["toolbarPluginsSlider"..i].PluginName = absName - tinsert (anchorFrame.plugin_widgets, bframe ["toolbarPluginsSlider"..i]) + tinsert(anchorFrame.plugin_widgets, bframe ["toolbarPluginsSlider"..i]) bframe ["toolbarPluginsSlider"..i]:SetPoint("topleft", anchorFrame, "topleft", 415, y) bframe ["toolbarPluginsSlider"..i]:SetAsCheckBox() bframe ["toolbarPluginsSlider"..i].OnSwitch = function(self, _, value) @@ -3550,7 +3550,7 @@ do end if (pluginObject.OpenOptionsPanel) then - DF:NewButton (bframe, nil, "$parentOptionsButton"..i, "OptionsButton"..i, 120, 20, pluginObject.OpenOptionsPanel, nil, nil, nil, Loc ["STRING_OPTIONS_PLUGINS_OPTIONS"], nil, options_button_template) + DF:NewButton(bframe, nil, "$parentOptionsButton"..i, "OptionsButton"..i, 120, 20, pluginObject.OpenOptionsPanel, nil, nil, nil, Loc ["STRING_OPTIONS_PLUGINS_OPTIONS"], nil, options_button_template) bframe ["OptionsButton"..i]:SetPoint("topleft", anchorFrame, "topleft", 510, y-0) bframe ["OptionsButton"..i]:SetTextColor (button_color_rgb) bframe ["OptionsButton"..i]:SetIcon ([[Interface\Buttons\UI-OptionsButton]], 14, 14, nil, {0, 1, 0, 1}, nil, 3) @@ -3643,7 +3643,7 @@ do local i = 1 local allplugins_raid = _detalhes.RaidTables.NameTable - for absName, pluginObject in pairs (allplugins_raid) do + for absName, pluginObject in pairs(allplugins_raid) do local bframe = CreateFrame("frame", "OptionsPluginRaidBG", anchorFrame, "BackdropTemplate") bframe:SetSize(640, 20) @@ -3670,7 +3670,7 @@ do local plugin_stable = _detalhes:GetPluginSavedTable (absName) local plugin = _detalhes:GetPlugin (absName) DF:NewSwitch (bframe, _, "$parentRaidSlider"..i, "raidPluginsSlider"..i, 60, 20, _, _, plugin_stable.enabled, nil, nil, nil, nil, options_switch_template) - tinsert (anchorFrame.plugin_widgets, bframe ["raidPluginsSlider"..i]) + tinsert(anchorFrame.plugin_widgets, bframe ["raidPluginsSlider"..i]) bframe ["raidPluginsSlider"..i].PluginName = absName bframe ["raidPluginsSlider"..i]:SetPoint("topleft", anchorFrame, "topleft", 415, y+1) bframe ["raidPluginsSlider"..i]:SetAsCheckBox() @@ -3681,7 +3681,7 @@ do for index, instancia in ipairs(_detalhes.tabela_instancias) do if (instancia.modo == 4) then -- 4 = raid if (instancia:IsEnabled()) then - _detalhes:TrocaTabela (instancia, 0, 1, 1, nil, 2) + _detalhes:TrocaTabela(instancia, 0, 1, 1, nil, 2) else instancia.modo = 2 -- group mode end @@ -3691,7 +3691,7 @@ do end if (pluginObject.OpenOptionsPanel) then - DF:NewButton (bframe, nil, "$parentOptionsButton"..i, "OptionsButton"..i, 86, 18, pluginObject.OpenOptionsPanel, nil, nil, nil, Loc ["STRING_OPTIONS_PLUGINS_OPTIONS"], nil, options_button_template) + DF:NewButton(bframe, nil, "$parentOptionsButton"..i, "OptionsButton"..i, 86, 18, pluginObject.OpenOptionsPanel, nil, nil, nil, Loc ["STRING_OPTIONS_PLUGINS_OPTIONS"], nil, options_button_template) bframe ["OptionsButton"..i]:SetPoint("topleft", anchorFrame, "topleft", 510, y-0) bframe ["OptionsButton"..i]:SetTextColor (button_color_rgb) bframe ["OptionsButton"..i]:SetIcon ([[Interface\Buttons\UI-OptionsButton]], 14, 14, nil, {0, 1, 0, 1}, nil, 3) @@ -3781,7 +3781,7 @@ do local i = 1 local allplugins_solo = _detalhes.SoloTables.NameTable - for absName, pluginObject in pairs (allplugins_solo) do + for absName, pluginObject in pairs(allplugins_solo) do local bframe = CreateFrame("frame", "OptionsPluginSoloBG", anchorFrame,"BackdropTemplate") bframe:SetSize(640, 20) @@ -3808,7 +3808,7 @@ do local plugin_stable = _detalhes:GetPluginSavedTable (absName) local plugin = _detalhes:GetPlugin (absName) DF:NewSwitch (bframe, _, "$parentSoloSlider"..i, "soloPluginsSlider"..i, 60, 20, _, _, plugin_stable.enabled, nil, nil, nil, nil, options_switch_template) - tinsert (anchorFrame.plugin_widgets, bframe ["soloPluginsSlider"..i]) + tinsert(anchorFrame.plugin_widgets, bframe ["soloPluginsSlider"..i]) bframe ["soloPluginsSlider"..i].PluginName = absName bframe ["soloPluginsSlider"..i]:SetPoint("topleft", anchorFrame, "topleft", 415, y+1) bframe ["soloPluginsSlider"..i]:SetAsCheckBox() @@ -3818,14 +3818,14 @@ do if (not value) then for index, instancia in ipairs(_detalhes.tabela_instancias) do if (instancia.modo == 1 and instancia.baseframe) then -- 1 = solo - _detalhes:TrocaTabela (instancia, 0, 1, 1, nil, 2) + _detalhes:TrocaTabela(instancia, 0, 1, 1, nil, 2) end end end end if (pluginObject.OpenOptionsPanel) then - DF:NewButton (bframe, nil, "$parentOptionsButton"..i, "OptionsButton"..i, 86, 18, pluginObject.OpenOptionsPanel, nil, nil, nil, Loc ["STRING_OPTIONS_PLUGINS_OPTIONS"], nil, options_button_template) + DF:NewButton(bframe, nil, "$parentOptionsButton"..i, "OptionsButton"..i, 86, 18, pluginObject.OpenOptionsPanel, nil, nil, nil, Loc ["STRING_OPTIONS_PLUGINS_OPTIONS"], nil, options_button_template) bframe ["OptionsButton"..i]:SetPoint("topleft", anchorFrame, "topleft", 510, y-0) bframe ["OptionsButton"..i]:SetTextColor (button_color_rgb) bframe ["OptionsButton"..i]:SetIcon ([[Interface\Buttons\UI-OptionsButton]], 14, 14, nil, {0, 1, 0, 1}, nil, 3) @@ -4111,7 +4111,7 @@ do local buildTooltipFontOptions = function() local fonts = {} - for name, fontPath in pairs (SharedMedia:HashTable ("font")) do + for name, fontPath in pairs(SharedMedia:HashTable ("font")) do fonts [#fonts+1] = {value = name, icon = font_select_icon, texcoord = font_select_texcoord, label = name, onclick = on_select_tooltip_font, font = fontPath, descfont = name, desc = "Our thoughts strayed constantly\nAnd without boundary\nThe ringing of the division bell had began."} end @@ -4862,7 +4862,7 @@ do local f = CreateFrame("frame", "DetailsLoadWallpaperImage", UIParent, "BackdropTemplate") f:SetPoint("center", UIParent, "center") - f:SetFrameStrata ("FULLSCREEN") + f:SetFrameStrata("FULLSCREEN") f:SetSize(550, 170) f:EnableMouse (true) f:SetMovable (true) @@ -4887,7 +4887,7 @@ do DF:ApplyStandardBackdrop(f) DF:CreateTitleBar(f, "Load Your Image") --localize-me - tinsert (_G.UISpecialFrames, "DetailsLoadWallpaperImage") + tinsert(_G.UISpecialFrames, "DetailsLoadWallpaperImage") local t = f:CreateFontString (nil, "overlay", "GameFontNormal") t:SetText(Loc ["STRING_OPTIONS_WALLPAPER_LOAD_EXCLAMATION"]) @@ -4916,7 +4916,7 @@ do _detalhes:OpenOptionsWindow (instance) sectionFrame:UpdateWallpaperInfo() end - local okey = DF:NewButton (f, _, "$parentOkeyButton", nil, 105, 20, okey_func, nil, nil, nil, Loc ["STRING_OPTIONS_WALLPAPER_LOAD_OKEY"], 1, options_button_template) + local okey = DF:NewButton(f, _, "$parentOkeyButton", nil, 105, 20, okey_func, nil, nil, nil, Loc ["STRING_OPTIONS_WALLPAPER_LOAD_OKEY"], 1, options_button_template) okey:SetPoint("left", editbox.widget, "right", 2, 0) local throubleshoot_func = function() @@ -4926,7 +4926,7 @@ do _G.DetailsLoadWallpaperImage.t:SetText(Loc ["STRING_OPTIONS_WALLPAPER_LOAD_EXCLAMATION"]) end end - local throubleshoot = DF:NewButton (f, _, "$parentThroubleshootButton", nil, 105, 20, throubleshoot_func, nil, nil, nil, Loc ["STRING_OPTIONS_WALLPAPER_LOAD_TROUBLESHOOT"], 1, options_button_template) + local throubleshoot = DF:NewButton(f, _, "$parentThroubleshootButton", nil, 105, 20, throubleshoot_func, nil, nil, nil, Loc ["STRING_OPTIONS_WALLPAPER_LOAD_TROUBLESHOOT"], 1, options_button_template) throubleshoot:SetPoint("left", okey, "right", 2, 0) --throubleshoot:InstallCustomTexture() end @@ -5059,14 +5059,14 @@ do local icones = sub_atributo.icones for index, att_name in ipairs(sub_atributo.lista) do local texture, texcoord = unpack (icones [index]) - tinsert (t, {value = i, label = att_name, onclick = Current_Switch_Func, icon = texture, texcoord = texcoord}) + tinsert(t, {value = i, label = att_name, onclick = Current_Switch_Func, icon = texture, texcoord = texcoord}) sectionFrame.lastSwitchList [i] = {atributo, index, i} i = i + 1 end end for index, ptable in ipairs(_detalhes.RaidTables.Menu) do - tinsert (t, {value = i, label = ptable [1], onclick = Current_Switch_Func, icon = ptable [2]}) + tinsert(t, {value = i, label = ptable [1], onclick = Current_Switch_Func, icon = ptable [2]}) sectionFrame.lastSwitchList [i] = {"raid", ptable [4], i} i = i + 1 end @@ -5467,9 +5467,9 @@ do --[=[]] local spec1Table = {} local playerSpecs = DF.ClassSpecIds [select (2, UnitClass("player"))] - for specID, _ in pairs (playerSpecs) do + for specID, _ in pairs(playerSpecs) do local spec_id, specName, spec_description, spec_icon = GetSpecializationInfoByID(specID) - tinsert (spec1Table, { + tinsert(spec1Table, { type = "select", get = function() local specProfile = Details.profile_by_spec[specID] @@ -5477,7 +5477,7 @@ do end, values = function() local t = {} - for profileName in pairs (__profiles) do + for profileName in pairs(__profiles) do t[#t+1] = profileName end return t @@ -5566,7 +5566,7 @@ do --raid tools DF:ApplyStandardBackdrop(f) DF:CreateTitleBar(f, Loc ["STRING_OPTIONS_RT_IGNORE_TITLE"]) - f:SetFrameStrata ("FULLSCREEN") + f:SetFrameStrata("FULLSCREEN") f:EnableMouse() f:SetMovable (true) f:SetScript("OnMouseDown", function(self, button) @@ -5630,7 +5630,7 @@ do --raid tools L.switch:SetFixedParameter(1) L.switch:SetValue(false) - tinsert (f.labels, L) + tinsert(f.labels, L) return L end @@ -6304,14 +6304,14 @@ do local icon_button_func = function(texture) addframe.spellIconButton.icon.texture = texture end - local icon_button = DF:NewButton (addframe, nil, "$parentSpellIconButton", "spellIconButton", 20, 20, function() DF:IconPick (icon_button_func, true) end) + local icon_button = DF:NewButton(addframe, nil, "$parentSpellIconButton", "spellIconButton", 20, 20, function() DF:IconPick (icon_button_func, true) end) local icon_button_icon = DF:NewImage (icon_button, [[Interface\ICONS\TEMP]], 19, 19, "background", nil, "icon", "$parentSpellIcon") icon_button_icon:SetPoint(0, 0) icon_button:InstallCustomTexture() icon_button:SetPoint("left", spellicon, "right", 2, 0) --close button - local closebutton = DF:NewButton (addframe, nil, "$parentAddCloseButton", "addClosebutton", 120, 20, function() addframe:Hide() end, nil, nil, nil, Loc ["STRING_OPTIONS_SPELL_CLOSE"], nil, options_button_template) + local closebutton = DF:NewButton(addframe, nil, "$parentAddCloseButton", "addClosebutton", 120, 20, function() addframe:Hide() end, nil, nil, nil, Loc ["STRING_OPTIONS_SPELL_CLOSE"], nil, options_button_template) --confirm add spell local addspell = function() @@ -6344,7 +6344,7 @@ do addframe:Hide() end - local addspellbutton = DF:NewButton (addframe, nil, "$parentAddSpellButton", "addSpellbutton", 120, 20, addspell, nil, nil, nil, Loc ["STRING_OPTIONS_SPELL_ADD"], nil, options_button_template) + local addspellbutton = DF:NewButton(addframe, nil, "$parentAddSpellButton", "addSpellbutton", 120, 20, addspell, nil, nil, nil, Loc ["STRING_OPTIONS_SPELL_ADD"], nil, options_button_template) addspellbutton:SetIcon ([[Interface\Buttons\UI-CheckBox-Check]], 18, 18, nil, nil, nil, 4) closebutton:SetIcon ([[Interface\PetBattles\DeadPetIcon]], 14, 14, nil, nil, nil, 4) @@ -6360,7 +6360,7 @@ do local add = function() addframe:Show() end - local addbutton = DF:NewButton (sectionFrame, nil, "$parentAddButton", "addbutton", 120, 20, add, nil, nil, nil, Loc ["STRING_OPTIONS_SPELL_ADDSPELL"], nil, options_button_template) + local addbutton = DF:NewButton(sectionFrame, nil, "$parentAddButton", "addbutton", 120, 20, add, nil, nil, nil, Loc ["STRING_OPTIONS_SPELL_ADDSPELL"], nil, options_button_template) addbutton:SetPoint("bottomright", panel, "topright", -00, 1) addbutton:SetIcon ([[Interface\PaperDollInfoFrame\Character-Plus]], 12, 12, nil, nil, nil, 4) @@ -6439,13 +6439,13 @@ do big_code_editor:Hide() end - local accept_changes = DF:NewButton (big_code_editor, nil, "$parentAccept", "acceptButton", 120, 20, accept, nil, nil) + local accept_changes = DF:NewButton(big_code_editor, nil, "$parentAccept", "acceptButton", 120, 20, accept, nil, nil) accept_changes:SetPoint(0, 20) accept_changes:SetIcon([[Interface\Buttons\UI-CheckBox-Check]]) accept_changes:SetTemplate(options_button_template) accept_changes:SetText(Loc ["STRING_OPTIONS_CHART_SAVE"]) - local cancel_changes = DF:NewButton (big_code_editor, nil, "$parentCancel", "CancelButton", 120, 20, cancel, nil, nil) + local cancel_changes = DF:NewButton(big_code_editor, nil, "$parentCancel", "CancelButton", 120, 20, cancel, nil, nil) cancel_changes:SetPoint("left", accept_changes, "right", 2, 0) cancel_changes:SetIcon([[Interface\PetBattles\DeadPetIcon]]) cancel_changes:SetTemplate(options_button_template) @@ -6502,7 +6502,7 @@ do big_code_editor2:Hide() end - local close_export = DF:NewButton (big_code_editor2, nil, "$parentClose", "closeButton", 120, 20, close_export_box) + local close_export = DF:NewButton(big_code_editor2, nil, "$parentClose", "closeButton", 120, 20, close_export_box) close_export:SetPoint(10, 18) close_export:SetIcon ([[Interface\Buttons\UI-CheckBox-Check]]) close_export:SetText(Loc ["STRING_OPTIONS_CHART_CLOSE"]) @@ -6620,7 +6620,7 @@ do addframe.iconButton.iconTexture = texture addframe.iconButton:SetIcon(texture) end - local capture_icon_button = DF:NewButton (addframe, nil, "$parentIconButton", "iconButton", 20, 20, function() DF:IconPick (icon_button_func, true) end, nil, nil, nil, nil, nil, options_button_template) + local capture_icon_button = DF:NewButton(addframe, nil, "$parentIconButton", "iconButton", 20, 20, function() DF:IconPick (icon_button_func, true) end, nil, nil, nil, nil, nil, options_button_template) capture_icon_button:SetIcon([[Interface\ICONS\TEMP]]) capture_icon_button:SetTemplate(options_button_template) capture_icon_button:SetPoint("left", capture_icon, "right", 2, 0) @@ -6649,7 +6649,7 @@ do end end - local addbutton = DF:NewButton (sectionFrame, nil, "$parentAddButton", "addbutton", 120, 20, add, nil, nil, nil, Loc ["STRING_OPTIONS_CHART_ADD"], nil, options_button_template) + local addbutton = DF:NewButton(sectionFrame, nil, "$parentAddButton", "addbutton", 120, 20, add, nil, nil, nil, Loc ["STRING_OPTIONS_CHART_ADD"], nil, options_button_template) addbutton:SetPoint("bottomright", panel, "topright", -30, 0) addbutton:SetIcon ([[Interface\PaperDollInfoFrame\Character-Plus]], 12, 12, nil, nil, nil, 4) @@ -6696,7 +6696,7 @@ do end end - local accept_import = DF:NewButton (importframe, nil, "$parentAccept", "acceptButton", 120, 20, doimport) + local accept_import = DF:NewButton(importframe, nil, "$parentAccept", "acceptButton", 120, 20, doimport) accept_import:SetIcon ([[Interface\Buttons\UI-CheckBox-Check]]) accept_import:SetPoint(10, 18) accept_import:SetText(Loc ["STRING_OPTIONS_CHART_IMPORT"]) @@ -6707,7 +6707,7 @@ do importframe:Hide() end - local cancel_changes = DF:NewButton (importframe, nil, "$parentCancel", "CancelButton", 120, 20, cancelimport) + local cancel_changes = DF:NewButton(importframe, nil, "$parentCancel", "CancelButton", 120, 20, cancelimport) cancel_changes:SetIcon ([[Interface\PetBattles\DeadPetIcon]]) cancel_changes:SetText(Loc ["STRING_OPTIONS_CHART_CANCEL"]) cancel_changes:SetPoint(132, 18) @@ -6727,12 +6727,12 @@ do end end - local importbutton = DF:NewButton (sectionFrame, nil, "$parentImportButton", "importbutton", 120, 20, import, nil, nil, nil, Loc ["STRING_OPTIONS_CHART_IMPORT"], nil, options_button_template) + local importbutton = DF:NewButton(sectionFrame, nil, "$parentImportButton", "importbutton", 120, 20, import, nil, nil, nil, Loc ["STRING_OPTIONS_CHART_IMPORT"], nil, options_button_template) importbutton:SetPoint("right", addbutton, "left", -4, 0) importbutton:SetIcon ([[Interface\Buttons\UI-GuildButton-PublicNote-Up]], 14, 14, nil, nil, nil, 4) --close button - local closebutton = DF:NewButton (addframe, nil, "$parentAddCloseButton", "addClosebutton", 120, 20, function() addframe:Hide() end, nil, nil, nil, Loc ["STRING_OPTIONS_CHART_CLOSE"], nil, options_button_template) + local closebutton = DF:NewButton(addframe, nil, "$parentAddCloseButton", "addClosebutton", 120, 20, function() addframe:Hide() end, nil, nil, nil, Loc ["STRING_OPTIONS_CHART_CLOSE"], nil, options_button_template) --closebutton:InstallCustomTexture() --confirm add capture @@ -6776,7 +6776,7 @@ do end - local addcapturebutton = DF:NewButton (addframe, nil, "$parentAddCaptureButton", "addCapturebutton", 120, 21, addcapture, nil, nil, nil, Loc ["STRING_OPTIONS_CHART_ADD2"], nil, options_button_template) + local addcapturebutton = DF:NewButton(addframe, nil, "$parentAddCaptureButton", "addCapturebutton", 120, 21, addcapture, nil, nil, nil, Loc ["STRING_OPTIONS_CHART_ADD2"], nil, options_button_template) --anchors local start = 25 diff --git a/frames/window_plater.lua b/frames/window_plater.lua index 0518a2943..e03e2cb22 100644 --- a/frames/window_plater.lua +++ b/frames/window_plater.lua @@ -45,7 +45,7 @@ function Details.OpenPlaterIntegrationWindow() local build_anchor_side_table = function(member) local t = {} for i = 1, 13 do - tinsert (t, { + tinsert(t, { label = anchor_names[i], value = i, onclick = function(_, _, value) diff --git a/frames/window_playerbreakdown.lua b/frames/window_playerbreakdown.lua index 38ee7995d..ffd597aa8 100644 --- a/frames/window_playerbreakdown.lua +++ b/frames/window_playerbreakdown.lua @@ -1015,7 +1015,7 @@ function _detalhes:ApplyPDWSkin (skin_name) --hide extra frames local window = DetailsPlayerDetailsWindow if (window.extra_frames) then - for framename, frame in pairs (window.extra_frames) do + for framename, frame in pairs(window.extra_frames) do frame:Hide() end end @@ -1610,13 +1610,13 @@ function gump:CriaJanelaInfo() local este_gump = info este_gump.Loaded = true - este_gump:SetFrameStrata ("HIGH") + este_gump:SetFrameStrata("HIGH") este_gump:SetToplevel (true) este_gump.extra_frames = {} --fehcar com o esc - tinsert (UISpecialFrames, este_gump:GetName()) + tinsert(UISpecialFrames, este_gump:GetName()) --propriedades da janela este_gump:SetPoint("CENTER", UIParent) @@ -1631,7 +1631,7 @@ function gump:CriaJanelaInfo() este_gump.SummaryWindowWidgets = CreateFrame("frame", "DetailsPlayerDetailsWindowSummaryWidgets", este_gump, "BackdropTemplate") local SWW = este_gump.SummaryWindowWidgets SWW:SetAllPoints() - tinsert (SummaryWidgets, SWW) + tinsert(SummaryWidgets, SWW) local scaleBar = Details.gump:CreateScaleBar (este_gump, Details.player_details_window) este_gump:SetScale(Details.player_details_window.scale) @@ -2250,7 +2250,7 @@ function gump:CriaJanelaInfo() if (self.spellid) then --self:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 512, edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border", edgeSize = 8}) self:SetBackdropColor(.5, .5, .5, .5) - GameTooltip:SetOwner (self, "ANCHOR_TOPLEFT") + GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT") _detalhes:GameTooltipSetSpellByID (self.spellid) GameTooltip:Show() end @@ -2389,7 +2389,7 @@ function gump:CriaJanelaInfo() last_total_dodge = last_actor.avoidance.overall.DODGE / last_combat:GetCombatTime() end local ps, diff = getpercent (totaldodge, last_total_dodge, elapsed_time, true) - tab.dodgepersecond:SetText( string.format ("%.2f", ps) .. " (" .. diff .. ")") + tab.dodgepersecond:SetText( string.format("%.2f", ps) .. " (" .. diff .. ")") --parry local totalparry = playerdamage.avoidance.overall.PARRY @@ -2400,7 +2400,7 @@ function gump:CriaJanelaInfo() last_total_parry = last_actor.avoidance.overall.PARRY / last_combat:GetCombatTime() end local ps, diff = getpercent (totalparry, last_total_parry, elapsed_time, true) - tab.parrypersecond:SetText(string.format ("%.2f", ps) .. " (" .. diff .. ")") + tab.parrypersecond:SetText(string.format("%.2f", ps) .. " (" .. diff .. ")") --block local totalblock = playerdamage.avoidance.overall.BLOCKED_HITS @@ -2411,7 +2411,7 @@ function gump:CriaJanelaInfo() last_total_block = last_actor.avoidance.overall.BLOCKED_HITS / last_combat:GetCombatTime() end local ps, diff = getpercent (totalblock, last_total_block, elapsed_time, true) - tab.blockpersecond:SetText(string.format ("%.2f", ps) .. " (" .. diff .. ")") + tab.blockpersecond:SetText(string.format("%.2f", ps) .. " (" .. diff .. ")") tab.blockeddamage_amt:SetText(_detalhes:ToK2 (playerdamage.avoidance.overall.BLOCKED_AMT)) @@ -2480,7 +2480,7 @@ function gump:CriaJanelaInfo() local heal_from = actor_heal.healing_from local myReceivedHeal = {} - for actorName, _ in pairs (heal_from) do + for actorName, _ in pairs(heal_from) do local thisActor = combat (2, actorName) local targets = thisActor.targets --targets is a container with target classes local amount = targets [player.nome] or 0 @@ -2548,7 +2548,7 @@ function gump:CriaJanelaInfo() local cooldowns_usados = {} - for _spellid, _tabela in pairs (minha_tabela) do + for _spellid, _tabela in pairs(minha_tabela) do cooldowns_usados [#cooldowns_usados+1] = {_spellid, _tabela.counter} end @@ -2587,7 +2587,7 @@ function gump:CriaJanelaInfo() local cooldownInfo = DetailsFramework.CooldownsInfo --see cooldowns that other players used in this actor - for playerName, _ in pairs (combat.raid_roster) do + for playerName, _ in pairs(combat.raid_roster) do if (playerName ~= player.nome) then local miscPlayer = combat (4, playerName) if (miscPlayer) then @@ -2596,7 +2596,7 @@ function gump:CriaJanelaInfo() for spellID, spellTable in cooldowns:ListActors() do local targets = spellTable.targets if (targets) then - for targetName, amountCasted in pairs (targets) do + for targetName, amountCasted in pairs(targets) do if (targetName == player.nome) then local spellName, _, spellIcon = _GetSpellInfo(spellID) local label1, label2, icon1, framebg = unpack (tab ["spell" .. index_used]) @@ -2701,7 +2701,7 @@ function gump:CriaJanelaInfo() } local line_onenter = function(self) - GameTooltip:SetOwner (self, "ANCHOR_TOPRIGHT") + GameTooltip:SetOwner(self, "ANCHOR_TOPRIGHT") _detalhes:GameTooltipSetSpellByID (self.spellID) GameTooltip:Show() self:SetBackdropColor(1, 1, 1, .2) @@ -2799,7 +2799,7 @@ function gump:CriaJanelaInfo() line.Refresh:SetText(aura [5]) --if (haveWA) then - -- line.WaButton:SetClickFunction (wa_button, aura.spellID, line.AuraType) + -- line.WaButton:SetClickFunction(wa_button, aura.spellID, line.AuraType) --else -- line.WaButton:Disable() --end @@ -2820,7 +2820,7 @@ function gump:CriaJanelaInfo() f:SetSize(40, 20) f:SetPoint("center", anchorWidget, "center") f:SetScript("OnEnter", function() - GameTooltip:SetOwner (f, "ANCHOR_TOPRIGHT") + GameTooltip:SetOwner(f, "ANCHOR_TOPRIGHT") GameTooltip:AddLine (desc) GameTooltip:Show() end) @@ -2897,9 +2897,9 @@ function gump:CriaJanelaInfo() do --buffs local newAuraTable = {} if (miscActor and miscActor.buff_uptime_spells) then - for spellID, spellObject in pairs (miscActor.buff_uptime_spells._ActorTable) do + for spellID, spellObject in pairs(miscActor.buff_uptime_spells._ActorTable) do local spellName, _, spellIcon = GetSpellInfo(spellID) - tinsert (newAuraTable, {spellIcon, spellName, spellObject.uptime, spellObject.appliedamt, spellObject.refreshamt, spellObject.uptime/combatTime*100, spellID = spellID}) + tinsert(newAuraTable, {spellIcon, spellName, spellObject.uptime, spellObject.appliedamt, spellObject.refreshamt, spellObject.uptime/combatTime*100, spellID = spellID}) end end table.sort (newAuraTable, _detalhes.Sort3) @@ -2910,9 +2910,9 @@ function gump:CriaJanelaInfo() do --debuffs local newAuraTable = {} if (miscActor and miscActor.debuff_uptime_spells) then - for spellID, spellObject in pairs (miscActor.debuff_uptime_spells._ActorTable) do + for spellID, spellObject in pairs(miscActor.debuff_uptime_spells._ActorTable) do local spellName, _, spellIcon = GetSpellInfo(spellID) - tinsert (newAuraTable, {spellIcon, spellName, spellObject.uptime, spellObject.appliedamt, spellObject.refreshamt, spellObject.uptime/combatTime*100, spellID = spellID}) + tinsert(newAuraTable, {spellIcon, spellName, spellObject.uptime, spellObject.appliedamt, spellObject.refreshamt, spellObject.uptime/combatTime*100, spellID = spellID}) end end table.sort (newAuraTable, _detalhes.Sort3) @@ -4455,7 +4455,7 @@ function gump:CriaJanelaInfo() bar.righttext2:SetJustifyH("right") bar.righttext2:SetTextColor (1, 1, 1, 1) - tinsert (parent.bars, {spellicon, bar, {0, 0, 0}}) + tinsert(parent.bars, {spellicon, bar, {0, 0, 0}}) end local create_tooltip = function(name) @@ -4467,7 +4467,7 @@ function gump:CriaJanelaInfo() tooltip:SetBackdropColor(0, 0, 0, 1) tooltip:SetBackdropBorderColor(0, 0, 0, 1) tooltip:SetSize(275, 77) - tooltip:SetFrameStrata ("tooltip") + tooltip:SetFrameStrata("tooltip") local y = -3 local x_start = 2 @@ -4569,7 +4569,7 @@ function gump:CriaJanelaInfo() tooltip:SetBackdropColor(0, 0, 0, 1) tooltip:SetBackdropBorderColor(0, 0, 0, 1) tooltip:SetSize(175, 67) - tooltip:SetFrameStrata ("tooltip") + tooltip:SetFrameStrata("tooltip") tooltip.bars = {} _detalhes.gump:CreateBorder (tooltip) @@ -4661,7 +4661,7 @@ function gump:CriaJanelaInfo() bar.bg = bg_line1 local object = {spellicon, bar} - tinsert (tooltip.bars, object) + tinsert(tooltip.bars, object) return object end @@ -4903,14 +4903,14 @@ function gump:CriaJanelaInfo() local match_percentage = same_spells / max (my_spells_total, 0.000001) * 100 if (match_percentage > 30) then - tinsert (tabOBject.players, actor) + tinsert(tabOBject.players, actor) end end end if (#tabOBject.players > 0) then --tutorial flash - local blink = _detalhes:GetTutorialCVar ("DETAILS_INFO_TUTORIAL2") or 0 + local blink = _detalhes:GetTutorialCVar("DETAILS_INFO_TUTORIAL2") or 0 if (type(blink) == "number" and blink < 10) then if (not tabOBject.FlashAnimation) then @@ -4966,7 +4966,7 @@ function gump:CriaJanelaInfo() --test if can show the tutorial for the comparison tab if (tab.tabname == "Compare") then --_detalhes:SetTutorialCVar ("DETAILS_INFO_TUTORIAL1", false) - if (not _detalhes:GetTutorialCVar ("DETAILS_INFO_TUTORIAL1")) then + if (not _detalhes:GetTutorialCVar("DETAILS_INFO_TUTORIAL1")) then _detalhes:SetTutorialCVar ("DETAILS_INFO_TUTORIAL1", true) local alert = CreateFrame("frame", "DetailsInfoPopUp1", info, "DetailsHelpBoxTemplate") @@ -5050,7 +5050,7 @@ function _detalhes:CreatePlayerDetailsTab (tabname, localized_name, condition, f newTabButton:SetTemplate ("DETAILS_TAB_BUTTONSELECTED_TEMPLATE") end newTabButton:SetText(localized_name) - newTabButton:SetFrameStrata ("HIGH") + newTabButton:SetFrameStrata("HIGH") newTabButton:SetFrameLevel (info:GetFrameLevel()+1) newTabButton:Hide() @@ -5063,7 +5063,7 @@ function _detalhes:CreatePlayerDetailsTab (tabname, localized_name, condition, f newTabButton.frame = CreateFrame("frame", "DetailsPDWTabFrame" .. tabname, UIParent,"BackdropTemplate") newTabButton.frame:SetParent(info) - newTabButton.frame:SetFrameStrata ("HIGH") + newTabButton.frame:SetFrameStrata("HIGH") newTabButton.frame:SetFrameLevel (info:GetFrameLevel()+5) newTabButton.frame:EnableMouse (true) @@ -5401,7 +5401,7 @@ local row_on_enter = function(self) self.mouse_over = true - for index, block in pairs (_detalhes.playerDetailWindow.grupos_detalhes) do + for index, block in pairs(_detalhes.playerDetailWindow.grupos_detalhes) do detalhe_infobg_onleave (block.bg) end @@ -5416,7 +5416,7 @@ local row_on_enter = function(self) if (self.isAlvo) then --monta o tooltip do alvo --talvez devesse escurecer a janela no fundo... pois o tooltip � transparente e pode confundir - GameTooltip:SetOwner (self, "ANCHOR_TOPRIGHT") + GameTooltip:SetOwner(self, "ANCHOR_TOPRIGHT") if (self.spellid == "enemies") then --damage taken enemies if (not self.minha_tabela or not self.minha_tabela:MontaTooltipDamageTaken (self, self._index, info.instancia)) then -- > poderia ser aprimerado para uma tailcall @@ -5435,14 +5435,14 @@ local row_on_enter = function(self) if (IsShiftKeyDown()) then if (type(self.show) == "number") then - GameTooltip:SetOwner (self, "ANCHOR_TOPRIGHT") + GameTooltip:SetOwner(self, "ANCHOR_TOPRIGHT") GameTooltip:AddLine (Loc ["ABILITY_ID"] .. ": " .. self.show) GameTooltip:Show() end end if (self.show == 98021) then - GameTooltip:SetOwner (self, "ANCHOR_TOPLEFT") + GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT") GameTooltip:AddLine (Loc ["STRING_SPIRIT_LINK_TOTEM_DESC"]) GameTooltip:Show() end @@ -5644,7 +5644,7 @@ local miniframe_func_on_enter = function(self) if (barra.show and type (barra.show) == "number") then local spellname = _GetSpellInfo(barra.show) if (spellname) then - GameTooltip:SetOwner (self, "ANCHOR_TOPLEFT") + GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT") _detalhes:GameTooltipSetSpellByID (barra.show) GameTooltip:Show() end @@ -5697,7 +5697,7 @@ local target_on_enter = function(self) local spellname = _GetSpellInfo(barra.show) - GameTooltip:SetOwner (self, "ANCHOR_TOPRIGHT") + GameTooltip:SetOwner(self, "ANCHOR_TOPRIGHT") GameTooltip:AddLine (barra.index .. ". " .. spellname) GameTooltip:AddLine (info.target_text) GameTooltip:AddLine (" ") @@ -5765,7 +5765,7 @@ local target_on_enter = function(self) GameTooltip:Show() else - GameTooltip:SetOwner (self, "ANCHOR_TOPRIGHT") + GameTooltip:SetOwner(self, "ANCHOR_TOPRIGHT") GameTooltip:AddLine (barra.index .. ". " .. barra.show) GameTooltip:AddLine (info.target_text) GameTooltip:AddLine (Loc ["STRING_NO_TARGET"], 1, 1, 1) @@ -5773,7 +5773,7 @@ local target_on_enter = function(self) GameTooltip:Show() end else - GameTooltip:SetOwner (self, "ANCHOR_TOPRIGHT") + GameTooltip:SetOwner(self, "ANCHOR_TOPRIGHT") GameTooltip:AddLine (barra.index .. ". " .. barra.show) GameTooltip:AddLine (info.target_text) GameTooltip:AddLine (Loc ["STRING_NO_TARGET"], 1, 1, 1) diff --git a/frames/window_profiler.lua b/frames/window_profiler.lua index 42dfc307f..b57b13a0e 100644 --- a/frames/window_profiler.lua +++ b/frames/window_profiler.lua @@ -17,7 +17,7 @@ function Details:OpenProfiler() else --check is this is the first run of the addon (after being installed) local amount = 0 - for name, profile in pairs (_detalhes_global.__profiles) do + for name, profile in pairs(_detalhes_global.__profiles) do amount = amount + 1 end if (amount == 1) then @@ -80,7 +80,7 @@ function Details:OpenProfiler() end f:Hide() end - local confirm = Details.gump:NewButton (f, f, "DetailsProfilerProfileConfirmButton", "button", 150, 20, confirm_func, nil, nil, nil, "Okey!") + local confirm = Details.gump:NewButton(f, f, "DetailsProfilerProfileConfirmButton", "button", 150, 20, confirm_func, nil, nil, nil, "Okey!") confirm:SetPoint(50, -250) confirm:InstallCustomTexture() end \ No newline at end of file diff --git a/frames/window_report.lua b/frames/window_report.lua index b4e896cbb..68875081d 100644 --- a/frames/window_report.lua +++ b/frames/window_report.lua @@ -106,7 +106,7 @@ local _ end if (Details.janela_report.ativa) then - Details.janela_report:Flash (0.2, 0.2, 0.4, true, 0, 0, "NONE") + Details.janela_report:Flash(0.2, 0.2, 0.4, true, 0, 0, "NONE") end Details.janela_report.ativa = true @@ -206,7 +206,7 @@ local _ end if (Details.janela_report.ativa) then - Details.janela_report:Flash (0.2, 0.2, 0.4, true, 0, 0, "NONE") + Details.janela_report:Flash(0.2, 0.2, 0.4, true, 0, 0, "NONE") end Details.janela_report.ativa = true diff --git a/frames/window_rowtexteditor.lua b/frames/window_rowtexteditor.lua index e59404007..111f83e78 100644 --- a/frames/window_rowtexteditor.lua +++ b/frames/window_rowtexteditor.lua @@ -12,7 +12,7 @@ local scrollWidth = 825 local panel = Details:CreateWelcomePanel ("DetailsWindowOptionsBarTextEditor", nil, windowWidth, 600, true) panel:SetPoint("center", UIParent, "center") panel:Hide() -panel:SetFrameStrata ("FULLSCREEN") +panel:SetFrameStrata("FULLSCREEN") DF:ApplyStandardBackdrop (panel) DF:CreateTitleBar (panel, "Details! Custom Line Text Editor") @@ -39,9 +39,9 @@ DF:ApplyStandardBackdrop (textentry) DF:SetFontSize (textentry.editbox, 14) DF:ReskinSlider(textentry.scroll) -local arg1_button = DF:NewButton (panel, nil, "$parentButton1", nil, 80, 20, function() textentry.editbox:Insert ("{data1}") end, nil, nil, nil, string.format (Loc ["STRING_OPTIONS_TEXTEDITOR_DATA"], "1"), 1) -local arg2_button = DF:NewButton (panel, nil, "$parentButton2", nil, 80, 20, function() textentry.editbox:Insert ("{data2}") end, nil, nil, nil, string.format (Loc ["STRING_OPTIONS_TEXTEDITOR_DATA"], "2"), 1) -local arg3_button = DF:NewButton (panel, nil, "$parentButton3", nil, 80, 20, function() textentry.editbox:Insert ("{data3}") end, nil, nil, nil, string.format (Loc ["STRING_OPTIONS_TEXTEDITOR_DATA"], "3"), 1) +local arg1_button = DF:NewButton(panel, nil, "$parentButton1", nil, 80, 20, function() textentry.editbox:Insert ("{data1}") end, nil, nil, nil, string.format(Loc ["STRING_OPTIONS_TEXTEDITOR_DATA"], "1"), 1) +local arg2_button = DF:NewButton(panel, nil, "$parentButton2", nil, 80, 20, function() textentry.editbox:Insert ("{data2}") end, nil, nil, nil, string.format(Loc ["STRING_OPTIONS_TEXTEDITOR_DATA"], "2"), 1) +local arg3_button = DF:NewButton(panel, nil, "$parentButton3", nil, 80, 20, function() textentry.editbox:Insert ("{data3}") end, nil, nil, nil, string.format(Loc ["STRING_OPTIONS_TEXTEDITOR_DATA"], "3"), 1) arg1_button:SetPoint("topright", panel, "topright", -12, y) arg2_button:SetPoint("topright", panel, "topright", -12, y - (20*1)) arg3_button:SetPoint("topright", panel, "topright", -12, y - (20*2)) @@ -162,7 +162,7 @@ local color_func = function(_, r, g, b, a) ColorSelection ( textentry.editbox, "|c" .. hex) end -local func_button = DF:NewButton (panel, nil, "$parentButton4", nil, 80, 20, function() textentry.editbox:Insert ("{func local player, combat = ...; return 0;}") end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_FUNC"], 1) +local func_button = DF:NewButton(panel, nil, "$parentButton4", nil, 80, 20, function() textentry.editbox:Insert ("{func local player, combat = ...; return 0;}") end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_FUNC"], 1) local color_button = DF:NewColorPickButton (panel, "$parentButton5", nil, color_func) color_button:SetSize(80, 20) color_button:SetTemplate (buttonTemplate) @@ -178,21 +178,21 @@ local done = function() panel:Hide() end -local apply_button = DF:NewButton (panel, nil, "$parentApply", nil, 80, 20, function() panel.callback(panel.editbox:GetText()) end, nil, nil, nil, "Apply", 1) --localize-me +local apply_button = DF:NewButton(panel, nil, "$parentApply", nil, 80, 20, function() panel.callback(panel.editbox:GetText()) end, nil, nil, nil, "Apply", 1) --localize-me apply_button:SetTemplate (buttonTemplate) apply_button:SetPoint("topright", panel, "topright", -14, -128) -local ok_button = DF:NewButton (panel, nil, "$parentButtonOk", nil, 80, 20, done, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_DONE"], 1) +local ok_button = DF:NewButton(panel, nil, "$parentButtonOk", nil, 80, 20, done, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_DONE"], 1) ok_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_DONE_TOOLTIP"] ok_button:SetTemplate (buttonTemplate) ok_button:SetPoint("topright", panel, "topright", -14, -194) -local reset_button = DF:NewButton (panel, nil, "$parentDefaultOk", nil, 80, 20, function() textentry.editbox:SetText(panel.default); panel.callback(panel.editbox:GetText()) end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_RESET"], 1) +local reset_button = DF:NewButton(panel, nil, "$parentDefaultOk", nil, 80, 20, function() textentry.editbox:SetText(panel.default); panel.callback(panel.editbox:GetText()) end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_RESET"], 1) reset_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_RESET_TOOLTIP"] reset_button:SetTemplate (buttonTemplate) reset_button:SetPoint("topright", panel, "topright", -14, -150) -local cancel_button = DF:NewButton (panel, nil, "$parentDefaultCancel", nil, 80, 20, function() textentry.editbox:SetText(panel.default_text); done(); end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_CANCEL"], 1) +local cancel_button = DF:NewButton(panel, nil, "$parentDefaultCancel", nil, 80, 20, function() textentry.editbox:SetText(panel.default_text); done(); end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_CANCEL"], 1) cancel_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_CANCEL_TOOLTIP"] cancel_button:SetTemplate (buttonTemplate) cancel_button:SetPoint("topright", panel, "topright", -14, -172) \ No newline at end of file diff --git a/frames/window_runcode.lua b/frames/window_runcode.lua index 5094c7bab..3ee051de7 100644 --- a/frames/window_runcode.lua +++ b/frames/window_runcode.lua @@ -135,7 +135,7 @@ function Details.OpenRunCodeWindow() Details:Msg("Code saved!") code_editor:ClearFocus() else - errortext_frame:Flash (0.2, 0.2, 0.4, true, nil, nil, "NONE") + errortext_frame:Flash(0.2, 0.2, 0.4, true, nil, nil, "NONE") Details:Msg("Can't save the code: it has errors.") end end @@ -167,7 +167,7 @@ function Details.OpenRunCodeWindow() DF:SetEnvironment(func) DF:QuickDispatch (func) else - errortext_frame:Flash (0.2, 0.2, 0.4, true, nil, nil, "NONE") + errortext_frame:Flash(0.2, 0.2, 0.4, true, nil, nil, "NONE") end end @@ -178,7 +178,7 @@ function Details.OpenRunCodeWindow() end DetailsPluginContainerWindow.OpenPlugin (DetailsRunCodePanel) - DetailsRunCodePanel.CodeTypeDropdown:Select (1, true) + DetailsRunCodePanel.CodeTypeDropdown:Select(1, true) --show the initialization code when showing up this window DetailsRunCodePanel.EditingCode = Details.RunCodeTypes [1].Value diff --git a/frames/window_scrolldamage.lua b/frames/window_scrolldamage.lua index a15d5c2fa..9539bbb99 100644 --- a/frames/window_scrolldamage.lua +++ b/frames/window_scrolldamage.lua @@ -220,7 +220,7 @@ function Details:ScrollDamage() elseif (token == "SWING_DAMAGE") then -- amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand = spellID, spellName, spellType, amount, overKill, school, resisted, blocked, absorbed, isCritical - -- tinsert (DetailsScrollDamage.Data, 1, {timew, token, hidding, sourceSerial, sourceName, sourceFlag, sourceFlag2, targetSerial, targetName, targetFlag, targetFlag2, spellID, spellName, spellType, amount, overKill, school, resisted, blocked, absorbed, isCritical}) + -- tinsert(DetailsScrollDamage.Data, 1, {timew, token, hidding, sourceSerial, sourceName, sourceFlag, sourceFlag2, targetSerial, targetName, targetFlag, targetFlag2, spellID, spellName, spellType, amount, overKill, school, resisted, blocked, absorbed, isCritical}) -- damageScroll:RefreshScroll() end end diff --git a/frames/window_statistics.lua b/frames/window_statistics.lua index d08378035..7afe9e262 100644 --- a/frames/window_statistics.lua +++ b/frames/window_statistics.lua @@ -35,13 +35,13 @@ 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:SetFrameStrata("HIGH") f:SetToplevel (true) f:SetMovable (true) f:SetWidth(850) f:SetHeight(500) - tinsert (UISpecialFrames, "DetailsRaidHistoryWindow") + tinsert(UISpecialFrames, "DetailsRaidHistoryWindow") function f.OpenDB() local db = Details.storage:OpenRaidStorage() @@ -80,10 +80,10 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild local titlebar = DF:CreateTitleBar(f, "Details! " .. Loc ["STRING_STATISTICS"]) - if (not Details:GetTutorialCVar ("HISTORYPANEL_TUTORIAL")) then + if (not Details:GetTutorialCVar("HISTORYPANEL_TUTORIAL")) then local tutorialFrame = CreateFrame("frame", "$parentTutorialFrame",f,"BackdropTemplate") tutorialFrame:SetPoint("center", f, "center") - tutorialFrame:SetFrameStrata ("DIALOG") + tutorialFrame:SetFrameStrata("DIALOG") tutorialFrame:SetSize(400, 300) tutorialFrame:SetBackdrop({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize=1}) @@ -130,7 +130,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild local selectGuildRank = function() f.HistoryCheckBox:SetValue(false) f.GuildRankCheckBox:SetValue(true) - _G.DetailsRaidHistoryWindow.select_player:Select (1, true) + _G.DetailsRaidHistoryWindow.select_player:Select(1, true) f.select_player2:Hide() f.select_player2_label:Hide() f.Mode = 2 @@ -276,7 +276,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild playerName = playerName:gsub ("%|c%x%x%x%x%x%x%x%x", "") playerName = playerName:gsub ("%|r", "") playerName = playerName:gsub (".*%s", "") - tinsert (result, {playerName, f.LatestResourceTable[i][2]}) + tinsert(result, {playerName, f.LatestResourceTable[i][2]}) else break end @@ -451,9 +451,9 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild for encounterIndex, encounter in ipairs(encounterTable) do if (encounter.guild == guild) then local roleTable = encounter [role] - for playerName, _ in pairs (roleTable) do + for playerName, _ in pairs(roleTable) do if (not alreadyListed [playerName]) then - tinsert (t, {value = playerName, label = playerName, icon = icon, onclick = onPlayer2Select}) + tinsert(t, {value = playerName, label = playerName, icon = icon, onclick = onPlayer2Select}) alreadyListed [playerName] = true end end @@ -493,7 +493,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild if (type(difficulty) == "number") then if (difficulty == 14) then --don't show normal encounters - --tinsert (difficultyList, {value = 14, label = "Normal", icon = icon, onclick = on_diff_select}) + --tinsert(difficultyList, {value = 14, label = "Normal", icon = icon, onclick = on_diff_select}) --print ("has normal encounter") elseif (difficulty == 15) then @@ -505,7 +505,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild end if (not alreadyHave) then - tinsert (difficultyList, 1, {value = 15, label = "Heroic", icon = icon, onclick = on_diff_select}) + tinsert(difficultyList, 1, {value = 15, label = "Heroic", icon = icon, onclick = on_diff_select}) end elseif (difficulty == 16) then @@ -517,23 +517,23 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild end if (not alreadyHave) then - tinsert (difficultyList, {value = 16, label = "Mythic", icon = icon, onclick = on_diff_select}) + tinsert(difficultyList, {value = 16, label = "Mythic", icon = icon, onclick = on_diff_select}) end end - for encounterId, encounterTable in pairs (encounterIdTable) do + for encounterId, encounterTable in pairs(encounterIdTable) do if (not bossRepeated[encounterId]) then local encounter, instance = Details:GetBossEncounterDetailsFromEncounterId(nil, encounterId) if (encounter) then local InstanceID = Details:GetInstanceIdFromEncounterId (encounterId) if (raidSelected == InstanceID) then - tinsert (bossList, {value = encounterId, label = encounter.boss, icon = icon, onclick = on_boss_select}) + tinsert(bossList, {value = encounterId, label = encounter.boss, icon = icon, onclick = on_boss_select}) bossRepeated [encounterId] = true end if (not raidRepeated [instance.name]) then - tinsert (raidList, {value = instance.id, label = instance.name, icon = icon, onclick = onRaidSelect}) + tinsert(raidList, {value = instance.id, label = instance.name, icon = icon, onclick = onRaidSelect}) raidRepeated [instance.name] = true end @@ -543,7 +543,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild for index, encounter in ipairs(encounterTable) do local guild = encounter.guild if (not guildRepeated [guild]) then - tinsert (guildList, {value = guild, label = guild, icon = icon, onclick = on_guild_select}) + tinsert(guildList, {value = guild, label = guild, icon = icon, onclick = on_guild_select}) guildRepeated [guild] = true end end @@ -555,19 +555,19 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild diff_dropdown:Refresh() - diff_dropdown:Select (1, true) + diff_dropdown:Select(1, true) boss_dropdown:Refresh() - boss_dropdown:Select (1, true) + boss_dropdown:Select(1, true) if (not DoNotSelectRaid) then raid_dropdown:Refresh() - raid_dropdown:Select (1, true) + raid_dropdown:Select(1, true) end guild_dropdown:Refresh() if (currentGuild) then - guild_dropdown:Select (currentGuild) + guild_dropdown:Select(currentGuild) else - guild_dropdown:Select (1, true) + guild_dropdown:Select(1, true) end end @@ -577,10 +577,10 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild local boss_repeated = {} wipe (bossList) - for difficulty, encounterIdTable in pairs (db) do + for difficulty, encounterIdTable in pairs(db) do if (type(difficulty) == "number") then if (difficulty == 14) then - --tinsert (difficultyList, {value = 14, label = "Normal", icon = icon, onclick = on_diff_select}) + --tinsert(difficultyList, {value = 14, label = "Normal", icon = icon, onclick = on_diff_select}) --print ("has normal encounter") elseif (difficulty == 15) then local alreadyHave = false @@ -590,7 +590,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild end end if (not alreadyHave) then - tinsert (difficultyList, 1, {value = 15, label = "Heroic", icon = icon, onclick = on_diff_select}) + tinsert(difficultyList, 1, {value = 15, label = "Heroic", icon = icon, onclick = on_diff_select}) end elseif (difficulty == 16) then local alreadyHave = false @@ -600,11 +600,11 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild end end if (not alreadyHave) then - tinsert (difficultyList, {value = 16, label = "Mythic", icon = icon, onclick = on_diff_select}) + tinsert(difficultyList, {value = 16, label = "Mythic", icon = icon, onclick = on_diff_select}) end end - for encounterId, encounterTable in pairs (encounterIdTable) do + for encounterId, encounterTable in pairs(encounterIdTable) do if (not boss_repeated [encounterId]) then local encounter, instance = Details:GetBossEncounterDetailsFromEncounterId (_, encounterId) if (encounter) then @@ -615,15 +615,15 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild if (bossIndex) then local l, r, t, b, texturePath = Details:GetBossIcon (InstanceID, bossIndex) if (texturePath) then - tinsert (bossList, {value = encounterId, label = encounter.boss, icon = texturePath, texcoord = {l, r, t, b}, onclick = on_boss_select}) + tinsert(bossList, {value = encounterId, label = encounter.boss, icon = texturePath, texcoord = {l, r, t, b}, onclick = on_boss_select}) else - tinsert (bossList, {value = encounterId, label = encounter.boss, icon = icon, onclick = on_boss_select}) + tinsert(bossList, {value = encounterId, label = encounter.boss, icon = icon, onclick = on_boss_select}) end else - tinsert (bossList, {value = encounterId, label = encounter.boss, icon = icon, onclick = on_boss_select}) + tinsert(bossList, {value = encounterId, label = encounter.boss, icon = icon, onclick = on_boss_select}) end --]=] - tinsert (bossList, {value = encounterId, label = encounter.boss, icon = icon, onclick = on_boss_select}) + tinsert(bossList, {value = encounterId, label = encounter.boss, icon = icon, onclick = on_boss_select}) boss_repeated [encounterId] = true end end @@ -681,8 +681,8 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild if (player) then - --tinsert (data, {text = date, value = player[1], data = player, fulldate = encounter.date, elapsed = encounter.elapsed}) - tinsert (data, {text = date, value = player[1]/encounter.elapsed, utext = Details:ToK2 (player[1]/encounter.elapsed), data = player, fulldate = encounter.date, elapsed = encounter.elapsed}) + --tinsert(data, {text = date, value = player[1], data = player, fulldate = encounter.date, elapsed = encounter.elapsed}) + tinsert(data, {text = date, value = player[1]/encounter.elapsed, utext = Details:ToK2 (player[1]/encounter.elapsed), data = player, fulldate = encounter.date, elapsed = encounter.elapsed}) end end end @@ -700,7 +700,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild GameCooltip:AddLine ("Item Level:", floor (self.data.data [2]), 1, "white") GameCooltip:AddLine ("Date:", self.data.fulldate:gsub (".*%s", ""), 1, "white") - GameCooltip:SetOwner (self.ball.tooltip_anchor) + GameCooltip:SetOwner(self.ball.tooltip_anchor) GameCooltip:Show() end local onleave = function(self) @@ -737,7 +737,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild date = date:gsub (".*%s", "") date = date:sub (1, -4) - for playerName, playerTable in pairs (roleTable) do + for playerName, playerTable in pairs(roleTable) do if (not playerScore [playerName]) then playerScore [playerName] = { @@ -767,7 +767,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild end local sortTable = {} - for playerName, t in pairs (playerScore) do + for playerName, t in pairs(playerScore) do local className = select (2, GetClassInfo (t.class or 0)) local classColor = "FFFFFFFF" if (className) then @@ -775,7 +775,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild end local playerNameFormated = Details:GetOnlyName (playerName) - tinsert (sortTable, { + tinsert(sortTable, { "|c" .. classColor .. playerNameFormated .. "|r", Details:comma_value (t.ps), Details:ToK2 (t.total), @@ -825,9 +825,9 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild date = date:sub (1, -4) amt_encounters = amt_encounters + 1 - tinsert (header, {name = date, type = "text"}) + tinsert(header, {name = date, type = "text"}) - for playerName, playerTable in pairs (roleTable) do + for playerName, playerTable in pairs(roleTable) do local index = players_index [playerName] local player @@ -835,19 +835,19 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild player = {playerName} player_class [playerName] = playerTable [3] for i = 1, amt_encounters-1 do - tinsert (player, "") + tinsert(player, "") end - tinsert (player, Details:ToK2 (playerTable [1] / encounter.elapsed)) - tinsert (players, player) + tinsert(player, Details:ToK2 (playerTable [1] / encounter.elapsed)) + tinsert(players, player) players_index [playerName] = #players --print ("not index", playerName, amt_encounters, date, 2, amt_encounters-1) else player = players [index] for i = #player+1, amt_encounters-1 do - tinsert (player, "") + tinsert(player, "") end - tinsert (player, Details:ToK2 (playerTable [1] / encounter.elapsed)) + tinsert(player, Details:ToK2 (playerTable [1] / encounter.elapsed)) end end @@ -859,7 +859,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild for index, playerTable in ipairs(players) do for i = #playerTable, amt_encounters do - tinsert (playerTable, "") + tinsert(playerTable, "") end local className = select (2, GetClassInfo (player_class [playerTable [1]] or 0)) @@ -917,9 +917,9 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild player_name = f.latest_player_selected or player_name if (player_name) then - player2_dropdown:Select (player_name) + player2_dropdown:Select(player_name) else - player2_dropdown:Select (1, true) + player2_dropdown:Select(1, true) end f:BuildPlayerTable (player2_dropdown.value) @@ -943,7 +943,7 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild player2_dropdown:Show() f.build_player2_data = {{}, guild, role} player2_dropdown:Refresh() - player2_dropdown:Select (1, true) + player2_dropdown:Select(1, true) f:BuildPlayerTable (player2_dropdown.value) end end @@ -1007,23 +1007,23 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild end if (_raid) then - statsWindow.select_raid:Select (_raid) + statsWindow.select_raid:Select(_raid) statsWindow:Refresh() statsWindow.UpdateBossDropdown() end if (_boss) then - statsWindow.select_boss:Select (_boss) + statsWindow.select_boss:Select(_boss) statsWindow:Refresh() end if (_difficulty) then - statsWindow.select_diff:Select (_difficulty) + statsWindow.select_diff:Select(_difficulty) statsWindow:Refresh() end if (_role) then - statsWindow.select_role:Select (_role) + statsWindow.select_role:Select(_role) statsWindow:Refresh() end @@ -1031,18 +1031,18 @@ function Details:OpenRaidHistoryWindow (_raid, _boss, _difficulty, _role, _guild if (type(_guild) == "boolean") then _guild = GetGuildInfo ("player") end - statsWindow.select_guild:Select (_guild) + statsWindow.select_guild:Select(_guild) statsWindow:Refresh() end if (_player_base) then - statsWindow.select_player:Select (_player_base) + statsWindow.select_player:Select(_player_base) statsWindow:Refresh() end if (_player_name) then statsWindow.select_player2:Refresh() - statsWindow.select_player2:Select (_player_name) + statsWindow.select_player2:Select(_player_name) statsWindow:Refresh (_player_name) end diff --git a/frames/window_switch.lua b/frames/window_switch.lua index ec4b3bea6..d622e27ba 100644 --- a/frames/window_switch.lua +++ b/frames/window_switch.lua @@ -243,7 +243,7 @@ do allDisplaysFrame.check_text_size (button.text) button.texture:SetTexture(Details.sub_atributos [attribute].icones [i] [1]) button.texture:SetTexCoord (unpack (Details.sub_atributos [attribute].icones [i] [2])) - tinsert (allDisplaysFrame.buttons [attribute], button) + tinsert(allDisplaysFrame.buttons [attribute], button) y = y - 17 end @@ -301,7 +301,7 @@ do local button = allDisplaysFrame.buttons [custom_index] [button_index] if (not button) then button = create_all_switch_button (custom_index, i, allDisplaysFrame.x, allDisplaysFrame.y) - tinsert (allDisplaysFrame.buttons [custom_index], button) + tinsert(allDisplaysFrame.buttons [custom_index], button) allDisplaysFrame.y = allDisplaysFrame.y - 17 end @@ -341,7 +341,7 @@ do local button = allDisplaysFrame.buttons [script_index] [button_index] if (not button) then button = create_all_switch_button(script_index, button_index, allDisplaysFrame.x, allDisplaysFrame.y) - tinsert (allDisplaysFrame.buttons [script_index], button) + tinsert(allDisplaysFrame.buttons [script_index], button) allDisplaysFrame.y = allDisplaysFrame.y - 17 end @@ -490,7 +490,7 @@ function Details.switch:ShowMe(instancia) if (not Details.switch.segments_blocks) then local segment_switch = function(self, button, segment) if (button == "LeftButton") then - Details.switch.current_instancia:TrocaTabela (segment) + Details.switch.current_instancia:TrocaTabela(segment) Details.switch.CloseMe() elseif (button == "RightButton") then Details.switch.CloseMe() @@ -535,7 +535,7 @@ function Details.switch:ShowMe(instancia) local button = gump:CreateButton (Details.switch.frame, segment_switch, 100, 20, "", index) button:SetPoint("topleft", s, "topleft", -17, 0) button:SetPoint("bottomright", s, "bottomright", 0, 0) - button:SetClickFunction (segment_switch, nil, nil, "right") + button:SetClickFunction(segment_switch, nil, nil, "right") local boss_texture = gump:CreateImage (button, nil, 16, 16) boss_texture:SetPoint("right", s, "left", -2, 0) @@ -560,7 +560,7 @@ function Details.switch:ShowMe(instancia) s.HideMe = hide_label s.ShowMe = show_label - tinsert (Details.switch.segments_blocks, s) + tinsert(Details.switch.segments_blocks, s) return s end @@ -886,7 +886,7 @@ end function Details.switch:InitSwitch() local instancia = Details.tabela_instancias[1] - Details.switch:ShowMe (instancia) + Details.switch:ShowMe(instancia) Details.switch:CloseMe() end diff --git a/frames/window_wa.lua b/frames/window_wa.lua index 624b91c34..c495b2065 100644 --- a/frames/window_wa.lua +++ b/frames/window_wa.lua @@ -1779,7 +1779,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n else new_aura.trigger.spellId = tostring (spellid) new_aura.trigger.name = spellname - tinsert (new_aura.trigger.spellIds, spellid) + tinsert(new_aura.trigger.spellIds, spellid) end --if is a regular aura without using spells ids @@ -1902,7 +1902,7 @@ function _detalhes:CreateWeakAura (aura_type, spellid, use_spellid, spellname, n end end - tinsert (WeakAurasSaved.displays [group].controlledChildren, new_aura.id) + tinsert(WeakAurasSaved.displays [group].controlledChildren, new_aura.id) else new_aura.parent = nil end @@ -1983,7 +1983,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr local f = DetailsAuraPanel or CreateFrame("frame", "DetailsAuraPanel", UIParent,"BackdropTemplate") f:SetSize(800, 600) f:SetPoint("center", UIParent, "center", 0, 150) - f:SetFrameStrata ("DIALOG") + f:SetFrameStrata("DIALOG") f:EnableMouse (true) f:SetMovable (true) f:SetToplevel (true) @@ -2229,7 +2229,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr local checkBox = fw:CreateSwitch (f, OnChangeTriggerState, i == 1) checkBox:SetTemplate (fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")) checkBox:SetAsCheckBox() - checkBox:SetFixedParameter (triggerList [i].value) + checkBox:SetFixedParameter(triggerList [i].value) checkBox:SetSize(20, 20) checkBox:SetPoint("topleft", aura_on_label, "bottomleft", 0, 12 + (-i*20)) @@ -2279,7 +2279,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr local icon_button_func = function(texture) f.IconButton.icon.texture = texture end - local icon_pick_button = fw:NewButton (f, nil, "$parentIconButton", "IconButton", 20, 20, function() fw:IconPick (icon_button_func, true) end) + local icon_pick_button = fw:NewButton(f, nil, "$parentIconButton", "IconButton", 20, 20, function() fw:IconPick (icon_button_func, true) end) local icon_button_icon = fw:NewImage (icon_pick_button, [[Interface\ICONS\TEMP]], 19, 19, "background", nil, "icon", "$parentIcon") icon_pick_button:InstallCustomTexture() @@ -2358,7 +2358,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr local sounds = {} local already_added = {} - for name, soundFile in pairs (game_sounds) do + for name, soundFile in pairs(game_sounds) do name = name:gsub ("(%a)([%w_']*)", titlecase) if (not already_added [name]) then sounds [#sounds+1] = {name = name, file = soundFile, gamesound = true} @@ -2366,7 +2366,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr end end - for name, soundFile in pairs (LibStub:GetLibrary("LibSharedMedia-3.0"):HashTable ("sound")) do + for name, soundFile in pairs(LibStub:GetLibrary("LibSharedMedia-3.0"):HashTable ("sound")) do name = name:gsub ("(%a)([%w_']*)", titlecase) if (not already_added [name]) then sounds [#sounds+1] = {name = name, file = soundFile} @@ -2375,7 +2375,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr end if (WeakAuras and WeakAuras.sound_types) then - for soundFile, name in pairs (WeakAuras.sound_types) do + for soundFile, name in pairs(WeakAuras.sound_types) do name = name:gsub ("(%a)([%w_']*)", titlecase) if (not already_added [name]) then sounds [#sounds+1] = {name = name, file = soundFile} @@ -2387,11 +2387,11 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr for _, sound in ipairs(sounds) do if (sound.name:find ("D_")) then --details sound - tinsert (t, {color = "orange", label = sound.name, value = sound.file, icon = [[Interface\Buttons\UI-GuildButton-MOTD-Up]], onclick = play_sound, iconsize = iconsize}) + tinsert(t, {color = "orange", label = sound.name, value = sound.file, icon = [[Interface\Buttons\UI-GuildButton-MOTD-Up]], onclick = play_sound, iconsize = iconsize}) elseif (sound.gamesound) then --game sound - tinsert (t, {color = "yellow", label = sound.name, value = {sound_path = sound.file}, icon = [[Interface\Buttons\UI-GuildButton-MOTD-Up]], onclick = play_sound, iconsize = iconsize}) + tinsert(t, {color = "yellow", label = sound.name, value = {sound_path = sound.file}, icon = [[Interface\Buttons\UI-GuildButton-MOTD-Up]], onclick = play_sound, iconsize = iconsize}) else - tinsert (t, {label = sound.name, value = sound.file, icon = [[Interface\Buttons\UI-GuildButton-MOTD-Up]], onclick = play_sound, iconsize = iconsize}) + tinsert(t, {label = sound.name, value = sound.file, icon = [[Interface\Buttons\UI-GuildButton-MOTD-Up]], onclick = play_sound, iconsize = iconsize}) end end return t @@ -2458,7 +2458,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr local addon_options = function() local t = {} if (WeakAuras) then - tinsert (t, {label = "Weak Auras 2", value = "WA", icon = [[Interface\AddOns\WeakAuras\Media\Textures\icon]]}) + tinsert(t, {label = "Weak Auras 2", value = "WA", icon = [[Interface\AddOns\WeakAuras\Media\Textures\icon]]}) end return t end @@ -2478,14 +2478,14 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr local weakauras_folder_options = function() local t = {} if (WeakAuras and WeakAurasSaved) then - for display_name, aura_table in pairs (WeakAurasSaved.displays) do + for display_name, aura_table in pairs(WeakAurasSaved.displays) do if (aura_table.regionType == "dynamicgroup" or aura_table.regionType == "group") then - tinsert (t, {label = display_name, value = display_name, icon = folder_icon, texcoord = folder_texcoord, iconsize = folder_iconsize}) + tinsert(t, {label = display_name, value = display_name, icon = folder_icon, texcoord = folder_texcoord, iconsize = folder_iconsize}) end end end table.sort (t, sort_func) - tinsert (t, 1, {label = "No Group", value = false, icon = folder_icon, texcoord = folder_texcoord, iconcolor = {0.8, 0.2, 0.2}, iconsize = folder_iconsize}) + tinsert(t, 1, {label = "No Group", value = false, icon = folder_icon, texcoord = folder_texcoord, iconcolor = {0.8, 0.2, 0.2}, iconsize = folder_iconsize}) return t end @@ -2533,7 +2533,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr --select the new group in the dropdown weakauras_folder:Refresh() - weakauras_folder:Select (groupName) + weakauras_folder:Select(groupName) end local weakauras_newgroup_label = fw:CreateLabel(f, "New WeakAuras Group: ", nil, nil, "GameFontNormal") @@ -2696,7 +2696,7 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr f.StackSlider:Disable() f.SpellName:Disable() f.UseSpellId:Disable() - DetailsAuraPanel.AuraTypeDropdown:Select (2, true) + DetailsAuraPanel.AuraTypeDropdown:Select(2, true) DetailsAuraPanel.OnSelectAuraType (nil, nil, 2, true) f.IsCooldown:Disable() @@ -2731,15 +2731,15 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr DetailsAuraPanel.WeakaurasFolderDropdown:Refresh() if (encounterid) then - DetailsAuraPanel.WeakaurasFolderDropdown:Select ("Details! Aura Group") + DetailsAuraPanel.WeakaurasFolderDropdown:Select("Details! Aura Group") DetailsAuraPanel.IconSizeSlider:SetValue(128) else - DetailsAuraPanel.WeakaurasFolderDropdown:Select (1, true) + DetailsAuraPanel.WeakaurasFolderDropdown:Select(1, true) DetailsAuraPanel.IconSizeSlider:SetValue(64) end if (DetailsAuraPanel.other_values.dbm_timer_id or DetailsAuraPanel.other_values.bw_timer_id) then - DetailsAuraPanel.WeakaurasFolderDropdown:Select ("Details! Boss Mods Group") + DetailsAuraPanel.WeakaurasFolderDropdown:Select("Details! Boss Mods Group") end if (DetailsAuraPanel.other_values.text_size) then @@ -2758,23 +2758,23 @@ function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, tr DetailsAuraPanel.UseGlow:SetValue(false) DetailsAuraPanel.StackSlider:SetValue(0) - DetailsAuraPanel.SoundEffectDropdown:Select (1, true) + DetailsAuraPanel.SoundEffectDropdown:Select(1, true) DetailsAuraPanel.AuraText:SetText(DetailsAuraPanel.other_values.text or "") DetailsAuraPanel.SaySomething:SetText("") if (triggertype and type (triggertype) == "number") then - DetailsAuraPanel.AuraOnDropdown:Select (triggertype, true) + DetailsAuraPanel.AuraOnDropdown:Select(triggertype, true) DetailsAuraPanel.SetTriggerState (DetailsAuraPanel.TriggerList [triggertype].value) --passed by index not by the trigger ID else - DetailsAuraPanel.AuraOnDropdown:Select (1, true) + DetailsAuraPanel.AuraOnDropdown:Select(1, true) DetailsAuraPanel.SetTriggerState (1) end if (auratype and type (auratype) == "number") then - DetailsAuraPanel.AuraTypeDropdown:Select (auratype, true) + DetailsAuraPanel.AuraTypeDropdown:Select(auratype, true) DetailsAuraPanel.OnSelectAuraType (nil, nil, auratype) else - DetailsAuraPanel.AuraTypeDropdown:Select (1, true) + DetailsAuraPanel.AuraTypeDropdown:Select(1, true) DetailsAuraPanel.OnSelectAuraType (nil, nil, "icon") end diff --git a/frames/window_welcome.lua b/frames/window_welcome.lua index bbc6ec630..a91aa3940 100644 --- a/frames/window_welcome.lua +++ b/frames/window_welcome.lua @@ -199,7 +199,7 @@ function _detalhes:OpenWelcomeWindow() --save standard local savedObject = {} - for key, value in pairs (instance) do + for key, value in pairs(instance) do if (_detalhes.instance_defaults [key] ~= nil) then if (type(value) == "table") then savedObject [key] = Details.CopyTable (value) @@ -211,7 +211,7 @@ function _detalhes:OpenWelcomeWindow() _detalhes.standard_skin = savedObject _detalhes:ApplyPDWSkin ("ElvUI") - --_detalhes:SetTooltipBackdrop ("Details BarBorder 3", 14, {0, 0, 0, 1}) + --_detalhes:SetTooltipBackdrop("Details BarBorder 3", 14, {0, 0, 0, 1}) end --]=] @@ -225,7 +225,7 @@ function _detalhes:OpenWelcomeWindow() _detalhes.stopwelcomealert = nil end frame_alert.alert = CreateFrame("frame", "DetailsWelcomeWindowAlert", UIParent, "ActionBarButtonSpellActivationAlert") - frame_alert.alert:SetFrameStrata ("FULLSCREEN") + frame_alert.alert:SetFrameStrata("FULLSCREEN") frame_alert.alert:Hide() local window_openned_at = time() @@ -296,15 +296,15 @@ local window_openned_at = time() --skin local onSelectSkin = function(_, _, skin_name) - local instance1 = _detalhes:GetInstance (1) + local instance1 = _detalhes:GetInstance(1) if (instance1 and instance1:IsEnabled()) then instance1:ChangeSkin (skin_name) - window.FontDropdown:Select (instance1.row_info.font_face) + window.FontDropdown:Select(instance1.row_info.font_face) window.BarHeightSlider:SetValue(instance1.row_info.height) window.TextSizeSlider:SetValue(instance1.row_info.font_size) window.ShowPercentCheckBox:SetValue(instance1.row_info.textR_show_data [3]) end - local instance2 = _detalhes:GetInstance (2) + local instance2 = _detalhes:GetInstance(2) if (instance2 and instance2:IsEnabled()) then instance2:ChangeSkin (skin_name) end @@ -312,13 +312,13 @@ local window_openned_at = time() local buildSkinMenu = function() local skinOptions = {} - for skin_name, skin_table in pairs (_detalhes.skins) do + for skin_name, skin_table in pairs(_detalhes.skins) do skinOptions [#skinOptions+1] = {value = skin_name, label = skin_name, onclick = onSelectSkin, icon = "Interface\\GossipFrame\\TabardGossipIcon", desc = skin_table.desc} end return skinOptions end - local instance1 = _detalhes:GetInstance (1) + local instance1 = _detalhes:GetInstance(1) local skin_dropdown = g:NewDropDown (window, _, "$parentSkinDropdown", "skinDropdown", 160, 20, buildSkinMenu, instance1.skin) skin_dropdown:SetTemplate (g:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")) skin_dropdown.tooltip = Loc ["STRING_WELCOME_58"] @@ -353,8 +353,8 @@ local window_openned_at = time() end end - local instance1 = Details:GetInstance (1) - local instance2 = Details:GetInstance (2) + local instance1 = Details:GetInstance(1) + local instance2 = Details:GetInstance(2) _detalhes.tabela_historico:resetar() @@ -366,7 +366,7 @@ local window_openned_at = time() instance2:SetBarTextSettings (nil, "Accidental Presidency") end - window.FontDropdown:Select ("Accidental Presidency") + window.FontDropdown:Select("Accidental Presidency") _detalhes:CreateTestBars ("en") @@ -378,7 +378,7 @@ local window_openned_at = time() instance2:SetBarTextSettings (nil, "Arial Narrow") end - window.FontDropdown:Select ("Arial Narrow") + window.FontDropdown:Select("Arial Narrow") _detalhes:CreateTestBars ("ru") @@ -390,7 +390,7 @@ local window_openned_at = time() instance2:SetBarTextSettings (nil, "AR CrystalzcuheiGBK Demibold") end - window.FontDropdown:Select ("AR CrystalzcuheiGBK Demibold") + window.FontDropdown:Select("AR CrystalzcuheiGBK Demibold") _detalhes:CreateTestBars ("cn") @@ -402,7 +402,7 @@ local window_openned_at = time() instance2:SetBarTextSettings (nil, "2002") end - window.FontDropdown:Select ("2002") + window.FontDropdown:Select("2002") _detalhes:CreateTestBars ("ko") @@ -414,7 +414,7 @@ local window_openned_at = time() instance2:SetBarTextSettings (nil, "AR CrystalzcuheiGBK Demibold") end - window.FontDropdown:Select ("AR CrystalzcuheiGBK Demibold") + window.FontDropdown:Select("AR CrystalzcuheiGBK Demibold") _detalhes:CreateTestBars ("tw") end @@ -425,57 +425,57 @@ local window_openned_at = time() g:NewLabel(window, _, "$parentLatinAlphabetLabel", "LatinAlphabetLabel", Loc["STRING_WELCOME_74"], "GameFontHighlightLeft") g:NewSwitch (window, _, "$parentLatinAlphabetCheckBox", "LatinAlphabetCheckBox", 20, 20, _, _, true) window.LatinAlphabetCheckBox:SetAsCheckBox() - window.LatinAlphabetCheckBox:SetFixedParameter (1) + window.LatinAlphabetCheckBox:SetFixedParameter(1) window.LatinAlphabetCheckBox:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")) window.LatinAlphabetCheckBox.OnSwitch = onSelectAlphabet window.LatinAlphabetLabel:SetPoint("left", window.LatinAlphabetCheckBox, "right", 2, 0) - tinsert (allAlphabetCheckBoxes, window.LatinAlphabetCheckBox) - tinsert (allAlphabetLabels, window.LatinAlphabetLabel) + tinsert(allAlphabetCheckBoxes, window.LatinAlphabetCheckBox) + tinsert(allAlphabetLabels, window.LatinAlphabetLabel) --Russian g:NewLabel(window, _, "$parentCyrillicAlphabetLabel", "CyrillicAlphabetLabel", Loc["STRING_WELCOME_75"], "GameFontHighlightLeft") g:NewSwitch (window, _, "$parentCyrillicAlphabetCheckBox", "CyrillicAlphabetCheckBox", 20, 20, _, _, false) window.CyrillicAlphabetCheckBox:SetAsCheckBox() - window.CyrillicAlphabetCheckBox:SetFixedParameter (2) + window.CyrillicAlphabetCheckBox:SetFixedParameter(2) window.CyrillicAlphabetCheckBox:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")) window.CyrillicAlphabetCheckBox.OnSwitch = onSelectAlphabet window.CyrillicAlphabetLabel:SetPoint("left", window.CyrillicAlphabetCheckBox, "right", 2, 0) - tinsert (allAlphabetCheckBoxes, window.CyrillicAlphabetCheckBox) - tinsert (allAlphabetLabels, window.CyrillicAlphabetLabel) + tinsert(allAlphabetCheckBoxes, window.CyrillicAlphabetCheckBox) + tinsert(allAlphabetLabels, window.CyrillicAlphabetLabel) --Chinese g:NewLabel(window, _, "$parentChinaAlphabetLabel", "ChinaAlphabetLabel", Loc["STRING_WELCOME_76"], "GameFontHighlightLeft") g:NewSwitch (window, _, "$parentChinaCheckBox", "ChinaCheckBox", 20, 20, _, _, false) window.ChinaCheckBox:SetAsCheckBox() - window.ChinaCheckBox:SetFixedParameter (3) + window.ChinaCheckBox:SetFixedParameter(3) window.ChinaCheckBox:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")) window.ChinaCheckBox.OnSwitch = onSelectAlphabet window.ChinaAlphabetLabel:SetPoint("left", window.ChinaCheckBox, "right", 2, 0) - tinsert (allAlphabetCheckBoxes, window.ChinaCheckBox) - tinsert (allAlphabetLabels, window.ChinaAlphabetLabel) + tinsert(allAlphabetCheckBoxes, window.ChinaCheckBox) + tinsert(allAlphabetLabels, window.ChinaAlphabetLabel) --Korea g:NewLabel(window, _, "$parentKoreanAlphabetLabel", "KoreanAlphabetLabel", Loc["STRING_WELCOME_77"], "GameFontHighlightLeft") g:NewSwitch (window, _, "$parentKoreanCheckBox", "KoreanCheckBox", 20, 20, _, _, false) window.KoreanCheckBox:SetAsCheckBox() - window.KoreanCheckBox:SetFixedParameter (4) + window.KoreanCheckBox:SetFixedParameter(4) window.KoreanCheckBox:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")) window.KoreanCheckBox.OnSwitch = onSelectAlphabet window.KoreanAlphabetLabel:SetPoint("left", window.KoreanCheckBox, "right", 2, 0) - tinsert (allAlphabetCheckBoxes, window.KoreanCheckBox) - tinsert (allAlphabetLabels, window.KoreanAlphabetLabel) + tinsert(allAlphabetCheckBoxes, window.KoreanCheckBox) + tinsert(allAlphabetLabels, window.KoreanAlphabetLabel) --Taiwan g:NewLabel(window, _, "$parentTaiwanAlphabetLabel", "TaiwanAlphabetLabel", Loc["STRING_WELCOME_78"], "GameFontHighlightLeft") g:NewSwitch (window, _, "$parentTaiwanCheckBox", "TaiwanCheckBox", 20, 20, _, _, false) window.TaiwanCheckBox:SetAsCheckBox() - window.TaiwanCheckBox:SetFixedParameter (5) + window.TaiwanCheckBox:SetFixedParameter(5) window.TaiwanCheckBox:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")) window.TaiwanCheckBox.OnSwitch = onSelectAlphabet window.TaiwanAlphabetLabel:SetPoint("left", window.TaiwanCheckBox, "right", 2, 0) - tinsert (allAlphabetCheckBoxes, window.TaiwanCheckBox) - tinsert (allAlphabetLabels, window.TaiwanAlphabetLabel) + tinsert(allAlphabetCheckBoxes, window.TaiwanCheckBox) + tinsert(allAlphabetLabels, window.TaiwanAlphabetLabel) window.LatinAlphabetCheckBox:SetPoint("topleft", texto_alphabet, "bottomleft", 0, -10) window.CyrillicAlphabetCheckBox:SetPoint("topleft", window.LatinAlphabetCheckBox, "bottomleft", 0, -2) @@ -537,14 +537,14 @@ local window_openned_at = time() end end - local instance2 = _detalhes:GetInstance (2) + local instance2 = _detalhes:GetInstance(2) if (instance2 and instance2:IsEnabled()) then instance2:InstanceColor (r, g, b, a, nil, true) end end local change_color = function() - window.editing_window = _detalhes:GetInstance (1) + window.editing_window = _detalhes:GetInstance(1) local r, g, b, a = unpack (window.editing_window.color) _detalhes.gump:ColorPick (window, r, g, b, a, windowcolor_callback) end @@ -563,8 +563,8 @@ local window_openned_at = time() window.BarHeightSlider:SetTemplate (g:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")) window.BarHeightSlider:SetHook("OnValueChange", function(self, _, amount) - local instance1 = Details:GetInstance (1) - local instance2 = Details:GetInstance (2) + local instance1 = Details:GetInstance(1) + local instance2 = Details:GetInstance(2) if (instance1 and instance1:IsEnabled()) then instance1:SetBarSettings (amount) @@ -583,8 +583,8 @@ local window_openned_at = time() window.TextSizeSlider:SetTemplate (g:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")) window.TextSizeSlider:SetHook("OnValueChange", function(self, _, amount) - local instance1 = Details:GetInstance (1) - local instance2 = Details:GetInstance (2) + local instance1 = Details:GetInstance(1) + local instance2 = Details:GetInstance(2) if (instance1 and instance1:IsEnabled()) then instance1:SetBarTextSettings (amount) @@ -596,8 +596,8 @@ local window_openned_at = time() --font local onSelectFont = function(_, instance, fontName) - local instance1 = Details:GetInstance (1) - local instance2 = Details:GetInstance (2) + local instance1 = Details:GetInstance(1) + local instance2 = Details:GetInstance(2) if (instance1 and instance1:IsEnabled()) then instance1:SetBarTextSettings (nil, fontName) @@ -610,14 +610,14 @@ local window_openned_at = time() local buildFontMenu = function() local fontObjects = SharedMedia:HashTable ("font") local fontTable = {} - for name, fontPath in pairs (fontObjects) do + for name, fontPath in pairs(fontObjects) do fontTable[#fontTable+1] = {value = name, label = name, icon = font_select_icon, texcoord = font_select_texcoord, onclick = onSelectFont, font = fontPath, descfont = name, desc = Loc ["STRING_MUSIC_DETAILS_ROBERTOCARLOS"]} end table.sort (fontTable, function(t1, t2) return t1.label < t2.label end) return fontTable end - local instance1 = _detalhes:GetInstance (1) + local instance1 = _detalhes:GetInstance(1) local font_dropdown = g:NewDropDown (window, _, "$parentFontDropdown", "FontDropdown", 160, 20, buildFontMenu, instance1.row_info.font_face) font_dropdown:SetTemplate (g:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")) font_dropdown.tooltip = Loc ["STRING_WELCOME_58"] @@ -630,12 +630,12 @@ local window_openned_at = time() g:NewLabel(window, _, "$parentShowPercentLabel", "ShowPercentLabel", Loc ["STRING_OPTIONS_TEXT_SHOW_PERCENT"], "GameFontNormal") g:NewSwitch (window, _, "$parentShowPercentCheckBox", "ShowPercentCheckBox", 20, 20, _, _, false) window.ShowPercentCheckBox:SetAsCheckBox() - window.ShowPercentCheckBox:SetFixedParameter (1) + window.ShowPercentCheckBox:SetFixedParameter(1) window.ShowPercentCheckBox:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")) window.ShowPercentCheckBox.OnSwitch = function(self, fixedParameter, value) - local instance1 = Details:GetInstance (1) - local instance2 = Details:GetInstance (2) + local instance1 = Details:GetInstance(1) + local instance2 = Details:GetInstance(2) if (instance1 and instance1:IsEnabled()) then instance1:SetBarRightTextSettings (nil, nil, value) @@ -677,10 +677,10 @@ local window_openned_at = time() pages [#pages+1] = {skins_frame_alert, bg55, texto55, texto_alphabet, texto555, skins_image, changemind, texto_appearance, font_label, font_dropdown, skin_dropdown, skin_label, create_window_button, window_color, window.BarHeightLabel, window.BarHeightSlider, window.TextSizeLabel, window.TextSizeSlider, window.ShowPercentLabel, window.ShowPercentCheckBox} for i, widget in ipairs(allAlphabetCheckBoxes) do - tinsert (pages [#pages], widget) + tinsert(pages [#pages], widget) end for i, widget in ipairs(allAlphabetLabels) do - tinsert (pages [#pages], widget) + tinsert(pages [#pages], widget) end for _, widget in ipairs(pages[#pages]) do @@ -712,7 +712,7 @@ local window_openned_at = time() g:NewLabel(window, _, "$parentWesternNumbersLabel", "WesternNumbersLabel", Loc ["STRING_NUMERALSYSTEM_ARABIC_WESTERN"] .. ": " .. Loc ["STRING_NUMERALSYSTEM_ARABIC_WESTERN_DESC"], "GameFontHighlightLeft") local WesternNumbersCheckbox = g:NewSwitch (window, _, "WesternNumbersCheckbox", "WesternNumbersCheckbox", 20, 20, _, _, true) WesternNumbersCheckbox:SetAsCheckBox() - WesternNumbersCheckbox:SetFixedParameter (1) + WesternNumbersCheckbox:SetFixedParameter(1) WesternNumbersCheckbox:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")) WesternNumbersCheckbox:SetPoint("topleft", window, "topleft", 40, -130) window.WesternNumbersLabel:SetPoint("left", WesternNumbersCheckbox, "right", 2, 0) @@ -721,7 +721,7 @@ local window_openned_at = time() g:NewLabel(window, _, "$parentAsianNumbersLabel", "AsianNumbersLabel", Loc ["STRING_NUMERALSYSTEM_MYRIAD_EASTASIA"] .. ": " .. Loc ["STRING_NUMERALSYSTEM_ARABIC_MYRIAD_EASTASIA"], "GameFontHighlightLeft") local AsianNumbersCheckbox = g:NewSwitch (window, _, "AsianNumbersCheckbox", "AsianNumbersCheckbox", 20, 20, _, _, true) AsianNumbersCheckbox:SetAsCheckBox() - AsianNumbersCheckbox:SetFixedParameter (2) + AsianNumbersCheckbox:SetFixedParameter(2) AsianNumbersCheckbox:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")) AsianNumbersCheckbox:SetPoint("topleft", window, "topleft", 40, -200) window.AsianNumbersLabel:SetPoint("left", AsianNumbersCheckbox, "right", 2, 0) @@ -831,7 +831,7 @@ local window_openned_at = time() g:NewLabel(window, _, "$parentChronometerLabel", "ChronometerLabel", Loc ["STRING_WELCOME_4"], "GameFontHighlightLeft") local chronometer = g:NewSwitch (window, _, "WelcomeWindowChronometer", "WelcomeWindowChronometer", 20, 20, _, _, true) chronometer:SetAsCheckBox() - chronometer:SetFixedParameter (1) + chronometer:SetFixedParameter(1) chronometer:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")) window.ChronometerLabel:SetPoint("left", chronometer, "right", 2, 0) @@ -839,7 +839,7 @@ local window_openned_at = time() g:NewLabel(window, _, "$parentContinuousLabel", "ContinuousLabel", Loc ["STRING_WELCOME_5"], "GameFontHighlightLeft") local continuous = g:NewSwitch (window, _, "WelcomeWindowContinuous", "WelcomeWindowContinuous", 20, 20, _, _, true) continuous:SetAsCheckBox() - continuous:SetFixedParameter (1) + continuous:SetFixedParameter(1) continuous:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")) window.ContinuousLabel:SetPoint("left", continuous, "right", 2, 0) @@ -1092,7 +1092,7 @@ local window_openned_at = time() created_test_bars = created_test_bars + 1 end - local instance = _detalhes:GetInstance (1) + local instance = _detalhes:GetInstance(1) instance:SetMode (3) end) @@ -1150,7 +1150,7 @@ local window_openned_at = time() _detalhes:StopPlayStretchAlert() end) stretch_frame_alert:SetScript("OnShow", function() - local instance = _detalhes:GetInstance (1) + local instance = _detalhes:GetInstance(1) _detalhes.OnEnterMainWindow(instance) instance.baseframe.button_stretch:SetAlpha (1) frame_alert.alert:SetPoint("topleft", instance.baseframe.button_stretch, "topleft", -20, 6) @@ -1208,7 +1208,7 @@ local window_openned_at = time() _detalhes:StopPlayStretchAlert() end) instance_frame_alert:SetScript("OnShow", function() - local instance = _detalhes:GetInstance (1) + local instance = _detalhes:GetInstance(1) frame_alert.alert:SetPoint("topleft", instance.baseframe.cabecalho.modo_selecao.widget, "topleft", -8, 6) frame_alert.alert:SetPoint("bottomright", instance.baseframe.cabecalho.modo_selecao.widget, "bottomright", 8, -6) @@ -1260,7 +1260,7 @@ local window_openned_at = time() shortcut_image2:SetTexCoord (2/512, 167/512, 306/512, 425/512) - local instance1 = _detalhes:GetInstance (1) + local instance1 = _detalhes:GetInstance(1) local bookmark_frame = CreateFrame("frame", "WelcomeBookmarkFrame", window,"BackdropTemplate") bookmark_frame:SetPoint("topleft", instance1.baseframe, "topleft") @@ -1285,7 +1285,7 @@ local window_openned_at = time() bookmark_frame:SetScript("OnMouseDown", function(self, button) if (button == "RightButton") then - _detalhes.switch:ShowMe (instance1) + _detalhes.switch:ShowMe(instance1) self:Hide() end end) diff --git a/functions/api2.lua b/functions/api2.lua index bc0ddd4ca..4b86e2523 100644 --- a/functions/api2.lua +++ b/functions/api2.lua @@ -64,7 +64,7 @@ local getSpellObject = function(playerObject, spellId, isLiteral) end if (passedSpellName) then - for thisSpellId, spellObject in pairs (playerObject.spells._ActorTable) do + for thisSpellId, spellObject in pairs(playerObject.spells._ActorTable) do local spellName = Details.GetSpellInfo(thisSpellId) if (spellName) then if (spellName:lower() == passedSpellName) then @@ -94,7 +94,7 @@ Details.API_Description = { --[=[ Details.SegmentInfo (segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "SegmentInfo", desc = "Return a table containing information about the segment.", parameters = { @@ -135,7 +135,7 @@ end --[=[ Details.SegmentElapsedTime (segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "SegmentElapsedTime", desc = "Return the total elapsed time of a segment.", parameters = { @@ -170,7 +170,7 @@ end --[=[ Details.SegmentDamagingUnits (segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "SegmentDamagingUnits", desc = "Return a numeric (ipairs) table with name of units that inflicted damage on the segment.", parameters = { @@ -249,7 +249,7 @@ end --[=[ Details.SegmentHealingUnits (segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "SegmentHealingUnits", desc = "Return a numeric (ipairs) table with name of units that inflicted healing on the segment.", parameters = { @@ -328,7 +328,7 @@ end Details.SegmentTotalDamage (segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "SegmentTotalDamage", desc = "Query the total damage done in the segment and only by players in the group.", parameters = { @@ -365,7 +365,7 @@ end Details.SegmentTotalHealing (segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "SegmentTotalHealing", desc = "Query the total healing done in the segment and only by players in the group.", parameters = { @@ -401,7 +401,7 @@ end Details.SegmentPhases (segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "SegmentPhases", desc = "Return a numeric (ipairs) table with phase numbers available on the segment.", parameters = { @@ -448,7 +448,7 @@ end Details.UnitInfo (unitId, segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "UnitInfo", desc = "Query basic information about the unit, like class and spec.", parameters = { @@ -533,7 +533,7 @@ end Details.UnitTexture (unitId, segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "UnitTexture", desc = "Query the icon and texcoords for the class and spec icon.", parameters = { @@ -612,7 +612,7 @@ end --[=[ Details.UnitDamage (unitId, segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "UnitDamage", desc = "Query the damage of a unit.", parameters = { @@ -661,7 +661,7 @@ end --[=[ Details.UnitDamageByPhase (unitId, phaseNumber, segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "UnitDamageByPhase", desc = "Query the damage of a unit but only for a specific phase of a boss encounter.", parameters = { @@ -720,7 +720,7 @@ end --[=[ Details.UnitDamageInfo (unitId, segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "UnitDamageInfo", desc = "Return a table with damage information.", parameters = { @@ -787,7 +787,7 @@ end --[=[ Details.UnitDamageBySpell (unitId, spellId, segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "UnitDamageBySpell", desc = "Query the total damage done of a spell casted by the unit.", parameters = { @@ -857,7 +857,7 @@ end --[=[ Details.UnitDamageSpellInfo (unitId, spellId, segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "UnitDamageSpellInfo", desc = "Return a table with the spell damage information.", parameters = { @@ -944,7 +944,7 @@ function Details.UnitDamageSpellInfo (unitId, spellId, isLiteral, segment) if (castedAmount) then spellInfo.casted = castedAmount else - for castedSpellId, castedAmount in pairs (miscPlayerObject.spell_cast) do + for castedSpellId, castedAmount in pairs(miscPlayerObject.spell_cast) do local castedSpellName = GetSpellInfo(castedSpellId) if (castedSpellName == spellName) then spellInfo.casted = castedAmount @@ -975,7 +975,7 @@ end --[=[ Details.UnitDamageSpellOnUnit (unitId, spellId, segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "UnitDamageSpellOnUnit", desc = "Query the damage done of a spell into a specific target.", parameters = { @@ -1050,7 +1050,7 @@ end --[=[ Details.UnitDamageTaken (unitId, segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "UnitDamageTaken", desc = "Query the unit damage taken.", parameters = { @@ -1098,7 +1098,7 @@ end --[=[ Details.UnitDamageOnUnit (unitId, targetUnitId, segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "UnitDamageOnUnit", desc = "Query the unit damage done on another unit.", parameters = { @@ -1153,7 +1153,7 @@ end --[=[ Details.UnitDamageTakenFromSpell (unitId, spellId, segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "UnitDamageTakenFromSpell", desc = "Query the unit damage taken from a spell.", parameters = { @@ -1204,7 +1204,7 @@ function Details.UnitDamageTakenFromSpell (unitId, spellId, isLiteral, segment) local totalDamageTaken = 0 if (isLiteral and type (spellId) == "number") then for i = 1, #damageContainer._ActorTable do - for thisSpellId, spellObject in pairs (damageContainer._ActorTable [i].spells._ActorTable) do + for thisSpellId, spellObject in pairs(damageContainer._ActorTable [i].spells._ActorTable) do if (thisSpellId == spellId) then totalDamageTaken = totalDamageTaken + (spellObject.targets [unitName] or 0) end @@ -1213,7 +1213,7 @@ function Details.UnitDamageTakenFromSpell (unitId, spellId, isLiteral, segment) else local spellName = GetSpellInfo(spellId) or spellId for i = 1, #damageContainer._ActorTable do - for thisSpellId, spellObject in pairs (damageContainer._ActorTable [i].spells._ActorTable) do + for thisSpellId, spellObject in pairs(damageContainer._ActorTable [i].spells._ActorTable) do local thisSpellName = GetSpellInfo(thisSpellId) if (thisSpellName == spellName) then totalDamageTaken = totalDamageTaken + (spellObject.targets [unitName] or 0) @@ -1229,7 +1229,7 @@ end --[=[ Details.UnitDamagingSpells (unitId, segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "UnitDamagingSpells", desc = "Return a numeric (ipairs) table with spells IDs used by the unit to apply damage.", parameters = { @@ -1273,7 +1273,7 @@ function Details.UnitDamagingSpells (unitId, segment) local unitSpells = playerObject.spells._ActorTable local resultTable = {} - for spellId, spellObject in pairs (unitSpells) do + for spellId, spellObject in pairs(unitSpells) do resultTable [#resultTable + 1] = spellId end @@ -1283,7 +1283,7 @@ end --[=[ Details.UnitDamagingTargets (unitId, segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "UnitDamagingTargets", desc = "Return a numeric (ipairs) table with names of targets the unit inflicted damage. You may query the amount of damage with Details.UnitDamageOnUnit( unitId, targetName ).", parameters = { @@ -1326,7 +1326,7 @@ function Details.UnitDamagingTargets (unitId, segment) return offensiveTargetNames end - for targetName, _ in pairs (playerObject.targets) do + for targetName, _ in pairs(playerObject.targets) do offensiveTargetNames [#offensiveTargetNames + 1] = targetName end @@ -1337,7 +1337,7 @@ end --[=[ Details.UnitDamagingPets (unitId, segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "UnitDamagingPets", desc = "Return a numeric (ipairs) table with all pet names the unit used to apply damage. Individual pet information can be queried with Details.UnitDamage( petName ).", parameters = { @@ -1395,7 +1395,7 @@ end --[=[ Details.UnitHealing (unitId, segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "UnitHealing", desc = "Query the healing done of a unit.", parameters = { @@ -1444,7 +1444,7 @@ end --[=[ Details.UnitHealingInfo (unitId, segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "UnitHealingInfo", desc = "Return a table with healing information.", parameters = { @@ -1516,7 +1516,7 @@ end --[=[ Details.UnitHealingBySpell (unitId, spellId, segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "UnitHealingBySpell", desc = "Query the total healing done of a spell casted by the unit.", parameters = { @@ -1588,7 +1588,7 @@ end --[=[ Details.UnitHealingSpellInfo (unitId, spellId, segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "UnitHealingSpellInfo", desc = "Return a table with the spell healing information.", parameters = { @@ -1675,7 +1675,7 @@ function Details.UnitHealingSpellInfo (unitId, spellId, isLiteral, segment) if (castedAmount) then spellInfo.casted = castedAmount else - for castedSpellId, castedAmount in pairs (miscPlayerObject.spell_cast) do + for castedSpellId, castedAmount in pairs(miscPlayerObject.spell_cast) do local castedSpellName = GetSpellInfo(castedSpellId) if (castedSpellName == spellName) then spellInfo.casted = castedAmount @@ -1707,7 +1707,7 @@ end --[=[ Details.UnitHealingSpellOnUnit (unitId, spellId, segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "UnitHealingSpellOnUnit", desc = "Query the healing done of a spell into a specific target.", parameters = { @@ -1784,7 +1784,7 @@ end --[=[ Details.UnitHealingTaken (unitId, segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "UnitHealingTaken", desc = "Query the unit healing taken.", parameters = { @@ -1834,7 +1834,7 @@ end --[=[ Details.UnitHealingOnUnit (unitId, targetUnitId, segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "UnitHealingOnUnit", desc = "Query the unit healing done on another unit.", parameters = { @@ -1892,7 +1892,7 @@ end --[=[ Details.UnitHealingTakenFromSpell (unitId, spellId, segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "UnitHealingTakenFromSpell", desc = "Query the unit healing taken from a spell.", parameters = { @@ -1943,7 +1943,7 @@ function Details.UnitHealingTakenFromSpell (unitId, spellId, isLiteral, segment) local totalHealingTaken = 0 if (isLiteral and type (spellId) == "number") then for i = 1, #healingContainer._ActorTable do - for thisSpellId, spellObject in pairs (healingContainer._ActorTable [i].spells._ActorTable) do + for thisSpellId, spellObject in pairs(healingContainer._ActorTable [i].spells._ActorTable) do if (thisSpellId == spellId) then totalHealingTaken = totalHealingTaken + (spellObject.targets [unitName] or 0) end @@ -1952,7 +1952,7 @@ function Details.UnitHealingTakenFromSpell (unitId, spellId, isLiteral, segment) else local spellName = GetSpellInfo(spellId) or spellId for i = 1, #healingContainer._ActorTable do - for thisSpellId, spellObject in pairs (healingContainer._ActorTable [i].spells._ActorTable) do + for thisSpellId, spellObject in pairs(healingContainer._ActorTable [i].spells._ActorTable) do local thisSpellName = GetSpellInfo(thisSpellId) if (thisSpellName == spellName) then totalHealingTaken = totalHealingTaken + (spellObject.targets [unitName] or 0) @@ -1969,7 +1969,7 @@ end --[=[ Details.UnitHealingSpells (unitId, segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "UnitHealingSpells", desc = "Return a numeric (ipairs) table with spells IDs used by the unit to apply healing.", parameters = { @@ -2013,7 +2013,7 @@ function Details.UnitHealingSpells (unitId, segment) local unitSpells = playerObject.spells._ActorTable local resultTable = {} - for spellId, spellObject in pairs (unitSpells) do + for spellId, spellObject in pairs(unitSpells) do resultTable [#resultTable + 1] = spellId end @@ -2024,7 +2024,7 @@ end --[=[ Details.UnitHealingTargets (unitId, segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "UnitHealingTargets", desc = "Return a numeric (ipairs) table with names of targets the unit applied heal. You may query the amount of damage with Details.UnitHealingOnUnit( unitId, targetName ).", parameters = { @@ -2067,7 +2067,7 @@ function Details.UnitHealingTargets (unitId, segment) return healingTargetNames end - for targetName, _ in pairs (playerObject.targets) do + for targetName, _ in pairs(playerObject.targets) do healingTargetNames [#healingTargetNames + 1] = targetName end @@ -2079,7 +2079,7 @@ end --[=[ Details.UnitHealingPets (unitId, segment) --=]=] -tinsert (Details.API_Description.namespaces[1].api, { +tinsert(Details.API_Description.namespaces[1].api, { name = "UnitHealingPets", desc = "Return a numeric (ipairs) table with all pet names the unit used to apply healing. Individual pet information can be queried with Details.UnitHealing( petName ).", parameters = { diff --git a/functions/boss.lua b/functions/boss.lua index 6b0031a03..341e57e8f 100644 --- a/functions/boss.lua +++ b/functions/boss.lua @@ -20,7 +20,7 @@ do --return the full table with all data for the instance function _detalhes:GetRaidInfoFromEncounterID (encounterID, encounterEJID) - for id, raidTable in pairs (_detalhes.EncounterInformation) do + for id, raidTable in pairs(_detalhes.EncounterInformation) do if (encounterID) then local ids = raidTable.encounter_ids2 --combatlog if (ids) then @@ -46,7 +46,7 @@ do end function _detalhes:GetInstanceIdFromEncounterId (encounterid) - for id, instanceTable in pairs (_detalhes.EncounterInformation) do + for id, instanceTable in pairs(_detalhes.EncounterInformation) do --combatlog encounter id local ids = instanceTable.encounter_ids2 if (ids) then @@ -68,7 +68,7 @@ do function _detalhes:GetBossEncounterDetailsFromEncounterId (mapid, encounterid) if (not mapid) then local bossIndex, instance - for id, instanceTable in pairs (_detalhes.EncounterInformation) do + for id, instanceTable in pairs(_detalhes.EncounterInformation) do local ids = instanceTable.encounter_ids2 if (ids) then bossIndex = ids [encounterid] diff --git a/functions/bossmods.lua b/functions/bossmods.lua index c7a8d61d9..23edd158e 100644 --- a/functions/bossmods.lua +++ b/functions/bossmods.lua @@ -79,7 +79,7 @@ function Details:BossModsLink() local cur_combat = Details:GetCurrentCombat() local time = cur_combat:GetCombatTime() if (time > 5) then - tinsert (cur_combat.PhaseData, {phase, time}) + tinsert(cur_combat.PhaseData, {phase, time}) end Details:SendEvent("COMBAT_ENCOUNTER_PHASE_CHANGED", nil, phase) @@ -114,7 +114,7 @@ function Details:CreateCallbackListeners() if (current_encounter) then if (_G.DBM) then local db = Details.boss_mods_timers - for spell, timer_table in pairs (current_table_dbm) do + for spell, timer_table in pairs(current_table_dbm) do if (not db.encounter_timers_dbm [timer_table[1]]) then timer_table.id = current_encounter db.encounter_timers_dbm [timer_table[1]] = timer_table @@ -123,7 +123,7 @@ function Details:CreateCallbackListeners() end if (BigWigs) then local db = Details.boss_mods_timers - for timer_id, timer_table in pairs (current_table_bigwigs) do + for timer_id, timer_table in pairs(current_table_bigwigs) do if (not db.encounter_timers_bw [timer_id]) then timer_table.id = current_encounter db.encounter_timers_bw [timer_id] = timer_table diff --git a/functions/deathmenu.lua b/functions/deathmenu.lua index 4312b2fd1..b3fd8c377 100644 --- a/functions/deathmenu.lua +++ b/functions/deathmenu.lua @@ -276,7 +276,7 @@ function detailsOnDeathMenu.ShowPanel() detailsOnDeathMenu:SetHeight(30) - if (not Details:GetTutorialCVar ("DISABLE_ONDEATH_PANEL")) then + if (not Details:GetTutorialCVar("DISABLE_ONDEATH_PANEL")) then detailsOnDeathMenu.disableLabel:Show() detailsOnDeathMenu.disableLabel:SetPoint("bottomleft", detailsOnDeathMenu, "bottomleft", 5, 1) detailsOnDeathMenu.disableLabel.color = "gray" diff --git a/functions/deathrecap.lua b/functions/deathrecap.lua index 0eb12862c..5e0afcd62 100644 --- a/functions/deathrecap.lua +++ b/functions/deathrecap.lua @@ -7,7 +7,7 @@ local L = AceLocale:GetLocale ( "Details" ) local on_deathrecap_line_enter = function(self) if (self.spellid) then - GameTooltip:SetOwner (self, "ANCHOR_RIGHT") + GameTooltip:SetOwner(self, "ANCHOR_RIGHT") Details:GameTooltipSetSpellByID (self.spellid) self:SetBackdropColor(.3, .3, .3, .2) GameTooltip:Show() @@ -200,7 +200,7 @@ function Details.BuildDeathTableFromRecap (recapID) not spellId and {spellId, spellName, texture}, } - tinsert (ArtificialDeathLog[1], ev) + tinsert(ArtificialDeathLog[1], ev) ArtificialDeathLog.n = ArtificialDeathLog.n + 1 end @@ -283,7 +283,7 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat) segmentButton:SetScript("OnClick", function() OpenDetailsDeathRecapAtSegment (i) end) - tinsert (Details.DeathRecap.Segments, i, segmentButton) + tinsert(Details.DeathRecap.Segments, i, segmentButton) end end @@ -323,7 +323,7 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat) for i, button in ipairs(Details.DeathRecap.Segments) do if (Details.tabela_historico.tabelas [i]) then button:Show() - tinsert (buttonsInUse, button) + tinsert(buttonsInUse, button) Details.gump:SetFontColor(button.text, "silver") last_index = i else @@ -333,7 +333,7 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat) local buttonsInUse2 = {} for i = #buttonsInUse, 1, -1 do - tinsert (buttonsInUse2, buttonsInUse[i]) + tinsert(buttonsInUse2, buttonsInUse[i]) end for i = 1, #buttonsInUse2 do local button = buttonsInUse2 [i] @@ -391,7 +391,7 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat) local BiggestDamageHits = {} for i = #events, 1, -1 do - tinsert (BiggestDamageHits, events [i]) + tinsert(BiggestDamageHits, events [i]) end table.sort (BiggestDamageHits, function(t1, t2) return t1[3] > t2[3] @@ -421,7 +421,7 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat) end end if (not haveHitKill) then - tinsert (BiggestDamageHits, 1, hitKill) + tinsert(BiggestDamageHits, 1, hitKill) end end @@ -439,7 +439,7 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat) end end if (not alreadyHave) then - tinsert (BiggestDamageHits, event) + tinsert(BiggestDamageHits, event) if (#BiggestDamageHits == 10) then break end @@ -541,7 +541,7 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat) else source = "Gravity" end - --/run for a,b in pairs (_G) do if (type(b)=="string" and b:find ("Falling")) then print (a,b) end end + --/run for a,b in pairs(_G) do if (type(b)=="string" and b:find ("Falling")) then print (a,b) end end end end diff --git a/functions/dungeon.lua b/functions/dungeon.lua index da7a0c225..8a6dc5a96 100644 --- a/functions/dungeon.lua +++ b/functions/dungeon.lua @@ -107,7 +107,7 @@ local addPlayerDamage = function(unitName, unitRealm) local eDps = damageDone / currentCombat:GetCombatTime() --add the damage to the chart table - tinsert (playerData.ChartData, eDps) + tinsert(playerData.ChartData, eDps) --mythicDungeonCharts:Debug ("Added dps for " , CLName, ":", eDps) if (eDps > playerData.ChartData.max_value) then @@ -119,7 +119,7 @@ local addPlayerDamage = function(unitName, unitRealm) playerData.LastDamage = damageDone --add the damage to the chart table - tinsert (playerData.ChartData, damageDiff) + tinsert(playerData.ChartData, damageDiff) --mythicDungeonCharts:Debug ("Added damage for " , CLName, ":", damageDiff) if (damageDiff > playerData.ChartData.max_value) then @@ -128,7 +128,7 @@ local addPlayerDamage = function(unitName, unitRealm) end else --player still didn't made anything on this combat, so just add zero - tinsert (playerData.ChartData, 0) + tinsert(playerData.ChartData, 0) end end end @@ -172,7 +172,7 @@ function mythicDungeonCharts:OnBossDefeated() if (mythicDungeonCharts.ChartTable and mythicDungeonCharts.ChartTable.Running and bossInfo) then local copiedBossInfo = Details:GetFramework().table.copy ({}, bossInfo) - tinsert (mythicDungeonCharts.ChartTable.BossDefeated, {time() - mythicDungeonCharts.ChartTable.StartTime, copiedBossInfo, currentCombat:GetCombatTime()}) + tinsert(mythicDungeonCharts.ChartTable.BossDefeated, {time() - mythicDungeonCharts.ChartTable.StartTime, copiedBossInfo, currentCombat:GetCombatTime()}) mythicDungeonCharts:Debug ("Boss defeated, time saved", currentCombat:GetCombatTime()) else if (mythicDungeonCharts.ChartTable and mythicDungeonCharts.ChartTable.EndTime ~= -1) then @@ -182,7 +182,7 @@ function mythicDungeonCharts:OnBossDefeated() if (bossInfo) then local copiedBossInfo = Details:GetFramework().table.copy ({}, bossInfo) - tinsert (mythicDungeonCharts.ChartTable.BossDefeated, {time() - mythicDungeonCharts.ChartTable.StartTime, copiedBossInfo, currentCombat:GetCombatTime()}) + tinsert(mythicDungeonCharts.ChartTable.BossDefeated, {time() - mythicDungeonCharts.ChartTable.StartTime, copiedBossInfo, currentCombat:GetCombatTime()}) mythicDungeonCharts:Debug ("Boss defeated, time saved, but used time aproximation:", mythicDungeonCharts.ChartTable.EndTime + 2, now, currentCombat:GetCombatTime()) end end @@ -290,7 +290,7 @@ function mythicDungeonCharts.ShowReadyPanel() f:SetSize(255, 80) f:SetPoint("center", UIParent, "center", 300, 0) - f:SetFrameStrata ("LOW") + f:SetFrameStrata("LOW") f:EnableMouse (true) f:SetMovable (true) f:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}) @@ -341,7 +341,7 @@ function mythicDungeonCharts.ShowChart() f:SetSize(1200, 620) f:SetPoint("center", UIParent, "center", 0, 0) - f:SetFrameStrata ("LOW") + f:SetFrameStrata("LOW") f:EnableMouse (true) f:SetMovable (true) f:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}) @@ -354,7 +354,7 @@ function mythicDungeonCharts.ShowChart() fMinimized:SetSize(160, 24) fMinimized:SetPoint("center", UIParent, "center", 0, 0) - fMinimized:SetFrameStrata ("LOW") + fMinimized:SetFrameStrata("LOW") fMinimized:EnableMouse (true) fMinimized:SetMovable (true) fMinimized:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}) @@ -397,7 +397,7 @@ function mythicDungeonCharts.ShowChart() _detalhes:FormatBackground (f) _detalhes:FormatBackground (fMinimized) - tinsert (UISpecialFrames, "DetailsMythicDungeonChartFrame") + tinsert(UISpecialFrames, "DetailsMythicDungeonChartFrame") --register to libwindow local LibWindow = LibStub ("LibWindow-1.1") @@ -631,7 +631,7 @@ function mythicDungeonCharts.ShowChart() mythicDungeonCharts.PlayerGraphIndex = {} - for playerName, playerTable in pairs (charts) do + for playerName, playerTable in pairs(charts) do local chartData = playerTable.ChartData local lineName = playerTable.Name @@ -666,7 +666,7 @@ function mythicDungeonCharts.ShowChart() chartData.max_value = maxValue mythicDungeonCharts.Frame.ChartFrame:AddLine (chartData, lineColor, lineName, combatTime, texture, "SMA") - tinsert (mythicDungeonCharts.PlayerGraphIndex, playerName) + tinsert(mythicDungeonCharts.PlayerGraphIndex, playerName) end mythicDungeonCharts.Frame.ChartFrame:RefreshBossTimeline (mythicDungeonCharts.ChartTable.BossDefeated, mythicDungeonCharts.ChartTable.ElapsedTime) @@ -676,8 +676,8 @@ function mythicDungeonCharts.ShowChart() for i, bossTable in ipairs(mythicDungeonCharts.ChartTable.BossDefeated) do local combatTime = bossTable [3] or math.random (10, 30) - tinsert (bossTimeTable, bossTable[1]) - tinsert (bossTimeTable, bossTable[1] - combatTime) + tinsert(bossTimeTable, bossTable[1]) + tinsert(bossTimeTable, bossTable[1] - combatTime) end mythicDungeonCharts.Frame.ChartFrame:AddOverlay (bossTimeTable, {1, 1, 1, 0.05}, "Show Boss", "") @@ -727,7 +727,7 @@ local PixelFrameOnEnter = function(self) GameCooltip2:AddLine (Details:GetCurrentToKFunction()(nil, floor (dps))) - GameCooltip2:SetOwner (self) + GameCooltip2:SetOwner(self) GameCooltip2:Show() showID = showID + 1 end @@ -843,7 +843,7 @@ function mythicDungeonCharts:CustomDrawLine (C, sx, sy, ex, ey, w, color, layer, pixelFrame:SetPoint("BOTTOMLEFT", C, relPoint, cx - Bwid, cy - Bhgt) pixelFrame:SetPoint("TOPRIGHT", C, relPoint, cx + Bwid, cy + Bhgt) - tinsert (mythicDungeonCharts.Frame.ChartFrame.FrameInUse, pixelFrame) + tinsert(mythicDungeonCharts.Frame.ChartFrame.FrameInUse, pixelFrame) pixelFrame.PlayerName = playerName pixelFrame.Height = ey diff --git a/functions/events.lua b/functions/events.lua index 3b42f9bd9..0c2ce2ad3 100644 --- a/functions/events.lua +++ b/functions/events.lua @@ -140,9 +140,9 @@ local common_events = { if (common_events [event]) then if (not AlreadyRegistred (_detalhes.RegistredEvents [event], object)) then if (func) then - tinsert (_detalhes.RegistredEvents [event], {object, func, __eventtable = true}) + tinsert(_detalhes.RegistredEvents [event], {object, func, __eventtable = true}) else - tinsert (_detalhes.RegistredEvents [event], object) + tinsert(_detalhes.RegistredEvents [event], object) end return true else @@ -152,9 +152,9 @@ local common_events = { if (event == "BUFF_UPDATE") then if (not AlreadyRegistred (_detalhes.RegistredEvents ["BUFF_UPDATE"], object)) then if (func) then - tinsert (_detalhes.RegistredEvents ["BUFF_UPDATE"], {object, func, __eventtable = true}) + tinsert(_detalhes.RegistredEvents ["BUFF_UPDATE"], {object, func, __eventtable = true}) else - tinsert (_detalhes.RegistredEvents ["BUFF_UPDATE"], object) + tinsert(_detalhes.RegistredEvents ["BUFF_UPDATE"], object) end _detalhes.Buffs:CatchBuffs() _detalhes.RecordPlayerSelfBuffs = true @@ -167,9 +167,9 @@ local common_events = { elseif (event == "BUFF_UPDATE_DEBUFFPOWER") then if (not AlreadyRegistred (_detalhes.RegistredEvents ["BUFF_UPDATE_DEBUFFPOWER"], object)) then if (func) then - tinsert (_detalhes.RegistredEvents ["BUFF_UPDATE_DEBUFFPOWER"], {object, func, __eventtable = true}) + tinsert(_detalhes.RegistredEvents ["BUFF_UPDATE_DEBUFFPOWER"], {object, func, __eventtable = true}) else - tinsert (_detalhes.RegistredEvents ["BUFF_UPDATE_DEBUFFPOWER"], object) + tinsert(_detalhes.RegistredEvents ["BUFF_UPDATE_DEBUFFPOWER"], object) end _detalhes.RecordPlayerAbilityWithBuffs = true _detalhes:UpdateDamageAbilityGears() diff --git a/functions/loaddata.lua b/functions/loaddata.lua index f054a4729..a0ae5a5b1 100644 --- a/functions/loaddata.lua +++ b/functions/loaddata.lua @@ -62,7 +62,7 @@ function _detalhes:ApplyBasicKeys() } --load default profile keys - for key, value in pairs (_detalhes.default_profile) do + for key, value in pairs(_detalhes.default_profile) do if (type(value) == "table") then local ctable = Details.CopyTable (value) self [key] = ctable @@ -90,7 +90,7 @@ function _detalhes:LoadGlobalAndCharacterData() end --load saved values - for key, value in pairs (_detalhes.default_player_data) do + for key, value in pairs(_detalhes.default_player_data) do --check if key exists, e.g. a new key was added if (_detalhes_database [key] == nil) then @@ -104,7 +104,7 @@ function _detalhes:LoadGlobalAndCharacterData() if (type(_detalhes.default_player_data [key]) == "string") then print("|cFFFFAA00Details!|r error 0x8538, report on discord", key, _detalhes_database [key], _detalhes.default_player_data [key]) end - for key2, value2 in pairs (_detalhes.default_player_data [key]) do + for key2, value2 in pairs(_detalhes.default_player_data [key]) do if (_detalhes_database [key] [key2] == nil) then if (type(value2) == "table") then _detalhes_database [key] [key2] = Details.CopyTable (_detalhes.default_player_data [key] [key2]) @@ -129,7 +129,7 @@ function _detalhes:LoadGlobalAndCharacterData() _detalhes_global = Details.CopyTable (_detalhes.default_global_data) end - for key, value in pairs (_detalhes.default_global_data) do + for key, value in pairs(_detalhes.default_global_data) do --check if key exists if (_detalhes_global [key] == nil) then @@ -152,7 +152,7 @@ function _detalhes:LoadGlobalAndCharacterData() end if (type(_detalhes_global [key]) == "table") then - for key2, value2 in pairs (_detalhes.default_global_data [key]) do + for key2, value2 in pairs(_detalhes.default_global_data [key]) do if (_detalhes_global [key] [key2] == nil) then if (type(value2) == "table") then _detalhes_global [key] [key2] = Details.CopyTable (_detalhes.default_global_data [key] [key2]) @@ -321,7 +321,7 @@ function _detalhes:LoadConfig() --initialize parser _detalhes.capture_current = {} - for captureType, captureValue in pairs (_detalhes.capture_real) do + for captureType, captureValue in pairs(_detalhes.capture_real) do _detalhes.capture_current [captureType] = captureValue end @@ -388,7 +388,7 @@ function _detalhes:LoadConfig() saved_skin.__snapH = instance.horizontalSnap saved_skin.__snapV = instance.verticalSnap - for key, value in pairs (instance) do + for key, value in pairs(instance) do if (_detalhes.instance_defaults [key] ~= nil) then if (type(value) == "table") then saved_skin [key] = Details.CopyTable (value) diff --git a/functions/macros.lua b/functions/macros.lua index c26898580..b6b4adca7 100644 --- a/functions/macros.lua +++ b/functions/macros.lua @@ -4,7 +4,7 @@ -- /run Details:OpenPlayerDetails(windowN) function Details:OpenPlayerDetails(window) window = window or 1 - local instance = Details:GetInstance (window) + local instance = Details:GetInstance(window) if (instance) then local display, subDisplay = instance:GetDisplay() if (display == 1) then diff --git a/functions/mythicdungeon.lua b/functions/mythicdungeon.lua index 8f760a16d..584587fd2 100644 --- a/functions/mythicdungeon.lua +++ b/functions/mythicdungeon.lua @@ -141,7 +141,7 @@ function DetailsMythicPlusFrame.MergeSegmentsOnEnd() local lower_instance = Details:GetLowerInstanceNumber() if (lower_instance) then - local instance = Details:GetInstance (lower_instance) + local instance = Details:GetInstance(lower_instance) if (instance) then local func = {function() end} instance:InstanceAlert ("Showing Mythic+ Run Segment", {[[Interface\AddOns\Details\images\icons]], 16, 16, false, 434/512, 466/512, 243/512, 273/512}, 6, func, true) @@ -417,7 +417,7 @@ function DetailsMythicPlusFrame.BossDefeated (this_is_end_end, encounterID, enco local mythicDungeonInfo = pastCombat:GetMythicDungeonInfo() -- .is_mythic_dungeon only boss, trash overall and run overall have it if (not mythicDungeonInfo or not mythicDungeonInfo.TrashOverallSegment) then --trash segment found, schedule to merge - tinsert (segmentsToMerge, pastCombat) + tinsert(segmentsToMerge, pastCombat) end end end @@ -527,7 +527,7 @@ function DetailsMythicPlusFrame.MythicDungeonFinished (fromZoneLeft) end --merge this segment - tinsert (segmentsToMerge, pastCombat) + tinsert(segmentsToMerge, pastCombat) if (DetailsMythicPlusFrame.DevelopmentDebug) then print ("MythicDungeonFinished() > found after last boss combat") @@ -777,7 +777,7 @@ function DetailsMythicPlusFrame.EventListener.OnDetailsEvent (contextObject, eve local lower_instance = _detalhes:GetLowerInstanceNumber() if (lower_instance) then - lower_instance = _detalhes:GetInstance (lower_instance) + lower_instance = _detalhes:GetInstance(lower_instance) if (lower_instance) then C_Timer.After (3, function() if (lower_instance:IsEnabled()) then diff --git a/functions/pack.lua b/functions/pack.lua index f1b403ae4..0cc6ac751 100644 --- a/functions/pack.lua +++ b/functions/pack.lua @@ -649,7 +649,7 @@ function Details.packFunctions.UnPackDamage(currentCombat, combatData, tablePosi spellObject.counter = spellHits spellObject.targets = targetTable - for targetName, amount in pairs (spellObject.targets) do + for targetName, amount in pairs(spellObject.targets) do newTargetsTable[targetName] = (newTargetsTable[targetName] or 0) + amount end @@ -897,7 +897,7 @@ function Details.packFunctions.UnPackHeal(currentCombat, combatData, tablePositi spellObject.counter = spellHits spellObject.targets = targetTable - for targetName, amount in pairs (spellObject.targets) do + for targetName, amount in pairs(spellObject.targets) do newTargetsTable[targetName] = (newTargetsTable[targetName] or 0) + amount end @@ -1436,7 +1436,7 @@ function Details.packFunctions.UnPackUtility(currentCombat, combatData, tablePos spellObject.counter = spellTotal spellObject.targets = targetTable - for targetName, amount in pairs (spellObject.targets) do + for targetName, amount in pairs(spellObject.targets) do newTargetsTable[targetName] = (newTargetsTable[targetName] or 0) + amount newTotal = newTotal + amount end @@ -1482,7 +1482,7 @@ function Details.packFunctions.UnPackUtility(currentCombat, combatData, tablePos spellObject.counter = spellTotal spellObject.targets = targetTable - for targetName, amount in pairs (spellObject.targets) do + for targetName, amount in pairs(spellObject.targets) do newTargetsTable[targetName] = (newTargetsTable[targetName] or 0) + amount newTotal = newTotal + amount end @@ -1493,7 +1493,7 @@ function Details.packFunctions.UnPackUtility(currentCombat, combatData, tablePos local interruptWhatTable = Details.packFunctions.UnpackTable(combatData, spellIndex, true) --table[index] is nil spellObject.interrompeu_oque = interruptWhatTable - for targetName, amount in pairs (spellObject.targets) do + for targetName, amount in pairs(spellObject.targets) do newTargetWhatTable[targetName] = (newTargetWhatTable[targetName] or 0) + amount end @@ -1539,7 +1539,7 @@ function Details.packFunctions.UnPackUtility(currentCombat, combatData, tablePos spellObject.cc_break = spellTotal spellObject.targets = targetTable - for targetName, amount in pairs (spellObject.targets) do + for targetName, amount in pairs(spellObject.targets) do newTargetsTable[targetName] = (newTargetsTable[targetName] or 0) + amount newTotal = newTotal + amount end @@ -1551,7 +1551,7 @@ function Details.packFunctions.UnPackUtility(currentCombat, combatData, tablePos local ccBrokeWhatTable = Details.packFunctions.UnpackTable(combatData, spellIndex, true) spellObject.cc_break_oque = ccBrokeWhatTable - for targetName, amount in pairs (spellObject.cc_break_oque) do + for targetName, amount in pairs(spellObject.cc_break_oque) do newTargetWhatTable[targetName] = (newTargetWhatTable[targetName] or 0) + amount end @@ -1596,7 +1596,7 @@ function Details.packFunctions.UnPackUtility(currentCombat, combatData, tablePos spellObject.dispell = spellTotal spellObject.targets = targetTable - for targetName, amount in pairs (spellObject.targets) do + for targetName, amount in pairs(spellObject.targets) do newTargetsTable[targetName] = (newTargetsTable[targetName] or 0) + amount newTotal = newTotal + amount end @@ -1607,7 +1607,7 @@ function Details.packFunctions.UnPackUtility(currentCombat, combatData, tablePos local dispelWhatTable = Details.packFunctions.UnpackTable(combatData, spellIndex, true) spellObject.dispell_oque = dispelWhatTable - for spellId, amount in pairs (spellObject.dispell_oque) do + for spellId, amount in pairs(spellObject.dispell_oque) do newTargetWhatTable[spellId] = (newTargetWhatTable[spellId] or 0) + amount end @@ -1654,7 +1654,7 @@ function Details.packFunctions.UnPackUtility(currentCombat, combatData, tablePos spellObject.ress = spellTotal spellObject.targets = targetTable - for targetName, amount in pairs (spellObject.targets) do + for targetName, amount in pairs(spellObject.targets) do newTargetsTable[targetName] = (newTargetsTable[targetName] or 0) + amount newTotal = newTotal + amount end @@ -1805,7 +1805,7 @@ function Details.packFunctions.DeployPackedCombatData(packedCombatData) for i = 1, #allActors do local actor = allActors[i] - for targetName, amount in pairs (actor.targets) do + for targetName, amount in pairs(actor.targets) do local actorIndex = damageContainer._NameIndexTable[targetName] if (actorIndex) then local targetActor = allActors[actorIndex] @@ -1831,7 +1831,7 @@ function Details.packFunctions.DeployPackedCombatData(packedCombatData) for i = 1, #allActors do local actor = allActors[i] - for targetName, amount in pairs (actor.targets) do + for targetName, amount in pairs(actor.targets) do local actorIndex = healingContainer._NameIndexTable[targetName] if (actorIndex) then local targetActor = allActors[actorIndex] diff --git a/functions/plater.lua b/functions/plater.lua index decab52cf..bb18a08a5 100644 --- a/functions/plater.lua +++ b/functions/plater.lua @@ -20,7 +20,7 @@ plater_integration_frame.OnTickFrame = CreateFrame("frame", "DetailsPlaterFrameO --on tick function plater_integration_frame.OnTickFrameFunc = function(self, deltaTime) if (self.NextUpdate < 0) then - for targetGUID, damageTable in pairs (plater_integration_frame.DamageTaken) do + for targetGUID, damageTable in pairs(plater_integration_frame.DamageTaken) do --total damage local totalDamage = damageTable.TotalDamageTaken @@ -39,8 +39,8 @@ plater_integration_frame.OnTickFrameFunc = function(self, deltaTime) damageTable.CurrentDamageFromPlayer = damageTable.CurrentDamageFromPlayer + damageOnThisUpdateFromPlayer --add to the buffer the damage added - tinsert (damageTable.RealTimeBuffer, 1, damageOnThisUpdate) - tinsert (damageTable.RealTimeBufferFromPlayer, 1, damageOnThisUpdateFromPlayer) + tinsert(damageTable.RealTimeBuffer, 1, damageOnThisUpdate) + tinsert(damageTable.RealTimeBufferFromPlayer, 1, damageOnThisUpdateFromPlayer) --remove the damage from the buffer local damageRemoved = tremove (damageTable.RealTimeBuffer, CONST_BUFFER_SIZE + 1) @@ -134,7 +134,7 @@ function Details:RefreshPlaterIntegration() --cleanup the old tables plater_integration_frame.CleanUpTimer = C_Timer.NewTicker (10, function() local now = time() - for GUID, damageTable in pairs (plater_integration_frame.DamageTaken) do + for GUID, damageTable in pairs(plater_integration_frame.DamageTaken) do if (damageTable.LastEvent + 9.9 < now) then plater_integration_frame.DamageTaken [GUID] = nil end diff --git a/functions/playerclass.lua b/functions/playerclass.lua index a764daf64..baff40d1f 100644 --- a/functions/playerclass.lua +++ b/functions/playerclass.lua @@ -296,7 +296,7 @@ do if (_detalhes.tabela_vigente) then local misc_actor = _detalhes.tabela_vigente (4, Actor.nome) if (misc_actor and misc_actor.spell_cast) then - for spellid, _ in pairs (misc_actor.spell_cast) do + for spellid, _ in pairs(misc_actor.spell_cast) do local spec = SpecSpellList [spellid] if (spec) then _detalhes.cached_specs [Actor.serial] = spec @@ -427,7 +427,7 @@ do local misc_actor = _detalhes.tabela_vigente (4, Actor.nome) if (misc_actor and misc_actor.spell_cast) then - for spellid, _ in pairs (misc_actor.spell_cast) do + for spellid, _ in pairs(misc_actor.spell_cast) do local spec = SpecSpellList [spellid] if (spec) then _detalhes.cached_specs [Actor.serial] = spec diff --git a/functions/profiles.lua b/functions/profiles.lua index 7e744d7d5..b062b294a 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -56,7 +56,7 @@ function _detalhes:GetProfileList() --build the table local t = {} - for name, profile in pairs (_detalhes_global.__profiles) do + for name, profile in pairs(_detalhes_global.__profiles) do t [#t + 1] = name end @@ -156,7 +156,7 @@ function _detalhes:ResetProfile (profile_name) instance:ChangeSkin (_detalhes.default_skin_to_use) end - for index, instance in pairs (_detalhes.unused_instances) do + for index, instance in pairs(_detalhes.unused_instances) do if (not instance.baseframe) then instance:AtivarInstancia() end @@ -168,7 +168,7 @@ function _detalhes:ResetProfile (profile_name) table.wipe (profile.instances) --export first instance - local instance = _detalhes:GetInstance (1) + local instance = _detalhes:GetInstance(1) local exported = instance:ExportSkin() exported.__was_opened = instance:IsEnabled() exported.__pos = Details.CopyTable (instance:GetPosition()) @@ -193,7 +193,7 @@ end function _detalhes:CreatePanicWarning() _detalhes.instance_load_failed = CreateFrame("frame", "DetailsPanicWarningFrame", UIParent,"BackdropTemplate") _detalhes.instance_load_failed:SetHeight(80) - --tinsert (UISpecialFrames, "DetailsPanicWarningFrame") + --tinsert(UISpecialFrames, "DetailsPanicWarningFrame") _detalhes.instance_load_failed.text = _detalhes.instance_load_failed:CreateFontString (nil, "overlay", "GameFontNormal") _detalhes.instance_load_failed.text:SetPoint("center", _detalhes.instance_load_failed, "center") _detalhes.instance_load_failed.text:SetTextColor (1, 0.6, 0) @@ -235,7 +235,7 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy) end --update profile keys before go - for key, value in pairs (_detalhes.default_profile) do + for key, value in pairs(_detalhes.default_profile) do --the entire key doesn't exist if (profile [key] == nil) then if (type(value) == "table") then @@ -252,7 +252,7 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy) end --apply the profile values - for key, _ in pairs (_detalhes.default_profile) do + for key, _ in pairs(_detalhes.default_profile) do local value = profile [key] if (type(value) == "table") then @@ -296,7 +296,7 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy) --check if there is a skin saved or this is a empty profile if (#saved_skins == 0) then - local instance1 = _detalhes:GetInstance (1) + local instance1 = _detalhes:GetInstance(1) if (not instance1) then instance1 = _detalhes:CreateInstance (1) end @@ -332,14 +332,14 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy) end --get the instance - local instance = _detalhes:GetInstance (index) + local instance = _detalhes:GetInstance(index) if (not instance) then --create a instance without creating its frames (not initializing) instance = _detalhes:CreateDisabledInstance (index, skin) end --copy skin - for key, value in pairs (skin) do + for key, value in pairs(skin) do if (type(value) == "table") then instance [key] = Details.CopyTable (value) else @@ -405,7 +405,7 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy) instance:LockInstance (instance.isLocked) - --tinsert (_detalhes.resize_debug, #_detalhes.resize_debug+1, "libwindow X (427): " .. (instance.libwindow.x or 0)) + --tinsert(_detalhes.resize_debug, #_detalhes.resize_debug+1, "libwindow X (427): " .. (instance.libwindow.x or 0)) instance:RestoreMainWindowPosition() instance:ReajustaGump() --instance:SaveMainWindowPosition() @@ -428,11 +428,11 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy) --check all snaps for invalid entries for i = 1, instances_loaded do - local instance = _detalhes:GetInstance (i) - local previous_instance_id = _detalhes:GetInstance (i-1) and _detalhes:GetInstance (i-1):GetId() or 0 - local next_instance_id = _detalhes:GetInstance (i+1) and _detalhes:GetInstance (i+1):GetId() or 0 + local instance = _detalhes:GetInstance(i) + local previous_instance_id = _detalhes:GetInstance(i-1) and _detalhes:GetInstance(i-1):GetId() or 0 + local next_instance_id = _detalhes:GetInstance(i+1) and _detalhes:GetInstance(i+1):GetId() or 0 - for snap_side, instance_id in pairs (instance.snap) do + for snap_side, instance_id in pairs(instance.snap) do if (instance_id < 1) then --invalid instance instance.snap [snap_side] = nil elseif (instance_id ~= previous_instance_id and instance_id ~= next_instance_id) then --no match @@ -452,7 +452,7 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy) else --is in startup for _, instance in _detalhes:ListInstances() do - for side, id in pairs (instance.snap) do + for side, id in pairs(instance.snap) do local window = _detalhes.tabela_instancias [id] if (not window.ativa) then instance.snap [side] = nil @@ -464,7 +464,7 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy) end end if (not instance:IsEnabled()) then - for side, id in pairs (instance.snap) do + for side, id in pairs(instance.snap) do instance.snap [side] = nil end instance.horizontalSnap = false @@ -528,7 +528,7 @@ function _detalhes:SaveProfile (saveas) local profile = _detalhes:GetProfile (profile_name, true) --save default keys - for key, _ in pairs (_detalhes.default_profile) do + for key, _ in pairs(_detalhes.default_profile) do local current_value = _detalhes [key] @@ -1470,7 +1470,7 @@ local default_global_data = { _detalhes.default_global_data = default_global_data -function _detalhes:GetTutorialCVar (key, default) +function _detalhes:GetTutorialCVar(key, default) --is disabling all popups from the streamer options if (_detalhes.streamer_config.no_alerts) then return true @@ -1494,7 +1494,7 @@ function _detalhes:SaveProfileSpecial() local profile = _detalhes:GetProfile (profile_name, true) --save default keys - for key, _ in pairs (_detalhes.default_profile) do + for key, _ in pairs(_detalhes.default_profile) do local current_value = _detalhes_database [key] or _detalhes_global [key] or _detalhes.default_player_data [key] or _detalhes.default_global_data [key] @@ -1680,7 +1680,7 @@ function Details:ExportCurrentProfile() local globaData = {} --fill player and global data tables - for key, _ in pairs (defaultPlayerData) do + for key, _ in pairs(defaultPlayerData) do if (not exportProfileBlacklist[key]) then if (type(Details[key]) == "table") then playerData [key] = DetailsFramework.table.copy ({}, Details[key]) @@ -1689,7 +1689,7 @@ function Details:ExportCurrentProfile() end end end - for key, _ in pairs (defaultGlobalData) do + for key, _ in pairs(defaultGlobalData) do if (not exportProfileBlacklist[key]) then if (type(Details[key]) == "table") then globaData [key] = DetailsFramework.table.copy ({}, Details[key]) @@ -1747,7 +1747,7 @@ function Details:ImportProfile (profileString, newProfileName) local defaultProfileData = Details.default_profile --transfer player and global data tables from the profile to details object - for key, _ in pairs (defaultPlayerData) do + for key, _ in pairs(defaultPlayerData) do local importedValue = playerData[key] if (importedValue ~= nil) then if (type(importedValue) == "table") then @@ -1758,7 +1758,7 @@ function Details:ImportProfile (profileString, newProfileName) end end - for key, _ in pairs (defaultGlobalData) do + for key, _ in pairs(defaultGlobalData) do local importedValue = globalData[key] if (importedValue ~= nil) then if (type(importedValue) == "table") then @@ -1770,7 +1770,7 @@ function Details:ImportProfile (profileString, newProfileName) end --transfer data from the imported profile to the new profile object - for key, _ in pairs (defaultProfileData) do + for key, _ in pairs(defaultProfileData) do local importedValue = profileData[key] if (importedValue ~= nil) then if (type(importedValue) == "table") then diff --git a/functions/raidinfo.lua b/functions/raidinfo.lua index b64742b1c..4447c5e9c 100644 --- a/functions/raidinfo.lua +++ b/functions/raidinfo.lua @@ -154,12 +154,12 @@ function Details.InstallRaidInfo() for i = 1, #PORTRAIT_LIST do local bossName = DetailsFramework.EncounterJournal.EJ_GetEncounterInfoByIndex (i, INSTANCE_EJID) if (bossName) then - tinsert (BOSSNAMES, bossName) + tinsert(BOSSNAMES, bossName) local encounterTable = { boss = bossName, portrait = PORTRAIT_LIST [i], } - tinsert (ENCOUNTERS, encounterTable) + tinsert(ENCOUNTERS, encounterTable) else break end diff --git a/functions/rowanimation.lua b/functions/rowanimation.lua index 3b0ace1e4..ded336edd 100644 --- a/functions/rowanimation.lua +++ b/functions/rowanimation.lua @@ -29,7 +29,7 @@ desc = "" end - tinsert (_detalhes.row_animation_pool, {name = name, desc = desc, func = func, options = options}) + tinsert(_detalhes.row_animation_pool, {name = name, desc = desc, func = func, options = options}) return true end @@ -47,7 +47,7 @@ function _detalhes:GetRowAnimationList() local t = {} for key, value in ipairs(_detalhes.row_animation_pool) do - tinsert (t, value.name) + tinsert(t, value.name) end return t end diff --git a/functions/savedata.lua b/functions/savedata.lua index f2d80d896..fb303ad10 100644 --- a/functions/savedata.lua +++ b/functions/savedata.lua @@ -6,7 +6,7 @@ function _detalhes:WipeConfig() local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) local b = CreateFrame("button", "DetailsResetConfigButton", UIParent) - tinsert (UISpecialFrames, "DetailsResetConfigButton") + tinsert(UISpecialFrames, "DetailsResetConfigButton") DetailsFramework:ApplyStandardBackdrop(b) @@ -100,14 +100,14 @@ function _detalhes:SaveConfig() _detalhes.last_day = date ("%d") --salva o container do personagem - for key, value in pairs (_detalhes.default_player_data) do + for key, value in pairs(_detalhes.default_player_data) do if (not is_exception [key]) then _detalhes_database [key] = _detalhes [key] end end --salva o container das globais - for key, value in pairs (_detalhes.default_global_data) do + for key, value in pairs(_detalhes.default_global_data) do if (key ~= "__profiles") then _detalhes_global [key] = _detalhes [key] end diff --git a/functions/skins.lua b/functions/skins.lua index c7aac7704..4e522dda5 100644 --- a/functions/skins.lua +++ b/functions/skins.lua @@ -59,15 +59,15 @@ local _ end local reset_tooltip = function() - _detalhes:SetTooltipBackdrop ("Blizzard Tooltip", 16, {1, 1, 1, 1}) + _detalhes:SetTooltipBackdrop("Blizzard Tooltip", 16, {1, 1, 1, 1}) _detalhes:DelayOptionsRefresh() end local set_tooltip_elvui1 = function() - _detalhes:SetTooltipBackdrop ("Blizzard Tooltip", 16, {0, 0, 0, 1}) + _detalhes:SetTooltipBackdrop("Blizzard Tooltip", 16, {0, 0, 0, 1}) _detalhes:DelayOptionsRefresh() end local set_tooltip_elvui2 = function() - _detalhes:SetTooltipBackdrop ("Blizzard Tooltip", 16, {1, 1, 1, 0}) + _detalhes:SetTooltipBackdrop("Blizzard Tooltip", 16, {1, 1, 1, 0}) _detalhes:DelayOptionsRefresh() end diff --git a/functions/slash.lua b/functions/slash.lua index a2168427e..824a5d245 100644 --- a/functions/slash.lua +++ b/functions/slash.lua @@ -53,7 +53,7 @@ function SlashCmdList.DETAILS (msg, editbox) local instance = rest:match ("^(%S*)%s*(.-)$") instance = tonumber (instance) if (instance) then - local this_instance = _detalhes:GetInstance (instance) + local this_instance = _detalhes:GetInstance(instance) if (not this_instance) then return _detalhes:Msg (Loc ["STRING_WINDOW_NOTFOUND"]) end @@ -132,7 +132,7 @@ function SlashCmdList.DETAILS (msg, editbox) local instance = rest:match ("^(%S*)%s*(.-)$") instance = tonumber (instance) if (instance) then - local this_instance = _detalhes:GetInstance (instance) + local this_instance = _detalhes:GetInstance(instance) if (not this_instance) then return _detalhes:Msg (Loc ["STRING_WINDOW_NOTFOUND"]) end @@ -176,17 +176,17 @@ function SlashCmdList.DETAILS (msg, editbox) if (rest and tonumber (rest)) then local instanceN = tonumber (rest) if (instanceN > 0 and instanceN <= #_detalhes.tabela_instancias) then - local instance = _detalhes:GetInstance (instanceN) + local instance = _detalhes:GetInstance(instanceN) _detalhes:OpenOptionsWindow (instance) end else local lower_instance = _detalhes:GetLowerInstanceNumber() if (not lower_instance) then - local instance = _detalhes:GetInstance (1) + local instance = _detalhes:GetInstance(1) _detalhes.CriarInstancia (_, _, 1) _detalhes:OpenOptionsWindow (instance) else - _detalhes:OpenOptionsWindow (_detalhes:GetInstance (lower_instance)) + _detalhes:OpenOptionsWindow (_detalhes:GetInstance(lower_instance)) end end @@ -194,7 +194,7 @@ function SlashCmdList.DETAILS (msg, editbox) elseif (command == Loc ["STRING_SLASH_WORLDBOSS"] or command == "worldboss") then local questIds = {{"Tarlna the Ageless", 81535}, {"Drov the Ruiner ", 87437}, {"Rukhmar", 87493}} - for _, _table in pairs (questIds) do + for _, _table in pairs(questIds) do print (format ("%s: \124cff%s\124r", _table [1], IsQuestFlaggedCompleted (_table [2]) and "ff0000"..Loc ["STRING_KILLED"] or "00ff00"..Loc ["STRING_ALIVE"])) end @@ -447,7 +447,7 @@ function SlashCmdList.DETAILS (msg, editbox) local f = _detalhes:CreateListPanel() local i = 1 - for k, v in pairs (_detalhes.tabela_pets.pets) do + for k, v in pairs(_detalhes.tabela_pets.pets) do if (v[6] == "Guardian of Ancient Kings") then _detalhes.ListPanel:add ( k.. ": " .. v[1] .. " | " .. v[2] .. " | " .. v[3] .. " | " .. v[6], i) i = i + 1 @@ -460,7 +460,7 @@ function SlashCmdList.DETAILS (msg, editbox) _detalhes.tabela_vigente.saved_pets = {} - for k, v in pairs (_detalhes.tabela_pets.pets) do + for k, v in pairs(_detalhes.tabela_pets.pets) do _detalhes.tabela_vigente.saved_pets [k] = {v[1], v[2], v[3]} end @@ -554,10 +554,10 @@ function SlashCmdList.DETAILS (msg, editbox) _detalhes:PrintParserCacheIndexes() elseif (msg == "captures") then - for k, v in pairs (_detalhes.capture_real) do + for k, v in pairs(_detalhes.capture_real) do print ("real -",k,":",v) end - for k, v in pairs (_detalhes.capture_current) do + for k, v in pairs(_detalhes.capture_current) do print ("current -",k,":",v) end @@ -569,7 +569,7 @@ function SlashCmdList.DETAILS (msg, editbox) f:SetHeight(150) f:SetBackdrop({bgFile = "Interface\\AddOns\\Details\\images\\background", tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}}) f:SetBackdropColor(0, 0, 0, 1) - f:EnableMouseWheel (true) + f:EnableMouseWheel(true) local rows = {} for i = 1, 7 do @@ -621,7 +621,7 @@ function SlashCmdList.DETAILS (msg, editbox) if (not _G.DetailsScanTooltip) then local scanTool = CreateFrame("GameTooltip", "DetailsScanTooltip", nil, "GameTooltipTemplate") - scanTool:SetOwner (WorldFrame, "ANCHOR_NONE") + scanTool:SetOwner(WorldFrame, "ANCHOR_NONE") end function getPetOwner (petName) @@ -673,7 +673,7 @@ function SlashCmdList.DETAILS (msg, editbox) end if (playerActor and playerActor.buff_uptime_spells and playerActor.buff_uptime_spells._ActorTable) then - for spellid, spellTable in pairs (playerActor.buff_uptime_spells._ActorTable) do + for spellid, spellTable in pairs(playerActor.buff_uptime_spells._ActorTable) do local spellname = GetSpellInfo(spellid) if (spellname) then print (spellid, spellname, spellTable.uptime) @@ -839,7 +839,7 @@ function SlashCmdList.DETAILS (msg, editbox) _detalhes.id_frame:SetPoint("center", UIParent, "center") _detalhes.id_frame:SetBackdrop(backdrop) - tinsert (UISpecialFrames, "DetailsID") + tinsert(UISpecialFrames, "DetailsID") _detalhes.id_frame.texto = CreateFrame("editbox", nil, _detalhes.id_frame) _detalhes.id_frame.texto:SetPoint("topleft", _detalhes.id_frame, "topleft") @@ -944,7 +944,7 @@ function SlashCmdList.DETAILS (msg, editbox) local container = _detalhes.tabela_vigente [t]._NameIndexTable local i = 0 - for name, _ in pairs (container) do + for name, _ in pairs(container) do i = i + 1 f:add (name, i) end @@ -1172,7 +1172,7 @@ function SlashCmdList.DETAILS (msg, editbox) for o = 1, DetailsFramework.EncounterJournal.EJ_GetNumLoot() do local name, icon, slot, armorType, itemID, link, encounterID = DetailsFramework.EncounterJournal.EJ_GetLootInfoByIndex (o) r[slot] = r[slot] or {} - tinsert (r[slot], {itemID, encounterID}) + tinsert(r[slot], {itemID, encounterID}) total = total + 1 end end @@ -1277,8 +1277,8 @@ function SlashCmdList.DETAILS (msg, editbox) local y = -50 local allspecs = {} - for a, b in pairs (_detalhes.class_specs_coords) do - tinsert (allspecs, a) + for a, b in pairs(_detalhes.class_specs_coords) do + tinsert(allspecs, a) end for i = 1, 10 do @@ -1323,7 +1323,7 @@ function SlashCmdList.DETAILS (msg, editbox) local lower_instance = _detalhes:GetLowerInstanceNumber() if (lower_instance) then - local instance = _detalhes:GetInstance (lower_instance) + local instance = _detalhes:GetInstance(lower_instance) if (instance) then local func = {_detalhes.OpenRaidHistoryWindow, _detalhes, "Hellfire Citadel", 1800, 15, "DAMAGER", "Rock Lobster", 2, "Keyspell"} instance:InstanceAlert ("Boss Defeated, Open History! ", {[[Interface\AddOns\Details\images\icons]], 16, 16, false, 434/512, 466/512, 243/512, 273/512}, 40, func, true) @@ -1342,7 +1342,7 @@ function SlashCmdList.DETAILS (msg, editbox) local icon = {[[Interface\PvPRankBadges\PvPRank08]], 16, 16, false, 0, 1, 0, 1} local lower_instance = _detalhes:GetLowerInstanceNumber() - local instance = _detalhes:GetInstance (lower_instance) + local instance = _detalhes:GetInstance(lower_instance) instance:InstanceAlert ("Boss Defeated! Show Ranking", icon, 10, func, true) @@ -1378,7 +1378,7 @@ function SlashCmdList.DETAILS (msg, editbox) for o = 1, 3 do local talentID, name, texture, selected, available = GetTalentInfo (i, o, 1) if (selected) then - tinsert (talents, talentID) + tinsert(talents, talentID) break end end @@ -1493,18 +1493,18 @@ function SlashCmdList.DETAILS (msg, editbox) local sectionInfo = C_EncounterJournal.GetSectionInfo (ID) if (sectionInfo) then - tinsert (result, sectionInfo) + tinsert(result, sectionInfo) if (sectionInfo.spellID and type (sectionInfo.spellID) == "number" and sectionInfo.spellID ~= 0) then - tinsert (spellIDs, sectionInfo.spellID) + tinsert(spellIDs, sectionInfo.spellID) end local nextChild, nextSibling = sectionInfo.firstChildSectionID, sectionInfo.siblingSectionID if (nextSibling) then - tinsert (nextID, nextSibling) + tinsert(nextID, nextSibling) end if (nextChild) then - tinsert (nextID, nextChild) + tinsert(nextID, nextChild) end else break @@ -1518,7 +1518,7 @@ function SlashCmdList.DETAILS (msg, editbox) local instance1 = Details:GetInstance(1) if (instance1) then local exportedValues = {} - for key, _ in pairs (skin) do + for key, _ in pairs(skin) do local value = instance1[key] if (value) then exportedValues[key] = value @@ -1616,7 +1616,7 @@ function SlashCmdList.DETAILS (msg, editbox) if (t1.Timer) then t1, t2 = t1.t1, t1.t2 end - for key, value in pairs (t2) do + for key, value in pairs(t2) do if (not ignoredKeys [key] and type (value) ~= "function") then if (key == "targets") then t1 [key] = {} @@ -1747,7 +1747,7 @@ function Details.RefreshUserList (ignoreIfHidden) end if (not foundPlayer) then - tinsert (newList, {playerName, "--", "--"}) + tinsert(newList, {playerName, "--", "--"}) end end end @@ -1899,7 +1899,7 @@ function _detalhes:CreateListPanel() _detalhes.ListPanel:SetPoint("center", UIParent, "center", 300, 0) _detalhes.ListPanel.barras = {} - tinsert (UISpecialFrames, "DetailsActorsFrame") + tinsert(UISpecialFrames, "DetailsActorsFrame") _detalhes.ListPanel.close_with_right = true local container_barras_window = CreateFrame("ScrollFrame", "Details_ActorsBarrasScroll", _detalhes.ListPanel.widget) diff --git a/functions/spellcache.lua b/functions/spellcache.lua index 5f68cba0e..9e34a7e6c 100644 --- a/functions/spellcache.lua +++ b/functions/spellcache.lua @@ -89,7 +89,7 @@ do --_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 + 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}) end @@ -226,7 +226,7 @@ do end function _detalhes:FillUserCustomSpells() - for spellid, t in pairs (defaultSpellCustomization) do + for spellid, t in pairs(defaultSpellCustomization) do local already_have for index, spelltable in ipairs(_detalhes.savedCustomSpells) do @@ -265,7 +265,7 @@ do end end if (not is_overwrite) then - tinsert (_detalhes.savedCustomSpells, {spellid, name, icon}) + tinsert(_detalhes.savedCustomSpells, {spellid, name, icon}) end return _rawset (_detalhes.spellcache, spellid, {name, 1, icon}) end @@ -315,7 +315,7 @@ do if (not load_frame) then load_frame = CreateFrame("frame", "DetailsLoadSpellCache", UIParent) - load_frame:SetFrameStrata ("DIALOG") + load_frame:SetFrameStrata("DIALOG") local progress_label = load_frame:CreateFontString ("DetailsLoadSpellCacheProgress", "overlay", "GameFontHighlightSmall") progress_label:SetText("Loading Spells: 0%") diff --git a/functions/spells.lua b/functions/spells.lua index a73b25f99..264999338 100644 --- a/functions/spells.lua +++ b/functions/spells.lua @@ -4,7 +4,7 @@ do --import potion list from the framework _detalhes.PotionList = {} - for spellID, _ in pairs (DetailsFramework.PotionIDs) do + for spellID, _ in pairs(DetailsFramework.PotionIDs) do _detalhes.PotionList [spellID] = true end @@ -3021,7 +3021,7 @@ do local getCooldownsForClass = function(class) local result = {} - for spellId, spellInfo in pairs (_G.DetailsFramework.CooldownsInfo) do + for spellId, spellInfo in pairs(_G.DetailsFramework.CooldownsInfo) do if (class == spellInfo.class) then result[#result+1] = spellId end @@ -4026,7 +4026,7 @@ local SplitLoadFunc = function(self, deltaTime) local SpellPool = Details.spell_pool local EncounterSpellPool = Details.encounter_spell_pool - for spellID, _ in pairs (spellList) do + for spellID, _ in pairs(spellList) do if (not SpellPool [spellID]) then SpellPool [spellID] = source end @@ -4049,7 +4049,7 @@ local SplitLoadFunc = function(self, deltaTime) local SpellPool = Details.spell_pool local EncounterSpellPool = Details.encounter_spell_pool - for spellID, _ in pairs (spellList) do + for spellID, _ in pairs(spellList) do if (not SpellPool [spellID]) then SpellPool [spellID] = source end @@ -4068,7 +4068,7 @@ local SplitLoadFunc = function(self, deltaTime) local SpellPool = Details.spell_pool local EncounterSpellPool = Details.encounter_spell_pool - for spellID, _ in pairs (actorToIndex.spell_cast) do + for spellID, _ in pairs(actorToIndex.spell_cast) do if (not SpellPool [spellID]) then SpellPool [spellID] = source end diff --git a/functions/timedata.lua b/functions/timedata.lua index b208bab23..5b6adc316 100644 --- a/functions/timedata.lua +++ b/functions/timedata.lua @@ -124,7 +124,7 @@ version = version or "v1.0" icon = icon or [[Interface\InventoryItems\WoWUnknownItem01]] - tinsert (_detalhes.savedTimeCaptures, {name, func, matrix, author, version, icon, is_enabled, do_not_save = no_save}) + tinsert(_detalhes.savedTimeCaptures, {name, func, matrix, author, version, icon, is_enabled, do_not_save = no_save}) if (_G.DetailsOptionsWindow and _G.DetailsOptionsWindow:IsShown()) then DetailsOptionsWindowTab17UserTimeCapturesFillPanel.MyObject:Refresh() @@ -160,7 +160,7 @@ local new_table = {} for index, t in ipairs(_detalhes.savedTimeCaptures) do if (not t.do_not_save) then - tinsert (new_table, t) + tinsert(new_table, t) end end _detalhes.savedTimeCaptures = new_table @@ -192,7 +192,7 @@ local func, errortext = loadstring (t [INDEX_FUNCTION]) if (func) then DetailsFramework:SetEnvironment(func) - tinsert (exec, { func = func, data = data, attributes = Details.CopyTable (t [INDEX_MATRIX]), is_user = true }) + tinsert(exec, { func = func, data = data, attributes = Details.CopyTable (t [INDEX_MATRIX]), is_user = true }) else _detalhes:Msg ("|cFFFF9900error compiling script for time data (charts)|r: ", errortext) end @@ -200,7 +200,7 @@ --plugin local func = t [INDEX_FUNCTION] DetailsFramework:SetEnvironment(func) - tinsert (exec, { func = func, data = data, attributes = Details.CopyTable (t [INDEX_MATRIX]) }) + tinsert(exec, { func = func, data = data, attributes = Details.CopyTable (t [INDEX_MATRIX]) }) end end diff --git a/images/spec_icons_highlight.tga b/images/spec_icons_highlight.tga deleted file mode 100644 index 3f24e992f..000000000 Binary files a/images/spec_icons_highlight.tga and /dev/null differ diff --git a/images/spec_icons_normal.tga b/images/spec_icons_normal.tga index da9d00ed5..ada5dfdb6 100644 Binary files a/images/spec_icons_normal.tga and b/images/spec_icons_normal.tga differ diff --git a/plugins/Details_EncounterDetails/Details_EncounterDetails.lua b/plugins/Details_EncounterDetails/Details_EncounterDetails.lua index 3e41b828f..dc233e3d0 100644 --- a/plugins/Details_EncounterDetails/Details_EncounterDetails.lua +++ b/plugins/Details_EncounterDetails/Details_EncounterDetails.lua @@ -37,7 +37,7 @@ local CONST_FONT_SIZE = 10 --Create the plugin Object local EncounterDetails = _detalhes:NewPluginObject ("Details_EncounterDetails", DETAILSPLUGIN_ALWAYSENABLED) -tinsert (UISpecialFrames, "Details_EncounterDetails") +tinsert(UISpecialFrames, "Details_EncounterDetails") --Main Frame local EncounterDetailsFrame = EncounterDetails.Frame EncounterDetailsFrame.DefaultBarHeight = 20 @@ -196,7 +196,7 @@ local function CreatePluginFrames (data) local whisper_table = EncounterDetails.current_whisper_table if (whisper_table and _combat_object.is_boss and _combat_object.is_boss.name) then whisper_table.boss = _combat_object.is_boss.name - tinsert (EncounterDetails.boss_emotes_table, 1, whisper_table) + tinsert(EncounterDetails.boss_emotes_table, 1, whisper_table) if (#EncounterDetails.boss_emotes_table > EncounterDetails.db.max_emote_segments) then table.remove (EncounterDetails.boss_emotes_table, EncounterDetails.db.max_emote_segments+1) @@ -283,7 +283,7 @@ local function CreatePluginFrames (data) if (_G.DBM) then local db = _detalhes.global_plugin_database ["DETAILS_PLUGIN_ENCOUNTER_DETAILS"] - for spell, timer_table in pairs (current_table_dbm) do + for spell, timer_table in pairs(current_table_dbm) do if (not db.encounter_timers_dbm [timer_table[1]]) then timer_table.id = current_encounter db.encounter_timers_dbm [timer_table[1]] = timer_table @@ -292,7 +292,7 @@ local function CreatePluginFrames (data) end if (BigWigs) then local db = _detalhes.global_plugin_database ["DETAILS_PLUGIN_ENCOUNTER_DETAILS"] - for timer_id, timer_table in pairs (current_table_bigwigs) do + for timer_id, timer_table in pairs(current_table_bigwigs) do if (not db.encounter_timers_bw [timer_id]) then timer_table.id = current_encounter db.encounter_timers_bw [timer_id] = timer_table @@ -415,7 +415,7 @@ local function CreatePluginFrames (data) EncounterDetails:ShowToolbarIcon (EncounterDetails.ToolbarButton, "star") --EncounterDetails:SetTutorialCVar ("ENCOUNTER_DETAILS_BALLON_TUTORIAL1", false) --debug - if (not EncounterDetails:GetTutorialCVar ("ENCOUNTER_DETAILS_BALLON_TUTORIAL1")) then + if (not EncounterDetails:GetTutorialCVar("ENCOUNTER_DETAILS_BALLON_TUTORIAL1")) then --print ("nao viu o tutorial ainda") C_Timer.After (2, EncounterDetails.ShowIconBallonTutorial) end @@ -468,7 +468,7 @@ local function CreatePluginFrames (data) end --select latest emote segment - Details_EncounterDetailsEmotesSegmentDropdown.MyObject:Select (1) + Details_EncounterDetailsEmotesSegmentDropdown.MyObject:Select(1) Details_EncounterDetailsEmotesSegmentDropdown.MyObject:Refresh() FauxScrollFrame_SetOffset (EncounterDetails_EmoteScroll, 0) EncounterDetails:SetEmoteSegment (1) @@ -476,7 +476,7 @@ local function CreatePluginFrames (data) if (EncounterDetailsFrame.ShowType ~= "emotes") then --hide emote frames - for _, widget in pairs (EncounterDetails.Frame.EmoteWidgets) do + for _, widget in pairs(EncounterDetails.Frame.EmoteWidgets) do widget:Hide() end end @@ -569,7 +569,7 @@ local function CreatePluginFrames (data) --apply the backdrop settings to the menu Details:FormatCooltipBackdrop() - CoolTip:SetOwner (ENCOUNTERDETAILS_BUTTON, "bottom", "top", 0, 0) + CoolTip:SetOwner(ENCOUNTERDETAILS_BUTTON, "bottom", "top", 0, 0) CoolTip:ShowCooltip() end @@ -621,7 +621,7 @@ end GameCooltip:Reset() GameCooltip:SetType ("tooltipbar") - GameCooltip:SetOwner (row) + GameCooltip:SetOwner(row) GameCooltip:AddLine ("Click to Report", nil, 1, "orange") GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, 16, 0.015625, 0.13671875, 0.4375, 0.59765625) @@ -741,7 +741,7 @@ end GameCooltip:SetOption("StatusBarTexture", [[Interface\AddOns\Details\images\bar_serenity]]) GameCooltip:SetBackdrop(1, _detalhes.cooltip_preset2_backdrop, bgColor, borderColor) - GameCooltip:SetOwner (row, "bottomright", "bottomleft", -2, -50) + GameCooltip:SetOwner(row, "bottomright", "bottomleft", -2, -50) row.OverlayTexture:Show() GameCooltip:ShowCooltip() end @@ -778,7 +778,7 @@ local function DispellInfo (dispell, barra) local spellname = GetSpellInfo(barra.spellid) if (spellname) then - GameTooltip:SetOwner (GameCooltipFrame1, "ANCHOR_NONE") + GameTooltip:SetOwner(GameCooltipFrame1, "ANCHOR_NONE") GameTooltip:SetSpellByID(barra.spellid) GameTooltip:SetPoint("topright", GameCooltipFrame1, "topleft", -2, 0) GameTooltip:Show() @@ -821,7 +821,7 @@ local function KickBy (magia, barra) local spellname = GetSpellInfo(barra.spellid) if (spellname) then - GameTooltip:SetOwner (GameCooltipFrame1, "ANCHOR_NONE") + GameTooltip:SetOwner(GameCooltipFrame1, "ANCHOR_NONE") GameTooltip:SetSpellByID(barra.spellid) GameTooltip:SetPoint("topright", GameCooltipFrame1, "topleft", -2, 0) GameTooltip:Show() @@ -880,13 +880,13 @@ local function EnemySkills (habilidade, barra) local spellname = GetSpellInfo(barra.spellid) if (spellname) then - GameTooltip:SetOwner (GameCooltipFrame1, "ANCHOR_NONE") + GameTooltip:SetOwner(GameCooltipFrame1, "ANCHOR_NONE") GameTooltip:SetSpellByID(barra.spellid) GameTooltip:SetPoint("right", barra, "left", -2, 0) GameTooltip:Show() end - GameCooltip:SetOwner (barra, "left", "right", 2, 0) + GameCooltip:SetOwner(barra, "left", "right", 2, 0) end --custom tooltip for damage taken details --------------------------------------------------------------------------------------------------------- @@ -947,7 +947,7 @@ local function DamageTakenDetails (jogador, barra) GameTooltip:AddLine ("* "..Loc ["STRING_MELEE_DAMAGE"], 0, 1, 0) end - GameCooltip:SetOwner (barra, "left", "right", 2, 0) + GameCooltip:SetOwner(barra, "left", "right", 2, 0) end --custom tooltip clicks on any bar --------------------------------------------------------------------------------------------------------- @@ -1064,9 +1064,9 @@ function EncounterDetails:SetRowScripts (barra, index, container) self:SetAlpha (1) EncounterDetails.SetBarBackdrop_OnEnter (self) - --GameTooltip:SetOwner (self, "ANCHOR_TOPRIGHT") + --GameTooltip:SetOwner(self, "ANCHOR_TOPRIGHT") GameCooltip:Preset (2) - GameCooltip:SetOwner (self) + GameCooltip:SetOwner(self) EncounterDetails:FormatCooltipSettings() if (not self.TTT) then --tool tip type @@ -1151,7 +1151,7 @@ function EncounterDetails:OpenAndRefresh (_, segment) DebugMessage ("segment found: ", index, combate:GetCombatName(), combate.is_trash) --the first segment found here will be the first segment the dropdown found, so it can use the index 1 of the dropdown list - _G [frame:GetName().."SegmentsDropdown"].MyObject:Select (1, true) + _G [frame:GetName().."SegmentsDropdown"].MyObject:Select(1, true) foundABoss = index break @@ -1196,7 +1196,7 @@ function EncounterDetails:OpenAndRefresh (_, segment) _combat_object = combat --the first segment found here will be the first segment the dropdown found, so it can use the index 1 of the dropdown list - _G [frame:GetName().."SegmentsDropdown"].MyObject:Select (1, true) + _G [frame:GetName().."SegmentsDropdown"].MyObject:Select(1, true) DebugMessage ("found another segment during another loop", index, combat:GetCombatName(), combat.is_trash) foundSegment = true @@ -1492,7 +1492,7 @@ function EncounterDetails:OpenAndRefresh (_, segment) local tt = tabela_em_ordem [index] [2] -- tabela com [PlayerName] = {amount, class} - for playerName, t in pairs (tabela [2]) do + for playerName, t in pairs(tabela [2]) do local amount, class = unpack (t) if (tt [playerName]) then tt [playerName][1] = tt [playerName][1] + amount @@ -1636,7 +1636,7 @@ function EncounterDetails:OpenAndRefresh (_, segment) _table_sort (tabela.damage_from, sort_damage_from) tabela [1] = tabela.damage_from_total - tinsert (adds, tabela) + tinsert(adds, tabela) end end @@ -1652,7 +1652,7 @@ function EncounterDetails:OpenAndRefresh (_, segment) local dano_em = tabela.dano_em GameCooltip:Preset (2) - GameCooltip:SetOwner (self) + GameCooltip:SetOwner(self) EncounterDetails:FormatCooltipSettings() @@ -1685,7 +1685,7 @@ function EncounterDetails:OpenAndRefresh (_, segment) self.textura:SetBlendMode("ADD") self.textura:SetSize(18, 18) self.ArrowOnEnter = true - GameCooltip:SetOwner (self, "right", "left", -10, 0) + GameCooltip:SetOwner(self, "right", "left", -10, 0) GameCooltip:AddLine (" ") GameCooltip:AddLine ("CLICK to Report") @@ -1699,7 +1699,7 @@ function EncounterDetails:OpenAndRefresh (_, segment) local damage_from = tabela.damage_from GameCooltip:Preset (2) - GameCooltip:SetOwner (self) + GameCooltip:SetOwner(self) EncounterDetails:FormatCooltipSettings() @@ -1743,7 +1743,7 @@ function EncounterDetails:OpenAndRefresh (_, segment) GameCooltip:AddLine (" ") GameCooltip:AddLine ("CLICK to Report") - GameCooltip:SetOwner (self, "left", "right", -60, 0) + GameCooltip:SetOwner(self, "left", "right", -60, 0) GameCooltip:Show() end diff --git a/plugins/Details_EncounterDetails/frames.lua b/plugins/Details_EncounterDetails/frames.lua index e2fbb1c29..30eb83a80 100644 --- a/plugins/Details_EncounterDetails/frames.lua +++ b/plugins/Details_EncounterDetails/frames.lua @@ -404,10 +404,10 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) local scaleW = 1/670 local content = graphicData - tinsert (content, 1, 0) - tinsert (content, 1, 0) - tinsert (content, #content+1, 0) - tinsert (content, #content+1, 0) + tinsert(content, 1, 0) + tinsert(content, 1, 0) + tinsert(content, #content+1, 0) + tinsert(content, #content+1, 0) local _i = 3 @@ -534,12 +534,12 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) GameCooltip:SetOption("HeightAnchorMod", -15) GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true) - GameCooltip:ShowCooltip (frame, "tooltip") + GameCooltip:ShowCooltip(frame, "tooltip") end end) vRowFrame:SetScript("OnLeave", function(frame) - _detalhes.popup:ShowMe (false) + _detalhes.popup:ShowMe(false) end) vRowFrame.texture = vRowFrame:CreateTexture(nil, "overlay") @@ -604,7 +604,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) --build the phase panel local phase_panel = CreateFrame("frame", "EncounterDetailsPhasePanel", g, "BackdropTemplate") - phase_panel:SetFrameStrata ("TOOLTIP") + phase_panel:SetFrameStrata("TOOLTIP") phase_panel:SetWidth(CONST_PHASE_PANEL_WIDTH) phase_panel:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16, edgeFile = [[Interface\AddOns\Details\images\border_2]], edgeSize = 32, @@ -699,7 +699,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) t:SetTexture([[Interface\CastingBar\UI-CastingBar-Spark]]) t:SetBlendMode("ADD") t:Hide() - tinsert (spark_container, t) + tinsert(spark_container, t) end local get_spark = function(index) local spark = spark_container [index] @@ -752,8 +752,8 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) --damage local players = {} - for player_name, damage in pairs (combat.PhaseData.damage [self.phase]) do - tinsert (players, {player_name, damage}) + for player_name, damage in pairs(combat.PhaseData.damage [self.phase]) do + tinsert(players, {player_name, damage}) end table.sort (players, _detalhes.Sort2) @@ -789,8 +789,8 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) --heal local players = {} - for player_name, heal in pairs (combat.PhaseData.heal [self.phase]) do - tinsert (players, {player_name, heal}) + for player_name, heal in pairs(combat.PhaseData.heal [self.phase]) do + tinsert(players, {player_name, heal}) end table.sort (players, _detalhes.Sort2) @@ -858,9 +858,9 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) end --need to build here because the mouse will leave the block to click in the send button - tinsert (result, "Details!: Damage for Phase " .. self.phase .. " of " .. (g.combat and g.combat.is_boss and g.combat.is_boss.name or "Unknown") .. ":") + tinsert(result, "Details!: Damage for Phase " .. self.phase .. " of " .. (g.combat and g.combat.is_boss and g.combat.is_boss.name or "Unknown") .. ":") for i = 1, #self.damage_actors do - tinsert (result, EncounterDetails:GetOnlyName (self.damage_actors[i][1]) .. ": " .. _detalhes:ToK (_math_floor(self.damage_actors [i][2]))) + tinsert(result, EncounterDetails:GetOnlyName (self.damage_actors[i][1]) .. ": " .. _detalhes:ToK (_math_floor(self.damage_actors [i][2]))) end EncounterDetails:SendReportWindow (reportFunc, nil, nil, true) @@ -877,9 +877,9 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) EncounterDetails:SendReportLines (result) end - tinsert (result, "Details!: Healing for Phase " .. self.phase .. " of " .. (g.combat and g.combat.is_boss and g.combat.is_boss.name or "Unknown") .. ":") + tinsert(result, "Details!: Healing for Phase " .. self.phase .. " of " .. (g.combat and g.combat.is_boss and g.combat.is_boss.name or "Unknown") .. ":") for i = 1, #self.heal_actors do - tinsert (result, EncounterDetails:GetOnlyName (self.heal_actors[i][1]) .. ": " .. _detalhes:ToK (_math_floor(self.heal_actors [i][2]))) + tinsert(result, EncounterDetails:GetOnlyName (self.heal_actors[i][1]) .. ": " .. _detalhes:ToK (_math_floor(self.heal_actors [i][2]))) end EncounterDetails:SendReportWindow (reportFunc, nil, nil, true) @@ -905,7 +905,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) f:SetScript("OnMouseUp", phase_on_click) texture = f - tinsert (g.PhaseTextures, f) + tinsert(g.PhaseTextures, f) end texture:ClearAllPoints() @@ -926,7 +926,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) end function g:ClearPhaseTexture() - for i, texture in pairs (g.PhaseTextures) do + for i, texture in pairs(g.PhaseTextures) do texture:Hide() end end @@ -1026,7 +1026,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) local BossFrame = EncounterDetails.Frame local DetailsFrameWork = _detalhes.gump - BossFrame:SetFrameStrata ("HIGH") + BossFrame:SetFrameStrata("HIGH") BossFrame:SetToplevel (true) BossFrame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true}) @@ -1177,14 +1177,14 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) local hide_Emote = function() --hide emote frames - for _, widget in pairs (BossFrame.EmoteWidgets) do + for _, widget in pairs(BossFrame.EmoteWidgets) do widget:Hide() end end local hide_WeakAuras = function() --hide spells frames - for _, widget in pairs (BossFrame.EnemySpellsWidgets) do + for _, widget in pairs(BossFrame.EnemySpellsWidgets) do widget:Hide() end end @@ -1251,7 +1251,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) hide_Emote() --show spells frames - for _, widget in pairs (BossFrame.EnemySpellsWidgets) do + for _, widget in pairs(BossFrame.EnemySpellsWidgets) do widget:Show() end @@ -1291,12 +1291,12 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) BossFrame["phases_string"]:Hide() end --show emote frames - for _, widget in pairs (BossFrame.EmoteWidgets) do + for _, widget in pairs(BossFrame.EmoteWidgets) do widget:Show() end --hide spells frames - for _, widget in pairs (BossFrame.EnemySpellsWidgets) do + for _, widget in pairs(BossFrame.EnemySpellsWidgets) do widget:Hide() end @@ -1304,7 +1304,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) scrollframe:Update() BossFrame.EmotesSegment:Refresh() - BossFrame.EmotesSegment:Select (emote_segment) + BossFrame.EmotesSegment:Select(emote_segment) BossFrame.segmentosDropdown:Disable() @@ -1362,12 +1362,12 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) BossFrame.ShowType = "graph" --hide emote frames - for _, widget in pairs (BossFrame.EmoteWidgets) do + for _, widget in pairs(BossFrame.EmoteWidgets) do widget:Hide() end --hide spells frames - for _, widget in pairs (BossFrame.EnemySpellsWidgets) do + for _, widget in pairs(BossFrame.EnemySpellsWidgets) do widget:Hide() end @@ -1509,7 +1509,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) local bar_div_emotes = DetailsFrameWork:CreateImage (BossFrame, "Interface\\AddOns\\Details_EncounterDetails\\images\\boss_bg", 4, 480, "artwork", {724/1024, 728/1024, 0, 245/512}) bar_div_emotes:SetPoint("TOPLEFT", BossFrame, "TOPLEFT", 244, -74) bar_div_emotes:Hide() - tinsert (BossFrame.EmoteWidgets, bar_div_emotes) + tinsert(BossFrame.EmoteWidgets, bar_div_emotes) scrollframe = CreateFrame("ScrollFrame", "EncounterDetails_EmoteScroll", BossFrame, "FauxScrollFrameTemplate, BackdropTemplate") scrollframe:SetScript("OnVerticalScroll", function(self, offset) FauxScrollFrame_OnVerticalScroll (self, offset, 14, refresh_emotes) end) @@ -1520,7 +1520,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) _detalhes.gump:ReskinSlider(scrollframe, 3) -- - tinsert (BossFrame.EmoteWidgets, scrollframe) + tinsert(BossFrame.EmoteWidgets, scrollframe) local row_on_enter = function(self) self:SetBackdrop({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16}) @@ -1528,7 +1528,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) if (self.righttext:IsTruncated()) then GameCooltip:Reset() GameCooltip:AddLine (self.righttext:GetText()) - GameCooltip:SetOwner (self, "bottomleft", "topleft", 42, -9) + GameCooltip:SetOwner(self, "bottomleft", "topleft", 42, -9) GameCooltip:Show() end end @@ -1596,8 +1596,8 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) line:SetScript("OnEnter", row_on_enter) line:SetScript("OnLeave", row_on_leave) line:SetScript("OnMouseUp", row_on_mouse_up) - tinsert (emote_lines, line) - tinsert (BossFrame.EmoteWidgets, line) + tinsert(emote_lines, line) + tinsert(BossFrame.EmoteWidgets, line) line:Hide() end @@ -1625,7 +1625,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) return t end for index, segment in ipairs(EncounterDetails.charsaved.emotes) do - tinsert (t, {label = "#" .. index .. " " .. (segment.boss or "unknown"), value = index, icon = segment_icon, texcoord = segment_icon_coord, onclick = on_emote_Segment_select, iconcolor = segment_icon_color}) + tinsert(t, {label = "#" .. index .. " " .. (segment.boss or "unknown"), value = index, icon = segment_icon, texcoord = segment_icon_coord, onclick = on_emote_Segment_select, iconcolor = segment_icon_color}) end return t end @@ -1633,8 +1633,8 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) dropdown:SetPoint("topleft", emotes_segment_label, "bottomleft", -1, -2) dropdown:SetTemplate (DetailsFrameWork:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")) - tinsert (BossFrame.EmoteWidgets, dropdown) - tinsert (BossFrame.EmoteWidgets, emotes_segment_label) + tinsert(BossFrame.EmoteWidgets, dropdown) + tinsert(BossFrame.EmoteWidgets, emotes_segment_label) --search box local emotes_search_label = DetailsFrameWork:CreateLabel(BossFrame, "Search:", 11, nil, "GameFontHighlightSmall") @@ -1662,7 +1662,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) end end) - local reset = DetailsFrameWork:NewButton (BossFrame, nil, "$parentResetSearchBoxtButton", "ResetSearchBox", 16, 16, function() + local reset = DetailsFrameWork:NewButton(BossFrame, nil, "$parentResetSearchBoxtButton", "ResetSearchBox", 16, 16, function() search:SetText("") end) @@ -1673,12 +1673,12 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) reset:GetNormalTexture():SetDesaturated (true) reset.tooltip = "Reset Search" - tinsert (BossFrame.EmoteWidgets, search) - tinsert (BossFrame.EmoteWidgets, reset) - tinsert (BossFrame.EmoteWidgets, emotes_search_label) + tinsert(BossFrame.EmoteWidgets, search) + tinsert(BossFrame.EmoteWidgets, reset) + tinsert(BossFrame.EmoteWidgets, emotes_search_label) -- report button - local report_emote_button = DetailsFrameWork:NewButton (BossFrame, nil, "$parentReportEmoteButton", "ReportEmoteButton", 180, 20, function() + local report_emote_button = DetailsFrameWork:NewButton(BossFrame, nil, "$parentReportEmoteButton", "ReportEmoteButton", 180, 20, function() local reportFunc = function(IsCurrent, IsReverse, AmtLines) local segment = EncounterDetails.charsaved.emotes and EncounterDetails.charsaved.emotes [emote_segment] @@ -1710,7 +1710,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) -- remove the left space text = text:gsub ("^%s$", "") - tinsert (EncounterDetails.report_lines, time .. " " .. text) + tinsert(EncounterDetails.report_lines, time .. " " .. text) added = added + 1 if (added == AmtLines) then @@ -1735,11 +1735,11 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) report_emote_button:SetPoint("topleft", search, "bottomleft", 0, -4) report_emote_button:Disable() - tinsert (BossFrame.EmoteWidgets, report_emote_button) + tinsert(BossFrame.EmoteWidgets, report_emote_button) -- - for _, widget in pairs (BossFrame.EmoteWidgets) do + for _, widget in pairs(BossFrame.EmoteWidgets) do widget:Hide() end @@ -1771,7 +1771,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) local on_enter_spell = function(self) if (self.MyObject._spellid) then - GameTooltip:SetOwner (self, "ANCHOR_TOPLEFT") + GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT") if (type(self.MyObject._spellid) == "string") then local spellId = self.MyObject._spellid:gsub("%a", "") @@ -1805,10 +1805,10 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) local info = EncounterDetails.EnemySpellPool [spellid] if (info) then - _detalhes:CooltipPreset (2) + _detalhes:CooltipPreset(2) GameCooltip:SetOption("FixedWidth", false) - for token, _ in pairs (info.token) do + for token, _ in pairs(info.token) do GameCooltip:AddLine ("event:", token, 1, nil, "white") end @@ -1818,7 +1818,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) if (info.type) then GameCooltip:AddLine ("aura type:", info.type, 1, nil, "white") end - GameCooltip:ShowCooltip (self, "tooltip") + GameCooltip:ShowCooltip(self, "tooltip") end self:SetBackdropColor(1, 1, 1, .5) @@ -1830,12 +1830,12 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) local bossModsTitle = DetailsFrameWork:CreateLabel(BossFrame, "Boss Mods Time Bars:", 12, "orange") bossModsTitle:SetPoint(10, -85) - tinsert (BossFrame.EnemySpellsWidgets, bossModsTitle) + tinsert(BossFrame.EnemySpellsWidgets, bossModsTitle) bossModsTitle:Hide() local bossSpellsTitle = DetailsFrameWork:CreateLabel(BossFrame, "Boss Spells and Auras:", 12, "orange") bossSpellsTitle:SetPoint(444, -85) - tinsert (BossFrame.EnemySpellsWidgets, bossSpellsTitle) + tinsert(BossFrame.EnemySpellsWidgets, bossSpellsTitle) bossSpellsTitle:Hide() --create boss mods list @@ -1860,7 +1860,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) spellname:SetHook("OnEnter", on_enter_spell) spellname:SetHook("OnLeave", on_leave_spell) - local create_aura = DetailsFrameWork:NewButton (anchor_frame, nil, "$parentCreateAuraButton", "AuraButton", 90, 18, create_aura_func, nil, nil, nil, "Make Aura") + local create_aura = DetailsFrameWork:NewButton(anchor_frame, nil, "$parentCreateAuraButton", "AuraButton", 90, 18, create_aura_func, nil, nil, nil, "Make Aura") create_aura:SetTemplate (AurasButtonTemplate) spellicon:SetPoint("topleft", BossFrame, "topleft", 10, -85 + (i * 21 * -1)) @@ -1877,8 +1877,8 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) anchor_frame.aurabutton = create_aura anchor_frame.aurabutton._icon = spellicon - tinsert (bossmods_blocks, anchor_frame) - tinsert (BossFrame.EnemySpellsWidgets, anchor_frame) + tinsert(bossmods_blocks, anchor_frame) + tinsert(BossFrame.EnemySpellsWidgets, anchor_frame) anchor_frame:Hide() end @@ -1921,7 +1921,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) spellinfotext:SetText("info") spellinfo:SetPoint("left", spellname.widget, "right", 4, 0) - local create_aura = DetailsFrameWork:NewButton (anchor_frame, nil, "$parentCreateAuraButton", "AuraButton", 90, 18, create_aura_func, nil, nil, nil, "Make Aura") + local create_aura = DetailsFrameWork:NewButton(anchor_frame, nil, "$parentCreateAuraButton", "AuraButton", 90, 18, create_aura_func, nil, nil, nil, "Make Aura") create_aura:SetPoint("left", spellinfo, "right", 4, 0) create_aura:SetTemplate (AurasButtonTemplate) @@ -1932,8 +1932,8 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) anchor_frame.aurabutton._icon = spellicon anchor_frame.info = spellinfo - tinsert (spell_blocks, anchor_frame) - tinsert (BossFrame.EnemySpellsWidgets, anchor_frame) + tinsert(spell_blocks, anchor_frame) + tinsert(BossFrame.EnemySpellsWidgets, anchor_frame) anchor_frame:Hide() end @@ -1946,10 +1946,10 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) for i, npc in combat[1]:ListActors() do --damage if (npc:IsNeutralOrEnemy()) then - for spellid, spell in pairs (npc.spells._ActorTable) do + for spellid, spell in pairs(npc.spells._ActorTable) do if (spellid > 10) then local name, _, icon = EncounterDetails.getspellinfo (spellid) - tinsert (spell_list, {spellid, name, icon, nil, npc.serial}) + tinsert(spell_list, {spellid, name, icon, nil, npc.serial}) end end end @@ -1958,10 +1958,10 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) for i, npc in combat[2]:ListActors() do --heal if (npc:IsNeutralOrEnemy()) then - for spellid, spell in pairs (npc.spells._ActorTable) do + for spellid, spell in pairs(npc.spells._ActorTable) do if (spellid > 10) then local name, _, icon = EncounterDetails.getspellinfo (spellid) - tinsert (spell_list, {spellid, name, icon, true, npc.serial}) + tinsert(spell_list, {spellid, name, icon, true, npc.serial}) end end end @@ -1988,7 +1988,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) wipe(already_added) local timersToAdd = {} - for timerId, timerTable in pairs (db.encounter_timers_dbm) do + for timerId, timerTable in pairs(db.encounter_timers_dbm) do if (timerTable.id == encounter_id) then local spellId = timerTable [7] local spellIcon = timerTable [5] @@ -2001,12 +2001,12 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) if (spell and not already_added[spell]) then if (spell > 40000) then local spellname, _, spellicon = _GetSpellInfo(spell) - tinsert (timersToAdd, {label = spellname, value = {timerTable[2], spellname, spellIcon or spellicon, timerTable.id, timerTable[7]}, icon = spellIcon or spellicon}) + tinsert(timersToAdd, {label = spellname, value = {timerTable[2], spellname, spellIcon or spellicon, timerTable.id, timerTable[7]}, icon = spellIcon or spellicon}) else --local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = C_EncounterJournal.GetSectionInfo(spell) local sectionInfo = C_EncounterJournal.GetSectionInfo(spell) - tinsert (timersToAdd, {label = sectionInfo.title, value = {timerTable[2], sectionInfo.title, spellIcon or sectionInfo.abilityIcon, timerTable.id, timerTable[7]}, icon = spellIcon or sectionInfo.abilityIcon}) + tinsert(timersToAdd, {label = sectionInfo.title, value = {timerTable[2], sectionInfo.title, spellIcon or sectionInfo.abilityIcon, timerTable.id, timerTable[7]}, icon = spellIcon or sectionInfo.abilityIcon}) end already_added[spell] = true @@ -2086,7 +2086,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) bar.spellname:SetBackdropBorderColor(0, 0, 0) end - bar.aurabutton:SetClickFunction (create_aura_func, data [1], encounter_id) + bar.aurabutton:SetClickFunction(create_aura_func, data [1], encounter_id) else bar:Hide() @@ -2106,7 +2106,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) EncounterDetails.SpellScrollframe = spell_scrollframe _G.DetailsFramework:ReskinSlider(spell_scrollframe) - tinsert (BossFrame.EnemySpellsWidgets, spell_scrollframe) + tinsert(BossFrame.EnemySpellsWidgets, spell_scrollframe) EncounterDetails.update_enemy_spells = update_enemy_spells @@ -2118,7 +2118,7 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) bossmods_scrollframe:Hide() EncounterDetails.BossModsScrollframe = bossmods_scrollframe - tinsert (BossFrame.EnemySpellsWidgets, bossmods_scrollframe) + tinsert(BossFrame.EnemySpellsWidgets, bossmods_scrollframe) EncounterDetails.update_bossmods = function() bossmods_scrollframe:Update() end @@ -2129,20 +2129,20 @@ _detalhes.EncounterDetailsTempWindow = function(EncounterDetails) wipe (already_added) local encounter_id = EncounterDetails_SpellAurasScroll.encounter_id - for timer_id, timer_table in pairs (db.encounter_timers_bw) do + for timer_id, timer_table in pairs(db.encounter_timers_bw) do if (timer_table.id == encounter_id) then local spell = timer_id if (spell and not already_added [spell]) then local int_spell = tonumber (spell) if (not int_spell) then local spellname = timer_table [2]:gsub (" %(.%)", "") - tinsert (t, {label = spellname, value = {timer_table [2], spellname, timer_table [5], timer_table.id}, icon = timer_table [5], onclick = on_select_bw_bar}) + tinsert(t, {label = spellname, value = {timer_table [2], spellname, timer_table [5], timer_table.id}, icon = timer_table [5], onclick = on_select_bw_bar}) elseif (int_spell < 0) then local title, description, depth, abilityIcon, displayInfo, siblingID, nextSectionID, filteredByDifficulty, link, startsOpen, flag1, flag2, flag3, flag4 = C_EncounterJournal.GetSectionInfo (abs (int_spell)) - tinsert (t, {label = title, value = {timer_table [2], title, timer_table [5] or abilityIcon, timer_table.id}, icon = timer_table [5] or abilityIcon, onclick = on_select_bw_bar}) + tinsert(t, {label = title, value = {timer_table [2], title, timer_table [5] or abilityIcon, timer_table.id}, icon = timer_table [5] or abilityIcon, onclick = on_select_bw_bar}) else local spellname, _, spellicon = _GetSpellInfo(int_spell) - tinsert (t, {label = spellname, value = {timer_table [2], spellname, timer_table [5] or spellicon, timer_table.id}, icon = timer_table [5] or spellicon, onclick = on_select_bw_bar}) + tinsert(t, {label = spellname, value = {timer_table [2], spellname, timer_table [5] or spellicon, timer_table.id}, icon = timer_table [5] or spellicon, onclick = on_select_bw_bar}) end already_added [spell] = true @@ -2230,7 +2230,7 @@ function PhaseFrame.OnSelectPhase (phaseSelected) end end button:SetText(phase) - button:SetClickFunction (selectSegment, phase) + button:SetClickFunction(selectSegment, phase) end if (not phaseData.damage [phaseSelected]) then @@ -2240,14 +2240,14 @@ function PhaseFrame.OnSelectPhase (phaseSelected) --update damage and healing scrolls table.wipe (PhaseFrame.DamageTable) - for charName, amount in pairs (phaseData.damage [phaseSelected]) do - tinsert (PhaseFrame.DamageTable, {charName, amount}) + for charName, amount in pairs(phaseData.damage [phaseSelected]) do + tinsert(PhaseFrame.DamageTable, {charName, amount}) end table.sort (PhaseFrame.DamageTable, function(a, b) return a[2] > b[2] end) table.wipe (PhaseFrame.HealingTable) - for charName, amount in pairs (phaseData.heal [phaseSelected]) do - tinsert (PhaseFrame.HealingTable, {charName, amount}) + for charName, amount in pairs(phaseData.heal [phaseSelected]) do + tinsert(PhaseFrame.HealingTable, {charName, amount}) end table.sort (PhaseFrame.HealingTable, function(a, b) return a[2] > b[2] end) @@ -2275,9 +2275,9 @@ local report_damage = function(IsCurrent, IsReverse, AmtLines) EncounterDetails:SendReportLines (result) end - tinsert (result, "Details!: Damage for Phase " .. PhaseFrame.LastPhaseSelected .. " of " .. (PhaseFrame.CurrentSegment and PhaseFrame.CurrentSegment.is_boss and PhaseFrame.CurrentSegment.is_boss.name or "Unknown") .. ":") + tinsert(result, "Details!: Damage for Phase " .. PhaseFrame.LastPhaseSelected .. " of " .. (PhaseFrame.CurrentSegment and PhaseFrame.CurrentSegment.is_boss and PhaseFrame.CurrentSegment.is_boss.name or "Unknown") .. ":") for i = 1, #PhaseFrame.DamageTable do - tinsert (result, EncounterDetails:GetOnlyName (PhaseFrame.DamageTable[i][1]) .. ": " .. _detalhes:ToK (_math_floor(PhaseFrame.DamageTable [i][2]))) + tinsert(result, EncounterDetails:GetOnlyName (PhaseFrame.DamageTable[i][1]) .. ": " .. _detalhes:ToK (_math_floor(PhaseFrame.DamageTable [i][2]))) end EncounterDetails:SendReportWindow (reportFunc, nil, nil, true) @@ -2300,9 +2300,9 @@ local report_healing = function() EncounterDetails:SendReportLines (result) end - tinsert (result, "Details!: Healing for Phase " .. PhaseFrame.LastPhaseSelected .. " of " .. (PhaseFrame.CurrentSegment and PhaseFrame.CurrentSegment.is_boss and PhaseFrame.CurrentSegment.is_boss.name or "Unknown") .. ":") + tinsert(result, "Details!: Healing for Phase " .. PhaseFrame.LastPhaseSelected .. " of " .. (PhaseFrame.CurrentSegment and PhaseFrame.CurrentSegment.is_boss and PhaseFrame.CurrentSegment.is_boss.name or "Unknown") .. ":") for i = 1, #PhaseFrame.HealingTable do - tinsert (result, EncounterDetails:GetOnlyName (PhaseFrame.HealingTable[i][1]) .. ": " .. _detalhes:ToK (_math_floor(PhaseFrame.HealingTable [i][2]))) + tinsert(result, EncounterDetails:GetOnlyName (PhaseFrame.HealingTable[i][1]) .. ": " .. _detalhes:ToK (_math_floor(PhaseFrame.HealingTable [i][2]))) end EncounterDetails:SendReportWindow (reportFunc, nil, nil, true) @@ -2322,7 +2322,7 @@ PhaseTimersLabel:SetPoint("topleft", PhaseFrame, "topleft", (ScrollWidth * 2) + for i = 1, 10 do local button = _detalhes.gump:CreateButton (PhaseFrame, PhaseFrame.OnSelectPhase, 60, 20, "", i) button:SetPoint("left", PhaseSelectLabel, "right", 8 + ((i-1) * 61), 0) - tinsert (PhaseFrame.PhaseButtons, button) + tinsert(PhaseFrame.PhaseButtons, button) end local ScrollRefresh = function(self, data, offset, total_lines) @@ -2471,7 +2471,7 @@ for i = 1, 10 do name:SetHeight(10) name:SetJustifyH("left") - tinsert (PhaseFrame.PhasesBars, line) + tinsert(PhaseFrame.PhasesBars, line) end --cria a linha do segmento para a compara��o, � o que fica na parte direita da tela @@ -2497,7 +2497,7 @@ for i = 1, 20 do name:SetHeight(10) name:SetJustifyH("left") - tinsert (PhaseFrame.PhasesSegmentCompare, line) + tinsert(PhaseFrame.PhasesSegmentCompare, line) end function PhaseFrame:ClearPhaseBars() @@ -2529,8 +2529,8 @@ function PhaseFrame:GetPhaseTimers (segment, ordered) if (ordered) then local order = {} - for phase, _ in pairs (t) do - tinsert (order, phase) + for phase, _ in pairs(t) do + tinsert(order, phase) end table.sort (order, function(a, b) return a < b end) return order, t @@ -2636,7 +2636,7 @@ end segmentos:SetTemplate (DetailsFrameWork:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")) --options button - local options = DetailsFrameWork:NewButton (frame, nil, "$parentOptionsButton", "OptionsButton", 120, 20, EncounterDetails.OpenOptionsPanel, nil, nil, nil, "Options") + local options = DetailsFrameWork:NewButton(frame, nil, "$parentOptionsButton", "OptionsButton", 120, 20, EncounterDetails.OpenOptionsPanel, nil, nil, nil, "Options") options:SetPoint("left", segmentos, "right", 10, 0) options:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE")) options:SetIcon ([[Interface\Buttons\UI-OptionsButton]], 14, 14, nil, {0, 1, 0, 1}, nil, 3) @@ -2994,7 +2994,7 @@ end --print ("2 =", arg2, "3 =", arg3, "4 =", arg4, "5 =", arg5, "6 =", arg6, "7 =", arg7, "8 =", arg8, "9 =", arg9) if (combat and EncounterDetails:IsInCombat() and EncounterDetails:GetZoneType() == "raid") then local arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9 = ... - tinsert (EncounterDetails.current_whisper_table, {combat:GetCombatTime(), arg3, arg4, emote_table [arg2]}) + tinsert(EncounterDetails.current_whisper_table, {combat:GetCombatTime(), arg3, arg4, emote_table [arg2]}) end end) diff --git a/plugins/Details_RaidCheck/Details_RaidCheck.lua b/plugins/Details_RaidCheck/Details_RaidCheck.lua index ee6c5f64a..25614f6fa 100644 --- a/plugins/Details_RaidCheck/Details_RaidCheck.lua +++ b/plugins/Details_RaidCheck/Details_RaidCheck.lua @@ -683,7 +683,7 @@ local CreatePluginFrames = function() end end - tinsert (PlayerData, {unitName, unitClassID, + tinsert(PlayerData, {unitName, unitClassID, Name = unitName, UnitNameRealm = unitNameWithRealm, Class = unitClass, diff --git a/plugins/Details_Streamer/Details_Streamer.lua b/plugins/Details_Streamer/Details_Streamer.lua index 6e4f5b6cb..d5cb09979 100644 --- a/plugins/Details_Streamer/Details_Streamer.lua +++ b/plugins/Details_Streamer/Details_Streamer.lua @@ -10,7 +10,7 @@ local _ --create the plugin object -- "Details_StreamOverlay" is the old name local StreamOverlay = _detalhes:NewPluginObject("Details_Streamer", DETAILSPLUGIN_ALWAYSENABLED) ---tinsert (UISpecialFrames, "Details_StreamOverlays") +--tinsert(UISpecialFrames, "Details_StreamOverlays") --main frame (shortcut) local SOF = StreamOverlay.Frame @@ -149,8 +149,8 @@ local function CreatePluginFrames() titlebar.text:SetPoint("center", titlebar, "center") titlebar.text:SetText("Details! Streamer: Action Tracker") titlebar:SetScript("OnEnter", function(self) - GameTooltip:SetOwner (self) - GameTooltip:SetOwner (self, "ANCHOR_TOPLEFT") + GameTooltip:SetOwner(self) + GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT") GameTooltip:AddLine ("|cFFFF7700Left Click|r: Open Options\n|cFFFF7700Right Click|r: Lock the Frame\n|cFFFF7700Slash Command|r: /streamer") GameTooltip:Show() end) @@ -241,8 +241,8 @@ local function CreatePluginFrames() LibWindow.RestorePosition (StreamerOverlayDpsHpsFrame) LibWindow.SavePosition (StreamerOverlayDpsHpsFrame) --set the frame strata - SOF:SetFrameStrata (StreamOverlay.db.main_frame_strata) - StreamerOverlayDpsHpsFrame:SetFrameStrata (StreamOverlay.db.main_frame_strata) + SOF:SetFrameStrata(StreamOverlay.db.main_frame_strata) + StreamerOverlayDpsHpsFrame:SetFrameStrata(StreamOverlay.db.main_frame_strata) end --two resizers @@ -265,7 +265,7 @@ local function CreatePluginFrames() left_resize:SetScript("OnMouseDown", function(self) if (not SOF.resizing and not StreamOverlay.db.main_frame_locked) then SOF.resizing = true - SOF:StartSizing ("bottomleft") + SOF:StartSizing("bottomleft") end end) left_resize:SetScript("OnMouseUp", function(self) @@ -280,7 +280,7 @@ local function CreatePluginFrames() right_resize:SetScript("OnMouseDown", function(self) if (not SOF.resizing and not StreamOverlay.db.main_frame_locked) then SOF.resizing = true - SOF:StartSizing ("bottomright") + SOF:StartSizing("bottomright") end end) right_resize:SetScript("OnMouseUp", function(self) @@ -1600,8 +1600,8 @@ screen_frame:SetScript("OnMouseUp", function(self) end end) screen_frame:SetScript("OnEnter", function(self) - GameTooltip:SetOwner (self) - GameTooltip:SetOwner (self, "ANCHOR_TOPLEFT") + GameTooltip:SetOwner(self) + GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT") GameTooltip:AddLine ("|cFFFF7700Left Click|r: Open Options\n|cFFFF7700Slash Command|r: /streamer") GameTooltip:Show() end) @@ -2245,7 +2245,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel) local select_profile_fill = function() local t = {} - for profileName, _ in pairs (Details_StreamerDB.profiles) do + for profileName, _ in pairs(Details_StreamerDB.profiles) do t [#t+1] = {value = profileName, label = profileName, onclick = selectProfile} end return t @@ -2257,7 +2257,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel) label_profile:SetPoint("topleft", optionsFrame, "topleft", 15, -65) local pname = UnitName ("player") .. " - " .. GetRealmName() - dropdown_profile:Select (Details_StreamerDB.characters [pname]) + dropdown_profile:Select(Details_StreamerDB.characters [pname]) --new profile button if (not Details_StreamerDB.profiles [pname]) then @@ -2279,7 +2279,7 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel) --update the options panel optionsFrame:RefreshOptions() - dropdown_profile:Select (Details_StreamerDB.characters [pname]) + dropdown_profile:Select(Details_StreamerDB.characters [pname]) end optionsFrame.NewProfileButton = Details.gump:CreateButton (optionsFrame, add_profile, 60, 18, "New Profiile", _, _, _, _, _, _, Details.gump:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"), Details.gump:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")) @@ -2429,7 +2429,7 @@ function StreamOverlay:OnEvent (_, event, ...) StreamOverlay:SetPluginDescription ("Show in real time the spells you are casting.\n\nThe viewer can now follow what you are doing, what spells you are casting, learn your rotation.\n\nAlso tells who is the target and its class/spec on raiding or role if you are in arena.\n\nWhen you die, the panel is filled with your death log.") if (StreamOverlay.db.is_first_run) then --problem with setting the plugin as disabled - if (Details:GetTutorialCVar ("STREAMER_PLUGIN_FIRSTRUN")) then + if (Details:GetTutorialCVar("STREAMER_PLUGIN_FIRSTRUN")) then Details:DisablePlugin ("DETAILS_PLUGIN_STREAM_OVERLAY") StreamOverlay.db.is_first_run = false else @@ -2437,7 +2437,7 @@ function StreamOverlay:OnEvent (_, event, ...) end end - if (StreamOverlay.db.is_first_run and not Details:GetTutorialCVar ("STREAMER_PLUGIN_FIRSTRUN")) then + if (StreamOverlay.db.is_first_run and not Details:GetTutorialCVar("STREAMER_PLUGIN_FIRSTRUN")) then local show_frame = function() if ((DetailsWelcomeWindow and DetailsWelcomeWindow:IsShown()) or not StreamOverlay.db.is_first_run) then diff --git a/plugins/Details_TinyThreat/Details_TinyThreat.lua b/plugins/Details_TinyThreat/Details_TinyThreat.lua index e7cde9f49..9370f9962 100644 --- a/plugins/Details_TinyThreat/Details_TinyThreat.lua +++ b/plugins/Details_TinyThreat/Details_TinyThreat.lua @@ -89,7 +89,7 @@ local function CreatePluginFrames (data) elseif (event == "SHOW") then - instance = ThreatMeter:GetInstance (ThreatMeter.instance_id) + instance = ThreatMeter:GetInstance(ThreatMeter.instance_id) ThreatMeter.RowWidth = instance.baseframe:GetWidth()-6 @@ -131,11 +131,11 @@ local function CreatePluginFrames (data) end elseif (event == "DETAILS_INSTANCE_STARTSTRETCH") then - ThreatMeterFrame:SetFrameStrata ("TOOLTIP") + ThreatMeterFrame:SetFrameStrata("TOOLTIP") ThreatMeterFrame:SetFrameLevel (instance.baseframe:GetFrameLevel()+1) elseif (event == "DETAILS_INSTANCE_ENDSTRETCH") then - ThreatMeterFrame:SetFrameStrata ("MEDIUM") + ThreatMeterFrame:SetFrameStrata("MEDIUM") elseif (event == "PLUGIN_DISABLED") then ThreatMeterFrame:UnregisterEvent ("PLAYER_TARGET_CHANGED") diff --git a/plugins/Details_Vanguard/Details_Vanguard.lua b/plugins/Details_Vanguard/Details_Vanguard.lua index 31c8ddfd3..6fc322b2c 100644 --- a/plugins/Details_Vanguard/Details_Vanguard.lua +++ b/plugins/Details_Vanguard/Details_Vanguard.lua @@ -93,7 +93,7 @@ local function CreatePluginFrames (data) Vanguard.db.first_run = true local welcome = CreateFrame("frame", nil, UIParent, "BackdropTemplate") - welcome:SetFrameStrata ("TOOLTIP") + welcome:SetFrameStrata("TOOLTIP") welcome:SetPoint("center", UIParent, "center") welcome:SetSize(400, 200) DF:ApplyStandardBackdrop(welcome) @@ -109,7 +109,7 @@ local function CreatePluginFrames (data) end - Vanguard.CurrentInstance = Vanguard:GetInstance (Vanguard.instance_id) + Vanguard.CurrentInstance = Vanguard:GetInstance(Vanguard.instance_id) VanguardFrame:RegisterEvent ("ROLE_CHANGED_INFORM") VanguardFrame:RegisterEvent ("GROUP_ROSTER_UPDATE") @@ -120,7 +120,7 @@ local function CreatePluginFrames (data) Vanguard:IdentifyTanks() Vanguard.CurrentCombat = _detalhes:GetCombat ("current") - VanguardFrame:SetFrameStrata (Vanguard.CurrentInstance.baseframe:GetFrameStrata()) + VanguardFrame:SetFrameStrata(Vanguard.CurrentInstance.baseframe:GetFrameStrata()) VanguardFrame:SetFrameLevel (Vanguard.CurrentInstance.baseframe:GetFrameLevel()+5) if (Vanguard:IsInCombat()) then @@ -132,7 +132,7 @@ local function CreatePluginFrames (data) elseif (event == "COMBAT_PLAYER_ENTER") then --a new combat has been started - Vanguard.CurrentInstance = Vanguard:GetInstance (Vanguard.instance_id) + Vanguard.CurrentInstance = Vanguard:GetInstance(Vanguard.instance_id) Vanguard.CurrentCombat = select (1, ...) Vanguard.Running = true @@ -158,7 +158,7 @@ local function CreatePluginFrames (data) elseif (event == "DETAILS_STARTED") then - Vanguard.CurrentInstance = Vanguard:GetInstance (Vanguard.instance_id) + Vanguard.CurrentInstance = Vanguard:GetInstance(Vanguard.instance_id) Vanguard.CurrentCombat = Vanguard:GetCurrentCombat() elseif (event == "DETAILS_INSTANCE_ENDRESIZE" or event == "DETAILS_INSTANCE_SIZECHANGED") then @@ -357,7 +357,7 @@ local function CreatePluginFrames (data) local debuff_on_enter = function(self) if (self.spellid) then --self.texture:SetBlendMode("ADD") - GameTooltip:SetOwner (self, "ANCHOR_TOPLEFT") + GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT") GameTooltip:SetSpellByID(self.spellid) GameTooltip:Show() end @@ -376,7 +376,7 @@ local function CreatePluginFrames (data) elseif (button == "RightButton") then local instance = Vanguard:GetPluginInstance() if (instance) then - _detalhes.switch:ShowMe (instance) + _detalhes.switch:ShowMe(instance) end end end @@ -721,7 +721,7 @@ local function CreatePluginFrames (data) onUpdateFrame.onUpdate = function(self, deltaTime) --do healthbar animation ~animation ~healthbar - for tank_name, block_index in pairs (Vanguard.TankHashNames) do + for tank_name, block_index in pairs(Vanguard.TankHashNames) do local tframe = Vanguard.TankBlocks [block_index] local bar = tframe.heal_inc if (bar.IsAnimating) then @@ -732,7 +732,7 @@ local function CreatePluginFrames (data) function Vanguard:TrackIncoming() - for tank_name, block_index in pairs (Vanguard.TankHashNames) do + for tank_name, block_index in pairs(Vanguard.TankHashNames) do local shields = UnitGetTotalAbsorbs and UnitGetTotalAbsorbs(tank_name) or 0 local heals = UnitGetIncomingHeals and UnitGetIncomingHeals(tank_name) or 0 @@ -941,7 +941,7 @@ local build_options_panel = function() local textures = SharedMedia:HashTable ("statusbar") local texTable = {} - for name, texturePath in pairs (textures) do + for name, texturePath in pairs(textures) do texTable[#texTable+1] = {value = name, label = name, iconsize = texture_icon_size, statusbar = texturePath, onclick = tank_texture_set, icon = texture_icon, texcoord = texture_texcoord} end table.sort (texTable, function(t1, t2) return t1.label < t2.label end)