- ToC Update.
- Added support for custom parser functions. - Added support for Hellfire Citadel raid. - Tyrant Velhari now has a custom parser function to calculate the healing done. - Removed Blackrock Foundry raid info. - Removed Highmaul raid info.
This commit is contained in:
+1
-1
@@ -632,7 +632,7 @@
|
||||
end
|
||||
|
||||
function _detalhes:GetPlayersInArena()
|
||||
local aliados = GetNumGroupMembers (LE_PARTY_CATEGORY_HOME)
|
||||
local aliados = GetNumGroupMembers() -- LE_PARTY_CATEGORY_HOME
|
||||
for i = 1, aliados-1 do
|
||||
local role = UnitGroupRolesAssigned ("party" .. i)
|
||||
if (role ~= "NONE") then
|
||||
|
||||
@@ -73,6 +73,26 @@ end
|
||||
end
|
||||
|
||||
if (is_enabled) then
|
||||
--> was disabled, so we need to save the current window positions.
|
||||
if (not current_enabled_state) then
|
||||
local window1 = _detalhes:GetInstance (1)
|
||||
if (window1) then
|
||||
window1:SaveMainWindowPosition()
|
||||
if (window1.libwindow) then
|
||||
local pos = window1:CreatePositionTable()
|
||||
_detalhes.chat_tab_embed.w1_pos = pos
|
||||
end
|
||||
end
|
||||
local window2 = _detalhes:GetInstance (2)
|
||||
if (window2) then
|
||||
window2:SaveMainWindowPosition()
|
||||
if (window2.libwindow) then
|
||||
local pos = window2:CreatePositionTable()
|
||||
_detalhes.chat_tab_embed.w2_pos = pos
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> need to make the embed
|
||||
_detalhes.chat_embed:DoEmbed()
|
||||
else
|
||||
@@ -224,6 +244,12 @@ end
|
||||
window2.baseframe:SetPoint ("center", UIParent, "center", 200, 0)
|
||||
window2.rowframe:SetPoint ("center", UIParent, "center", 200, 0)
|
||||
window2:LockInstance (false)
|
||||
window2:SaveMainWindowPosition()
|
||||
|
||||
local previous_pos = _detalhes.chat_tab_embed.w2_pos
|
||||
if (previous_pos) then
|
||||
window2:RestorePositionFromPositionTable (previous_pos)
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
@@ -233,6 +259,12 @@ end
|
||||
window1.baseframe:SetPoint ("center", UIParent, "center")
|
||||
window1.rowframe:SetPoint ("center", UIParent, "center")
|
||||
window1:LockInstance (false)
|
||||
window1:SaveMainWindowPosition()
|
||||
|
||||
local previous_pos = _detalhes.chat_tab_embed.w1_pos
|
||||
if (previous_pos) then
|
||||
window1:RestorePositionFromPositionTable (previous_pos)
|
||||
end
|
||||
|
||||
if (not _detalhes.chat_tab_embed.single_window and window2) then
|
||||
window2.baseframe:ClearAllPoints()
|
||||
@@ -241,6 +273,12 @@ end
|
||||
window2.baseframe:SetPoint ("center", UIParent, "center", 200, 0)
|
||||
window2.rowframe:SetPoint ("center", UIParent, "center", 200, 0)
|
||||
window2:LockInstance (false)
|
||||
window2:SaveMainWindowPosition()
|
||||
|
||||
local previous_pos = _detalhes.chat_tab_embed.w2_pos
|
||||
if (previous_pos) then
|
||||
window2:RestorePositionFromPositionTable (previous_pos)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+85
-3
@@ -308,10 +308,10 @@
|
||||
amount = absorbed + (amount or 0)
|
||||
end
|
||||
|
||||
if (este_jogador.grupo) then
|
||||
if (este_jogador.grupo and not este_jogador.arena_enemy) then --> source = friendly player
|
||||
_current_gtotal [1] = _current_gtotal [1]+amount
|
||||
|
||||
elseif (jogador_alvo.grupo) then
|
||||
elseif (jogador_alvo.grupo) then --> source = arena enemy or friendly player
|
||||
|
||||
--> record avoidance only for tank actors
|
||||
if (tanks_members_cache [alvo_serial]) then --> autoshot or melee hit
|
||||
@@ -2868,10 +2868,92 @@
|
||||
token_list ["UNIT_DESTROYED"] = parser.dead
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
parser.original_functions = {
|
||||
["spell_dmg"] = parser.spell_dmg,
|
||||
["swing"] = parser.swing,
|
||||
["range"] = parser.range,
|
||||
["rangemissed"] = parser.rangemissed,
|
||||
["swingmissed"] = parser.swingmissed,
|
||||
["missed"] = parser.missed,
|
||||
["environment"] = parser.environment,
|
||||
["heal"] = parser.heal,
|
||||
["heal_absorb"] = parser.heal_absorb,
|
||||
["buff"] = parser.buff,
|
||||
["unbuff"] = parser.unbuff,
|
||||
["buff_refresh"] = parser.buff_refresh,
|
||||
["energize"] = parser.energize,
|
||||
["spellcast"] = parser.spellcast,
|
||||
["dispell"] = parser.dispell,
|
||||
["break_cc"] = parser.break_cc,
|
||||
["ress"] = parser.ress,
|
||||
["interrupt"] = parser.interrupt,
|
||||
["dead"] = parser.dead,
|
||||
}
|
||||
|
||||
function parser:SetParserFunction (token, func)
|
||||
if (parser.original_functions [token]) then
|
||||
if (type (func) == "function") then
|
||||
parser [token] = func
|
||||
else
|
||||
parser [token] = parser.original_functions [token]
|
||||
end
|
||||
parser:RefreshFunctions()
|
||||
else
|
||||
return _detalhes:Msg ("Invalid Token for SetParserFunction.")
|
||||
end
|
||||
end
|
||||
|
||||
local all_parser_tokens = {
|
||||
["SPELL_PERIODIC_DAMAGE"] = "spell_dmg",
|
||||
["SPELL_EXTRA_ATTACKS"] = "spell_dmg",
|
||||
["SPELL_DAMAGE"] = "spell_dmg",
|
||||
["SPELL_BUILDING_DAMAGE"] = "spell_dmg",
|
||||
["SWING_DAMAGE"] = "swing",
|
||||
["RANGE_DAMAGE"] = "range",
|
||||
["DAMAGE_SHIELD"] = "spell_dmg",
|
||||
["DAMAGE_SPLIT"] = "spell_dmg",
|
||||
["RANGE_MISSED"] = "rangemissed",
|
||||
["SWING_MISSED"] = "swingmissed",
|
||||
["SPELL_MISSED"] = "missed",
|
||||
["SPELL_PERIODIC_MISSED"] = "missed",
|
||||
["SPELL_BUILDING_MISSED"] = "missed",
|
||||
["DAMAGE_SHIELD_MISSED"] = "missed",
|
||||
["ENVIRONMENTAL_DAMAGE"] = "environment",
|
||||
|
||||
["SPELL_HEAL"] = "heal",
|
||||
["SPELL_PERIODIC_HEAL"] = "heal",
|
||||
["SPELL_ABSORBED"] = "heal_absorb",
|
||||
|
||||
["SPELL_AURA_APPLIED"] = "buff",
|
||||
["SPELL_AURA_REMOVED"] = "unbuff",
|
||||
["SPELL_AURA_REFRESH"] = "buff_refresh",
|
||||
["SPELL_ENERGIZE"] = "energize",
|
||||
["SPELL_PERIODIC_ENERGIZE"] = "energize",
|
||||
|
||||
["SPELL_CAST_SUCCESS"] = "spellcast",
|
||||
["SPELL_DISPEL"] = "dispell",
|
||||
["SPELL_STOLEN"] = "dispell",
|
||||
["SPELL_AURA_BROKEN"] = "break_cc",
|
||||
["SPELL_AURA_BROKEN_SPELL"] = "break_cc",
|
||||
["SPELL_RESURRECT"] = "ress",
|
||||
["SPELL_INTERRUPT"] = "interrupt",
|
||||
["UNIT_DIED"] = "dead",
|
||||
["UNIT_DESTROYED"] = "dead",
|
||||
}
|
||||
|
||||
function parser:RefreshFunctions()
|
||||
for CLUE_ID, token in pairs (all_parser_tokens) do
|
||||
if (token_list [CLUE_ID]) then --> not disabled
|
||||
token_list [CLUE_ID] = parser [token]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- PARSER
|
||||
--serach key: ~parser ~event ~start ~inicio
|
||||
--serach key: ~parser ~events ~start ~inicio
|
||||
function _detalhes:GetZoneType()
|
||||
return _detalhes.zone_type
|
||||
end
|
||||
|
||||
@@ -496,6 +496,48 @@
|
||||
self.baseframe:SetPoint ("CENTER", _UIParent, "CENTER", novo_x + x, novo_y + y)
|
||||
self.baseframe.BoxBarrasAltura = self.baseframe:GetHeight() - end_window_spacement --> espaço para o final da janela
|
||||
end
|
||||
|
||||
function _detalhes:CreatePositionTable()
|
||||
local t = {pos_table = true}
|
||||
|
||||
if (self.libwindow) then
|
||||
t.x = self.libwindow.x
|
||||
t.y = self.libwindow.y
|
||||
t.scale = self.libwindow.scale
|
||||
t.point = self.libwindow.point
|
||||
end
|
||||
|
||||
--> old way to save positions
|
||||
t.x_legacy = self.posicao.normal.x
|
||||
t.y_legacy = self.posicao.normal.y
|
||||
|
||||
--> size
|
||||
t.w = self.posicao.normal.w
|
||||
t.h = self.posicao.normal.h
|
||||
|
||||
return t
|
||||
end
|
||||
|
||||
function _detalhes:RestorePositionFromPositionTable (t)
|
||||
if (not t.pos_table) then
|
||||
return
|
||||
end
|
||||
|
||||
if (t.x) then
|
||||
self.libwindow.x = t.x
|
||||
self.libwindow.y = t.y
|
||||
self.libwindow.scale = t.scale
|
||||
self.libwindow.point = t.point
|
||||
end
|
||||
|
||||
self.posicao.normal.x = t.x_legacy
|
||||
self.posicao.normal.y = t.y_legacy
|
||||
|
||||
self.posicao.normal.w = t.w
|
||||
self.posicao.normal.h = t.h
|
||||
|
||||
return self:RestoreMainWindowPosition()
|
||||
end
|
||||
|
||||
function _detalhes:ResetaGump (instancia, tipo, segmento)
|
||||
if (not instancia or _type (instancia) == "boolean") then
|
||||
|
||||
Reference in New Issue
Block a user