- Added Enemy Damage Taken by clicking with middle mouse button over a enemy bar.

- Implemented code for early tests with new version checker.
- Renamed option menu "externals" to "Data Feed".
This commit is contained in:
tercio
2014-07-02 20:40:23 -03:00
parent 3baa00474b
commit 5fea5b238d
14 changed files with 387 additions and 193 deletions
+1 -173
View File
@@ -1456,176 +1456,4 @@
_G.DetailsCustomPanel:Show()
end
end
--[[
--init:
local combat, instance_container, instance = ...
local total, top, amount = 0, 0, 0
--get the misc actor container
local misc_container = combat:GetActorList ( DETAILS_ATTRIBUTE_MISC )
--do the loop:
for _, player in ipairs ( misc_container ) do
--only player in group
if (player:IsGroupPlayer()) then
local found_potion = false
--get the spell debuff uptime container
local debuff_uptime_container = player.debuff_uptime and player.debuff_uptime_spell_tables and player.debuff_uptime_spell_tables._ActorTable
if (debuff_uptime_container) then
--potion of focus (can't use as pre-potion, so, its amount is always 1)
local focus_potion = debuff_uptime_container [105701]
if (focus_potion) then
total = total + 1
found_potion = true
if (top < 1) then
top = 1
end
--add amount to the player
instance_container:AddValue (player, 1)
end
end
--get the spell buff uptime container
local buff_uptime_container = player.buff_uptime and player.buff_uptime_spell_tables and player.buff_uptime_spell_tables._ActorTable
if (buff_uptime_container) then
--potion of the jade serpent
local jade_serpent_potion = buff_uptime_container [105702]
if (jade_serpent_potion) then
local used = jade_serpent_potion.activedamt
if (used > 0) then
total = total + used
found_potion = true
if (used > top) then
top = used
end
--add amount to the player
instance_container:AddValue (player, used)
end
end
--potion of mogu power
local mogu_power_potion = buff_uptime_container [105706]
if (mogu_power_potion) then
local used = mogu_power_potion.activedamt
if (used > 0) then
total = total + used
found_potion = true
if (used > top) then
top = used
end
--add amount to the player
instance_container:AddValue (player, used)
end
end
--virmen's bite
local virmens_bite_potion = buff_uptime_container [105697]
if (virmens_bite_potion) then
local used = virmens_bite_potion.activedamt
if (used > 0) then
total = total + used
found_potion = true
if (used > top) then
top = used
end
--add amount to the player
instance_container:AddValue (player, used)
end
end
--potion of the mountains
local mountains_potion = buff_uptime_container [105698]
if (mountains_potion) then
local used = mountains_potion.activedamt
if (used > 0) then
total = total + used
found_potion = true
if (used > top) then
top = used
end
--add amount to the player
instance_container:AddValue (player, used)
end
end
end
if (found_potion) then
amount = amount + 1
end
end
end
--return:
return total, top, amount
tooltip =
--init:
local player, combat, instance = ...
--get the debuff container for potion of focus
local debuff_uptime_container = player.debuff_uptime and player.debuff_uptime_spell_tables and player.debuff_uptime_spell_tables._ActorTable
if (debuff_uptime_container) then
local focus_potion = debuff_uptime_container [105701]
if (focus_potion) then
local name, _, icon = GetSpellInfo (105701)
GameCooltip:AddLine (name, 1) --> can use only 1 focus potion (can't be pre-potion)
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
end
end
--get the buff container for all the others potions
local buff_uptime_container = player.buff_uptime and player.buff_uptime_spell_tables and player.buff_uptime_spell_tables._ActorTable
if (buff_uptime_container) then
--potion of the jade serpent
local jade_serpent_potion = buff_uptime_container [105702]
if (jade_serpent_potion) then
local name, _, icon = GetSpellInfo (105702)
GameCooltip:AddLine (name, jade_serpent_potion.activedamt)
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
end
--potion of mogu power
local mogu_power_potion = buff_uptime_container [105706]
if (mogu_power_potion) then
local name, _, icon = GetSpellInfo (105706)
GameCooltip:AddLine (name, mogu_power_potion.activedamt)
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
end
--virmen's bite
local virmens_bite_potion = buff_uptime_container [105697]
if (virmens_bite_potion) then
local name, _, icon = GetSpellInfo (105697)
GameCooltip:AddLine (name, virmens_bite_potion.activedamt)
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
end
--potion of the mountains
local mountains_potion = buff_uptime_container [105698]
if (mountains_potion) then
local name, _, icon = GetSpellInfo (105698)
GameCooltip:AddLine (name, mountains_potion.activedamt)
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
end
end
local spell = actor.spell_tables._ActorTable [15407]
spell.targets:SortByKey ("total")
for _, target in ipairs (spell.targets._ActorTable) do
GameCooltip:AddLine (target.nome, _detalhes.ToKFunctions [_detalhes.tooltip.abbreviation] (_, target.total))
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon ("Interface\\FriendsFrame\\StatusIcon-Offline", 1, 1, 14, 14)
end
--]]
+2 -2
View File
@@ -2357,7 +2357,7 @@ function gump:CriaJanelaInfo()
if (player2_misc) then
local spell = player2_misc.debuff_uptime_spell_tables and player2_misc.debuff_uptime_spell_tables._ActorTable and player2_misc.debuff_uptime_spell_tables._ActorTable [spellid]
if (spell) then
if (spell and spell.uptime) then
local minutos, segundos = _math_floor (spell.uptime/60), _math_floor (spell.uptime%60)
if (player1_uptime > spell.uptime) then
local diff = player1_uptime - spell.uptime
@@ -2414,7 +2414,7 @@ function gump:CriaJanelaInfo()
if (player3_misc) then
local spell = player3_misc.debuff_uptime_spell_tables and player3_misc.debuff_uptime_spell_tables._ActorTable and player3_misc.debuff_uptime_spell_tables._ActorTable [spellid]
if (spell) then
if (spell and spell.uptime) then
local minutos, segundos = _math_floor (spell.uptime/60), _math_floor (spell.uptime%60)
if (player1_uptime > spell.uptime) then
local diff = player1_uptime - spell.uptime
+4 -4
View File
@@ -392,7 +392,7 @@ function _detalhes:OpenOptionsWindow (instance, no_reopen)
--> left panel buttons
local menus = { --labels nos menus
{"Display", "Combat", "Tooltips", "Externals", "Profiles"},
{"Display", "Combat", "Tooltips", "Data Feed", "Profiles"},
{"Skin Selection", "Row Settings", "Row Texts", "Show & Hide Settings", "Window Settings", "Title Text", "Menus: Left Buttons", "Menus: Right Buttons", "Wallpaper", "Miscellaneous"},
{"Data Collector", "Performance Tweaks", "Plugins Management", "Spell Customization", "Data for Charts"}
}
@@ -416,7 +416,7 @@ local menus = { --labels nos menus
"Data for Charts", --16
"Show & Hide Settings", --17
"Miscellaneous", --18
"Externals", --19
"Data Feed", --19
"Tooltip", --20
}
@@ -600,7 +600,7 @@ local menus = { --labels nos menus
[16] = {}, --charts data
[17] = {}, --instance settings
[18] = {}, --miscellaneous settings
[19] = {}, --externals widgets
[19] = {}, --data feed widgets
[20] = {}, --tooltips
} --> vai armazenar os frames das opções
@@ -1333,7 +1333,7 @@ function window:CreateFrame20()
end
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Advanced Settings - Externals Widgets ~19
-- Advanced Settings - Data Feed Widgets ~19
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function window:CreateFrame19()
+39 -1
View File
@@ -1397,9 +1397,47 @@ local function barra_scripts (esta_barra, instancia, i)
if (esta_barra.fading_in) then
return
end
if (button == "RightButton") then
return _detalhes.switch:ShowMe (instancia)
elseif (button == "MiddleButton") then
--> verifica se é damage taken
if (instancia.atributo == 1 and instancia.sub_atributo == 6) then --> enemies
local inimigo = esta_barra.minha_tabela.nome
local custom_name = inimigo .. Loc ["STRING_CUSTOM_ENEMY_DT"]
--> procura se já tem um custom:
for index, CustomObject in _ipairs (_detalhes.custom) do
if (CustomObject:GetName() == custom_name) then
return instancia:TrocaTabela (instancia.segmento, 5, index)
end
end
--> criar um custom para este actor.
local new_custom_object = {
name = custom_name,
icon = [[Interface\ICONS\Pet_Type_Undead]],
attribute = "damagedone",
author = _detalhes.playername,
desc = inimigo .. " Damage Taken",
source = "[raid]",
target = inimigo,
script = false,
tooltip = false,
temp = true
}
tinsert (_detalhes.custom, new_custom_object)
setmetatable (new_custom_object, _detalhes.atributo_custom)
new_custom_object.__index = _detalhes.atributo_custom
instancia:TrocaTabela (instancia.segmento, 5, #_detalhes.custom)
--func, true, 5, index
end
end
esta_barra.texto_direita:SetPoint ("right", esta_barra.statusbar, "right", 1, -1)