- Fixed an issue where sometimes tooltips wasn't being shown.

- Fixed a problem with overall data where it was using, even on dungoens, the raid-only 30 delay rule.
- Fixed an issue with spec detection (now it may detect even faster).
This commit is contained in:
Tercio
2015-06-12 20:52:08 -03:00
parent 9003dbd44f
commit a3eee58cb2
7 changed files with 248 additions and 90 deletions
+9 -6
View File
File diff suppressed because one or more lines are too long
+4
View File
@@ -62,6 +62,10 @@
return self [attribute]
end
function combate:InstanceType()
return _rawget (self, "instance_type")
end
function combate:IsTrash()
return _rawget (self, "is_trash")
end
+3 -3
View File
@@ -269,9 +269,7 @@
end
end
end
novo_objeto.flag_original = flag
novo_objeto.serial = serial
end
local pet_blacklist = {}
@@ -362,6 +360,8 @@
local novo_objeto = self.funcao_de_criacao (_, serial, nome)
novo_objeto.nome = nome
novo_objeto.flag_original = flag
novo_objeto.serial = serial
-- tipo do container
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+1 -1
View File
@@ -162,7 +162,7 @@ function historico:adicionar (tabela)
end
if (overall_added) then
if (tabela.is_boss and tabela:GetCombatTime() < 30) then
if (tabela.is_boss and tabela:InstanceType() == "raid" and tabela:GetCombatTime() < 30) then
_detalhes:Msg ("segment not added to overall (less than 30 seconds of combat time).")
else
if (_detalhes.debug) then
+133 -70
View File
@@ -100,6 +100,7 @@ do
if (Actor.minha_barra and type (Actor.minha_barra) == "table") then
Actor.minha_barra.minha_tabela = nil
_detalhes:ScheduleWindowUpdate()
end
return class
@@ -119,6 +120,7 @@ do
if (Actor.minha_barra and type (Actor.minha_barra) == "table") then
Actor.minha_barra.minha_tabela = nil
_detalhes:ScheduleWindowUpdate()
end
return class
@@ -158,14 +160,17 @@ do
local Actor, container = t[1], t[2]
local SpecSpellList = _detalhes.SpecSpellList
if (Actor.spells) then
for spellid, _ in _pairs (Actor.spells._ActorTable) do
local spec = SpecSpellList [spellid]
if (spec) then
if (spec ~= Actor.spec) then
--> get from the spell cast list
if (_detalhes.tabela_vigente) then
local misc_actor = _detalhes.tabela_vigente (4, Actor.nome)
if (misc_actor and misc_actor.spell_cast) then
for spellid, _ in pairs (misc_actor.spell_cast) do
local spec = SpecSpellList [spellid]
if (spec) then
_detalhes.cached_specs [Actor.serial] = spec
Actor.spec = spec
Actor.guessing_spec = nil
if (container) then
container.need_refresh = true
@@ -173,103 +178,159 @@ do
if (Actor.minha_barra and type (Actor.minha_barra) == "table") then
Actor.minha_barra.minha_tabela = nil
_detalhes:ScheduleWindowUpdate()
end
return spec
else
break
end
end
end
if (Actor.classe == "HUNTER") then
local container_misc = _detalhes.tabela_vigente[4]
local index = container_misc._NameIndexTable [Actor.nome]
if (index) then
local misc_actor = container_misc._ActorTable [index]
local buffs = misc_actor.buff_uptime_spells and misc_actor.buff_uptime_spells._ActorTable
if (buffs) then
for spellid, spell in _pairs (buffs) do
local spec = SpecSpellList [spellid]
if (spec) then
if (spec ~= Actor.spec) then
_detalhes.cached_specs [Actor.serial] = spec
Actor.spec = spec
else
if (Actor.spells) then
for spellid, _ in _pairs (Actor.spells._ActorTable) do
local spec = SpecSpellList [spellid]
if (spec) then
if (spec ~= Actor.spec) then
_detalhes.cached_specs [Actor.serial] = spec
Actor.spec = spec
if (container) then
container.need_refresh = true
end
if (Actor.minha_barra and type (Actor.minha_barra) == "table") then
Actor.minha_barra.minha_tabela = nil
_detalhes:ScheduleWindowUpdate()
end
return spec
else
break
end
end
end
if (Actor.classe == "HUNTER") then
local container_misc = _detalhes.tabela_vigente[4]
local index = container_misc._NameIndexTable [Actor.nome]
if (index) then
local misc_actor = container_misc._ActorTable [index]
local buffs = misc_actor.buff_uptime_spells and misc_actor.buff_uptime_spells._ActorTable
if (buffs) then
for spellid, spell in _pairs (buffs) do
local spec = SpecSpellList [spellid]
if (spec) then
if (spec ~= Actor.spec) then
_detalhes.cached_specs [Actor.serial] = spec
if (container) then
container.need_refresh = true
end
Actor.spec = spec
if (container) then
container.need_refresh = true
end
if (Actor.minha_barra and type (Actor.minha_barra) == "table") then
Actor.minha_barra.minha_tabela = nil
_detalhes:ScheduleWindowUpdate()
end
if (Actor.minha_barra and type (Actor.minha_barra) == "table") then
Actor.minha_barra.minha_tabela = nil
return spec
else
break
end
return spec
else
break
end
end
end
end
end
end
end
end
function _detalhes:GuessSpec (t)
local Actor, container, tries = t[1], t[2], t[3]
if (not Actor) then
return false
end
local guid = UnitGUID (Actor.nome)
if (guid) then
local spec = _detalhes.cached_specs [guid]
if (spec) then
Actor.spec = spec
Actor.guessing_spec = nil
if (container) then
container.need_refresh = true
end
if (Actor.minha_barra and type (Actor.minha_barra) == "table") then
Actor.minha_barra.minha_tabela = nil
end
return spec
end
end
local SpecSpellList = _detalhes.SpecSpellList
if (Actor.spells) then --> correcao pros containers misc, precisa pegar os diferentes tipos de containers de lá
for spellid, _ in _pairs (Actor.spells._ActorTable) do
local spec = SpecSpellList [spellid]
if (spec) then
_detalhes.cached_specs [Actor.serial] = spec
Actor.spec = spec
Actor.guessing_spec = nil
--local misc_actor = info.instancia.showing (4, self:name())
--spell_cast
--> get from the spec cache
local spec = _detalhes.cached_specs [Actor.serial]
if (spec) then
Actor.spec = spec
Actor.guessing_spec = nil
if (container) then
container.need_refresh = true
end
if (Actor.minha_barra and type (Actor.minha_barra) == "table") then
Actor.minha_barra.minha_tabela = nil
_detalhes:ScheduleWindowUpdate()
end
return spec
end
--> get from the spell cast list
if (_detalhes.tabela_vigente) then
local misc_actor = _detalhes.tabela_vigente (4, Actor.nome)
if (misc_actor and misc_actor.spell_cast) then
for spellid, _ in pairs (misc_actor.spell_cast) do
local spec = SpecSpellList [spellid]
if (spec) then
_detalhes.cached_specs [Actor.serial] = spec
if (container) then
container.need_refresh = true
end
Actor.spec = spec
Actor.guessing_spec = nil
if (container) then
container.need_refresh = true
end
if (Actor.minha_barra and type (Actor.minha_barra) == "table") then
Actor.minha_barra.minha_tabela = nil
_detalhes:ScheduleWindowUpdate()
end
if (Actor.minha_barra and type (Actor.minha_barra) == "table") then
Actor.minha_barra.minha_tabela = nil
return spec
end
end
end
else
if (Actor.spells) then --> correcao pros containers misc, precisa pegar os diferentes tipos de containers de lá
for spellid, _ in _pairs (Actor.spells._ActorTable) do
local spec = SpecSpellList [spellid]
if (spec) then
_detalhes.cached_specs [Actor.serial] = spec
Actor.spec = spec
Actor.guessing_spec = nil
if (container) then
container.need_refresh = true
end
if (Actor.minha_barra and type (Actor.minha_barra) == "table") then
Actor.minha_barra.minha_tabela = nil
_detalhes:ScheduleWindowUpdate()
end
return spec
end
return spec
end
end
end
if (Actor.classe == "HUNTER") then
local container_misc = _detalhes.tabela_vigente[4]
local index = container_misc._NameIndexTable [Actor.nome]
@@ -292,6 +353,7 @@ do
if (Actor.minha_barra and type (Actor.minha_barra) == "table") then
Actor.minha_barra.minha_tabela = nil
_detalhes:ScheduleWindowUpdate()
end
return spec
@@ -316,6 +378,7 @@ do
if (Actor.minha_barra and type (Actor.minha_barra) == "table") then
Actor.minha_barra.minha_tabela = nil
_detalhes:ScheduleWindowUpdate()
end
return spec
+82 -9
View File
@@ -2196,7 +2196,29 @@ end
icon_frame_events:RegisterEvent ("COMBAT_PLAYER_ENTER", "EnterCombat")
function icon_frame_events:CancelAnim (anim)
local anim, timeout = unpack (anim)
if (_detalhes.icon_animations.load.in_use [anim]) then
if (timeout) then
local f = anim
if (not f.question_icon) then
f.question_icon = f.parent:GetParent():GetParent().border:CreateTexture (nil, "overlay")
f.question_icon:SetTexture ([[Interface\GossipFrame\ActiveLegendaryQuestIcon]])
f.question_icon:SetSize (16, 16)
end
f.question_icon:Show()
f.question_icon:SetPoint ("center", f.parent, "center")
if (not _detalhes.HideBarQuestionIcon) then
function _detalhes:HideBarQuestionIcon (frame)
frame.question_icon:Hide()
end
end
_detalhes:ScheduleTimer ("HideBarQuestionIcon", 2, f)
end
_detalhes.icon_animations.load.in_use [anim] = nil
tinsert (_detalhes.icon_animations.load.available, anim)
anim.anim:Stop()
@@ -2208,21 +2230,25 @@ function icon_frame_events:CancelAnim (anim)
end
local icon_frame_inspect_callback = function (guid, unitid, icon_frame)
if (icon_frame.icon_animation) then
icon_frame.icon_animation.anim:Stop()
icon_frame.icon_animation:Hide()
end
local is_in_use = _detalhes.icon_animations.load.in_use [icon_frame.icon_animation]
if (is_in_use) then
tinsert (_detalhes.icon_animations.load.available, icon_frame.icon_animation)
_detalhes.icon_animations.load.in_use [icon_frame.icon_animation] = nil
end
icon_frame.icon_animation.anim:Stop()
icon_frame.icon_animation:Hide()
if (icon_frame:IsMouseOver()) then
icon_frame_on_enter (icon_frame)
end
icon_frame.icon_animation.icon_frame = nil
icon_frame.icon_animation = nil
if (icon_frame.icon_animation) then
icon_frame.icon_animation.icon_frame = nil
icon_frame.icon_animation = nil
end
end
local icon_frame_create_animation = function()
@@ -2242,7 +2268,14 @@ local icon_frame_create_animation = function()
tinsert (_detalhes.icon_animations.load.available, f)
end
local icon_frame_on_click = function (self)
local icon_frame_on_click_down = function (self)
self:GetParent():GetParent().icone_classe:SetPoint ("left", self:GetParent():GetParent(), "left", 1, -1)
end
local icon_frame_on_click_up = function (self)
self:GetParent():GetParent().icone_classe:SetPoint ("left", self:GetParent():GetParent(), "left")
if (_detalhes.in_combat) then
_detalhes:Msg (Loc ["STRING_QUERY_INSPECT_FAIL1"])
return
@@ -2250,6 +2283,40 @@ local icon_frame_on_click = function (self)
if (self.showing == "actor") then
if (_detalhes.ilevel.core:HasQueuedInspec (self.unitname)) then
--> icon animation
local anim = tremove (_detalhes.icon_animations.load.available)
if (not anim) then
icon_frame_create_animation()
anim = tremove (_detalhes.icon_animations.load.available)
end
local f = anim
if (not f.question_icon) then
f.question_icon = self:GetParent():GetParent().border:CreateTexture (nil, "overlay")
f.question_icon:SetTexture ([[Interface\GossipFrame\ActiveLegendaryQuestIcon]])
f.question_icon:SetSize (16, 16)
end
f.question_icon:ClearAllPoints()
f.question_icon:SetPoint ("center", self, "center")
f.question_icon:Show()
if (not _detalhes.HideBarQuestionIcon) then
function _detalhes:HideBarQuestionIcon (frame)
frame.question_icon:Hide()
end
end
_detalhes:ScheduleTimer ("HideBarQuestionIcon", 1, f)
self.icon_animation = anim
anim.icon_frame = self
local pid
pid = icon_frame_events:ScheduleTimer ("CancelAnim", 1, {anim})
_detalhes.icon_animations.load.in_use [anim] = pid
anim.parent = self
return
end
@@ -2280,18 +2347,24 @@ local icon_frame_on_click = function (self)
local pid
if (does_query) then
pid = icon_frame_events:ScheduleTimer ("CancelAnim", 4, anim)
pid = icon_frame_events:ScheduleTimer ("CancelAnim", 4, {anim, true})
else
pid = icon_frame_events:ScheduleTimer ("CancelAnim", 0.2, anim)
pid = icon_frame_events:ScheduleTimer ("CancelAnim", 0.2, {anim})
end
_detalhes.icon_animations.load.in_use [anim] = pid
anim.parent = self
if (anim.question_icon) then
anim.question_icon:Hide()
end
end
end
local set_frame_icon_scripts = function (row)
row.icon_frame:SetScript ("OnEnter", icon_frame_on_enter)
row.icon_frame:SetScript ("OnLeave", icon_frame_on_leave)
row.icon_frame:SetScript ("OnMouseUp", icon_frame_on_click)
row.icon_frame:SetScript ("OnMouseDown", icon_frame_on_click_down)
row.icon_frame:SetScript ("OnMouseUp", icon_frame_on_click_up)
end
local function barra_scripts (esta_barra, instancia, i)
+16 -1
View File
@@ -115,7 +115,22 @@ function _G._detalhes:Start()
--> start instances updater
_detalhes:CheckSwitchOnLogon()
self:CheckSwitchOnLogon()
function _detalhes:ScheduledWindowUpdate (forced)
if (not forced and _detalhes.in_combat) then
return
end
_detalhes.scheduled_window_update = nil
_detalhes:AtualizaGumpPrincipal (-1, true)
end
function _detalhes:ScheduleWindowUpdate (time, forced)
if (_detalhes.scheduled_window_update) then
_detalhes:CancelTimer (_detalhes.scheduled_window_update)
_detalhes.scheduled_window_update = nil
end
_detalhes.scheduled_window_update = _detalhes:ScheduleTimer ("ScheduledWindowUpdate", time or 1, forced)
end
self:AtualizaGumpPrincipal (-1, true)
self.atualizador = self:ScheduleRepeatingTimer ("AtualizaGumpPrincipal", _detalhes.update_speed, -1)