- added support to combat concatenate: combat1 = combat1 + combat2.

- added trash mod knowledge which will concatenate trash segments.
- added a new member on combat object: .is_trash
- added _detalhes:GetInstanceTrashInfo (mapid)
- added _detalhes member: .last_instance
- added CreateFlashAnimation(frame) and frame.flash (UiFrameFlash params)
- fixed issue were healing was not showing corrently on current segment.
- fixed issue were misc wasn't showing on everything mode.
- fixed talent and glyphs frame error.
- fixed issue with options panel were some options reset when panel is open.
- minor speedup on parser removing member last_event from shadows.
- more functions clean up avoiding garbage creation.
This commit is contained in:
Tercio
2013-09-25 19:45:32 -03:00
parent ef6b8b804d
commit 6211e58966
24 changed files with 989 additions and 446 deletions
+29 -13
View File
@@ -44,8 +44,26 @@
--> try to find the opponent of last fight, can be called during a fight as well
function _detalhes:FindEnemy()
local trash_list
if (_detalhes.in_group and _detalhes.last_instance) then
trash_list = _detalhes:GetInstanceTrashInfo (_detalhes.last_instance)
end
for _, actor in _ipairs (_detalhes.tabela_vigente[class_type_dano]._ActorTable) do
if (not actor.grupo and not actor.owner and not actor.nome:find ("[*]") and _bit_band (actor.flag, 0x00000060) ~= 0) then --> 0x20+0x40 neutral + enemy reaction
if (trash_list) then
local serial = tonumber (actor.serial:sub(6, 10), 16)
if (serial and trash_list [serial]) then
if (_detalhes.debug) then
_detalhes:Msg ("(debug) segment against trash mobs.")
end
_detalhes.tabela_vigente.is_trash = true
return Loc ["STRING_SEGMENT_TRASH"]
end
end
for name, _ in _pairs (actor.targets._NameIndexTable) do
if (name == _detalhes.playername) then
return actor.nome
@@ -161,7 +179,6 @@
if (BossIndex) then
Actor.boss = true
Actor.shadow.boss = true
_detalhes:FlagActorsOnBossFight()
return {
index = BossIndex,
name =_detalhes:GetBossName (ZoneMapID, BossIndex),
@@ -267,8 +284,6 @@
--> pega a zona do jogador e vê se foi uma luta contra um Boss -- identifica se a luta foi com um boss
if (not _detalhes.tabela_vigente.is_boss) then
_detalhes.tabela_vigente.is_boss = _detalhes:FindBoss()
else
_detalhes:FlagActorsOnBossFight()
end
if (_detalhes.debug) then
@@ -276,13 +291,17 @@
end
if (not _detalhes.tabela_vigente.is_boss) then
local inimigo = _detalhes:FindEnemy()
if (inimigo) then
if (_detalhes.debug) then
_detalhes:Msg ("(debug) enemy recognized", inimigo)
end
end
_detalhes.tabela_vigente.enemy = inimigo
if (_detalhes.debug) then
_detalhes:Msg ("(debug) forcing equalize actors behavior.")
_detalhes:EqualizeActorsSchedule (_detalhes.host_of)
@@ -293,6 +312,8 @@
else
_detalhes:FlagActorsOnBossFight()
if (_detalhes:GetBossDetails (_detalhes.tabela_vigente.is_boss.mapid, _detalhes.tabela_vigente.is_boss.index)) then
_detalhes.tabela_vigente.enemy = _detalhes.tabela_vigente.is_boss.encounter
_detalhes:CaptureSet (false, "damage", false, 30)
@@ -410,6 +431,7 @@
table.wipe (_detalhes.cache_damage_group)
table.wipe (_detalhes.cache_healing_group)
_detalhes:UpdateParserGears()
_detalhes:SendEvent ("COMBAT_PLAYER_LEAVE", nil, _detalhes.tabela_vigente)
@@ -596,16 +618,10 @@
function _detalhes:FlagActorsOnBossFight()
for class_type, container in _ipairs (_detalhes.tabela_vigente) do
for _, actor in _ipairs (container._ActorTable) do
if (not actor.grupo and not actor.boss) then
if (_bit_band (actor.flag, _detalhes.flags.friend) == 0) then
actor.boss_fight_component = true
local shadow = _detalhes.tabela_overall (class_type, actor.nome)
if (shadow) then
shadow.boss_fight_component = true
else
print ("Nao achou a shadow em FlagActorsOnBossFight()")
end
end
actor.boss_fight_component = true
local shadow = _detalhes.tabela_overall (class_type, actor.nome)
if (shadow) then
shadow.boss_fight_component = true
end
end
end