- Many internal improvaments and bug fixes.
- Fixed target names on custom displays. - Fixed plugins icons being shown when auto hide menu is on. - Slash command '/details worldboss' is now updated to show Draenor world bosses.
This commit is contained in:
@@ -95,7 +95,7 @@ returns the current combat object.
|
||||
_detalhes:GetCombatSegments()
|
||||
returns the numeric table containing all past segments.
|
||||
|
||||
_detalhes:GetCombatId()
|
||||
_detalhes:GetCombatNumber()
|
||||
returns the current unique combat number counter.
|
||||
combat number is a unique number given to each combat started, this number won't
|
||||
reset when data is wiped and each character have its own combat number counter.
|
||||
|
||||
+24
-18
@@ -1275,9 +1275,9 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
|
||||
porcentagem = _cstr ("%.1f", self [keyName] / instancia.top * 100)
|
||||
end
|
||||
|
||||
--tempo da shadow não é mais calculado pela timemachine
|
||||
if ((_detalhes.time_type == 2 and self.grupo) or not _detalhes:CaptureGet ("damage") or not self.shadow) then --not self.shadow is overall but...
|
||||
if (not self.shadow and combat_time == 0) then
|
||||
--> tempo da shadow não é calculado pela timemachine
|
||||
if ( (_detalhes.time_type == 2 and self.grupo) or not _detalhes:CaptureGet ("damage") or instancia.segmento == -1) then
|
||||
if (instancia.segmento == -1 and combat_time == 0) then
|
||||
local p = _detalhes.tabela_vigente (1, self.nome)
|
||||
if (p) then
|
||||
local t = p:Tempo()
|
||||
@@ -3055,24 +3055,16 @@ function atributo_damage:MontaTooltipAlvos (esta_barra, index, instancia)
|
||||
|
||||
end
|
||||
|
||||
--controla se o dps do jogador esta travado ou destravado
|
||||
--> controla se o dps do jogador esta travado ou destravado
|
||||
function atributo_damage:Iniciar (iniciar)
|
||||
if (iniciar == nil) then
|
||||
return self.dps_started --retorna se o dps esta aberto ou fechado para este jogador
|
||||
return self.dps_started --> retorna se o dps esta aberto ou fechado para este jogador
|
||||
elseif (iniciar) then
|
||||
self.dps_started = true
|
||||
self:RegistrarNaTimeMachine() --coloca ele da timeMachine
|
||||
if (self.shadow) then
|
||||
self.shadow.dps_started = true --> isso foi posto recentemente
|
||||
--self.shadow:RegistrarNaTimeMachine()
|
||||
end
|
||||
else
|
||||
self.dps_started = false
|
||||
self:DesregistrarNaTimeMachine() --retira ele da timeMachine
|
||||
if (self.shadow) then
|
||||
--self.shadow:DesregistrarNaTimeMachine()
|
||||
self.shadow.dps_started = false --> isso foi posto recentemente
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3127,8 +3119,14 @@ end
|
||||
|
||||
if (not shadow) then
|
||||
shadow = overall_dano:PegarCombatente (actor.serial, actor.nome, actor.flag_original, true)
|
||||
|
||||
shadow.classe = actor.classe
|
||||
shadow.grupo = actor.grupo
|
||||
shadow.isTank = actor.isTank
|
||||
shadow.boss = actor.boss
|
||||
shadow.boss_fight_component = actor.boss_fight_component
|
||||
shadow.fight_component = actor.fight_component
|
||||
|
||||
shadow.start_time = time() - 3
|
||||
shadow.end_time = time()
|
||||
end
|
||||
@@ -3179,8 +3177,14 @@ end
|
||||
|
||||
if (not shadow) then
|
||||
shadow = overall_dano:PegarCombatente (actor.serial, actor.nome, actor.flag_original, true)
|
||||
|
||||
shadow.classe = actor.classe
|
||||
shadow.isTank = actor.isTank
|
||||
shadow.grupo = actor.grupo
|
||||
shadow.boss = actor.boss
|
||||
shadow.boss_fight_component = actor.boss_fight_component
|
||||
shadow.fight_component = actor.fight_component
|
||||
|
||||
shadow.start_time = time() - 3
|
||||
shadow.end_time = time()
|
||||
end
|
||||
@@ -3189,12 +3193,16 @@ end
|
||||
if (not no_refresh) then
|
||||
_detalhes.refresh:r_atributo_damage (actor, shadow)
|
||||
end
|
||||
|
||||
--> tempo decorrido (captura de dados)
|
||||
if (actor.end_time) then
|
||||
local tempo = (actor.end_time or time()) - actor.start_time
|
||||
shadow.start_time = shadow.start_time - tempo
|
||||
local end_time = actor.end_time
|
||||
if (not actor.end_time) then
|
||||
end_time = time()
|
||||
end
|
||||
|
||||
local tempo = end_time - actor.start_time
|
||||
shadow.start_time = shadow.start_time - tempo
|
||||
|
||||
--> total de dano (captura de dados)
|
||||
shadow.total = shadow.total + actor.total
|
||||
--> total de dano sem o pet (captura de dados)
|
||||
@@ -3390,8 +3398,6 @@ function _detalhes.refresh:r_atributo_damage (este_jogador, shadow)
|
||||
--> restaura metas do ator
|
||||
_setmetatable (este_jogador, _detalhes.atributo_damage)
|
||||
este_jogador.__index = _detalhes.atributo_damage
|
||||
--> atribui a shadow a ele
|
||||
este_jogador.shadow = shadow
|
||||
--> restaura as metas dos containers
|
||||
_detalhes.refresh:r_container_habilidades (este_jogador.spells, shadow.spells)
|
||||
end
|
||||
|
||||
@@ -1388,8 +1388,14 @@ end
|
||||
|
||||
if (not shadow) then
|
||||
shadow = overall_energy:PegarCombatente (actor.serial, actor.nome, actor.flag_original, true)
|
||||
|
||||
shadow.classe = actor.classe
|
||||
shadow.grupo = actor.grupo
|
||||
shadow.isTank = actor.isTank
|
||||
shadow.boss = actor.boss
|
||||
shadow.boss_fight_component = actor.boss_fight_component
|
||||
shadow.fight_component = actor.fight_component
|
||||
|
||||
end
|
||||
|
||||
--> restaura a meta e indexes ao ator
|
||||
@@ -1421,8 +1427,14 @@ end
|
||||
|
||||
if (not shadow) then
|
||||
shadow = overall_energy:PegarCombatente (actor.serial, actor.nome, actor.flag_original, true)
|
||||
|
||||
shadow.classe = actor.classe
|
||||
shadow.grupo = actor.grupo
|
||||
shadow.isTank = actor.isTank
|
||||
shadow.boss = actor.boss
|
||||
shadow.boss_fight_component = actor.boss_fight_component
|
||||
shadow.fight_component = actor.fight_component
|
||||
|
||||
end
|
||||
|
||||
--> restaura a meta e indexes ao ator
|
||||
@@ -1477,11 +1489,9 @@ end
|
||||
function _detalhes.refresh:r_atributo_energy (este_jogador, shadow)
|
||||
_setmetatable (este_jogador, _detalhes.atributo_energy)
|
||||
este_jogador.__index = _detalhes.atributo_energy
|
||||
|
||||
este_jogador.shadow = shadow
|
||||
|
||||
|
||||
_detalhes.refresh:r_container_habilidades (este_jogador.spells, shadow.spells)
|
||||
|
||||
|
||||
if (not shadow.powertype) then
|
||||
shadow.powertype = este_jogador.powertype
|
||||
end
|
||||
|
||||
+21
-23
@@ -113,15 +113,7 @@ function atributo_heal:NovaTabela (serial, nome, link)
|
||||
}
|
||||
|
||||
_setmetatable (_new_healActor, atributo_heal)
|
||||
|
||||
--if (link) then --> se não for a shadow
|
||||
--_new_healActor.last_events_table = _detalhes:CreateActorLastEventTable()
|
||||
--_new_healActor.last_events_table.original = true
|
||||
|
||||
--_new_healActor.targets.shadow = link.targets
|
||||
--_new_healActor.spells.shadow = link.spells
|
||||
--end
|
||||
|
||||
|
||||
return _new_healActor
|
||||
end
|
||||
|
||||
@@ -580,8 +572,8 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
|
||||
porcentagem = _cstr ("%.1f", self [keyName] / instancia.top * 100)
|
||||
end
|
||||
|
||||
if ((_detalhes.time_type == 2 and self.grupo) or (not _detalhes:CaptureGet ("heal") and not _detalhes:CaptureGet ("aura")) or not self.shadow) then
|
||||
if (not self.shadow and combat_time == 0) then
|
||||
if ((_detalhes.time_type == 2 and self.grupo) or (not _detalhes:CaptureGet ("heal") and not _detalhes:CaptureGet ("aura")) or instancia.segmento == -1) then
|
||||
if (instancia.segmento == -1 and combat_time == 0) then
|
||||
local p = _detalhes.tabela_vigente (2, self.nome)
|
||||
if (p) then
|
||||
local t = p:Tempo()
|
||||
@@ -1992,17 +1984,9 @@ function atributo_heal:Iniciar (iniciar)
|
||||
elseif (iniciar) then
|
||||
self.iniciar_hps = true
|
||||
self:RegistrarNaTimeMachine() --coloca ele da timeMachine
|
||||
if (self.shadow) then
|
||||
self.shadow.iniciar_hps = true --> isso foi posto recentemente
|
||||
--self.shadow:RegistrarNaTimeMachine()
|
||||
end
|
||||
else
|
||||
self.iniciar_hps = false
|
||||
self:DesregistrarNaTimeMachine() --retira ele da timeMachine
|
||||
if (self.shadow) then
|
||||
self.shadow.iniciar_hps = false --> isso foi posto recentemente
|
||||
--self.shadow:DesregistrarNaTimeMachine()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2048,8 +2032,14 @@ end
|
||||
|
||||
if (not shadow) then
|
||||
shadow = overall_cura:PegarCombatente (actor.serial, actor.nome, actor.flag_original, true)
|
||||
|
||||
shadow.classe = actor.classe
|
||||
shadow.grupo = actor.grupo
|
||||
shadow.isTank = actor.isTank
|
||||
shadow.boss = actor.boss
|
||||
shadow.boss_fight_component = actor.boss_fight_component
|
||||
shadow.fight_component = actor.fight_component
|
||||
|
||||
shadow.start_time = time() - 3
|
||||
shadow.end_time = time()
|
||||
end
|
||||
@@ -2103,8 +2093,14 @@ end
|
||||
|
||||
if (not shadow) then
|
||||
shadow = overall_cura:PegarCombatente (actor.serial, actor.nome, actor.flag_original, true)
|
||||
|
||||
shadow.classe = actor.classe
|
||||
shadow.grupo = actor.grupo
|
||||
shadow.isTank = actor.isTank
|
||||
shadow.boss = actor.boss
|
||||
shadow.boss_fight_component = actor.boss_fight_component
|
||||
shadow.fight_component = actor.fight_component
|
||||
|
||||
shadow.start_time = time() - 3
|
||||
shadow.end_time = time()
|
||||
end
|
||||
@@ -2115,10 +2111,13 @@ end
|
||||
end
|
||||
|
||||
--> tempo decorrido (captura de dados)
|
||||
if (actor.end_time) then
|
||||
local tempo = (actor.end_time or time()) - actor.start_time
|
||||
shadow.start_time = shadow.start_time - tempo
|
||||
local end_time = actor.end_time
|
||||
if (not actor.end_time) then
|
||||
end_time = time()
|
||||
end
|
||||
|
||||
local tempo = end_time - actor.start_time
|
||||
shadow.start_time = shadow.start_time - tempo
|
||||
|
||||
--> total de cura (captura de dados)
|
||||
shadow.total = shadow.total + actor.total
|
||||
@@ -2364,7 +2363,6 @@ function _detalhes.refresh:r_atributo_heal (este_jogador, shadow)
|
||||
_setmetatable (este_jogador, atributo_heal)
|
||||
este_jogador.__index = atributo_heal
|
||||
|
||||
este_jogador.shadow = shadow
|
||||
_detalhes.refresh:r_container_habilidades (este_jogador.spells, shadow.spells)
|
||||
end
|
||||
|
||||
|
||||
@@ -593,6 +593,30 @@ end
|
||||
end
|
||||
end
|
||||
new_instance:ChangeSkin()
|
||||
|
||||
else
|
||||
--> se não tiver um padrão, criar de outra instância já aberta.
|
||||
local copy_from
|
||||
for i = 1, next_id-1 do
|
||||
local opened_instance = _detalhes:GetInstance (i)
|
||||
if (opened_instance and opened_instance:IsEnabled() and opened_instance.baseframe) then
|
||||
copy_from = opened_instance
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if (copy_from) then
|
||||
for key, value in pairs (copy_from) do
|
||||
if (_detalhes.instance_defaults [key] ~= nil) then
|
||||
if (type (value) == "table") then
|
||||
new_instance [key] = table_deepcopy (value)
|
||||
else
|
||||
new_instance [key] = value
|
||||
end
|
||||
end
|
||||
end
|
||||
new_instance:ChangeSkin()
|
||||
end
|
||||
end
|
||||
|
||||
return new_instance
|
||||
@@ -2419,7 +2443,7 @@ function _detalhes:AlteraModo (instancia, qual, from_mode_menu)
|
||||
instancia.atributo = instancia.atributo or 1
|
||||
instancia.showing[instancia.atributo].need_refresh = true
|
||||
end
|
||||
|
||||
|
||||
if (qual == modo_alone) then
|
||||
|
||||
instancia.LastModo = instancia.modo
|
||||
@@ -2496,7 +2520,7 @@ function _detalhes:AlteraModo (instancia, qual, from_mode_menu)
|
||||
_detalhes:SendEvent ("DETAILS_INSTANCE_CHANGEMODE", nil, instancia, modo_all)
|
||||
_detalhes:SendEvent ("DETAILS_INSTANCE_CHANGEATTRIBUTE", nil, instancia, instancia.atributo, instancia.sub_atributo)
|
||||
end
|
||||
|
||||
|
||||
local checked
|
||||
if (instancia.modo == 1) then
|
||||
checked = 4
|
||||
@@ -2507,14 +2531,20 @@ function _detalhes:AlteraModo (instancia, qual, from_mode_menu)
|
||||
elseif (instancia.modo == 4) then
|
||||
checked = 3
|
||||
end
|
||||
|
||||
|
||||
_detalhes.popup:Select (1, checked)
|
||||
|
||||
if (from_mode_menu) then
|
||||
instancia.baseframe.cabecalho.modo_selecao:GetScript ("OnEnter")(instancia.baseframe.cabecalho.modo_selecao)
|
||||
|
||||
--> running OnEnter does also trigger an instance enter event, so we need to manually leave the instance:
|
||||
_detalhes.OnLeaveMainWindow (instancia, instancia.baseframe.cabecalho.modo_selecao)
|
||||
|
||||
if (instancia.desaturated_menu) then
|
||||
instancia.baseframe.cabecalho.modo_selecao:GetNormalTexture():SetDesaturated (true)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
local function GetDpsHps (_thisActor, key)
|
||||
|
||||
+91
-50
@@ -1245,11 +1245,15 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
|
||||
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("raid"..raidIndex.."target", debuffIndex)
|
||||
if (name and unitCaster) then
|
||||
local playerName, realmName = _UnitName (unitCaster)
|
||||
if (realmName and realmName ~= "") then
|
||||
playerName = playerName .. "-" .. realmName
|
||||
local playerGUID = _UnitGUID (unitCaster)
|
||||
|
||||
if (playerGUID) then
|
||||
if (realmName and realmName ~= "") then
|
||||
playerName = playerName .. "-" .. realmName
|
||||
end
|
||||
|
||||
_detalhes.parser:add_debuff_uptime (nil, GetTime(), playerGUID, playerName, 0x00000417, his_target, _UnitName ("raid"..raidIndex.."target"), 0x842, spellid, name, in_or_out)
|
||||
end
|
||||
|
||||
_detalhes.parser:add_debuff_uptime (nil, GetTime(), _UnitGUID (unitCaster), playerName, 0x00000417, his_target, _UnitName ("raid"..raidIndex.."target"), 0x842, spellid, name, in_or_out)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1270,11 +1274,14 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
|
||||
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("party"..raidIndex.."target", debuffIndex)
|
||||
if (name and unitCaster) then
|
||||
local playerName, realmName = _UnitName (unitCaster)
|
||||
if (realmName and realmName ~= "") then
|
||||
playerName = playerName .. "-" .. realmName
|
||||
local playerGUID = _UnitGUID (unitCaster)
|
||||
if (playerGUID) then
|
||||
if (realmName and realmName ~= "") then
|
||||
playerName = playerName .. "-" .. realmName
|
||||
end
|
||||
|
||||
_detalhes.parser:add_debuff_uptime (nil, GetTime(), playerGUID, playerName, 0x00000417, his_target, _UnitName ("party"..raidIndex.."target"), 0x842, spellid, name, in_or_out)
|
||||
end
|
||||
|
||||
_detalhes.parser:add_debuff_uptime (nil, GetTime(), _UnitGUID (unitCaster), playerName, 0x00000417, his_target, _UnitName ("party"..raidIndex.."target"), 0x842, spellid, name, in_or_out)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1287,10 +1294,13 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
|
||||
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex)
|
||||
if (name and unitCaster) then
|
||||
local playerName, realmName = _UnitName (unitCaster)
|
||||
if (realmName and realmName ~= "") then
|
||||
playerName = playerName .. "-" .. realmName
|
||||
local playerGUID = _UnitGUID (unitCaster)
|
||||
if (playerGUID) then
|
||||
if (realmName and realmName ~= "") then
|
||||
playerName = playerName .. "-" .. realmName
|
||||
end
|
||||
_detalhes.parser:add_debuff_uptime (nil, GetTime(), playerGUID, playerName, 0x00000417, his_target, _UnitName ("playertarget"), 0x842, spellid, name, in_or_out)
|
||||
end
|
||||
_detalhes.parser:add_debuff_uptime (nil, GetTime(), _UnitGUID (unitCaster), playerName, 0x00000417, his_target, _UnitName ("playertarget"), 0x842, spellid, name, in_or_out)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1303,10 +1313,13 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
|
||||
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex)
|
||||
if (name and unitCaster) then
|
||||
local playerName, realmName = _UnitName (unitCaster)
|
||||
if (realmName and realmName ~= "") then
|
||||
playerName = playerName .. "-" .. realmName
|
||||
local playerGUID = _UnitGUID (unitCaster)
|
||||
if (playerGUID) then
|
||||
if (realmName and realmName ~= "") then
|
||||
playerName = playerName .. "-" .. realmName
|
||||
end
|
||||
_detalhes.parser:add_debuff_uptime (nil, GetTime(), playerGUID, playerName, 0x00000417, his_target, _UnitName ("playertarget"), 0x842, spellid, name, in_or_out)
|
||||
end
|
||||
_detalhes.parser:add_debuff_uptime (nil, GetTime(), _UnitGUID (unitCaster), playerName, 0x00000417, his_target, _UnitName ("playertarget"), 0x842, spellid, name, in_or_out)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1328,15 +1341,18 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
|
||||
|
||||
if (name and unitCaster == "raid"..raidIndex) then
|
||||
local playerName, realmName = _UnitName ("raid"..raidIndex)
|
||||
if (realmName and realmName ~= "") then
|
||||
playerName = playerName .. "-" .. realmName
|
||||
end
|
||||
|
||||
_detalhes.parser:add_buff_uptime (nil, GetTime(), _UnitGUID ("raid"..raidIndex), playerName, 0x00000514, _UnitGUID ("raid"..raidIndex), playerName, 0x00000514, spellid, name, in_or_out)
|
||||
|
||||
if (in_or_out == "BUFF_UPTIME_IN") then
|
||||
if (_detalhes.PotionList [spellid]) then
|
||||
pot_usage [playerName] = spellid
|
||||
local playerGUID = _UnitGUID ("raid"..raidIndex)
|
||||
if (playerGUID) then
|
||||
if (realmName and realmName ~= "") then
|
||||
playerName = playerName .. "-" .. realmName
|
||||
end
|
||||
|
||||
_detalhes.parser:add_buff_uptime (nil, GetTime(), playerGUID, playerName, 0x00000514, playerGUID, playerName, 0x00000514, spellid, name, in_or_out)
|
||||
|
||||
if (in_or_out == "BUFF_UPTIME_IN") then
|
||||
if (_detalhes.PotionList [spellid]) then
|
||||
pot_usage [playerName] = spellid
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1352,15 +1368,18 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
|
||||
|
||||
if (name and unitCaster == "party"..partyIndex) then
|
||||
local playerName, realmName = _UnitName ("party"..partyIndex)
|
||||
if (realmName and realmName ~= "") then
|
||||
playerName = playerName .. "-" .. realmName
|
||||
end
|
||||
|
||||
_detalhes.parser:add_buff_uptime (nil, GetTime(), _UnitGUID ("party"..partyIndex), playerName, 0x00000514, _UnitGUID ("party"..partyIndex), playerName, 0x00000514, spellid, name, in_or_out)
|
||||
|
||||
if (in_or_out == "BUFF_UPTIME_IN") then
|
||||
if (_detalhes.PotionList [spellid]) then
|
||||
pot_usage [playerName] = spellid
|
||||
local playerGUID = _UnitGUID ("party" .. partyIndex)
|
||||
if (playerGUID) then
|
||||
if (realmName and realmName ~= "") then
|
||||
playerName = playerName .. "-" .. realmName
|
||||
end
|
||||
|
||||
_detalhes.parser:add_buff_uptime (nil, GetTime(), playerGUID, playerName, 0x00000514, playerGUID, playerName, 0x00000514, spellid, name, in_or_out)
|
||||
|
||||
if (in_or_out == "BUFF_UPTIME_IN") then
|
||||
if (_detalhes.PotionList [spellid]) then
|
||||
pot_usage [playerName] = spellid
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1372,15 +1391,17 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
|
||||
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
|
||||
if (name and unitCaster == "player") then
|
||||
local playerName = _UnitName ("player")
|
||||
local playerGUID = _UnitGUID ("player")
|
||||
|
||||
if (in_or_out == "BUFF_UPTIME_IN") then
|
||||
if (_detalhes.PotionList [spellid]) then
|
||||
pot_usage [playerName] = spellid
|
||||
if (playerGUID) then
|
||||
if (in_or_out == "BUFF_UPTIME_IN") then
|
||||
if (_detalhes.PotionList [spellid]) then
|
||||
pot_usage [playerName] = spellid
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes.parser:add_buff_uptime (nil, GetTime(), playerGUID, playerName, 0x00000514, playerGUID, playerName, 0x00000514, spellid, name, in_or_out)
|
||||
end
|
||||
|
||||
_detalhes.parser:add_buff_uptime (nil, GetTime(), _UnitGUID ("player"), playerName, 0x00000514, _UnitGUID ("player"), playerName, 0x00000514, spellid, name, in_or_out)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1402,12 +1423,15 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
|
||||
if (name and unitCaster == "party"..groupIndex) then
|
||||
|
||||
local playerName, realmName = _UnitName ("party"..groupIndex)
|
||||
if (realmName and realmName ~= "") then
|
||||
playerName = playerName .. "-" .. realmName
|
||||
local playerGUID = _UnitGUID ("party"..groupIndex)
|
||||
|
||||
if (playerGUID) then
|
||||
if (realmName and realmName ~= "") then
|
||||
playerName = playerName .. "-" .. realmName
|
||||
end
|
||||
|
||||
_detalhes.parser:add_buff_uptime (nil, GetTime(), playerGUID, playerName, 0x00000417, playerGUID, playerName, 0x00000417, spellid, name, in_or_out)
|
||||
end
|
||||
|
||||
_detalhes.parser:add_buff_uptime (nil, GetTime(), _UnitGUID ("party"..groupIndex), playerName, 0x00000417, _UnitGUID ("party"..groupIndex), playerName, 0x00000417, spellid, name, in_or_out)
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1416,7 +1440,10 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
|
||||
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
|
||||
if (name and unitCaster == "player") then
|
||||
local playerName = _UnitName ("player")
|
||||
_detalhes.parser:add_buff_uptime (nil, GetTime(), _UnitGUID ("player"), playerName, 0x00000417, _UnitGUID ("player"), playerName, 0x00000417, spellid, name, in_or_out)
|
||||
local playerGUID = _UnitGUID ("player")
|
||||
if (playerGUID) then
|
||||
_detalhes.parser:add_buff_uptime (nil, GetTime(), playerGUID, playerName, 0x00000417, playerGUID, playerName, 0x00000417, spellid, name, in_or_out)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1428,14 +1455,17 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
|
||||
local name, _, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
|
||||
if (name and unitCaster == "player") then
|
||||
local playerName = _UnitName ("player")
|
||||
local playerGUID = _UnitGUID ("player")
|
||||
|
||||
if (in_or_out == "BUFF_UPTIME_IN") then
|
||||
if (_detalhes.PotionList [spellid]) then
|
||||
pot_usage [playerName] = spellid
|
||||
if (playerGUID) then
|
||||
if (in_or_out == "BUFF_UPTIME_IN") then
|
||||
if (_detalhes.PotionList [spellid]) then
|
||||
pot_usage [playerName] = spellid
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes.parser:add_buff_uptime (nil, GetTime(), playerGUID, playerName, 0x00000417, playerGUID, playerName, 0x00000417, spellid, name, in_or_out)
|
||||
end
|
||||
|
||||
_detalhes.parser:add_buff_uptime (nil, GetTime(), _UnitGUID ("player"), playerName, 0x00000417, _UnitGUID ("player"), playerName, 0x00000417, spellid, name, in_or_out)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2171,8 +2201,14 @@ function atributo_misc:r_onlyrefresh_shadow (actor)
|
||||
|
||||
if (not shadow) then
|
||||
shadow = overall_misc:PegarCombatente (actor.serial, actor.nome, actor.flag_original, true)
|
||||
|
||||
shadow.classe = actor.classe
|
||||
shadow.grupo = actor.grupo
|
||||
shadow.isTank = actor.isTank
|
||||
shadow.boss = actor.boss
|
||||
shadow.boss_fight_component = actor.boss_fight_component
|
||||
shadow.fight_component = actor.fight_component
|
||||
|
||||
end
|
||||
|
||||
_detalhes.refresh:r_atributo_misc (actor, shadow)
|
||||
@@ -2274,8 +2310,14 @@ function atributo_misc:r_connect_shadow (actor, no_refresh)
|
||||
|
||||
if (not shadow) then
|
||||
shadow = overall_misc:PegarCombatente (actor.serial, actor.nome, actor.flag_original, true)
|
||||
|
||||
shadow.classe = actor.classe
|
||||
shadow.grupo = actor.grupo
|
||||
shadow.isTank = actor.isTank
|
||||
shadow.boss = actor.boss
|
||||
shadow.boss_fight_component = actor.boss_fight_component
|
||||
shadow.fight_component = actor.fight_component
|
||||
|
||||
end
|
||||
|
||||
--> aplica a meta e indexes
|
||||
@@ -2469,7 +2511,6 @@ end
|
||||
function _detalhes.refresh:r_atributo_misc (este_jogador, shadow)
|
||||
_setmetatable (este_jogador, _detalhes.atributo_misc)
|
||||
este_jogador.__index = _detalhes.atributo_misc
|
||||
este_jogador.shadow = shadow
|
||||
|
||||
--> refresh interrupts
|
||||
if (este_jogador.interrupt_targets) then
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
|
||||
local _UnitClass = UnitClass --api local
|
||||
local _IsInInstance = IsInInstance --api local
|
||||
local _UnitGUID = UnitGUID --api local
|
||||
local strsplit = strsplit --api local
|
||||
|
||||
local _setmetatable = setmetatable --lua local
|
||||
local _getmetatable = getmetatable --lua local
|
||||
@@ -39,9 +41,12 @@
|
||||
local container_misc_target = _detalhes.container_type.CONTAINER_MISCTARGET_CLASS
|
||||
local container_enemydebufftarget_target = _detalhes.container_type.CONTAINER_ENEMYDEBUFFTARGET_CLASS
|
||||
|
||||
local container_pets = {}
|
||||
|
||||
--> flags
|
||||
local REACTION_HOSTILE = 0x00000040
|
||||
local IS_GROUP_OBJECT = 0x00000007
|
||||
local REACTION_FRIENDLY = 0x00000010
|
||||
local OBJECT_TYPE_MASK = 0x0000FC00
|
||||
local OBJECT_TYPE_OBJECT = 0x00004000
|
||||
local OBJECT_TYPE_PETGUARDIAN = 0x00003000
|
||||
@@ -136,7 +141,7 @@
|
||||
end
|
||||
|
||||
--> read the actor flag
|
||||
local read_actor_flag = function (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome, container_type)
|
||||
local read_actor_flag = function (novo_objeto, dono_do_pet, serial, flag, nome, container_type)
|
||||
|
||||
if (flag) then
|
||||
|
||||
@@ -154,16 +159,9 @@
|
||||
|
||||
if ( (_bit_band (flag, IS_GROUP_OBJECT) ~= 0 and novo_objeto.classe ~= "UNGROUPPLAYER")) then --> faz parte do grupo
|
||||
novo_objeto.grupo = true
|
||||
|
||||
if (shadow_objeto) then
|
||||
shadow_objeto.grupo = true
|
||||
end
|
||||
|
||||
if (_detalhes:IsATank (serial)) then
|
||||
novo_objeto.isTank = true
|
||||
if (shadow_objeto) then
|
||||
shadow_objeto.isTank = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -251,23 +249,77 @@
|
||||
novo_objeto.serial = serial
|
||||
end
|
||||
|
||||
function container_combatentes:PegarCombatente (serial, nome, flag, criar, isOwner)
|
||||
|
||||
--> verifica se é um pet, se for confere se tem o nome do dono, se não tiver, precisa por
|
||||
local dono_do_pet
|
||||
local pet_blacklist = {}
|
||||
local pet_tooltip_frame = _G.DetailsPetOwnerFinder
|
||||
local pet_text_object = _G ["DetailsPetOwnerFinderTextLeft2"]
|
||||
|
||||
local find_pet_owner = function (serial, nome, flag, self)
|
||||
|
||||
pet_tooltip_frame:SetOwner (WorldFrame, "ANCHOR_NONE")
|
||||
pet_tooltip_frame:SetHyperlink ("unit:" .. serial or "")
|
||||
|
||||
--if (flag and _bit_band (flag, OBJECT_TYPE_PETS) ~= 0) then --> é um pet
|
||||
if (_detalhes.tabela_pets.pets [serial]) then --> é um pet
|
||||
--> aqui ele precisaria achar as tag < > pra saber se o nome passado já não veio com o dono imbutido, se não tiver as tags, terá que ser posto aqui
|
||||
if (not nome:find ("<") or not nome:find (">")) then --> find é lento, não teria outra forma de fazer isso?
|
||||
local nome_dele, dono_nome, dono_serial, dono_flag = _detalhes.tabela_pets:PegaDono (serial, nome, flag)
|
||||
if (nome_dele and dono_nome) then
|
||||
nome = nome_dele
|
||||
dono_do_pet = self:PegarCombatente (dono_serial, dono_nome, dono_flag, true, nome)
|
||||
local text = pet_text_object:GetText()
|
||||
--print ("Unknow Owner:", nome, "ToolTip Text:", text)
|
||||
|
||||
if (text and text ~= "") then
|
||||
text = text:gsub ("'s", "") --> enUS
|
||||
|
||||
for _, ownerName in _ipairs ({strsplit (" ", text)}) do
|
||||
local cur_combat = _detalhes.tabela_vigente
|
||||
if (cur_combat and cur_combat.raid_roster [ownerName]) then
|
||||
local ownerGuid = _UnitGUID (ownerName)
|
||||
if (ownerGuid) then
|
||||
|
||||
_detalhes.tabela_pets:Adicionar (serial, nome, flag, ownerGuid, ownerName, 0x00000417)
|
||||
local nome_dele, dono_nome, dono_serial, dono_flag = _detalhes.tabela_pets:PegaDono (serial, nome, flag)
|
||||
|
||||
local dono_do_pet
|
||||
if (nome_dele and dono_nome) then
|
||||
nome = nome_dele
|
||||
dono_do_pet = self:PegarCombatente (dono_serial, dono_nome, dono_flag, true, nome)
|
||||
end
|
||||
|
||||
--print ("Owner Found:", ownerName, nome)
|
||||
return nome, dono_do_pet
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function container_combatentes:PegarCombatente (serial, nome, flag, criar)
|
||||
|
||||
--[[statistics]]-- _detalhes.statistics.container_calls = _detalhes.statistics.container_calls + 1
|
||||
|
||||
--> verifica se é um pet, se for confere se tem o nome do dono, se não tiver, precisa por
|
||||
local dono_do_pet
|
||||
serial = serial or "ns"
|
||||
|
||||
if (container_pets [serial]) then --> é um pet reconhecido
|
||||
--[[statistics]]-- _detalhes.statistics.container_pet_calls = _detalhes.statistics.container_pet_calls + 1
|
||||
|
||||
local nome_dele, dono_nome, dono_serial, dono_flag = _detalhes.tabela_pets:PegaDono (serial, nome, flag)
|
||||
if (nome_dele and dono_nome) then
|
||||
nome = nome_dele
|
||||
dono_do_pet = self:PegarCombatente (dono_serial, dono_nome, dono_flag, true)
|
||||
end
|
||||
|
||||
elseif (not pet_blacklist [serial]) then --> verifica se é um pet
|
||||
|
||||
pet_blacklist [serial] = true
|
||||
|
||||
--> try to find the owner
|
||||
if (flag and _bit_band (flag, OBJECT_TYPE_PETGUARDIAN) ~= 0) then
|
||||
|
||||
--[[statistics]]-- _detalhes.statistics.container_unknow_pet = _detalhes.statistics.container_unknow_pet + 1
|
||||
|
||||
local find_nome, find_owner = find_pet_owner (serial, nome, flag, self)
|
||||
if (find_nome and find_owner) then
|
||||
nome, dono_do_pet = find_nome, find_owner
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> pega o index no mapa
|
||||
local index = self._NameIndexTable [nome]
|
||||
--> retorna o actor
|
||||
@@ -277,24 +329,7 @@
|
||||
--> não achou, criar
|
||||
elseif (criar) then
|
||||
|
||||
--> espelho do container no overall
|
||||
local shadow = self.shadow
|
||||
local shadow_objeto
|
||||
|
||||
--> se tiver o espelho (não for a tabela overall já)
|
||||
if (shadow) then
|
||||
--> apenas verifica se ele existe ou não
|
||||
shadow_objeto = shadow:PegarCombatente (_, nome)
|
||||
--> se não existir, cria-lo
|
||||
if (not shadow_objeto) then
|
||||
--> tira o nome do pet
|
||||
local novo_nome = nome:gsub ((" <.*"), "")
|
||||
--> cria o objeto
|
||||
shadow_objeto = shadow:PegarCombatente (serial, novo_nome, flag, true)
|
||||
end
|
||||
end
|
||||
|
||||
local novo_objeto = self.funcao_de_criacao (_, serial, nome, shadow_objeto) --> shadow_objeto passa para o classe_damage gravar no .targets e .spells, mas não grava nele mesmo
|
||||
local novo_objeto = self.funcao_de_criacao (_, serial, nome)
|
||||
novo_objeto.nome = nome
|
||||
|
||||
-- tipo do container
|
||||
@@ -303,14 +338,13 @@
|
||||
if (self.tipo == container_damage) then --> CONTAINER DAMAGE
|
||||
|
||||
get_actor_class (novo_objeto, nome, flag)
|
||||
read_actor_flag (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome, "damage")
|
||||
read_actor_flag (novo_objeto, dono_do_pet, serial, flag, nome, "damage")
|
||||
|
||||
if (dono_do_pet) then
|
||||
dono_do_pet.pets [#dono_do_pet.pets+1] = nome
|
||||
end
|
||||
|
||||
if (shadow_objeto) then
|
||||
novo_objeto.shadow = shadow_objeto
|
||||
if (self.shadow) then
|
||||
if (novo_objeto.grupo and _detalhes.in_combat) then
|
||||
_detalhes.cache_damage_group [#_detalhes.cache_damage_group+1] = novo_objeto
|
||||
end
|
||||
@@ -322,7 +356,7 @@
|
||||
end
|
||||
|
||||
--> try to guess his class
|
||||
if (shadow) then --> não executar 2x
|
||||
if (self.shadow) then --> não executar 2x
|
||||
_detalhes:ScheduleTimer ("GuessClass", 1, {novo_objeto, self, 1})
|
||||
end
|
||||
end
|
||||
@@ -334,14 +368,13 @@
|
||||
elseif (self.tipo == container_heal) then --> CONTAINER HEALING
|
||||
|
||||
get_actor_class (novo_objeto, nome, flag)
|
||||
read_actor_flag (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome, "heal")
|
||||
read_actor_flag (novo_objeto, dono_do_pet, serial, flag, nome, "heal")
|
||||
|
||||
if (dono_do_pet) then
|
||||
dono_do_pet.pets [#dono_do_pet.pets+1] = nome
|
||||
end
|
||||
|
||||
if (shadow_objeto) then
|
||||
novo_objeto.shadow = shadow_objeto
|
||||
if (self.shadow) then
|
||||
if (novo_objeto.grupo and _detalhes.in_combat) then
|
||||
_detalhes.cache_healing_group [#_detalhes.cache_healing_group+1] = novo_objeto
|
||||
end
|
||||
@@ -353,7 +386,7 @@
|
||||
end
|
||||
|
||||
--> try to guess his class
|
||||
if (shadow) then --> não executar 2x
|
||||
if (self.shadow) then --> não executar 2x
|
||||
_detalhes:ScheduleTimer ("GuessClass", 1, {novo_objeto, self, 1})
|
||||
end
|
||||
end
|
||||
@@ -362,23 +395,19 @@
|
||||
elseif (self.tipo == container_energy) then --> CONTAINER ENERGY
|
||||
|
||||
get_actor_class (novo_objeto, nome, flag)
|
||||
read_actor_flag (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome, "energy")
|
||||
read_actor_flag (novo_objeto, dono_do_pet, serial, flag, nome, "energy")
|
||||
|
||||
if (dono_do_pet) then
|
||||
dono_do_pet.pets [#dono_do_pet.pets+1] = nome
|
||||
end
|
||||
|
||||
if (shadow_objeto) then
|
||||
novo_objeto.shadow = shadow_objeto
|
||||
end
|
||||
|
||||
if (novo_objeto.classe == "UNGROUPPLAYER") then --> is a player
|
||||
if (_bit_band (flag, REACTION_HOSTILE ) ~= 0) then --> is hostile
|
||||
novo_objeto.enemy = true
|
||||
end
|
||||
|
||||
--> try to guess his class
|
||||
if (shadow) then --> não executar 2x
|
||||
if (self.shadow) then --> não executar 2x
|
||||
_detalhes:ScheduleTimer ("GuessClass", 1, {novo_objeto, self, 1})
|
||||
end
|
||||
end
|
||||
@@ -386,25 +415,21 @@
|
||||
elseif (self.tipo == container_misc) then --> CONTAINER MISC
|
||||
|
||||
get_actor_class (novo_objeto, nome, flag)
|
||||
read_actor_flag (novo_objeto, shadow_objeto, dono_do_pet, serial, flag, nome, "misc")
|
||||
read_actor_flag (novo_objeto, dono_do_pet, serial, flag, nome, "misc")
|
||||
|
||||
--local teste_classe =
|
||||
|
||||
if (dono_do_pet) then
|
||||
dono_do_pet.pets [#dono_do_pet.pets+1] = nome
|
||||
end
|
||||
|
||||
if (shadow_objeto) then
|
||||
novo_objeto.shadow = shadow_objeto
|
||||
end
|
||||
|
||||
|
||||
if (novo_objeto.classe == "UNGROUPPLAYER") then --> is a player
|
||||
if (_bit_band (flag, REACTION_HOSTILE ) ~= 0) then --> is hostile
|
||||
novo_objeto.enemy = true
|
||||
end
|
||||
|
||||
--> try to guess his class
|
||||
if (shadow) then --> não executar 2x
|
||||
if (self.shadow) then --> não executar 2x
|
||||
_detalhes:ScheduleTimer ("GuessClass", 1, {novo_objeto, self, 1})
|
||||
end
|
||||
end
|
||||
@@ -417,34 +442,20 @@
|
||||
novo_objeto.e_rage = 0
|
||||
novo_objeto.e_energy = 0
|
||||
novo_objeto.runepower = 0
|
||||
|
||||
if (shadow_objeto) then
|
||||
novo_objeto.shadow = shadow_objeto
|
||||
end
|
||||
|
||||
|
||||
elseif (self.tipo == container_enemydebufftarget_target) then
|
||||
|
||||
novo_objeto.uptime = 0
|
||||
novo_objeto.actived = false
|
||||
novo_objeto.activedamt = 0
|
||||
|
||||
if (shadow_objeto) then
|
||||
novo_objeto.shadow = shadow_objeto
|
||||
end
|
||||
|
||||
|
||||
elseif (self.tipo == container_misc_target) then --> CONTAINER ALVOS DO MISC
|
||||
|
||||
if (shadow_objeto) then
|
||||
novo_objeto.shadow = shadow_objeto
|
||||
end
|
||||
|
||||
elseif (self.tipo == container_friendlyfire) then --> CONTAINER FRIENDLY FIRE
|
||||
|
||||
get_actor_class (novo_objeto, nome)
|
||||
|
||||
if (shadow_objeto) then
|
||||
novo_objeto.shadow = shadow_objeto
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -462,6 +473,14 @@
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> core
|
||||
|
||||
function _detalhes:UpdateContainerCombatentes()
|
||||
container_pets = _detalhes.tabela_pets.pets
|
||||
_detalhes:UpdatePetsOnParser()
|
||||
end
|
||||
function _detalhes:ClearCCPetsBlackList()
|
||||
table.wipe (pet_blacklist)
|
||||
end
|
||||
|
||||
function container_combatentes:FuncaoDeCriacao (tipo)
|
||||
if (tipo == container_damage_target) then
|
||||
return alvo_da_habilidade.NovaTabela
|
||||
|
||||
@@ -90,8 +90,6 @@ local _
|
||||
container.__index = _detalhes.container_habilidades
|
||||
local func_criacao = container_habilidades:FuncaoDeCriacao (container.tipo)
|
||||
container.funcao_de_criacao = func_criacao
|
||||
--> seta a shadow
|
||||
container.shadow = shadow
|
||||
end
|
||||
|
||||
function _detalhes.clear:c_container_habilidades (container)
|
||||
|
||||
@@ -284,6 +284,7 @@ function historico:resetar()
|
||||
_detalhes.tabela_historico = historico:NovoHistorico() --joga fora a tabela antiga e cria uma nova
|
||||
--novo container para armazenar pets
|
||||
_detalhes.tabela_pets = _detalhes.container_pets:NovoContainer()
|
||||
_detalhes:UpdateContainerCombatentes()
|
||||
_detalhes.container_pets:BuscarPets()
|
||||
-- nova tabela do overall e current
|
||||
_detalhes.tabela_overall = combate:NovaTabela() --joga fora a tabela antiga e cria uma nova
|
||||
|
||||
+10
-14
@@ -121,14 +121,10 @@ function container_pets:BuscarPets()
|
||||
if (pet_serial) then
|
||||
if (not _detalhes.tabela_pets.pets [pet_serial]) then
|
||||
local nome, realm = _UnitName ("raid"..i)
|
||||
if (nome == "Unknown Entity") then
|
||||
_detalhes:SchedulePetUpdate (1)
|
||||
else
|
||||
if (realm and realm ~= "") then
|
||||
nome = nome.."-"..realm
|
||||
end
|
||||
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("raidpet"..i), 0x1114, _UnitGUID ("raid"..i), nome, 0x514)
|
||||
if (realm and realm ~= "") then
|
||||
nome = nome.."-"..realm
|
||||
end
|
||||
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("raidpet"..i), 0x1114, _UnitGUID ("raid"..i), nome, 0x514)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -139,14 +135,12 @@ function container_pets:BuscarPets()
|
||||
if (pet_serial) then
|
||||
if (not _detalhes.tabela_pets.pets [pet_serial]) then
|
||||
local nome, realm = _UnitName ("party"..i)
|
||||
if (nome == "Unknown Entity") then
|
||||
_detalhes:SchedulePetUpdate (1)
|
||||
else
|
||||
if (realm and realm ~= "") then
|
||||
nome = nome.."-"..realm
|
||||
end
|
||||
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("partypet"..i), 0x1114, _UnitGUID ("party"..i), nome, 0x514)
|
||||
|
||||
if (realm and realm ~= "") then
|
||||
nome = nome.."-"..realm
|
||||
end
|
||||
_detalhes.tabela_pets:Adicionar (pet_serial, _UnitName ("partypet"..i), 0x1114, _UnitGUID ("party"..i), nome, 0x514)
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -201,6 +195,8 @@ function _detalhes:LimparPets()
|
||||
--a tabela antiga será descartada pelo garbage collector.
|
||||
--_table_wipe (_detalhes.tabela_pets.pets)
|
||||
_detalhes.tabela_pets.pets = _new_PetTable
|
||||
_detalhes:UpdateContainerCombatentes()
|
||||
|
||||
end
|
||||
|
||||
local have_schedule = false
|
||||
|
||||
@@ -294,7 +294,7 @@
|
||||
return actor.targets [_detalhes.playername] or 0
|
||||
|
||||
else
|
||||
return actor.targets [targetactor] or 0
|
||||
return actor.targets [target] or 0
|
||||
|
||||
end
|
||||
else
|
||||
|
||||
+11
-22
@@ -217,9 +217,6 @@
|
||||
BossIndex = BossIds [serial]
|
||||
if (BossIndex) then
|
||||
Actor.boss = true
|
||||
if (Actor.shadow) then
|
||||
Actor.shadow.boss = true
|
||||
end
|
||||
return boss_found (BossIndex, _detalhes:GetBossName (ZoneMapID, BossIndex), ZoneName, ZoneMapID, DifficultyID)
|
||||
end
|
||||
end
|
||||
@@ -230,9 +227,10 @@
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> internal functions
|
||||
-- _detalhes.statistics = {container_calls = 0, container_pet_calls = 0, container_unknow_pet = 0, damage_calls = 0, heal_calls = 0, absorbs_calls = 0, energy_calls = 0, pets_summons = 0}
|
||||
|
||||
-- ~start
|
||||
function _detalhes:EntrarEmCombate (...)
|
||||
@@ -283,6 +281,8 @@
|
||||
--> é o timer que ve se o jogador ta em combate ou não -- check if any party or raid members are in combat
|
||||
_detalhes.tabela_vigente.verifica_combate = _detalhes:ScheduleRepeatingTimer ("EstaEmCombate", 1)
|
||||
|
||||
_detalhes:ClearCCPetsBlackList()
|
||||
|
||||
_table_wipe (_detalhes.encounter_end_table)
|
||||
|
||||
_table_wipe (_detalhes.pets_ignored)
|
||||
@@ -351,6 +351,12 @@
|
||||
_detalhes:Msg ("(debug) ended a combat.")
|
||||
end
|
||||
|
||||
--if (_detalhes.statistics) then
|
||||
-- for k, v in pairs (_detalhes.statistics) do
|
||||
-- print (k, v)
|
||||
-- end
|
||||
--end
|
||||
|
||||
_detalhes.leaving_combat = true
|
||||
_detalhes.last_combat_time = _tempo
|
||||
|
||||
@@ -857,9 +863,6 @@
|
||||
for class_type, container in _ipairs (_detalhes.tabela_vigente) do
|
||||
for _, actor in _ipairs (container._ActorTable) do
|
||||
actor.boss_fight_component = true
|
||||
if (actor.shadow) then
|
||||
actor.shadow.boss_fight_component = true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -868,16 +871,10 @@
|
||||
local on_energy = energy_container._ActorTable [energy_container._NameIndexTable [name]]
|
||||
if (on_energy) then
|
||||
on_energy.fight_component = true
|
||||
if (on_energy.shadow) then
|
||||
on_energy.shadow.fight_component = true
|
||||
end
|
||||
end
|
||||
local on_misc = misc_container._ActorTable [misc_container._NameIndexTable [name]]
|
||||
if (on_misc) then
|
||||
on_misc.fight_component = true
|
||||
if (on_misc.shadow) then
|
||||
on_misc.shadow.fight_component = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -897,9 +894,6 @@
|
||||
local target_object = container._ActorTable [container._NameIndexTable [target_name]]
|
||||
if (target_object) then
|
||||
target_object.fight_component = true
|
||||
if (target_object.shadow) then
|
||||
target_object.shadow.fight_component = true
|
||||
end
|
||||
fight_component (energy_container, misc_container, target_name)
|
||||
end
|
||||
end
|
||||
@@ -908,9 +902,6 @@
|
||||
local target_object = container._ActorTable [container._NameIndexTable [damager_actor]]
|
||||
if (target_object) then
|
||||
target_object.fight_component = true
|
||||
if (target_object.shadow) then
|
||||
target_object.shadow.fight_component = true
|
||||
end
|
||||
fight_component (energy_container, misc_container, damager_actor)
|
||||
end
|
||||
end
|
||||
@@ -919,9 +910,6 @@
|
||||
local target_object = container._ActorTable [container._NameIndexTable [healer_actor]]
|
||||
if (target_object) then
|
||||
target_object.fight_component = true
|
||||
if (target_object.shadow) then
|
||||
target_object.shadow.fight_component = true
|
||||
end
|
||||
fight_component (energy_container, misc_container, healer_actor)
|
||||
end
|
||||
end
|
||||
@@ -1227,3 +1215,4 @@
|
||||
function _detalhes:UpdateControl()
|
||||
_tempo = _detalhes._tempo
|
||||
end
|
||||
|
||||
|
||||
@@ -620,6 +620,9 @@
|
||||
|
||||
--> elimina pets antigos
|
||||
_detalhes:LimparPets()
|
||||
if (not _detalhes.in_combat) then
|
||||
_detalhes:ClearCCPetsBlackList()
|
||||
end
|
||||
|
||||
--> wipa container de escudos
|
||||
_table_wipe (_detalhes.escudos)
|
||||
|
||||
+51
-29
@@ -85,6 +85,8 @@
|
||||
local tanks_members_cache = setmetatable ({}, _detalhes.weaktable)
|
||||
--> damage and heal last events
|
||||
local last_events_cache = {} --> placeholder
|
||||
--> pets
|
||||
local container_pets = {} --> place holder
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> constants
|
||||
@@ -211,6 +213,8 @@
|
||||
end
|
||||
end
|
||||
|
||||
--[[statistics]]-- _detalhes.statistics.damage_calls = _detalhes.statistics.damage_calls + 1
|
||||
|
||||
_current_damage_container.need_refresh = true
|
||||
|
||||
------------------------------------------------------------------------------------------------
|
||||
@@ -374,14 +378,16 @@
|
||||
if (meu_dono.end_time) then
|
||||
meu_dono.end_time = nil
|
||||
else
|
||||
meu_dono:IniciarTempo (_tempo, meu_dono.shadow)
|
||||
--meu_dono:IniciarTempo (_tempo)
|
||||
meu_dono.start_time = _tempo
|
||||
end
|
||||
end
|
||||
|
||||
if (este_jogador.end_time) then
|
||||
este_jogador.end_time = nil
|
||||
else
|
||||
este_jogador:IniciarTempo (_tempo, este_jogador.shadow)
|
||||
--este_jogador:IniciarTempo (_tempo)
|
||||
este_jogador.start_time = _tempo
|
||||
end
|
||||
|
||||
if (este_jogador.nome == _detalhes.playername and token ~= "SPELL_PERIODIC_DAMAGE") then --> iniciando o dps do "PLAYER"
|
||||
@@ -571,22 +577,28 @@
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
function parser:summon (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellName)
|
||||
|
||||
--[[statistics]]-- _detalhes.statistics.pets_summons = _detalhes.statistics.pets_summons + 1
|
||||
|
||||
if (not who_name) then
|
||||
who_name = "[*] " .. spellName
|
||||
end
|
||||
|
||||
--> pet summon another pet
|
||||
local sou_pet = _detalhes.tabela_pets.pets [who_serial]
|
||||
local sou_pet = container_pets [who_serial]
|
||||
if (sou_pet) then --> okey, ja é um pet
|
||||
who_name, who_serial, who_flags = sou_pet[1], sou_pet[2], sou_pet[3]
|
||||
end
|
||||
|
||||
local alvo_pet = _detalhes.tabela_pets.pets [alvo_serial]
|
||||
local alvo_pet = container_pets [alvo_serial]
|
||||
if (alvo_pet) then
|
||||
who_name, who_serial, who_flags = alvo_pet[1], alvo_pet[2], alvo_pet[3]
|
||||
end
|
||||
|
||||
return _detalhes.tabela_pets:Adicionar (alvo_serial, alvo_name, alvo_flags, who_serial, who_name, who_flags)
|
||||
_detalhes.tabela_pets:Adicionar (alvo_serial, alvo_name, alvo_flags, who_serial, who_name, who_flags)
|
||||
|
||||
--print ("SUMMON", alvo_name, _detalhes.tabela_pets.pets, _detalhes.tabela_pets.pets [alvo_serial], alvo_serial)
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -615,6 +627,8 @@
|
||||
|
||||
function parser:heal_absorb (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, owner_serial, owner_name, owner_flags, owner_flags2, shieldid, shieldname, shieldtype, amount)
|
||||
|
||||
--[[statistics]]-- _detalhes.statistics.absorbs_calls = _detalhes.statistics.absorbs_calls + 1
|
||||
|
||||
if (not shieldname) then
|
||||
owner_serial, owner_name, owner_flags, owner_flags2, shieldid, shieldname, shieldtype, amount = spellid, spellname, spellschool, owner_serial, owner_name, owner_flags, owner_flags2, shieldid
|
||||
end
|
||||
@@ -650,7 +664,7 @@
|
||||
|
||||
------------------------------------------------------------------------------------------------
|
||||
--> early checks and fixes
|
||||
|
||||
|
||||
--> only capture heal if is in combat
|
||||
if (not _in_combat) then
|
||||
return
|
||||
@@ -674,6 +688,8 @@
|
||||
return
|
||||
end
|
||||
|
||||
--[[statistics]]-- _detalhes.statistics.heal_calls = _detalhes.statistics.heal_calls + 1
|
||||
|
||||
local cura_efetiva = absorbed
|
||||
if (is_shield) then
|
||||
--> o shield ja passa o numero exato da cura e o overheal
|
||||
@@ -771,14 +787,16 @@
|
||||
if (meu_dono.end_time) then
|
||||
meu_dono.end_time = nil
|
||||
else
|
||||
meu_dono:IniciarTempo (_tempo, meu_dono.shadow)
|
||||
--meu_dono:IniciarTempo (_tempo)
|
||||
meu_dono.start_time = _tempo
|
||||
end
|
||||
end
|
||||
|
||||
if (este_jogador.end_time) then --> o combate terminou, reabrir o tempo
|
||||
este_jogador.end_time = nil
|
||||
else
|
||||
este_jogador:IniciarTempo (_tempo, este_jogador.shadow)
|
||||
--este_jogador:IniciarTempo (_tempo)
|
||||
este_jogador.start_time = _tempo
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1462,6 +1480,8 @@
|
||||
powertype = is_resource
|
||||
amount = 0
|
||||
end
|
||||
|
||||
--[[statistics]]-- _detalhes.statistics.energy_calls = _detalhes.statistics.energy_calls + 1
|
||||
|
||||
_current_energy_container.need_refresh = true
|
||||
|
||||
@@ -1923,7 +1943,6 @@
|
||||
|
||||
--> update last event
|
||||
este_jogador.last_event = _tempo
|
||||
--shadow.last_event = _tempo
|
||||
|
||||
--> combat ress total
|
||||
_current_total [4].ress = _current_total [4].ress + 1
|
||||
@@ -2783,7 +2802,7 @@
|
||||
_detalhes:LoadCombatTables()
|
||||
--> load the profiles
|
||||
_detalhes:LoadConfig()
|
||||
|
||||
|
||||
_detalhes:UpdateParserGears()
|
||||
_detalhes:Start()
|
||||
end
|
||||
@@ -2822,7 +2841,7 @@
|
||||
|
||||
_detalhes.listener:SetScript ("OnEvent", _detalhes.OnEvent)
|
||||
|
||||
--> logout function ~save
|
||||
--> logout function ~save ~logout
|
||||
|
||||
local saver = CreateFrame ("frame", nil, UIParent)
|
||||
saver:RegisterEvent ("PLAYER_LOGOUT")
|
||||
@@ -2836,41 +2855,55 @@
|
||||
tremove (_detalhes_global.exit_errors, 6)
|
||||
end
|
||||
|
||||
_detalhes_global.exit_log = {}
|
||||
|
||||
_detalhes.saver_error_func = saver_error
|
||||
|
||||
_detalhes.logoff_saving_data = true
|
||||
|
||||
--> close info window
|
||||
if (_detalhes.FechaJanelaInfo) then
|
||||
tinsert (_detalhes_global.exit_log, "1 - Closing Janela Info.")
|
||||
xpcall (_detalhes.FechaJanelaInfo, saver_error)
|
||||
end
|
||||
|
||||
--> do not save window pos
|
||||
for id, instance in _detalhes:ListInstances() do
|
||||
if (instance.baseframe) then
|
||||
instance.baseframe:SetUserPlaced (false)
|
||||
if (_detalhes.tabela_instancias) then
|
||||
tinsert (_detalhes_global.exit_log, "2 - Clearing user place from instances.")
|
||||
for id, instance in _detalhes:ListInstances() do
|
||||
if (instance.baseframe) then
|
||||
instance.baseframe:SetUserPlaced (false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> leave combat start save tables
|
||||
if (_detalhes.in_combat and _detalhes.tabela_vigente) then
|
||||
tinsert (_detalhes_global.exit_log, "3 - Leaving current combat.")
|
||||
xpcall (_detalhes.SairDoCombate, saver_error)
|
||||
_detalhes.can_panic_mode = true
|
||||
end
|
||||
|
||||
if (_detalhes.CheckSwitchOnLogon and _detalhes.tabela_instancias[1] and getmetatable (_detalhes.tabela_instancias[1])) then
|
||||
if (_detalhes.CheckSwitchOnLogon and _detalhes.tabela_instancias[1] and _detalhes.tabela_instancias and getmetatable (_detalhes.tabela_instancias[1])) then
|
||||
tinsert (_detalhes_global.exit_log, "4 - Reversing switches.")
|
||||
xpcall (_detalhes.CheckSwitchOnLogon, saver_error)
|
||||
end
|
||||
|
||||
if (_detalhes.wipe_full_config) then
|
||||
tinsert (_detalhes_global.exit_log, "5 - Is a full config wipe.")
|
||||
_detalhes_global = nil
|
||||
_detalhes_database = nil
|
||||
return
|
||||
end
|
||||
|
||||
--> save the config
|
||||
tinsert (_detalhes_global.exit_log, "6 - Saving Config.")
|
||||
xpcall (_detalhes.SaveConfig, saver_error)
|
||||
tinsert (_detalhes_global.exit_log, "7 - Saving Profiles.")
|
||||
xpcall (_detalhes.SaveProfile, saver_error)
|
||||
|
||||
--> save the nicktag cache
|
||||
tinsert (_detalhes_global.exit_log, "8 - Saving nicktag cache.")
|
||||
_detalhes_database.nick_tag_cache = table_deepcopy (_detalhes_database.nick_tag_cache)
|
||||
end)
|
||||
|
||||
@@ -2880,20 +2913,6 @@
|
||||
function _detalhes:OnParserEvent (evento, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, ...)
|
||||
local funcao = token_list [token]
|
||||
|
||||
--[[
|
||||
Prismatic Crystal still bugged on Combat Log
|
||||
|
||||
Mage's damage towards the Prismatic Crystal is still triggering a SPELL_DAMAGE Combat Log Event, I think this isn't indented.
|
||||
|
||||
So in practice, what happens is:
|
||||
|
||||
- Player cast Frost Bolt against his Crystal which is near 3 enemies.
|
||||
- Combat Log trigger [b]4 SPELL_DAMAGE[/b] events: 3 events splitting the damage against the 3 enemies and 1 event with the total damage against the crystal <- this last one should not happen, it's literally duplicating the mage's damage.
|
||||
|
||||
The only way to detect the damage towards the crystal is getting [b]every single[/b] combatlog event and splitting the target GUID getting the crystal's npcId.
|
||||
This workaround will consume a huge amount of Cpu (any addon which counts damage will need to use this fix).
|
||||
--]]
|
||||
|
||||
if (funcao) then
|
||||
return funcao (nil, token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, ... )
|
||||
else
|
||||
@@ -2905,6 +2924,9 @@ This workaround will consume a huge amount of Cpu (any addon which counts damage
|
||||
function _detalhes:UpdateParser()
|
||||
_tempo = _detalhes._tempo
|
||||
end
|
||||
function _detalhes:UpdatePetsOnParser()
|
||||
container_pets = _detalhes.tabela_pets.pets
|
||||
end
|
||||
|
||||
function _detalhes:PrintParserCacheIndexes()
|
||||
|
||||
|
||||
@@ -42,6 +42,8 @@
|
||||
button.tooltip = tooltip
|
||||
button:SetScript ("OnClick", func)
|
||||
|
||||
--print ("ED button 2:", ENCOUNTERDETAILS_BUTTON:GetAlpha(), ENCOUNTERDETAILS_BUTTON:IsShown())
|
||||
|
||||
--> textures
|
||||
button:SetNormalTexture (icon)
|
||||
button:SetPushedTexture (icon)
|
||||
@@ -86,16 +88,17 @@
|
||||
LastIcon = instance.baseframe.cabecalho.report
|
||||
end
|
||||
|
||||
local x = 0
|
||||
if (instance.consolidate) then
|
||||
LastIcon = instance.consolidateButtonTexture
|
||||
x = x - 3
|
||||
end
|
||||
|
||||
_detalhes.ToolBar.Shown [#_detalhes.ToolBar.Shown+1] = Button
|
||||
Button:SetPoint ("left", LastIcon.widget or LastIcon, "right", Button.x + x, Button.y)
|
||||
Button:SetPoint ("left", LastIcon.widget or LastIcon, "right", Button.x, Button.y)
|
||||
|
||||
Button:Show()
|
||||
|
||||
if (instance.auto_hide_menu.left and not instance.is_interacting) then
|
||||
instance:ToolbarMenuButtons()
|
||||
Button:SetAlpha (0)
|
||||
return
|
||||
end
|
||||
|
||||
if (Effect) then
|
||||
if (type (Effect) == "string") then
|
||||
if (Effect == "blink") then
|
||||
@@ -206,8 +209,8 @@
|
||||
|
||||
instance:ChangeSkin()
|
||||
else
|
||||
--instance:SetMenuAlpha()
|
||||
instance:ToolbarMenuButtons()
|
||||
instance:SetAutoHideMenu (nil, nil, true)
|
||||
end
|
||||
|
||||
return true
|
||||
|
||||
+1
-18
@@ -158,25 +158,8 @@
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:IniciarTempo (tempo, shadow)
|
||||
|
||||
-- inicia o tempo no objeto atual
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
function _detalhes:IniciarTempo (tempo)
|
||||
self.start_time = tempo
|
||||
|
||||
-- inicia o tempo no shadow do objeto
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
if (shadow.end_time) then
|
||||
local subs = shadow.end_time - shadow.start_time
|
||||
shadow.start_time = tempo - subs
|
||||
shadow.end_time = nil
|
||||
else
|
||||
if (shadow.start_time == 0) then
|
||||
shadow.start_time = tempo
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:TerminarTempo()
|
||||
|
||||
@@ -764,6 +764,12 @@
|
||||
_detalhes:GetFramework():ShowTutorialAlertFrame ("How to Use Bookmarks", "switch fast between displays", func)
|
||||
end
|
||||
|
||||
--> translate window
|
||||
|
||||
function _detalhes:OpenTranslateWindow()
|
||||
|
||||
end
|
||||
|
||||
--> feedback window
|
||||
function _detalhes:OpenFeedbackWindow()
|
||||
|
||||
|
||||
@@ -725,7 +725,7 @@ local ButtonMetaFunctions = {}
|
||||
|
||||
if (button.MyObject.capsule_textalign) then
|
||||
if (button.MyObject.icon) then
|
||||
button.MyObject.icon:SetPoint ("left", button, "left", 5 + button.MyObject.icon.leftpadding, -1)
|
||||
button.MyObject.icon:SetPoint ("left", button, "left", 5 + (button.MyObject.icon.leftpadding or 0), -1)
|
||||
elseif (button.MyObject.capsule_textalign == "left") then
|
||||
button.text:SetPoint ("left", button, "left", 3, -1)
|
||||
elseif (button.MyObject.capsule_textalign == "center") then
|
||||
@@ -735,7 +735,7 @@ local ButtonMetaFunctions = {}
|
||||
end
|
||||
else
|
||||
if (button.MyObject.icon) then
|
||||
button.MyObject.icon:SetPoint ("left", button, "left", 7 + button.MyObject.icon.leftpadding, -2)
|
||||
button.MyObject.icon:SetPoint ("left", button, "left", 7 + (button.MyObject.icon.leftpadding or 0), -2)
|
||||
else
|
||||
button.text:SetPoint ("center", button,"center", 1, -1)
|
||||
end
|
||||
@@ -820,7 +820,7 @@ local ButtonMetaFunctions = {}
|
||||
|
||||
if (button.MyObject.capsule_textalign) then
|
||||
if (button.MyObject.icon) then
|
||||
button.MyObject.icon:SetPoint ("left", button, "left", 4 + button.MyObject.icon.leftpadding, 0)
|
||||
button.MyObject.icon:SetPoint ("left", button, "left", 4 + (button.MyObject.icon.leftpadding or 0), 0)
|
||||
elseif (button.MyObject.capsule_textalign == "left") then
|
||||
button.text:SetPoint ("left", button, "left", 2, 0)
|
||||
elseif (button.MyObject.capsule_textalign == "center") then
|
||||
@@ -830,7 +830,7 @@ local ButtonMetaFunctions = {}
|
||||
end
|
||||
else
|
||||
if (button.MyObject.icon) then
|
||||
button.MyObject.icon:SetPoint ("left", button, "left", 4 + button.MyObject.icon.leftpadding, 0)
|
||||
button.MyObject.icon:SetPoint ("left", button, "left", 4 + (button.MyObject.icon.leftpadding or 0), 0)
|
||||
else
|
||||
button.text:SetPoint ("center", button,"center", 0, 0)
|
||||
end
|
||||
|
||||
@@ -179,6 +179,7 @@ function _detalhes:LoadCombatTables()
|
||||
_detalhes.tabela_overall = _detalhes.combate:NovaTabela()
|
||||
_detalhes.tabela_vigente = _detalhes.combate:NovaTabela (_, _detalhes.tabela_overall)
|
||||
_detalhes.tabela_pets = _detalhes.container_pets:NovoContainer()
|
||||
_detalhes:UpdateContainerCombatentes()
|
||||
else
|
||||
|
||||
--> build basic containers
|
||||
@@ -192,6 +193,7 @@ function _detalhes:LoadCombatTables()
|
||||
if (_detalhes_database.tabela_pets) then
|
||||
_detalhes.tabela_pets.pets = table_deepcopy (_detalhes_database.tabela_pets)
|
||||
end
|
||||
_detalhes:UpdateContainerCombatentes()
|
||||
|
||||
--> if the core revision was incremented, reset all combat data
|
||||
if (_detalhes_database.last_realversion and _detalhes_database.last_realversion < _detalhes.realversion) then
|
||||
@@ -200,6 +202,7 @@ function _detalhes:LoadCombatTables()
|
||||
_detalhes.tabela_overall = _detalhes.combate:NovaTabela()
|
||||
_detalhes.tabela_vigente = _detalhes.combate:NovaTabela (_, _detalhes.tabela_overall)
|
||||
_detalhes.tabela_pets = _detalhes.container_pets:NovoContainer()
|
||||
_detalhes:UpdateContainerCombatentes()
|
||||
end
|
||||
|
||||
--> re-build all indexes and metatables
|
||||
@@ -231,6 +234,7 @@ function _detalhes:LoadCombatTables()
|
||||
if (not _detalhes.tabela_pets or not _detalhes.tabela_pets.pets) then
|
||||
_detalhes.tabela_pets = _detalhes.container_pets:NovoContainer()
|
||||
end
|
||||
_detalhes:UpdateContainerCombatentes()
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -84,12 +84,10 @@ do
|
||||
local class = _detalhes.ClassSpellList [spellid]
|
||||
if (class) then
|
||||
Actor.classe = class
|
||||
Actor.shadow.classe = class
|
||||
Actor.guessing_class = nil
|
||||
|
||||
if (container) then
|
||||
container.need_refresh = true
|
||||
container.shadow.need_refresh = true
|
||||
end
|
||||
|
||||
if (Actor.minha_barra and type (Actor.minha_barra) == "table") then
|
||||
@@ -104,14 +102,11 @@ do
|
||||
local class = _detalhes:GetClass (Actor.nome)
|
||||
if (class) then
|
||||
Actor.classe = class
|
||||
Actor.shadow.classe = class
|
||||
Actor.need_refresh = true
|
||||
Actor.shadow.need_refresh = true
|
||||
Actor.guessing_class = nil
|
||||
|
||||
if (container) then
|
||||
container.need_refresh = true
|
||||
container.shadow.need_refresh = true
|
||||
end
|
||||
|
||||
if (Actor.minha_barra and type (Actor.minha_barra) == "table") then
|
||||
|
||||
@@ -75,10 +75,10 @@ function _detalhes:SaveConfig()
|
||||
_detalhes_database.tabela_pets = _detalhes.tabela_pets.pets
|
||||
end
|
||||
|
||||
_detalhes:TimeDataCleanUpTemporary()
|
||||
xpcall (_detalhes.TimeDataCleanUpTemporary, _detalhes.saver_error_func)
|
||||
|
||||
--> buffs
|
||||
_detalhes.Buffs:SaveBuffs()
|
||||
xpcall (_detalhes.Buffs.SaveBuffs, _detalhes.saver_error_func)
|
||||
|
||||
--> salva o container do personagem
|
||||
for key, value in pairs (_detalhes.default_player_data) do
|
||||
|
||||
+3
-1
@@ -408,7 +408,9 @@ local _
|
||||
|
||||
["show_statusbar"] = false,
|
||||
["backdrop_texture"] = "Details Ground",
|
||||
["color"] = {1, 1, 1, 0.919999},
|
||||
--["color"] = {1, 1, 1, 0.919999},
|
||||
--["color"] = {0.5960, 0.5686, 1, 0.919999}, purple
|
||||
["color"] = {0.70980, 0.75686, 1, 0.919999},
|
||||
["menu_anchor"] = {15, 1, ["side"] = 2},
|
||||
["bg_r"] = 1,
|
||||
|
||||
|
||||
+1
-2
@@ -69,8 +69,7 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
|
||||
elseif (command == Loc ["STRING_SLASH_WORLDBOSS"] or command == "worldboss") then
|
||||
|
||||
--local questIds = {Galleon = 32098, Sha = 32099, Oondasta = 32519, Celestials = 33117, Ordos = 33118, Nalak = 32518}
|
||||
local questIds = {{"The Celestials", 33117}, {"Ordos", 33118}, {"Nalak", 32518}, {"Oondasta", 32519}, {"Salyis's Warband (Galleon)", 32098}, {"Sha of Anger", 32099}}
|
||||
local questIds = {{"Tarlna the Ageless", 81535}, {"Drov the Ruiner ", 87437}, {"Rukhmar", 87493}}
|
||||
for _, _table in pairs (questIds) do
|
||||
print (format ("%s: \124cff%s\124r", _table [1], IsQuestFlaggedCompleted (_table [2]) and "ff0000"..Loc ["STRING_KILLED"] or "00ff00"..Loc ["STRING_ALIVE"]))
|
||||
end
|
||||
|
||||
+23
-10
@@ -8,7 +8,7 @@
|
||||
5 - row texts
|
||||
6 - window settings
|
||||
7 - left menu
|
||||
8 - ------------
|
||||
8 - row advanced
|
||||
9 - wallpaper
|
||||
10 - performance teaks
|
||||
11 - raid tools
|
||||
@@ -17,7 +17,7 @@
|
||||
14 - attribute text
|
||||
15 - custom spells
|
||||
16 - data for charts
|
||||
17 - hide and show
|
||||
17 - auto hide settings
|
||||
18 - misc settings
|
||||
19 - externals widgets
|
||||
20 - tooltip
|
||||
@@ -325,7 +325,7 @@ function _detalhes:OpenOptionsWindow (instance, no_reopen, section)
|
||||
|
||||
--> create bars
|
||||
|
||||
local fillbars = g:NewButton (window, _, "$parentCreateExampleBarsButton", nil, 110, 14, _detalhes.CreateTestBars, nil, nil, nil, Loc ["STRING_OPTIONS_TESTBARS"])
|
||||
local fillbars = g:NewButton (window, _, "$parentCreateExampleBarsButton", nil, 110, 14, _detalhes.CreateTestBars, nil, nil, nil, Loc ["STRING_OPTIONS_TESTBARS"], 1)
|
||||
fillbars:SetPoint ("bottomleft", window.widget, "bottomleft", 41, 12)
|
||||
fillbars.textalign = "left"
|
||||
fillbars:SetHook ("OnEnter", function()
|
||||
@@ -340,7 +340,7 @@ function _detalhes:OpenOptionsWindow (instance, no_reopen, section)
|
||||
|
||||
--> change log
|
||||
|
||||
local changelog = g:NewButton (window, _, "$parentOpenChangeLogButton", nil, 110, 14, _detalhes.OpenNewsWindow, nil, nil, nil, Loc ["STRING_OPTIONS_CHANGELOG"])
|
||||
local changelog = g:NewButton (window, _, "$parentOpenChangeLogButton", nil, 110, 14, _detalhes.OpenNewsWindow, nil, nil, nil, Loc ["STRING_OPTIONS_CHANGELOG"], 1)
|
||||
changelog:SetPoint ("left", fillbars, "right", 10, 0)
|
||||
changelog.textalign = "left"
|
||||
changelog:SetHook ("OnEnter", function()
|
||||
@@ -355,8 +355,7 @@ function _detalhes:OpenOptionsWindow (instance, no_reopen, section)
|
||||
|
||||
--> send feedback
|
||||
|
||||
|
||||
local feedback_button = g:NewButton (window, _, "$parentOpenFeedbackButton", nil, 110, 14, _detalhes.OpenFeedbackWindow, nil, nil, nil, Loc ["STRING_OPTIONS_SENDFEEDBACK"])
|
||||
local feedback_button = g:NewButton (window, _, "$parentOpenFeedbackButton", nil, 80, 14, _detalhes.OpenFeedbackWindow, nil, nil, nil, Loc ["STRING_OPTIONS_SENDFEEDBACK"], 1)
|
||||
feedback_button:SetPoint ("left", changelog, "right", 10, 0)
|
||||
feedback_button.textalign = "left"
|
||||
feedback_button:SetHook ("OnEnter", function()
|
||||
@@ -369,6 +368,22 @@ function _detalhes:OpenOptionsWindow (instance, no_reopen, section)
|
||||
local feedback_image = g:NewImage (window, [[Interface\Buttons\UI-RADIOBUTTON]], 8, 9, "artwork", {20/64, 27/64, 4/16, 11/16})
|
||||
feedback_image:SetPoint ("right", feedback_button, "left", -1, 0)
|
||||
|
||||
--> translate
|
||||
--[[
|
||||
local translate_button = g:NewButton (window, _, "$parentOpenTranslateButton", nil, 140, 14, _detalhes.OpenTranslateWindow, nil, nil, nil, Loc ["STRING_TRANSLATE_LANGUAGE"], 1)
|
||||
translate_button:SetPoint ("left", feedback_button, "right", 10, 0)
|
||||
translate_button.textalign = "left"
|
||||
translate_button:SetHook ("OnEnter", function()
|
||||
translate_button:SetTextColor (1, 1, 0)
|
||||
end)
|
||||
translate_button:SetHook ("OnLeave", function()
|
||||
translate_button:SetTextColor (0.9999, 0.8196, 0, 1)
|
||||
end)
|
||||
|
||||
local feedback_image = g:NewImage (window, "Interface\\Buttons\\UI-RADIOBUTTON", 8, 9, "artwork", {20/64, 27/64, 4/16, 11/16})
|
||||
feedback_image:SetPoint ("right", translate_button, "left", -1, 0)
|
||||
--]]
|
||||
|
||||
--> right click to close
|
||||
--local right_click_close = window:CreateRightClickLabel ("short", 14, 14, "Close")
|
||||
--right_click_close:SetPoint ("left", fillbars, "right", 90, 0)
|
||||
@@ -5021,10 +5036,8 @@ function window:CreateFrame4()
|
||||
g:NewSwitch (frame4, _, "$parentShowMeSlider", "ShowMeSlider", 60, 20, _, _, instance.following.enabled)
|
||||
frame4.ShowMeSlider:SetPoint ("left", frame4.ShowMeLabel, "right", 2, -1)
|
||||
frame4.ShowMeSlider.OnSwitch = function (self, instance, value)
|
||||
instance.following.enabled = value
|
||||
instance:RefreshBars()
|
||||
instance:InstanceReset()
|
||||
instance:ReajustaGump()
|
||||
--instance.following.enabled = value
|
||||
instance:SetBarFollowPlayer (value)
|
||||
end
|
||||
window:CreateLineBackground2 (frame4, "ShowMeSlider", "ShowMeLabel", Loc ["STRING_OPTIONS_BAR_FOLLOWING_DESC"])
|
||||
|
||||
|
||||
+17
-11
@@ -3166,6 +3166,19 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
|
||||
end
|
||||
|
||||
function _detalhes:SetBarFollowPlayer (follow)
|
||||
|
||||
if (follow == nil) then
|
||||
follow = self.following.enabled
|
||||
end
|
||||
|
||||
self.following.enabled = follow
|
||||
|
||||
self:RefreshBars()
|
||||
self:InstanceReset()
|
||||
self:ReajustaGump()
|
||||
end
|
||||
|
||||
function _detalhes:SetBarGrowDirection (direction)
|
||||
|
||||
if (not direction) then
|
||||
@@ -3980,25 +3993,18 @@ function _detalhes:InstanceButtonsColors (red, green, blue, alpha, no_save, only
|
||||
if (self:IsLowerInstance()) then
|
||||
for _, ThisButton in _ipairs (_detalhes.ToolBar.Shown) do
|
||||
ThisButton:SetAlpha (alpha)
|
||||
--print (ThisButton:GetName())
|
||||
end
|
||||
end
|
||||
|
||||
else
|
||||
|
||||
elseif (only_right) then
|
||||
|
||||
local icons = {baseToolbar.novo, baseToolbar.fechar, baseToolbar.reset}
|
||||
local icons = {baseToolbar.modo_selecao, baseToolbar.segmento, baseToolbar.atributo, baseToolbar.report, baseToolbar.fechar, baseToolbar.reset, baseToolbar.fechar}
|
||||
|
||||
for _, button in _ipairs (icons) do
|
||||
button:SetAlpha (alpha)
|
||||
end
|
||||
|
||||
else
|
||||
|
||||
local icons = {baseToolbar.modo_selecao, baseToolbar.segmento, baseToolbar.atributo, baseToolbar.report, baseToolbar.novo, baseToolbar.fechar, baseToolbar.reset}
|
||||
|
||||
for _, button in _ipairs (icons) do
|
||||
button:SetAlpha (alpha)
|
||||
end
|
||||
|
||||
if (self:IsLowerInstance()) then
|
||||
for _, ThisButton in _ipairs (_detalhes.ToolBar.Shown) do
|
||||
ThisButton:SetAlpha (alpha)
|
||||
|
||||
@@ -72,6 +72,7 @@ local BloodmaulSlagMines = {
|
||||
[74787] = 1, --Slave Watcher Crushto
|
||||
[74366] = 2, --Forgemaster Gog'duh
|
||||
[86223] = 3, --Roltall
|
||||
[75786] = 3, --Roltall
|
||||
[86224] = 4, --Gug'rokk
|
||||
[74790] = 4, --Gug'rokk
|
||||
},
|
||||
@@ -216,7 +217,10 @@ local IronDocks = {
|
||||
[86231] = 2, --Makogg Emberblade
|
||||
[80808] = 2, --Neesa Nox
|
||||
[86232] = 3, --Oshir
|
||||
[79852] = 3, --Oshir
|
||||
[86233] = 4, --Skulloc
|
||||
[83612] = 4, --Skulloc
|
||||
[83616] = 4, --Skulloc
|
||||
},
|
||||
|
||||
encounters = {
|
||||
|
||||
@@ -469,7 +469,7 @@
|
||||
end
|
||||
|
||||
function YouAreNotPrepared:EndCombat()
|
||||
if (YouAreNotPrepared.last_death_combat_id == YouAreNotPrepared.combat_id) then
|
||||
if (YouAreNotPrepared.last_death_combat_id == YouAreNotPrepared.combat_counter) then
|
||||
if (YouAreNotPrepared.db.auto_open) then
|
||||
YouAreNotPrepared.ShowMeFromInstanceAlert()
|
||||
else
|
||||
@@ -493,7 +493,7 @@
|
||||
death_table = d
|
||||
|
||||
if (combat.is_boss) then --> encounter or pvp
|
||||
YouAreNotPrepared.last_death_combat_id = YouAreNotPrepared.combat_id
|
||||
YouAreNotPrepared.last_death_combat_id = YouAreNotPrepared.combat_counter
|
||||
return YouAreNotPrepared:AddDeath ({combat.is_boss.name or combat.enemy or "Unknown", time_of_death, last_cooldown, death_table, max_health, time})
|
||||
end
|
||||
end
|
||||
|
||||
+13
-91
@@ -148,7 +148,10 @@ function _G._detalhes:Start()
|
||||
--> refresh desaturated icons if is lower instance
|
||||
if (index == lower_instance) then
|
||||
instance:DesaturateMenu()
|
||||
|
||||
instance:SetAutoHideMenu (nil, nil, true)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -173,6 +176,7 @@ function _G._detalhes:Start()
|
||||
end
|
||||
self.CheckWallpaperAfterStartup = nil
|
||||
_detalhes.profile_loaded = nil
|
||||
|
||||
end
|
||||
|
||||
_detalhes:ScheduleTimer ("CheckWallpaperAfterStartup", 5)
|
||||
@@ -251,6 +255,7 @@ function _G._detalhes:Start()
|
||||
|
||||
--> send details startup done signal
|
||||
function self:AnnounceStartup()
|
||||
|
||||
self:SendEvent ("DETAILS_STARTED", "SEND_TO_ALL")
|
||||
|
||||
if (_detalhes.in_group) then
|
||||
@@ -263,9 +268,17 @@ function _G._detalhes:Start()
|
||||
_detalhes.parser_functions:ZONE_CHANGED_NEW_AREA()
|
||||
|
||||
_detalhes.AnnounceStartup = nil
|
||||
|
||||
end
|
||||
self:ScheduleTimer ("AnnounceStartup", 5)
|
||||
|
||||
--function self:RunAutoHideMenu()
|
||||
-- local lower_instance = _detalhes:GetLowerInstanceNumber()
|
||||
-- local instance = self:GetInstance (lower_instance)
|
||||
-- instance:SetAutoHideMenu (nil, nil, true)
|
||||
--end
|
||||
--self:ScheduleTimer ("RunAutoHideMenu", 15)
|
||||
|
||||
--> announce alpha version
|
||||
function self:AnnounceVersion()
|
||||
for index, instancia in _detalhes:ListInstances() do
|
||||
@@ -489,97 +502,6 @@ function _G._detalhes:Start()
|
||||
end)
|
||||
--]]
|
||||
|
||||
--[[ start world map zoom
|
||||
WorldMapScrollFrame:HookScript ("OnMouseWheel", function()
|
||||
local HScroll = WorldMapScrollFrame:GetHorizontalScroll()
|
||||
local VScroll = WorldMapScrollFrame:GetVerticalScroll()
|
||||
|
||||
if (MantainWorldMapZoomH ~= HScroll or MantainWorldMapZoomV ~= VScroll) then
|
||||
MantainWorldMapZoomMouseX, MantainWorldMapZoomMouseY = GetCursorPosition()
|
||||
end
|
||||
MantainWorldMapZoomH = HScroll
|
||||
MantainWorldMapZoomV = VScroll
|
||||
MantainWorldMapZoomScale = WorldMapDetailFrame:GetScale();
|
||||
end)
|
||||
|
||||
local MAX_ZOOM = 1.495;
|
||||
|
||||
hooksecurefunc ("ToggleWorldMap", function()
|
||||
|
||||
if (WorldMapFrame:IsShown()) then
|
||||
|
||||
if ((MantainWorldMapZoomV and MantainWorldMapZoomH) and (MantainWorldMapZoomH ~= 0 or MantainWorldMapZoomV ~= 0)) then
|
||||
|
||||
local last_opened = MantainWorldMapZoomLastOpened or time()
|
||||
MantainWorldMapZoomLastOpened = time()
|
||||
|
||||
if (last_opened+60 < time()) then
|
||||
WorldMapScrollFrame_ResetZoom()
|
||||
MantainWorldMapZoomMouseX, MantainWorldMapZoomMouseY = nil, nil
|
||||
MantainWorldMapZoomH = nil
|
||||
MantainWorldMapZoomV = nil
|
||||
MantainWorldMapZoomScale = nil
|
||||
return
|
||||
end
|
||||
|
||||
local scrollFrame = WorldMapScrollFrame;
|
||||
local oldScrollH = MantainWorldMapZoomH
|
||||
local oldScrollV = MantainWorldMapZoomV
|
||||
|
||||
-- get the mouse position on the frame, with 0,0 at top left
|
||||
local cursorX, cursorY = MantainWorldMapZoomMouseX, MantainWorldMapZoomMouseY
|
||||
local relativeFrame;
|
||||
if ( WorldMapFrame_InWindowedMode() ) then
|
||||
relativeFrame = UIParent;
|
||||
else
|
||||
relativeFrame = WorldMapFrame;
|
||||
end
|
||||
local frameX = cursorX / relativeFrame:GetScale() - scrollFrame:GetLeft();
|
||||
local frameY = scrollFrame:GetTop() - cursorY / relativeFrame:GetScale();
|
||||
|
||||
local oldScale = WorldMapDetailFrame:GetScale();
|
||||
--local newScale = oldScale + delta * 0.3;
|
||||
local newScale = MantainWorldMapZoomScale
|
||||
newScale = max(WORLDMAP_SETTINGS.size, newScale);
|
||||
newScale = min(MAX_ZOOM, newScale);
|
||||
WorldMapDetailFrame:SetScale(newScale);
|
||||
QUEST_POI_FRAME_WIDTH = WorldMapDetailFrame:GetWidth() * newScale;
|
||||
QUEST_POI_FRAME_HEIGHT = WorldMapDetailFrame:GetHeight() * newScale;
|
||||
|
||||
scrollFrame.maxX = QUEST_POI_FRAME_WIDTH - 1002 * WORLDMAP_SETTINGS.size;
|
||||
scrollFrame.maxY = QUEST_POI_FRAME_HEIGHT - 668 * WORLDMAP_SETTINGS.size;
|
||||
scrollFrame.zoomedIn = abs(WorldMapDetailFrame:GetScale() - WORLDMAP_SETTINGS.size) > 0.05;
|
||||
scrollFrame.continent = GetCurrentMapContinent();
|
||||
scrollFrame.mapID = GetCurrentMapAreaID();
|
||||
|
||||
-- figure out new scroll values
|
||||
local scaleChange = newScale / oldScale;
|
||||
local newScrollH = scaleChange * ( frameX + oldScrollH ) - frameX;
|
||||
local newScrollV = scaleChange * ( frameY + oldScrollV ) - frameY;
|
||||
-- clamp scroll values
|
||||
newScrollH = min(newScrollH, scrollFrame.maxX);
|
||||
newScrollH = max(0, newScrollH);
|
||||
newScrollV = min(newScrollV, scrollFrame.maxY);
|
||||
newScrollV = max(0, newScrollV);
|
||||
|
||||
-- set scroll values
|
||||
scrollFrame:SetHorizontalScroll(oldScrollH);
|
||||
scrollFrame:SetVerticalScroll(oldScrollV);
|
||||
|
||||
WorldMapFrame_Update();
|
||||
WorldMapScrollFrame_ReanchorQuestPOIs();
|
||||
WorldMapBlobFrame_ResetHitTranslations();
|
||||
WorldMapBlobFrame_DelayedUpdateBlobs();
|
||||
|
||||
|
||||
end
|
||||
else
|
||||
MantainWorldMapZoomLastOpened = time()
|
||||
end
|
||||
end)
|
||||
|
||||
--]]
|
||||
|
||||
--> register molten core
|
||||
|
||||
local molten_core = {
|
||||
|
||||
Reference in New Issue
Block a user