Scripts "Health Potion & Stone" and "Potion Used" updated

This commit is contained in:
Tercio Jose
2023-01-17 19:11:36 -03:00
parent 764b779813
commit 8025165398
18 changed files with 944 additions and 848 deletions
+33 -27
View File
@@ -26,6 +26,7 @@ local _detalhes = _G._detalhes
local Details = _detalhes
local AceLocale = LibStub("AceLocale-3.0")
local Loc = AceLocale:GetLocale ( "Details" )
local detailsFramework = DetailsFramework
local addonName, Details222 = ...
local gump = _detalhes.gump
@@ -169,14 +170,17 @@ end
end
function atributo_misc:NovaTabela(serial, nome, link)
local newActor = {
local newUtilityActor = {
last_event = 0,
tipo = class_type,
pets = {}
}
setmetatable(newActor, atributo_misc)
return newActor
setmetatable(newUtilityActor, atributo_misc)
detailsFramework:Mixin(newUtilityActor, Details222.Mixins.ActorMixin)
return newUtilityActor
end
function atributo_misc:CreateBuffTargetObject()
@@ -2738,107 +2742,109 @@ function atributo_misc:ColetarLixo (lastevent)
return _detalhes:ColetarLixo (class_type, lastevent)
end
function _detalhes.refresh:r_atributo_misc (este_jogador, shadow)
setmetatable(este_jogador, _detalhes.atributo_misc)
este_jogador.__index = _detalhes.atributo_misc
function _detalhes.refresh:r_atributo_misc(thisActor, shadow)
setmetatable(thisActor, _detalhes.atributo_misc)
detailsFramework:Mixin(thisActor, Details222.Mixins.ActorMixin)
thisActor.__index = _detalhes.atributo_misc
--refresh spell cast
if (este_jogador.spell_cast) then
if (thisActor.spell_cast) then
if (shadow and not shadow.spell_cast) then
shadow.spell_cast = {}
end
end
--refresh cc done
if (este_jogador.cc_done) then
if (thisActor.cc_done) then
if (shadow and not shadow.cc_done_targets) then
shadow.cc_done = 0
shadow.cc_done_targets = {}
shadow.cc_done_spells = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS)
end
_detalhes.refresh:r_container_habilidades (este_jogador.cc_done_spells, shadow and shadow.cc_done_spells)
_detalhes.refresh:r_container_habilidades (thisActor.cc_done_spells, shadow and shadow.cc_done_spells)
end
--refresh interrupts
if (este_jogador.interrupt_targets) then
if (thisActor.interrupt_targets) then
if (shadow and not shadow.interrupt_targets) then
shadow.interrupt = 0
shadow.interrupt_targets = {}
shadow.interrupt_spells = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS)
shadow.interrompeu_oque = {}
end
_detalhes.refresh:r_container_habilidades (este_jogador.interrupt_spells, shadow and shadow.interrupt_spells)
_detalhes.refresh:r_container_habilidades (thisActor.interrupt_spells, shadow and shadow.interrupt_spells)
end
--refresh buff uptime
if (este_jogador.buff_uptime_targets) then
if (thisActor.buff_uptime_targets) then
if (shadow and not shadow.buff_uptime_targets) then
shadow.buff_uptime = 0
shadow.buff_uptime_targets = {}
shadow.buff_uptime_spells = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS)
end
_detalhes.refresh:r_container_habilidades (este_jogador.buff_uptime_spells, shadow and shadow.buff_uptime_spells)
_detalhes.refresh:r_container_habilidades (thisActor.buff_uptime_spells, shadow and shadow.buff_uptime_spells)
end
--refresh buff uptime
if (este_jogador.debuff_uptime_targets) then
if (thisActor.debuff_uptime_targets) then
if (shadow and not shadow.debuff_uptime_targets) then
shadow.debuff_uptime = 0
if (este_jogador.boss_debuff) then
if (thisActor.boss_debuff) then
shadow.debuff_uptime_targets = {}
shadow.boss_debuff = true
shadow.damage_twin = este_jogador.damage_twin
shadow.spellschool = este_jogador.spellschool
shadow.damage_spellid = este_jogador.damage_spellid
shadow.damage_twin = thisActor.damage_twin
shadow.spellschool = thisActor.spellschool
shadow.damage_spellid = thisActor.damage_spellid
shadow.debuff_uptime = 0
else
shadow.debuff_uptime_targets = {}
end
shadow.debuff_uptime_spells = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS)
end
_detalhes.refresh:r_container_habilidades (este_jogador.debuff_uptime_spells, shadow and shadow.debuff_uptime_spells)
_detalhes.refresh:r_container_habilidades (thisActor.debuff_uptime_spells, shadow and shadow.debuff_uptime_spells)
end
--refresh cooldowns defensive
if (este_jogador.cooldowns_defensive_targets) then
if (thisActor.cooldowns_defensive_targets) then
if (shadow and not shadow.cooldowns_defensive_targets) then
shadow.cooldowns_defensive = 0
shadow.cooldowns_defensive_targets = {}
shadow.cooldowns_defensive_spells = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS)
end
_detalhes.refresh:r_container_habilidades (este_jogador.cooldowns_defensive_spells, shadow and shadow.cooldowns_defensive_spells)
_detalhes.refresh:r_container_habilidades (thisActor.cooldowns_defensive_spells, shadow and shadow.cooldowns_defensive_spells)
end
--refresh ressers
if (este_jogador.ress_targets) then
if (thisActor.ress_targets) then
if (shadow and not shadow.ress_targets) then
shadow.ress = 0
shadow.ress_targets = {}
shadow.ress_spells = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS)
end
_detalhes.refresh:r_container_habilidades (este_jogador.ress_spells, shadow and shadow.ress_spells)
_detalhes.refresh:r_container_habilidades (thisActor.ress_spells, shadow and shadow.ress_spells)
end
--refresh dispells
if (este_jogador.dispell_targets) then
if (thisActor.dispell_targets) then
if (shadow and not shadow.dispell_targets) then
shadow.dispell = 0
shadow.dispell_targets = {}
shadow.dispell_spells = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS) --cria o container das habilidades usadas para interromper
shadow.dispell_oque = {}
end
_detalhes.refresh:r_container_habilidades (este_jogador.dispell_spells, shadow and shadow.dispell_spells)
_detalhes.refresh:r_container_habilidades (thisActor.dispell_spells, shadow and shadow.dispell_spells)
end
--refresh cc_breaks
if (este_jogador.cc_break_targets) then
if (thisActor.cc_break_targets) then
if (shadow and not shadow.cc_break) then
shadow.cc_break = 0
shadow.cc_break_targets = {}
shadow.cc_break_spells = container_habilidades:NovoContainer (_detalhes.container_type.CONTAINER_MISC_CLASS)
shadow.cc_break_oque = {}
end
_detalhes.refresh:r_container_habilidades (este_jogador.cc_break_spells, shadow and shadow.cc_break_spells)
_detalhes.refresh:r_container_habilidades (thisActor.cc_break_spells, shadow and shadow.cc_break_spells)
end
end