Fixed more bugs on the new Breakdown Window
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local _
|
||||
local addonName, Details222 = ...
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local _ = nil
|
||||
_detalhes.custom_function_cache = {}
|
||||
local addonName, Details222 = ...
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
do
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local addonName, Details222 = ...
|
||||
|
||||
local _error = {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local _
|
||||
local addonName, Details222 = ...
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 _
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- damage ability file
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local _
|
||||
local addonName, Details222 = ...
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
local Details = _G._detalhes
|
||||
local Details = _G.Details
|
||||
local _
|
||||
local addonName, Details222 = ...
|
||||
local healingAbility = Details.habilidade_cura
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
-- energy ability file
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local _
|
||||
local addonName, Details222 = ...
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- misc ability file
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local _
|
||||
local addonName, Details222 = ...
|
||||
|
||||
|
||||
@@ -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" )
|
||||
|
||||
@@ -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 = ...
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local gump = _detalhes.gump
|
||||
local container_pets = _detalhes.container_pets
|
||||
local _
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
-- spells container file
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local _
|
||||
local addonName, Details222 = ...
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
--customized display script
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local _
|
||||
local addonName, Details222 = ...
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local _
|
||||
local addonName, Details222 = ...
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
+1
-1
@@ -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()
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local addonName, Details222 = ...
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local Details = _detalhes
|
||||
local tocName, Details222 = ...
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
|
||||
local Details = _G._detalhes
|
||||
local Details = _G.Details
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale( "Details" )
|
||||
local _
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local DetailsFramework = DetailsFramework
|
||||
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local _
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
@@ -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 _
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local _tempo = time()
|
||||
local _
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local addonName, Details222 = ...
|
||||
local _
|
||||
|
||||
+1
-1
@@ -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 _
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
|
||||
--code from blizzard AlertFrames
|
||||
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
do
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local DetailsFrameWork = _detalhes.gump
|
||||
local _
|
||||
--panel
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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" )
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
|
||||
local Details = _G._detalhes
|
||||
local Details = _G.Details
|
||||
local DF = _G.DetailsFramework
|
||||
local _
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
+17
-17
@@ -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)
|
||||
|
||||
+362
-362
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 _
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local L = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
|
||||
--default weaktable
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
+3
-3
@@ -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
|
||||
|
||||
@@ -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" )
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
|
||||
do
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local addonName, Details222 = ...
|
||||
_detalhes.EncounterInformation = {}
|
||||
local ipairs = ipairs --lua local
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local _
|
||||
local addonName, Details222 = ...
|
||||
|
||||
@@ -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
|
||||
|
||||
+20
-20
@@ -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()
|
||||
|
||||
+13
-13
@@ -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)))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local _
|
||||
local addonName, Details222 = ...
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
--[[global]] DETAILS_HOOK_BUFF = "HOOK_BUFF" --[[REMOVED--]]
|
||||
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local _
|
||||
local addonName, Details222 = ...
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local _
|
||||
local addonName, Details222 = ...
|
||||
|
||||
+26
-26
@@ -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)
|
||||
|
||||
+85
-85
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local _
|
||||
local addonName, Details222 = ...
|
||||
|
||||
@@ -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()
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local _
|
||||
local addonName, Details222 = ...
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local _
|
||||
local addonName, Details222 = ...
|
||||
|
||||
@@ -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 _
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
do
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local addonName, Details222 = ...
|
||||
|
||||
--import potion list from the framework
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
local _
|
||||
local _detalhes = _G._detalhes
|
||||
local _detalhes = _G.Details
|
||||
local Loc = LibStub("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local addonName, Details222 = ...
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user