From 690168bef33b5c6c2f2a439770cfe81cea86fcc2 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Mon, 1 May 2023 14:20:04 -0300 Subject: [PATCH] Fixed more bugs on the new Breakdown Window --- Definitions.lua | 1 + boot.lua | 42 +- classes/class_combat.lua | 2 +- classes/class_custom.lua | 2 +- classes/class_error.lua | 2 +- classes/class_heal.lua | 2 +- classes/class_instance.lua | 2 +- classes/class_resources.lua | 6 +- classes/class_spelldamage.lua | 2 +- classes/class_spellhealing.lua | 2 +- classes/class_spellresources.lua | 2 +- classes/class_spelltable.lua | 3 +- classes/class_spellutility.lua | 2 +- classes/class_utility.lua | 6 +- classes/container_actors.lua | 2 +- classes/container_pets.lua | 2 +- classes/container_segments.lua | 4 +- classes/container_spells.lua | 2 +- classes/custom_damagedone.lua | 2 +- classes/custom_healingdone.lua | 2 +- classes/include_instance.lua | 2 +- core/control.lua | 2 +- core/gears.lua | 2 +- core/meta.lua | 2 +- core/network.lua | 2 +- core/parser.lua | 2 +- core/plugins.lua | 2 +- core/plugins_raid.lua | 2 +- core/plugins_solo.lua | 2 +- core/plugins_statusbar.lua | 2 +- core/plugins_toolbar.lua | 2 +- core/timemachine.lua | 2 +- core/util.lua | 2 +- core/windows.lua | 2 +- frames/anime.lua | 2 +- frames/fw_mods.lua | 2 +- frames/window_benchmark.lua | 10 +- frames/window_copy.lua | 2 +- frames/window_currentdps.lua | 104 +-- frames/window_custom.lua | 2 +- frames/window_custom_scripts.lua | 2 +- frames/window_dump.lua | 10 +- frames/window_eventtracker.lua | 128 ++-- frames/window_main.lua | 2 +- frames/window_news.lua | 2 +- frames/window_options2.lua | 34 +- frames/window_options2_sections.lua | 724 +++++++++--------- frames/window_playerbreakdown_auras.lua | 4 +- frames/window_playerbreakdown_compare.lua | 8 +- frames/window_playerbreakdown_spells.lua | 157 ++-- frames/window_report.lua | 2 +- frames/window_scrolldamage.lua | 2 +- frames/window_wa.lua | 2 +- frames/window_welcome.lua | 2 +- functions/api2.lua | 6 +- functions/attributes.lua | 2 +- functions/boss.lua | 2 +- functions/buff.lua | 2 +- functions/classes.lua | 2 +- functions/coach.lua | 40 +- functions/dungeon.lua | 26 +- functions/events.lua | 2 +- functions/hooks.lua | 2 +- functions/loaddata.lua | 2 +- functions/mythicdungeon.lua | 52 +- functions/playerclass.lua | 170 ++-- functions/raidinfo.lua | 4 +- functions/rowanimation.lua | 2 +- functions/savedata.lua | 2 +- functions/skins.lua | 2 +- functions/slash.lua | 2 +- functions/spellcache.lua | 2 +- functions/spells.lua | 2 +- functions/timedata.lua | 2 +- plugins/Details_Compare2/Details_Compare2.lua | 4 +- .../Details_DataStorage.lua | 8 +- .../Details_EncounterDetails.lua | 114 +-- plugins/Details_EncounterDetails/frames.lua | 2 +- plugins/Details_Streamer/Details_Streamer.lua | 24 +- .../Details_TinyThreat/Details_TinyThreat.lua | 24 +- plugins/Details_Vanguard/Details_Vanguard.lua | 28 +- startup.lua | 2 +- 82 files changed, 938 insertions(+), 913 deletions(-) diff --git a/Definitions.lua b/Definitions.lua index 1e49fab8..42117b93 100644 --- a/Definitions.lua +++ b/Definitions.lua @@ -293,6 +293,7 @@ ---@class details +---@field SpellTableMixin spelltablemixin ---@field GetInstance fun(self: details) : instance ---@field GetWindow fun(self: details) : instance this is an alias of GetInstance ---@field GetCombat fun(self: details) : combat diff --git a/boot.lua b/boot.lua index 002eea65..7324cfdb 100644 --- a/boot.lua +++ b/boot.lua @@ -7,34 +7,34 @@ --make an option to show death in the order of newest to oldest _ = nil - _G._detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") + _G.Details = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") local addonName, Details222 = ... local version, build, date, tocversion = GetBuildInfo() - _detalhes.build_counter = 10737 - _detalhes.alpha_build_counter = 10737 --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 - _detalhes.realversion = 150 --core version, this is used to check API version for scripts and plugins (see alias below) - _detalhes.APIVersion = _detalhes.realversion --core version - _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" --simple stirng to show to players + Details.build_counter = 10737 + Details.alpha_build_counter = 10737 --if this is higher than the regular counter, use it instead + Details.dont_open_news = true + Details.game_version = version + Details.userversion = version .. " " .. Details.build_counter + Details.realversion = 150 --core version, this is used to check API version for scripts and plugins (see alias below) + Details.APIVersion = Details.realversion --core version + Details.version = Details.userversion .. " (core " .. Details.realversion .. ")" --simple stirng to show to players - _detalhes.acounter = 1 --in case of a second release with the same .build_counter - _detalhes.curseforgeVersion = C_AddOns and C_AddOns.GetAddOnMetadata and C_AddOns.GetAddOnMetadata("Details", "Version") - if (not _detalhes.curseforgeVersion and GetAddOnMetadata) then - _detalhes.curseforgeVersion = GetAddOnMetadata("Details", "Version") + Details.acounter = 1 --in case of a second release with the same .build_counter + Details.curseforgeVersion = C_AddOns and C_AddOns.GetAddOnMetadata and C_AddOns.GetAddOnMetadata("Details", "Version") + if (not Details.curseforgeVersion and GetAddOnMetadata) then + Details.curseforgeVersion = GetAddOnMetadata("Details", "Version") end - function _detalhes:GetCoreVersion() - return _detalhes.realversion + function Details:GetCoreVersion() + return Details.realversion end - _detalhes.BFACORE = 131 --core version on BFA launch - _detalhes.SHADOWLANDSCORE = 143 --core version on Shadowlands launch - _detalhes.DRAGONFLIGHT = 147 --core version on Dragonflight launch + Details.BFACORE = 131 --core version on BFA launch + Details.SHADOWLANDSCORE = 143 --core version on Shadowlands launch + Details.DRAGONFLIGHT = 147 --core version on Dragonflight launch - Details = _detalhes + Details = Details local gameVersionPrefix = "Unknown Game Version - You're probably using a Details! not compatible with this version of the Game" --these are the game versions currently compatible with this Details! versions @@ -47,7 +47,7 @@ --WD 10288 RELEASE 10.0.2 --WD 10288 ALPHA 21 10.0.2 function Details.GetVersionString() - local curseforgeVersion = _detalhes.curseforgeVersion or "" + local curseforgeVersion = Details.curseforgeVersion or "" local alphaId = curseforgeVersion:match("%-(%d+)%-") if (not alphaId) then @@ -95,7 +95,7 @@ local _ do - local _detalhes = _G._detalhes + local _detalhes = _G.Details _detalhes.resize_debug = {} local Loc = _G.LibStub("AceLocale-3.0"):GetLocale("Details") diff --git a/classes/class_combat.lua b/classes/class_combat.lua index 26bde52f..3ea08bfd 100644 --- a/classes/class_combat.lua +++ b/classes/class_combat.lua @@ -1,5 +1,5 @@ - local _detalhes = _G._detalhes + local _detalhes = _G.Details local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" ) local _ local addonName, Details222 = ... diff --git a/classes/class_custom.lua b/classes/class_custom.lua index e98fb957..7f0c5a9c 100644 --- a/classes/class_custom.lua +++ b/classes/class_custom.lua @@ -1,4 +1,4 @@ - local _detalhes = _G._detalhes + local _detalhes = _G.Details local _ = nil _detalhes.custom_function_cache = {} local addonName, Details222 = ... diff --git a/classes/class_error.lua b/classes/class_error.lua index 2052cf48..17feccd3 100644 --- a/classes/class_error.lua +++ b/classes/class_error.lua @@ -1,5 +1,5 @@ do - local _detalhes = _G._detalhes + local _detalhes = _G.Details local addonName, Details222 = ... local _error = { diff --git a/classes/class_heal.lua b/classes/class_heal.lua index d151459f..b6a9a76d 100644 --- a/classes/class_heal.lua +++ b/classes/class_heal.lua @@ -1,5 +1,5 @@ -local _detalhes = _G._detalhes +local _detalhes = _G.Details local _ local addonName, Details222 = ... diff --git a/classes/class_instance.lua b/classes/class_instance.lua index 55f61942..d730417e 100644 --- a/classes/class_instance.lua +++ b/classes/class_instance.lua @@ -16,7 +16,7 @@ local _UnitName = UnitName --wow api locals local _UnitIsPlayer = UnitIsPlayer --wow api locals local _UnitGroupRolesAssigned = DetailsFramework.UnitGroupRolesAssigned --wow api locals -local _detalhes = _G._detalhes +local _detalhes = _G.Details local _ local addonName, Details222 = ... local gump = _detalhes.gump diff --git a/classes/class_resources.lua b/classes/class_resources.lua index 01e83808..2acbcf1d 100644 --- a/classes/class_resources.lua +++ b/classes/class_resources.lua @@ -10,14 +10,14 @@ local pairs = pairs local _unpack = unpack local type = type --api locals -local _GetSpellInfo = _detalhes.getspellinfo +local _GetSpellInfo = Details.getspellinfo local GameTooltip = GameTooltip local IsInRaid = IsInRaid local IsInGroup = IsInGroup -local _string_replace = _detalhes.string.replace --details api +local _string_replace = Details.string.replace --details api -local _detalhes = _G._detalhes +local _detalhes = _G.Details local AceLocale = LibStub("AceLocale-3.0") local Loc = AceLocale:GetLocale ( "Details" ) local _ diff --git a/classes/class_spelldamage.lua b/classes/class_spelldamage.lua index 1fc50ba3..6d75dddd 100644 --- a/classes/class_spelldamage.lua +++ b/classes/class_spelldamage.lua @@ -1,5 +1,5 @@ -- damage ability file - local _detalhes = _G._detalhes + local _detalhes = _G.Details local _ local addonName, Details222 = ... diff --git a/classes/class_spellhealing.lua b/classes/class_spellhealing.lua index f0939aa0..e93dfaba 100644 --- a/classes/class_spellhealing.lua +++ b/classes/class_spellhealing.lua @@ -1,5 +1,5 @@ - local Details = _G._detalhes + local Details = _G.Details local _ local addonName, Details222 = ... local healingAbility = Details.habilidade_cura diff --git a/classes/class_spellresources.lua b/classes/class_spellresources.lua index ae7b4b53..8b1e5276 100644 --- a/classes/class_spellresources.lua +++ b/classes/class_spellresources.lua @@ -1,6 +1,6 @@ -- energy ability file - local _detalhes = _G._detalhes + local _detalhes = _G.Details local _ local addonName, Details222 = ... diff --git a/classes/class_spelltable.lua b/classes/class_spelltable.lua index 5c708e31..286a008c 100644 --- a/classes/class_spelltable.lua +++ b/classes/class_spelltable.lua @@ -58,7 +58,8 @@ Details.SpellTableMixin = { ---@param combatObject combat ---@return number GetCastAmount = function(spellTable, actorName, combatObject) - return combatObject:GetSpellCastAmount(actorName, spellTable.id) + local spellName = GetSpellInfo(spellTable.id) + return combatObject:GetSpellCastAmount(actorName, spellName) end, ---return the average damage per cast diff --git a/classes/class_spellutility.lua b/classes/class_spellutility.lua index b25240f5..488f56d0 100644 --- a/classes/class_spellutility.lua +++ b/classes/class_spellutility.lua @@ -1,5 +1,5 @@ -- misc ability file - local _detalhes = _G._detalhes + local _detalhes = _G.Details local _ local addonName, Details222 = ... diff --git a/classes/class_utility.lua b/classes/class_utility.lua index 19079c87..15547fa3 100644 --- a/classes/class_utility.lua +++ b/classes/class_utility.lua @@ -8,7 +8,7 @@ local min = math.min local unpack = unpack local type = type --api locals -local _GetSpellInfo = _detalhes.getspellinfo +local _GetSpellInfo = Details.getspellinfo local GameTooltip = GameTooltip local IsInRaid = IsInRaid local IsInGroup = IsInGroup @@ -20,9 +20,9 @@ local format = _G.format local UnitIsUnit = UnitIsUnit -local _string_replace = _detalhes.string.replace --details api +local _string_replace = Details.string.replace --details api -local _detalhes = _G._detalhes +local _detalhes = _G.Details local Details = _detalhes local AceLocale = LibStub("AceLocale-3.0") local Loc = AceLocale:GetLocale ( "Details" ) diff --git a/classes/container_actors.lua b/classes/container_actors.lua index 2334af55..1cb232cd 100644 --- a/classes/container_actors.lua +++ b/classes/container_actors.lua @@ -1,7 +1,7 @@ -- actor container file -- group members are the actors which will be shown in the window while in standard view mode, most of the times they are players in the same group as the player - local Details = _G._detalhes + local Details = _G.Details local DF = _G.DetailsFramework local _ local addonName, Details222 = ... diff --git a/classes/container_pets.lua b/classes/container_pets.lua index 8c262040..0b4de4df 100644 --- a/classes/container_pets.lua +++ b/classes/container_pets.lua @@ -1,4 +1,4 @@ -local _detalhes = _G._detalhes +local _detalhes = _G.Details local gump = _detalhes.gump local container_pets = _detalhes.container_pets local _ diff --git a/classes/container_segments.lua b/classes/container_segments.lua index b04b6648..bcac8491 100644 --- a/classes/container_segments.lua +++ b/classes/container_segments.lua @@ -5,7 +5,7 @@ local tremove = table.remove local tinsert = table.insert local wipe = table.wipe -local Details = _G._detalhes +local Details = _G.Details local _ local addonName, Details222 = ... @@ -32,7 +32,7 @@ function Details:GetCurrentCombat() end function Details:GetOverallCombat() - return _detalhes.tabela_overall + return Details.tabela_overall end function Details:GetCombat(combat) diff --git a/classes/container_spells.lua b/classes/container_spells.lua index f710d68c..69acca63 100644 --- a/classes/container_spells.lua +++ b/classes/container_spells.lua @@ -1,6 +1,6 @@ -- spells container file -local _detalhes = _G._detalhes +local _detalhes = _G.Details local _ local addonName, Details222 = ... diff --git a/classes/custom_damagedone.lua b/classes/custom_damagedone.lua index bbd5cf7f..40a72e67 100644 --- a/classes/custom_damagedone.lua +++ b/classes/custom_damagedone.lua @@ -10,7 +10,7 @@ --customized display script -local _detalhes = _G._detalhes +local _detalhes = _G.Details local _ local addonName, Details222 = ... diff --git a/classes/custom_healingdone.lua b/classes/custom_healingdone.lua index 008c8c0c..0b225ee1 100644 --- a/classes/custom_healingdone.lua +++ b/classes/custom_healingdone.lua @@ -3,7 +3,7 @@ - local _detalhes = _G._detalhes + local _detalhes = _G.Details local _ local addonName, Details222 = ... diff --git a/classes/include_instance.lua b/classes/include_instance.lua index fbda6ace..eb45d49c 100644 --- a/classes/include_instance.lua +++ b/classes/include_instance.lua @@ -6,7 +6,7 @@ --values added into 'instance_skin_ignored_values' won't be passed when the user exports the profile or exports the skin individually. -local _detalhes = _G._detalhes +local _detalhes = _G.Details local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0") local addonName, Details222 = ... local _ = nil diff --git a/core/control.lua b/core/control.lua index 73cd9a30..3a2f5d4f 100644 --- a/core/control.lua +++ b/core/control.lua @@ -1,6 +1,6 @@ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - local _detalhes = _G._detalhes + local _detalhes = _G.Details local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" ) local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0") local _tempo = time() diff --git a/core/gears.lua b/core/gears.lua index 65aed346..5b5c1df9 100644 --- a/core/gears.lua +++ b/core/gears.lua @@ -1,4 +1,4 @@ -local _detalhes = _G._detalhes +local _detalhes = _G.Details local addonName, Details222 = ... local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" ) diff --git a/core/meta.lua b/core/meta.lua index 510ab2c5..f6076a4f 100644 --- a/core/meta.lua +++ b/core/meta.lua @@ -1,5 +1,5 @@ - local _detalhes = _G._detalhes + local _detalhes = _G.Details local Details = _detalhes local tocName, Details222 = ... diff --git a/core/network.lua b/core/network.lua index bdcc880e..08535751 100644 --- a/core/network.lua +++ b/core/network.lua @@ -1,5 +1,5 @@ - local Details = _G._detalhes + local Details = _G.Details local Loc = LibStub("AceLocale-3.0"):GetLocale( "Details" ) local _ diff --git a/core/parser.lua b/core/parser.lua index acff01d6..7d78f6de 100755 --- a/core/parser.lua +++ b/core/parser.lua @@ -1,6 +1,6 @@ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - local _detalhes = _G._detalhes + local _detalhes = _G.Details local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" ) local DetailsFramework = DetailsFramework diff --git a/core/plugins.lua b/core/plugins.lua index c534cb88..a5812db3 100644 --- a/core/plugins.lua +++ b/core/plugins.lua @@ -2,7 +2,7 @@ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" ) - local _detalhes = _G._detalhes + local _detalhes = _G.Details local PixelUtil = PixelUtil or DFPixelUtil DETAILSPLUGIN_ALWAYSENABLED = 0x1 diff --git a/core/plugins_raid.lua b/core/plugins_raid.lua index b254001c..3c5f509c 100644 --- a/core/plugins_raid.lua +++ b/core/plugins_raid.lua @@ -1,7 +1,7 @@ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - local _detalhes = _G._detalhes + local _detalhes = _G.Details local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" ) local _ diff --git a/core/plugins_solo.lua b/core/plugins_solo.lua index 598df8ff..3964fbc6 100644 --- a/core/plugins_solo.lua +++ b/core/plugins_solo.lua @@ -1,7 +1,7 @@ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - local _detalhes = _G._detalhes + local _detalhes = _G.Details local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" ) ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/core/plugins_statusbar.lua b/core/plugins_statusbar.lua index aa5fae01..ca886533 100644 --- a/core/plugins_statusbar.lua +++ b/core/plugins_statusbar.lua @@ -1,7 +1,7 @@ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - local _detalhes = _G._detalhes + local _detalhes = _G.Details local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" ) local SharedMedia = LibStub:GetLibrary ("LibSharedMedia-3.0") diff --git a/core/plugins_toolbar.lua b/core/plugins_toolbar.lua index bda56f20..e5db5249 100644 --- a/core/plugins_toolbar.lua +++ b/core/plugins_toolbar.lua @@ -1,6 +1,6 @@ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - local _detalhes = _G._detalhes + local _detalhes = _G.Details local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" ) local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0") local _ diff --git a/core/timemachine.lua b/core/timemachine.lua index 24845a77..f6e2cb75 100644 --- a/core/timemachine.lua +++ b/core/timemachine.lua @@ -1,6 +1,6 @@ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - local _detalhes = _G._detalhes + local _detalhes = _G.Details local _tempo = time() local _ diff --git a/core/util.lua b/core/util.lua index 2f224f0a..8545d8c6 100644 --- a/core/util.lua +++ b/core/util.lua @@ -1,6 +1,6 @@ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - local _detalhes = _G._detalhes + local _detalhes = _G.Details local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" ) local addonName, Details222 = ... local _ diff --git a/core/windows.lua b/core/windows.lua index edf71ae0..ba1323b3 100644 --- a/core/windows.lua +++ b/core/windows.lua @@ -1,5 +1,5 @@ - local Details = _G._detalhes + local Details = _G.Details local Loc = _G.LibStub("AceLocale-3.0"):GetLocale("Details") local libwindow = LibStub("LibWindow-1.1") local _ diff --git a/frames/anime.lua b/frames/anime.lua index f3f3edc9..4be48940 100644 --- a/frames/anime.lua +++ b/frames/anime.lua @@ -1,4 +1,4 @@ -local _detalhes = _G._detalhes +local _detalhes = _G.Details --code from blizzard AlertFrames diff --git a/frames/fw_mods.lua b/frames/fw_mods.lua index b1d8256d..2dda69ae 100644 --- a/frames/fw_mods.lua +++ b/frames/fw_mods.lua @@ -9,7 +9,7 @@ local GetCursorPosition = GetCursorPosition local GameTooltip = GameTooltip local select = select -local _detalhes = _G._detalhes +local _detalhes = _G.Details local gump = _detalhes.gump diff --git a/frames/window_benchmark.lua b/frames/window_benchmark.lua index df0588e6..bc3c5c48 100644 --- a/frames/window_benchmark.lua +++ b/frames/window_benchmark.lua @@ -12,7 +12,7 @@ local libwindow = LibStub("LibWindow-1.1") --main frame - local DF = _detalhes.gump + local DF = Details.gump local _ = nil --declaration @@ -28,7 +28,7 @@ local libwindow = LibStub("LibWindow-1.1") --register to libwindow local LibWindow = LibStub("LibWindow-1.1") - LibWindow.RegisterConfig(f, _detalhes.benchmark_db.frame) + LibWindow.RegisterConfig(f, Details.benchmark_db.frame) LibWindow.RestorePosition(f) LibWindow.MakeDraggable(f) LibWindow.SavePosition(f) @@ -46,9 +46,9 @@ local libwindow = LibStub("LibWindow-1.1") f.Close = CreateFrame("button", "$parentCloseButton", f,"BackdropTemplate") f.Close:SetPoint("right", f.TitleBar, "right", -2, 0) f.Close:SetSize(16, 16) - f.Close:SetNormalTexture(_detalhes.gump.folder .. "icons") - f.Close:SetHighlightTexture(_detalhes.gump.folder .. "icons") - f.Close:SetPushedTexture(_detalhes.gump.folder .. "icons") + f.Close:SetNormalTexture(Details.gump.folder .. "icons") + f.Close:SetHighlightTexture(Details.gump.folder .. "icons") + f.Close:SetPushedTexture(Details.gump.folder .. "icons") f.Close:GetNormalTexture():SetTexCoord(0, 16/128, 0, 1) f.Close:GetHighlightTexture():SetTexCoord(0, 16/128, 0, 1) f.Close:GetPushedTexture():SetTexCoord(0, 16/128, 0, 1) diff --git a/frames/window_copy.lua b/frames/window_copy.lua index 14763018..c4732ede 100644 --- a/frames/window_copy.lua +++ b/frames/window_copy.lua @@ -1,6 +1,6 @@ do - local _detalhes = _G._detalhes + local _detalhes = _G.Details local DetailsFrameWork = _detalhes.gump local _ --panel diff --git a/frames/window_currentdps.lua b/frames/window_currentdps.lua index ad855273..80079735 100644 --- a/frames/window_currentdps.lua +++ b/frames/window_currentdps.lua @@ -15,7 +15,7 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel) green_team_color = Details.class_colors.ARENA_GREEN --{.5, 1, .5, 1} yellow_team_color = Details.class_colors.ARENA_YELLOW --{1, 1, .5, 1} - local DF = _detalhes.gump + local DF = Details.gump local f = DF:CreateSimplePanel(UIParent, 700, 400, "Details! Arena Damage Bar Options", "DetailsCurrentRealDPSOptions") f:SetPoint("center", UIParent, "center") @@ -24,10 +24,10 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel) DF:ApplyStandardBackdrop(f) --scale bar - local scaleBar = DF:CreateScaleBar(f, _detalhes.realtime_dps_meter.options_frame) + local scaleBar = DF:CreateScaleBar(f, Details.realtime_dps_meter.options_frame) local LibWindow = LibStub("LibWindow-1.1") - LibWindow.RegisterConfig(f, _detalhes.realtime_dps_meter.options_frame) + LibWindow.RegisterConfig(f, Details.realtime_dps_meter.options_frame) LibWindow.MakeDraggable(f) LibWindow.RestorePosition(f) @@ -282,9 +282,9 @@ function Details:OpenCurrentRealDPSOptions(from_options_panel) { type = "range", - get = function() return _detalhes.realtime_dps_meter.text_offset end, + get = function() return Details.realtime_dps_meter.text_offset end, set = function(self, fixedparam, value) - _detalhes.realtime_dps_meter.text_offset = value + Details.realtime_dps_meter.text_offset = value Details:UpdateTheRealCurrentDPSFrame(testUsing) end, min = 0, @@ -335,7 +335,7 @@ end function Details:CreateCurrentDpsFrame(parent, name) - local DF = _detalhes.gump + local DF = Details.gump local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0") green_team_color = Details.class_colors.ARENA_GREEN --{.5, 1, .5, 1} @@ -348,10 +348,10 @@ function Details:CreateCurrentDpsFrame(parent, name) --main farame local f = CreateFrame("frame", name, parent or UIParent, "BackdropTemplate") f:SetPoint("top", UIParent, "top", 0, -110) - f:SetSize(_detalhes.realtime_dps_meter.frame_settings.width, _detalhes.realtime_dps_meter.frame_settings.height) + f:SetSize(Details.realtime_dps_meter.frame_settings.width, Details.realtime_dps_meter.frame_settings.height) f:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}}) - f:SetBackdropColor(unpack(_detalhes.realtime_dps_meter.frame_settings.backdrop_color)) + f:SetBackdropColor(unpack(Details.realtime_dps_meter.frame_settings.backdrop_color)) f:EnableMouse(true) f:SetMovable(true) f:SetClampedToScreen(true) @@ -376,7 +376,7 @@ function Details:CreateCurrentDpsFrame(parent, name) f.PlayerTeam = 0 local LibWindow = LibStub("LibWindow-1.1") - LibWindow.RegisterConfig(f, _detalhes.realtime_dps_meter.frame_settings) + LibWindow.RegisterConfig(f, Details.realtime_dps_meter.frame_settings) LibWindow.MakeDraggable(f) LibWindow.RestorePosition(f) @@ -525,7 +525,7 @@ function Details:CreateCurrentDpsFrame(parent, name) --update local time_fraction = 100/1000 --one tick per 100ms f.NextUpdate = time_fraction --when the next tick occur - f.NextScreenUpdate = _detalhes.realtime_dps_meter.update_interval --when the labels on the frame receive update + f.NextScreenUpdate = Details.realtime_dps_meter.update_interval --when the labels on the frame receive update --arena f.PlayerTeamBuffer = {} @@ -541,23 +541,23 @@ function Details:CreateCurrentDpsFrame(parent, name) f.LastTickGroupDamage = 0 --general - f.SampleSize = _detalhes.realtime_dps_meter.sample_size + f.SampleSize = Details.realtime_dps_meter.sample_size f.MaxBufferIndex = 1 f.ShowingArena = false - function _detalhes:UpdateTheRealCurrentDPSFrame(scenario) + function Details:UpdateTheRealCurrentDPSFrame(scenario) --don't run if the featured hasn't loaded if (not f) then return end - if (not _detalhes.realtime_dps_meter.enabled) then + if (not Details.realtime_dps_meter.enabled) then f:Hide() --print("D! debug currentdps.lua > !realtime_dps_meter.enabled") return end - if (not _detalhes.realtime_dps_meter.arena_enabled and not _detalhes.realtime_dps_meter.mythic_dungeon_enabled) then + if (not Details.realtime_dps_meter.arena_enabled and not Details.realtime_dps_meter.mythic_dungeon_enabled) then f:Hide() print("D! debug currentdps.lua > not _detalhes.realtime_dps_meter.arena_enabled and not _detalhes.realtime_dps_meter.mythic_dungeon_enabled") return @@ -566,21 +566,21 @@ function Details:CreateCurrentDpsFrame(parent, name) --where the player are if (scenario == "arena") then - f.SampleSize = _detalhes.realtime_dps_meter.sample_size + f.SampleSize = Details.realtime_dps_meter.sample_size labelPlayerTeam_DPS:Show() labelYellowTeam_DPS:Show() --update arena labels - DF:SetFontColor(labelPlayerTeam_DPS, _detalhes.realtime_dps_meter.font_color) - DF:SetFontFace (labelPlayerTeam_DPS, _detalhes.realtime_dps_meter.font_face) - DF:SetFontSize(labelPlayerTeam_DPS, _detalhes.realtime_dps_meter.font_size) - DF:SetFontOutline (labelPlayerTeam_DPS, _detalhes.realtime_dps_meter.font_shadow) + DF:SetFontColor(labelPlayerTeam_DPS, Details.realtime_dps_meter.font_color) + DF:SetFontFace (labelPlayerTeam_DPS, Details.realtime_dps_meter.font_face) + DF:SetFontSize(labelPlayerTeam_DPS, Details.realtime_dps_meter.font_size) + DF:SetFontOutline (labelPlayerTeam_DPS, Details.realtime_dps_meter.font_shadow) - DF:SetFontColor(labelYellowTeam_DPS, _detalhes.realtime_dps_meter.font_color) - DF:SetFontFace (labelYellowTeam_DPS, _detalhes.realtime_dps_meter.font_face) - DF:SetFontSize(labelYellowTeam_DPS, _detalhes.realtime_dps_meter.font_size) - DF:SetFontOutline (labelYellowTeam_DPS, _detalhes.realtime_dps_meter.font_shadow) + DF:SetFontColor(labelYellowTeam_DPS, Details.realtime_dps_meter.font_color) + DF:SetFontFace (labelYellowTeam_DPS, Details.realtime_dps_meter.font_face) + DF:SetFontSize(labelYellowTeam_DPS, Details.realtime_dps_meter.font_size) + DF:SetFontOutline (labelYellowTeam_DPS, Details.realtime_dps_meter.font_shadow) --wipe current data for arena wipe (f.PlayerTeamBuffer) @@ -616,10 +616,10 @@ function Details:CreateCurrentDpsFrame(parent, name) labelGroupDamage:Show() labelGroupDamage_DPS:Show() - DF:SetFontColor(labelGroupDamage_DPS, _detalhes.realtime_dps_meter.font_color) - DF:SetFontFace (labelGroupDamage_DPS, _detalhes.realtime_dps_meter.font_face) - DF:SetFontSize(labelGroupDamage_DPS, _detalhes.realtime_dps_meter.font_size) - DF:SetFontOutline (labelGroupDamage_DPS, _detalhes.realtime_dps_meter.font_shadow) + DF:SetFontColor(labelGroupDamage_DPS, Details.realtime_dps_meter.font_color) + DF:SetFontFace (labelGroupDamage_DPS, Details.realtime_dps_meter.font_face) + DF:SetFontSize(labelGroupDamage_DPS, Details.realtime_dps_meter.font_size) + DF:SetFontOutline (labelGroupDamage_DPS, Details.realtime_dps_meter.font_shadow) --wipe current data for mythic dungeon f.GroupBuffer = {} @@ -641,25 +641,25 @@ function Details:CreateCurrentDpsFrame(parent, name) end --frame position - f:SetSize(_detalhes.realtime_dps_meter.frame_settings.width, _detalhes.realtime_dps_meter.frame_settings.height) - LibWindow.RegisterConfig(f, _detalhes.realtime_dps_meter.frame_settings) + f:SetSize(Details.realtime_dps_meter.frame_settings.width, Details.realtime_dps_meter.frame_settings.height) + LibWindow.RegisterConfig(f, Details.realtime_dps_meter.frame_settings) LibWindow.RestorePosition(f) --backdrop color - f:SetBackdropColor(unpack(_detalhes.realtime_dps_meter.frame_settings.backdrop_color)) + f:SetBackdropColor(unpack(Details.realtime_dps_meter.frame_settings.backdrop_color)) --set frame size - f:SetSize(_detalhes.realtime_dps_meter.frame_settings.width, _detalhes.realtime_dps_meter.frame_settings.height) + f:SetSize(Details.realtime_dps_meter.frame_settings.width, Details.realtime_dps_meter.frame_settings.height) --frame is locked - if (_detalhes.realtime_dps_meter.frame_settings.locked) then + if (Details.realtime_dps_meter.frame_settings.locked) then f:EnableMouse(false) else f:EnableMouse(true) end --frame can show title - if (_detalhes.realtime_dps_meter.frame_settings.show_title) then + if (Details.realtime_dps_meter.frame_settings.show_title) then TitleString:Show() TitleBackground:Show() else @@ -668,27 +668,27 @@ function Details:CreateCurrentDpsFrame(parent, name) end --frame strata - f:SetFrameStrata(_detalhes.realtime_dps_meter.frame_settings.strata) + f:SetFrameStrata(Details.realtime_dps_meter.frame_settings.strata) --calcule buffer size f.MaxBufferIndex = f.SampleSize * time_fraction * 100 --sample size in seconds * fraction * tick milliseconds --interval to update the frame - f.NextScreenUpdate = _detalhes.realtime_dps_meter.update_interval + f.NextScreenUpdate = Details.realtime_dps_meter.update_interval - labelPlayerTeam_DPS:SetPoint("left", barFrame.splitBar.widget, "left", 4 + _detalhes.realtime_dps_meter.text_offset, 0) - labelYellowTeam_DPS:SetPoint("right", barFrame.splitBar.widget, "right", -4 - _detalhes.realtime_dps_meter.text_offset, 0) + labelPlayerTeam_DPS:SetPoint("left", barFrame.splitBar.widget, "left", 4 + Details.realtime_dps_meter.text_offset, 0) + labelYellowTeam_DPS:SetPoint("right", barFrame.splitBar.widget, "right", -4 - Details.realtime_dps_meter.text_offset, 0) end - _detalhes:UpdateTheRealCurrentDPSFrame() + Details:UpdateTheRealCurrentDPSFrame() local on_tick = function(self, deltaTime) self.NextUpdate = self.NextUpdate - deltaTime if (self.NextUpdate <= 0) then --update string - local currentCombat = _detalhes:GetCombat() + local currentCombat = Details:GetCombat() local damageContainer = currentCombat:GetContainer (DETAILS_ATTRIBUTE_DAMAGE) --show the current dps during an arena match @@ -708,7 +708,7 @@ function Details:CreateCurrentDpsFrame(parent, name) thisTickYellowDamage = thisTickYellowDamage + actor.total end - if (actor.nome == _detalhes.playername) then + if (actor.nome == Details.playername) then --if player isn't in green team > swap colors if (f.PlayerTeam ~= actor.arena_team) then f.SwapArenaTeamColors() @@ -797,13 +797,13 @@ function Details:CreateCurrentDpsFrame(parent, name) if (self.NextScreenUpdate <= 0) then if (f.PlayerTeam == 0) then - labelPlayerTeam_DPS:SetText(_detalhes:ToK2 (self.PlayerTeamDamage / self.SampleSize)) - labelYellowTeam_DPS:SetText(_detalhes:ToK2 (self.YellowDamage / self.SampleSize)) + labelPlayerTeam_DPS:SetText(Details:ToK2 (self.PlayerTeamDamage / self.SampleSize)) + labelYellowTeam_DPS:SetText(Details:ToK2 (self.YellowDamage / self.SampleSize)) else - labelPlayerTeam_DPS:SetText(_detalhes:ToK2 (self.YellowDamage / self.SampleSize)) - labelYellowTeam_DPS:SetText(_detalhes:ToK2 (self.PlayerTeamDamage / self.SampleSize)) + labelPlayerTeam_DPS:SetText(Details:ToK2 (self.YellowDamage / self.SampleSize)) + labelYellowTeam_DPS:SetText(Details:ToK2 (self.PlayerTeamDamage / self.SampleSize)) end - f.NextScreenUpdate = _detalhes.realtime_dps_meter.update_interval + f.NextScreenUpdate = Details.realtime_dps_meter.update_interval end elseif (self.ShowingMythicDungeon) then @@ -843,8 +843,8 @@ function Details:CreateCurrentDpsFrame(parent, name) self.NextScreenUpdate = self.NextScreenUpdate - time_fraction if (self.NextScreenUpdate <= 0) then - labelGroupDamage_DPS:SetText(_detalhes:ToK2 (f.GroupTotalDamage / self.SampleSize)) - f.NextScreenUpdate = _detalhes.realtime_dps_meter.update_interval + labelGroupDamage_DPS:SetText(Details:ToK2 (f.GroupTotalDamage / self.SampleSize)) + f.NextScreenUpdate = Details.realtime_dps_meter.update_interval end end @@ -877,17 +877,17 @@ function Details:CreateCurrentDpsFrame(parent, name) end end - local eventListener = _detalhes:CreateEventListener() + local eventListener = Details:CreateEventListener() function eventListener:ArenaStarted() - if (_detalhes.realtime_dps_meter.arena_enabled) then + if (Details.realtime_dps_meter.arena_enabled) then --it is working here, f:StartForArenaMatch() is called but the frame is still now shown. f:StartForArenaMatch() end end function eventListener:MythicDungeonStarted() - if (_detalhes.realtime_dps_meter.mythic_dungeon_enabled) then + if (Details.realtime_dps_meter.mythic_dungeon_enabled) then f:StartForMythicDungeon() end end @@ -920,8 +920,8 @@ function Details:CreateCurrentDpsFrame(parent, name) eventListener:RegisterEvent("COMBAT_MYTHICDUNGEON_END", "MythicDungeonEnded") eventListener:RegisterEvent("COMBAT_PLAYER_ENTER", "ResetBuffer") - _detalhes.Broadcaster_CurrentDpsLoaded = true - _detalhes.Broadcaster_CurrentDpsFrame = f + Details.Broadcaster_CurrentDpsLoaded = true + Details.Broadcaster_CurrentDpsFrame = f C_Timer.After(1, lockCallback) f:Hide() end diff --git a/frames/window_custom.lua b/frames/window_custom.lua index 17082fb9..c06d99f6 100644 --- a/frames/window_custom.lua +++ b/frames/window_custom.lua @@ -1,5 +1,5 @@ --custom window - local _detalhes = _G._detalhes + local _detalhes = _G.Details local gump = _detalhes.gump local _ local Loc = LibStub("AceLocale-3.0"):GetLocale( "Details" ) diff --git a/frames/window_custom_scripts.lua b/frames/window_custom_scripts.lua index f9df7c97..6b911c55 100644 --- a/frames/window_custom_scripts.lua +++ b/frames/window_custom_scripts.lua @@ -1,6 +1,6 @@ -local Details = _G._detalhes +local Details = _G.Details local DF = _G.DetailsFramework local _ diff --git a/frames/window_dump.lua b/frames/window_dump.lua index ccd2c802..823eaa56 100644 --- a/frames/window_dump.lua +++ b/frames/window_dump.lua @@ -73,11 +73,11 @@ end --cancel button always closes the window and okay calls the comfirm function passed in the argument --default text is the text shown show the window is show() -function _detalhes:DumpString (text) - _detalhes:ShowImportWindow (text) +function Details:DumpString (text) + Details:ShowImportWindow (text) end -function _detalhes:ShowImportWindow (defaultText, confirmFunc, titleText) +function Details:ShowImportWindow (defaultText, confirmFunc, titleText) if (not _G.DetailsExportWindow) then local importWindow = DetailsFramework:CreateSimplePanel(_G.UIParent, 800, 610, "Details! Dump String", "DetailsExportWindow") importWindow:SetFrameStrata("FULLSCREEN") @@ -117,12 +117,12 @@ function _detalhes:ShowImportWindow (defaultText, confirmFunc, titleText) end importWindow:Hide() end - local okayButton = DetailsFramework:CreateButton(importTextEditor, onClickImportButton, 120, 20, "Okay", -1, nil, nil, nil, nil, nil, _detalhes.gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"), _detalhes.gump:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")) --localize-me + local okayButton = DetailsFramework:CreateButton(importTextEditor, onClickImportButton, 120, 20, "Okay", -1, nil, nil, nil, nil, nil, Details.gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"), Details.gump:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")) --localize-me okayButton:SetIcon ([[Interface\BUTTONS\UI-Panel-BiggerButton-Up]], 20, 20, "overlay", {0.1, .9, 0.1, .9}) importTextEditor.OkayButton = okayButton --cancel button - local cancelButton = DetailsFramework:CreateButton(importTextEditor, function() importWindow:Hide() end, 120, 20, "Cancel", -1, nil, nil, nil, nil, nil, _detalhes.gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"), _detalhes.gump:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")) --localize-me + local cancelButton = DetailsFramework:CreateButton(importTextEditor, function() importWindow:Hide() end, 120, 20, "Cancel", -1, nil, nil, nil, nil, nil, Details.gump:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"), Details.gump:GetTemplate("font", "OPTIONS_FONT_TEMPLATE")) --localize-me cancelButton:SetIcon ([[Interface\BUTTONS\UI-Panel-MinimizeButton-Up]], 20, 20, "overlay", {0.1, .9, 0.1, .9}) okayButton:SetPoint("topright", importTextEditor, "bottomright", 0, -10) diff --git a/frames/window_eventtracker.lua b/frames/window_eventtracker.lua index 0cec2285..bd1959a2 100644 --- a/frames/window_eventtracker.lua +++ b/frames/window_eventtracker.lua @@ -14,7 +14,7 @@ function Details:OpenEventTrackerOptions(bFromOptionsPanel) optionsPanel:SetScript("OnMouseUp", nil) local LibWindow = LibStub("LibWindow-1.1") - LibWindow.RegisterConfig(optionsPanel, _detalhes.event_tracker.options_frame) + LibWindow.RegisterConfig(optionsPanel, Details.event_tracker.options_frame) LibWindow.MakeDraggable(optionsPanel) LibWindow.RestorePosition(optionsPanel) @@ -216,9 +216,9 @@ function Details:OpenEventTrackerOptions(bFromOptionsPanel) { type = "toggle", - get = function() return _detalhes.event_tracker.show_crowdcontrol_pvp end, + get = function() return Details.event_tracker.show_crowdcontrol_pvp end, set = function(self, fixedparam, value) - _detalhes.event_tracker.show_crowdcontrol_pvp = value + Details.event_tracker.show_crowdcontrol_pvp = value end, desc = "Show Crowd Control (Arena & BG)", name = "Show Crowd Control when inside a PvP zone", @@ -226,9 +226,9 @@ function Details:OpenEventTrackerOptions(bFromOptionsPanel) }, { type = "toggle", - get = function() return _detalhes.event_tracker.show_crowdcontrol_pvm end, + get = function() return Details.event_tracker.show_crowdcontrol_pvm end, set = function(self, fixedparam, value) - _detalhes.event_tracker.show_crowdcontrol_pvm = value + Details.event_tracker.show_crowdcontrol_pvm = value end, desc = "Show Crowd Control (Dungeon & Raid)", name = "Show Crowd Control when inside a PvE zone", @@ -255,7 +255,7 @@ end function Details:CreateEventTrackerFrame(parentObject, name) - local DF = _detalhes.gump + local DF = Details.gump local SharedMedia = LibStub:GetLibrary ("LibSharedMedia-3.0") --> screen frame @@ -269,17 +269,17 @@ function Details:CreateEventTrackerFrame(parentObject, name) --f:SetResizeBounds(150, 40, 800, 1024) end - screenFrame:SetSize(_detalhes.event_tracker.frame.width, _detalhes.event_tracker.frame.height) + screenFrame:SetSize(Details.event_tracker.frame.width, Details.event_tracker.frame.height) screenFrame:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}}) - screenFrame:SetBackdropColor(unpack(_detalhes.event_tracker.frame.backdrop_color)) + screenFrame:SetBackdropColor(unpack(Details.event_tracker.frame.backdrop_color)) screenFrame:EnableMouse(true) screenFrame:SetMovable(true) screenFrame:SetResizable(true) screenFrame:SetClampedToScreen(true) local LibWindow = LibStub("LibWindow-1.1") - LibWindow.RegisterConfig(screenFrame, _detalhes.event_tracker.frame) + LibWindow.RegisterConfig(screenFrame, Details.event_tracker.frame) LibWindow.MakeDraggable(screenFrame) LibWindow.RestorePosition(screenFrame) @@ -287,7 +287,7 @@ function Details:CreateEventTrackerFrame(parentObject, name) local leftResize, rightResize = DF:CreateResizeGrips(screenFrame) leftResize:SetScript("OnMouseDown", function(self) - if (not screenFrame.resizing and not _detalhes.event_tracker.frame.locked) then + if (not screenFrame.resizing and not Details.event_tracker.frame.locked) then screenFrame.resizing = true screenFrame:StartSizing("bottomleft") end @@ -296,12 +296,12 @@ function Details:CreateEventTrackerFrame(parentObject, name) if (screenFrame.resizing) then screenFrame.resizing = false screenFrame:StopMovingOrSizing() - _detalhes.event_tracker.frame.width = screenFrame:GetWidth() - _detalhes.event_tracker.frame.height = screenFrame:GetHeight() + Details.event_tracker.frame.width = screenFrame:GetWidth() + Details.event_tracker.frame.height = screenFrame:GetHeight() end end) rightResize:SetScript("OnMouseDown", function(self) - if (not screenFrame.resizing and not _detalhes.event_tracker.frame.locked) then + if (not screenFrame.resizing and not Details.event_tracker.frame.locked) then screenFrame.resizing = true screenFrame:StartSizing("bottomright") end @@ -310,8 +310,8 @@ function Details:CreateEventTrackerFrame(parentObject, name) if (screenFrame.resizing) then screenFrame.resizing = false screenFrame:StopMovingOrSizing() - _detalhes.event_tracker.frame.width = screenFrame:GetWidth() - _detalhes.event_tracker.frame.height = screenFrame:GetHeight() + Details.event_tracker.frame.width = screenFrame:GetWidth() + Details.event_tracker.frame.height = screenFrame:GetHeight() end end) @@ -407,7 +407,7 @@ function Details:CreateEventTrackerFrame(parentObject, name) line.ActionIcon = actionicon --set some parameters - _detalhes:UpdateWorldTrackerLines (line) + Details:UpdateWorldTrackerLines (line) --set scripts line:SetScript("OnUpdate", lineOnTick) @@ -434,7 +434,7 @@ function Details:CreateEventTrackerFrame(parentObject, name) local get_spec_or_class = function(serial, unitName) local class - local spec = _detalhes.cached_specs [serial] + local spec = Details.cached_specs [serial] if (not spec) then local _, engClass = UnitClass(unitName) if (engClass) then @@ -452,9 +452,9 @@ function Details:CreateEventTrackerFrame(parentObject, name) local get_player_icon = function(spec, class) if (spec) then - return [[Interface\AddOns\Details\images\spec_icons_normal]], unpack(_detalhes.class_specs_coords [spec]) + return [[Interface\AddOns\Details\images\spec_icons_normal]], unpack(Details.class_specs_coords [spec]) elseif (class) then - return [[Interface\AddOns\Details\images\classes_small]], unpack(_detalhes.class_coords [class]) + return [[Interface\AddOns\Details\images\classes_small]], unpack(Details.class_coords [class]) else return [[Interface\AddOns\Details\images\classes_plus]], 0.50390625, 0.62890625, 0, 0.125 end @@ -462,11 +462,11 @@ function Details:CreateEventTrackerFrame(parentObject, name) local add_role_and_class_color = function(unitName, unitSerial) --get the actor object - local actor = _detalhes.tabela_vigente[1]:GetActor(unitName) + local actor = Details.tabela_vigente[1]:GetActor(unitName) if (actor) then --remove realm name - unitName = _detalhes:GetOnlyName(unitName) + unitName = Details:GetOnlyName(unitName) local class, spec, role = actor.classe, actor.spec, actor.role if (not class) then @@ -474,26 +474,26 @@ function Details:CreateEventTrackerFrame(parentObject, name) end --add the class color - if (_detalhes.player_class [class]) then + if (Details.player_class [class]) then --is a player, add the class color - unitName = _detalhes:AddColorString (unitName, class) + unitName = Details:AddColorString (unitName, class) end --add the role icon if (role ~= "NONE") then --have a role - unitName = _detalhes:AddRoleIcon (unitName, role, _detalhes.event_tracker.line_height) + unitName = Details:AddRoleIcon (unitName, role, Details.event_tracker.line_height) end else local spec, class = get_spec_or_class (unitSerial, unitName) - unitName = _detalhes:GetOnlyName(unitName) + unitName = Details:GetOnlyName(unitName) if (class) then --add the class color - if (_detalhes.player_class [class]) then + if (Details.player_class [class]) then --is a player, add the class color - unitName = _detalhes:AddColorString (unitName, class) + unitName = Details:AddColorString (unitName, class) end end end @@ -502,7 +502,7 @@ function Details:CreateEventTrackerFrame(parentObject, name) end local get_text_size = function() - local iconsSpace = _detalhes.event_tracker.line_height * 3 + local iconsSpace = Details.event_tracker.line_height * 3 local textSpace = 4 local saveSpace = 14 @@ -553,7 +553,7 @@ function Details:CreateEventTrackerFrame(parentObject, name) end --]=] - local sourceNameNoRealm = _detalhes:GetOnlyName(sourceName) + local sourceNameNoRealm = Details:GetOnlyName(sourceName) --need to use the language system from details framework to detect which language is being used local languageId = DF.Language.DetectLanguageId(sourceNameNoRealm) @@ -564,7 +564,7 @@ function Details:CreateEventTrackerFrame(parentObject, name) local fontPath = DF.Language.GetFontForLanguageID(languageId) if (fontPath) then if (languageId == "enUS") then - DF:SetFontFace(line.LeftText, _detalhes.event_tracker.font_face) + DF:SetFontFace(line.LeftText, Details.event_tracker.font_face) else DF:SetFontFace(line.LeftText, fontPath) end @@ -657,7 +657,7 @@ function Details:CreateEventTrackerFrame(parentObject, name) local CurrentShowing = {} --scrollframe - local scrollframe = DF:CreateScrollBox (screenFrame, "$parentScrollFrame", scroll_refresh, CurrentShowing, scroll_width, 400, scroll_line_amount, _detalhes.event_tracker.line_height, scroll_createline, true, true) + local scrollframe = DF:CreateScrollBox (screenFrame, "$parentScrollFrame", scroll_refresh, CurrentShowing, scroll_width, 400, scroll_line_amount, Details.event_tracker.line_height, scroll_createline, true, true) scrollframe:SetPoint("topleft", screenFrame, "topleft", 0, -header_size) scrollframe:SetPoint("topright", screenFrame, "topright", 0, -header_size) scrollframe:SetPoint("bottomleft", screenFrame, "bottomleft", 0, 0) @@ -670,40 +670,40 @@ function Details:CreateEventTrackerFrame(parentObject, name) local index = line.Index --update left text - DF:SetFontColor(line.LeftText, _detalhes.event_tracker.font_color) - DF:SetFontFace (line.LeftText, _detalhes.event_tracker.font_face) - DF:SetFontSize(line.LeftText, _detalhes.event_tracker.font_size) - DF:SetFontOutline (line.LeftText, _detalhes.event_tracker.font_shadow) + DF:SetFontColor(line.LeftText, Details.event_tracker.font_color) + DF:SetFontFace (line.LeftText, Details.event_tracker.font_face) + DF:SetFontSize(line.LeftText, Details.event_tracker.font_size) + DF:SetFontOutline (line.LeftText, Details.event_tracker.font_shadow) --update right text - DF:SetFontColor(line.RightText, _detalhes.event_tracker.font_color) - DF:SetFontFace (line.RightText, _detalhes.event_tracker.font_face) - DF:SetFontSize(line.RightText, _detalhes.event_tracker.font_size) - DF:SetFontOutline (line.RightText, _detalhes.event_tracker.font_shadow) + DF:SetFontColor(line.RightText, Details.event_tracker.font_color) + DF:SetFontFace (line.RightText, Details.event_tracker.font_face) + DF:SetFontSize(line.RightText, Details.event_tracker.font_size) + DF:SetFontOutline (line.RightText, Details.event_tracker.font_shadow) --adjust where the line is anchored - line:SetPoint("topleft", line:GetParent(), "topleft", 1, -0.5 -((index-1)*(_detalhes.event_tracker.line_height+1))) - line:SetPoint("topright", line:GetParent(), "topright", -1, -0.5 -((index-1)*(_detalhes.event_tracker.line_height+1))) + line:SetPoint("topleft", line:GetParent(), "topleft", 1, -0.5 -((index-1)*(Details.event_tracker.line_height+1))) + line:SetPoint("topright", line:GetParent(), "topright", -1, -0.5 -((index-1)*(Details.event_tracker.line_height+1))) --set its height - line:SetHeight(_detalhes.event_tracker.line_height) + line:SetHeight(Details.event_tracker.line_height) --set texture - local texture = SharedMedia:Fetch ("statusbar", _detalhes.event_tracker.line_texture) + local texture = SharedMedia:Fetch ("statusbar", Details.event_tracker.line_texture) line.StatusbarTexture:SetTexture(texture) - line.StatusbarTexture:SetVertexColor(unpack(_detalhes.event_tracker.line_color)) + line.StatusbarTexture:SetVertexColor(unpack(Details.event_tracker.line_color)) --set icon size - line.LeftIcon:SetSize(_detalhes.event_tracker.line_height, _detalhes.event_tracker.line_height) - line.RightIcon:SetSize(_detalhes.event_tracker.line_height, _detalhes.event_tracker.line_height) - line.ActionIcon:SetSize(_detalhes.event_tracker.line_height-4, _detalhes.event_tracker.line_height-4) + line.LeftIcon:SetSize(Details.event_tracker.line_height, Details.event_tracker.line_height) + line.RightIcon:SetSize(Details.event_tracker.line_height, Details.event_tracker.line_height) + line.ActionIcon:SetSize(Details.event_tracker.line_height-4, Details.event_tracker.line_height-4) line.ActionIcon:SetAlpha(0.65) end -- /run _detalhes.event_tracker.font_shadow = 24 -- /run _detalhes:UpdateWorldTrackerLines() - function _detalhes:UpdateWorldTrackerLines (line) + function Details:UpdateWorldTrackerLines (line) --don't run if the featured hasn't loaded if (not screenFrame) then return @@ -716,23 +716,23 @@ function Details:CreateEventTrackerFrame(parentObject, name) for index, line in ipairs(scrollframe:GetFrames()) do update_line (line) end - scrollframe:SetFramesHeight (_detalhes.event_tracker.line_height) + scrollframe:SetFramesHeight (Details.event_tracker.line_height) scrollframe:Refresh() end end - function _detalhes:UpdateEventTrackerFrame() + function Details:UpdateEventTrackerFrame() --don't run if the featured hasn't loaded if (not screenFrame) then return end - screenFrame:SetSize(_detalhes.event_tracker.frame.width, _detalhes.event_tracker.frame.height) - LibWindow.RegisterConfig(screenFrame, _detalhes.event_tracker.frame) + screenFrame:SetSize(Details.event_tracker.frame.width, Details.event_tracker.frame.height) + LibWindow.RegisterConfig(screenFrame, Details.event_tracker.frame) LibWindow.RestorePosition(screenFrame) scrollframe:OnSizeChanged() - if (_detalhes.event_tracker.frame.locked) then + if (Details.event_tracker.frame.locked) then screenFrame:EnableMouse(false) leftResize:Hide() rightResize:Hide() @@ -742,7 +742,7 @@ function Details:CreateEventTrackerFrame(parentObject, name) rightResize:Show() end - if (_detalhes.event_tracker.frame.show_title) then + if (Details.event_tracker.frame.show_title) then TitleString:Show() TitleBackground:Show() scrollframe:SetPoint("topleft", screenFrame, "topleft", 0, -header_size) @@ -754,12 +754,12 @@ function Details:CreateEventTrackerFrame(parentObject, name) scrollframe:SetPoint("topright", screenFrame, "topright", 0, 0) end - screenFrame:SetBackdropColor(unpack(_detalhes.event_tracker.frame.backdrop_color)) - scrollframe.__background:SetVertexColor(unpack(_detalhes.event_tracker.frame.backdrop_color)) + screenFrame:SetBackdropColor(unpack(Details.event_tracker.frame.backdrop_color)) + scrollframe.__background:SetVertexColor(unpack(Details.event_tracker.frame.backdrop_color)) - screenFrame:SetFrameStrata(_detalhes.event_tracker.frame.strata) + screenFrame:SetFrameStrata(Details.event_tracker.frame.strata) - _detalhes:UpdateWorldTrackerLines() + Details:UpdateWorldTrackerLines() scrollframe:Refresh() end @@ -824,15 +824,15 @@ function Details:CreateEventTrackerFrame(parentObject, name) --check if isnt a pet if (caster_flags and is_player(caster_flags)) then --the target is a player - if (_detalhes.event_tracker.show_crowdcontrol_pvp) then - if (_detalhes.zone_type == "arena" or _detalhes.zone_type == "pvp" or _detalhes.zone_type == "none") then + if (Details.event_tracker.show_crowdcontrol_pvp) then + if (Details.zone_type == "arena" or Details.zone_type == "pvp" or Details.zone_type == "none") then tinsert(CurrentShowing, 1, {SPELLTYPE_CROWDCONTROL, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial}) added = true end end - if (_detalhes.event_tracker.show_crowdcontrol_pvm) then - if (_detalhes.zone_type == "party" or _detalhes.zone_type == "raid") then + if (Details.event_tracker.show_crowdcontrol_pvm) then + if (Details.zone_type == "party" or Details.zone_type == "raid") then tinsert(CurrentShowing, 1, {SPELLTYPE_CROWDCONTROL, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial}) added = true end @@ -859,7 +859,7 @@ function Details:CreateEventTrackerFrame(parentObject, name) end) - _detalhes.Broadcaster_EventTrackerLoaded = true - _detalhes.Broadcaster_EventTrackerFrame = screenFrame + Details.Broadcaster_EventTrackerLoaded = true + Details.Broadcaster_EventTrackerFrame = screenFrame screenFrame:Hide() end diff --git a/frames/window_main.lua b/frames/window_main.lua index b27d6355..d7f116c3 100644 --- a/frames/window_main.lua +++ b/frames/window_main.lua @@ -1,5 +1,5 @@ -local Details = _G._detalhes +local Details = _G.Details local Loc = LibStub("AceLocale-3.0"):GetLocale("Details") local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0") local segmentos = Details.segmentos diff --git a/frames/window_news.lua b/frames/window_news.lua index 3c16c1e6..205ed4cf 100644 --- a/frames/window_news.lua +++ b/frames/window_news.lua @@ -52,7 +52,7 @@ function Details:OpenNewsWindow(textToShow, dumpValues, keeptext) --show news newsFrame:Text (textToShow or Loc["STRING_VERSION_LOG"]) --show textures - if (_detalhes.build_counter == 8154) then + if (Details.build_counter == 8154) then newsFrame.imageFrame:Show() newsFrame.imageFrame.texture:SetTexture([[interface/addons/details/images/news_images]]) newsFrame.imageFrame.texture:SetSize(279, 452) diff --git a/frames/window_options2.lua b/frames/window_options2.lua index 24c10886..a40576a7 100644 --- a/frames/window_options2.lua +++ b/frames/window_options2.lua @@ -74,9 +74,9 @@ function Details.options.InitializeOptionsWindow(instance) --select the instance to edit local onSelectInstance = function(_, _, instanceId) - local instance = _detalhes.tabela_instancias[instanceId] + local instance = Details.tabela_instancias[instanceId] if (not instance:IsEnabled() or not instance:IsStarted()) then - _detalhes.CriarInstancia (_, _, instance.meu_id) + Details.CriarInstancia (_, _, instance.meu_id) end Details.options.SetCurrentInstanceAndRefresh(instance) f.updateMicroFrames() @@ -84,20 +84,20 @@ function Details.options.InitializeOptionsWindow(instance) local buildInstanceMenu = function() local instanceList = {} - for index = 1, math.min (#_detalhes.tabela_instancias, _detalhes.instances_amount) do - local instance = _detalhes.tabela_instancias[index] + for index = 1, math.min (#Details.tabela_instancias, Details.instances_amount) do + local instance = Details.tabela_instancias[index] --what the window is showing local atributo = instance.atributo local sub_atributo = instance.sub_atributo if (atributo == 5) then --custom - local CustomObject = _detalhes.custom [sub_atributo] + local CustomObject = Details.custom [sub_atributo] if (not CustomObject) then instance:ResetAttribute() atributo = instance.atributo sub_atributo = instance.sub_atributo - instanceList [#instanceList+1] = {value = index, label = "#".. index .. " " .. _detalhes.atributos.lista [atributo] .. " - " .. _detalhes.sub_atributos [atributo].lista [sub_atributo], onclick = onSelectInstance, icon = _detalhes.sub_atributos [atributo].icones[sub_atributo] [1], texcoord = _detalhes.sub_atributos [atributo].icones[sub_atributo] [2]} + instanceList [#instanceList+1] = {value = index, label = "#".. index .. " " .. Details.atributos.lista [atributo] .. " - " .. Details.sub_atributos [atributo].lista [sub_atributo], onclick = onSelectInstance, icon = Details.sub_atributos [atributo].icones[sub_atributo] [1], texcoord = Details.sub_atributos [atributo].icones[sub_atributo] [2]} else instanceList [#instanceList+1] = {value = index, label = "#".. index .. " " .. CustomObject.name, onclick = onSelectInstance, icon = CustomObject.icon} end @@ -105,8 +105,8 @@ function Details.options.InitializeOptionsWindow(instance) local modo = instance.modo if (modo == 1) then --solo plugin - atributo = _detalhes.SoloTables.Mode or 1 - local SoloInfo = _detalhes.SoloTables.Menu [atributo] + atributo = Details.SoloTables.Mode or 1 + local SoloInfo = Details.SoloTables.Menu [atributo] if (SoloInfo) then instanceList [#instanceList+1] = {value = index, label = "#".. index .. " " .. SoloInfo [1], onclick = onSelectInstance, icon = SoloInfo [2]} else @@ -116,7 +116,7 @@ function Details.options.InitializeOptionsWindow(instance) elseif (modo == 4) then --raid plugin local plugin_name = instance.current_raid_plugin or instance.last_raid_plugin if (plugin_name) then - local plugin_object = _detalhes:GetPlugin (plugin_name) + local plugin_object = Details:GetPlugin (plugin_name) if (plugin_object) then instanceList [#instanceList+1] = {value = index, label = "#".. index .. " " .. plugin_object.__name, onclick = onSelectInstance, icon = plugin_object.__icon} else @@ -126,7 +126,7 @@ function Details.options.InitializeOptionsWindow(instance) instanceList [#instanceList+1] = {value = index, label = "#".. index .. " unknown", onclick = onSelectInstance, icon = ""} end else - instanceList [#instanceList+1] = {value = index, label = "#".. index .. " " .. _detalhes.atributos.lista [atributo] .. " - " .. _detalhes.sub_atributos [atributo].lista [sub_atributo], onclick = onSelectInstance, icon = _detalhes.sub_atributos [atributo].icones[sub_atributo] [1], texcoord = _detalhes.sub_atributos [atributo].icones[sub_atributo] [2]} + instanceList [#instanceList+1] = {value = index, label = "#".. index .. " " .. Details.atributos.lista [atributo] .. " - " .. Details.sub_atributos [atributo].lista [sub_atributo], onclick = onSelectInstance, icon = Details.sub_atributos [atributo].icones[sub_atributo] [1], texcoord = Details.sub_atributos [atributo].icones[sub_atributo] [2]} end end end @@ -157,9 +157,9 @@ function Details.options.InitializeOptionsWindow(instance) --editing group checkbox local onToggleEditingGroup = function(self, fixparam, value) - _detalhes.options_group_edit = value + Details.options_group_edit = value end - local editingGroupCheckBox = DF:CreateSwitch(footerFrame, onToggleEditingGroup, _detalhes.options_group_edit, _, _, _, _, _, "$parentEditGroupCheckbox", _, _, _, _, DF:GetTemplate("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE")) + local editingGroupCheckBox = DF:CreateSwitch(footerFrame, onToggleEditingGroup, Details.options_group_edit, _, _, _, _, _, "$parentEditGroupCheckbox", _, _, _, _, DF:GetTemplate("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE")) editingGroupCheckBox:SetAsCheckBox() editingGroupCheckBox.tooltip = Loc ["STRING_MINITUTORIAL_OPTIONS_PANEL2"] @@ -171,11 +171,11 @@ function Details.options.InitializeOptionsWindow(instance) --create test bars DF:NewColor("C_OptionsButtonOrange", 0.9999, 0.8196, 0, 1) local create_test_bars_func = function() - _detalhes.CreateTestBars() - if (not _detalhes.test_bar_update) then - _detalhes:StartTestBarUpdate() + Details.CreateTestBars() + if (not Details.test_bar_update) then + Details:StartTestBarUpdate() else - _detalhes:StopTestBarUpdate() + Details:StopTestBarUpdate() end end local fillbars = DF:NewButton(footerFrame, _, "$parentCreateExampleBarsButton", nil, 140, 20, create_test_bars_func, nil, nil, nil, Loc ["STRING_OPTIONS_TESTBARS"], 1) @@ -184,7 +184,7 @@ function Details.options.InitializeOptionsWindow(instance) fillbars:SetIcon ("Interface\\AddOns\\Details\\images\\icons", nil, nil, nil, {323/512, 365/512, 42/512, 78/512}, {1, 1, 1, 0.6}, 4, 2) --change log - local changelog = DF:NewButton(footerFrame, _, "$parentOpenChangeLogButton", nil, 140, 20, _detalhes.OpenNewsWindow, "change_log", nil, nil, Loc ["STRING_OPTIONS_CHANGELOG"], 1) + local changelog = DF:NewButton(footerFrame, _, "$parentOpenChangeLogButton", nil, 140, 20, Details.OpenNewsWindow, "change_log", nil, nil, Loc ["STRING_OPTIONS_CHANGELOG"], 1) changelog:SetPoint("left", fillbars, "right", 10, 0) changelog:SetTemplate(options_button_template) changelog:SetIcon ("Interface\\AddOns\\Details\\images\\icons", nil, nil, nil, {367/512, 399/512, 43/512, 76/512}, {1, 1, 1, 0.8}, 4, 2) diff --git a/frames/window_options2_sections.lua b/frames/window_options2_sections.lua index 90f33249..a841c661 100644 --- a/frames/window_options2_sections.lua +++ b/frames/window_options2_sections.lua @@ -102,11 +102,11 @@ function Details.options.GetCurrentInstanceInOptionsPanel() end local afterUpdate = function(instance) - _detalhes:SendOptionsModifiedEvent(instance or currentInstance) + Details:SendOptionsModifiedEvent(instance or currentInstance) end local isGroupEditing = function() - return _detalhes.options_group_edit + return Details.options_group_edit end local editInstanceSetting = function(instance, funcName, ...) @@ -154,8 +154,8 @@ do local iconsize = {14, 14} local onSelectTimeAbbreviation = function(_, _, abbreviationtype) - _detalhes.ps_abbreviation = abbreviationtype - _detalhes:UpdateToKFunctions() + Details.ps_abbreviation = abbreviationtype + Details:UpdateToKFunctions() afterUpdate() end @@ -175,7 +175,7 @@ do --number system local onSelectNumeralSystem = function(_, _, systemNumber) - _detalhes:SelectNumericalSystem(systemNumber) + Details:SelectNumericalSystem(systemNumber) end local asian1K, asian10K, asian1B = DF:GetAsianNumberSymbols() @@ -198,9 +198,9 @@ do --time measure type local onSelectTimeType = function(_, _, timetype) - _detalhes.time_type = timetype - _detalhes.time_type_original = timetype - _detalhes:RefreshMainWindow(-1, true) + Details.time_type = timetype + Details.time_type_original = timetype + Details:RefreshMainWindow(-1, true) afterUpdate() end local timetypeOptions = { @@ -214,7 +214,7 @@ do --auto erase | erase data local onSelectEraseData = function(_, _, eraseType) - _detalhes.segments_auto_erase = eraseType + Details.segments_auto_erase = eraseType afterUpdate() end @@ -231,9 +231,9 @@ do {type = "label", get = function() return Loc ["STRING_OPTIONS_GENERAL_ANCHOR"] end, text_template = subSectionTitleTextTemplate}, {--animate bars type = "toggle", - get = function() return _detalhes.use_row_animations end, + get = function() return Details.use_row_animations end, set = function(self, fixedparam, value) - _detalhes:SetUseAnimations(value) + Details:SetUseAnimations(value) afterUpdate() end, name = Loc ["STRING_OPTIONS_ANIMATEBARS"], @@ -242,9 +242,9 @@ do }, {--scroll speed type = "range", - get = function() return _detalhes.scroll_speed end, + get = function() return Details.scroll_speed end, set = function(self, fixedparam, value) - _detalhes.scroll_speed = value + Details.scroll_speed = value end, min = 1, max = 3, @@ -254,9 +254,9 @@ do }, {--instances amount type = "range", - get = function() return _detalhes.instances_amount end, + get = function() return Details.instances_amount end, set = function(self, fixedparam, value) - _detalhes.instances_amount = value + Details.instances_amount = value end, min = 1, max = 30, @@ -266,7 +266,7 @@ do }, {--abbreviation type type = "select", - get = function() return _detalhes.ps_abbreviation end, + get = function() return Details.ps_abbreviation end, values = function() return buildAbbreviationMenu() end, @@ -275,7 +275,7 @@ do }, {--number system type = "select", - get = function() return _detalhes.numerical_system end, + get = function() return Details.numerical_system end, values = function() return buildNumeralSystemsMenu() end, @@ -284,9 +284,9 @@ do }, {--update speed type = "range", - get = function() return _detalhes.update_speed end, + get = function() return Details.update_speed end, set = function(self, fixedparam, value) - _detalhes:SetWindowUpdateSpeed(value) + Details:SetWindowUpdateSpeed(value) afterUpdate() end, min = 0.05, @@ -298,7 +298,7 @@ do }, {--time measure type = "select", - get = function() return _detalhes.time_type end, + get = function() return Details.time_type end, values = function() return buildTimeTypeMenu() end, @@ -322,9 +322,9 @@ do {--battleground remote parser type = "toggle", - get = function() return _detalhes.use_battleground_server_parser end, + get = function() return Details.use_battleground_server_parser end, set = function(self, fixedparam, value) - _detalhes.use_battleground_server_parser = value + Details.use_battleground_server_parser = value end, name = Loc ["STRING_OPTIONS_BG_UNIQUE_SEGMENT"], desc = Loc ["STRING_OPTIONS_BG_UNIQUE_SEGMENT_DESC"], @@ -332,9 +332,9 @@ do }, {--battleground show enemies type = "toggle", - get = function() return _detalhes.pvp_as_group end, + get = function() return Details.pvp_as_group end, set = function(self, fixedparam, value) - _detalhes.pvp_as_group = value + Details.pvp_as_group = value end, name = Loc ["STRING_OPTIONS_BG_ALL_ALLY"], desc = Loc ["STRING_OPTIONS_BG_ALL_ALLY_DESC"], @@ -343,9 +343,9 @@ do {--max segments type = "range", - get = function() return _detalhes.segments_amount end, + get = function() return Details.segments_amount end, set = function(self, fixedparam, value) - _detalhes.segments_amount = value + Details.segments_amount = value afterUpdate() end, min = 1, @@ -357,9 +357,9 @@ do {--max segments saved type = "range", - get = function() return _detalhes.segments_amount_to_save end, + get = function() return Details.segments_amount_to_save end, set = function(self, fixedparam, value) - _detalhes.segments_amount_to_save = value + Details.segments_amount_to_save = value afterUpdate() end, min = 1, @@ -374,7 +374,7 @@ do {--auto erase settings | erase data type = "select", - get = function() return _detalhes.segments_auto_erase end, + get = function() return Details.segments_auto_erase end, values = function() return buildEraseDataMenu() end, @@ -384,9 +384,9 @@ do {--auto erase trash segments type = "toggle", - get = function() return _detalhes.trash_auto_remove end, + get = function() return Details.trash_auto_remove end, set = function(self, fixedparam, value) - _detalhes.trash_auto_remove = value + Details.trash_auto_remove = value afterUpdate() end, name = Loc ["STRING_OPTIONS_CLEANUP"], @@ -395,9 +395,9 @@ do }, {--auto erase world segments type = "toggle", - get = function() return _detalhes.world_combat_is_trash end, + get = function() return Details.world_combat_is_trash end, set = function(self, fixedparam, value) - _detalhes.world_combat_is_trash = value + Details.world_combat_is_trash = value afterUpdate() end, name = Loc ["STRING_OPTIONS_PERFORMANCE_ERASEWORLD"], @@ -406,9 +406,9 @@ do }, {--erase chart data type = "toggle", - get = function() return _detalhes.clear_graphic end, + get = function() return Details.clear_graphic end, set = function(self, fixedparam, value) - _detalhes.clear_graphic = value + Details.clear_graphic = value afterUpdate() end, name = Loc ["STRING_OPTIONS_ERASECHARTDATA"], @@ -421,9 +421,9 @@ do {--erase overall data on new boss type = "toggle", - get = function() return _detalhes.overall_clear_newboss end, + get = function() return Details.overall_clear_newboss end, set = function(self, fixedparam, value) - _detalhes:SetOverallResetOptions(value) + Details:SetOverallResetOptions(value) afterUpdate() end, name = Loc ["STRING_OPTIONS_OVERALL_NEWBOSS"], @@ -432,9 +432,9 @@ do }, {--erase overall data on mythic plus type = "toggle", - get = function() return _detalhes.overall_clear_newchallenge end, + get = function() return Details.overall_clear_newchallenge end, set = function(self, fixedparam, value) - _detalhes:SetOverallResetOptions(nil, value) + Details:SetOverallResetOptions(nil, value) afterUpdate() end, name = Loc ["STRING_OPTIONS_OVERALL_MYTHICPLUS"], @@ -443,9 +443,9 @@ do }, {--erase overall data on logout type = "toggle", - get = function() return _detalhes.overall_clear_pvp end, + get = function() return Details.overall_clear_pvp end, set = function(self, fixedparam, value) - _detalhes:SetOverallResetOptions(nil, nil, nil, value) + Details:SetOverallResetOptions(nil, nil, nil, value) afterUpdate() end, name = "Clear On Start PVP", --localize-me @@ -454,9 +454,9 @@ do }, {--erase overall data on logout type = "toggle", - get = function() return _detalhes.overall_clear_logout end, + get = function() return Details.overall_clear_logout end, set = function(self, fixedparam, value) - _detalhes:SetOverallResetOptions(nil, nil, value) + Details:SetOverallResetOptions(nil, nil, value) afterUpdate() end, name = Loc ["STRING_OPTIONS_OVERALL_LOGOFF"], @@ -465,7 +465,7 @@ do }, {--auto switch to dynamic overall data when selecting overall data type = "toggle", - get = function() return _detalhes.auto_swap_to_dynamic_overall end, + get = function() return Details.auto_swap_to_dynamic_overall end, set = function(self, fixedparam, value) Details.auto_swap_to_dynamic_overall = value afterUpdate() @@ -482,7 +482,7 @@ do type = "execute", func = function(self) local instanceLockButton = currentInstance.baseframe.lock_button - _detalhes.lock_instance_function(instanceLockButton, "leftclick", true, true) + Details.lock_instance_function(instanceLockButton, "leftclick", true, true) end, icontexture = [[Interface\PetBattles\PetBattle-LockIcon]], icontexcoords = {0.0703125, 0.9453125, 0.0546875, 0.9453125}, @@ -512,7 +512,7 @@ do {--create instance type = "execute", func = function(self) - _detalhes:CreateInstance() + Details:CreateInstance() end, icontexture = [[Interface\Buttons\UI-AttributeButton-Encourage-Up]], --icontexcoords = {160/512, 179/512, 142/512, 162/512}, @@ -525,7 +525,7 @@ do {--class colors type = "execute", func = function(self) - _detalhes:OpenClassColorsConfig() + Details:OpenClassColorsConfig() end, icontexture = [[Interface\AddOns\Details\images\icons]], icontexcoords = {432/512, 464/512, 276/512, 309/512}, @@ -535,7 +535,7 @@ do {--bookmarks type = "execute", func = function(self) - _detalhes:OpenBookmarkConfig() + Details:OpenBookmarkConfig() end, icontexture = [[Interface\LootFrame\toast-star]], icontexcoords = {0.1, .64, 0.1, .69}, @@ -560,9 +560,9 @@ do {--always show players even on stardard mode type = "toggle", - get = function() return _detalhes.all_players_are_group end, + get = function() return Details.all_players_are_group end, set = function(self, fixedparam, value) - _detalhes.all_players_are_group = value + Details.all_players_are_group = value afterUpdate() end, name = Loc ["STRING_OPTIONS_ALWAYSSHOWPLAYERS"], @@ -575,9 +575,9 @@ do {type = "label", get = function() return Loc ["STRING_OPTIONS_SOCIAL"] end, text_template = subSectionTitleTextTemplate}, {--nickname type = "textentry", - get = function() return _detalhes:GetNickname(_G.UnitName("player"), _G.UnitName("player"), true) or "" end, + get = function() return Details:GetNickname(_G.UnitName("player"), _G.UnitName("player"), true) or "" end, func = function(self, _, text) - local accepted, errortext = _detalhes:SetNickname(text) + local accepted, errortext = Details:SetNickname(text) if (not accepted) then Details:ResetPlayerPersona() Details.options.SetCurrentInstanceAndRefresh(currentInstance) @@ -600,9 +600,9 @@ do }, {--ignore nicknames type = "toggle", - get = function() return _detalhes.ignore_nicktag end, + get = function() return Details.ignore_nicktag end, set = function(self, fixedparam, value) - _detalhes.ignore_nicktag = value + Details.ignore_nicktag = value afterUpdate() end, name = Loc ["STRING_OPTIONS_IGNORENICKNAME"], @@ -612,9 +612,9 @@ do {--remove realm name type = "toggle", - get = function() return _detalhes.remove_realm_from_name end, + get = function() return Details.remove_realm_from_name end, set = function(self, fixedparam, value) - _detalhes.remove_realm_from_name = value + Details.remove_realm_from_name = value afterUpdate() end, name = Loc ["STRING_OPTIONS_REALMNAME"], @@ -688,7 +688,7 @@ do local buildSkinMenu = function() local skinOptions = {} - for skin_name, skin_table in pairs(_detalhes.skins) do + for skin_name, skin_table in pairs(Details.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} @@ -710,7 +710,7 @@ do } for key, value in pairs(currentInstance) do - if (_detalhes.instance_defaults[key] ~= nil) then + if (Details.instance_defaults[key] ~= nil) then if (type(value) == "table") then savedObject[key] = Details.CopyTable(value) else @@ -720,7 +720,7 @@ do end if (not dontSave) then - _detalhes.savedStyles[#_detalhes.savedStyles+1] = savedObject + Details.savedStyles[#Details.savedStyles+1] = savedObject end return savedObject @@ -737,7 +737,7 @@ do --overwrite all instance parameters with saved ones for key, value in pairs(skinObject) do - if (key ~= "skin" and not _detalhes.instance_skin_ignored_values[key]) then + if (key ~= "skin" and not Details.instance_skin_ignored_values[key]) then if (type(value) == "table") then instance[key] = Details.CopyTable(value) else @@ -760,7 +760,7 @@ do --import skin string local importSaved = function() --when clicking in the okay button in the import window, it send the text in the first argument - _detalhes:ShowImportWindow("", function(skinString) + Details:ShowImportWindow("", function(skinString) if (type(skinString) ~= "string" or string.len(skinString) < 2) then return end @@ -770,8 +770,8 @@ do local dataTable = Details:DecompressData (skinString, "print") if (dataTable) then --add the new skin - _detalhes.savedStyles [#_detalhes.savedStyles+1] = dataTable - _detalhes:Msg(Loc ["STRING_OPTIONS_SAVELOAD_IMPORT_OKEY"]) + Details.savedStyles [#Details.savedStyles+1] = dataTable + Details:Msg(Loc ["STRING_OPTIONS_SAVELOAD_IMPORT_OKEY"]) Details.options.SetCurrentInstanceAndRefresh(currentInstance) afterUpdate() else @@ -825,7 +825,7 @@ do set = function(self, _, text) saveAsSkin(text) Details.options.SetCurrentInstanceAndRefresh(currentInstance) - _detalhes:Msg(Loc ["STRING_OPTIONS_SAVELOAD_SKINCREATED"]) + Details:Msg(Loc ["STRING_OPTIONS_SAVELOAD_SKINCREATED"]) afterUpdate() end, name = Loc ["STRING_OPTIONS_SAVELOAD_SAVE"], @@ -837,7 +837,7 @@ do func = function(self) local tempPreset = saveAsSkin("temp", true) - for instanceId, instance in _detalhes:ListInstances() do + for instanceId, instance in Details:ListInstances() do if (instance ~= currentInstance) then if (not instance:IsStarted()) then instance:RestoreWindow() @@ -850,7 +850,7 @@ do end end - _detalhes:Msg(Loc ["STRING_OPTIONS_SAVELOAD_APPLYALL"]) + Details:Msg(Loc ["STRING_OPTIONS_SAVELOAD_APPLYALL"]) Details.options.SetCurrentInstanceAndRefresh(currentInstance) afterUpdate() end, @@ -870,7 +870,7 @@ do end, values = function() local loadtable = {} - for index, _table in ipairs(_detalhes.savedStyles) do + for index, _table in ipairs(Details.savedStyles) do tinsert(loadtable, {value = index, label = _table.name, onclick = function() loadSkin(currentInstance, _table) end, icon = "Interface\\GossipFrame\\TabardGossipIcon", iconcolor = {.7, .7, .5, 1}}) end @@ -887,12 +887,12 @@ do end, values = function() local loadtable = {} - for index, _table in ipairs(_detalhes.savedStyles) do + for index, _table in ipairs(Details.savedStyles) do tinsert(loadtable, {value = index, label = _table.name, onclick = function(_, _, index) - table.remove (_detalhes.savedStyles, index) + table.remove (Details.savedStyles, index) Details.options.SetCurrentInstanceAndRefresh(currentInstance) afterUpdate() - _detalhes:Msg(Loc ["STRING_OPTIONS_SKIN_REMOVED"]) + Details:Msg(Loc ["STRING_OPTIONS_SKIN_REMOVED"]) end, icon = [[Interface\Glues\LOGIN\Glues-CheckBox-Check]], color = {1, 1, 1}, iconcolor = {1, .9, .9, 0.8}}) end @@ -909,11 +909,11 @@ do end, values = function() local loadtable = {} - for index, _table in ipairs(_detalhes.savedStyles) do + for index, _table in ipairs(Details.savedStyles) do tinsert(loadtable, {value = index, label = _table.name, onclick = function(_, _, index) - local compressedData = Details:CompressData(_detalhes.savedStyles[index], "print") + local compressedData = Details:CompressData(Details.savedStyles[index], "print") if (compressedData) then - _detalhes:ShowImportWindow(compressedData, nil, "Details! Export Skin") + Details:ShowImportWindow(compressedData, nil, "Details! Export Skin") else Details:Msg("failed to export skin.") --localize-me end @@ -944,9 +944,9 @@ do {--chat tab embed enabled type = "toggle", - get = function() return _detalhes.chat_tab_embed.enabled end, + get = function() return Details.chat_tab_embed.enabled end, set = function(self, fixedparam, value) - _detalhes.chat_embed:SetTabSettings(nil, value) + Details.chat_embed:SetTabSettings(nil, value) Details.options.SetCurrentInstanceAndRefresh(currentInstance) afterUpdate() end, @@ -956,9 +956,9 @@ do {--tab name type = "textentry", - get = function() return _detalhes.chat_tab_embed.tab_name or "" end, + get = function() return Details.chat_tab_embed.tab_name or "" end, func = function(self, _, text) - _detalhes.chat_embed:SetTabSettings(text) + Details.chat_embed:SetTabSettings(text) end, name = Loc ["STRING_OPTIONS_TABEMB_TABNAME"], desc = Loc ["STRING_OPTIONS_TABEMB_TABNAME_DESC"], @@ -966,9 +966,9 @@ do {--single window type = "toggle", - get = function() return _detalhes.chat_tab_embed.single_window end, + get = function() return Details.chat_tab_embed.single_window end, set = function(self, fixedparam, value) - _detalhes.chat_embed:SetTabSettings (nil, nil, value) + Details.chat_embed:SetTabSettings (nil, nil, value) Details.options.SetCurrentInstanceAndRefresh(currentInstance) afterUpdate() end, @@ -978,11 +978,11 @@ do {--chat tab width offset type = "range", - get = function() return tonumber(_detalhes.chat_tab_embed.x_offset) end, + get = function() return tonumber(Details.chat_tab_embed.x_offset) end, set = function(self, fixedparam, value) - _detalhes.chat_tab_embed.x_offset = value - if (_detalhes.chat_embed.enabled) then - _detalhes.chat_embed:DoEmbed() + Details.chat_tab_embed.x_offset = value + if (Details.chat_embed.enabled) then + Details.chat_embed:DoEmbed() end afterUpdate() end, @@ -995,11 +995,11 @@ do {--chat tab height offset type = "range", - get = function() return tonumber(_detalhes.chat_tab_embed.y_offset) end, + get = function() return tonumber(Details.chat_tab_embed.y_offset) end, set = function(self, fixedparam, value) - _detalhes.chat_tab_embed.y_offset = value - if (_detalhes.chat_embed.enabled) then - _detalhes.chat_embed:DoEmbed() + Details.chat_tab_embed.y_offset = value + if (Details.chat_embed.enabled) then + Details.chat_embed:DoEmbed() end afterUpdate() end, @@ -1056,7 +1056,7 @@ do --sort direction local set_bar_sorting = function(_, instance, value) editInstanceSetting(currentInstance, "bars_sort_direction", value) - _detalhes:RefreshMainWindow(-1, true) + Details:RefreshMainWindow(-1, true) afterUpdate() end @@ -1182,9 +1182,9 @@ do {--disable highlight type = "toggle", - get = function() return _detalhes.instances_disable_bar_highlight end, + get = function() return Details.instances_disable_bar_highlight end, set = function(self, fixedparam, value) - _detalhes.instances_disable_bar_highlight = value + Details.instances_disable_bar_highlight = value afterUpdate() end, name = Loc ["STRING_OPTIONS_DISABLE_BARHIGHLIGHT"], @@ -1515,7 +1515,7 @@ do set = function(self, fixedparam, value) editInstanceSetting(currentInstance, "use_multi_fontstrings", value) editInstanceSetting(currentInstance, "InstanceRefreshRows") - _detalhes:RefreshMainWindow(-1, true) + Details:RefreshMainWindow(-1, true) afterUpdate() end, name = Loc ["STRING_ENABLED"], @@ -1528,7 +1528,7 @@ do set = function(self, fixedparam, value) editInstanceSetting(currentInstance, "use_auto_align_multi_fontstrings", value) editInstanceSetting(currentInstance, "InstanceRefreshRows") - _detalhes:RefreshMainWindow(-1, true) + Details:RefreshMainWindow(-1, true) afterUpdate() end, name = Loc ["STRING_OPTIONS_ALIGNED_TEXT_COLUMNS_AUTOALIGN"], @@ -1970,7 +1970,7 @@ do editInstanceSetting(currentInstance, "SetBarTextSettings", nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, text) afterUpdate() end - _G.DetailsWindowOptionsBarTextEditor:Open (currentInstance.row_info.textL_custom_text, callback, _G.DetailsOptionsWindow, _detalhes.instance_defaults.row_info.textL_custom_text) + _G.DetailsWindowOptionsBarTextEditor:Open (currentInstance.row_info.textL_custom_text, callback, _G.DetailsOptionsWindow, Details.instance_defaults.row_info.textL_custom_text) end, icontexture = [[Interface\GLUES\LOGIN\Glues-CheckBox-Check]], --icontexcoords = {160/512, 179/512, 142/512, 162/512}, @@ -2103,7 +2103,7 @@ do editInstanceSetting(currentInstance, "SetBarTextSettings", nil, nil, nil, nil, nil, nil, nil, nil, text) afterUpdate() end - _G.DetailsWindowOptionsBarTextEditor:Open (currentInstance.row_info.textR_custom_text, callback, _G.DetailsOptionsWindow, _detalhes.instance_defaults.row_info.textL_custom_text) + _G.DetailsWindowOptionsBarTextEditor:Open (currentInstance.row_info.textR_custom_text, callback, _G.DetailsOptionsWindow, Details.instance_defaults.row_info.textL_custom_text) end, icontexture = [[Interface\GLUES\LOGIN\Glues-CheckBox-Check]], --icontexcoords = {160/512, 179/512, 142/512, 162/512}, @@ -2149,7 +2149,7 @@ do --menu text face local onSelectFont = function(_, _, fontName) - _detalhes.font_faces.menus = fontName + Details.font_faces.menus = fontName end local buildFontMenu = function() @@ -2276,7 +2276,7 @@ do type = "toggle", get = function() return currentInstance.disable_alldisplays_window end, set = function(self, fixedparam, value) - _detalhes.disable_alldisplays_window = value + Details.disable_alldisplays_window = value afterUpdate() end, name = Loc ["STRING_OPTIONS_DISABLE_ALLDISPLAYSWINDOW"], @@ -2494,9 +2494,9 @@ do {--disable reset button type = "toggle", - get = function() return _detalhes.disable_reset_button end, + get = function() return Details.disable_reset_button end, set = function(self, fixedparam, value) - _detalhes.disable_reset_button = value + Details.disable_reset_button = value afterUpdate() end, name = Loc ["STRING_OPTIONS_DISABLE_RESET"], @@ -2505,9 +2505,9 @@ do {--click to open menus type = "toggle", - get = function() return _detalhes.instances_menu_click_to_open end, + get = function() return Details.instances_menu_click_to_open end, set = function(self, fixedparam, value) - _detalhes.instances_menu_click_to_open = value + Details.instances_menu_click_to_open = value afterUpdate() end, name = Loc ["STRING_OPTIONS_CLICK_TO_OPEN_MENUS"], @@ -2721,20 +2721,20 @@ do local buildInstanceMenu = function() local instanceList = {} - for index = 1, math.min (#_detalhes.tabela_instancias, _detalhes.instances_amount) do - local instance = _detalhes.tabela_instancias[index] + for index = 1, math.min (#Details.tabela_instancias, Details.instances_amount) do + local instance = Details.tabela_instancias[index] --what the window is showing local atributo = instance.atributo local sub_atributo = instance.sub_atributo if (atributo == 5) then --custom - local CustomObject = _detalhes.custom [sub_atributo] + local CustomObject = Details.custom [sub_atributo] if (not CustomObject) then instance:ResetAttribute() atributo = instance.atributo sub_atributo = instance.sub_atributo - instanceList [#instanceList+1] = {value = index, label = "#".. index .. " " .. _detalhes.atributos.lista [atributo] .. " - " .. _detalhes.sub_atributos [atributo].lista [sub_atributo], onclick = onSelectInstance, icon = _detalhes.sub_atributos [atributo].icones[sub_atributo] [1], texcoord = _detalhes.sub_atributos [atributo].icones[sub_atributo] [2]} + instanceList [#instanceList+1] = {value = index, label = "#".. index .. " " .. Details.atributos.lista [atributo] .. " - " .. Details.sub_atributos [atributo].lista [sub_atributo], onclick = onSelectInstance, icon = Details.sub_atributos [atributo].icones[sub_atributo] [1], texcoord = Details.sub_atributos [atributo].icones[sub_atributo] [2]} else instanceList [#instanceList+1] = {value = index, label = "#".. index .. " " .. CustomObject.name, onclick = onSelectInstance, icon = CustomObject.icon} end @@ -2742,8 +2742,8 @@ do local modo = instance.modo if (modo == 1) then --solo plugin - atributo = _detalhes.SoloTables.Mode or 1 - local SoloInfo = _detalhes.SoloTables.Menu [atributo] + atributo = Details.SoloTables.Mode or 1 + local SoloInfo = Details.SoloTables.Menu [atributo] if (SoloInfo) then instanceList [#instanceList+1] = {value = index, label = "#".. index .. " " .. SoloInfo [1], onclick = onSelectInstance, icon = SoloInfo [2]} else @@ -2753,7 +2753,7 @@ do elseif (modo == 4) then --raid plugin local plugin_name = instance.current_raid_plugin or instance.last_raid_plugin if (plugin_name) then - local plugin_object = _detalhes:GetPlugin (plugin_name) + local plugin_object = Details:GetPlugin (plugin_name) if (plugin_object) then instanceList [#instanceList+1] = {value = index, label = "#".. index .. " " .. plugin_object.__name, onclick = onSelectInstance, icon = plugin_object.__icon} else @@ -2763,7 +2763,7 @@ do instanceList [#instanceList+1] = {value = index, label = "#".. index .. " unknown", onclick = onSelectInstance, icon = ""} end else - instanceList [#instanceList+1] = {value = index, label = "#".. index .. " " .. _detalhes.atributos.lista [atributo] .. " - " .. _detalhes.sub_atributos [atributo].lista [sub_atributo], onclick = onSelectInstance, icon = _detalhes.sub_atributos [atributo].icones[sub_atributo] [1], texcoord = _detalhes.sub_atributos [atributo].icones[sub_atributo] [2]} + instanceList [#instanceList+1] = {value = index, label = "#".. index .. " " .. Details.atributos.lista [atributo] .. " - " .. Details.sub_atributos [atributo].lista [sub_atributo], onclick = onSelectInstance, icon = Details.sub_atributos [atributo].icones[sub_atributo] [1], texcoord = Details.sub_atributos [atributo].icones[sub_atributo] [2]} end end end @@ -2893,9 +2893,9 @@ do {--disable grouping type = "toggle", - get = function() return _detalhes.disable_window_groups end, + get = function() return Details.disable_window_groups end, set = function(self, fixedparam, value) - _detalhes.disable_window_groups = value + Details.disable_window_groups = value afterUpdate() end, name = Loc ["STRING_OPTIONS_DISABLE_GROUPS"], @@ -2904,9 +2904,9 @@ do {--disable resize buttons type = "toggle", - get = function() return _detalhes.disable_lock_ungroup_buttons end, + get = function() return Details.disable_lock_ungroup_buttons end, set = function(self, fixedparam, value) - _detalhes.disable_lock_ungroup_buttons = value + Details.disable_lock_ungroup_buttons = value afterUpdate() end, name = Loc ["STRING_OPTIONS_DISABLE_LOCK_RESIZE"], @@ -2915,9 +2915,9 @@ do {--disable stretch button type = "toggle", - get = function() return _detalhes.disable_stretch_button end, + get = function() return Details.disable_stretch_button end, set = function(self, fixedparam, value) - _detalhes.disable_stretch_button = value + Details.disable_stretch_button = value afterUpdate() end, name = Loc ["STRING_OPTIONS_DISABLE_STRETCH_BUTTON"], @@ -2978,7 +2978,7 @@ do local selectedWindow = profileDropdown:GetValue() if (selectedWindow) then - _detalhes:DeleteInstance(selectedWindow) + Details:DeleteInstance(selectedWindow) ReloadUI() end end, @@ -3205,11 +3205,11 @@ do local anchor, index = unpack(micro_display) if (index == -1) then - return _detalhes.StatusBar:SetPlugin (currentInstance, -1, anchor) + return Details.StatusBar:SetPlugin (currentInstance, -1, anchor) end - local absolute_name = _detalhes.StatusBar.Plugins [index].real_name - _detalhes.StatusBar:SetPlugin (currentInstance, absolute_name, anchor) + local absolute_name = Details.StatusBar.Plugins [index].real_name + Details.StatusBar:SetPlugin (currentInstance, absolute_name, anchor) updateMicroFrames() -- in development afterUpdate() @@ -3218,21 +3218,21 @@ do --dropdown options local buildLeftMicroMenu = function() local options = {} - for index, _name_and_icon in ipairs(_detalhes.StatusBar.Menu) do + for index, _name_and_icon in ipairs(Details.StatusBar.Menu) do options [#options+1] = {value = {"left", index}, label = _name_and_icon [1], onclick = onMicroDisplaySelect, icon = _name_and_icon [2]} end return options end local buildCenterMicroMenu = function() local options = {} - for index, _name_and_icon in ipairs(_detalhes.StatusBar.Menu) do + for index, _name_and_icon in ipairs(Details.StatusBar.Menu) do options [#options+1] = {value = {"center", index}, label = _name_and_icon [1], onclick = onMicroDisplaySelect, icon = _name_and_icon [2]} end return options end local buildRightMicroMenu = function() local options = {} - for index, _name_and_icon in ipairs(_detalhes.StatusBar.Menu) do + for index, _name_and_icon in ipairs(Details.StatusBar.Menu) do options [#options+1] = {value = {"right", index}, label = _name_and_icon [1], onclick = onMicroDisplaySelect, icon = _name_and_icon [2]} end return options @@ -3257,9 +3257,9 @@ do 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") + Details.StatusBar:SetPlugin (currentInstance, currentInstance.StatusBar ["left"].real_name, "left") else - _detalhes.StatusBar:SetPlugin (currentInstance, -1, "left") + Details.StatusBar:SetPlugin (currentInstance, -1, "left") end if (currentInstance.StatusBar ["left"].options.isHidden) then self:GetNormalTexture():SetDesaturated(false) @@ -3282,9 +3282,9 @@ do 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") + Details.StatusBar:SetPlugin (currentInstance, currentInstance.StatusBar ["center"].real_name, "center") else - _detalhes.StatusBar:SetPlugin (currentInstance, -1, "center") + Details.StatusBar:SetPlugin (currentInstance, -1, "center") end if (currentInstance.StatusBar ["center"].options.isHidden) then @@ -3307,9 +3307,9 @@ do 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") + Details.StatusBar:SetPlugin (currentInstance, currentInstance.StatusBar ["right"].real_name, "right") else - _detalhes.StatusBar:SetPlugin (currentInstance, -1, "right") + Details.StatusBar:SetPlugin (currentInstance, -1, "right") end if (currentInstance.StatusBar ["right"].options.isHidden) then self:GetNormalTexture():SetDesaturated(false) @@ -3466,7 +3466,7 @@ do --toolbar plugins loop local i = 1 - local allplugins_toolbar = _detalhes.ToolBar.NameTable --where is store all plugins for the title bar + local allplugins_toolbar = Details.ToolBar.NameTable --where is store all plugins for the title bar --first loop and see which plugins isn't installed --then add a 'ghost' plugin so the player can download @@ -3514,8 +3514,8 @@ do DF:NewLabel(bframe, _, "$parentToolbarPluginsLabel3"..i, "toolbarPluginsLabel3"..i, pluginObject.__version) bframe ["toolbarPluginsLabel3"..i]:SetPoint("topleft", anchorFrame, "topleft", 290, y-4) - local plugin_stable = _detalhes:GetPluginSavedTable (absName) - local plugin = _detalhes:GetPlugin (absName) + local plugin_stable = Details:GetPluginSavedTable (absName) + local plugin = Details: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]) @@ -3525,9 +3525,9 @@ do plugin_stable.enabled = value plugin.__enabled = value if (value) then - _detalhes:SendEvent("PLUGIN_ENABLED", plugin) + Details:SendEvent("PLUGIN_ENABLED", plugin) else - _detalhes:SendEvent("PLUGIN_DISABLED", plugin) + Details:SendEvent("PLUGIN_DISABLED", plugin) end end @@ -3624,7 +3624,7 @@ do y = y - 30 local i = 1 - local allplugins_raid = _detalhes.RaidTables.NameTable + local allplugins_raid = Details.RaidTables.NameTable for absName, pluginObject in pairs(allplugins_raid) do local bframe = CreateFrame("frame", "OptionsPluginRaidBG", anchorFrame, "BackdropTemplate") @@ -3649,8 +3649,8 @@ do DF:NewLabel(bframe, _, "$parentRaidPluginsLabel3"..i, "raidPluginsLabel3"..i, pluginObject.__version) bframe ["raidPluginsLabel3"..i]:SetPoint("topleft", anchorFrame, "topleft", 290, y-4) - local plugin_stable = _detalhes:GetPluginSavedTable (absName) - local plugin = _detalhes:GetPlugin (absName) + local plugin_stable = Details:GetPluginSavedTable (absName) + local plugin = Details: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]) bframe ["raidPluginsSlider"..i].PluginName = absName @@ -3660,10 +3660,10 @@ do plugin_stable.enabled = value plugin.__enabled = value if (not value) then - for index, instancia in ipairs(_detalhes.tabela_instancias) do + for index, instancia in ipairs(Details.tabela_instancias) do if (instancia.modo == 4) then -- 4 = raid if (instancia:IsEnabled()) then - _detalhes:TrocaTabela(instancia, 0, 1, 1, nil, 2) + Details:TrocaTabela(instancia, 0, 1, 1, nil, 2) else instancia.modo = 2 -- group mode end @@ -3762,7 +3762,7 @@ do y = y - 30 local i = 1 - local allplugins_solo = _detalhes.SoloTables.NameTable + local allplugins_solo = Details.SoloTables.NameTable for absName, pluginObject in pairs(allplugins_solo) do local bframe = CreateFrame("frame", "OptionsPluginSoloBG", anchorFrame,"BackdropTemplate") @@ -3787,8 +3787,8 @@ do DF:NewLabel(bframe, _, "$parentSoloPluginsLabel3"..i, "soloPluginsLabel3"..i, pluginObject.__version) bframe ["soloPluginsLabel3"..i]:SetPoint("topleft", anchorFrame, "topleft", 290, y-4) - local plugin_stable = _detalhes:GetPluginSavedTable (absName) - local plugin = _detalhes:GetPlugin (absName) + local plugin_stable = Details:GetPluginSavedTable (absName) + local plugin = Details: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]) bframe ["soloPluginsSlider"..i].PluginName = absName @@ -3798,9 +3798,9 @@ do plugin_stable.enabled = value plugin.__enabled = value if (not value) then - for index, instancia in ipairs(_detalhes.tabela_instancias) do + for index, instancia in ipairs(Details.tabela_instancias) do if (instancia.modo == 1 and instancia.baseframe) then -- 1 = solo - _detalhes:TrocaTabela(instancia, 0, 1, 1, nil, 2) + Details:TrocaTabela(instancia, 0, 1, 1, nil, 2) end end end @@ -3837,26 +3837,26 @@ do --build profile menu for "always use this profile" feature local profile_selected_alwaysuse = function(_, instance, profile_name) - _detalhes.always_use_profile_name = profile_name + Details.always_use_profile_name = profile_name local unitname = UnitName ("player") - _detalhes.always_use_profile_exception [unitname] = nil + Details.always_use_profile_exception [unitname] = nil - _detalhes:ApplyProfile (profile_name) + Details:ApplyProfile (profile_name) - _detalhes:Msg(Loc ["STRING_OPTIONS_PROFILE_LOADED"], profile_name) + Details:Msg(Loc ["STRING_OPTIONS_PROFILE_LOADED"], profile_name) afterUpdate() end local buildProfileMenuForAlwaysUse = function() local menu = {} - for index, profile_name in ipairs(_detalhes:GetProfileList()) do + for index, profile_name in ipairs(Details:GetProfileList()) do menu [#menu+1] = {value = profile_name, label = profile_name, onclick = profile_selected_alwaysuse, icon = "Interface\\MINIMAP\\Vehicle-HammerGold-3"} end return menu end local selectProfile = function(_, _, profileName) - _detalhes:ApplyProfile(profileName) - _detalhes:Msg(Loc ["STRING_OPTIONS_PROFILE_LOADED"], profileName) + Details:ApplyProfile(profileName) + Details:Msg(Loc ["STRING_OPTIONS_PROFILE_LOADED"], profileName) --Details.options.SetCurrentInstanceAndRefresh(currentInstance) --afterUpdate() _G.DetailsOptionsWindow:Hide() @@ -3865,7 +3865,7 @@ do local buildProfileMenu = function(func) local menu = {} - for index, profileName in ipairs(_detalhes:GetProfileList()) do + for index, profileName in ipairs(Details:GetProfileList()) do menu [#menu+1] = {value = profileName, label = profileName, onclick = selectProfile, icon = "Interface\\MINIMAP\\Vehicle-HammerGold-3"} end return menu @@ -3873,8 +3873,8 @@ do local buildProfileMenuToDelete = function() local menu = {} - for index, profileName in ipairs(_detalhes:GetProfileList()) do - if (profileName ~= _detalhes:GetCurrentProfileName()) then + for index, profileName in ipairs(Details:GetProfileList()) do + if (profileName ~= Details:GetCurrentProfileName()) then menu [#menu+1] = {value = profileName, label = profileName, onclick = function()end, icon = [[Interface\Glues\LOGIN\Glues-CheckBox-Check]], color = {1, 1, 1}, iconcolor = {1, .9, .9, 0.8}} end end @@ -3886,7 +3886,7 @@ do {--select profile type = "select", - get = function() return _detalhes:GetCurrentProfileName() end, + get = function() return Details:GetCurrentProfileName() end, values = function() return buildProfileMenu() end, name = Loc ["STRING_OPTIONS_PROFILES_SELECT"], desc = Loc ["STRING_OPTIONS_PROFILES_SELECT"], @@ -3896,10 +3896,10 @@ do {--save size and positioning type = "toggle", - get = function() return _detalhes.profile_save_pos end, + get = function() return Details.profile_save_pos end, set = function(self, fixedparam, value) - _detalhes.profile_save_pos = value - _detalhes:SetProfileCProp (nil, "profile_save_pos", value) + Details.profile_save_pos = value + Details:SetProfileCProp (nil, "profile_save_pos", value) afterUpdate() end, name = Loc ["STRING_OPTIONS_PROFILE_POSSIZE"], @@ -3923,19 +3923,19 @@ do local profileName = profileNameString:GetText() if (profileName == "") then - return _detalhes:Msg(Loc ["STRING_OPTIONS_PROFILE_FIELDEMPTY"]) + return Details:Msg(Loc ["STRING_OPTIONS_PROFILE_FIELDEMPTY"]) end profileNameString:SetText("") profileNameString:ClearFocus() - local new_profile = _detalhes:CreateProfile(profileName) + local new_profile = Details:CreateProfile(profileName) if (new_profile) then - _detalhes:ApplyProfile(profileName) + Details:ApplyProfile(profileName) afterUpdate() Details.options.SetCurrentInstanceAndRefresh(currentInstance) else - return _detalhes:Msg(Loc ["STRING_OPTIONS_PROFILE_NOTCREATED"]) + return Details:Msg(Loc ["STRING_OPTIONS_PROFILE_NOTCREATED"]) end end, --icontexture = [[Interface\PetBattles\PetBattle-LockIcon]], @@ -3960,22 +3960,22 @@ do local profileName = profileDropdown:GetValue() if (profileName == "") then - return _detalhes:Msg(Loc ["STRING_OPTIONS_PROFILE_FIELDEMPTY"]) + return Details:Msg(Loc ["STRING_OPTIONS_PROFILE_FIELDEMPTY"]) end - if (#_detalhes:GetProfileList() == 1) then + if (#Details:GetProfileList() == 1) then return Details:Msg("There's only one profile.") end - if (profileName == _detalhes:GetCurrentProfileName()) then + if (profileName == Details:GetCurrentProfileName()) then return Details:Msg("Can't delete current profile.") end - _detalhes:EraseProfile(profileName) + Details:EraseProfile(profileName) Details.options.SetCurrentInstanceAndRefresh(currentInstance) afterUpdate() - _detalhes:Msg(Loc ["STRING_OPTIONS_PROFILE_REMOVEOKEY"]) + Details:Msg(Loc ["STRING_OPTIONS_PROFILE_REMOVEOKEY"]) end, name = Loc ["STRING_OPTIONS_PROFILES_ERASE"], }, @@ -3987,7 +3987,7 @@ do func = function(self) local str = Details:ExportCurrentProfile() if (str) then - _detalhes:ShowImportWindow (str, nil, "Details! Export Profile") + Details:ShowImportWindow (str, nil, "Details! Export Profile") end end, name = Loc["STRING_OPTIONS_EXPORT_PROFILE"], @@ -4034,31 +4034,31 @@ do {--use on all characters type = "toggle", - get = function() return _detalhes.always_use_profile end, + get = function() return Details.always_use_profile end, set = function(self, fixedparam, value) - _detalhes.always_use_profile = value + Details.always_use_profile = value if (value) then - _detalhes.always_use_profile = true - _detalhes.always_use_profile_name = sectionFrame.widget_list_by_type.dropdown[3]:GetValue() + Details.always_use_profile = true + Details.always_use_profile_name = sectionFrame.widget_list_by_type.dropdown[3]:GetValue() --enable the dropdown sectionFrame.widget_list_by_type.dropdown[3]:Enable() --set the dropdown value to the current profile selected - sectionFrame.widget_list_by_type.dropdown[3]:Select(_detalhes.always_use_profile_name) + sectionFrame.widget_list_by_type.dropdown[3]:Select(Details.always_use_profile_name) --remove this character from the exception list local unitname = UnitName ("player") - _detalhes.always_use_profile_exception [unitname] = nil + Details.always_use_profile_exception [unitname] = nil else - _detalhes.always_use_profile = false + Details.always_use_profile = false --disable the dropdown sectionFrame.widget_list_by_type.dropdown[3]:Disable() --remove this character from the exception list local unitname = UnitName ("player") - _detalhes.always_use_profile_exception [unitname] = nil + Details.always_use_profile_exception [unitname] = nil end afterUpdate() @@ -4069,7 +4069,7 @@ do {--select a profile to use on all characters type = "select", - get = function() return _detalhes.always_use_profile_name end, + get = function() return Details.always_use_profile_name end, values = function() return buildProfileMenuForAlwaysUse() end, name = "Select Profile", desc = Loc ["STRING_OPTIONS_PROFILE_GLOBAL"], @@ -4094,7 +4094,7 @@ do --button for anchor toggle local refreshToggleAnchor = function() local buttonToggleAnchor = sectionFrame.widget_list_by_type.button[1] - if (_detalhes.tooltip.anchored_to == 1) then + if (Details.tooltip.anchored_to == 1) then buttonToggleAnchor:Disable() else buttonToggleAnchor:Enable() @@ -4103,8 +4103,8 @@ do --text face local on_select_tooltip_font = function(self, _, fontName) - _detalhes.tooltip.fontface = fontName - _detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance) + Details.tooltip.fontface = fontName + Details:SendOptionsModifiedEvent (DetailsOptionsWindow.instance) end local buildTooltipFontOptions = function() @@ -4123,13 +4123,13 @@ do local iconsize = {14, 14} local onSelectTimeAbbreviation = function(_, _, abbreviationtype) - _detalhes.tooltip.abbreviation = abbreviationtype + Details.tooltip.abbreviation = abbreviationtype - _detalhes.atributo_damage:UpdateSelectedToKFunction() - _detalhes.atributo_heal:UpdateSelectedToKFunction() - _detalhes.atributo_energy:UpdateSelectedToKFunction() - _detalhes.atributo_misc:UpdateSelectedToKFunction() - _detalhes.atributo_custom:UpdateSelectedToKFunction() + Details.atributo_damage:UpdateSelectedToKFunction() + Details.atributo_heal:UpdateSelectedToKFunction() + Details.atributo_energy:UpdateSelectedToKFunction() + Details.atributo_misc:UpdateSelectedToKFunction() + Details.atributo_custom:UpdateSelectedToKFunction() afterUpdate() end @@ -4150,12 +4150,12 @@ do --maximize method local onSelectMaximize = function(_, _, maximizeType) - _detalhes.tooltip.maximize_method = maximizeType - _detalhes.atributo_damage:UpdateSelectedToKFunction() - _detalhes.atributo_heal:UpdateSelectedToKFunction() - _detalhes.atributo_energy:UpdateSelectedToKFunction() - _detalhes.atributo_misc:UpdateSelectedToKFunction() - _detalhes.atributo_custom:UpdateSelectedToKFunction() + Details.tooltip.maximize_method = maximizeType + Details.atributo_damage:UpdateSelectedToKFunction() + Details.atributo_heal:UpdateSelectedToKFunction() + Details.atributo_energy:UpdateSelectedToKFunction() + Details.atributo_misc:UpdateSelectedToKFunction() + Details.atributo_custom:UpdateSelectedToKFunction() afterUpdate() end @@ -4177,7 +4177,7 @@ do --tooltip side local onSelectAnchorPoint = function(_, _, selected_anchor) - _detalhes.tooltip.anchor_point = selected_anchor + Details.tooltip.anchor_point = selected_anchor afterUpdate() end @@ -4198,7 +4198,7 @@ do --tooltip relative side local onSelectAnchorRelative = function(_, _, selected_anchor) - _detalhes.tooltip.anchor_relative = selected_anchor + Details.tooltip.anchor_relative = selected_anchor afterUpdate() end @@ -4219,7 +4219,7 @@ do --anchor local onSelectAnchor = function(_, _, selected_anchor) - _detalhes.tooltip.anchored_to = selected_anchor + Details.tooltip.anchored_to = selected_anchor refreshToggleAnchor() afterUpdate() end @@ -4237,9 +4237,9 @@ do {--text shadow type = "toggle", - get = function() return _detalhes.tooltip.fontshadow end, + get = function() return Details.tooltip.fontshadow end, set = function(self, fixedparam, value) - _detalhes.tooltip.fontshadow = value + Details.tooltip.fontshadow = value afterUpdate() end, name = Loc ["STRING_OPTIONS_TEXT_LOUTILINE"], @@ -4248,9 +4248,9 @@ do {--text size type = "range", - get = function() return _detalhes.tooltip.fontsize end, + get = function() return Details.tooltip.fontsize end, set = function(self, fixedparam, value) - _detalhes.tooltip.fontsize = value + Details.tooltip.fontsize = value afterUpdate() end, min = 5, @@ -4262,7 +4262,7 @@ do {--text font type = "select", - get = function() return _detalhes.tooltip.fontface end, + get = function() return Details.tooltip.fontface end, values = function() return buildTooltipFontOptions() end, @@ -4277,11 +4277,11 @@ do {--text color left type = "color", get = function() - local r, g, b, a = unpack(_detalhes.tooltip.fontcolor) + local r, g, b, a = unpack(Details.tooltip.fontcolor) return {r, g, b, a} end, set = function(self, r, g, b, a) - local color = _detalhes.tooltip.fontcolor + local color = Details.tooltip.fontcolor color[1] = r color[2] = g color[3] = b @@ -4295,11 +4295,11 @@ do {--text color right type = "color", get = function() - local r, g, b, a = unpack(_detalhes.tooltip.fontcolor_right) + local r, g, b, a = unpack(Details.tooltip.fontcolor_right) return {r, g, b, a} end, set = function(self, r, g, b, a) - local color = _detalhes.tooltip.fontcolor_right + local color = Details.tooltip.fontcolor_right color[1] = r color[2] = g color[3] = b @@ -4313,11 +4313,11 @@ do {--text color header type = "color", get = function() - local r, g, b, a = unpack(_detalhes.tooltip.header_text_color) + local r, g, b, a = unpack(Details.tooltip.header_text_color) return {r, g, b, a} end, set = function(self, r, g, b, a) - local color = _detalhes.tooltip.header_text_color + local color = Details.tooltip.header_text_color color[1] = r color[2] = g color[3] = b @@ -4334,11 +4334,11 @@ do {--bar color type = "color", get = function() - local r, g, b, a = unpack(_detalhes.tooltip.bar_color) + local r, g, b, a = unpack(Details.tooltip.bar_color) return {r, g, b, a} end, set = function(self, r, g, b, a) - local color = _detalhes.tooltip.bar_color + local color = Details.tooltip.bar_color color[1] = r color[2] = g color[3] = b @@ -4352,11 +4352,11 @@ do {--background color type = "color", get = function() - local r, g, b, a = unpack(_detalhes.tooltip.background) + local r, g, b, a = unpack(Details.tooltip.background) return {r, g, b, a} end, set = function(self, r, g, b, a) - local color = _detalhes.tooltip.background + local color = Details.tooltip.background color[1] = r color[2] = g color[3] = b @@ -4370,11 +4370,11 @@ do {--divisor color type = "color", get = function() - local r, g, b, a = unpack(_detalhes.tooltip.divisor_color) + local r, g, b, a = unpack(Details.tooltip.divisor_color) return {r, g, b, a} end, set = function(self, r, g, b, a) - local color = _detalhes.tooltip.divisor_color + local color = Details.tooltip.divisor_color color[1] = r color[2] = g color[3] = b @@ -4389,9 +4389,9 @@ do {--show amount type = "toggle", - get = function() return _detalhes.tooltip.show_amount end, + get = function() return Details.tooltip.show_amount end, set = function(self, fixedparam, value) - _detalhes.tooltip.show_amount = value + Details.tooltip.show_amount = value afterUpdate() end, name = Loc ["STRING_OPTIONS_TOOLTIPS_SHOWAMT"], @@ -4400,7 +4400,7 @@ do {--number system type = "select", - get = function() return _detalhes.tooltip.abbreviation end, + get = function() return Details.tooltip.abbreviation end, values = function() return buildAbbreviationMenu() end, @@ -4410,7 +4410,7 @@ do {--maximize method type = "select", - get = function() return _detalhes.tooltip.maximize_method end, + get = function() return Details.tooltip.maximize_method end, values = function() return buildMaximizeMenu() end, @@ -4423,7 +4423,7 @@ do {--anchor type = "select", - get = function() return _detalhes.tooltip.anchored_to end, + get = function() return Details.tooltip.anchored_to end, values = function() return buildAnchorMenu() end, @@ -4446,7 +4446,7 @@ do {--tooltip anchor side type = "select", - get = function() return _detalhes.tooltip.anchor_point end, + get = function() return Details.tooltip.anchor_point end, values = function() return buildAnchorPointMenu() end, @@ -4456,7 +4456,7 @@ do {--tooltip anchor side type = "select", - get = function() return _detalhes.tooltip.anchor_relative end, + get = function() return Details.tooltip.anchor_relative end, values = function() return buildAnchorRelativeMenu() end, @@ -4466,9 +4466,9 @@ do {--anchor offset x type = "range", - get = function() return _detalhes.tooltip.anchor_offset[1] end, + get = function() return Details.tooltip.anchor_offset[1] end, set = function(self, fixedparam, value) - _detalhes.tooltip.anchor_offset[1] = value + Details.tooltip.anchor_offset[1] = value afterUpdate() end, min = -100, @@ -4480,9 +4480,9 @@ do {--anchor offset y type = "range", - get = function() return _detalhes.tooltip.anchor_offset[2] end, + get = function() return Details.tooltip.anchor_offset[2] end, set = function(self, fixedparam, value) - _detalhes.tooltip.anchor_offset[2] = value + Details.tooltip.anchor_offset[2] = value afterUpdate() end, min = -100, @@ -4510,7 +4510,7 @@ do local buildSection = function(sectionFrame) local onSelectMinimapAction = function(_, _, option) - _detalhes.minimap.onclick_what_todo = option + Details.minimap.onclick_what_todo = option afterUpdate() end local menu = { @@ -4523,8 +4523,8 @@ do end local onSelectTimeAbbreviation = function(_, _, abbreviationtype) - _detalhes.tooltip.abbreviation = abbreviationtype - _detalhes:BrokerTick() + Details.tooltip.abbreviation = abbreviationtype + Details:BrokerTick() afterUpdate() end local icon = [[Interface\COMMON\mini-hourglass]] @@ -4550,14 +4550,14 @@ do {--minimap icon enabled type = "toggle", - get = function() return not _detalhes.minimap.hide end, + get = function() return not Details.minimap.hide end, set = function(self, fixedparam, value) - _detalhes.minimap.hide = not value + Details.minimap.hide = not value local LDBIcon = LDB and LibStub("LibDBIcon-1.0", true) - LDBIcon:Refresh("Details", _detalhes.minimap) - if (_detalhes.minimap.hide) then + LDBIcon:Refresh("Details", Details.minimap) + if (Details.minimap.hide) then LDBIcon:Hide("Details") else LDBIcon:Show("Details") @@ -4571,7 +4571,7 @@ do {--minimap button on click type = "select", - get = function() return _detalhes.minimap.onclick_what_todo end, + get = function() return Details.minimap.onclick_what_todo end, values = function() return buildMiniMapButtonAction() end, @@ -4584,10 +4584,10 @@ do {--broker text type = "textentry", - get = function() return _detalhes.data_broker_text or "" end, + get = function() return Details.data_broker_text or "" end, func = function(self, _, text) local brokerText = text or "" - _detalhes:SetDataBrokerText (brokerText) + Details:SetDataBrokerText (brokerText) afterUpdate() end, name = Loc ["STRING_OPTIONS_DATABROKER_TEXT"], @@ -4597,7 +4597,7 @@ do {--open broker text editor type = "execute", func = function(self) - _detalhes:OpenBrokerTextEditor() + Details:OpenBrokerTextEditor() end, icontexture = [[Interface\HELPFRAME\OpenTicketIcon]], icontexcoords = {.1, .9, .1, .9}, @@ -4607,7 +4607,7 @@ do {--broker text format type = "select", - get = function() return _detalhes.minimap.text_format end, + get = function() return Details.minimap.text_format end, values = function() return buildAbbreviationMenu() end, @@ -4620,9 +4620,9 @@ do {--item level tracker enabled type = "toggle", - get = function() return _detalhes.ilevel:IsTrackerEnabled() end, + get = function() return Details.ilevel:IsTrackerEnabled() end, set = function(self, fixedparam, value) - _detalhes.ilevel:TrackItemLevel(value) + Details.ilevel:TrackItemLevel(value) afterUpdate() end, name = Loc ["STRING_ENABLED"], @@ -4634,9 +4634,9 @@ do {--enabled heal spell links type = "toggle", - get = function() return _detalhes.report_heal_links end, + get = function() return Details.report_heal_links end, set = function(self, fixedparam, value) - _detalhes.report_heal_links = value + Details.report_heal_links = value afterUpdate() end, name = Loc ["STRING_OPTIONS_REPORT_HEALLINKS"], @@ -4951,7 +4951,7 @@ do local path = "Interface\\" .. text editbox:ClearFocus() instance:InstanceWallpaper (path, "all", 0.50, {0, 1, 0, 1}, 256, 256, {1, 1, 1, 1}) - _detalhes:OpenOptionsWindow (instance) + Details: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) @@ -5090,7 +5090,7 @@ do {value = 0, label = "do not switch", color = {.7, .7, .7, 1}, onclick = Current_Switch_Func, icon = [[Interface\Glues\LOGIN\Glues-CheckBox-Check]]} } - local attributes = _detalhes.sub_atributos + local attributes = Details.sub_atributos local i = 1 for atributo, sub_atributo in ipairs(attributes) do @@ -5103,7 +5103,7 @@ do end end - for index, ptable in ipairs(_detalhes.RaidTables.Menu) do + for index, ptable in ipairs(Details.RaidTables.Menu) do tinsert(t, {value = i, label = ptable [1], onclick = Current_Switch_Func, icon = ptable [2]}) sectionFrame.lastSwitchList [i] = {"raid", ptable [4], i} i = i + 1 @@ -5204,7 +5204,7 @@ do local switchTable = currentInstance[switchName] if (switchTable) then if (switchTable[1] == "raid") then - local pluginObject = _detalhes:GetPlugin(switchTable[2]) + local pluginObject = Details:GetPlugin(switchTable[2]) if (pluginObject) then return pluginObject.__name else @@ -5231,7 +5231,7 @@ do Current_Switch_Func = onSelectAutoSwitchDamagerNoCombat return buildSwitchMenu() end, - name = _detalhes:AddRoleIcon("", "DAMAGER", 18), + name = Details:AddRoleIcon("", "DAMAGER", 18), }, {--HEALER role out of combat @@ -5243,7 +5243,7 @@ do Current_Switch_Func = onSelectAutoSwitchHealerNoCombat return buildSwitchMenu() end, - name = _detalhes:AddRoleIcon("", "HEALER", 18), + name = Details:AddRoleIcon("", "HEALER", 18), }, {--TANK role out of combat @@ -5255,7 +5255,7 @@ do Current_Switch_Func = onSelectAutoSwitchTankNoCombat return buildSwitchMenu() end, - name = _detalhes:AddRoleIcon("", "TANK", 18), + name = Details:AddRoleIcon("", "TANK", 18), }, {type = "blank"}, @@ -5270,7 +5270,7 @@ do Current_Switch_Func = onSelectAutoSwitchDamagerInCombat return buildSwitchMenu() end, - name = _detalhes:AddRoleIcon("", "DAMAGER", 18), + name = Details:AddRoleIcon("", "DAMAGER", 18), }, {--HEALER role in combat @@ -5282,7 +5282,7 @@ do Current_Switch_Func = onSelectAutoSwitchHealerInCombat return buildSwitchMenu() end, - name = _detalhes:AddRoleIcon("", "HEALER", 18), + name = Details:AddRoleIcon("", "HEALER", 18), }, {--TANK role in combat @@ -5294,7 +5294,7 @@ do Current_Switch_Func = onSelectAutoSwitchTankInCombat return buildSwitchMenu() end, - name = _detalhes:AddRoleIcon("", "TANK", 18), + name = Details:AddRoleIcon("", "TANK", 18), }, {type = "blank"}, @@ -5327,9 +5327,9 @@ do {--trash suppression type = "range", - get = function() return _detalhes.instances_suppress_trash end, + get = function() return Details.instances_suppress_trash end, set = function(self, fixedparam, value) - _detalhes:SetTrashSuppression(value) + Details:SetTrashSuppression(value) afterUpdate() end, min = 0, @@ -5538,7 +5538,7 @@ do --raid tools --on select channel for interrip announcer local on_select_channel = function(self, _, channel) - _detalhes.announce_interrupts.channel = channel + Details.announce_interrupts.channel = channel C_Timer.After(0, function() if (channel == "WHISPER") then sectionFrame.widget_list_by_type.textentry[1]:Enable() @@ -5561,7 +5561,7 @@ do --raid tools --on select channel for cooldown announcer local on_select_channel = function(self, _, channel) - _detalhes.announce_cooldowns.channel = channel + Details.announce_cooldowns.channel = channel afterUpdate() end @@ -5578,11 +5578,11 @@ do --raid tools --on select channel for report deaths local on_select_channel = function(self, _, channel) - _detalhes.announce_deaths.where = channel + Details.announce_deaths.where = channel afterUpdate() end - local officer = _detalhes.GetReportIconAndColor ("OFFICER") + local officer = Details.GetReportIconAndColor ("OFFICER") local channel_list = { {value = 1, icon = [[Interface\FriendsFrame\UI-Toast-ToastIcons]], iconcolor = {1, 0, 1}, iconsize = {14, 14}, texcoord = {0.53125, 0.7265625, 0.078125, 0.40625}, label = Loc ["STRING_OPTIONS_RT_DEATHS_WHERE1"], onclick = on_select_channel}, @@ -5633,9 +5633,9 @@ do --raid tools local on_switch_func = function(self, spellid, value) if (spellid) then if (not value) then - _detalhes.announce_cooldowns.ignored_cooldowns [spellid] = nil + Details.announce_cooldowns.ignored_cooldowns [spellid] = nil else - _detalhes.announce_cooldowns.ignored_cooldowns [spellid] = true + Details.announce_cooldowns.ignored_cooldowns [spellid] = true end end end @@ -5674,9 +5674,9 @@ do --raid tools end function f:Open() - local _GetSpellInfo = _detalhes.getspellinfo --details api + local _GetSpellInfo = Details.getspellinfo --details api - for index, spellid in ipairs(_detalhes:GetCooldownList()) do + for index, spellid in ipairs(Details:GetCooldownList()) do local name, _, icon = _GetSpellInfo(spellid) if (name) then local label = f.labels [index] or f:CreateLabel() @@ -5684,7 +5684,7 @@ do --raid tools label.text.text = name label.switch:SetFixedParameter(spellid) - label.switch:SetValue(_detalhes.announce_cooldowns.ignored_cooldowns[spellid]) + label.switch:SetValue(Details.announce_cooldowns.ignored_cooldowns[spellid]) label.icon:Show() label.text:Show() label.switch:Show() @@ -5705,9 +5705,9 @@ do --raid tools get = function() return Details.announce_interrupts.enabled end, set = function(self, fixedparam, value) if (value) then - _detalhes:EnableInterruptAnnouncer() + Details:EnableInterruptAnnouncer() else - _detalhes:DisableInterruptAnnouncer() + Details:DisableInterruptAnnouncer() end afterUpdate() end, @@ -5717,7 +5717,7 @@ do --raid tools {--channel to report type = "select", - get = function() return _detalhes.announce_interrupts.channel end, + get = function() return Details.announce_interrupts.channel end, values = function() return buildInterruptChannelMenu() end, @@ -5729,14 +5729,14 @@ do --raid tools type = "textentry", get = function() C_Timer.After(0, function() - if (_detalhes.announce_interrupts.channel ~= "WHISPER") then + if (Details.announce_interrupts.channel ~= "WHISPER") then sectionFrame.widget_list_by_type.textentry[1]:Disable() end end) - return _detalhes.announce_interrupts.whisper + return Details.announce_interrupts.whisper end, func = function(_, _, text) - _detalhes.announce_interrupts.whisper = text or "" + Details.announce_interrupts.whisper = text or "" afterUpdate() end, name = Loc ["STRING_OPTIONS_RT_INTERRUPTS_WHISPER"], @@ -5746,10 +5746,10 @@ do --raid tools {--next player to cut, whisper the person type = "textentry", get = function() - return _detalhes.announce_interrupts.next + return Details.announce_interrupts.next end, func = function(_, _, text) - _detalhes.announce_interrupts.next = text or "" + Details.announce_interrupts.next = text or "" afterUpdate() end, name = Loc ["STRING_OPTIONS_RT_INTERRUPTS_NEXT"], @@ -5759,10 +5759,10 @@ do --raid tools {--custom text field type = "textentry", get = function() - return _detalhes.announce_interrupts.custom + return Details.announce_interrupts.custom end, func = function(_, _, text) - _detalhes.announce_interrupts.custom = text or "" + Details.announce_interrupts.custom = text or "" afterUpdate() end, name = Loc ["STRING_OPTIONS_RT_INTERRUPTS_CUSTOM"], @@ -5772,10 +5772,10 @@ do --raid tools type = "execute", func = function(self) local text = sectionFrame.widget_list_by_type.textentry[3]:GetText() - local channel = _detalhes.announce_interrupts.channel - _detalhes.announce_interrupts.channel = "PRINT" - _detalhes:interrupt_announcer (nil, nil, nil, _detalhes.playername, nil, nil, "A Monster", nil, 1766, "Kick", nil, 106523, "Cataclysm", nil) - _detalhes.announce_interrupts.channel = channel + local channel = Details.announce_interrupts.channel + Details.announce_interrupts.channel = "PRINT" + Details:interrupt_announcer (nil, nil, nil, Details.playername, nil, nil, "A Monster", nil, 1766, "Kick", nil, 106523, "Cataclysm", nil) + Details.announce_interrupts.channel = channel end, icontexture = [[Interface\CHATFRAME\ChatFrameExpandArrow]], name = "Test", @@ -5787,12 +5787,12 @@ do --raid tools {--enable cooldown announcer type = "toggle", - get = function() return _detalhes.announce_cooldowns.enabled end, + get = function() return Details.announce_cooldowns.enabled end, set = function(self, fixedparam, value) if (value) then - _detalhes:EnableCooldownAnnouncer() + Details:EnableCooldownAnnouncer() else - _detalhes:DisableCooldownAnnouncer() + Details:DisableCooldownAnnouncer() end afterUpdate() end, @@ -5802,7 +5802,7 @@ do --raid tools {--channel to report type = "select", - get = function() return _detalhes.announce_cooldowns.channel end, + get = function() return Details.announce_cooldowns.channel end, values = function() return buildCooldownsChannelMenu() end, @@ -5813,10 +5813,10 @@ do --raid tools {--custom text field type = "textentry", get = function() - return _detalhes.announce_cooldowns.custom + return Details.announce_cooldowns.custom end, func = function(_, _, text) - _detalhes.announce_cooldowns.custom = text or "" + Details.announce_cooldowns.custom = text or "" afterUpdate() end, name = Loc ["STRING_OPTIONS_RT_COOLDOWNS_CUSTOM"], @@ -5827,10 +5827,10 @@ do --raid tools type = "execute", func = function(self) local text = sectionFrame.widget_list_by_type.textentry[4]:GetText() - local channel = _detalhes.announce_cooldowns.channel - _detalhes.announce_cooldowns.channel = "PRINT" - _detalhes:cooldown_announcer (nil, nil, nil, _detalhes.playername, nil, nil, "Tyrande Whisperwind", nil, 47788, "Guardian Spirit") - _detalhes.announce_cooldowns.channel = channel + local channel = Details.announce_cooldowns.channel + Details.announce_cooldowns.channel = "PRINT" + Details:cooldown_announcer (nil, nil, nil, Details.playername, nil, nil, "Tyrande Whisperwind", nil, 47788, "Guardian Spirit") + Details.announce_cooldowns.channel = channel end, icontexture = [[Interface\CHATFRAME\ChatFrameExpandArrow]], name = "Test", @@ -5853,12 +5853,12 @@ do --raid tools {--enable death announcer type = "toggle", - get = function() return _detalhes.announce_deaths.enabled end, + get = function() return Details.announce_deaths.enabled end, set = function(self, fixedparam, value) if (value) then - _detalhes:EnableDeathAnnouncer() + Details:EnableDeathAnnouncer() else - _detalhes:DisableDeathAnnouncer() + Details:DisableDeathAnnouncer() end afterUpdate() end, @@ -5868,9 +5868,9 @@ do --raid tools {--max hits to show type = "range", - get = function() return _detalhes.announce_deaths.last_hits end, + get = function() return Details.announce_deaths.last_hits end, set = function(self, fixedparam, value) - _detalhes.announce_deaths.last_hits = value + Details.announce_deaths.last_hits = value afterUpdate() end, min = 1, @@ -5882,9 +5882,9 @@ do --raid tools {--max hits to show type = "range", - get = function() return _detalhes.announce_deaths.only_first end, + get = function() return Details.announce_deaths.only_first end, set = function(self, fixedparam, value) - _detalhes.announce_deaths.only_first = value + Details.announce_deaths.only_first = value afterUpdate() end, min = 1, @@ -5896,7 +5896,7 @@ do --raid tools {--death report channel type = "select", - get = function() return _detalhes.announce_deaths.where end, + get = function() return Details.announce_deaths.where end, values = function() return buildDeathLogAnnouncerMenu() end, @@ -5909,9 +5909,9 @@ do --raid tools {--enable death recap type = "toggle", - get = function() return _detalhes.death_recap.enabled end, + get = function() return Details.death_recap.enabled end, set = function(self, fixedparam, value) - _detalhes.death_recap.enabled = value + Details.death_recap.enabled = value afterUpdate() end, name = Loc ["STRING_ENABLED"], @@ -5920,9 +5920,9 @@ do --raid tools {--relevance time type = "range", - get = function() return _detalhes.death_recap.relevance_time end, + get = function() return Details.death_recap.relevance_time end, set = function(self, fixedparam, value) - _detalhes.death_recap.relevance_time = value + Details.death_recap.relevance_time = value afterUpdate() end, min = 1, @@ -5934,9 +5934,9 @@ do --raid tools {--show life percent type = "toggle", - get = function() return _detalhes.death_recap.show_life_percent end, + get = function() return Details.death_recap.show_life_percent end, set = function(self, fixedparam, value) - _detalhes.death_recap.show_life_percent = value + Details.death_recap.show_life_percent = value afterUpdate() end, name = "Life Percent", --localize-me @@ -5945,9 +5945,9 @@ do --raid tools {--show segment list type = "toggle", - get = function() return _detalhes.death_recap.show_segments end, + get = function() return Details.death_recap.show_segments end, set = function(self, fixedparam, value) - _detalhes.death_recap.show_segments = value + Details.death_recap.show_segments = value afterUpdate() end, name = "Segment List", --localize-me @@ -5959,9 +5959,9 @@ do --raid tools {--show first hit type = "toggle", - get = function() return _detalhes.announce_firsthit.enabled end, + get = function() return Details.announce_firsthit.enabled end, set = function(self, fixedparam, value) - _detalhes.announce_firsthit.enabled = value + Details.announce_firsthit.enabled = value afterUpdate() end, name = Loc ["STRING_OPTIONS_RT_FIRST_HIT"], @@ -5970,9 +5970,9 @@ do --raid tools {--show death menu type = "toggle", - get = function() return _detalhes.on_death_menu end, + get = function() return Details.on_death_menu end, set = function(self, fixedparam, value) - _detalhes.on_death_menu = value + Details.on_death_menu = value afterUpdate() end, name = "Show Death Menu", --localize-me @@ -6193,9 +6193,9 @@ do {--no window alerts type = "toggle", - get = function() return _detalhes.streamer_config.no_alerts end, + get = function() return Details.streamer_config.no_alerts end, set = function(self, fixedparam, value) - _detalhes.streamer_config.no_alerts = value + Details.streamer_config.no_alerts = value afterUpdate() end, name = "Suppress Alerts", --localize-me @@ -6204,10 +6204,10 @@ do {--60hz updates type = "toggle", - get = function() return _detalhes.streamer_config.faster_updates end, + get = function() return Details.streamer_config.faster_updates end, set = function(self, fixedparam, value) - _detalhes.streamer_config.faster_updates = value - _detalhes:RefreshUpdater() + Details.streamer_config.faster_updates = value + Details:RefreshUpdater() afterUpdate() end, name = "60 Updates per Second", --localize-me @@ -6216,9 +6216,9 @@ do {--quick player info type = "toggle", - get = function() return _detalhes.streamer_config.quick_detection end, + get = function() return Details.streamer_config.quick_detection end, set = function(self, fixedparam, value) - _detalhes.streamer_config.quick_detection = value + Details.streamer_config.quick_detection = value afterUpdate() end, name = "Quick Player Info Detection", --localize-me @@ -6227,9 +6227,9 @@ do {--disable M+ shenanigans type = "toggle", - get = function() return _detalhes.streamer_config.disable_mythic_dungeon end, + get = function() return Details.streamer_config.disable_mythic_dungeon end, set = function(self, fixedparam, value) - _detalhes.streamer_config.disable_mythic_dungeon = value + Details.streamer_config.disable_mythic_dungeon = value afterUpdate() end, name = "Disable Mythic+ Stuff", --localize-me @@ -6238,9 +6238,9 @@ do {--disable M+ charts type = "toggle", - get = function() return _detalhes.mythic_plus.show_damage_graphic end, + get = function() return Details.mythic_plus.show_damage_graphic end, set = function(self, fixedparam, value) - _detalhes.mythic_plus.show_damage_graphic = value + Details.mythic_plus.show_damage_graphic = value afterUpdate() end, name = "Disable Mythic+ Chart", --localize-me @@ -6249,9 +6249,9 @@ do {--clear cache regurlary type = "toggle", - get = function() return _detalhes.mythic_plus.show_damage_graphic end, + get = function() return Details.mythic_plus.show_damage_graphic end, set = function(self, fixedparam, value) - _detalhes.mythic_plus.show_damage_graphic = value + Details.mythic_plus.show_damage_graphic = value afterUpdate() end, name = "Clear Cache Regularly", --localize-me @@ -6274,16 +6274,16 @@ do local buildSection = function(sectionFrame) local name_entry_func = function(index, text) - _detalhes:UserCustomSpellUpdate (index, text) + Details:UserCustomSpellUpdate (index, text) end local icon_func = function(index, icon) - _detalhes:UserCustomSpellUpdate (index, nil, icon) + Details:UserCustomSpellUpdate (index, nil, icon) end local remove_func = function(index) - _detalhes:UserCustomSpellRemove (index) + Details:UserCustomSpellRemove (index) end local reset_func = function(index) - _detalhes:UserCustomSpellReset (index) + Details:UserCustomSpellReset (index) end --custom spells panel @@ -6297,10 +6297,10 @@ do } local total_lines = function() - return #_detalhes.savedCustomSpells + return #Details.savedCustomSpells end local fill_row = function(index) - local data = _detalhes.savedCustomSpells [index] + local data = Details.savedCustomSpells [index] if (data) then return {index, data [2], data [3], data [1], ""} else @@ -6333,7 +6333,7 @@ do spellname_entry:SetText(spellname) addframe.spellIconButton.icon.texture = icon else - _detalhes:Msg(Loc ["STRING_OPTIONS_SPELL_NOTFOUND"]) + Details:Msg(Loc ["STRING_OPTIONS_SPELL_NOTFOUND"]) end end local spellid_entry = DF:NewSpellEntry (addframe, spellid_entry_func, 160, 20, nil, nil, "spellidEntry", "$parentSpellidEntry") @@ -6356,20 +6356,20 @@ do local addspell = function() local id = spellid_entry.text if (id == "") then - return _detalhes:Msg(Loc ["STRING_OPTIONS_SPELL_IDERROR"]) + return Details:Msg(Loc ["STRING_OPTIONS_SPELL_IDERROR"]) end local name = spellname_entry.text if (name == "") then - return _detalhes:Msg(Loc ["STRING_OPTIONS_SPELL_NAMEERROR"]) + return Details:Msg(Loc ["STRING_OPTIONS_SPELL_NAMEERROR"]) end local icon = addframe.spellIconButton.icon.texture id = tonumber(id) if (not id) then - return _detalhes:Msg(Loc ["STRING_OPTIONS_SPELL_IDERROR"]) + return Details:Msg(Loc ["STRING_OPTIONS_SPELL_IDERROR"]) end - _detalhes:UserCustomSpellAdd (id, name, icon) + Details:UserCustomSpellAdd (id, name, icon) panel:Refresh() @@ -6407,16 +6407,16 @@ do --consilidade spells DF:NewLabel(sectionFrame, _, "$parentConsolidadeSpellsLabel", "ConsolidadeSpellsLabel", Loc ["STRING_OPTIONSMENU_SPELLS_CONSOLIDATE"], "GameFontHighlightLeft") - DF:NewSwitch (sectionFrame, _, "$parentConsolidadeSpellsSwitch", "ConsolidadeSpellsSwitch", 60, 20, nil, nil, _detalhes.override_spellids, nil, nil, nil, nil, options_switch_template) + DF:NewSwitch (sectionFrame, _, "$parentConsolidadeSpellsSwitch", "ConsolidadeSpellsSwitch", 60, 20, nil, nil, Details.override_spellids, nil, nil, nil, nil, options_switch_template) sectionFrame.ConsolidadeSpellsLabel:SetPoint("left", sectionFrame.ConsolidadeSpellsSwitch, "right", 3) sectionFrame.ConsolidadeSpellsSwitch:SetAsCheckBox() sectionFrame.ConsolidadeSpellsSwitch.OnSwitch = function(self, instance, value) - _detalhes.override_spellids = value - _detalhes:UpdateParserGears() + Details.override_spellids = value + Details:UpdateParserGears() end sectionFrame.ConsolidadeSpellsSwitch:SetPoint(startX, startY - 20) - _detalhes:SetFontSize(sectionFrame.ConsolidadeSpellsLabel, 12) + Details:SetFontSize(sectionFrame.ConsolidadeSpellsLabel, 12) local sectionOptions = { @@ -6441,7 +6441,7 @@ do titulo_datacharts_desc.width = 350 --warning - if (not _detalhes:GetPlugin ("DETAILS_PLUGIN_CHART_VIEWER")) then + if (not Details:GetPlugin ("DETAILS_PLUGIN_CHART_VIEWER")) then local label = DF:NewLabel(sectionFrame, _, "$parentPluginWarningLabel", "PluginWarningLabel", Loc ["STRING_OPTIONS_CHART_PLUGINWARNING"], "GameFontNormal") local image = DF:NewImage(sectionFrame, [[Interface\DialogFrame\UI-Dialog-Icon-AlertNew]]) label:SetPoint("topright", sectionFrame, "topright", -42, -10) @@ -6453,7 +6453,7 @@ do --panel local edit_name = function(index, name) - _detalhes:TimeDataUpdate (index, name) + Details:TimeDataUpdate (index, name) sectionFrame.userTimeCaptureFillPanel:Refresh() end @@ -6469,7 +6469,7 @@ do local accept = function() big_code_editor:ClearFocus() if (not big_code_editor.is_export) then - _detalhes:TimeDataUpdate (big_code_editor.index, nil, big_code_editor:GetText()) + Details:TimeDataUpdate (big_code_editor.index, nil, big_code_editor:GetText()) end big_code_editor:Hide() end @@ -6491,12 +6491,12 @@ do cancel_changes:SetText(Loc ["STRING_OPTIONS_CHART_CANCEL"]) local edit_code = function(index) - local data = _detalhes.savedTimeCaptures [index] + local data = Details.savedTimeCaptures [index] if (data) then local func = data [2] if (type(func) == "function") then - return _detalhes:Msg(Loc ["STRING_OPTIONS_CHART_CODELOADED"]) + return Details:Msg(Loc ["STRING_OPTIONS_CHART_CODELOADED"]) end big_code_editor:SetText(func) @@ -6515,15 +6515,15 @@ do end local edit_icon = function(index, icon) - _detalhes:TimeDataUpdate (index, nil, nil, nil, nil, nil, icon) + Details:TimeDataUpdate (index, nil, nil, nil, nil, nil, icon) sectionFrame.userTimeCaptureFillPanel:Refresh() end local edit_author = function(index, author) - _detalhes:TimeDataUpdate (index, nil, nil, nil, author) + Details:TimeDataUpdate (index, nil, nil, nil, author) sectionFrame.userTimeCaptureFillPanel:Refresh() end local edit_version = function(index, version) - _detalhes:TimeDataUpdate (index, nil, nil, nil, nil, version) + Details:TimeDataUpdate (index, nil, nil, nil, nil, version) sectionFrame.userTimeCaptureFillPanel:Refresh() end @@ -6548,7 +6548,7 @@ do close_export:SetTemplate(options_button_template) local export_function = function(index) - local data = _detalhes.savedTimeCaptures [index] + local data = Details.savedTimeCaptures [index] if (data) then local encoded = Details:CompressData (data, "print") if (encoded) then @@ -6564,15 +6564,15 @@ do end local remove_capture = function(index) - _detalhes:TimeDataUnregister (index) + Details:TimeDataUnregister (index) sectionFrame.userTimeCaptureFillPanel:Refresh() end local edit_enabled = function(index, enabled, a, b) if (enabled) then - _detalhes:TimeDataUpdate (index, nil, nil, nil, nil, nil, nil, false) + Details:TimeDataUpdate (index, nil, nil, nil, nil, nil, nil, false) else - _detalhes:TimeDataUpdate (index, nil, nil, nil, nil, nil, nil, true) + Details:TimeDataUpdate (index, nil, nil, nil, nil, nil, nil, true) end sectionFrame.userTimeCaptureFillPanel:Refresh() @@ -6590,10 +6590,10 @@ do } local total_lines = function() - return #_detalhes.savedTimeCaptures + return #Details.savedTimeCaptures end local fill_row = function(index) - local data = _detalhes.savedTimeCaptures [index] + local data = Details.savedTimeCaptures [index] if (data) then local enabled_texture @@ -6716,21 +6716,21 @@ do if (type(unserialize) == "table") then if (unserialize[1] and unserialize[2] and unserialize[3] and unserialize[4] and unserialize[5]) then - local register = _detalhes:TimeDataRegister (unpack(unserialize)) + local register = Details:TimeDataRegister (unpack(unserialize)) if (type(register) == "string") then - _detalhes:Msg(register) + Details:Msg(register) end else - _detalhes:Msg(Loc ["STRING_OPTIONS_CHART_IMPORTERROR"]) + Details:Msg(Loc ["STRING_OPTIONS_CHART_IMPORTERROR"]) end else - _detalhes:Msg(Loc ["STRING_OPTIONS_CHART_IMPORTERROR"]) + Details:Msg(Loc ["STRING_OPTIONS_CHART_IMPORTERROR"]) end importframe:Hide() panel:Refresh() else - _detalhes:Msg(Loc ["STRING_CUSTOM_IMPORT_ERROR"]) + Details:Msg(Loc ["STRING_CUSTOM_IMPORT_ERROR"]) return end end @@ -6778,27 +6778,27 @@ do local addcapture = function() local name = capture_name_entry.text if (name == "") then - return _detalhes:Msg(Loc ["STRING_OPTIONS_CHART_NAMEERROR"]) + return Details:Msg(Loc ["STRING_OPTIONS_CHART_NAMEERROR"]) end local author = capture_author_entry.text if (author == "") then - return _detalhes:Msg(Loc ["STRING_OPTIONS_CHART_AUTHORERROR"]) + return Details:Msg(Loc ["STRING_OPTIONS_CHART_AUTHORERROR"]) end local icon = addframe.iconButton.iconTexture local version = capture_version_entry.text if (version == "") then - return _detalhes:Msg(Loc ["STRING_OPTIONS_CHART_VERSIONERROR"]) + return Details:Msg(Loc ["STRING_OPTIONS_CHART_VERSIONERROR"]) end local func = capture_func_entry:GetText() if (func == "") then - return _detalhes:Msg(Loc ["STRING_OPTIONS_CHART_FUNCERROR"]) + return Details:Msg(Loc ["STRING_OPTIONS_CHART_FUNCERROR"]) end - _detalhes:TimeDataRegister (name, func, nil, author, version, icon, true) + Details:TimeDataRegister (name, func, nil, author, version, icon, true) panel:Refresh() @@ -6938,7 +6938,7 @@ do local buildSection = function(sectionFrame) --deathlog limit local onSelectDeathLogLimit = function(_, _, limitAmount) - _detalhes:SetDeathLogLimit(limitAmount) + Details:SetDeathLogLimit(limitAmount) end local DeathLogLimitOptions = { {value = 16, label = "16 Records", onclick = onSelectDeathLogLimit, icon = [[Interface\WorldStateFrame\ColumnIcon-GraveyardDefend0]]}, @@ -6983,9 +6983,9 @@ do {--pvp frags type = "toggle", - get = function() return _detalhes.only_pvp_frags end, + get = function() return Details.only_pvp_frags end, set = function(self, fixedparam, value) - _detalhes.only_pvp_frags = value + Details.only_pvp_frags = value afterUpdate() end, name = Loc ["STRING_OPTIONS_PVPFRAGS"], @@ -6995,7 +6995,7 @@ do {--death log size type = "select", - get = function() return _detalhes.deadlog_events end, + get = function() return Details.deadlog_events end, values = function() return buildDeathLogLimitMenu() end, @@ -7005,9 +7005,9 @@ do {--death log min healing type = "range", - get = function() return _detalhes.deathlog_healingdone_min end, + get = function() return Details.deathlog_healingdone_min end, set = function(self, fixedparam, value) - _detalhes.deathlog_healingdone_min = value + Details.deathlog_healingdone_min = value afterUpdate() end, min = 0, @@ -7021,9 +7021,9 @@ do {type = "label", get = function() return "Damage Options:" end, text_template = subSectionTitleTextTemplate}, {--damage taken everything type = "toggle", - get = function() return _detalhes.damage_taken_everything end, + get = function() return Details.damage_taken_everything end, set = function(self, fixedparam, value) - _detalhes.damage_taken_everything = value + Details.damage_taken_everything = value afterUpdate() end, name = Loc ["STRING_OPTIONS_DTAKEN_EVERYTHING"], diff --git a/frames/window_playerbreakdown_auras.lua b/frames/window_playerbreakdown_auras.lua index c37e3377..204551f6 100644 --- a/frames/window_playerbreakdown_auras.lua +++ b/frames/window_playerbreakdown_auras.lua @@ -264,8 +264,8 @@ local iconTableAuras = { function Details:InitializeAurasTab() --check if the tab is already created - for i = 1, #_detalhes.player_details_tabs do - local tabButton = _detalhes.player_details_tabs[i] + for i = 1, #Details.player_details_tabs do + local tabButton = Details.player_details_tabs[i] if (tabButton.tabname == "Auras") then return end diff --git a/frames/window_playerbreakdown_compare.lua b/frames/window_playerbreakdown_compare.lua index 613ecfea..91cac3ac 100644 --- a/frames/window_playerbreakdown_compare.lua +++ b/frames/window_playerbreakdown_compare.lua @@ -1879,15 +1879,15 @@ local iconTableCompare = { function Details:InitializeCompareTab() --check if the tab is already created - for i = 1, #_detalhes.player_details_tabs do - local tabButton = _detalhes.player_details_tabs[i] + for i = 1, #Details.player_details_tabs do + local tabButton = Details.player_details_tabs[i] if (tabButton.tabname == "Compare" or tabButton.tabname == "New Compare") then return end end - for i = 1, #_detalhes.player_details_tabs do - local tabButton = _detalhes.player_details_tabs[i] + for i = 1, #Details.player_details_tabs do + local tabButton = Details.player_details_tabs[i] if (tabButton.replaces) then if (tabButton.replaces.bIsCompareTab) then return diff --git a/frames/window_playerbreakdown_spells.lua b/frames/window_playerbreakdown_spells.lua index bed64e01..d0185ffc 100644 --- a/frames/window_playerbreakdown_spells.lua +++ b/frames/window_playerbreakdown_spells.lua @@ -9,6 +9,7 @@ local wipe = wipe local GetCursorPosition = GetCursorPosition local CreateFrame = CreateFrame local GetSpellLink = GetSpellLink +local GetSpellInfo = GetSpellInfo local _GetSpellInfo = Details.GetSpellInfo local GameTooltip = GameTooltip local IsShiftKeyDown = IsShiftKeyDown @@ -311,6 +312,33 @@ function spellsTab.BuildHeaderTable(containerType) return headerTable end +---some values required by the header sort key is not available in the spellTable, so they need to be calculated +---@param combatObject combat +---@param spellData spelltable|spelltableadv +---@param key string +---@return any +local getValueForHeaderSortKey = function(combatObject, spellData, key) + if (key == "critpercent") then + return Details.SpellTableMixin.GetCritPercent(spellData) + + elseif (key == "casts") then + local spellName = GetSpellInfo(spellData.id) + local amountOfCasts = combatObject:GetSpellCastAmount(spellsTab.GetActor():Name(), spellName) + return amountOfCasts + + elseif (key == "castavg") then + local spellName = GetSpellInfo(spellData.id) + local amountOfCasts = combatObject:GetSpellCastAmount(spellsTab.GetActor():Name(), spellName) + return Details.SpellTableMixin.GetCastAverage(spellData, amountOfCasts) + + elseif (key == "uptime") then + return combatObject:GetSpellUptime(spellsTab.GetActor():Name(), spellData.id) + + elseif (key == "healabsorbed") then + return spellData.absorbed + end +end + ------------------------------------------------------------------------------------------------------------------------------------------------ --Bar Selection @@ -1075,7 +1103,8 @@ end ---@param bkTargetData breakdowntargettable ---@param totalValue number ---@param topValue number the amount done of the first target, used to calculate the length of the statusbar -local updateTargetBar = function(targetBar, index, combatObject, scrollFrame, headerTable, bkTargetData, totalValue, topValue) --~target ~update ~targetbar ~updatetargetbar +---@param sortKey string +local updateTargetBar = function(targetBar, index, combatObject, scrollFrame, headerTable, bkTargetData, totalValue, topValue, sortKey) --~target ~update ~targetbar ~updatetargetbar --scrollFrame is defined as a table which is false, scrollFrame is a frame local textIndex = 1 @@ -1097,7 +1126,7 @@ local updateTargetBar = function(targetBar, index, combatObject, scrollFrame, he --statusbar size by percent if (topValue > 0) then - targetBar.statusBar:SetValue(bkTargetData.statusBarValue / topValue * 100) + targetBar.statusBar:SetValue(bkTargetData[sortKey] / topValue * 100) else targetBar.statusBar:SetValue(0) end @@ -1173,7 +1202,7 @@ end ---@param totalLines number local refreshFuncTargets = function(scrollFrame, scrollData, offset, totalLines) --~refresh ~target ~refreshtargets ---@type number - local maxValue = scrollFrame.maxValue + local topValue = scrollFrame.topValue ---@type number local totalValue = scrollData.totalValue ---@type actor @@ -1188,6 +1217,7 @@ local refreshFuncTargets = function(scrollFrame, scrollData, offset, totalLines) ---@type number local mainAttribute = spellsTab.mainAttribute + local sortKey = scrollFrame.SortKey local headerTable = spellsTab.targetsHeaderData local lineIndex = 1 @@ -1204,7 +1234,7 @@ local refreshFuncTargets = function(scrollFrame, scrollData, offset, totalLines) do if (targetBar) then lineIndex = lineIndex + 1 - updateTargetBar(targetBar, index, combatObject, scrollFrame, headerTable, bkTargetData, totalValue, maxValue) + updateTargetBar(targetBar, index, combatObject, scrollFrame, headerTable, bkTargetData, totalValue, topValue, sortKey) end end @@ -1280,28 +1310,23 @@ function spellsTab.CreateTargetContainer(tabFrame) --~create ~target function targetScrollFrame:RefreshMe(data) --~refreshme (targets) ~refreshmetargets --get which column is currently selected and the sort order local columnIndex, order, key = targetScrollFrame.Header:GetSelectedColumn() + targetScrollFrame.SortKey = key ---@type string local keyToSort = key - for i = 1, #data do - ---@type spelltableadv - local bkSpellData = data[i] - bkSpellData.statusBarValue = bkSpellData[keyToSort] - end - if (order == "DESC") then table.sort(data, function(t1, t2) return t1[keyToSort] > t2[keyToSort] end) - targetScrollFrame.maxValue = data[1] and data[1][keyToSort] + targetScrollFrame.topValue = data[1] and data[1][keyToSort] else table.sort(data, function(t1, t2) return t1[keyToSort] < t2[keyToSort] end) - targetScrollFrame.maxValue = data[#data] and data[#data][keyToSort] + targetScrollFrame.topValue = data[#data] and data[#data][keyToSort] end if (key == "overheal") then @@ -1385,6 +1410,20 @@ local onClickExpandButton = function(expandButton, button) scrolFrame:Refresh() end +local formatPetName = function(petName, spellName, ownerName) + --petName is raw (with the owner name) + local petNameWithoutOwner = petName:gsub((" <.*"), "") + + local texture = [[Interface\AddOns\Details\images\classes_small]] + + local bUseAlphaIcons = true + local specIcon = false + local iconSize = 14 + petNameWithoutOwner = Details:AddClassOrSpecIcon(petNameWithoutOwner, "PET", specIcon, iconSize, bUseAlphaIcons) + + return spellName .. " |cFFCCBBBB" .. petNameWithoutOwner .. "|r" +end + ---update a line using the data passed ---@param spellBar breakdownspellbar ---@param index number spell position (from best to wrost) @@ -1393,11 +1432,12 @@ end ---@param scrollFrame table ---@param headerTable table ---@param bkSpellData spelltableadv ----@param bkSpellStableIndex number +---@param spellTableIndex number ---@param totalValue number ---@param topValue number ---@param bIsMainLine boolean if true this is the line which has all the values of the spell merged -local updateSpellBar = function(spellBar, index, actorName, combatObject, scrollFrame, headerTable, bkSpellData, bkSpellStableIndex, totalValue, topValue, bIsMainLine) +---@param sortKey string +local updateSpellBar = function(spellBar, index, actorName, combatObject, scrollFrame, headerTable, bkSpellData, spellTableIndex, totalValue, topValue, bIsMainLine, sortKey) --scrollFrame is defined as a table which is false, scrollFrame is a frame local textIndex = 1 @@ -1417,12 +1457,12 @@ local updateSpellBar = function(spellBar, index, actorName, combatObject, scroll spellTable = bkSpellData value = bkSpellData.total spellId = bkSpellData.id - petName = bkSpellData.petNames[bkSpellStableIndex] + petName = bkSpellData.petNames[spellTableIndex] else - spellTable = bkSpellData.spellTables[bkSpellStableIndex] + spellTable = bkSpellData.spellTables[spellTableIndex] value = spellTable.total spellId = spellTable.id - petName = bkSpellData.petNames[bkSpellStableIndex] + petName = bkSpellData.petNames[spellTableIndex] spellBar.bIsExpandedSpell = true end @@ -1444,8 +1484,16 @@ local updateSpellBar = function(spellBar, index, actorName, combatObject, scroll ---@type number local combatTime = combatObject:GetCombatTime() + --statusbar size by percent + if (topValue > 0) then + local barValue = spellTable[sortKey] or getValueForHeaderSortKey(combatObject, spellTable, sortKey) + spellBar.statusBar:SetValue(barValue / topValue * 100) + else + spellBar.statusBar:SetValue(0) + end + if (petName ~= "") then - spellName = spellName .. " (" .. petName .. ")" + spellName = formatPetName(petName, spellName, actorName) end spellBar.spellId = spellId @@ -1453,15 +1501,7 @@ local updateSpellBar = function(spellBar, index, actorName, combatObject, scroll spellBar.statusBar.backgroundTexture:SetAlpha(Details.breakdown_spell_tab.spellbar_background_alpha) - --statusbar size by percent - if (topValue > 0) then - spellBar.statusBar:SetValue(bkSpellData.statusBarValue / topValue * 100) - else - spellBar.statusBar:SetValue(0) - end - --statusbar color by school - --print("spell school:", spellTable.spellschool) --healing has the spellschool not filled, it's nil local r, g, b = Details:GetSpellSchoolColor(spellTable.spellschool or 1) spellBar.statusBar:SetStatusBarColor(r, g, b, 1) @@ -1579,7 +1619,6 @@ local updateSpellBar = function(spellBar, index, actorName, combatObject, scroll text:SetText(Details:Format(spellTable.absorbed or 0)) spellBar:AddFrameToHeaderAlignment(text) textIndex = textIndex + 1 - end end @@ -1619,7 +1658,7 @@ end ---@param totalLines number local refreshFunc = function(scrollFrame, scrollData, offset, totalLines) --~refreshspells ~refreshfunc ~refresh ---@type number - local maxValue = scrollFrame.maxValue + local topValue = scrollFrame.topValue ---@type number local totalValue = scrollData.totalValue ---@type actor @@ -1632,6 +1671,7 @@ local refreshFunc = function(scrollFrame, scrollData, offset, totalLines) --~ref ---@type instance local instanceObject = spellsTab.GetInstance() + local sortKey = scrollFrame.SortKey local headerTable = spellsTab.spellsHeaderData --todo: when swapping sort orders, close allexpanded spells @@ -1667,7 +1707,7 @@ local refreshFunc = function(scrollFrame, scrollData, offset, totalLines) --~ref if (mainSpellBar) then lineIndex = lineIndex + 1 local bIsMainLine = true - updateSpellBar(mainSpellBar, index, actorName, combatObject, scrollFrame, headerTable, bkSpellData, 1, totalValue, maxValue, bIsMainLine) + updateSpellBar(mainSpellBar, index, actorName, combatObject, scrollFrame, headerTable, bkSpellData, 1, totalValue, topValue, bIsMainLine, sortKey) end end @@ -1685,9 +1725,9 @@ local refreshFunc = function(scrollFrame, scrollData, offset, totalLines) --~ref local nameToUse = petName ~= "" and petName or actorName local bIsMainLine = false - - updateSpellBar(spellBar, index, nameToUse, combatObject, scrollFrame, headerTable, bkSpellData, spellTableIndex, totalValue, maxValue, bIsMainLine) + + updateSpellBar(spellBar, index, nameToUse, combatObject, scrollFrame, headerTable, bkSpellData, spellTableIndex, totalValue, topValue, bIsMainLine, sortKey) mainSpellBar.ExpandedChildren[#mainSpellBar.ExpandedChildren + 1] = spellBar end end @@ -1797,6 +1837,7 @@ function spellsTab.CreateSpellScrollContainer(tabFrame) --~scroll ~create function scrollFrame:RefreshMe(data) --~refreshme (spells) --get which column is currently selected and the sort order local columnIndex, order, key = scrollFrame.Header:GetSelectedColumn() + scrollFrame.SortKey = key ---@type string local keyToSort = key @@ -1806,29 +1847,14 @@ function spellsTab.CreateSpellScrollContainer(tabFrame) --~scroll ~create ---@type number, number local mainAttribute, subAttribute = spellsTab.GetInstance():GetDisplay() - --filling necessary information to sort the data in the order the header wants + --filling necessary information to sort the data by the selected header column for i = 1, #data do ---@type spelltableadv local bkSpellData = data[i] - - --crit percent - bkSpellData.critpercent = bkSpellData:GetCritPercent() - - --cast amount - bkSpellData.casts = bkSpellData:GetCastAmount(spellsTab.GetActor():Name(), combatObject) - - --cast avg - bkSpellData.castavg = bkSpellData:GetCastAverage(bkSpellData.casts) - - --uptime - local uptime = combatObject:GetSpellUptime(spellsTab:GetActor():Name(), bkSpellData.id) - bkSpellData.uptime = uptime - - if (mainAttribute == DETAILS_ATTRIBUTE_HEAL) then - bkSpellData.healabsorbed = bkSpellData.absorbed + if (not bkSpellData[keyToSort]) then + local value = getValueForHeaderSortKey(combatObject, bkSpellData, keyToSort) + bkSpellData[keyToSort] = value end - - bkSpellData.statusBarValue = bkSpellData[keyToSort] end if (order == "DESC") then @@ -1838,7 +1864,7 @@ function spellsTab.CreateSpellScrollContainer(tabFrame) --~scroll ~create function(t1, t2) return t1[keyToSort] > t2[keyToSort] end) - self.maxValue = data[1] and data[1][keyToSort] + self.topValue = data[1] and data[1][keyToSort] else table.sort(data, ---@param t1 spelltableadv @@ -1846,7 +1872,7 @@ function spellsTab.CreateSpellScrollContainer(tabFrame) --~scroll ~create function(t1, t2) return t1[keyToSort] < t2[keyToSort] end) - self.maxValue = data[#data] and data[#data][keyToSort] + self.topValue = data[#data] and data[#data][keyToSort] end self:SetData(data) @@ -1909,9 +1935,6 @@ local onEnterBreakdownTargetBar = function(targetBar) ---@type string @the name of the target local targetName = targetBar.actorName - ---@type number @amount done of the target, at this point the code doesn't know if it's damage, healing, etc - local totalValue = targetBar.bkTargetData.statusBarValue - Details:FormatCooltipForSpells() GameCooltip:SetOwner(targetBar, "bottom", "top", 4, -5) GameCooltip:SetOption("MinWidth", math.max(230, targetBar:GetWidth() * 0.98)) @@ -2328,18 +2351,18 @@ end function spellsTab.CreateReportButtons(tabFrame) --deprecated? --spell list report button - tabFrame.report_esquerda = Details.gump:NewDetailsButton(tabFrame, tabFrame, nil, _detalhes.Reportar, tabFrame, 1, 16, 16, "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", nil, "DetailsJanelaInfoReport2") + tabFrame.report_esquerda = Details.gump:NewDetailsButton(tabFrame, tabFrame, nil, Details.Reportar, tabFrame, 1, 16, 16, "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", nil, "DetailsJanelaInfoReport2") tabFrame.report_esquerda:SetPoint("bottomleft", spellsTab.GetSpellScrollFrame(), "TOPLEFT", 33, 3) tabFrame.report_esquerda:SetFrameLevel(tabFrame:GetFrameLevel()+2) tabFrame.topleft_report = tabFrame.report_esquerda --targets report button - tabFrame.report_alvos = Details.gump:NewDetailsButton(tabFrame, tabFrame, nil, _detalhes.Reportar, tabFrame, 3, 16, 16, "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", nil, "DetailsJanelaInfoReport3") + tabFrame.report_alvos = Details.gump:NewDetailsButton(tabFrame, tabFrame, nil, Details.Reportar, tabFrame, 3, 16, 16, "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", nil, "DetailsJanelaInfoReport3") tabFrame.report_alvos:SetPoint("bottomright", tabFrame.container_alvos, "TOPRIGHT", -2, -1) tabFrame.report_alvos:SetFrameLevel(3) --solved inactive problem --special barras in the right report button - tabFrame.report_direita = Details.gump:NewDetailsButton(tabFrame, tabFrame, nil, _detalhes.Reportar, tabFrame, 2, 16, 16, "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", nil, "DetailsJanelaInfoReport4") + tabFrame.report_direita = Details.gump:NewDetailsButton(tabFrame, tabFrame, nil, Details.Reportar, tabFrame, 2, 16, 16, "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", nil, "DetailsJanelaInfoReport4") tabFrame.report_direita:SetPoint("TOPRIGHT", tabFrame, "TOPRIGHT", -10, -70) tabFrame.report_direita:Show() end @@ -2354,12 +2377,12 @@ function spellsTab.monta_relatorio(botao) --deprecated? ---@type instance local instance = breakdownWindow.instancia ---@type number - local amt = _detalhes.report_lines + local amt = Details.report_lines local tabFrame = spellsTab.TabFrame if (not player) then - _detalhes:Msg("Player not found.") + Details:Msg("Player not found.") return end @@ -2373,7 +2396,7 @@ function spellsTab.monta_relatorio(botao) --deprecated? report_lines = {"Details!: " .. player.nome .. " " .. Loc ["STRING_ATTRIBUTE_DAMAGE_TAKEN"] .. ":"} else - report_lines = {"Details!: " .. player.nome .. " - " .. _detalhes.sub_atributos [mainSection].lista [subSection] .. ""} + report_lines = {"Details!: " .. player.nome .. " - " .. Details.sub_atributos [mainSection].lista [subSection] .. ""} end for index, barra in ipairs(tabFrame.barras1) do @@ -2404,7 +2427,7 @@ function spellsTab.monta_relatorio(botao) --deprecated? return end - report_lines = {"Details! " .. Loc ["STRING_ACTORFRAME_REPORTTARGETS"] .. " " .. _detalhes.sub_atributos [1].lista [1] .. " " .. Loc ["STRING_ACTORFRAME_REPORTOF"] .. " " .. player.nome} + report_lines = {"Details! " .. Loc ["STRING_ACTORFRAME_REPORTTARGETS"] .. " " .. Details.sub_atributos [1].lista [1] .. " " .. Loc ["STRING_ACTORFRAME_REPORTOF"] .. " " .. player.nome} for index, barra in ipairs(tabFrame.barras2) do if (barra:IsShown()) then @@ -2425,11 +2448,11 @@ function spellsTab.monta_relatorio(botao) --deprecated? local nome = _GetSpellInfo(player.detalhes) - report_lines = {"Details! " .. Loc ["STRING_ACTORFRAME_REPORTTO"] .. " " .. _detalhes.sub_atributos [mainSection].lista [subSection] .. " " .. Loc ["STRING_ACTORFRAME_REPORTOF"] .. " " .. player.nome, + report_lines = {"Details! " .. Loc ["STRING_ACTORFRAME_REPORTTO"] .. " " .. Details.sub_atributos [mainSection].lista [subSection] .. " " .. Loc ["STRING_ACTORFRAME_REPORTOF"] .. " " .. player.nome, Loc ["STRING_ACTORFRAME_SPELLDETAILS"] .. ": " .. nome} for i = 1, 5 do - local caixa = _detalhes.playerDetailWindow.grupos_detalhes[i] + local caixa = Details.playerDetailWindow.grupos_detalhes[i] if (caixa.bg:IsShown()) then local linha = "" @@ -2474,7 +2497,7 @@ function spellsTab.monta_relatorio(botao) --deprecated? --dano --damage tanken elseif ( (mainSection == 1 and subSection == 3) or mainSection == 3) then if (player.detalhes) then - report_lines = {"Details! " .. Loc ["STRING_ACTORFRAME_REPORTTO"] .. " " .. _detalhes.sub_atributos [1].lista [1] .. " " .. Loc ["STRING_ACTORFRAME_REPORTOF"] .. " " .. player.detalhes.. " " .. Loc ["STRING_ACTORFRAME_REPORTAT"] .. " " .. player.nome} + report_lines = {"Details! " .. Loc ["STRING_ACTORFRAME_REPORTTO"] .. " " .. Details.sub_atributos [1].lista [1] .. " " .. Loc ["STRING_ACTORFRAME_REPORTOF"] .. " " .. player.detalhes.. " " .. Loc ["STRING_ACTORFRAME_REPORTAT"] .. " " .. player.nome} for index, barra in ipairs(tabFrame.barras3) do if (barra:IsShown()) then report_lines [#report_lines+1] = barra.lineText1:GetText() .. " ....... " .. barra.lineText4:GetText() @@ -2506,10 +2529,10 @@ function spellsTab.monta_relatorio(botao) --deprecated? nome = "" end - report_lines = {"Details! " .. Loc ["STRING_ACTORFRAME_REPORTTO"] .. " " .. _detalhes.sub_atributos [mainSection].lista [subSection].. " " .. Loc ["STRING_ACTORFRAME_REPORTOF"] .. " " .. player.nome, + report_lines = {"Details! " .. Loc ["STRING_ACTORFRAME_REPORTTO"] .. " " .. Details.sub_atributos [mainSection].lista [subSection].. " " .. Loc ["STRING_ACTORFRAME_REPORTOF"] .. " " .. player.nome, Loc ["STRING_ACTORFRAME_SPELLDETAILS"] .. ": " .. nome} - local caixa = _detalhes.playerDetailWindow.grupos_detalhes[botao] + local caixa = Details.playerDetailWindow.grupos_detalhes[botao] local linha = "" local nome2 = caixa.nome2:GetText() --golpes diff --git a/frames/window_report.lua b/frames/window_report.lua index 627aaf2b..b1372696 100644 --- a/frames/window_report.lua +++ b/frames/window_report.lua @@ -1,7 +1,7 @@ local Loc = LibStub("AceLocale-3.0"):GetLocale("Details") -local Details = _G._detalhes +local Details = _G.Details local gump = Details.gump local _ diff --git a/frames/window_scrolldamage.lua b/frames/window_scrolldamage.lua index d1888d3c..259a55b7 100644 --- a/frames/window_scrolldamage.lua +++ b/frames/window_scrolldamage.lua @@ -73,7 +73,7 @@ function Details:ScrollDamage() DetailsScrollDamage.searchCache = {} local refreshFunc = function(self, data, offset, totalLines) --~refresh - local ToK = _detalhes:GetCurrentToKFunction() + local ToK = Details:GetCurrentToKFunction() for i = 1, totalLines do local index = i + offset diff --git a/frames/window_wa.lua b/frames/window_wa.lua index 1f837164..f8baf2f9 100644 --- a/frames/window_wa.lua +++ b/frames/window_wa.lua @@ -1,4 +1,4 @@ -local _detalhes = _G._detalhes +local _detalhes = _G.Details local L = LibStub("AceLocale-3.0"):GetLocale ( "Details" ) --default weaktable diff --git a/frames/window_welcome.lua b/frames/window_welcome.lua index 3e794e3e..0d04d4b6 100644 --- a/frames/window_welcome.lua +++ b/frames/window_welcome.lua @@ -1,4 +1,4 @@ -local _detalhes = _G._detalhes +local _detalhes = _G.Details local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" ) local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0") diff --git a/functions/api2.lua b/functions/api2.lua index 69814c85..146bf84f 100644 --- a/functions/api2.lua +++ b/functions/api2.lua @@ -15,11 +15,11 @@ local getCombatObject = function(segmentNumber) --select which segment to use, use low level variables for performance if (segmentNumber == -1) then - combatObject = _detalhes.tabela_overall + combatObject = Details.tabela_overall elseif (segmentNumber == 0) then - combatObject = _detalhes.tabela_vigente + combatObject = Details.tabela_vigente else - combatObject = _detalhes.tabela_historico.tabelas [segmentNumber] + combatObject = Details.tabela_historico.tabelas [segmentNumber] end return combatObject diff --git a/functions/attributes.lua b/functions/attributes.lua index 1e7c72b5..48a24b15 100644 --- a/functions/attributes.lua +++ b/functions/attributes.lua @@ -1,7 +1,7 @@ --[[ Attributes: Damage, Heal, Energy, Miscellaneous ]] do - local _detalhes = _G._detalhes + local _detalhes = _G.Details local addonName, Details222 = ... local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" ) diff --git a/functions/boss.lua b/functions/boss.lua index fef22725..fc144bfd 100644 --- a/functions/boss.lua +++ b/functions/boss.lua @@ -1,7 +1,7 @@ do - local _detalhes = _G._detalhes + local _detalhes = _G.Details local addonName, Details222 = ... _detalhes.EncounterInformation = {} local ipairs = ipairs --lua local diff --git a/functions/buff.lua b/functions/buff.lua index 3fe5895d..9fe52ab0 100644 --- a/functions/buff.lua +++ b/functions/buff.lua @@ -5,7 +5,7 @@ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - local _detalhes = _G._detalhes + local _detalhes = _G.Details local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" ) local _ local addonName, Details222 = ... diff --git a/functions/classes.lua b/functions/classes.lua index 93e906d9..48ee9f56 100644 --- a/functions/classes.lua +++ b/functions/classes.lua @@ -1,7 +1,7 @@ --[[ Declare all Details classes and container indexes ]] do - local _detalhes = _G._detalhes + local _detalhes = _G.Details local addonName, Details222 = ... local setmetatable = setmetatable -------- container que armazena o cache de pets diff --git a/functions/coach.lua b/functions/coach.lua index dd9701b5..89bd0fff 100644 --- a/functions/coach.lua +++ b/functions/coach.lua @@ -34,21 +34,21 @@ Details.Coach = { function Details.Coach.AskRLForCoachStatus() Details:SendRaidData(DETAILS_PREFIX_COACH, "CIEA") - if (_detalhes.debug) then + if (Details.debug) then Details:Msg("[|cFFAAFFAADetails! Coach|r] asked the coach the coach status.") end end function Details.Coach.SendRLCombatStartNotify(coachName) Details:SendCommMessage(_G.DETAILS_PREFIX_NETWORK, Details:Serialize(_G.DETAILS_PREFIX_COACH, UnitName("player"), GetRealmName(), Details.realversion, "CCS"), "WHISPER", coachName) - if (_detalhes.debug) then + if (Details.debug) then Details:Msg("[|cFFAAFFAADetails! Coach|r] sent to coach a combat start notification.") end end function Details.Coach.SendRLCombatEndNotify(coachName) Details:SendCommMessage(_G.DETAILS_PREFIX_NETWORK, Details:Serialize(_G.DETAILS_PREFIX_COACH, UnitName("player"), GetRealmName(), Details.realversion, "CCE"), "WHISPER", coachName) - if (_detalhes.debug) then + if (Details.debug) then Details:Msg("[|cFFAAFFAADetails! Coach|r] sent to coach a combat end notification.") end end @@ -56,7 +56,7 @@ end --the coach is no more a coach function Details.Coach.SendRaidCoachEndNotify() Details:SendRaidData(DETAILS_PREFIX_COACH, "CE") - if (_detalhes.debug) then + if (Details.debug) then Details:Msg("[|cFFAAFFAADetails! Coach|r] sent to raid a coach end notification.") end end @@ -64,7 +64,7 @@ end --there's a new coach, notify players function Details.Coach.SendRaidCoachStartNotify() Details:SendRaidData(DETAILS_PREFIX_COACH, "CS") - if (_detalhes.debug) then + if (Details.debug) then Details:Msg("[|cFFAAFFAADetails! Coach|r] sent to raid a coach start notification.") end end @@ -72,14 +72,14 @@ end --player send his death to the coach function Details.Coach.SendDeathToRL(deathTable) Details:SendRaidData(DETAILS_PREFIX_COACH, "CDD", deathTable) - if (_detalhes.debug) then + if (Details.debug) then Details:Msg("[|cFFAAFFAADetails! Coach|r] your death has been sent to coach.") end end --send data to coach function Details.Coach.Client.SendDataToRL() - if (_detalhes.debug) then + if (Details.debug) then print("Details Coach sending data to RL.") end @@ -110,7 +110,7 @@ function Details.Coach.StartUp() if (IsInRaid()) then if (isInRaidZone()) then --client ask in the raid if Coach is enabled - if (_detalhes.debug) then + if (Details.debug) then Details:Msg("[|cFFAAFFAADetails! Coach|r] sent ask to coach, is coach?") end Details.Coach.AskRLForCoachStatus() @@ -126,7 +126,7 @@ function Details.Coach.StartUp() if (IsInRaid()) then if (isInRaidZone()) then Details.Coach.AskRLForCoachStatus() - if (_detalhes.debug) then + if (Details.debug) then Details:Msg("[|cFFAAFFAADetails! Coach|r] sent to raid, is there a coach?") end end @@ -157,7 +157,7 @@ function Details.Coach.StartUp() if (UnitIsGroupAssistant("player")) then local coachName = Details.coach.last_coach_name if (coachName) then - if (_detalhes.debug) then + if (Details.debug) then Details:Msg("[|cFFAAFFAADetails! Coach|r] i'm a raid assistant, sent combat start notification to coach.") end Details.Coach.SendRLCombatStartNotify(coachName) @@ -180,7 +180,7 @@ function Details.Coach.StartUp() if (UnitIsGroupAssistant("player")) then local raidLeaderName = Details.Coach.Client.GetLeaderName() if (raidLeaderName) then - if (_detalhes.debug) then + if (Details.debug) then Details:Msg("[|cFFAAFFAADetails! Coach|r] i'm a raid assistant, sent combat end notification to coach.") end Details.Coach.SendRLCombatEndNotify(raidLeaderName) @@ -198,7 +198,7 @@ function Details.Coach.StartUp() if (isInRaidZone()) then --the coach entered a raid instance Details.Coach.Disable() - if (_detalhes.debug) then + if (Details.debug) then Details:Msg("[|cFFAAFFAADetails! Coach|r] Coach feature stopped: you entered in a raid instance.") end end @@ -209,7 +209,7 @@ function Details.Coach.StartUp() if (not Details.Coach.isInRaidZone and isInRaidZone()) then if (IsInRaid()) then if (not Details.Coach.Client.IsEnabled()) then - if (_detalhes.debug) then + if (Details.debug) then Details:Msg("[|cFFAAFFAADetails! Coach|r] sent in the raid, there's a coach?") end Details.Coach.AskRLForCoachStatus() @@ -244,7 +244,7 @@ end) --received an answer from server telling if the raidleader has the coach feature enabled --the request is made when the player enters a new group or reconnects function Details.Coach.Client.CoachIsEnabled_Response(isCoachEnabled, coachName) - if (_detalhes.debug) then + if (Details.debug) then Details:Msg("[|cFFAAFFAADetails! Coach|r] Coach sent response about the status of Coach Mode:", isCoachEnabled, raidLeaderName) end @@ -281,7 +281,7 @@ end --the player used '/details coach' or it's Details! initialization function Details.Coach.Server.EnableCoach(fromStartup) if (not IsInRaid()) then - if (_detalhes.debug) then + if (Details.debug) then Details:Msg("[|cFFAAFFAADetails! Coach|r] cannot enabled coach: not in raid.") end Details.coach.enabled = false @@ -290,7 +290,7 @@ function Details.Coach.Server.EnableCoach(fromStartup) return elseif (isInRaidZone()) then - if (_detalhes.debug) then + if (Details.debug) then Details:Msg("[|cFFAAFFAADetails! Coach|r] cannot enabled coach: you are inside a raid zone.") end Details.coach.enabled = false @@ -310,7 +310,7 @@ function Details.Coach.Server.EnableCoach(fromStartup) Details.Coach.EventFrame:RegisterEvent("GROUP_ROSTER_UPDATE") if (fromStartup) then - if (_detalhes.debug) then + if (Details.debug) then Details:Msg("[|cFFAAFFAADetails! Coach|r] coach feature enabled, welcome back captain!") end end @@ -327,7 +327,7 @@ end --a player in the raid asked to be the coach of the group function Details.Coach.Client.EnableCoach(coachName) if (not IsInRaid()) then - if (_detalhes.debug) then + if (Details.debug) then print("Details Coach can't enable coach on client: isn't in raid") end return @@ -340,7 +340,7 @@ function Details.Coach.Client.EnableCoach(coachName) --enable group roster to know if the coach has changed Details.Coach.EventFrame:RegisterEvent("GROUP_ROSTER_UPDATE") - if (_detalhes.debug) then + if (Details.debug) then Details:Msg("[|cFFAAFFAADetails! Coach|r] there's a new coach: ", coachName) end @@ -401,7 +401,7 @@ Details.Coach.EventFrame:SetScript("OnEvent", function(event, ...) for i = 1, GetNumGroupMembers() do local inRaid = UnitInRaid(Details.Coach.Client.coachName) if (not inRaid) then - if (_detalhes.debug) then + if (Details.debug) then Details:Msg("[|cFFAAFFAADetails! Coach|r] coach isn't in the raid, coach feature has been disabled.") end Details.Coach.Client.CoachEnd() diff --git a/functions/dungeon.lua b/functions/dungeon.lua index d38e2d7f..97206305 100644 --- a/functions/dungeon.lua +++ b/functions/dungeon.lua @@ -1,6 +1,6 @@ --local pointer to details object -local Details = _G._detalhes +local Details = _G.Details local debugmode = false --print debug lines local verbosemode = false --auto open the chart panel local _ @@ -220,7 +220,7 @@ function mythicDungeonCharts:OnStartMythicDungeon() --save the chart for development if (debugmode) then - _detalhes.mythic_plus.last_mythicrun_chart = mythicDungeonCharts.ChartTable + Details.mythic_plus.last_mythicrun_chart = mythicDungeonCharts.ChartTable end if (verbosemode) then @@ -251,8 +251,8 @@ function mythicDungeonCharts:OnEndMythicDungeon() mythicDungeonCharts:Debug("Dungeon ended successfully, chart data capture stopped, scheduling to open the window.") --the run is valid, schedule to open the chart window - _detalhes.mythic_plus.delay_to_show_graphic = 5 - C_Timer.After(_detalhes.mythic_plus.delay_to_show_graphic or 5, mythicDungeonCharts.ShowReadyPanel) + Details.mythic_plus.delay_to_show_graphic = 5 + C_Timer.After(Details.mythic_plus.delay_to_show_graphic or 5, mythicDungeonCharts.ShowReadyPanel) if (verbosemode) then mythicDungeonCharts:Debug("OnEndMythicDungeon() success!") @@ -275,7 +275,7 @@ mythicDungeonCharts:RegisterEvent("COMBAT_BOSS_DEFEATED", "OnBossDefeated") --show a small panel telling the chart is ready to show function mythicDungeonCharts.ShowReadyPanel() --check if is enabled - if (not _detalhes.mythic_plus.show_damage_graphic) then + if (not Details.mythic_plus.show_damage_graphic) then return end @@ -313,10 +313,10 @@ function mythicDungeonCharts.ShowReadyPanel() --disable feature check box (dont show this again) local on_switch_enable = function(self, _, value) - _detalhes.mythic_plus.show_damage_graphic = not value + Details.mythic_plus.show_damage_graphic = not value end - local notAgainSwitch, notAgainLabel = DetailsFramework:CreateSwitch(readyFrame, on_switch_enable, not _detalhes.mythic_plus.show_damage_graphic, _, _, _, _, _, _, _, _, _, Loc ["STRING_MINITUTORIAL_BOOKMARK4"], DetailsFramework:GetTemplate("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"), "GameFontHighlightLeft") + local notAgainSwitch, notAgainLabel = DetailsFramework:CreateSwitch(readyFrame, on_switch_enable, not Details.mythic_plus.show_damage_graphic, _, _, _, _, _, _, _, _, _, Loc ["STRING_MINITUTORIAL_BOOKMARK4"], DetailsFramework:GetTemplate("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"), "GameFontHighlightLeft") notAgainSwitch:ClearAllPoints() notAgainLabel:SetPoint("left", notAgainSwitch, "right", 2, 0) notAgainSwitch:SetPoint("bottomleft", readyFrame, "bottomleft", 5, 5) @@ -362,7 +362,7 @@ function mythicDungeonCharts.ShowChart() titlebar:SetBackdropBorderColor(0, 0, 0, 1) --title - local titleLabel = _detalhes.gump:NewLabel(titlebar, titlebar, nil, "titulo", "Plugins", "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255}) + local titleLabel = Details.gump:NewLabel(titlebar, titlebar, nil, "titulo", "Plugins", "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255}) titleLabel:SetPoint("center", titlebar , "center") titleLabel:SetPoint("top", titlebar , "top", 0, -5) dungeonChartFrame.TitleText = titleLabel @@ -377,7 +377,7 @@ function mythicDungeonCharts.ShowChart() titlebarMinimized:SetBackdropBorderColor(0, 0, 0, 1) --title - local titleLabelMinimized = _detalhes.gump:NewLabel(titlebarMinimized, titlebarMinimized, nil, "titulo", "Dungeon Run Chart", "GameFontHighlightLeft", 10, {227/255, 186/255, 4/255}) + local titleLabelMinimized = Details.gump:NewLabel(titlebarMinimized, titlebarMinimized, nil, "titulo", "Dungeon Run Chart", "GameFontHighlightLeft", 10, {227/255, 186/255, 4/255}) titleLabelMinimized:SetPoint("left", titlebarMinimized , "left", 4, 0) --titleLabelMinimized:SetPoint("top", titlebarMinimized , "top", 0, -5) dungeonChartFrame.TitleTextMinimized = titleLabelMinimized @@ -509,9 +509,9 @@ function mythicDungeonCharts.ShowChart() --enabled box -- /run _G.DetailsMythicDungeonChartHandler.ShowChart(); DetailsMythicDungeonChartFrame.ShowChartFrame() local on_switch_enable = function(_, _, state) - _detalhes.mythic_plus.show_damage_graphic = state + Details.mythic_plus.show_damage_graphic = state end - local enabledSwitch, enabledLabel = Details.gump:CreateSwitch(dungeonChartFrame, on_switch_enable, _detalhes.mythic_plus.show_damage_graphic, _, _, _, _, _, _, _, _, _, "Enabled", Details.gump:GetTemplate("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"), "GameFontHighlightLeft") + local enabledSwitch, enabledLabel = Details.gump:CreateSwitch(dungeonChartFrame, on_switch_enable, Details.mythic_plus.show_damage_graphic, _, _, _, _, _, _, _, _, _, "Enabled", Details.gump:GetTemplate("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"), "GameFontHighlightLeft") enabledSwitch:SetAsCheckBox() enabledSwitch.tooltip = "Show this chart at the end of a mythic dungeon run.\n\nIf disabled, you can reactivate it again at the options panel > streamer settings." enabledLabel:SetPoint("right", minimizeButton, "left", -22, 0) @@ -705,10 +705,10 @@ local PixelFrameOnEnter = function(self) GameCooltip2:Preset(2) GameCooltip2:SetOption("FixedWidth", 100) GameCooltip2:SetOption("TextSize", 10) - local onlyName = _detalhes:GetOnlyName(playerName) + local onlyName = Details:GetOnlyName(playerName) GameCooltip2:AddLine(onlyName) - local classIcon, L, R, B, T = _detalhes:GetClassIcon(mythicDungeonCharts.ChartTable.Players [playerName] and mythicDungeonCharts.ChartTable.Players [playerName].Class) + local classIcon, L, R, B, T = Details:GetClassIcon(mythicDungeonCharts.ChartTable.Players [playerName] and mythicDungeonCharts.ChartTable.Players [playerName].Class) GameCooltip2:AddIcon (classIcon, 1, 1, 16, 16, L, R, B, T) GameCooltip2:AddLine(Details:GetCurrentToKFunction()(nil, floor(dps))) diff --git a/functions/events.lua b/functions/events.lua index 4a492866..55bdd065 100644 --- a/functions/events.lua +++ b/functions/events.lua @@ -1,7 +1,7 @@ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - local _detalhes = _G._detalhes + local _detalhes = _G.Details local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" ) local _ local addonName, Details222 = ... diff --git a/functions/hooks.lua b/functions/hooks.lua index b92d83ee..f355f031 100644 --- a/functions/hooks.lua +++ b/functions/hooks.lua @@ -13,7 +13,7 @@ --[[global]] DETAILS_HOOK_BUFF = "HOOK_BUFF" --[[REMOVED--]] - local _detalhes = _G._detalhes + local _detalhes = _G.Details local _ local addonName, Details222 = ... diff --git a/functions/loaddata.lua b/functions/loaddata.lua index 93ed9b3b..ba946a62 100644 --- a/functions/loaddata.lua +++ b/functions/loaddata.lua @@ -1,7 +1,7 @@ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - local _detalhes = _G._detalhes + local _detalhes = _G.Details local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" ) local _ local addonName, Details222 = ... diff --git a/functions/mythicdungeon.lua b/functions/mythicdungeon.lua index 16edc786..b139feb4 100644 --- a/functions/mythicdungeon.lua +++ b/functions/mythicdungeon.lua @@ -94,7 +94,7 @@ function DetailsMythicPlusFrame.MergeSegmentsOnEnd() local thisCombat = segmentHistory[i] if (thisCombat and thisCombat.is_mythic_dungeon_run_id == Details.mythic_dungeon_id) then local canAddThisSegment = true - if (_detalhes.mythic_plus.make_overall_boss_only) then + if (Details.mythic_plus.make_overall_boss_only) then if (not thisCombat.is_boss) then canAddThisSegment = false end @@ -251,7 +251,7 @@ function DetailsMythicPlusFrame.MergeTrashCleanup (isFromSchedule) newCombat:SetDate (startDate, endDate) if (DetailsMythicPlusFrame.DevelopmentDebug) then - print("Details!", "MergeTrashCleanup() > finished merging trash segments.", _detalhes.tabela_vigente, _detalhes.tabela_vigente.is_boss) + print("Details!", "MergeTrashCleanup() > finished merging trash segments.", Details.tabela_vigente, Details.tabela_vigente.is_boss) end --delete all segments that were merged @@ -348,7 +348,7 @@ function DetailsMythicPlusFrame.MergeRemainingTrashAfterAllBossesDone() local segment = segmentHistory [i] if (segment == pastCombat) then --remove the segment - if (_detalhes.tabela_vigente == segment) then + if (Details.tabela_vigente == segment) then removedCurrentSegment = true end tremove(segmentHistory, i) @@ -364,9 +364,9 @@ function DetailsMythicPlusFrame.MergeRemainingTrashAfterAllBossesDone() if (removedCurrentSegment) then --find another current segment local segmentHistory = Details:GetCombatSegments() - _detalhes.tabela_vigente = segmentHistory [1] + Details.tabela_vigente = segmentHistory [1] - if (not _detalhes.tabela_vigente) then + if (not Details.tabela_vigente) then --assuming there's no segment from the dungeon run Details:EntrarEmCombate() Details:SairDoCombate() @@ -401,7 +401,7 @@ function DetailsMythicPlusFrame.BossDefeated(this_is_end_end, encounterID, encou local zoneName, instanceType, difficultyID, difficultyName, maxPlayers, dynamicDifficulty, isDynamic, instanceMapID, instanceGroupSize = GetInstanceInfo() --add the mythic dungeon info to the combat - _detalhes.tabela_vigente.is_mythic_dungeon = { + Details.tabela_vigente.is_mythic_dungeon = { StartedAt = Details.MythicPlus.StartedAt, --the start of the run EndedAt = time(), --when the boss got killed SegmentID = Details.MythicPlus.SegmentID, --segment number within the dungeon @@ -416,11 +416,11 @@ function DetailsMythicPlusFrame.BossDefeated(this_is_end_end, encounterID, encou } local mythicLevel = C_ChallengeMode.GetActiveKeystoneInfo() - local mPlusTable = _detalhes.tabela_vigente.is_mythic_dungeon + local mPlusTable = Details.tabela_vigente.is_mythic_dungeon Details222.MythicPlus.LogStep("BossDefeated | key level: | " .. mythicLevel .. " | " .. (mPlusTable.EncounterName or "") .. " | " .. (mPlusTable.ZoneName or "")) --check if need to merge the trash for this boss - if (_detalhes.mythic_plus.merge_boss_trash and not Details.MythicPlus.IsRestoredState) then + if (Details.mythic_plus.merge_boss_trash and not Details.MythicPlus.IsRestoredState) then --store on an table all segments which should be merged local segmentsToMerge = DetailsMythicPlusFrame.TrashMergeScheduled or {} @@ -451,7 +451,7 @@ function DetailsMythicPlusFrame.BossDefeated(this_is_end_end, encounterID, encou segmentsToMerge.PreviousBossKilledAt = Details.MythicPlus.PreviousBossKilledAt --reduce this boss encounter time from the trash lenght time, since the boss doesn't count towards the time spent cleaning trash - segmentsToMerge.LastBossKilledAt = time() - _detalhes.tabela_vigente:GetCombatTime() + segmentsToMerge.LastBossKilledAt = time() - Details.tabela_vigente:GetCombatTime() DetailsMythicPlusFrame.TrashMergeScheduled = segmentsToMerge @@ -482,7 +482,7 @@ function DetailsMythicPlusFrame.BossDefeated(this_is_end_end, encounterID, encou Details.MythicPlus.PreviousBossKilledAt = time() --update the saved table inside the profile - _detalhes:UpdateState_CurrentMythicDungeonRun (true, Details.MythicPlus.SegmentID, Details.MythicPlus.PreviousBossKilledAt) + Details:UpdateState_CurrentMythicDungeonRun (true, Details.MythicPlus.SegmentID, Details.MythicPlus.PreviousBossKilledAt) end end @@ -510,7 +510,7 @@ function DetailsMythicPlusFrame.MythicDungeonFinished (fromZoneLeft) local segmentsToMerge = {} --check if there is trash segments after the last boss. need to merge these segments with the trash segment of the last boss - local bCanMergeBossTrash = _detalhes.mythic_plus.merge_boss_trash + local bCanMergeBossTrash = Details.mythic_plus.merge_boss_trash Details222.MythicPlus.LogStep("MythicDungeonFinished() | merge_boss_trash = " .. (bCanMergeBossTrash and "true" or "false")) if (bCanMergeBossTrash and not Details.MythicPlus.IsRestoredState and not fromZoneLeft) then --is the current combat not a boss fight? @@ -594,7 +594,7 @@ function DetailsMythicPlusFrame.MythicDungeonFinished (fromZoneLeft) end --merge segments - if (_detalhes.mythic_plus.make_overall_when_done and not Details.MythicPlus.IsRestoredState and not fromZoneLeft) then + if (Details.mythic_plus.make_overall_when_done and not Details.MythicPlus.IsRestoredState and not fromZoneLeft) then --if (not InCombatLockdown() and not UnitAffectingCombat("player")) then if (DetailsMythicPlusFrame.DevelopmentDebug) then print("Details!", "MythicDungeonFinished() > not in combat, creating overall segment now") @@ -711,7 +711,7 @@ function DetailsMythicPlusFrame.OnChallengeModeStart() if (not Details.MythicPlus.Started and Details.MythicPlus.DungeonID == currentZoneID and Details.MythicPlus.Level == mythicLevel) then Details.MythicPlus.Started = true Details.MythicPlus.EndedAt = nil - _detalhes.mythic_dungeon_currentsaved.started = true + Details.mythic_dungeon_currentsaved.started = true DetailsMythicPlusFrame.IsDoingMythicDungeon = true --print("D! mythic dungeon was NOT already started! debug 2") @@ -735,7 +735,7 @@ function DetailsMythicPlusFrame.EventListener.OnDetailsEvent(contextObject, even elseif (event == "COMBAT_PLAYER_LEAVE") then --ignore the event if ignoring mythic dungeon special treatment - if (_detalhes.streamer_config.disable_mythic_dungeon) then + if (Details.streamer_config.disable_mythic_dungeon) then return end @@ -756,8 +756,8 @@ function DetailsMythicPlusFrame.EventListener.OnDetailsEvent(contextObject, even Details.tabela_vigente.is_mythic_dungeon_trash = { ZoneName = zoneName, MapID = instanceMapID, - Level = _detalhes.MythicPlus.Level, - EJID = _detalhes.MythicPlus.ejID, + Level = Details.MythicPlus.Level, + EJID = Details.MythicPlus.ejID, } Details222.MythicPlus.LogStep("COMBAT_PLAYER_LEAVE | wiped on boss | key level: | " .. mythicLevel .. " | " .. (encounterName or "") .. " " .. zoneName) @@ -770,7 +770,7 @@ function DetailsMythicPlusFrame.EventListener.OnDetailsEvent(contextObject, even elseif (event == "COMBAT_ENCOUNTER_START") then --ignore the event if ignoring mythic dungeon special treatment - if (_detalhes.streamer_config.disable_mythic_dungeon) then + if (Details.streamer_config.disable_mythic_dungeon) then Details222.MythicPlus.LogStep("COMBAT_ENCOUNTER_START | streamer_config.disable_mythic_dungeon is true and the code cannot continue.") return end @@ -780,7 +780,7 @@ function DetailsMythicPlusFrame.EventListener.OnDetailsEvent(contextObject, even elseif (event == "COMBAT_ENCOUNTER_END") then --ignore the event if ignoring mythic dungeon special treatment - if (_detalhes.streamer_config.disable_mythic_dungeon) then + if (Details.streamer_config.disable_mythic_dungeon) then Details222.MythicPlus.LogStep("COMBAT_ENCOUNTER_END | streamer_config.disable_mythic_dungeon is true and the code cannot continue.") return end @@ -789,9 +789,9 @@ function DetailsMythicPlusFrame.EventListener.OnDetailsEvent(contextObject, even --nothing elseif (event == "COMBAT_MYTHICDUNGEON_START") then - local lowerInstance = _detalhes:GetLowerInstanceNumber() + local lowerInstance = Details:GetLowerInstanceNumber() if (lowerInstance) then - lowerInstance = _detalhes:GetInstance(lowerInstance) + lowerInstance = Details:GetInstance(lowerInstance) if (lowerInstance) then C_Timer.After(3, function() if (lowerInstance:IsEnabled()) then @@ -803,13 +803,13 @@ function DetailsMythicPlusFrame.EventListener.OnDetailsEvent(contextObject, even end --ignore the event if ignoring mythic dungeon special treatment - if (_detalhes.streamer_config.disable_mythic_dungeon) then + if (Details.streamer_config.disable_mythic_dungeon) then return end --reset spec cache if broadcaster requested - if (_detalhes.streamer_config.reset_spec_cache) then - wipe (_detalhes.cached_specs) + if (Details.streamer_config.reset_spec_cache) then + wipe (Details.cached_specs) end C_Timer.After(0.5, DetailsMythicPlusFrame.OnChallengeModeStart) @@ -829,7 +829,7 @@ function DetailsMythicPlusFrame.EventListener.OnDetailsEvent(contextObject, even elseif (event == "COMBAT_MYTHICDUNGEON_END") then --ignore the event if ignoring mythic dungeon special treatment - if (_detalhes.streamer_config.disable_mythic_dungeon) then + if (Details.streamer_config.disable_mythic_dungeon) then Details222.MythicPlus.LogStep("COMBAT_MYTHICDUNGEON_END | streamer_config.disable_mythic_dungeon is true and the code cannot continue.") return end @@ -852,7 +852,7 @@ DetailsMythicPlusFrame:SetScript("OnEvent", function(_, event, ...) end --ignore the event if ignoring mythic dungeon special treatment - if (_detalhes.streamer_config.disable_mythic_dungeon) then + if (Details.streamer_config.disable_mythic_dungeon) then Details222.MythicPlus.LogStep("ZONE_CHANGED_NEW_AREA | streamer_config.disable_mythic_dungeon is true and the code cannot continue.") return end @@ -866,7 +866,7 @@ DetailsMythicPlusFrame:SetScript("OnEvent", function(_, event, ...) Details222.MythicPlus.LogStep("ZONE_CHANGED_NEW_AREA | player has left the dungeon and Details! finished the dungeon because of that.") --send mythic dungeon end event - _detalhes:SendEvent("COMBAT_MYTHICDUNGEON_END") + Details:SendEvent("COMBAT_MYTHICDUNGEON_END") --finish the segment DetailsMythicPlusFrame.BossDefeated(true) diff --git a/functions/playerclass.lua b/functions/playerclass.lua index eed84194..e0abe347 100644 --- a/functions/playerclass.lua +++ b/functions/playerclass.lua @@ -2,7 +2,7 @@ do - local _detalhes = _G._detalhes + local Details = _G.Details local _ local addonName, Details222 = ... local pairs = pairs @@ -16,7 +16,7 @@ do return [[Interface\AddOns\Details\images\classes_small]], unpack(unknown_class_coords) end - function _detalhes:GetIconTexture (iconType, withAlpha) + function Details:GetIconTexture (iconType, withAlpha) iconType = string.lower(iconType) if (iconType == "spec") then @@ -36,17 +36,17 @@ do end -- try get the class from actor name - function _detalhes:GetClass(name) + function Details:GetClass(name) local _, class = UnitClass (name) if (not class) then - for index, container in ipairs(_detalhes.tabela_overall) do + for index, container in ipairs(Details.tabela_overall) do local index = container._NameIndexTable [name] if (index) then local actor = container._ActorTable [index] if (actor.classe ~= "UNGROUPPLAYER") then - local left, right, top, bottom = unpack(_detalhes.class_coords [actor.classe] or unknown_class_coords) - local r, g, b = unpack(_detalhes.class_colors [actor.classe]) + local left, right, top, bottom = unpack(Details.class_coords [actor.classe] or unknown_class_coords) + local r, g, b = unpack(Details.class_colors [actor.classe]) return actor.classe, left, right, top, bottom, r or 1, g or 1, b or 1 end end @@ -54,8 +54,8 @@ do return "UNKNOW", 0.75, 1, 0.75, 1, 1, 1, 1, 1 else - local left, right, top, bottom = unpack(_detalhes.class_coords [class]) - local r, g, b = unpack(_detalhes.class_colors [class]) + local left, right, top, bottom = unpack(Details.class_coords [class]) + local r, g, b = unpack(Details.class_colors [class]) return class, left, right, top, bottom, r or 1, g or 1, b or 1 end end @@ -68,11 +68,11 @@ do TANK = {373/512, 420/512, 381/512, 427/512}, NONE = {0, 50/512, 110/512, 150/512}, } - function _detalhes:GetRoleIcon (role) + function Details:GetRoleIcon (role) return [[Interface\AddOns\Details\images\icons2]], unpack(roles [role]) end - function _detalhes:GetClassIcon(class) + function Details:GetClassIcon(class) if (self.classe) then class = self.classe elseif (type(class) == "table" and class.classe) then @@ -93,34 +93,34 @@ do return [[Interface\AddOns\Details\images\classes_small]], 0.25, 0.49609375, 0.75, 1 else - return [[Interface\AddOns\Details\images\classes_small]], unpack(_detalhes.class_coords[class]) + return [[Interface\AddOns\Details\images\classes_small]], unpack(Details.class_coords[class]) end end - function _detalhes:GetSpecIcon(spec, useAlpha) + function Details:GetSpecIcon(spec, useAlpha) if (spec) then if (spec == 0) then - return [[Interface\AddOns\Details\images\classes_small]], unpack(_detalhes.class_coords["UNKNOW"]) + return [[Interface\AddOns\Details\images\classes_small]], unpack(Details.class_coords["UNKNOW"]) end if (useAlpha) then - return [[Interface\AddOns\Details\images\spec_icons_normal_alpha]], unpack(_detalhes.class_specs_coords [spec]) + return [[Interface\AddOns\Details\images\spec_icons_normal_alpha]], unpack(Details.class_specs_coords [spec]) else - return [[Interface\AddOns\Details\images\spec_icons_normal]], unpack(_detalhes.class_specs_coords [spec]) + return [[Interface\AddOns\Details\images\spec_icons_normal]], unpack(Details.class_specs_coords [spec]) end end end local default_color = {1, 1, 1, 1} - function _detalhes:GetClassColor (class) + function Details:GetClassColor (class) if (self.classe) then - return unpack(_detalhes.class_colors [self.classe] or default_color) + return unpack(Details.class_colors [self.classe] or default_color) elseif (type(class) == "table" and class.classe) then - return unpack(_detalhes.class_colors [class.classe] or default_color) + return unpack(Details.class_colors [class.classe] or default_color) elseif (type(class) == "string") then - return unpack(_detalhes.class_colors [class] or default_color) + return unpack(Details.class_colors [class] or default_color) elseif (self.color) then return unpack(self.color) @@ -129,8 +129,8 @@ do end end - function _detalhes:GetPlayerIcon (playerName, segment) - segment = segment or _detalhes.tabela_vigente + function Details:GetPlayerIcon (playerName, segment) + segment = segment or Details.tabela_vigente local texture local L, R, T, B @@ -144,20 +144,20 @@ do local spec = playerObject.spec if (spec) then texture = [[Interface\AddOns\Details\images\spec_icons_normal]] - L, R, T, B = unpack(_detalhes.class_specs_coords [spec]) + L, R, T, B = unpack(Details.class_specs_coords [spec]) else texture = [[Interface\AddOns\Details\images\classes_small]] - L, R, T, B = unpack(_detalhes.class_coords [playerObject.classe or "UNKNOW"]) + L, R, T, B = unpack(Details.class_coords [playerObject.classe or "UNKNOW"]) end else texture = [[Interface\AddOns\Details\images\classes_small]] - L, R, T, B = unpack(_detalhes.class_coords ["UNKNOW"]) + L, R, T, B = unpack(Details.class_coords ["UNKNOW"]) end return texture, L, R, T, B end - function _detalhes:GuessClass (t) + function Details:GuessClass (t) local Actor, container, tries = t[1], t[2], t[3] @@ -167,7 +167,7 @@ do if (Actor.spells) then --correcao pros containers misc, precisa pegar os diferentes tipos de containers de l� for spellid, _ in pairs(Actor.spells._ActorTable) do - local class = _detalhes.ClassSpellList [spellid] + local class = Details.ClassSpellList [spellid] if (class) then Actor.classe = class Actor.guessing_class = nil @@ -178,7 +178,7 @@ do if (Actor.minha_barra and type(Actor.minha_barra) == "table") then Actor.minha_barra.minha_tabela = nil - _detalhes:ScheduleWindowUpdate (2, true) + Details:ScheduleWindowUpdate (2, true) end return class @@ -187,18 +187,18 @@ do end if (not Actor.nome) then - if (not _detalhes.NoActorNameWarning) then + if (not Details.NoActorNameWarning) then print("==============") - _detalhes:Msg("Unhandled Exception: Actor has no name, ContainerID: ", container.tipo) - _detalhes:Msg("After the current combat, reset data and use /reload.") - _detalhes:Msg("Report this issue to the Author: Actor with no name, container: ", container.tipo) + Details:Msg("Unhandled Exception: Actor has no name, ContainerID: ", container.tipo) + Details:Msg("After the current combat, reset data and use /reload.") + Details:Msg("Report this issue to the Author: Actor with no name, container: ", container.tipo) print("==============") - _detalhes.NoActorNameWarning = true + Details.NoActorNameWarning = true end return end - local class = _detalhes:GetClass(Actor.nome) + local class = Details:GetClass(Actor.nome) if (class and class ~= "UNKNOW") then Actor.classe = class Actor.need_refresh = true @@ -210,7 +210,7 @@ do if (Actor.minha_barra and type(Actor.minha_barra) == "table") then Actor.minha_barra.minha_tabela = nil - _detalhes:ScheduleWindowUpdate (2, true) + Details:ScheduleWindowUpdate (2, true) end return class @@ -219,7 +219,7 @@ do if (tries and tries < 10) then t[3] = tries + 1 --thanks @Farmbuyer on curseforge --_detalhes:ScheduleTimer("GuessClass", 2, {Actor, container, tries+1}) - _detalhes:ScheduleTimer("GuessClass", 2, t) --passing the same table instead of creating a new one + Details:ScheduleTimer("GuessClass", 2, t) --passing the same table instead of creating a new one end return false @@ -227,22 +227,22 @@ do -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - function _detalhes:GetSpecByGUID (unitSerial) - return _detalhes.cached_specs [unitSerial] + function Details:GetSpecByGUID (unitSerial) + return Details.cached_specs [unitSerial] end -- try get the spec from actor name - function _detalhes:GetSpec (name) + function Details:GetSpec (name) local guid = UnitGUID(name) if (guid) then - local spec = _detalhes.cached_specs [guid] + local spec = Details.cached_specs [guid] if (spec) then return spec end end - for index, container in ipairs(_detalhes.tabela_overall) do + for index, container in ipairs(Details.tabela_overall) do local index = container._NameIndexTable [name] if (index) then local actor = container._ActorTable [index] @@ -282,9 +282,9 @@ do end end - function _detalhes:ReGuessSpec (t) + function Details:ReGuessSpec (t) local actorObject, container = t[1], t[2] - local SpecSpellList = _detalhes.SpecSpellList + local SpecSpellList = Details.SpecSpellList ---@type combat local combatObject = Details:GetCurrentCombat() @@ -297,10 +297,10 @@ do local _, _, _, _, _, _, spellid = GetSpellInfo(spellName) local spec = SpecSpellList[spellid] if (spec) then - _detalhes.cached_specs[actorObject.serial] = spec + Details.cached_specs[actorObject.serial] = spec actorObject:SetSpecId(spec) - actorObject.classe = _detalhes.SpecIDToClass[spec] or actorObject.classe + actorObject.classe = Details.SpecIDToClass[spec] or actorObject.classe actorObject.guessing_spec = nil Details:SendEvent("UNIT_SPEC", nil, actorObject:GetUnitId(), spec, actorObject.serial) @@ -311,7 +311,7 @@ do if (actorObject.minha_barra and type(actorObject.minha_barra) == "table") then actorObject.minha_barra.minha_tabela = nil - _detalhes:ScheduleWindowUpdate (2, true) + Details:ScheduleWindowUpdate (2, true) end return spec @@ -324,10 +324,10 @@ do local spec = SpecSpellList [spellid] if (spec) then if (spec ~= actorObject.spec) then - _detalhes.cached_specs [actorObject.serial] = spec + Details.cached_specs [actorObject.serial] = spec actorObject:SetSpecId(spec) - actorObject.classe = _detalhes.SpecIDToClass [spec] or actorObject.classe + actorObject.classe = Details.SpecIDToClass [spec] or actorObject.classe Details:SendEvent("UNIT_SPEC", nil, actorObject:GetUnitId(), spec, actorObject.serial) @@ -337,7 +337,7 @@ do if (actorObject.minha_barra and type(actorObject.minha_barra) == "table") then actorObject.minha_barra.minha_tabela = nil - _detalhes:ScheduleWindowUpdate (2, true) + Details:ScheduleWindowUpdate (2, true) end return spec @@ -348,7 +348,7 @@ do end if (actorObject.classe == "HUNTER") then - local container_misc = _detalhes.tabela_vigente[4] + local container_misc = Details.tabela_vigente[4] local index = container_misc._NameIndexTable [actorObject.nome] if (index) then local misc_actor = container_misc._ActorTable [index] @@ -358,10 +358,10 @@ do local spec = SpecSpellList [spellid] if (spec) then if (spec ~= actorObject.spec) then - _detalhes.cached_specs [actorObject.serial] = spec + Details.cached_specs [actorObject.serial] = spec actorObject:SetSpecId(spec) - actorObject.classe = _detalhes.SpecIDToClass [spec] or actorObject.classe + actorObject.classe = Details.SpecIDToClass [spec] or actorObject.classe Details:SendEvent("UNIT_SPEC", nil, actorObject:GetUnitId(), spec, actorObject.serial) @@ -371,7 +371,7 @@ do if (actorObject.minha_barra and type(actorObject.minha_barra) == "table") then actorObject.minha_barra.minha_tabela = nil - _detalhes:ScheduleWindowUpdate (2, true) + Details:ScheduleWindowUpdate (2, true) end return spec @@ -388,18 +388,18 @@ do end end - function _detalhes:GuessSpec(t) + function Details:GuessSpec(t) local Actor, container, tries = t[1], t[2], t[3] if (not Actor) then return false end - local SpecSpellList = _detalhes.SpecSpellList + local SpecSpellList = Details.SpecSpellList --get from the spec cache - local spec = _detalhes.cached_specs [Actor.serial] + local spec = Details.cached_specs [Actor.serial] if (spec) then Actor:SetSpecId(spec) - Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe + Actor.classe = Details.SpecIDToClass [spec] or Actor.classe Actor.guessing_spec = nil @@ -409,24 +409,24 @@ do if (Actor.minha_barra and type(Actor.minha_barra) == "table") then Actor.minha_barra.minha_tabela = nil - _detalhes:ScheduleWindowUpdate (2, true) + Details:ScheduleWindowUpdate (2, true) end return spec end --get from the spell cast list - if (_detalhes.tabela_vigente) then - local spellCastTable = _detalhes.tabela_vigente:GetSpellCastTable(Actor.nome) + if (Details.tabela_vigente) then + local spellCastTable = Details.tabela_vigente:GetSpellCastTable(Actor.nome) for spellName, _ in pairs(spellCastTable) do local _, _, _, _, _, _, spellid = GetSpellInfo(spellName) local spec = SpecSpellList[spellid] if (spec) then - _detalhes.cached_specs [Actor.serial] = spec + Details.cached_specs [Actor.serial] = spec Actor:SetSpecId(spec) - Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe + Actor.classe = Details.SpecIDToClass [spec] or Actor.classe Details:SendEvent("UNIT_SPEC", nil, Actor:GetUnitId(), spec, Actor.serial) @@ -438,7 +438,7 @@ do if (Actor.minha_barra and type(Actor.minha_barra) == "table") then Actor.minha_barra.minha_tabela = nil - _detalhes:ScheduleWindowUpdate (2, true) + Details:ScheduleWindowUpdate (2, true) end return spec @@ -449,10 +449,10 @@ do for spellid, _ in pairs(Actor.spells._ActorTable) do local spec = SpecSpellList [spellid] if (spec) then - _detalhes.cached_specs [Actor.serial] = spec + Details.cached_specs [Actor.serial] = spec Actor:SetSpecId(spec) - Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe + Actor.classe = Details.SpecIDToClass [spec] or Actor.classe Actor.guessing_spec = nil Details:SendEvent("UNIT_SPEC", nil, Actor:GetUnitId(), spec, Actor.serial) @@ -463,7 +463,7 @@ do if (Actor.minha_barra and type(Actor.minha_barra) == "table") then Actor.minha_barra.minha_tabela = nil - _detalhes:ScheduleWindowUpdate (2, true) + Details:ScheduleWindowUpdate (2, true) end return spec @@ -476,10 +476,10 @@ do for spellid, _ in pairs(Actor.spells._ActorTable) do local spec = SpecSpellList [spellid] if (spec) then - _detalhes.cached_specs [Actor.serial] = spec + Details.cached_specs [Actor.serial] = spec Actor:SetSpecId(spec) - Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe + Actor.classe = Details.SpecIDToClass [spec] or Actor.classe Actor.guessing_spec = nil Details:SendEvent("UNIT_SPEC", nil, Actor:GetUnitId(), spec, Actor.serial) @@ -490,7 +490,7 @@ do if (Actor.minha_barra and type(Actor.minha_barra) == "table") then Actor.minha_barra.minha_tabela = nil - _detalhes:ScheduleWindowUpdate (2, true) + Details:ScheduleWindowUpdate (2, true) end return spec @@ -500,7 +500,7 @@ do end if (Actor.classe == "HUNTER") then - local container_misc = _detalhes.tabela_vigente[4] + local container_misc = Details.tabela_vigente[4] local index = container_misc._NameIndexTable [Actor.nome] if (index) then local misc_actor = container_misc._ActorTable [index] @@ -510,10 +510,10 @@ do local spec = SpecSpellList [spellid] if (spec) then - _detalhes.cached_specs [Actor.serial] = spec + Details.cached_specs [Actor.serial] = spec Actor:SetSpecId(spec) - Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe + Actor.classe = Details.SpecIDToClass [spec] or Actor.classe Actor.guessing_spec = nil Details:SendEvent("UNIT_SPEC", nil, Actor:GetUnitId(), spec, Actor.serial) @@ -524,7 +524,7 @@ do if (Actor.minha_barra and type(Actor.minha_barra) == "table") then Actor.minha_barra.minha_tabela = nil - _detalhes:ScheduleWindowUpdate (2, true) + Details:ScheduleWindowUpdate (2, true) end return spec @@ -534,13 +534,13 @@ do end end - local spec = _detalhes:GetSpec (Actor.nome) + local spec = Details:GetSpec (Actor.nome) if (spec) then - _detalhes.cached_specs [Actor.serial] = spec + Details.cached_specs [Actor.serial] = spec Actor:SetSpecId(spec) - Actor.classe = _detalhes.SpecIDToClass [spec] or Actor.classe + Actor.classe = Details.SpecIDToClass [spec] or Actor.classe Actor.need_refresh = true Actor.guessing_spec = nil @@ -550,21 +550,21 @@ do if (Actor.minha_barra and type(Actor.minha_barra) == "table") then Actor.minha_barra.minha_tabela = nil - _detalhes:ScheduleWindowUpdate (2, true) + Details:ScheduleWindowUpdate (2, true) end return spec end - if (_detalhes.streamer_config.quick_detection) then + if (Details.streamer_config.quick_detection) then if (tries and tries < 30) then t[3] = tries + 1 - _detalhes:ScheduleTimer("GuessSpec", 1, t) + Details:ScheduleTimer("GuessSpec", 1, t) end else if (tries and tries < 10) then t[3] = tries + 1 - _detalhes:ScheduleTimer("GuessSpec", 3, t) + Details:ScheduleTimer("GuessSpec", 3, t) end end @@ -574,7 +574,7 @@ do end -function _detalhes:AddColorString (player_name, class) +function Details:AddColorString (player_name, class) --check if the class colors exists local classColors = _G.RAID_CLASS_COLORS if (classColors) then @@ -590,9 +590,9 @@ function _detalhes:AddColorString (player_name, class) return player_name end -function _detalhes:AddRoleIcon (player_name, role, size) +function Details:AddRoleIcon (player_name, role, size) --check if is a valid role - local roleIcon = _detalhes.role_texcoord [role] + local roleIcon = Details.role_texcoord [role] if (type(player_name) == "string" and roleIcon and role ~= "NONE") then --add the role icon size = size or 14 @@ -603,13 +603,13 @@ function _detalhes:AddRoleIcon (player_name, role, size) return player_name end -function _detalhes:AddClassOrSpecIcon (playerName, class, spec, iconSize, useAlphaIcons) +function Details:AddClassOrSpecIcon (playerName, class, spec, iconSize, useAlphaIcons) local size = iconSize or 16 if (spec) then local specString = "" - local L, R, T, B = unpack(_detalhes.class_specs_coords [spec]) + local L, R, T, B = unpack(Details.class_specs_coords [spec]) if (L) then if (useAlphaIcons) then specString = "|TInterface\\AddOns\\Details\\images\\spec_icons_normal_alpha:" .. size .. ":" .. size .. ":0:0:512:512:" .. (L * 512) .. ":" .. (R * 512) .. ":" .. (T * 512) .. ":" .. (B * 512) .. "|t" @@ -622,7 +622,7 @@ function _detalhes:AddClassOrSpecIcon (playerName, class, spec, iconSize, useAlp if (class) then local classString = "" - local L, R, T, B = unpack(_detalhes.class_coords [class]) + local L, R, T, B = unpack(Details.class_coords [class]) if (L) then local imageSize = 128 if (useAlphaIcons) then diff --git a/functions/raidinfo.lua b/functions/raidinfo.lua index 85edae50..fd6c0c04 100644 --- a/functions/raidinfo.lua +++ b/functions/raidinfo.lua @@ -149,7 +149,7 @@ function Details.InstallRaidInfo() {boss = "Sylvanas Windrunner", portrait = 4071443}, } - _detalhes:InstallEncounter ({ + Details:InstallEncounter ({ id = INSTANCE_MAPID, --map id ej_id = INSTANCE_EJID, --encounter journal id name = InstanceName, @@ -240,7 +240,7 @@ function Details.InstallRaidInfo() end end - _detalhes:InstallEncounter ({ + Details:InstallEncounter ({ id = INSTANCE_MAPID, --map id ej_id = INSTANCE_EJID, --encounter journal id name = InstanceName, diff --git a/functions/rowanimation.lua b/functions/rowanimation.lua index 43030cfa..ab3d94fb 100644 --- a/functions/rowanimation.lua +++ b/functions/rowanimation.lua @@ -7,7 +7,7 @@ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - local _detalhes = _G._detalhes + local _detalhes = _G.Details local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" ) local _ local addonName, Details222 = ... diff --git a/functions/savedata.lua b/functions/savedata.lua index d0d57b48..bfcd0cfc 100644 --- a/functions/savedata.lua +++ b/functions/savedata.lua @@ -1,6 +1,6 @@ --[[this file save the data when player leave the game]] -local _detalhes = _G._detalhes +local _detalhes = _G.Details local addonName, Details222 = ... function _detalhes:WipeConfig() diff --git a/functions/skins.lua b/functions/skins.lua index 7b810630..dde93311 100644 --- a/functions/skins.lua +++ b/functions/skins.lua @@ -1,5 +1,5 @@ -local _detalhes = _G._detalhes +local _detalhes = _G.Details local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" ) local _ local addonName, Details222 = ... diff --git a/functions/slash.lua b/functions/slash.lua index bd2d9aef..fb7cad34 100644 --- a/functions/slash.lua +++ b/functions/slash.lua @@ -1,6 +1,6 @@ -local _detalhes = _G._detalhes +local _detalhes = _G.Details local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" ) local _ local addonName, Details222 = ... diff --git a/functions/spellcache.lua b/functions/spellcache.lua index 2a7f20ed..542dfa57 100644 --- a/functions/spellcache.lua +++ b/functions/spellcache.lua @@ -5,7 +5,7 @@ do -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --On The Fly SpellCache - local Details = _G._detalhes + local Details = _G.Details local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" ) local addonName, Details222 = ... local _ diff --git a/functions/spells.lua b/functions/spells.lua index e6b52180..2fc768f1 100644 --- a/functions/spells.lua +++ b/functions/spells.lua @@ -1,6 +1,6 @@ do - local _detalhes = _G._detalhes + local _detalhes = _G.Details local addonName, Details222 = ... --import potion list from the framework diff --git a/functions/timedata.lua b/functions/timedata.lua index 0dbe5cf4..0fd0832b 100644 --- a/functions/timedata.lua +++ b/functions/timedata.lua @@ -1,6 +1,6 @@ local _ - local _detalhes = _G._detalhes + local _detalhes = _G.Details local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" ) local addonName, Details222 = ... diff --git a/plugins/Details_Compare2/Details_Compare2.lua b/plugins/Details_Compare2/Details_Compare2.lua index ed40dc8a..2bb87c1f 100644 --- a/plugins/Details_Compare2/Details_Compare2.lua +++ b/plugins/Details_Compare2/Details_Compare2.lua @@ -127,7 +127,7 @@ do tooltip = CreateFrame ("frame", nil, UIParent, "BackdropTemplate") tooltip:SetFrameStrata ("tooltip") tooltip:SetSize (1, 1) - _detalhes.gump:CreateBorder (tooltip) + Details.gump:CreateBorder (tooltip) tooltip:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true}) tooltip:SetBackdropColor (.2, .2, .2, .99) tooltip:SetBackdropBorderColor (unpack (comparisonFrameSettings.tooltipBorderColor)) @@ -218,7 +218,7 @@ do tooltip = CreateFrame ("frame", nil, UIParent, "BackdropTemplate") tooltip:SetFrameStrata ("tooltip") tooltip:SetSize (1, 1) - _detalhes.gump:CreateBorder (tooltip) + Details.gump:CreateBorder (tooltip) tooltip:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true}) tooltip:SetBackdropColor (0, 0, 0, 1) tooltip:SetBackdropBorderColor (unpack (comparisonFrameSettings.tooltipBorderColor)) diff --git a/plugins/Details_DataStorage/Details_DataStorage.lua b/plugins/Details_DataStorage/Details_DataStorage.lua index a073b99f..5373538f 100644 --- a/plugins/Details_DataStorage/Details_DataStorage.lua +++ b/plugins/Details_DataStorage/Details_DataStorage.lua @@ -1,7 +1,7 @@ DETAILS_STORAGE_VERSION = 5 -function _detalhes:CreateStorageDB() +function Details:CreateStorageDB() DetailsDataStorage = { VERSION = DETAILS_STORAGE_VERSION, [14] = {}, --normal mode (raid) @@ -19,18 +19,18 @@ f:RegisterEvent ("ADDON_LOADED") f:SetScript ("OnEvent", function (self, event, addonName) if (addonName == "Details_DataStorage") then - DetailsDataStorage = DetailsDataStorage or _detalhes:CreateStorageDB() + DetailsDataStorage = DetailsDataStorage or Details:CreateStorageDB() DetailsDataStorage.Data = {} if (DetailsDataStorage.VERSION < DETAILS_STORAGE_VERSION) then --> do revisions if (DetailsDataStorage.VERSION < 5) then table.wipe (DetailsDataStorage) - DetailsDataStorage = _detalhes:CreateStorageDB() + DetailsDataStorage = Details:CreateStorageDB() end end - if (_detalhes and _detalhes.debug) then + if (Details and Details.debug) then print ("|cFFFFFF00Details! Storage|r: loaded!") end DETAILS_STORAGE_LOADED = true diff --git a/plugins/Details_EncounterDetails/Details_EncounterDetails.lua b/plugins/Details_EncounterDetails/Details_EncounterDetails.lua index eb112f0c..09099502 100644 --- a/plugins/Details_EncounterDetails/Details_EncounterDetails.lua +++ b/plugins/Details_EncounterDetails/Details_EncounterDetails.lua @@ -16,7 +16,7 @@ local _UFC = UnitAffectingCombat --> wow api local local _IsInRaid = IsInRaid --> wow api local local _IsInGroup = IsInGroup --> wow api local local _UnitAura = UnitAura --> wow api local -local _GetSpellInfo = _detalhes.getspellinfo --> wow api local +local _GetSpellInfo = Details.getspellinfo --> wow api local local _CreateFrame = CreateFrame --> wow api local local _GetTime = GetTime --> wow api local local _GetCursorPosition = GetCursorPosition --> wow api local @@ -36,7 +36,7 @@ local _bit_band = bit.band local CONST_FONT_SIZE = 10 --> Create the plugin Object -local EncounterDetails = _detalhes:NewPluginObject ("Details_EncounterDetails", DETAILSPLUGIN_ALWAYSENABLED) +local EncounterDetails = Details:NewPluginObject ("Details_EncounterDetails", DETAILSPLUGIN_ALWAYSENABLED) tinsert (UISpecialFrames, "Details_EncounterDetails") --> Main Frame local EncounterDetailsFrame = EncounterDetails.Frame @@ -47,8 +47,8 @@ EncounterDetailsFrame.DefaultBarTexture = "Interface\\AddOns\\Details\\images\\b EncounterDetails:SetPluginDescription ("Raid encounters summary, show basic stuff like dispels, interrupts and also graphic charts, boss emotes and the Weakaura Creation Tool.") --> container types -local class_type_damage = _detalhes.atributos.dano --> damage -local class_type_misc = _detalhes.atributos.misc --> misc +local class_type_damage = Details.atributos.dano --> damage +local class_type_misc = Details.atributos.misc --> misc --> main combat object local _combat_object @@ -650,7 +650,7 @@ end local overkill = event [10] or 0 if (overkill > 0) then amount = amount - overkill - overkill = " (" .. _detalhes:ToK (overkill) .. " |cFFFF8800overkill|r)" + overkill = " (" .. Details:ToK (overkill) .. " |cFFFF8800overkill|r)" else overkill = "" end @@ -659,7 +659,7 @@ end source = source:gsub ("%[%*%] ", "") end - GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (" .. source .. ")", "-" .. _detalhes:ToK (amount) .. overkill .. " (" .. hp .. "%)", 1, "white", "white") + GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (" .. source .. ")", "-" .. Details:ToK (amount) .. overkill .. " (" .. hp .. "%)", 1, "white", "white") GameCooltip:AddIcon (spellicon, 1, 1, 16, 16, .1, .9, .1, .9) if (event [9]) then @@ -674,7 +674,7 @@ end local class = Details:GetClass (source) local spec = Details:GetSpec (source) - GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (" .. Details:GetOnlyName (Details:AddClassOrSpecIcon (source, class, spec, 16, true)) .. ")", "+" .. _detalhes:ToK (amount) .. " (" .. hp .. "%)", 1, "white", "white") + GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (" .. Details:GetOnlyName (Details:AddClassOrSpecIcon (source, class, spec, 16, true)) .. ")", "+" .. Details:ToK (amount) .. " (" .. hp .. "%)", 1, "white", "white") GameCooltip:AddIcon (spellicon, 1, 1, 16, 16, .1, .9, .1, .9) GameCooltip:AddStatusBar (hp, 1, "green", true, statusBarBackground) end @@ -738,7 +738,7 @@ end GameCooltip:SetOption ("LeftBorderSize", -4) GameCooltip:SetOption ("RightBorderSize", 5) GameCooltip:SetOption ("StatusBarTexture", [[Interface\AddOns\Details\images\bar_serenity]]) - GameCooltip:SetBackdrop (1, _detalhes.cooltip_preset2_backdrop, bgColor, borderColor) + GameCooltip:SetBackdrop (1, Details.cooltip_preset2_backdrop, bgColor, borderColor) GameCooltip:SetOwner (row, "bottomright", "bottomleft", -2, -50) row.OverlayTexture:Show() @@ -755,7 +755,7 @@ local function DispellInfo (dispell, barra) tabela_jogadores [#tabela_jogadores + 1] = {nome, tabela [1], tabela [2]} end - _table_sort (tabela_jogadores, _detalhes.Sort2) + _table_sort (tabela_jogadores, Details.Sort2) for index, tabela in _ipairs (tabela_jogadores) do local coords = EncounterDetails.class_coords [tabela[3]] @@ -795,7 +795,7 @@ local function KickBy (magia, barra) tabela_jogadores [#tabela_jogadores + 1] = {nome, tabela [1], tabela [2]} end - _table_sort (tabela_jogadores, _detalhes.Sort2) + _table_sort (tabela_jogadores, Details.Sort2) local spellName, _, spellIcon = GetSpellInfo (barra.lineText1:GetText()) GameCooltip:AddLine (barra.lineText1:GetText()) @@ -844,11 +844,11 @@ local function EnemySkills (habilidade, barra) total = total + tabela[1] end - _table_sort (tabela_jogadores, _detalhes.Sort2) + _table_sort (tabela_jogadores, Details.Sort2) GameCooltip:AddLine (barra.lineText1:GetText() .. " Damage Done") - local ToK = _detalhes.ToKFunctions [_detalhes.ps_abbreviation] + local ToK = Details.ToKFunctions [Details.ps_abbreviation] local topValue = tabela_jogadores [1] and tabela_jogadores [1][2] @@ -856,7 +856,7 @@ local function EnemySkills (habilidade, barra) local coords = EncounterDetails.class_coords [tabela[3]] GameCooltip:AddLine (EncounterDetails:GetOnlyName (tabela[1]), ToK (_, tabela[2]) .. " (" .. format ("%.1f", tabela[2] / total * 100) .. "%)", 1, "white") - local r, g, b, a = unpack (_detalhes.tooltip.background) + local r, g, b, a = unpack (Details.tooltip.background) local actorClass = Details:GetClass (tabela[1]) if (actorClass) then @@ -914,7 +914,7 @@ local function DamageTakenDetails (jogador, barra) end end - _table_sort (meus_agressores, _detalhes.Sort2) + _table_sort (meus_agressores, Details.Sort2) GameCooltip:AddLine (barra.lineText1:GetText() .. " Damage Taken") @@ -925,7 +925,7 @@ local function DamageTakenDetails (jogador, barra) local teve_melee = false - local ToK = _detalhes.ToKFunctions [_detalhes.ps_abbreviation] + local ToK = Details.ToKFunctions [Details.ps_abbreviation] local topDamage = meus_agressores[1] and meus_agressores[1][2] for i = 1, max do @@ -950,7 +950,7 @@ local function DamageTakenDetails (jogador, barra) end --> custom tooltip clicks on any bar --------------------------------------------------------------------------------------------------------- -function _detalhes:BossInfoRowClick (barra, param1) +function Details:BossInfoRowClick (barra, param1) if (type (self) == "table") then barra, param1 = self, barra @@ -1004,7 +1004,7 @@ function _detalhes:BossInfoRowClick (barra, param1) end end - return _detalhes:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true}) + return Details:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true}) end @@ -1047,7 +1047,7 @@ function EncounterDetails:SetRowScripts (barra, index, container) y = _math_floor (y) if ((self.mouse_down+0.4 > _GetTime() and (x == self.x and y == self.y)) or (x == self.x and y == self.y)) then - _detalhes:BossInfoRowClick (self) + Details:BossInfoRowClick (self) end end) @@ -1140,7 +1140,7 @@ function EncounterDetails:OpenAndRefresh (_, segment) else DebugMessage ("no segment has been passed, looping segments to find one.") - local historico = _detalhes.tabela_historico.tabelas + local historico = Details.tabela_historico.tabelas local foundABoss = false for index, combate in ipairs (historico) do @@ -1172,7 +1172,7 @@ function EncounterDetails:OpenAndRefresh (_, segment) local map_id local boss_info - local ToK = _detalhes.ToKFunctions [_detalhes.ps_abbreviation] + local ToK = Details.ToKFunctions [Details.ps_abbreviation] if (EncounterDetails.debugmode and not _combat_object.is_boss) then _combat_object.is_boss = { @@ -1223,7 +1223,7 @@ function EncounterDetails:OpenAndRefresh (_, segment) boss_id = _combat_object.is_boss.index map_id = _combat_object.is_boss.mapid - boss_info = _detalhes:GetBossDetails (_combat_object.is_boss.mapid, _combat_object.is_boss.index) + boss_info = Details:GetBossDetails (_combat_object.is_boss.mapid, _combat_object.is_boss.index) EncounterDetails.Frame.switch(EncounterDetailsFrame.ShowType) @@ -1281,7 +1281,7 @@ function EncounterDetails:OpenAndRefresh (_, segment) combat tables have 4 containers [1] damage [2] heal [3] energy [4] misc each container have 2 tables: ._NameIndexTable and ._ActorTable --]] local DamageContainer = _combat_object [class_type_damage] - local damage_taken = _detalhes.atributo_damage:RefreshWindow ({}, _combat_object, _, { key = "damage_taken", modo = _detalhes.modos.group }) + local damage_taken = Details.atributo_damage:RefreshWindow ({}, _combat_object, _, { key = "damage_taken", modo = Details.modos.group }) local container = frame.overall_damagetaken.gump @@ -1299,8 +1299,8 @@ function EncounterDetails:OpenAndRefresh (_, segment) local barra = container.barras [index] if (not barra) then barra = EncounterDetails:CreateRow (index, container, 1, 0, -1) - _detalhes:SetFontSize (barra.lineText1, CONST_FONT_SIZE) - _detalhes:SetFontSize (barra.lineText4, CONST_FONT_SIZE) + Details:SetFontSize (barra.lineText1, CONST_FONT_SIZE) + Details:SetFontSize (barra.lineText4, CONST_FONT_SIZE) barra.TTT = "damage_taken" -- tool tip type --> damage taken barra.report_text = Loc ["STRING_PLUGIN_NAME"].."! "..Loc ["STRING_DAMAGE_TAKEN_REPORT"] end @@ -1313,11 +1313,11 @@ function EncounterDetails:OpenAndRefresh (_, segment) barra.lineText4:SetText (ToK (_, jogador.damage_taken)) - _detalhes:name_space (barra) + Details:name_space (barra) barra.jogador = jogador - barra.textura:SetStatusBarColor (_unpack (_detalhes.class_colors [jogador.classe])) + barra.textura:SetStatusBarColor (_unpack (Details.class_colors [jogador.classe])) if (index == 1) then barra.textura:SetValue (100) @@ -1502,7 +1502,7 @@ function EncounterDetails:OpenAndRefresh (_, segment) end end - _table_sort (tabela_em_ordem, _detalhes.Sort1) + _table_sort (tabela_em_ordem, Details.Sort1) container = frame.overall_habilidades.gump quantidade = 0 @@ -1519,8 +1519,8 @@ function EncounterDetails:OpenAndRefresh (_, segment) barra = EncounterDetails:CreateRow (index, container, 1, 0, -1) barra.TTT = "habilidades_inimigas" -- tool tip type --enemy abilities barra.report_text = Loc ["STRING_PLUGIN_NAME"].."! " .. Loc ["STRING_ABILITY_DAMAGE"] - _detalhes:SetFontSize (barra.lineText1, CONST_FONT_SIZE) - _detalhes:SetFontSize (barra.lineText4, CONST_FONT_SIZE) + Details:SetFontSize (barra.lineText1, CONST_FONT_SIZE) + Details:SetFontSize (barra.lineText4, CONST_FONT_SIZE) barra.t:SetVertexColor (1, .8, .8, .8) end @@ -1529,12 +1529,12 @@ function EncounterDetails:OpenAndRefresh (_, segment) barra.lineText1:SetText (nome_magia) -- .. " (|cFFa0a0a0" .. habilidade[4] .. "|r) barra.lineText4:SetText (ToK (_, habilidade[1])) - _detalhes:name_space (barra) + Details:name_space (barra) barra.jogador = habilidade --> barra.jogador agora tem a tabela com --> [1] total dano causado [2] jogadores que foram alvos [3] jogadores que castaram essa magia [4] ID da magia - local spellSchool = _detalhes.spell_school_cache [nome_magia] or 1 - local r, g, b = _detalhes:GetSpellSchoolColor (spellSchool) + local spellSchool = Details.spell_school_cache [nome_magia] or 1 + local r, g, b = Details:GetSpellSchoolColor (spellSchool) barra.t:SetVertexColor (r, g, b) @@ -1590,7 +1590,7 @@ function EncounterDetails:OpenAndRefresh (_, segment) for index, jogador in _ipairs (DamageContainer._ActorTable) do --> s� estou interessado nos adds, conferir pelo nome - if (adds_pool [_detalhes:GetNpcIdFromGuid (jogador.serial)] or ( + if (adds_pool [Details:GetNpcIdFromGuid (jogador.serial)] or ( jogador.flag_original and bit.band (jogador.flag_original, 0x00000060) ~= 0 and (not jogador.owner or (_bit_band (jogador.owner.flag_original, 0x00000060) ~= 0 and not jogador.owner.grupo and _bit_band (jogador.owner.flag_original, 0x00000400) == 0)) and --isn't a pet or the owner isn't a player @@ -1616,7 +1616,7 @@ function EncounterDetails:OpenAndRefresh (_, segment) end end end - _table_sort (tabela.dano_em, _detalhes.Sort2) + _table_sort (tabela.dano_em, Details.Sort2) --> quem deu dano nele for agressor, _ in _pairs (jogador.damage_from) do @@ -1662,7 +1662,7 @@ function EncounterDetails:OpenAndRefresh (_, segment) local dano_em_total = tabela.dano_em_total for _, esta_tabela in _pairs (dano_em) do local coords = EncounterDetails.class_coords [esta_tabela[3]] - GameCooltip:AddLine (EncounterDetails:GetOnlyName (esta_tabela[1]), _detalhes:ToK (esta_tabela[2]).." (".. _cstr ("%.1f", esta_tabela[2]/dano_em_total*100) .."%)", 1, "white", "orange") + GameCooltip:AddLine (EncounterDetails:GetOnlyName (esta_tabela[1]), Details:ToK (esta_tabela[2]).." (".. _cstr ("%.1f", esta_tabela[2]/dano_em_total*100) .."%)", 1, "white", "orange") local specID = Details:GetSpec (esta_tabela[1]) if (specID) then @@ -1711,7 +1711,7 @@ function EncounterDetails:OpenAndRefresh (_, segment) local coords = EncounterDetails.class_coords [esta_tabela[3]] if (coords) then - GameCooltip:AddLine (EncounterDetails:GetOnlyName (esta_tabela[1]), _detalhes:ToK (esta_tabela[2]).." (".. _cstr ("%.1f", esta_tabela[2]/damage_from_total*100) .."%)", 1, "white", "orange", nil, nil, "MONOCHRONE") + GameCooltip:AddLine (EncounterDetails:GetOnlyName (esta_tabela[1]), Details:ToK (esta_tabela[2]).." (".. _cstr ("%.1f", esta_tabela[2]/damage_from_total*100) .."%)", 1, "white", "orange", nil, nil, "MONOCHRONE") local specID = Details:GetSpec (esta_tabela[1]) if (specID) then @@ -1729,7 +1729,7 @@ function EncounterDetails:OpenAndRefresh (_, segment) GameCooltip:AddStatusBar (esta_tabela[2] / topDamage * 100, 1, .3, .3, .3, .3, false, {value = 100, color = {.21, .21, .21, 0.8}, texture = [[Interface\AddOns\Details\images\bar_serenity]]}) end else - GameCooltip:AddLine (esta_tabela[1], _detalhes:ToK (esta_tabela[2]).." (".. _cstr ("%.1f", esta_tabela[2]/damage_from_total*100) .."%)") + GameCooltip:AddLine (esta_tabela[1], Details:ToK (esta_tabela[2]).." (".. _cstr ("%.1f", esta_tabela[2]/damage_from_total*100) .."%)") GameCooltip:AddStatusBar (esta_tabela[2] / topDamage * 100, 1, .3, .3, .3, .3, false, {value = 100, color = {.21, .21, .21, 0.8}, texture = [[Interface\AddOns\Details\images\bar_serenity]]}) end end @@ -1766,7 +1766,7 @@ function EncounterDetails:OpenAndRefresh (_, segment) quantidade = 0 --table.sort (adds, sort_by_name) - table.sort (adds, _detalhes.Sort1) + table.sort (adds, Details.Sort1) for index, esta_tabela in _ipairs (adds) do @@ -1808,15 +1808,15 @@ function EncounterDetails:OpenAndRefresh (_, segment) barra.lineText1:SetPoint ("left", add_damage_done, "right", 2, 0) barra.textura:SetStatusBarTexture("") - _detalhes:SetFontSize (barra.lineText1, CONST_FONT_SIZE) - _detalhes:SetFontSize (barra.lineText4, CONST_FONT_SIZE) + Details:SetFontSize (barra.lineText1, CONST_FONT_SIZE) + Details:SetFontSize (barra.lineText4, CONST_FONT_SIZE) barra.TTT = "add" add_damage_done.TTT = "add" end barra.lineText1:SetText (addName) - barra.lineText4:SetText (_detalhes:ToK (esta_tabela.damage_from_total)) + barra.lineText4:SetText (Details:ToK (esta_tabela.damage_from_total)) barra.lineText1:SetSize (barra:GetWidth() - barra.lineText4:GetStringWidth() - 34, 15) barra.jogador = esta_tabela --> barra.jogador agora tem a tabela com --> [1] total dano causado [2] jogadores que foram alvos [3] jogadores que castaram essa magia [4] ID da magia @@ -1844,7 +1844,7 @@ function EncounterDetails:OpenAndRefresh (_, segment) local misc = _combat_object [class_type_misc] - local total_interrompido = _detalhes.atributo_misc:RefreshWindow ({}, _combat_object, _, { key = "interrupt", modo = _detalhes.modos.group }) + local total_interrompido = Details.atributo_misc:RefreshWindow ({}, _combat_object, _, { key = "interrupt", modo = Details.modos.group }) local frame_interrupts = EncounterDetailsFrame.overall_interrupt container = frame_interrupts.gump @@ -1886,7 +1886,7 @@ function EncounterDetails:OpenAndRefresh (_, segment) for spellid, tabela in _pairs (habilidades_interrompidas) do tabela_em_ordem [#tabela_em_ordem+1] = tabela end - _table_sort (tabela_em_ordem, _detalhes.Sort2) + _table_sort (tabela_em_ordem, Details.Sort2) index = 1 @@ -1895,8 +1895,8 @@ function EncounterDetails:OpenAndRefresh (_, segment) local barra = container.barras [index] if (not barra) then barra = EncounterDetails:CreateRow (index, container, 3, 0, -6) - _detalhes:SetFontSize (barra.lineText1, CONST_FONT_SIZE) - _detalhes:SetFontSize (barra.lineText4, CONST_FONT_SIZE) + Details:SetFontSize (barra.lineText1, CONST_FONT_SIZE) + Details:SetFontSize (barra.lineText4, CONST_FONT_SIZE) barra.TTT = "total_interrupt" -- tool tip type barra.report_text = "Details! ".. Loc ["STRING_INTERRUPTS_OF"] barra:SetWidth (155) @@ -1918,7 +1918,7 @@ function EncounterDetails:OpenAndRefresh (_, segment) local total = successful + tabela [2] barra.lineText4:SetText (tabela [2] .. " / ".. total) - _detalhes:name_space (barra) + Details:name_space (barra) barra.jogador = tabela @@ -1953,7 +1953,7 @@ function EncounterDetails:OpenAndRefresh (_, segment) --> Inicio do Container dos Dispells: --> force refresh window behavior - local total_dispelado = _detalhes.atributo_misc:RefreshWindow ({}, _combat_object, _, { key = "dispell", modo = _detalhes.modos.group }) + local total_dispelado = Details.atributo_misc:RefreshWindow ({}, _combat_object, _, { key = "dispell", modo = Details.modos.group }) local frame_dispell = EncounterDetailsFrame.overall_dispell container = frame_dispell.gump @@ -2000,7 +2000,7 @@ function EncounterDetails:OpenAndRefresh (_, segment) for spellid, tabela in _pairs (habilidades_dispeladas) do tabela_em_ordem [#tabela_em_ordem+1] = tabela end - _table_sort (tabela_em_ordem, _detalhes.Sort2) + _table_sort (tabela_em_ordem, Details.Sort2) index = 1 @@ -2009,8 +2009,8 @@ function EncounterDetails:OpenAndRefresh (_, segment) local barra = container.barras [index] if (not barra) then barra = EncounterDetails:CreateRow (index, container, 3, 3, -6) - _detalhes:SetFontSize (barra.lineText1, CONST_FONT_SIZE) - _detalhes:SetFontSize (barra.lineText4, CONST_FONT_SIZE) + Details:SetFontSize (barra.lineText1, CONST_FONT_SIZE) + Details:SetFontSize (barra.lineText4, CONST_FONT_SIZE) barra.TTT = "dispell" -- tool tip type barra.report_text = "Details! ".. Loc ["STRING_DISPELLS_OF"] barra:SetWidth (160) @@ -2021,7 +2021,7 @@ function EncounterDetails:OpenAndRefresh (_, segment) barra.lineText1:SetText (nome_magia) barra.lineText4:SetText (tabela [2]) - _detalhes:name_space (barra) + Details:name_space (barra) barra.jogador = tabela @@ -2071,8 +2071,8 @@ function EncounterDetails:OpenAndRefresh (_, segment) barra = EncounterDetails:CreateRow (index, container, 3, 0, 1) barra.TTT = "morte" -- tool tip type barra.report_text = "Details! " .. Loc ["STRING_DEAD_LOG"] - _detalhes:SetFontSize (barra.lineText1, CONST_FONT_SIZE) - _detalhes:SetFontSize (barra.lineText4, CONST_FONT_SIZE) + Details:SetFontSize (barra.lineText1, CONST_FONT_SIZE) + Details:SetFontSize (barra.lineText4, CONST_FONT_SIZE) barra:SetWidth (169) local overlayTexture = barra:CreateTexture (nil, "overlay") @@ -2091,12 +2091,12 @@ function EncounterDetails:OpenAndRefresh (_, segment) barra.lineText4:SetText (tabela [6]) - _detalhes:name_space (barra) + Details:name_space (barra) barra.jogador = tabela barra.extra = habilidades_info - barra.textura:SetStatusBarColor (_unpack (_detalhes.class_colors [tabela [4]])) + barra.textura:SetStatusBarColor (_unpack (Details.class_colors [tabela [4]])) barra.textura:SetValue (100) barra.icone:SetTexture ("Interface\\AddOns\\Details\\images\\classes_small") @@ -2205,8 +2205,8 @@ local installPluginFunc = function() EncounterDetails.boss_emotes_table = EncounterDetails.charsaved.emotes --build a table on global saved variables - if (not _detalhes.global_plugin_database["DETAILS_PLUGIN_ENCOUNTER_DETAILS"]) then - _detalhes.global_plugin_database["DETAILS_PLUGIN_ENCOUNTER_DETAILS"] = {encounter_timers_dbm = {}, encounter_timers_bw= {}} + if (not Details.global_plugin_database["DETAILS_PLUGIN_ENCOUNTER_DETAILS"]) then + Details.global_plugin_database["DETAILS_PLUGIN_ENCOUNTER_DETAILS"] = {encounter_timers_dbm = {}, encounter_timers_bw= {}} end --Register needed events diff --git a/plugins/Details_EncounterDetails/frames.lua b/plugins/Details_EncounterDetails/frames.lua index 170c5f6d..4b176be0 100644 --- a/plugins/Details_EncounterDetails/frames.lua +++ b/plugins/Details_EncounterDetails/frames.lua @@ -1,5 +1,5 @@ do - local _detalhes = _G._detalhes + local _detalhes = _G.Details local DetailsFrameWork = _detalhes.gump local AceLocale = LibStub ("AceLocale-3.0") local Loc = AceLocale:GetLocale ("Details_EncounterDetails") diff --git a/plugins/Details_Streamer/Details_Streamer.lua b/plugins/Details_Streamer/Details_Streamer.lua index 6f30c8c0..6cb3192c 100644 --- a/plugins/Details_Streamer/Details_Streamer.lua +++ b/plugins/Details_Streamer/Details_Streamer.lua @@ -9,7 +9,7 @@ local _ --> create the plugin object -- "Details_StreamOverlay" is the old name -local StreamOverlay = _detalhes:NewPluginObject("Details_Streamer", DETAILSPLUGIN_ALWAYSENABLED) +local StreamOverlay = Details:NewPluginObject("Details_Streamer", DETAILSPLUGIN_ALWAYSENABLED) --tinsert (UISpecialFrames, "Details_StreamOverlays") --> main frame (shortcut) local SOF = StreamOverlay.Frame @@ -1669,11 +1669,11 @@ end function StreamOverlay:UpdateDpsHpsFrame() --> low level actor parsing - we can just use Details:GetActor(), but is faster without having to call functions - local container = _detalhes.tabela_vigente [screen_frame_attribute] + local container = Details.tabela_vigente [screen_frame_attribute] local actor = container._ActorTable [container._NameIndexTable [playerName]] if (actor) then - screen_frame_text:SetText (format_function (_, actor.total / _detalhes.tabela_vigente:GetCombatTime())) + screen_frame_text:SetText (format_function (_, actor.total / Details.tabela_vigente:GetCombatTime())) else if (StreamOverlay.db.per_second.attribute_type == 1) then screen_frame_text:SetText ("DPS") @@ -2214,13 +2214,13 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel) --> save the current config on the profile local current_profile = Details_StreamerDB.characters [pname] local current_ptable = Details_StreamerDB.profiles [current_profile] - _detalhes.table.overwrite (current_ptable, StreamOverlay.db) --overwrite the profile with the local settings + Details.table.overwrite (current_ptable, StreamOverlay.db) --overwrite the profile with the local settings --> get the selected profile and overwrite the settings local ptable = Details_StreamerDB.profiles [profileName] - _detalhes.table.deploy (ptable, StreamOverlay.DefaultConfigTable) --update with any new config from the default table - _detalhes.table.overwrite (StreamOverlay.db, ptable) --overwrite the local settings with the profile settings + Details.table.deploy (ptable, StreamOverlay.DefaultConfigTable) --update with any new config from the default table + Details.table.overwrite (StreamOverlay.db, ptable) --overwrite the local settings with the profile settings Details_StreamerDB.characters [pname] = profileName @@ -2268,8 +2268,8 @@ function StreamOverlay.OpenOptionsPanel (fromOptionsPanel) Details_StreamerDB.characters [pname] = pname --load dbtable Details_StreamerDB.profiles [pname] = {} - _detalhes.table.overwrite (Details_StreamerDB.profiles [pname], StreamOverlay.db) - _detalhes.table.deploy (Details_StreamerDB.profiles [pname], StreamOverlay.DefaultConfigTable) --update with any new config from the default table + Details.table.overwrite (Details_StreamerDB.profiles [pname], StreamOverlay.db) + Details.table.deploy (Details_StreamerDB.profiles [pname], StreamOverlay.DefaultConfigTable) --update with any new config from the default table --StreamOverlay.db = Details_StreamerDB.profiles [pname] --no can't change the local database table optionsFrame.NewProfileButton:Hide() @@ -2361,7 +2361,7 @@ function StreamOverlay:OnEvent (_, event, ...) playerName = UnitName ("player") - if (_G._detalhes) then + if (_G.Details) then if (DetailsFramework.IsClassicWow()) then return @@ -2417,7 +2417,7 @@ function StreamOverlay:OnEvent (_, event, ...) StreamOverlay.DefaultConfigTable = default_options_table --> Install - local install, saveddata = _G._detalhes:InstallPlugin ("TOOLBAR", "Action Tracker", [[Interface\MINIMAP\MOVIERECORDINGICON]], StreamOverlay, "DETAILS_PLUGIN_STREAM_OVERLAY", MINIMAL_DETAILS_VERSION_REQUIRED, "Terciob", StreamOverlay.CurrentVersion, default_options_table) + local install, saveddata = _G.Details:InstallPlugin ("TOOLBAR", "Action Tracker", [[Interface\MINIMAP\MOVIERECORDINGICON]], StreamOverlay, "DETAILS_PLUGIN_STREAM_OVERLAY", MINIMAL_DETAILS_VERSION_REQUIRED, "Terciob", StreamOverlay.CurrentVersion, default_options_table) if (type (install) == "table" and install.error) then print (install.error) end @@ -2518,8 +2518,8 @@ function StreamOverlay:OnEvent (_, event, ...) --load dbtable local ptable = Details_StreamerDB.profiles [ Details_StreamerDB.characters [pname] ] or {} --already existen config set or empty table - _detalhes.table.overwrite (StreamOverlay.db, ptable) --profile overwrite the local settings - _detalhes.table.deploy (ptable, StreamOverlay.db) --local settings deploy stuff which non exist on profile + Details.table.overwrite (StreamOverlay.db, ptable) --profile overwrite the local settings + Details.table.deploy (ptable, StreamOverlay.db) --local settings deploy stuff which non exist on profile Details_StreamerDB.profiles [ Details_StreamerDB.characters [pname] ] = ptable end diff --git a/plugins/Details_TinyThreat/Details_TinyThreat.lua b/plugins/Details_TinyThreat/Details_TinyThreat.lua index b4d0dda1..55b39498 100644 --- a/plugins/Details_TinyThreat/Details_TinyThreat.lua +++ b/plugins/Details_TinyThreat/Details_TinyThreat.lua @@ -21,7 +21,7 @@ local RAID_CLASS_COLORS = RAID_CLASS_COLORS --> Create the plugin Object -local ThreatMeter = _detalhes:NewPluginObject ("Details_TinyThreat") +local ThreatMeter = Details:NewPluginObject ("Details_TinyThreat") --> Main Frame local ThreatMeterFrame = ThreatMeter.Frame @@ -50,7 +50,7 @@ end local function CreatePluginFrames (data) --> catch Details! main object - local _detalhes = _G._detalhes + local _detalhes = _G.Details local DetailsFrameWork = _detalhes.gump --> data @@ -814,7 +814,7 @@ local build_options_panel = function() } - _detalhes.gump:BuildMenu (options_frame, menu, 15, -35, 160) + Details.gump:BuildMenu (options_frame, menu, 15, -35, 160) options_frame:SetHeight(160) end @@ -845,7 +845,7 @@ function ThreatMeter:OnEvent (_, event, ...) local AddonName = select (1, ...) if (AddonName == "Details_TinyThreat") then - if (_G._detalhes) then + if (_G.Details) then if (DetailsFramework.IsClassicWow()) then --return @@ -857,19 +857,19 @@ function ThreatMeter:OnEvent (_, event, ...) local MINIMAL_DETAILS_VERSION_REQUIRED = 1 --> Install - local install, saveddata = _G._detalhes:InstallPlugin ("RAID", Loc ["STRING_PLUGIN_NAME"], "Interface\\Icons\\Ability_Druid_Cower", ThreatMeter, "DETAILS_PLUGIN_TINY_THREAT", MINIMAL_DETAILS_VERSION_REQUIRED, "Terciob", "v2.20") + local install, saveddata = _G.Details:InstallPlugin ("RAID", Loc ["STRING_PLUGIN_NAME"], "Interface\\Icons\\Ability_Druid_Cower", ThreatMeter, "DETAILS_PLUGIN_TINY_THREAT", MINIMAL_DETAILS_VERSION_REQUIRED, "Terciob", "v2.20") if (type (install) == "table" and install.error) then print (install.error) end --> Register needed events - _G._detalhes:RegisterEvent (ThreatMeter, "COMBAT_PLAYER_ENTER") - _G._detalhes:RegisterEvent (ThreatMeter, "COMBAT_PLAYER_LEAVE") - _G._detalhes:RegisterEvent (ThreatMeter, "DETAILS_INSTANCE_ENDRESIZE") - _G._detalhes:RegisterEvent (ThreatMeter, "DETAILS_INSTANCE_SIZECHANGED") - _G._detalhes:RegisterEvent (ThreatMeter, "DETAILS_INSTANCE_STARTSTRETCH") - _G._detalhes:RegisterEvent (ThreatMeter, "DETAILS_INSTANCE_ENDSTRETCH") - _G._detalhes:RegisterEvent (ThreatMeter, "DETAILS_OPTIONS_MODIFIED") + _G.Details:RegisterEvent (ThreatMeter, "COMBAT_PLAYER_ENTER") + _G.Details:RegisterEvent (ThreatMeter, "COMBAT_PLAYER_LEAVE") + _G.Details:RegisterEvent (ThreatMeter, "DETAILS_INSTANCE_ENDRESIZE") + _G.Details:RegisterEvent (ThreatMeter, "DETAILS_INSTANCE_SIZECHANGED") + _G.Details:RegisterEvent (ThreatMeter, "DETAILS_INSTANCE_STARTSTRETCH") + _G.Details:RegisterEvent (ThreatMeter, "DETAILS_INSTANCE_ENDSTRETCH") + _G.Details:RegisterEvent (ThreatMeter, "DETAILS_OPTIONS_MODIFIED") ThreatMeterFrame:RegisterEvent ("PLAYER_TARGET_CHANGED") ThreatMeterFrame:RegisterEvent ("PLAYER_REGEN_DISABLED") diff --git a/plugins/Details_Vanguard/Details_Vanguard.lua b/plugins/Details_Vanguard/Details_Vanguard.lua index 6c32dfbd..e1c4430d 100644 --- a/plugins/Details_Vanguard/Details_Vanguard.lua +++ b/plugins/Details_Vanguard/Details_Vanguard.lua @@ -56,7 +56,7 @@ local ignored_debuffs = { --------------------------------------------------------------------------------------------- --Create plugin Object -local Vanguard = _detalhes:NewPluginObject ("Details_Vanguard") +local Vanguard = Details:NewPluginObject ("Details_Vanguard") --Main Frame local VanguardFrame = Vanguard.Frame @@ -98,12 +98,12 @@ local function CreatePluginFrames (data) welcome:SetSize(400, 200) DF:ApplyStandardBackdrop(welcome) - local str = _detalhes.gump:CreateLabel(welcome, "Welcome to Vanguard!\n\n\n- The green-left bar represents the incoming healing plus absorbs on the tank.\n\n- The red-right show the incoming damage.\n\n- Tanks health bar and debuffs on them are shown in the bottom side.\n\n- Click anywhere to show options.", nil, nil, "GameFontNormal") + local str = Details.gump:CreateLabel(welcome, "Welcome to Vanguard!\n\n\n- The green-left bar represents the incoming healing plus absorbs on the tank.\n\n- The red-right show the incoming damage.\n\n- Tanks health bar and debuffs on them are shown in the bottom side.\n\n- Click anywhere to show options.", nil, nil, "GameFontNormal") str:SetPoint(15, -15) str:SetWidth(375) - local close_button = _detalhes.gump:CreateButton(welcome, function() welcome:Hide() end, 120, 20, "Close") - close_button:SetTemplate(_detalhes.gump:GetTemplate("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE")) + local close_button = Details.gump:CreateButton(welcome, function() welcome:Hide() end, 120, 20, "Close") + close_button:SetTemplate(Details.gump:GetTemplate("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE")) close_button:SetPoint("center", welcome, "center") close_button:SetPoint("bottom", welcome, "bottom", 0, 10) @@ -118,7 +118,7 @@ local function CreatePluginFrames (data) Vanguard:ResetBars() Vanguard:IdentifyTanks() - Vanguard.CurrentCombat = _detalhes:GetCombat("current") + Vanguard.CurrentCombat = Details:GetCombat("current") VanguardFrame:SetFrameStrata(Vanguard.CurrentInstance.baseframe:GetFrameStrata()) VanguardFrame:SetFrameLevel(Vanguard.CurrentInstance.baseframe:GetFrameLevel()+5) @@ -376,7 +376,7 @@ local function CreatePluginFrames (data) elseif (button == "RightButton") then local instance = Vanguard:GetPluginInstance() if (instance) then - _detalhes.switch:ShowMe(instance) + Details.switch:ShowMe(instance) end end end @@ -1099,7 +1099,7 @@ function Vanguard:OnEvent (_, event, arg1, token, time, who_serial, who_name, wh local AddonName = arg1 if (AddonName == "Details_Vanguard") then - if (_G._detalhes) then + if (_G.Details) then if (DetailsFramework.IsClassicWow()) then return @@ -1127,7 +1127,7 @@ function Vanguard:OnEvent (_, event, arg1, token, time, who_serial, who_name, wh --Install function Vanguard:OnDetailsEvent() end --dummy func to stop warnings. - local install, saveddata = _G._detalhes:InstallPlugin ("TANK", "Vanguard", "Interface\\Icons\\INV_Shield_04", Vanguard, "DETAILS_PLUGIN_VANGUARD", MINIMAL_DETAILS_VERSION_REQUIRED, "Terciob", "v3.0", default_saved_table) + local install, saveddata = _G.Details:InstallPlugin ("TANK", "Vanguard", "Interface\\Icons\\INV_Shield_04", Vanguard, "DETAILS_PLUGIN_VANGUARD", MINIMAL_DETAILS_VERSION_REQUIRED, "Terciob", "v3.0", default_saved_table) if (type(install) == "table" and install.error) then print(install.error) end @@ -1138,12 +1138,12 @@ function Vanguard:OnEvent (_, event, arg1, token, time, who_serial, who_name, wh CreatePluginFrames() --Register needed events - _G._detalhes:RegisterEvent(Vanguard, "COMBAT_PLAYER_ENTER") - _G._detalhes:RegisterEvent(Vanguard, "COMBAT_PLAYER_LEAVE") - _G._detalhes:RegisterEvent(Vanguard, "DETAILS_INSTANCE_ENDRESIZE") - _G._detalhes:RegisterEvent(Vanguard, "DETAILS_INSTANCE_SIZECHANGED") - _G._detalhes:RegisterEvent(Vanguard, "GROUP_ONLEAVE") - _G._detalhes:RegisterEvent(Vanguard, "DETAILS_OPTIONS_MODIFIED") + _G.Details:RegisterEvent(Vanguard, "COMBAT_PLAYER_ENTER") + _G.Details:RegisterEvent(Vanguard, "COMBAT_PLAYER_LEAVE") + _G.Details:RegisterEvent(Vanguard, "DETAILS_INSTANCE_ENDRESIZE") + _G.Details:RegisterEvent(Vanguard, "DETAILS_INSTANCE_SIZECHANGED") + _G.Details:RegisterEvent(Vanguard, "GROUP_ONLEAVE") + _G.Details:RegisterEvent(Vanguard, "DETAILS_OPTIONS_MODIFIED") VanguardFrame:RegisterEvent("ZONE_CHANGED_NEW_AREA") VanguardFrame:RegisterEvent("PLAYER_ENTERING_WORLD") diff --git a/startup.lua b/startup.lua index 5280bab9..1d40a2b0 100644 --- a/startup.lua +++ b/startup.lua @@ -601,7 +601,7 @@ function Details:StartMeUp() end if (DetailsFramework:IsNearlyEqual(Details.class_coords.ROGUE[4], 0.25)) then - DetailsFramework.table.copy(Details.class_coords, _detalhes.default_profile.class_coords) + DetailsFramework.table.copy(Details.class_coords, Details.default_profile.class_coords) end --shutdown the old OnDeathMenu