- Added _detalhes.Sort3 and _detalhes.Sort4.

- Fixed a issue with last_events_table.
- Fixed a issue on saving statubar options.
- Added options for disable and enable the Captures Types.
- Added a option for enable and disable cloud parser.
- Added API _detalhes:CaptureIsAllEnabled() - return if all captures are active.
- Added API _detalhes:CaptureGet (name) return if a specific capture is enabled.
- API GetInternalSubAttributeName() also return for damage and heal types.
- Fixed a issue where Vanguard aren't updating tank list.
This commit is contained in:
Tercio
2013-08-16 22:09:46 -03:00
parent 3e0b1fc10e
commit 31525436d7
13 changed files with 338 additions and 35 deletions
+22 -9
View File
@@ -81,7 +81,8 @@ function atributo_damage:NovaTabela (serial, nome, link)
_new_damageActor.damage_taken = 0 --> total de dano que este jogador levou
_new_damageActor.damage_from = {} --> armazena os nomes que deram dano neste jogador
_new_damageActor.last_events_table = {} --> log da morte
_new_damageActor.last_events_table = _detalhes:CreateActorLastEventTable()
_new_damageActor.last_events_table.original = true
_new_damageActor.avoidance = {["DODGE"] = 0, ["PARRY"] = 0, ["HITS"] = 0} --> avoidance
@@ -117,6 +118,12 @@ function atributo_damage:NovaTabela (serial, nome, link)
return _new_damageActor
end
--[[exported]] function _detalhes:CreateActorLastEventTable()
local t = { {}, {}, {}, {}, {}, {}, {}, {} }
t.n = 1
return t
end
--[[exported]] function _detalhes.SortGroup (container, keyName2)
keyName = keyName2
return _table_sort (container, _detalhes.SortKeyGroup)
@@ -660,7 +667,13 @@ end
--[[exported]] function _detalhes.Sort2 (table1, table2)
return table1 [2] > table2 [2]
end
--[[exported]] function _detalhes.Sort3 (table1, table2)
return table1 [3] > table2 [3]
end
--[[exported]] function _detalhes.Sort4 (table1, table2)
return table1 [4] > table2 [4]
end
---------> DAMAGE DONE & DPS
function atributo_damage:ToolTip_DamageDone (instancia, numero, barra)
@@ -943,7 +956,7 @@ function atributo_damage:MontaInfoFriendlyFire()
local amt = #DamagedPlayers
gump:JI_AtualizaContainerBarras (amt)
local FirstPlaceDamage = DamagedPlayers [1][2]
local FirstPlaceDamage = DamagedPlayers [1] and DamagedPlayers [1][2] or 0
for index, tabela in _ipairs (DamagedPlayers) do
local barra = barras [index]
@@ -1012,7 +1025,7 @@ function atributo_damage:MontaInfoFriendlyFire()
gump:JI_AtualizaContainerAlvos (amt)
FirstPlaceDamage = SkillTable [1][2]
FirstPlaceDamage = SkillTable [1] and SkillTable [1][2] or 0
for index, tabela in _ipairs (SkillTable) do
local barra = barras2 [index]
@@ -1072,7 +1085,7 @@ function atributo_damage:MontaInfoDamageTaken()
gump:JI_AtualizaContainerBarras (amt)
local max_ = meus_agressores [1][2]
local max_ = meus_agressores [1] and meus_agressores [1][2] or 0
for index, tabela in _ipairs (meus_agressores) do
@@ -1232,7 +1245,7 @@ function atributo_damage:MontaInfoDamageDone()
gump:JI_AtualizaContainerBarras (#ActorSkillsSortTable)
local max_ = ActorSkillsSortTable[1][2] --> dano que a primeiro magia vez
local max_ = ActorSkillsSortTable[1] and ActorSkillsSortTable[1][2] or 0 --> dano que a primeiro magia vez
local barra
for index, tabela in _ipairs (ActorSkillsSortTable) do
@@ -1263,7 +1276,7 @@ function atributo_damage:MontaInfoDamageDone()
gump:JI_AtualizaContainerAlvos (amt_alvos)
local max_inimigos = meus_inimigos[1][2]
local max_inimigos = meus_inimigos[1] and meus_inimigos[1][2] or 0
local barra
for index, tabela in _ipairs (meus_inimigos) do
@@ -1350,7 +1363,7 @@ function atributo_damage:MontaDetalhesFriendlyFire (nome, barra)
--local amt = #minhas_magias
--gump:JI_AtualizaContainerBarras (amt)
local max_ = minhas_magias[1][2] --> dano que a primeiro magia vez
local max_ = minhas_magias[1] and minhas_magias[1][2] or 0 --> dano que a primeiro magia vez
local barra
for index, tabela in _ipairs (minhas_magias) do
@@ -1428,7 +1441,7 @@ function atributo_damage:MontaDetalhesDamageTaken (nome, barra)
--local amt = #minhas_magias
--gump:JI_AtualizaContainerBarras (amt)
local max_ = minhas_magias[1][2] --> dano que a primeiro magia vez
local max_ = minhas_magias[1] and minhas_magias[1][2] or 0 --> dano que a primeiro magia vez
local barra
for index, tabela in _ipairs (minhas_magias) do
+8 -7
View File
@@ -79,7 +79,8 @@ function atributo_heal:NovaTabela (serial, nome, link)
esta_tabela.total_without_pet = 0 --> pet de DK cura
esta_tabela.totalover_without_pet = 0 --> pet de DK cura
esta_tabela.last_events_table = {} --> log da morte
esta_tabela.last_events_table = _detalhes:CreateActorLastEventTable()
esta_tabela.last_events_table.original = true
esta_tabela.healing_taken = 0 --> total de cura que este jogador recebeu
esta_tabela.healing_from = {} --> armazena os nomes que deram cura neste jogador
@@ -532,7 +533,7 @@ function atributo_heal:MontaInfoHealTaken()
gump:JI_AtualizaContainerBarras (amt)
local max_ = meus_curandeiros [1][2]
local max_ = meus_curandeiros [1] and meus_curandeiros [1][2] or 0
for index, tabela in _ipairs (meus_curandeiros) do
@@ -610,7 +611,7 @@ function atributo_heal:MontaInfoOverHealing()
local amt = #minhas_curas
gump:JI_AtualizaContainerBarras (amt)
local max_ = minhas_curas[1][2]
local max_ = minhas_curas[1] and minhas_curas[1][2] or 0
for index, tabela in _ipairs (minhas_curas) do
@@ -671,7 +672,7 @@ function atributo_heal:MontaInfoOverHealing()
local amt_alvos = #meus_inimigos
gump:JI_AtualizaContainerAlvos (amt_alvos)
local max_inimigos = meus_inimigos[1][2]
local max_inimigos = meus_inimigos[1] and meus_inimigos[1][2] or 0
for index, tabela in _ipairs (meus_inimigos) do
@@ -727,7 +728,7 @@ function atributo_heal:MontaInfoHealingDone()
local amt = #minhas_curas
gump:JI_AtualizaContainerBarras (amt)
local max_ = minhas_curas[1][2]
local max_ = minhas_curas[1] and minhas_curas[1][2] or 0
for index, tabela in _ipairs (minhas_curas) do
@@ -763,7 +764,7 @@ function atributo_heal:MontaInfoHealingDone()
local amt_alvos = #meus_inimigos
gump:JI_AtualizaContainerAlvos (amt_alvos)
local max_inimigos = meus_inimigos[1][2]
local max_inimigos = meus_inimigos[1] and meus_inimigos[1][2] or 0
for index, tabela in _ipairs (meus_inimigos) do
@@ -905,7 +906,7 @@ function atributo_heal:MontaDetalhesHealingTaken (nome, barra)
--local amt = #minhas_magias
--gump:JI_AtualizaContainerBarras (amt)
local max_ = minhas_magias[1][2] --> dano que a primeiro magia vez
local max_ = minhas_magias[1] and minhas_magias[1][2] or 0 --> dano que a primeiro magia vez
local barra
for index, tabela in _ipairs (minhas_magias) do
+1
View File
@@ -831,6 +831,7 @@ function _detalhes:RestauraJanela (index, temp)
self.StatusBar.left = nil
self.StatusBar.center = nil
self.StatusBar.right = nil
self.StatusBarSaved = self.StatusBarSaved or {options = {}}
self.StatusBar.options = self.StatusBarSaved.options
if (self.StatusBarSaved.center and self.StatusBarSaved.center == "NONE") then
+2 -2
View File
@@ -35,7 +35,7 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
if (_IsInRaid()) then
--print ("estou em RAIDE")
for i = 1, _GetNumGroupMembers(), 1 do
for i = 1, _GetNumGroupMembers() do
if (pet_serial == _UnitGUID ("raidpet"..i)) then
dono_serial = _UnitGUID ("raid"..i)
dono_flags = 0x00000417 --> emulate sourceflag flag
@@ -51,7 +51,7 @@ function container_pets:PegaDono (pet_serial, pet_nome, pet_flags)
elseif (_IsInGroup()) then
--print ("DEBUG estou em PARTY")
for i = 1, _GetNumGroupMembers()-1, 1 do
for i = 1, _GetNumGroupMembers()-1 do
if (pet_serial == _UnitGUID ("partypet"..i)) then
dono_serial = _UnitGUID ("party"..i)
dono_flags = 0x00000417 --> emulate sourceflag flag
+18
View File
@@ -196,6 +196,17 @@
_detalhes:UpdateParserGears()
_detalhes.host_of = nil
_detalhes.host_by = nil
if (_detalhes.in_group and _detalhes.cloud_capture) then
if (_detalhes:IsInInstance() or _detalhes.debug) then
if (not _detalhes:CaptureIsAllEnabled()) then
_detalhes:SendCloudRequest()
end
end
end
_detalhes:SendEvent ("COMBAT_PLAYER_ENTER", nil, _detalhes.tabela_vigente)
end
@@ -324,6 +335,13 @@
_detalhes:UpdateParserGears()
end
_detalhes.host_of = nil
_detalhes.host_by = nil
if (_detalhes.cloud_process) then
_detalhes:CancelTimer (_detalhes.cloud_process)
end
_detalhes.in_combat = false --sinaliza ao addon que não há combate no momento
_detalhes:UpdateParserGears()
+146 -1
View File
@@ -14,6 +14,8 @@
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> api
local temp = {}
function _detalhes:RaidComm (_, data, _, source)
local type = select (2, _detalhes:Deserialize (data))
@@ -21,7 +23,125 @@
print ("comm received", type)
end
if (type == "custom_broadcast") then
if (type == "highfive") then
local player, realm, dversion = select (3, _detalhes:Deserialize (data))
if (player ~= _detalhes.playername) then
_detalhes.details_users [#_detalhes.details_users+1] = {player, realm, dversion}
end
elseif (type == "clouddatareceived") then
local atributo, atributo_name, data = select (3, _detalhes:Deserialize (data))
local container = _detalhes.tabela_vigente [atributo]
for i = 1, #data do
local _this = data [i]
local name = _this [1]
local actor = container:PegarCombatente (_, name)
if (not actor) then
if (IsInRaid()) then
for i = 1, GetNumGroupMembers() do
if (UnitName ("raid"..i) == name) then
actor = container:PegarCombatente (UnitGUID ("raid"..i), name, 0x00000417, true)
break
end
end
elseif (IsInGroup()) then
for i = 1, GetNumGroupMembers()-1 do
if (UnitName ("party"..i) == name or _detalhes.playername == name) then
actor = container:PegarCombatente (UnitGUID ("party"..i), name, 0x00000417, true)
break
end
end
end
end
if (actor) then
actor [atributo_name] = _this [2]
container.need_refresh = true
else
if (_detalhes.debug) then
print ("Actor not found on cloud data received", name, atributo_name)
end
end
end
elseif (type == "clouddatarequest") then
if (not _detalhes.host_of) then
--> delayed response
return
end
local atributo, subatributo = select (3, _detalhes:Deserialize (data))
local data
local atributo_name = _detalhes:GetInternalSubAttributeName (atributo, subatributo)
if (atributo == 1) then
data = _detalhes.atributo_damage:RefreshWindow ({}, _detalhes.tabela_vigente, _, { key = atributo_name, modo = _detalhes.modos.group })
elseif (atributo == 2) then
data = _detalhes.atributo_heal:RefreshWindow ({}, _detalhes.tabela_vigente, _, { key = atributo_name, modo = _detalhes.modos.group })
elseif (atributo == 3) then
data = _detalhes.atributo_energy:RefreshWindow ({}, _detalhes.tabela_vigente, _, { key = atributo_name, modo = _detalhes.modos.group })
elseif (atributo == 4) then
data = _detalhes.atributo_misc:RefreshWindow ({}, _detalhes.tabela_vigente, _, { key = atributo_name, modo = _detalhes.modos.group })
else
return
end
if (data) then
local export = temp
local container = _detalhes.tabela_vigente [atributo]._ActorTable
for i = 1, math.min (6, #container) do
local actor = container [i]
if (not actor.grupo) then
break
end
export [#export+1] = {actor.nome, actor [atributo_name]}
end
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize ("clouddatareceived", atributo, atributo_name, export), "WHISPER", _detalhes.host_of)
table.wipe (temp)
end
elseif (type == "foundcloud") then
if (_detalhes.host_by) then
return
end
local player, realm, dversion = select (3, _detalhes:Deserialize (data))
if (realm ~= GetRealmName()) then
player = player .."-"..realm
end
_detalhes.host_by = player
if (_detalhes.debug) then
print ("Details found a cloud for disabled captures.")
end
_detalhes.cloud_process = _detalhes:ScheduleRepeatingTimer ("RequestData", 7)
elseif (type == "needcloud") then
local player, realm, dversion = select (3, _detalhes:Deserialize (data))
if (_detalhes.debug) then
print (player, _detalhes.host_of, _detalhes:CaptureIsAllEnabled(), dversion == _detalhes.realversion)
end
if (player ~= _detalhes.playername) then
if (not _detalhes.host_of and _detalhes:CaptureIsAllEnabled() and dversion == _detalhes.realversion) then
_detalhes:SendCloudResponse (player, realm)
end
end
elseif (type == "custom_broadcast") then
_detalhes:OnReceiveCustom (select (3, _detalhes:Deserialize (data)))
elseif (type == "equalize_actors") then
@@ -44,4 +164,29 @@
function _detalhes:SendRaidData (type, ...)
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize (type, UnitName ("player"), GetRealmName(), _detalhes.realversion, ...), "RAID")
end
function _detalhes:SendHighFive()
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize ("highfive", UnitName ("player"), GetRealmName(), _detalhes.realversion), "RAID")
end
function _detalhes:SendCloudRequest()
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize ("needcloud", UnitName ("player"), GetRealmName(), _detalhes.realversion), "RAID")
end
function _detalhes:SendCloudResponse (player, realm)
if (realm ~= GetRealmName()) then
player = player .."-"..realm
end
_detalhes.host_of = player
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize ("foundcloud", UnitName ("player"), GetRealmName(), _detalhes.realversion), "WHISPER", player)
end
function _detalhes:RequestData()
for index = 1, #_detalhes.tabela_instancias do
local instancia = _detalhes.tabela_instancias [index]
if (instancia.ativa) then
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize ("clouddatarequest", instancia.atributo, instancia.sub_atributo), "WHISPER", _detalhes.host_by)
break
end
end
end
+32 -1
View File
@@ -1620,6 +1620,15 @@
_detalhes.capture_types = {"damage", "heal", "energy", "miscdata", "aura"}
function _detalhes:CaptureIsAllEnabled()
for _, _thisType in _ipairs (_detalhes.capture_types) do
if (not _detalhes.capture_real [_thisType]) then
return false
end
end
return true
end
function _detalhes:CaptureRefresh()
for _, _thisType in _ipairs (_detalhes.capture_types) do
if (_detalhes.capture_current [_thisType]) then
@@ -1629,6 +1638,10 @@
end
end
end
function _detalhes:CaptureGet (capture_type)
return _detalhes.capture_real [capture_type]
end
function _detalhes:CaptureSet (on_off, capture_type, real, time)
@@ -1788,6 +1801,8 @@
--serach key: ~event
function _detalhes:OnEvent (evento, ...)
--print (evento, select (1, ...))
if (evento == "COMBAT_LOG_EVENT_UNFILTERED") then
return parser:do_parser (...)
@@ -1836,6 +1851,10 @@
if (_detalhes.EncounterInformation [_detalhes.zone_id]) then
_detalhes:ScheduleTimer ("ReadBossFrames", 1)
end
if (not _detalhes:CaptureGet ("damage")) then
_detalhes:EntrarEmCombate()
end
--> essa parte do solo mode ainda sera usada?
if (_detalhes.solo and _detalhes.PluginCount.SOLO > 0) then --> solo mode
@@ -1854,8 +1873,20 @@
end
return
elseif (evento == "RAID_ROSTER_UPDATE") then
elseif (evento == "GROUP_ROSTER_UPDATE") then
_detalhes.container_pets:BuscarPets()
if (not _detalhes.in_group) then
_detalhes.in_group = IsInGroup() or IsInRaid()
if (_detalhes.in_group) then
_detalhes:SendHighFive()
end
else
_detalhes.in_group = IsInGroup() or IsInRaid()
if (not _detalhes.in_group) then
table.wipe (_detalhes.details_users)
end
end
return
elseif (evento == "PARTY_MEMBERS_CHANGED") then
+5 -5
View File
@@ -66,7 +66,8 @@ do
{"Interface\\AddOns\\Details\\images\\atributos_icones_damage", {.125, .25, 0, 1}},
{"Interface\\AddOns\\Details\\images\\atributos_icones_damage", {.25, .375, 0, 1}},
{"Interface\\AddOns\\Details\\images\\atributos_icones_damage", {.375, .5, 0, 1}}
}
},
internal = {"total", "last_dps", "damage_taken", "friendlyfire_total"}
},
{
@@ -87,7 +88,8 @@ do
{"Interface\\AddOns\\Details\\images\\atributos_icones_heal", {.125, .25, 0, 1}},
{"Interface\\AddOns\\Details\\images\\atributos_icones_heal", {.25, .375, 0, 1}},
{"Interface\\AddOns\\Details\\images\\atributos_icones_heal", {.375, .5, 0, 1}}
}
},
internal = {"total", "last_hps", "totalover", "healing_taken"}
},
{
@@ -149,9 +151,7 @@ do
end
function _detalhes:GetInternalSubAttributeName (attribute, subAttribute)
if (attribute == 3 or attribute == 4) then
return _detalhes.sub_atributos [attribute].internal [subAttribute]
end
return _detalhes.sub_atributos [attribute].internal [subAttribute]
end
end
+3
View File
@@ -63,6 +63,7 @@ function _detalhes:SaveDataOnLogout()
_detalhes_database.switch.table = _detalhes.switch.table
-- capture
_detalhes_database.capture_real = _detalhes.capture_real
_detalhes_database.cloud_capture = _detalhes.cloud_capture
_detalhes_database.minimum_combat_time = _detalhes.minimum_combat_time
--> combat data
-- segments table
@@ -255,6 +256,8 @@ end --]]
["miscdata"] = true,
["aura"] = true,
}
_detalhes.cloud_capture = _detalhes_database.cloud_capture
_detalhes.capture_current = {}
for captureType, captureValue in pairs (_detalhes.capture_real) do
_detalhes.capture_current [captureType] = captureValue
+3 -4
View File
@@ -67,10 +67,9 @@ function SlashCmdList.DETAILS (msg, editbox)
elseif (msg == "comm") then
--_detalhes:SendData ("RAID", "Hello There!")
local s = _detalhes:Serialize ("tercio", "jose")
local d, e, f = _detalhes:Deserialize (s)
print (d, e, f)
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize ("foundcloud", UnitName ("player"), GetRealmName(), _detalhes.realversion), "WHISPER", "Marleyieu-Azralon")
SendAddonMessage ("details_comm", "text", "WHISPER", "Marleyieu-Azralon")
SendChatMessage ("Hello Bob!", "WHISPER", "Common", "Marleyieu-Azralon")
elseif (msg == "visao") then
--_detalhes:VisiblePlayers()
+81 -2
View File
@@ -15,7 +15,7 @@ function _detalhes:OpenOptionsWindow (instance)
-- Most of details widgets have the same 6 first parameters: parent, container, global name, parent key, width, height
window = g:NewPanel (UIParent, _, "DetailsOptionsWindow", _, 500, 300)
window = g:NewPanel (UIParent, _, "DetailsOptionsWindow", _, 500, 320)
window.instance = instance
tinsert (UISpecialFrames, "DetailsOptionsWindow")
window:SetPoint ("center", UIParent, "Center")
@@ -163,6 +163,85 @@ function _detalhes:OpenOptionsWindow (instance)
g:NewDropDown (window, _, "$parentTTDropdown", "timetypeDropdown", 160, 20, buildTimeTypeMenu, nil) -- func, default
window.timetypeDropdown:SetPoint ("left", window.timetypeLabel, "right")
--------------- Captures
g:NewImage (window, _, "$parentCaptureDamage", "damageCaptureImage", 20, 20, [[Interface\AddOns\Details\images\atributos_captures]])
window.damageCaptureImage:SetPoint (10, -163)
window.damageCaptureImage:SetTexCoord (0, 0.125, 0, 1)
g:NewImage (window, _, "$parentCaptureHeal", "healCaptureImage", 20, 20, [[Interface\AddOns\Details\images\atributos_captures]])
window.healCaptureImage:SetPoint (10, -183)
window.healCaptureImage:SetTexCoord (0.125, 0.25, 0, 1)
g:NewImage (window, _, "$parentCaptureEnergy", "energyCaptureImage", 20, 20, [[Interface\AddOns\Details\images\atributos_captures]])
window.energyCaptureImage:SetPoint (10, -203)
window.energyCaptureImage:SetTexCoord (0.25, 0.375, 0, 1)
g:NewImage (window, _, "$parentCaptureMisc", "miscCaptureImage", 20, 20, [[Interface\AddOns\Details\images\atributos_captures]])
window.miscCaptureImage:SetPoint (10, -223)
window.miscCaptureImage:SetTexCoord (0.375, 0.5, 0, 1)
g:NewImage (window, _, "$parentCaptureAura", "auraCaptureImage", 20, 20, [[Interface\AddOns\Details\images\atributos_captures]])
window.auraCaptureImage:SetPoint (10, -243)
window.auraCaptureImage:SetTexCoord (0.5, 0.625, 0, 1)
g:NewLabel (window, _, "$parentCaptureDamageLabel", "damageCaptureLabel", "Damage")
window.damageCaptureLabel:SetPoint ("left", window.damageCaptureImage, "right", 2)
g:NewLabel (window, _, "$parentCaptureDamageLabel", "healCaptureLabel", "Healing")
window.healCaptureLabel:SetPoint ("left", window.healCaptureImage, "right", 2)
g:NewLabel (window, _, "$parentCaptureDamageLabel", "energyCaptureLabel", "Energy")
window.energyCaptureLabel:SetPoint ("left", window.energyCaptureImage, "right", 2)
g:NewLabel (window, _, "$parentCaptureDamageLabel", "miscCaptureLabel", "Misc")
window.miscCaptureLabel:SetPoint ("left", window.miscCaptureImage, "right", 2)
g:NewLabel (window, _, "$parentCaptureDamageLabel", "auraCaptureLabel", "Auras")
window.auraCaptureLabel:SetPoint ("left", window.auraCaptureImage, "right", 2)
g:NewSwitch (window, _, "$parentCaptureDamageSlider", "damageCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["damage"])
window.damageCaptureSlider:SetPoint ("left", window.damageCaptureLabel, "right", 2)
window.damageCaptureSlider.tooltip = "Pause or enable capture of:\n- damage done\n- damage per second\n- friendly fire\n- damage taken"
window.damageCaptureSlider.OnSwitch = function (self, _, value)
_detalhes:CaptureSet (value, "damage", true)
end
g:NewSwitch (window, _, "$parentCaptureHealSlider", "healCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["heal"])
window.healCaptureSlider:SetPoint ("left", window.healCaptureLabel, "right", 2)
window.healCaptureSlider.tooltip = "Pause or enable capture of:\n- healing done (not absorbs)\n- healing per second\n- overheal\n- healing taken"
window.healCaptureSlider.OnSwitch = function (self, _, value)
_detalhes:CaptureSet (value, "heal", true)
end
g:NewSwitch (window, _, "$parentCaptureEnergySlider", "energyCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["energy"])
window.energyCaptureSlider:SetPoint ("left", window.energyCaptureLabel, "right", 2)
window.energyCaptureSlider.tooltip = "Pause or enable capture of:\n- mana restored\n- rage generated\n- energy generated\n- runic power generated"
window.energyCaptureSlider.OnSwitch = function (self, _, value)
_detalhes:CaptureSet (value, "energy", true)
end
g:NewSwitch (window, _, "$parentCaptureMiscSlider", "miscCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["miscdata"])
window.miscCaptureSlider:SetPoint ("left", window.miscCaptureLabel, "right", 2)
window.miscCaptureSlider.tooltip = "Pause or enable capture of:\n- cc breaks\n- dispell\n- interrupts\n- ress\n- deaths"
window.miscCaptureSlider.OnSwitch = function (self, _, value)
_detalhes:CaptureSet (value, "miscdata", true)
end
g:NewSwitch (window, _, "$parentCaptureAuraSlider", "auraCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["aura"])
window.auraCaptureSlider:SetPoint ("left", window.auraCaptureLabel, "right", 2)
window.auraCaptureSlider.tooltip = "Pause or enable capture of:\n- buffs and debufs\n- absorbs (heal)"
window.auraCaptureSlider.OnSwitch = function (self, _, value)
_detalhes:CaptureSet (value, "aura", true)
end
--------------- Cload Capture
g:NewLabel (window, _, "$parentCloudCaptureLabel", "cloudCaptureLabel", "Cloud Capture")
window.cloudCaptureLabel:SetPoint (10, -268)
g:NewSwitch (window, _, "$parentCloudAuraSlider", "cloudCaptureSlider", 60, 20, _, _, _detalhes.cloud_capture)
window.cloudCaptureSlider:SetPoint ("left", window.cloudCaptureLabel, "right", 2)
window.cloudCaptureSlider.tooltip = "Download capture data from another\nraid member when a capture are disabled."
window.cloudCaptureSlider.OnSwitch = function (self, _, value)
_detalhes.cloud_capture = value
end
-- Current Instalnce --------------------------------------------------------------------------------------------------------------------------------------------
@@ -487,7 +566,7 @@ function _detalhes:OpenOptionsWindow (instance)
----- style name
g:NewTextEntry (window, _, "$parentSaveStyleName", "saveStyleName", nil, 20, _, _, _, 178) --width will be auto adjusted if space parameter is passed
window.saveStyleName:SetLabelText ("style name:")
window.saveStyleName:SetPoint (250, -280)
window.saveStyleName:SetPoint (250, -300)
local saveStyleFunc = function()
if (not window.saveStyleName.text or window.saveStyleName.text == "") then
@@ -60,7 +60,7 @@ local function CreatePluginFrames (data)
if (event == "HIDE") then --> plugin hidded, disabled
VanguardFrame:SetScript ("OnUpdate", nil)
VanguardFrame:UnregisterEvent ("ROLE_CHANGED_INFORM")
VanguardFrame:UnregisterEvent ("RAID_ROSTER_UPDATE")
VanguardFrame:UnregisterEvent ("GROUP_ROSTER_UPDATE")
VanguardFrame:UnregisterEvent ("PLAYER_TARGET_CHANGED")
Vanguard:Cancel()
@@ -75,7 +75,7 @@ local function CreatePluginFrames (data)
Vanguard:OnResize()
VanguardFrame:RegisterEvent ("ROLE_CHANGED_INFORM")
VanguardFrame:RegisterEvent ("RAID_ROSTER_UPDATE")
VanguardFrame:RegisterEvent ("GROUP_ROSTER_UPDATE")
VanguardFrame:RegisterEvent ("PLAYER_TARGET_CHANGED")
Vanguard:ResetBars()
@@ -1234,7 +1234,7 @@ function Vanguard:OnEvent (_, event, ...)
elseif (event == "PLAYER_TARGET_CHANGED") then
Vanguard:TargetChanged()
elseif (event == "ROLE_CHANGED_INFORM" or event == "RAID_ROSTER_UPDATE") then --> raid changes
elseif (event == "ROLE_CHANGED_INFORM" or event == "GROUP_ROSTER_UPDATE") then --> raid changes
Vanguard:IdentifyTanks()
elseif (event == "ZONE_CHANGED_NEW_AREA" or event == "PLAYER_ENTERING_WORLD") then --> logon or map changes
+14 -1
View File
@@ -33,6 +33,10 @@ function _G._detalhes:Start()
self.deadlog_limit = self.deadlog_limit or 12
self.minimum_combat_time = self.minimum_combat_time or 5
if (type (self.cloud_capture) ~= "boolean") then
self.cloud_capture = true
end
if (type (self.segments_panic_mode) ~= "boolean") then
self.segments_panic_mode = true
end
@@ -227,7 +231,7 @@ function _G._detalhes:Start()
self.listener:RegisterEvent ("UNIT_PET")
self.listener:RegisterEvent ("PARTY_MEMBERS_CHANGED")
self.listener:RegisterEvent ("RAID_ROSTER_UPDATE")
self.listener:RegisterEvent ("GROUP_ROSTER_UPDATE")
self.listener:RegisterEvent ("PARTY_CONVERTED_TO_RAID")
self.listener:RegisterEvent ("INSTANCE_ENCOUNTER_ENGAGE_UNIT")
@@ -235,6 +239,8 @@ function _G._detalhes:Start()
self.listener:RegisterEvent ("ZONE_CHANGED_NEW_AREA")
self.listener:RegisterEvent ("PLAYER_ENTERING_WORLD")
--self.listener:RegisterAllEvents()
-- self.listener:RegisterEvent ("SPELL_CAST_START")
-- self.listener:RegisterEvent ("UNIT_SPELLCAST_STOP")
-- self.listener:RegisterEvent ("UNIT_SPELLCAST_SUCCEEDED")
@@ -247,6 +253,13 @@ function _G._detalhes:Start()
--> done
self.initializing = nil
--> group
self.details_users = {}
self.in_group = IsInGroup() or IsInRaid()
if (self.in_group) then
_detalhes:SendHighFive()
end
--> send messages gathered on initialization
self:ScheduleTimer ("ShowDelayMsg", 7)