- Revamp on Death report.
- Data send to broker now is correctly formated. - Modified the percentage method used on Comparison Panel. - Added options panel for Encounter Details. - New API: _detalhes:GetCurrentCombat() returns the current combat object - New API: _detalhes:GetCombatSegments() returns a numeric table with all stored combats. - New API: _detalhes:GetZoneType() returns the type from GetInstanceInfo(). - New API: _detalhes:InGroup()return true if Details! is considering the player inside a group. - New API: _detalhes:GetOnlyName (string) return self.nome or string without realm name. - New Event: ZONE_TYPE_CHANGED, it's triggered when the player change the zoze type. - New Event: GROUP_ONENTER GROUP_ONLEAVE, trigger when the player left or enter in a group.
This commit is contained in:
@@ -4,9 +4,9 @@
|
||||
_ = nil
|
||||
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0", "LibHotCorners")
|
||||
|
||||
_detalhes.version = "v1.18.6 (core 22)"
|
||||
_detalhes.userversion = "v1.18.6"
|
||||
_detalhes.build_counter = 9
|
||||
_detalhes.version = "v1.19.0 (core 22)"
|
||||
_detalhes.userversion = "v1.19.0"
|
||||
_detalhes.build_counter = 9 --it's 11 for release
|
||||
_detalhes.realversion = 22
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -268,10 +268,85 @@ local function RefreshBarraMorte (morte, barra, instancia)
|
||||
atributo_misc:DeadAtualizarBarra (morte, morte.minha_barra, barra.colocacao, instancia)
|
||||
end
|
||||
|
||||
--objeto death:
|
||||
--[1] tabela [2] time [3] nome [4] classe [5] maxhealth [6] time of death
|
||||
--[1] true damage/ false heal [2] spellid [3] amount [4] time [5] current health [6] source
|
||||
|
||||
function atributo_misc:ReportSingleDeadLine (morte, instancia)
|
||||
|
||||
local barra = instancia.barras [morte.minha_barra]
|
||||
|
||||
local max_health = morte [5]
|
||||
local time_of_death = morte [2]
|
||||
|
||||
do
|
||||
if (not _detalhes.fontstring_len) then
|
||||
_detalhes.fontstring_len = _detalhes.listener:CreateFontString (nil, "background", "GameFontNormal")
|
||||
end
|
||||
local _, fontSize = FCF_GetChatWindowInfo (1)
|
||||
if (fontSize < 1) then
|
||||
fontSize = 10
|
||||
end
|
||||
local fonte, _, flags = _detalhes.fontstring_len:GetFont()
|
||||
_detalhes.fontstring_len:SetFont (fonte, fontSize, flags)
|
||||
_detalhes.fontstring_len:SetText ("thisisspacement")
|
||||
end
|
||||
local default_len = _detalhes.fontstring_len:GetStringWidth()
|
||||
|
||||
local reportar = {"Details! " .. Loc ["STRING_REPORT_SINGLE_DEATH"] .. " " .. morte [3] .. " " .. Loc ["STRING_ACTORFRAME_REPORTAT"] .. " " .. morte [6]}
|
||||
|
||||
local report_array = {}
|
||||
|
||||
for index, evento in _ipairs (morte [1]) do
|
||||
if (evento [1] and type (evento [1]) == "boolean") then --> damage
|
||||
if (evento [3]) then
|
||||
local elapsed = _cstr ("%.1f", evento [4] - time_of_death) .."s"
|
||||
local spelllink = GetSpellLink (evento [2])
|
||||
local source = _detalhes:GetOnlyName (evento [6])
|
||||
local spellname, _, spellicon = _GetSpellInfo (evento [2])
|
||||
local amount = evento [3]
|
||||
local hp = _math_floor (evento [5] / max_health * 100)
|
||||
if (hp > 100) then
|
||||
hp = 100
|
||||
end
|
||||
|
||||
tinsert (report_array, {elapsed .. " ", spelllink, " (" .. source .. ")", "-" .. _detalhes:ToK (amount) .. " (" .. hp .. "%) "})
|
||||
end
|
||||
|
||||
elseif (not evento [1]) then --> heal
|
||||
local elapsed = _cstr ("%.1f", evento [4] - time_of_death) .."s"
|
||||
local spelllink = GetSpellLink (evento [2])
|
||||
local source = _detalhes:GetOnlyName (evento [6])
|
||||
local spellname, _, spellicon = _GetSpellInfo (evento [2])
|
||||
local amount = evento [3]
|
||||
local hp = _math_floor (evento [5] / max_health * 100)
|
||||
if (hp > 100) then
|
||||
hp = 100
|
||||
end
|
||||
|
||||
tinsert (report_array, {elapsed .. " ", spellname, " (" .. source .. ")", "+" .. _detalhes:ToK (amount) .. " (" .. hp .. "%) "})
|
||||
end
|
||||
end
|
||||
|
||||
-- ELAPSED | HP | LINK | SOURCE
|
||||
local bigger_len = 0
|
||||
for index, table in _ipairs (report_array) do
|
||||
local spell = table [2] --[[
|
||||
_detalhes.fontstring_len:SetText (spell)
|
||||
local stringlen = _detalhes.fontstring_len:GetStringWidth()
|
||||
while (stringlen < default_len) do
|
||||
spell = spell .. " "
|
||||
_detalhes.fontstring_len:SetText (spell)
|
||||
stringlen = _detalhes.fontstring_len:GetStringWidth()
|
||||
end
|
||||
table [2] = spell--]]
|
||||
reportar [#reportar+1] = table [1] .. table [4] .. spell .. table [3]
|
||||
end
|
||||
|
||||
return _detalhes:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true})
|
||||
|
||||
--[[
|
||||
local barra = instancia.barras [morte.minha_barra]
|
||||
local reportar = {"Details! " .. Loc ["STRING_REPORT_SINGLE_DEATH"] .. " " .. morte [3] .. " " .. barra.texto_esquerdo:GetText()} --> localize-me
|
||||
for i = 1, GameCooltip:GetNumLines() do
|
||||
local texto_left, texto_right = GameCooltip:GetText (i)
|
||||
@@ -281,8 +356,8 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia)
|
||||
reportar [#reportar+1] = ""..texto_left.." "..texto_right..""
|
||||
end
|
||||
end
|
||||
|
||||
return _detalhes:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true})
|
||||
--]]
|
||||
end
|
||||
|
||||
function atributo_misc:ReportSingleCooldownLine (misc_actor, instancia)
|
||||
|
||||
@@ -44,6 +44,13 @@ function historico:adicionar_overall (tabela)
|
||||
_detalhes:ClockPluginTickOnSegment()
|
||||
end
|
||||
|
||||
function _detalhes:GetCurrentCombat()
|
||||
return _detalhes.tabela_vigente
|
||||
end
|
||||
function _detalhes:GetCombatSegments()
|
||||
return _detalhes.tabela_historico.tabelas
|
||||
end
|
||||
|
||||
--> sai do combate, chamou adicionar a tabela ao histórico
|
||||
function historico:adicionar (tabela)
|
||||
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@
|
||||
if (lower_instance) then
|
||||
lower_instance = _detalhes:GetInstance (lower_instance)
|
||||
if (lower_instance) then
|
||||
lower_instance:InstanceAlert ("Update Available!", {[[Interface\GossipFrame\AvailableQuestIcon]], 16, 16, false}, 60, {_detalhes.OpenUpdateWindow})
|
||||
lower_instance:InstanceAlert ("Update Available!", {[[Interface\GossipFrame\AvailableQuestIcon]], 16, 16, false}, 360, {_detalhes.OpenUpdateWindow})
|
||||
end
|
||||
end
|
||||
_detalhes.lastUpdateWarning = time()
|
||||
|
||||
+13
-1
@@ -2510,12 +2510,19 @@
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- PARSER
|
||||
--serach key: ~parser ~event ~start ~inicio
|
||||
function _detalhes:GetZoneType()
|
||||
return _detalhes.zone_type
|
||||
end
|
||||
function _detalhes.parser_functions:ZONE_CHANGED_NEW_AREA (...)
|
||||
local zoneName, zoneType, _, _, _, _, _, zoneMapID = _GetInstanceInfo()
|
||||
|
||||
if (_detalhes.last_zone_type ~= zoneType) then
|
||||
_detalhes:SendEvent ("ZONE_TYPE_CHANGED", nil, zoneType)
|
||||
_detalhes.last_zone_type = zoneType
|
||||
end
|
||||
|
||||
_detalhes.zone_type = zoneType
|
||||
_detalhes.zone_id = zoneMapID
|
||||
_detalhes.zone_name = zoneName
|
||||
@@ -2744,6 +2751,9 @@
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:InGroup()
|
||||
return _detalhes.in_group
|
||||
end
|
||||
function _detalhes.parser_functions:GROUP_ROSTER_UPDATE (...)
|
||||
if (not _detalhes.in_group) then
|
||||
_detalhes.in_group = IsInGroup() or IsInRaid()
|
||||
@@ -2755,6 +2765,7 @@
|
||||
_detalhes:InstanceCall (_detalhes.SetCombatAlpha, nil, nil, true)
|
||||
_detalhes:CheckSwitchOnLogon()
|
||||
_detalhes:CheckVersion()
|
||||
_detalhes:SendEvent ("GROUP_ONENTER")
|
||||
end
|
||||
else
|
||||
_detalhes.in_group = IsInGroup() or IsInRaid()
|
||||
@@ -2766,6 +2777,7 @@
|
||||
_table_wipe (_detalhes.details_users)
|
||||
_detalhes:InstanceCall (_detalhes.SetCombatAlpha, nil, nil, true)
|
||||
_detalhes:CheckSwitchOnLogon()
|
||||
_detalhes:SendEvent ("GROUP_ONLEAVE")
|
||||
else
|
||||
_detalhes:SchedulePetUpdate (2)
|
||||
end
|
||||
|
||||
+24
-1
@@ -18,8 +18,26 @@
|
||||
function _detalhes:GetPluginSavedTable (PluginAbsoluteName)
|
||||
return _detalhes.plugin_database [PluginAbsoluteName]
|
||||
end
|
||||
|
||||
function _detalhes:CheckDefaultTable (current, default)
|
||||
for key, value in pairs (default) do
|
||||
if (type (value) == "table") then
|
||||
if (type (current [key]) ~= "table") then
|
||||
current [key] = table_deepcopy (value)
|
||||
else
|
||||
_detalhes:CheckDefaultTable (current [key], value)
|
||||
end
|
||||
else
|
||||
if (current [key] == nil) then
|
||||
current [key] = value
|
||||
elseif (type (current [key]) ~= type (value)) then
|
||||
current [key] = value
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:InstallPlugin (PluginType, PluginName, PluginIcon, PluginObject, PluginAbsoluteName, MinVersion, Author, Version)
|
||||
function _detalhes:InstallPlugin (PluginType, PluginName, PluginIcon, PluginObject, PluginAbsoluteName, MinVersion, Author, Version, DefaultSavedTable)
|
||||
|
||||
if (MinVersion and MinVersion > _detalhes.realversion) then
|
||||
print (PluginName, Loc ["STRING_TOOOLD"])
|
||||
@@ -60,11 +78,16 @@
|
||||
|
||||
if (PluginType ~= "STATUSBAR") then
|
||||
saved_table = _detalhes.plugin_database [PluginAbsoluteName]
|
||||
|
||||
if (not saved_table) then
|
||||
saved_table = {enabled = true, author = Author or "--------"}
|
||||
_detalhes.plugin_database [PluginAbsoluteName] = saved_table
|
||||
end
|
||||
|
||||
if (DefaultSavedTable) then
|
||||
_detalhes:CheckDefaultTable (saved_table, DefaultSavedTable)
|
||||
end
|
||||
|
||||
PluginObject.__enabled = saved_table.enabled
|
||||
end
|
||||
|
||||
|
||||
@@ -134,4 +134,49 @@ function gump:ParseColors (_arg1, _arg2, _arg3, _arg4)
|
||||
end
|
||||
|
||||
return _arg1, _arg2, _arg3, _arg4
|
||||
end
|
||||
|
||||
function gump:BuildMenu (parent, menu, x_offset, y_offset, height)
|
||||
|
||||
local cur_x = x_offset
|
||||
local cur_y = y_offset
|
||||
local max_x = 0
|
||||
|
||||
for index, widget_table in ipairs (menu) do
|
||||
|
||||
if (widget_table.type == "select" or widget_table.type == "dropdown") then
|
||||
local dropdown = self:NewDropDown (parent, nil, "$parentWidget" .. index, nil, 140, 18, widget_table.values, widget_table.get())
|
||||
dropdown.tooltip = widget_table.desc
|
||||
local label = self:NewLabel (parent, nil, "$parentLabel" .. index, nil, widget_table.name, "GameFontNormal", 12)
|
||||
dropdown:SetPoint ("left", label, "right", 2)
|
||||
label:SetPoint (cur_x, cur_y)
|
||||
|
||||
local size = label.widget:GetStringWidth() + 140 + 4
|
||||
if (size > max_x) then
|
||||
max_x = size
|
||||
end
|
||||
|
||||
elseif (widget_table.type == "toggle" or widget_table.type == "switch") then
|
||||
local switch = self:NewSwitch (parent, nil, "$parentWidget" .. index, nil, 60, 20, nil, nil, widget_table.get())
|
||||
switch.tooltip = widget_table.desc
|
||||
switch.OnSwitch = widget_table.set
|
||||
|
||||
local label = self:NewLabel (parent, nil, "$parentLabel" .. index, nil, widget_table.name, "GameFontNormal", 12)
|
||||
switch:SetPoint ("left", label, "right", 2)
|
||||
label:SetPoint (cur_x, cur_y)
|
||||
|
||||
local size = label.widget:GetStringWidth() + 60 + 4
|
||||
if (size > max_x) then
|
||||
max_x = size
|
||||
end
|
||||
end
|
||||
|
||||
cur_y = cur_y - 20
|
||||
if (cur_y > height) then
|
||||
cur_y = y_offset
|
||||
cur_x = max_x
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
@@ -109,6 +109,12 @@ do
|
||||
function _detalhes:GetDisplayName (actor)
|
||||
return self.displayName or actor.displayName
|
||||
end
|
||||
function _detalhes:GetOnlyName (string)
|
||||
if (string) then
|
||||
return string:gsub (("%-.*"), "")
|
||||
end
|
||||
return self.nome:gsub (("%-.*"), "")
|
||||
end
|
||||
function _detalhes:Class (actor)
|
||||
return self.classe or actor.classe
|
||||
end
|
||||
|
||||
+131
-425
@@ -10,22 +10,21 @@
|
||||
local _
|
||||
--> Event types:
|
||||
_detalhes.RegistredEvents = {
|
||||
--> details self events
|
||||
--> instances
|
||||
["DETAILS_INSTANCE_OPEN"] = {},
|
||||
["DETAILS_INSTANCE_CLOSE"] = {},
|
||||
["DETAILS_INSTANCE_SIZECHANGED"] = {},
|
||||
["DETAILS_INSTANCE_STARTRESIZE"] = {},
|
||||
["DETAILS_INSTANCE_ENDRESIZE"] = {},
|
||||
["DETAILS_INSTANCE_STARTSTRETCH"] = {},
|
||||
["DETAILS_INSTANCE_ENDSTRETCH"] = {},
|
||||
["DETAILS_INSTANCE_CHANGESEGMENT"] = {},
|
||||
["DETAILS_INSTANCE_CHANGEATTRIBUTE"] = {},
|
||||
["DETAILS_INSTANCE_CHANGEMODE"] = {},
|
||||
|
||||
--> data
|
||||
["DETAILS_DATA_RESET"] = {},
|
||||
["DETAILS_DATA_SEGMENTREMOVED"] = {},
|
||||
--> instances
|
||||
["DETAILS_INSTANCE_OPEN"] = {},
|
||||
["DETAILS_INSTANCE_CLOSE"] = {},
|
||||
["DETAILS_INSTANCE_SIZECHANGED"] = {},
|
||||
["DETAILS_INSTANCE_STARTRESIZE"] = {},
|
||||
["DETAILS_INSTANCE_ENDRESIZE"] = {},
|
||||
["DETAILS_INSTANCE_STARTSTRETCH"] = {},
|
||||
["DETAILS_INSTANCE_ENDSTRETCH"] = {},
|
||||
["DETAILS_INSTANCE_CHANGESEGMENT"] = {},
|
||||
["DETAILS_INSTANCE_CHANGEATTRIBUTE"] = {},
|
||||
["DETAILS_INSTANCE_CHANGEMODE"] = {},
|
||||
|
||||
--> data
|
||||
["DETAILS_DATA_RESET"] = {},
|
||||
["DETAILS_DATA_SEGMENTREMOVED"] = {},
|
||||
|
||||
--> combat
|
||||
["COMBAT_PLAYER_ENTER"] = {},
|
||||
@@ -33,6 +32,13 @@
|
||||
["COMBAT_PLAYER_TIMESTARTED"] = {},
|
||||
["COMBAT_BOSS_FOUND"] = {},
|
||||
|
||||
--> area
|
||||
["ZONE_TYPE_CHANGED"] = {},
|
||||
|
||||
--> roster
|
||||
["GROUP_ONENTER"] = {},
|
||||
["GROUP_ONLEAVE"] = {},
|
||||
|
||||
--> buffs
|
||||
["BUFF_UPDATE"] = {},
|
||||
["BUFF_UPDATE_DEBUFFPOWER"] = {}
|
||||
@@ -51,439 +57,139 @@
|
||||
return false
|
||||
end
|
||||
|
||||
local common_events = {
|
||||
["DETAILS_INSTANCE_OPEN"] = true,
|
||||
["DETAILS_INSTANCE_CLOSE"] = true,
|
||||
["DETAILS_INSTANCE_SIZECHANGED"] = true,
|
||||
["DETAILS_INSTANCE_STARTRESIZE"] = true,
|
||||
["DETAILS_INSTANCE_ENDRESIZE"] = true,
|
||||
["DETAILS_INSTANCE_STARTSTRETCH"] = true,
|
||||
["DETAILS_INSTANCE_ENDSTRETCH"] = true,
|
||||
["DETAILS_INSTANCE_CHANGESEGMENT"] = true,
|
||||
["DETAILS_INSTANCE_CHANGEATTRIBUTE"] = true,
|
||||
["DETAILS_INSTANCE_CHANGEMODE"] = true,
|
||||
["DETAILS_DATA_RESET"] = true,
|
||||
["DETAILS_DATA_SEGMENTREMOVED"] = true,
|
||||
["COMBAT_PLAYER_ENTER"] = true,
|
||||
["COMBAT_PLAYER_LEAVE"] = true,
|
||||
["COMBAT_PLAYER_TIMESTARTED"] = true,
|
||||
["COMBAT_BOSS_FOUND"] = true,
|
||||
["GROUP_ONENTER"] = true,
|
||||
["GROUP_ONLEAVE"] = true,
|
||||
}
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> details api functions
|
||||
--> register a event
|
||||
|
||||
--> Register a Event
|
||||
function _detalhes:RegisterEvent (object, event, func)
|
||||
|
||||
-------> combat -------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
if (event == "COMBAT_PLAYER_ENTER") then
|
||||
|
||||
if (not AlreadyRegistred (_detalhes.RegistredEvents ["COMBAT_PLAYER_ENTER"], object)) then
|
||||
if (func) then
|
||||
tinsert (_detalhes.RegistredEvents ["COMBAT_PLAYER_ENTER"], {object, func, __eventtable = true})
|
||||
else
|
||||
tinsert (_detalhes.RegistredEvents ["COMBAT_PLAYER_ENTER"], object)
|
||||
end
|
||||
return true
|
||||
if (not _detalhes.RegistredEvents [event]) then
|
||||
if (object.Msg) then
|
||||
object:Msg ("(debug) unknown event", event)
|
||||
else
|
||||
return false
|
||||
_detalhes:Msg ("(debug) unknown event", event)
|
||||
end
|
||||
|
||||
elseif (event == "COMBAT_PLAYER_LEAVE") then
|
||||
if (not AlreadyRegistred (_detalhes.RegistredEvents ["COMBAT_PLAYER_LEAVE"], object)) then
|
||||
if (func) then
|
||||
tinsert (_detalhes.RegistredEvents ["COMBAT_PLAYER_LEAVE"], {object, func, __eventtable = true})
|
||||
else
|
||||
tinsert (_detalhes.RegistredEvents ["COMBAT_PLAYER_LEAVE"], object)
|
||||
end
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "COMBAT_PLAYER_TIMESTARTED") then
|
||||
if (not AlreadyRegistred (_detalhes.RegistredEvents ["COMBAT_PLAYER_TIMESTARTED"], object)) then
|
||||
if (func) then
|
||||
tinsert (_detalhes.RegistredEvents ["COMBAT_PLAYER_TIMESTARTED"], {object, func, __eventtable = true})
|
||||
else
|
||||
tinsert (_detalhes.RegistredEvents ["COMBAT_PLAYER_TIMESTARTED"], object)
|
||||
end
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "COMBAT_BOSS_FOUND") then
|
||||
if (not AlreadyRegistred (_detalhes.RegistredEvents ["COMBAT_BOSS_FOUND"], object)) then
|
||||
if (func) then
|
||||
tinsert (_detalhes.RegistredEvents ["COMBAT_BOSS_FOUND"], {object, func, __eventtable = true})
|
||||
else
|
||||
tinsert (_detalhes.RegistredEvents ["COMBAT_BOSS_FOUND"], object)
|
||||
end
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
-------> buffs -------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
elseif (event == "BUFF_UPDATE") then
|
||||
if (not AlreadyRegistred (_detalhes.RegistredEvents ["BUFF_UPDATE"], object)) then
|
||||
if (func) then
|
||||
tinsert (_detalhes.RegistredEvents ["BUFF_UPDATE"], {object, func, __eventtable = true})
|
||||
else
|
||||
tinsert (_detalhes.RegistredEvents ["BUFF_UPDATE"], object)
|
||||
end
|
||||
_detalhes.Buffs:CatchBuffs()
|
||||
_detalhes.RecordPlayerSelfBuffs = true
|
||||
_detalhes:UpdateParserGears()
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "BUFF_UPDATE_DEBUFFPOWER") then
|
||||
if (not AlreadyRegistred (_detalhes.RegistredEvents ["BUFF_UPDATE_DEBUFFPOWER"], object)) then
|
||||
if (func) then
|
||||
tinsert (_detalhes.RegistredEvents ["BUFF_UPDATE_DEBUFFPOWER"], {object, func, __eventtable = true})
|
||||
else
|
||||
tinsert (_detalhes.RegistredEvents ["BUFF_UPDATE_DEBUFFPOWER"], object)
|
||||
end
|
||||
_detalhes.RecordPlayerAbilityWithBuffs = true
|
||||
_detalhes:UpdateDamageAbilityGears()
|
||||
_detalhes:UpdateParserGears()
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
-------> Addon Instances -------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
elseif (event == "DETAILS_INSTANCE_OPEN") then
|
||||
if (not AlreadyRegistred (_detalhes.RegistredEvents ["DETAILS_INSTANCE_OPEN"], object)) then
|
||||
if (func) then
|
||||
tinsert (_detalhes.RegistredEvents ["DETAILS_INSTANCE_OPEN"], {object, func, __eventtable = true})
|
||||
else
|
||||
tinsert (_detalhes.RegistredEvents ["DETAILS_INSTANCE_OPEN"], object)
|
||||
end
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "DETAILS_INSTANCE_CLOSE") then
|
||||
if (not AlreadyRegistred (_detalhes.RegistredEvents ["DETAILS_INSTANCE_CLOSE"], object)) then
|
||||
if (func) then
|
||||
tinsert (_detalhes.RegistredEvents ["DETAILS_INSTANCE_CLOSE"], {object, func, __eventtable = true})
|
||||
else
|
||||
tinsert (_detalhes.RegistredEvents ["DETAILS_INSTANCE_CLOSE"], object)
|
||||
end
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "DETAILS_INSTANCE_SIZECHANGED") then
|
||||
if (not AlreadyRegistred (_detalhes.RegistredEvents ["DETAILS_INSTANCE_SIZECHANGED"], object)) then
|
||||
if (func) then
|
||||
tinsert (_detalhes.RegistredEvents ["DETAILS_INSTANCE_SIZECHANGED"], {object, func, __eventtable = true})
|
||||
else
|
||||
tinsert (_detalhes.RegistredEvents ["DETAILS_INSTANCE_SIZECHANGED"], object)
|
||||
end
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "DETAILS_INSTANCE_STARTRESIZE") then
|
||||
if (not AlreadyRegistred (_detalhes.RegistredEvents ["DETAILS_INSTANCE_STARTRESIZE"], object)) then
|
||||
if (func) then
|
||||
tinsert (_detalhes.RegistredEvents ["DETAILS_INSTANCE_STARTRESIZE"], {object, func, __eventtable = true})
|
||||
else
|
||||
tinsert (_detalhes.RegistredEvents ["DETAILS_INSTANCE_STARTRESIZE"], object)
|
||||
end
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "DETAILS_INSTANCE_ENDRESIZE") then
|
||||
if (not AlreadyRegistred (_detalhes.RegistredEvents ["DETAILS_INSTANCE_ENDRESIZE"], object)) then
|
||||
if (func) then
|
||||
tinsert (_detalhes.RegistredEvents ["DETAILS_INSTANCE_ENDRESIZE"], {object, func, __eventtable = true})
|
||||
else
|
||||
tinsert (_detalhes.RegistredEvents ["DETAILS_INSTANCE_ENDRESIZE"], object)
|
||||
end
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "DETAILS_INSTANCE_ENDSTRETCH") then
|
||||
if (not AlreadyRegistred (_detalhes.RegistredEvents ["DETAILS_INSTANCE_ENDSTRETCH"], object)) then
|
||||
if (func) then
|
||||
tinsert (_detalhes.RegistredEvents ["DETAILS_INSTANCE_ENDSTRETCH"], {object, func, __eventtable = true})
|
||||
else
|
||||
tinsert (_detalhes.RegistredEvents ["DETAILS_INSTANCE_ENDSTRETCH"], object)
|
||||
end
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "DETAILS_INSTANCE_STARTSTRETCH") then
|
||||
if (not AlreadyRegistred (_detalhes.RegistredEvents ["DETAILS_INSTANCE_STARTSTRETCH"], object)) then
|
||||
if (func) then
|
||||
tinsert (_detalhes.RegistredEvents ["DETAILS_INSTANCE_STARTSTRETCH"], {object, func, __eventtable = true})
|
||||
else
|
||||
tinsert (_detalhes.RegistredEvents ["DETAILS_INSTANCE_STARTSTRETCH"], object)
|
||||
end
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "DETAILS_INSTANCE_CHANGESEGMENT") then
|
||||
if (not AlreadyRegistred (_detalhes.RegistredEvents ["DETAILS_INSTANCE_CHANGESEGMENT"], object)) then
|
||||
if (func) then
|
||||
tinsert (_detalhes.RegistredEvents ["DETAILS_INSTANCE_CHANGESEGMENT"], {object, func, __eventtable = true})
|
||||
else
|
||||
tinsert (_detalhes.RegistredEvents ["DETAILS_INSTANCE_CHANGESEGMENT"], object)
|
||||
end
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "DETAILS_INSTANCE_CHANGEATTRIBUTE") then
|
||||
if (not AlreadyRegistred (_detalhes.RegistredEvents ["DETAILS_INSTANCE_CHANGEATTRIBUTE"], object)) then
|
||||
if (func) then
|
||||
tinsert (_detalhes.RegistredEvents ["DETAILS_INSTANCE_CHANGEATTRIBUTE"], {object, func, __eventtable = true})
|
||||
else
|
||||
tinsert (_detalhes.RegistredEvents ["DETAILS_INSTANCE_CHANGEATTRIBUTE"], object)
|
||||
end
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "DETAILS_INSTANCE_CHANGEMODE") then
|
||||
if (not AlreadyRegistred (_detalhes.RegistredEvents ["DETAILS_INSTANCE_CHANGEMODE"], object)) then
|
||||
if (func) then
|
||||
tinsert (_detalhes.RegistredEvents ["DETAILS_INSTANCE_CHANGEMODE"], {object, func, __eventtable = true})
|
||||
else
|
||||
tinsert (_detalhes.RegistredEvents ["DETAILS_INSTANCE_CHANGEMODE"], object)
|
||||
end
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "DETAILS_DATA_RESET") then
|
||||
if (not AlreadyRegistred (_detalhes.RegistredEvents ["DETAILS_DATA_RESET"], object)) then
|
||||
if (func) then
|
||||
tinsert (_detalhes.RegistredEvents ["DETAILS_DATA_RESET"], {object, func, __eventtable = true})
|
||||
else
|
||||
tinsert (_detalhes.RegistredEvents ["DETAILS_DATA_RESET"], object)
|
||||
end
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "DETAILS_DATA_SEGMENTREMOVED") then
|
||||
if (not AlreadyRegistred (_detalhes.RegistredEvents ["DETAILS_DATA_SEGMENTREMOVED"], object)) then
|
||||
if (func) then
|
||||
tinsert (_detalhes.RegistredEvents ["DETAILS_DATA_SEGMENTREMOVED"], {object, func, __eventtable = true})
|
||||
else
|
||||
tinsert (_detalhes.RegistredEvents ["DETAILS_DATA_SEGMENTREMOVED"], object)
|
||||
end
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> Unregister a Event
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
function _detalhes:UnregisterEvent (object, event)
|
||||
|
||||
-------> combat -------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
if (event == "COMBAT_PLAYER_ENTER") then
|
||||
local index = AlreadyRegistred (_detalhes.RegistredEvents ["COMBAT_PLAYER_ENTER"], object)
|
||||
if (index) then
|
||||
table.remove (_detalhes.RegistredEvents ["COMBAT_PLAYER_ENTER"], index)
|
||||
if (common_events [event]) then
|
||||
if (not AlreadyRegistred (_detalhes.RegistredEvents [event], object)) then
|
||||
if (func) then
|
||||
tinsert (_detalhes.RegistredEvents [event], {object, func, __eventtable = true})
|
||||
else
|
||||
tinsert (_detalhes.RegistredEvents [event], object)
|
||||
end
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "COMBAT_PLAYER_LEAVE") then
|
||||
local index = AlreadyRegistred (_detalhes.RegistredEvents ["COMBAT_PLAYER_LEAVE"], object)
|
||||
if (index) then
|
||||
table.remove (_detalhes.RegistredEvents ["COMBAT_PLAYER_LEAVE"], index)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "COMBAT_PLAYER_TIMESTARTED") then
|
||||
local index = AlreadyRegistred (_detalhes.RegistredEvents ["COMBAT_PLAYER_TIMESTARTED"], object)
|
||||
if (index) then
|
||||
table.remove (_detalhes.RegistredEvents ["COMBAT_PLAYER_TIMESTARTED"], index)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "COMBAT_BOSS_FOUND") then
|
||||
local index = AlreadyRegistred (_detalhes.RegistredEvents ["COMBAT_BOSS_FOUND"], object)
|
||||
if (index) then
|
||||
table.remove (_detalhes.RegistredEvents ["COMBAT_BOSS_FOUND"], index)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
-------> buffs -------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
elseif (event == "BUFF_UPDATE") then
|
||||
local index = AlreadyRegistred (_detalhes.RegistredEvents ["BUFF_UPDATE"], object)
|
||||
if (index) then
|
||||
table.remove (_detalhes.RegistredEvents ["BUFF_UPDATE"], index)
|
||||
if (#_detalhes.RegistredEvents ["BUFF_UPDATE"] < 1) then
|
||||
else
|
||||
if (event == "BUFF_UPDATE") then
|
||||
if (not AlreadyRegistred (_detalhes.RegistredEvents ["BUFF_UPDATE"], object)) then
|
||||
if (func) then
|
||||
tinsert (_detalhes.RegistredEvents ["BUFF_UPDATE"], {object, func, __eventtable = true})
|
||||
else
|
||||
tinsert (_detalhes.RegistredEvents ["BUFF_UPDATE"], object)
|
||||
end
|
||||
_detalhes.Buffs:CatchBuffs()
|
||||
_detalhes.RecordPlayerSelfBuffs = true
|
||||
_detalhes:UpdateParserGears()
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "BUFF_UPDATE_DEBUFFPOWER") then
|
||||
local index = AlreadyRegistred (_detalhes.RegistredEvents ["BUFF_UPDATE_DEBUFFPOWER"], object)
|
||||
if (index) then
|
||||
table.remove (_detalhes.RegistredEvents ["BUFF_UPDATE_DEBUFFPOWER"], index)
|
||||
if (#_detalhes.RegistredEvents ["BUFF_UPDATE_DEBUFFPOWER"] < 1) then
|
||||
_detalhes.RecordPlayerAbilityWithBuffs = false
|
||||
|
||||
elseif (event == "BUFF_UPDATE_DEBUFFPOWER") then
|
||||
if (not AlreadyRegistred (_detalhes.RegistredEvents ["BUFF_UPDATE_DEBUFFPOWER"], object)) then
|
||||
if (func) then
|
||||
tinsert (_detalhes.RegistredEvents ["BUFF_UPDATE_DEBUFFPOWER"], {object, func, __eventtable = true})
|
||||
else
|
||||
tinsert (_detalhes.RegistredEvents ["BUFF_UPDATE_DEBUFFPOWER"], object)
|
||||
end
|
||||
_detalhes.RecordPlayerAbilityWithBuffs = true
|
||||
_detalhes:UpdateDamageAbilityGears()
|
||||
_detalhes:UpdateParserGears()
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
-------> Addon Instances -------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
elseif (event == "DETAILS_INSTANCE_OPEN") then
|
||||
local index = AlreadyRegistred (_detalhes.RegistredEvents ["DETAILS_INSTANCE_OPEN"], object)
|
||||
if (index) then
|
||||
table.remove (_detalhes.RegistredEvents ["DETAILS_INSTANCE_OPEN"], index)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "DETAILS_INSTANCE_CLOSE") then
|
||||
local index = AlreadyRegistred (_detalhes.RegistredEvents ["DETAILS_INSTANCE_CLOSE"], object)
|
||||
if (index) then
|
||||
table.remove (_detalhes.RegistredEvents ["DETAILS_INSTANCE_CLOSE"], index)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "DETAILS_INSTANCE_SIZECHANGED") then
|
||||
local index = AlreadyRegistred (_detalhes.RegistredEvents ["DETAILS_INSTANCE_SIZECHANGED"], object)
|
||||
if (index) then
|
||||
table.remove (_detalhes.RegistredEvents ["DETAILS_INSTANCE_SIZECHANGED"], index)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "DETAILS_INSTANCE_STARTRESIZE") then
|
||||
local index = AlreadyRegistred (_detalhes.RegistredEvents ["DETAILS_INSTANCE_STARTRESIZE"], object)
|
||||
if (index) then
|
||||
table.remove (_detalhes.RegistredEvents ["DETAILS_INSTANCE_STARTRESIZE"], index)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "DETAILS_INSTANCE_ENDRESIZE") then
|
||||
local index = AlreadyRegistred (_detalhes.RegistredEvents ["DETAILS_INSTANCE_ENDRESIZE"], object)
|
||||
if (index) then
|
||||
table.remove (_detalhes.RegistredEvents ["DETAILS_INSTANCE_ENDRESIZE"], index)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "DETAILS_INSTANCE_ENDSTRETCH") then
|
||||
local index = AlreadyRegistred (_detalhes.RegistredEvents ["DETAILS_INSTANCE_ENDSTRETCH"], object)
|
||||
if (index) then
|
||||
table.remove (_detalhes.RegistredEvents ["DETAILS_INSTANCE_ENDSTRETCH"], index)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "DETAILS_INSTANCE_STARTSTRETCH") then
|
||||
local index = AlreadyRegistred (_detalhes.RegistredEvents ["DETAILS_INSTANCE_STARTSTRETCH"], object)
|
||||
if (index) then
|
||||
table.remove (_detalhes.RegistredEvents ["DETAILS_INSTANCE_STARTSTRETCH"], index)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "DETAILS_INSTANCE_CHANGESEGMENT") then
|
||||
local index = AlreadyRegistred (_detalhes.RegistredEvents ["DETAILS_INSTANCE_CHANGESEGMENT"], object)
|
||||
if (index) then
|
||||
table.remove (_detalhes.RegistredEvents ["DETAILS_INSTANCE_CHANGESEGMENT"], index)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "DETAILS_INSTANCE_CHANGEATTRIBUTE") then
|
||||
local index = AlreadyRegistred (_detalhes.RegistredEvents ["DETAILS_INSTANCE_CHANGEATTRIBUTE"], object)
|
||||
if (index) then
|
||||
table.remove (_detalhes.RegistredEvents ["DETAILS_INSTANCE_CHANGEATTRIBUTE"], index)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "DETAILS_INSTANCE_CHANGEMODE") then
|
||||
local index = AlreadyRegistred (_detalhes.RegistredEvents ["DETAILS_INSTANCE_CHANGEMODE"], object)
|
||||
if (index) then
|
||||
table.remove (_detalhes.RegistredEvents ["DETAILS_INSTANCE_CHANGEMODE"], index)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "DETAILS_DATA_RESET") then
|
||||
local index = AlreadyRegistred (_detalhes.RegistredEvents ["DETAILS_DATA_RESET"], object)
|
||||
if (index) then
|
||||
table.remove (_detalhes.RegistredEvents ["DETAILS_DATA_RESET"], index)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "DETAILS_DATA_SEGMENTREMOVED") then
|
||||
local index = AlreadyRegistred (_detalhes.RegistredEvents ["DETAILS_DATA_SEGMENTREMOVED"], object)
|
||||
if (index) then
|
||||
table.remove (_detalhes.RegistredEvents ["DETAILS_DATA_SEGMENTREMOVED"], index)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> Unregister a Event
|
||||
|
||||
function _detalhes:UnregisterEvent (object, event)
|
||||
|
||||
if (not _detalhes.RegistredEvents [event]) then
|
||||
if (object.Msg) then
|
||||
object:Msg ("(debug) unknown event", event)
|
||||
else
|
||||
_detalhes:Msg ("(debug) unknown event", event)
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
if (common_events [event]) then
|
||||
local index = AlreadyRegistred (_detalhes.RegistredEvents [event], object)
|
||||
if (index) then
|
||||
table.remove (_detalhes.RegistredEvents [event], index)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
else
|
||||
if (event == "BUFF_UPDATE") then
|
||||
local index = AlreadyRegistred (_detalhes.RegistredEvents ["BUFF_UPDATE"], object)
|
||||
if (index) then
|
||||
table.remove (_detalhes.RegistredEvents ["BUFF_UPDATE"], index)
|
||||
if (#_detalhes.RegistredEvents ["BUFF_UPDATE"] < 1) then
|
||||
_detalhes.RecordPlayerSelfBuffs = true
|
||||
_detalhes:UpdateParserGears()
|
||||
end
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
elseif (event == "BUFF_UPDATE_DEBUFFPOWER") then
|
||||
local index = AlreadyRegistred (_detalhes.RegistredEvents ["BUFF_UPDATE_DEBUFFPOWER"], object)
|
||||
if (index) then
|
||||
table.remove (_detalhes.RegistredEvents ["BUFF_UPDATE_DEBUFFPOWER"], index)
|
||||
if (#_detalhes.RegistredEvents ["BUFF_UPDATE_DEBUFFPOWER"] < 1) then
|
||||
_detalhes.RecordPlayerAbilityWithBuffs = false
|
||||
_detalhes:UpdateDamageAbilityGears()
|
||||
_detalhes:UpdateParserGears()
|
||||
end
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> internal functions
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> local pointers
|
||||
local ipairs = ipairs
|
||||
local _math_floor = math.floor
|
||||
local time = time
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -237,7 +238,7 @@
|
||||
if (not time or time == 0) then
|
||||
_detalhes.databroker.text = 0
|
||||
else
|
||||
_detalhes.databroker.text = _detalhes.tabela_vigente.totals_grupo[1] / time
|
||||
_detalhes.databroker.text = _detalhes:comma_value (_math_floor (_detalhes.tabela_vigente.totals_grupo[1] / time))
|
||||
end
|
||||
|
||||
elseif (texttype == 2) then --hps
|
||||
@@ -245,7 +246,7 @@
|
||||
if (not time or time == 0) then
|
||||
_detalhes.databroker.text = 0
|
||||
else
|
||||
_detalhes.databroker.text = _detalhes.tabela_vigente.totals_grupo[2] / time
|
||||
_detalhes.databroker.text = _detalhes:comma_value (_math_floor (_detalhes.tabela_vigente.totals_grupo[2] / time))
|
||||
end
|
||||
|
||||
else
|
||||
|
||||
+173
-57
@@ -1733,12 +1733,20 @@ function gump:CriaJanelaInfo()
|
||||
|
||||
if (data [2] > player_2_target_total) then
|
||||
local diff = data [2] - player_2_target_total
|
||||
local up = diff / data [2] * 100
|
||||
bar_2 [2].righttext:SetText (_detalhes:ToK2Min (player_2_target_total) .. " |c" .. minor .. _math_floor (up) .. "%)|r")
|
||||
local up = diff / player_2_target_total * 100
|
||||
up = _math_floor (up)
|
||||
if (up > 999) then
|
||||
up = ">" .. 999
|
||||
end
|
||||
bar_2 [2].righttext:SetText (_detalhes:ToK2Min (player_2_target_total) .. " |c" .. minor .. up .. "%)|r")
|
||||
else
|
||||
local diff = player_2_target_total - data [2]
|
||||
local down = diff / player_2_target_total * 100
|
||||
bar_2 [2].righttext:SetText (_detalhes:ToK2Min (player_2_target_total) .. " |c" .. plus .. _math_floor (down) .. "%)|r")
|
||||
local down = diff / data [2] * 100
|
||||
down = _math_floor (down)
|
||||
if (down > 999) then
|
||||
down = ">" .. 999
|
||||
end
|
||||
bar_2 [2].righttext:SetText (_detalhes:ToK2Min (player_2_target_total) .. " |c" .. plus .. down .. "%)|r")
|
||||
end
|
||||
|
||||
bar_2 [2]:SetValue (player_2_target_total / player_2_top * 100)
|
||||
@@ -1788,12 +1796,20 @@ function gump:CriaJanelaInfo()
|
||||
|
||||
if (data [2] > player_3_target_total) then
|
||||
local diff = data [2] - player_3_target_total
|
||||
local up = diff / data [2] * 100
|
||||
bar_3 [2].righttext:SetText (_detalhes:ToK2Min (player_3_target_total) .. " |c" .. minor .. _math_floor (up) .. "%)|r")
|
||||
local up = diff / player_3_target_total [2] * 100
|
||||
up = _math_floor (up)
|
||||
if (up > 999) then
|
||||
up = ">" .. 999
|
||||
end
|
||||
bar_3 [2].righttext:SetText (_detalhes:ToK2Min (player_3_target_total) .. " |c" .. minor .. up .. "%)|r")
|
||||
else
|
||||
local diff = player_3_target_total - data [2]
|
||||
local down = diff / player_3_target_total * 100
|
||||
bar_3 [2].righttext:SetText (_detalhes:ToK2Min (player_3_target_total) .. " |c" .. plus .. _math_floor (down) .. "%)|r")
|
||||
local down = diff / data [2] * 100
|
||||
down = _math_floor (down)
|
||||
if (down > 999) then
|
||||
down = ">" .. 999
|
||||
end
|
||||
bar_3 [2].righttext:SetText (_detalhes:ToK2Min (player_3_target_total) .. " |c" .. plus .. down .. "%)|r")
|
||||
end
|
||||
|
||||
bar_3 [2]:SetValue (player_3_target_total / player_3_top * 100)
|
||||
@@ -1916,6 +1932,7 @@ function gump:CriaJanelaInfo()
|
||||
local spell = player_2.spell_tables._ActorTable [spellid]
|
||||
local bar_2 = frame2.bars [i]
|
||||
|
||||
-- ~compare
|
||||
if (spell) then
|
||||
bar_2 [1]:SetTexture (icon)
|
||||
bar_2 [2].lefttext:SetText (player_2_spell_info [spellid] .. ". " .. name)
|
||||
@@ -1926,12 +1943,20 @@ function gump:CriaJanelaInfo()
|
||||
|
||||
elseif (data [2] > spell.total) then
|
||||
local diff = data [2] - spell.total
|
||||
local up = diff / data [2] * 100
|
||||
bar_2 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |c" .. minor .. _math_floor (up) .. "%)|r")
|
||||
local up = diff / spell.total * 100
|
||||
up = _math_floor (up)
|
||||
if (up > 999) then
|
||||
up = ">" .. 999
|
||||
end
|
||||
bar_2 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |c" .. minor .. up .. "%)|r")
|
||||
else
|
||||
local diff = spell.total - data [2]
|
||||
local down = diff / spell.total * 100
|
||||
bar_2 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |c" .. plus .. _math_floor (down) .. "%)|r")
|
||||
local down = diff / data [2] * 100
|
||||
down = _math_floor (down)
|
||||
if (down > 999) then
|
||||
down = ">" .. 999
|
||||
end
|
||||
bar_2 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |c" .. plus .. down .. "%)|r")
|
||||
end
|
||||
|
||||
bar_2 [2]:SetValue (spell.total / player_2_top * 100)
|
||||
@@ -1963,12 +1988,20 @@ function gump:CriaJanelaInfo()
|
||||
|
||||
elseif (data [2] > spell.total) then
|
||||
local diff = data [2] - spell.total
|
||||
local up = diff / data [2] * 100
|
||||
bar_3 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |c" .. minor .. _math_floor (up) .. "%)|r")
|
||||
local up = diff / spell.total * 100
|
||||
up = _math_floor (up)
|
||||
if (up > 999) then
|
||||
up = ">" .. 999
|
||||
end
|
||||
bar_3 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |c" .. minor .. up .. "%)|r")
|
||||
else
|
||||
local diff = spell.total - data [2]
|
||||
local down = diff / spell.total * 100
|
||||
bar_3 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |c" .. plus .. _math_floor (down) .. "%)|r")
|
||||
local down = diff / data [2] * 100
|
||||
down = _math_floor (down)
|
||||
if (down > 999) then
|
||||
down = ">" .. 999
|
||||
end
|
||||
bar_3 [2].righttext:SetText (_detalhes:ToK2Min (spell.total) .. " |c" .. plus .. down .. "%)|r")
|
||||
end
|
||||
|
||||
bar_3 [2]:SetValue (spell.total / player_3_top * 100)
|
||||
@@ -2168,12 +2201,20 @@ function gump:CriaJanelaInfo()
|
||||
|
||||
if (spell [2] > this_spell [2]) then
|
||||
local diff = spell [2] - this_spell [2]
|
||||
local up = diff / spell [2] * 100
|
||||
bar [2].righttext:SetText (_detalhes:ToK2Min (this_spell [2]) .. " |c" .. minor .. _math_floor (up) .. "%)|r")
|
||||
local up = diff / this_spell [2] * 100
|
||||
up = _math_floor (up)
|
||||
if (up > 999) then
|
||||
up = ">" .. 999
|
||||
end
|
||||
bar [2].righttext:SetText (_detalhes:ToK2Min (this_spell [2]) .. " |c" .. minor .. up .. "%)|r")
|
||||
else
|
||||
local diff = this_spell [2] - spell [2]
|
||||
local down = diff / this_spell [2] * 100
|
||||
bar [2].righttext:SetText (_detalhes:ToK2Min (this_spell [2]) .. " |c" .. plus .. _math_floor (down) .. "%)|r")
|
||||
local down = diff / spell [2] * 100
|
||||
down = _math_floor (down)
|
||||
if (down > 999) then
|
||||
down = ">" .. 999
|
||||
end
|
||||
bar [2].righttext:SetText (_detalhes:ToK2Min (this_spell [2]) .. " |c" .. plus .. down .. "%)|r")
|
||||
end
|
||||
|
||||
bar [2]:SetValue (this_spell [2]/player_2_top*100)
|
||||
@@ -2208,12 +2249,20 @@ function gump:CriaJanelaInfo()
|
||||
|
||||
if (spell [2] > this_spell [2]) then
|
||||
local diff = spell [2] - this_spell [2]
|
||||
local up = diff / spell [2] * 100
|
||||
bar [2].righttext:SetText (_detalhes:ToK2Min (this_spell [2]) .. " |c" .. minor .. _math_floor (up) .. "%)|r")
|
||||
local up = diff / this_spell [2] * 100
|
||||
up = _math_floor (up)
|
||||
if (up > 999) then
|
||||
up = ">" .. 999
|
||||
end
|
||||
bar [2].righttext:SetText (_detalhes:ToK2Min (this_spell [2]) .. " |c" .. minor .. up .. "%)|r")
|
||||
else
|
||||
local diff = this_spell [2] - spell [2]
|
||||
local down = diff / this_spell [2] * 100
|
||||
bar [2].righttext:SetText (_detalhes:ToK2Min (this_spell [2]) .. " |c" .. plus .. _math_floor (down) .. "%)|r")
|
||||
local down = diff / spell [2] * 100
|
||||
down = _math_floor (down)
|
||||
if (down > 999) then
|
||||
down = ">" .. 999
|
||||
end
|
||||
bar [2].righttext:SetText (_detalhes:ToK2Min (this_spell [2]) .. " |c" .. plus .. down .. "%)|r")
|
||||
end
|
||||
|
||||
bar [2]:SetValue (this_spell [2]/player_3_top*100)
|
||||
@@ -2295,6 +2344,7 @@ function gump:CriaJanelaInfo()
|
||||
local player1_misc = info.instancia.showing (4, player1)
|
||||
local player2_misc = info.instancia.showing (4, player2)
|
||||
local player3_misc = info.instancia.showing (4, player3)
|
||||
|
||||
local player1_uptime
|
||||
|
||||
if (bar1[2].righttext:GetText()) then
|
||||
@@ -2327,46 +2377,78 @@ function gump:CriaJanelaInfo()
|
||||
|
||||
if (hits > bar2[3][1]) then
|
||||
local diff = hits - bar2[3][1]
|
||||
local up = diff / hits * 100
|
||||
frame2.tooltip.hits_label2:SetText (bar2[3][1] .. " |c" .. minor .. _math_floor (up) .. "%)|r")
|
||||
local up = diff / bar2[3][1] * 100
|
||||
up = _math_floor (up)
|
||||
if (up > 999) then
|
||||
up = ">" .. 999
|
||||
end
|
||||
frame2.tooltip.hits_label2:SetText (bar2[3][1] .. " |c" .. minor .. up .. "%)|r")
|
||||
else
|
||||
local diff = bar2[3][1] - hits
|
||||
local down = diff / bar2[3][1] * 100
|
||||
frame2.tooltip.hits_label2:SetText (bar2[3][1] .. " |c" .. plus .. _math_floor (down) .. "%)|r")
|
||||
local down = diff / hits * 100
|
||||
down = _math_floor (down)
|
||||
if (down > 999) then
|
||||
down = ">" .. 999
|
||||
end
|
||||
frame2.tooltip.hits_label2:SetText (bar2[3][1] .. " |c" .. plus .. down .. "%)|r")
|
||||
end
|
||||
|
||||
if (average > bar2[3][2]) then
|
||||
local diff = average - bar2[3][2]
|
||||
local up = diff / average * 100
|
||||
frame2.tooltip.average_label2:SetText (_detalhes:ToK2Min (bar2[3][2]) .. " |c" .. minor .. _math_floor (up) .. "%)|r")
|
||||
local up = diff / bar2[3][2] * 100
|
||||
up = _math_floor (up)
|
||||
if (up > 999) then
|
||||
up = ">" .. 999
|
||||
end
|
||||
frame2.tooltip.average_label2:SetText (_detalhes:ToK2Min (bar2[3][2]) .. " |c" .. minor .. up .. "%)|r")
|
||||
else
|
||||
local diff = bar2[3][2] - average
|
||||
local down = diff / bar2[3][2] * 100
|
||||
frame2.tooltip.average_label2:SetText (_detalhes:ToK2Min (bar2[3][2]) .. " |c" .. plus .. _math_floor (down) .. "%)|r")
|
||||
local down = diff / average * 100
|
||||
down = _math_floor (down)
|
||||
if (down > 999) then
|
||||
down = ">" .. 999
|
||||
end
|
||||
frame2.tooltip.average_label2:SetText (_detalhes:ToK2Min (bar2[3][2]) .. " |c" .. plus .. down .. "%)|r")
|
||||
end
|
||||
|
||||
if (critical > bar2[3][3]) then
|
||||
local diff = critical - bar2[3][3]
|
||||
local up = diff / critical * 100
|
||||
frame2.tooltip.crit_label2:SetText (bar2[3][3] .. "%" .. " |c" .. minor .. _math_floor (up) .. "%)|r")
|
||||
local up = diff / bar2[3][3] * 100
|
||||
up = _math_floor (up)
|
||||
if (up > 999) then
|
||||
up = ">" .. 999
|
||||
end
|
||||
frame2.tooltip.crit_label2:SetText (bar2[3][3] .. "%" .. " |c" .. minor .. up .. "%)|r")
|
||||
else
|
||||
local diff = bar2[3][3] - critical
|
||||
local down = diff / bar2[3][3] * 100
|
||||
frame2.tooltip.crit_label2:SetText (bar2[3][3] .. "%" .. " |c" .. plus .. _math_floor (down) .. "%)|r")
|
||||
local down = diff / critical * 100
|
||||
down = _math_floor (down)
|
||||
if (down > 999) then
|
||||
down = ">" .. 999
|
||||
end
|
||||
frame2.tooltip.crit_label2:SetText (bar2[3][3] .. "%" .. " |c" .. plus .. down .. "%)|r")
|
||||
end
|
||||
|
||||
if (player2_misc) then
|
||||
local spell = player2_misc.debuff_uptime_spell_tables and player2_misc.debuff_uptime_spell_tables._ActorTable and player2_misc.debuff_uptime_spell_tables._ActorTable [spellid]
|
||||
if (spell and spell.uptime) then
|
||||
if (spell and spell.uptime and player1_uptime) then
|
||||
local minutos, segundos = _math_floor (spell.uptime/60), _math_floor (spell.uptime%60)
|
||||
if (player1_uptime > spell.uptime) then
|
||||
local diff = player1_uptime - spell.uptime
|
||||
local up = diff / player1_uptime * 100
|
||||
frame2.tooltip.uptime_label2:SetText (minutos .. "m" .. segundos .. "s |c" .. minor .. _math_floor (up) .. "%)|r")
|
||||
local up = diff / spell.uptime * 100
|
||||
up = _math_floor (up)
|
||||
if (up > 999) then
|
||||
up = ">" .. 999
|
||||
end
|
||||
frame2.tooltip.uptime_label2:SetText (minutos .. "m" .. segundos .. "s |c" .. minor .. up .. "%)|r")
|
||||
else
|
||||
local diff = spell.uptime - player1_uptime
|
||||
local down = diff / spell.uptime * 100
|
||||
frame2.tooltip.uptime_label2:SetText (minutos .. "m" .. segundos .. "s |c" .. plus .. _math_floor (down) .. "%)|r")
|
||||
local down = diff / player1_uptime * 100
|
||||
down = _math_floor (down)
|
||||
if (down > 999) then
|
||||
down = ">" .. 999
|
||||
end
|
||||
frame2.tooltip.uptime_label2:SetText (minutos .. "m" .. segundos .. "s |c" .. plus .. down .. "%)|r")
|
||||
end
|
||||
else
|
||||
frame2.tooltip.uptime_label2:SetText ("--x--x--")
|
||||
@@ -2378,38 +2460,64 @@ function gump:CriaJanelaInfo()
|
||||
frame2.tooltip:Show()
|
||||
end
|
||||
|
||||
---------------------------------------------------
|
||||
|
||||
if (bar3[2].righttext:GetText()) then
|
||||
bar3[2]:SetStatusBarColor (1, 1, 1, 1)
|
||||
bar3[2].icon:SetTexCoord (.1, .9, .1, .9)
|
||||
|
||||
if (hits > bar3[3][1]) then
|
||||
local diff = hits - bar3[3][1]
|
||||
local up = diff / hits * 100
|
||||
frame3.tooltip.hits_label2:SetText (bar3[3][1] .. " |c" .. minor .. _math_floor (up) .. "%)|r")
|
||||
local up = diff / bar3[3][1] * 100
|
||||
up = _math_floor (up)
|
||||
if (up > 999) then
|
||||
up = ">" .. 999
|
||||
end
|
||||
frame3.tooltip.hits_label2:SetText (bar3[3][1] .. " |c" .. minor .. up .. "%)|r")
|
||||
else
|
||||
local diff = bar3[3][1] - hits
|
||||
local down = diff / bar3[3][1] * 100
|
||||
frame3.tooltip.hits_label2:SetText (bar3[3][1] .. " |c" .. plus .. _math_floor (down) .. "%)|r")
|
||||
local down = diff / hits * 100
|
||||
down = _math_floor (down)
|
||||
if (down > 999) then
|
||||
down = ">" .. 999
|
||||
end
|
||||
frame3.tooltip.hits_label2:SetText (bar3[3][1] .. " |c" .. plus .. down .. "%)|r")
|
||||
end
|
||||
|
||||
if (average > bar3[3][2]) then
|
||||
local diff = average - bar3[3][2]
|
||||
local up = diff / average * 100
|
||||
frame3.tooltip.average_label2:SetText (_detalhes:ToK2Min (bar3[3][2]) .. " |c" .. minor .. _math_floor (up) .. "%)|r")
|
||||
local up = diff / bar3[3][2] * 100
|
||||
up = _math_floor (up)
|
||||
if (up > 999) then
|
||||
up = ">" .. 999
|
||||
end
|
||||
frame3.tooltip.average_label2:SetText (_detalhes:ToK2Min (bar3[3][2]) .. " |c" .. minor .. up .. "%)|r")
|
||||
else
|
||||
local diff = bar3[3][2] - average
|
||||
local down = diff / bar3[3][2] * 100
|
||||
frame3.tooltip.average_label2:SetText (_detalhes:ToK2Min (bar3[3][2]) .. " |c" .. plus .. _math_floor (down) .. "%)|r")
|
||||
local down = diff / average * 100
|
||||
down = _math_floor (down)
|
||||
if (down > 999) then
|
||||
down = ">" .. 999
|
||||
end
|
||||
frame3.tooltip.average_label2:SetText (_detalhes:ToK2Min (bar3[3][2]) .. " |c" .. plus .. down .. "%)|r")
|
||||
end
|
||||
|
||||
if (critical > bar3[3][3]) then
|
||||
local diff = critical - bar3[3][3]
|
||||
local up = diff / critical * 100
|
||||
frame3.tooltip.crit_label2:SetText (bar3[3][3] .. "%" .. " |c" .. minor .. _math_floor (up) .. "%)|r")
|
||||
local up = diff / bar3[3][3] * 100
|
||||
up = _math_floor (up)
|
||||
if (up > 999) then
|
||||
up = ">" .. 999
|
||||
end
|
||||
frame3.tooltip.crit_label2:SetText (bar3[3][3] .. "%" .. " |c" .. minor .. up .. "%)|r")
|
||||
else
|
||||
local diff = bar3[3][3] - critical
|
||||
local down = diff / bar3[3][3] * 100
|
||||
frame3.tooltip.crit_label2:SetText (bar3[3][3] .. "%" .. " |c" .. plus .. _math_floor (down) .. "%)|r")
|
||||
local down = diff / critical * 100
|
||||
down = _math_floor (down)
|
||||
if (down > 999) then
|
||||
down = ">" .. 999
|
||||
end
|
||||
frame3.tooltip.crit_label2:SetText (bar3[3][3] .. "%" .. " |c" .. plus .. down .. "%)|r")
|
||||
end
|
||||
|
||||
if (player3_misc) then
|
||||
@@ -2418,12 +2526,20 @@ function gump:CriaJanelaInfo()
|
||||
local minutos, segundos = _math_floor (spell.uptime/60), _math_floor (spell.uptime%60)
|
||||
if (player1_uptime > spell.uptime) then
|
||||
local diff = player1_uptime - spell.uptime
|
||||
local up = diff / player1_uptime * 100
|
||||
frame3.tooltip.uptime_label2:SetText (minutos .. "m" .. segundos .. "s |c" .. minor .. _math_floor (up) .. "%)|r")
|
||||
local up = diff / spell.uptime * 100
|
||||
up = _math_floor (up)
|
||||
if (up > 999) then
|
||||
up = ">" .. 999
|
||||
end
|
||||
frame3.tooltip.uptime_label2:SetText (minutos .. "m" .. segundos .. "s |c" .. minor .. up .. "%)|r")
|
||||
else
|
||||
local diff = spell.uptime - player1_uptime
|
||||
local down = diff / spell.uptime * 100
|
||||
frame3.tooltip.uptime_label2:SetText (minutos .. "m" .. segundos .. "s |c" .. plus .. _math_floor (down) .. "%)|r")
|
||||
local down = diff / player1_uptime * 100
|
||||
down = _math_floor (down)
|
||||
if (down > 999) then
|
||||
down = ">" .. 999
|
||||
end
|
||||
frame3.tooltip.uptime_label2:SetText (minutos .. "m" .. segundos .. "s |c" .. plus .. down .. "%)|r")
|
||||
end
|
||||
else
|
||||
frame3.tooltip.uptime_label2:SetText ("--x--x--")
|
||||
|
||||
+22
-10
@@ -1054,7 +1054,7 @@ function window:CreateFrame20()
|
||||
_detalhes.tooltip.fontshadow = value
|
||||
end
|
||||
window:CreateLineBackground2 (frame20, "TooltipShadowSwitch", "TooltipShadowLabel", Loc ["STRING_OPTIONS_TOOLTIPS_FONTSHADOW_DESC"])
|
||||
|
||||
|
||||
-- background color
|
||||
local tooltip_background_color_callback = function (button, r, g, b, a)
|
||||
_detalhes.tooltip.background = {r, g, b, a}
|
||||
@@ -3349,6 +3349,15 @@ function window:CreateFrame2()
|
||||
|
||||
window:CreateLineBackground2 (frame2, "timetypeDropdown", "timetypeLabel", Loc ["STRING_OPTIONS_TIMEMEASURE_DESC"])
|
||||
|
||||
--> Erase Chart Data
|
||||
g:NewLabel (frame2, _, "$parentEraseChartDataLabel", "EraseChartDataLabel", Loc ["STRING_OPTIONS_ERASECHARTDATA"], "GameFontHighlightLeft")
|
||||
g:NewSwitch (frame2, _, "$parentEraseChartDataSlider", "EraseChartDataSlider", 60, 20, _, _, false)
|
||||
frame2.EraseChartDataSlider:SetPoint ("left", frame2.EraseChartDataLabel, "right", 2, 0)
|
||||
frame2.EraseChartDataSlider.OnSwitch = function (self, _, value)
|
||||
_detalhes.clear_graphic = value
|
||||
end
|
||||
window:CreateLineBackground2 (frame2, "EraseChartDataSlider", "EraseChartDataLabel", Loc ["STRING_OPTIONS_ERASECHARTDATA_DESC"])
|
||||
|
||||
--> Overall Data
|
||||
g:NewLabel (frame2, _, "$parentOverallDataAnchor", "OverallDataLabel", Loc ["STRING_OPTIONS_OVERALL_ANCHOR"], "GameFontNormal")
|
||||
|
||||
@@ -3585,15 +3594,16 @@ function window:CreateFrame2()
|
||||
{"GeneralAnchorLabel", 1, true},
|
||||
{"fragsPvpLabel", 2},
|
||||
{"timetypeLabel", 3},
|
||||
{"EraseChartDataLabel", 4},
|
||||
|
||||
{"OverallDataLabel", 4, true},
|
||||
{"OverallDataRaidBossLabel", 5},
|
||||
{"OverallDataRaidCleaupLabel", 6},
|
||||
{"OverallDataDungeonBossLabel", 7},
|
||||
{"OverallDataDungeonCleaupLabel", 8},
|
||||
{"OverallDataAllLabel", 9},
|
||||
{"OverallNewBossLabel", 10},
|
||||
{"OverallNewChallengeLabel", 11},
|
||||
{"OverallDataLabel", 5, true},
|
||||
{"OverallDataRaidBossLabel", 6},
|
||||
{"OverallDataRaidCleaupLabel", 7},
|
||||
{"OverallDataDungeonBossLabel", 8},
|
||||
{"OverallDataDungeonCleaupLabel", 9},
|
||||
{"OverallDataAllLabel", 10},
|
||||
{"OverallNewBossLabel", 11},
|
||||
{"OverallNewChallengeLabel", 12},
|
||||
}
|
||||
|
||||
window:arrange_menu (frame2, left_side, x, window.top_start_at)
|
||||
@@ -7217,7 +7227,9 @@ function window:update_all (editing_instance)
|
||||
--> window 2
|
||||
_G.DetailsOptionsWindow2FragsPvpSlider.MyObject:SetValue (_detalhes.only_pvp_frags)
|
||||
_G.DetailsOptionsWindow2TTDropdown.MyObject:Select (_detalhes.time_type)
|
||||
|
||||
|
||||
_G.DetailsOptionsWindow2EraseChartDataSlider.MyObject:SetValue (_detalhes.clear_graphic)
|
||||
|
||||
_G.DetailsOptionsWindow2OverallDataRaidBossSlider.MyObject:SetValue (bit.band (_detalhes.overall_flag, 0x1) ~= 0)
|
||||
_G.DetailsOptionsWindow2OverallDataRaidCleaupSlider.MyObject:SetValue (bit.band (_detalhes.overall_flag, 0x2) ~= 0)
|
||||
_G.DetailsOptionsWindow2OverallDataDungeonBossSlider.MyObject:SetValue (bit.band (_detalhes.overall_flag, 0x4) ~= 0)
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1181
-640
File diff suppressed because one or more lines are too long
@@ -90,6 +90,7 @@ local function CreatePluginFrames (data)
|
||||
|
||||
--> when details finish his startup and are ready to work
|
||||
elseif (event == "DETAILS_STARTED") then
|
||||
|
||||
--> check if details are in combat, if not check if the last fight was a boss fight
|
||||
if (not EncounterDetails:IsInCombat()) then
|
||||
--> get the current combat table
|
||||
@@ -136,10 +137,16 @@ local function CreatePluginFrames (data)
|
||||
|
||||
--_detalhes:TimeDataRegister ("Raid Damage Done", damage_done_func, {last_damage = 0, max_damage = 0}, "Encounter Details", "v1.0", [[Interface\ICONS\Ability_DualWield]], true)
|
||||
_detalhes:TimeDataRegister ("Raid Damage Done", string_damage_done_func, nil, "Encounter Details", "v1.0", [[Interface\ICONS\Ability_DualWield]], true, true)
|
||||
|
||||
if (EncounterDetails.db.show_icon == 4) then
|
||||
EncounterDetails:ShowIcon()
|
||||
elseif (EncounterDetails.db.show_icon == 5) then
|
||||
EncounterDetails:AutoShowIcon()
|
||||
end
|
||||
|
||||
elseif (event == "COMBAT_PLAYER_ENTER") then --> combat started
|
||||
if (EncounterDetails.showing) then
|
||||
EncounterDetails:HideIcon()
|
||||
if (EncounterDetails.showing and EncounterDetails.db.hide_on_combat) then
|
||||
--EncounterDetails:HideIcon()
|
||||
EncounterDetails:CloseWindow()
|
||||
end
|
||||
|
||||
@@ -151,24 +158,58 @@ local function CreatePluginFrames (data)
|
||||
if (EncounterDetails.combat_boss_found) then
|
||||
EncounterDetails.combat_boss_found = false
|
||||
end
|
||||
if (EncounterDetails.db.show_icon == 5) then
|
||||
EncounterDetails:AutoShowIcon()
|
||||
end
|
||||
|
||||
elseif (event == "COMBAT_BOSS_FOUND") then
|
||||
EncounterDetails.combat_boss_found = true
|
||||
if (EncounterDetails.db.show_icon == 5) then
|
||||
EncounterDetails:AutoShowIcon()
|
||||
end
|
||||
|
||||
elseif (event == "DETAILS_DATA_RESET") then
|
||||
if (_G.DetailsRaidDpsGraph) then
|
||||
_G.DetailsRaidDpsGraph:ResetData()
|
||||
end
|
||||
EncounterDetails:HideIcon()
|
||||
if (EncounterDetails.db.show_icon == 5) then
|
||||
EncounterDetails:AutoShowIcon()
|
||||
end
|
||||
--EncounterDetails:HideIcon()
|
||||
EncounterDetails:CloseWindow()
|
||||
|
||||
--drop last combat table
|
||||
EncounterDetails.LastSegmentShown = nil
|
||||
|
||||
elseif (event == "GROUP_ONENTER") then
|
||||
if (EncounterDetails.db.show_icon == 2) then
|
||||
EncounterDetails:ShowIcon()
|
||||
end
|
||||
|
||||
elseif (event == "GROUP_ONLEAVE") then
|
||||
if (EncounterDetails.db.show_icon == 2) then
|
||||
EncounterDetails:HideIcon()
|
||||
end
|
||||
|
||||
elseif (event == "ZONE_TYPE_CHANGED") then
|
||||
if (EncounterDetails.db.show_icon == 1) then
|
||||
if (select (1, ...) == "raid") then
|
||||
EncounterDetails:ShowIcon()
|
||||
else
|
||||
EncounterDetails:HideIcon()
|
||||
end
|
||||
end
|
||||
|
||||
elseif (event == "PLUGIN_DISABLED") then
|
||||
EncounterDetails:HideIcon()
|
||||
EncounterDetails:CloseWindow()
|
||||
|
||||
elseif (event == "PLUGIN_ENABLED") then
|
||||
--EncounterDetails:ShowIcon()
|
||||
|
||||
if (EncounterDetails.db.show_icon == 5) then
|
||||
EncounterDetails:AutoShowIcon()
|
||||
elseif (EncounterDetails.db.show_icon == 4) then
|
||||
EncounterDetails:ShowIcon()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -216,6 +257,8 @@ local function CreatePluginFrames (data)
|
||||
EncounterDetails:OpenAndRefresh()
|
||||
--> show
|
||||
EncounterDetailsFrame:Show()
|
||||
EncounterDetails.open = true
|
||||
|
||||
if (EncounterDetailsFrame.ShowType == "graph") then
|
||||
EncounterDetails:BuildDpsGraphic()
|
||||
end
|
||||
@@ -223,6 +266,7 @@ local function CreatePluginFrames (data)
|
||||
end
|
||||
|
||||
function EncounterDetails:CloseWindow()
|
||||
EncounterDetails.open = false
|
||||
EncounterDetailsFrame:Hide()
|
||||
return true
|
||||
end
|
||||
@@ -674,26 +718,12 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
local _combat_object = _combat_object
|
||||
|
||||
if (segment) then
|
||||
_combat_object = _detalhes.tabela_historico.tabelas [segment]
|
||||
--get combat segment, 1 more recently ...25 oldest
|
||||
_combat_object = EncounterDetails:GetCombat (segment)
|
||||
else
|
||||
_G [frame:GetName().."SegmentsDropdown"].MyObject:Select (1, true)
|
||||
end
|
||||
|
||||
--[
|
||||
if (frame.ShowType == "main") then
|
||||
--frame.buttonSwitchNormal:Disable()
|
||||
|
||||
--if (_combat_object.DpsGraphic[1]) then
|
||||
--frame.buttonSwitchGraphic:Enable()
|
||||
--else
|
||||
-- frame.buttonSwitchGraphic:Disable()
|
||||
--end
|
||||
elseif (frame.ShowType == "graph") then
|
||||
--frame.buttonSwitchNormal:Enable()
|
||||
--frame.buttonSwitchGraphic:Disable()
|
||||
end
|
||||
--]]
|
||||
|
||||
local boss_id
|
||||
local map_id
|
||||
local boss_info
|
||||
@@ -708,14 +738,36 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
}
|
||||
end
|
||||
|
||||
if (not _combat_object.is_boss) then
|
||||
for _, combat in _ipairs (EncounterDetails:GetCombatSegments()) do
|
||||
if (combat.is_boss and EncounterDetails:GetBossDetails (combat.is_boss.mapid, combat.is_boss.index)) then
|
||||
_combat_object = combat
|
||||
break
|
||||
end
|
||||
end
|
||||
if (not _combat_object.is_boss) then
|
||||
if (EncounterDetails.LastSegmentShown) then
|
||||
_combat_object = EncounterDetails.LastSegmentShown
|
||||
else
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
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)
|
||||
|
||||
if (not boss_info) then
|
||||
return EncounterDetails:Msg (Loc ["STRING_BOSS_NOT_REGISTRED"])
|
||||
if (EncounterDetails.LastSegmentShown) then
|
||||
_combat_object = EncounterDetails.LastSegmentShown
|
||||
else
|
||||
return EncounterDetails:Msg (Loc ["STRING_BOSS_NOT_REGISTRED"])
|
||||
end
|
||||
end
|
||||
|
||||
EncounterDetails.LastSegmentShown = _combat_object
|
||||
|
||||
-------------- set boss name and zone name --------------
|
||||
EncounterDetailsFrame.boss_name:SetText (_combat_object.is_boss.encounter)
|
||||
EncounterDetailsFrame.raid_name:SetText (_combat_object.is_boss.zone)
|
||||
@@ -957,10 +1009,10 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
for index, jogador in _ipairs (DamageContainer._ActorTable) do
|
||||
|
||||
--> só estou interessado nos adds, conferir pelo nome
|
||||
if (adds_pool [tonumber (jogador.serial:sub(6, 10), 16)] or (jogador.flag_original and bit.band (jogador.flag_original, 0x00000040) ~= 0)) then --> é um inimigo) then
|
||||
if (adds_pool [tonumber (jogador.serial:sub(6, 10), 16)] or (jogador.flag_original and bit.band (jogador.flag_original, 0x00000060) ~= 0)) then --> é um inimigo ou neutro
|
||||
|
||||
local nome = jogador.nome
|
||||
local tabela = {total = 0, dano_em = {}, dano_em_total = 0, damage_from = {}, damage_from_total = 0}
|
||||
local tabela = {nome = nome, total = 0, dano_em = {}, dano_em_total = 0, damage_from = {}, damage_from_total = 0}
|
||||
|
||||
--> total de dano que ele causou
|
||||
tabela.total = jogador.total
|
||||
@@ -1006,7 +1058,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
end
|
||||
end)
|
||||
|
||||
adds [nome] = tabela
|
||||
tinsert (adds, tabela)
|
||||
|
||||
end
|
||||
|
||||
@@ -1030,6 +1082,9 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
GameTooltip:AddDoubleLine ("|TInterface\\AddOns\\Details\\images\\classes_small:14:14:0:0:128:128:"..(coords[1]*128)..":"..(coords[2]*128)..":"..(coords[3]*128)..":"..(coords[4]*128).."|t "..esta_tabela[1]..": ", _detalhes:comma_value(esta_tabela[2]).." (".. _cstr ("%.1f", esta_tabela[2]/dano_em_total*100) .."%)", 1, 1, 1, 1, 1, 1)
|
||||
end
|
||||
|
||||
GameTooltip:AddLine (" ")
|
||||
GameTooltip:AddLine ("CLICK to Report")
|
||||
|
||||
GameTooltip:Show()
|
||||
end
|
||||
|
||||
@@ -1055,6 +1110,9 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
end
|
||||
end
|
||||
|
||||
GameTooltip:AddLine (" ")
|
||||
GameTooltip:AddLine ("CLICK to Report")
|
||||
|
||||
GameTooltip:Show()
|
||||
end
|
||||
|
||||
@@ -1064,7 +1122,11 @@ function EncounterDetails:OpenAndRefresh (_, segment)
|
||||
local index = 1
|
||||
quantidade = 0
|
||||
|
||||
for addName, esta_tabela in _pairs (adds) do
|
||||
table.sort (adds, function (t1, t2) return t1.nome < t2.nome end)
|
||||
|
||||
for index, esta_tabela in _ipairs (adds) do
|
||||
|
||||
local addName = esta_tabela.nome
|
||||
|
||||
local barra = container.barras [index]
|
||||
if (not barra) then
|
||||
@@ -1433,24 +1495,57 @@ function EncounterDetails:OnEvent (_, event, ...)
|
||||
--> create widgets
|
||||
CreatePluginFrames (data)
|
||||
|
||||
local MINIMAL_DETAILS_VERSION_REQUIRED = 1
|
||||
local PLUGIN_MINIMAL_DETAILS_VERSION_REQUIRED = 1
|
||||
local PLUGIN_TYPE = "TOOLBAR"
|
||||
local PLUGIN_LOCALIZED_NAME = Loc ["STRING_PLUGIN_NAME"]
|
||||
local PLUGIN_REAL_NAME = "DETAILS_PLUGIN_ENCOUNTER_DETAILS"
|
||||
local PLUGIN_ICON = [[Interface\Scenarios\ScenarioIcon-Boss]]
|
||||
local PLUGIN_AUTHOR = "Details! Team"
|
||||
local PLUGIN_VERSION = "v1.05"
|
||||
|
||||
local default_settings = {
|
||||
show_icon = 5, --automatic
|
||||
hide_on_combat = false, --hide the window when a new combat start
|
||||
}
|
||||
|
||||
-- 1 = only when inside a raid map
|
||||
-- 2 = only when in raid group
|
||||
-- 3 = only after a boss encounter
|
||||
-- 4 = always show
|
||||
-- 5 = automatic show when have at least 1 encounter with boss
|
||||
|
||||
--> Install
|
||||
local install, saveddata = _G._detalhes:InstallPlugin ("TOOLBAR", Loc ["STRING_PLUGIN_NAME"], "Interface\\Scenarios\\ScenarioIcon-Boss", EncounterDetails, "DETAILS_PLUGIN_ENCOUNTER_DETAILS", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", "v1.05")
|
||||
local install, saveddata, is_enabled = _G._detalhes:InstallPlugin (
|
||||
PLUGIN_TYPE,
|
||||
PLUGIN_LOCALIZED_NAME,
|
||||
PLUGIN_ICON,
|
||||
EncounterDetails,
|
||||
PLUGIN_REAL_NAME,
|
||||
PLUGIN_MINIMAL_DETAILS_VERSION_REQUIRED,
|
||||
PLUGIN_AUTHOR,
|
||||
PLUGIN_VERSION,
|
||||
default_settings
|
||||
)
|
||||
|
||||
if (type (install) == "table" and install.error) then
|
||||
print (install.error)
|
||||
end
|
||||
|
||||
EncounterDetails.db = saveddata
|
||||
|
||||
--> Register needed events
|
||||
_G._detalhes:RegisterEvent (EncounterDetails, "COMBAT_PLAYER_ENTER")
|
||||
_G._detalhes:RegisterEvent (EncounterDetails, "COMBAT_PLAYER_LEAVE")
|
||||
_G._detalhes:RegisterEvent (EncounterDetails, "COMBAT_BOSS_FOUND")
|
||||
_G._detalhes:RegisterEvent (EncounterDetails, "DETAILS_DATA_RESET")
|
||||
|
||||
_G._detalhes:RegisterEvent (EncounterDetails, "GROUP_ONENTER")
|
||||
_G._detalhes:RegisterEvent (EncounterDetails, "GROUP_ONLEAVE")
|
||||
|
||||
_G._detalhes:RegisterEvent (EncounterDetails, "ZONE_TYPE_CHANGED")
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
elseif (event == "PLAYER_LOGOUT") then
|
||||
_detalhes_databaseEncounterDetails = EncounterDetails.data
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
## Interface: 50400
|
||||
## Title: Details Encounter (plugin)
|
||||
## Notes: Plugin for Details
|
||||
## SavedVariablesPerCharacter: _detalhes_databaseEncounterDetails
|
||||
## RequiredDeps: Details
|
||||
## OptionalDeps: Ace3
|
||||
|
||||
|
||||
@@ -9,7 +9,110 @@ do
|
||||
local _GetSpellInfo = _detalhes.getspellinfo
|
||||
|
||||
_detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
|
||||
|
||||
|
||||
--> options panel
|
||||
|
||||
function EncounterDetails:AutoShowIcon()
|
||||
local found_boss = false
|
||||
for _, combat in ipairs (EncounterDetails:GetCombatSegments()) do
|
||||
if (combat.is_boss) then
|
||||
EncounterDetails:ShowIcon()
|
||||
found_boss = true
|
||||
end
|
||||
end
|
||||
if (EncounterDetails:GetCurrentCombat().is_boss) then
|
||||
EncounterDetails:ShowIcon()
|
||||
found_boss = true
|
||||
end
|
||||
if (not found_boss) then
|
||||
EncounterDetails:HideIcon()
|
||||
end
|
||||
end
|
||||
|
||||
local build_options_panel = function()
|
||||
local options_frame = CreateFrame ("frame", "EncounterDetailsOptionsWindow", UIParent, "ButtonFrameTemplate")
|
||||
tinsert (UISpecialFrames, "EncounterDetailsOptionsWindow")
|
||||
options_frame:SetSize (500, 200)
|
||||
options_frame:SetFrameStrata ("HIGH")
|
||||
options_frame:SetScript ("OnMouseDown", function(self) self:StartMoving()end)
|
||||
options_frame:SetScript ("OnMouseUp", function(self) self:StopMovingOrSizing()end)
|
||||
options_frame:SetMovable (true)
|
||||
options_frame:EnableMouse (true)
|
||||
options_frame:Hide()
|
||||
options_frame:SetPoint ("center", UIParent, "center")
|
||||
options_frame.TitleText:SetText ("Encounter Details Options")
|
||||
options_frame.portrait:SetTexture ([[Interface\CHARACTERFRAME\TEMPORARYPORTRAIT-FEMALE-BLOODELF]])
|
||||
|
||||
-- 1 = only when inside a raid map
|
||||
-- 2 = only when in raid group
|
||||
-- 3 = only after a boss encounter
|
||||
-- 4 = always show
|
||||
|
||||
local set = function (_, _, value)
|
||||
EncounterDetails.db.show_icon = value
|
||||
if (value == 1) then
|
||||
if (EncounterDetails:GetZoneType() == "raid") then
|
||||
EncounterDetails:ShowIcon()
|
||||
else
|
||||
EncounterDetails:HideIcon()
|
||||
end
|
||||
elseif (value == 2) then
|
||||
if (EncounterDetails:InGroup()) then
|
||||
EncounterDetails:ShowIcon()
|
||||
else
|
||||
EncounterDetails:HideIcon()
|
||||
end
|
||||
elseif (value == 3) then
|
||||
if (EncounterDetails:GetCurrentCombat().is_boss) then
|
||||
EncounterDetails:ShowIcon()
|
||||
else
|
||||
EncounterDetails:HideIcon()
|
||||
end
|
||||
elseif (value == 4) then
|
||||
EncounterDetails:ShowIcon()
|
||||
elseif (value == 5) then
|
||||
EncounterDetails:AutoShowIcon()
|
||||
end
|
||||
end
|
||||
local on_show_menu = {
|
||||
{value = 1, label = "Inside Raid", onclick = set, desc = "Only show the icon while inside a raid."},
|
||||
{value = 2, label = "In Group", onclick = set, desc = "Only show the icon while in group."},
|
||||
{value = 3, label = "After Encounter", onclick = set, desc = "Show the icon after a raid boss encounter."},
|
||||
{value = 4, label = "Always", onclick = set, desc = "Always show the icon."},
|
||||
{value = 5, label = "Auto", onclick = set, desc = "The plugin decides when the icon needs to be shown."},
|
||||
}
|
||||
|
||||
-- /dump DETAILS_PLUGIN_ENCOUNTER_DETAILS.db.show_icon
|
||||
|
||||
local menu = {
|
||||
--show when dropdown
|
||||
{
|
||||
type = "select",
|
||||
get = function() return EncounterDetails.db.show_icon end,
|
||||
values = function() return on_show_menu end,
|
||||
desc = "When the icon is shown in the Details! tooltip.",
|
||||
name = "Show Icon"
|
||||
},
|
||||
{
|
||||
type = "toggle",
|
||||
get = function() return EncounterDetails.db.hide_on_combat end,
|
||||
set = function (self, fixedparam, value) EncounterDetails.db.hide_on_combat = value end,
|
||||
desc = "Encounter Details window automatically close when you enter in combat.",
|
||||
name = "Hide on Combat"
|
||||
},
|
||||
}
|
||||
|
||||
DetailsFrameWork:BuildMenu (options_frame, menu, 15, -75, 260)
|
||||
|
||||
end
|
||||
|
||||
EncounterDetails.OpenOptionsPanel = function()
|
||||
if (not EncounterDetailsOptionsWindow) then
|
||||
build_options_panel()
|
||||
end
|
||||
EncounterDetailsOptionsWindow:Show()
|
||||
end
|
||||
|
||||
function EncounterDetails:CreateRowTexture (row)
|
||||
row.textura = CreateFrame ("StatusBar", nil, row)
|
||||
row.textura:SetAllPoints (row)
|
||||
@@ -646,11 +749,11 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156:
|
||||
local backdrop = {edgeFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16, edgeSize = 1, insets = {left = 1, right = 1, top = 0, bottom = 1}}
|
||||
|
||||
--> Nome do Encontro
|
||||
DetailsFrameWork:NewLabel (frame, frame, nil, "boss_name", "Nome do Boss Aqui", "QuestFont_Large")
|
||||
DetailsFrameWork:NewLabel (frame, frame, nil, "boss_name", "Unknown Encounter", "QuestFont_Large")
|
||||
frame.boss_name:SetPoint ("TOPLEFT", frame, "TOPLEFT", 100, -51)
|
||||
|
||||
--> Nome da Raid
|
||||
DetailsFrameWork:NewLabel (frame, frame, nil, "raid_name", "Throne of Thunder", "GameFontHighlightSmall")
|
||||
DetailsFrameWork:NewLabel (frame, frame, nil, "raid_name", "Unknown Raid", "GameFontHighlightSmall")
|
||||
frame.raid_name:SetPoint ("CENTER", frame.boss_name, "CENTER", 0, 14)
|
||||
|
||||
--> Barra de Status:
|
||||
@@ -703,6 +806,10 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156:
|
||||
|
||||
local segmentos = DetailsFrameWork:NewDropDown (frame, _, "$parentSegmentsDropdown", "segmentosDropdown", 160, 18, buildSegmentosMenu, nil)
|
||||
segmentos:SetPoint ("left", segmentos_string, "right", 2, 0)
|
||||
|
||||
local options_button = DetailsFrameWork:NewButton (frame, _, "$parentOptionsButton", nil, 100, 18, EncounterDetails.OpenOptionsPanel, nil, nil, nil, "Options")
|
||||
options_button:SetPoint ("left", segmentos, "right", 14, 0)
|
||||
options_button.textalign = "<"
|
||||
|
||||
--> Caixa do Dano total tomado pela Raid
|
||||
|
||||
@@ -893,14 +1000,14 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156:
|
||||
container_adds_frame:SetMovable (true)
|
||||
|
||||
container_adds_window:SetWidth (170)
|
||||
container_adds_window:SetHeight (67)
|
||||
container_adds_window:SetHeight (65)
|
||||
container_adds_window:SetScrollChild (container_adds_frame)
|
||||
container_adds_window:SetPoint ("TOPLEFT", frame, "TOPLEFT", 260, -117)
|
||||
container_adds_window:SetPoint ("TOPLEFT", frame, "TOPLEFT", 260, -113)
|
||||
|
||||
DetailsFrameWork:NewLabel (container_adds_window, container_adds_window, nil, "titulo", Loc ["STRING_ADDS"], "QuestFont_Large", 16, {1, 1, 1})
|
||||
container_adds_window.titulo:SetPoint ("bottomleft", container_adds_window, "topleft", 0, 4)
|
||||
|
||||
DetailsFrameWork:NewScrollBar (container_adds_window, container_adds_frame, 4, -9)
|
||||
DetailsFrameWork:NewScrollBar (container_adds_window, container_adds_frame, 4, -13)
|
||||
container_adds_window.slider:Altura (45)
|
||||
container_adds_window.slider:cimaPoint (0, 1)
|
||||
container_adds_window.slider:baixoPoint (0, -1)
|
||||
@@ -970,14 +1077,14 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156:
|
||||
container_interrupt_frame:SetMovable (true)
|
||||
|
||||
container_interrupt_window:SetWidth (170)
|
||||
container_interrupt_window:SetHeight (67)
|
||||
container_interrupt_window:SetHeight (65)
|
||||
container_interrupt_window:SetScrollChild (container_interrupt_frame)
|
||||
container_interrupt_window:SetPoint ("TOPLEFT", frame, "TOPLEFT", 480, -117)
|
||||
container_interrupt_window:SetPoint ("TOPLEFT", frame, "TOPLEFT", 480, -113)
|
||||
|
||||
DetailsFrameWork:NewLabel (container_interrupt_window, container_interrupt_window, nil, "titulo", Loc ["STRING_INTERRUPTS"], "QuestFont_Large", 16, {1, 1, 1})
|
||||
container_interrupt_window.titulo:SetPoint ("bottomleft", container_interrupt_window, "topleft", 0, 4)
|
||||
|
||||
DetailsFrameWork:NewScrollBar (container_interrupt_window, container_interrupt_frame, 4, -9)
|
||||
DetailsFrameWork:NewScrollBar (container_interrupt_window, container_interrupt_frame, 4, -13)
|
||||
container_interrupt_window.slider:Altura (45)
|
||||
container_interrupt_window.slider:cimaPoint (0, 1)
|
||||
container_interrupt_window.slider:baixoPoint (0, -1)
|
||||
@@ -1041,20 +1148,20 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156:
|
||||
|
||||
container_dispell_frame:SetAllPoints (container_dispell_window)
|
||||
container_dispell_frame:SetWidth (170)
|
||||
container_dispell_frame:SetHeight (67)
|
||||
container_dispell_frame:SetHeight (62)
|
||||
container_dispell_frame:EnableMouse (true)
|
||||
container_dispell_frame:SetResizable (false)
|
||||
container_dispell_frame:SetMovable (true)
|
||||
|
||||
container_dispell_window:SetWidth (170)
|
||||
container_dispell_window:SetHeight (70)
|
||||
container_dispell_window:SetHeight (68)
|
||||
container_dispell_window:SetScrollChild (container_dispell_frame)
|
||||
container_dispell_window:SetPoint ("TOPLEFT", frame, "TOPLEFT", 260, -235)
|
||||
container_dispell_window:SetPoint ("TOPLEFT", frame, "TOPLEFT", 260, -231)
|
||||
|
||||
DetailsFrameWork:NewLabel (container_dispell_window, container_dispell_window, nil, "titulo", Loc ["STRING_DISPELLS"], "QuestFont_Large", 16, {1, 1, 1})
|
||||
container_dispell_window.titulo:SetPoint ("bottomleft", container_dispell_window, "topleft", 0, 4)
|
||||
|
||||
DetailsFrameWork:NewScrollBar (container_dispell_window, container_dispell_frame, 4, -9)
|
||||
DetailsFrameWork:NewScrollBar (container_dispell_window, container_dispell_frame, 4, -13)
|
||||
container_dispell_window.slider:Altura (45)
|
||||
container_dispell_window.slider:cimaPoint (0, 1)
|
||||
container_dispell_window.slider:baixoPoint (0, -1)
|
||||
|
||||
+11
@@ -200,6 +200,17 @@ function _G._detalhes:Start()
|
||||
--> send details startup done signal
|
||||
function self:AnnounceStartup()
|
||||
self:SendEvent ("DETAILS_STARTED", "SEND_TO_ALL")
|
||||
|
||||
if (_detalhes.in_group) then
|
||||
_detalhes:SendEvent ("GROUP_ONENTER")
|
||||
else
|
||||
_detalhes:SendEvent ("GROUP_ONLEAVE")
|
||||
end
|
||||
|
||||
_detalhes.last_zone_type = "INIT"
|
||||
_detalhes.parser_functions:ZONE_CHANGED_NEW_AREA()
|
||||
|
||||
_detalhes.AnnounceStartup = nil
|
||||
end
|
||||
self:ScheduleTimer ("AnnounceStartup", 5)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user