- Added Acitivity Time for Damage + Healing, tooltip show the activity separately.

- Major changes on Encounter Details Plugin making more easy to use.
- Removed Spell Details Plugin.
- Added new plugin: Dps Tuning.

- New API: actor:GetActorSpells() return table with spellid, spelltable.
- New API: actor:GetSpell (spellid) return the table for the spellid.
- New API: combat:GetCombatNumber() return a unique ID number identifying the combat.
- New API: framework:CreateButton (parent, func, w, h, text, param1, param2, texture, member, name, short_method)
- New API: framework:CreateDropDown (parent, func, default, w, h, member, name)
- New API: framework:CreateLabel (parent, text, size, color, font, member, name, layer)
- New API: framework:CreateBar (parent, texture, w, h, value, member, name)
- New API: framework:CreateChartPanel (parent, w, h, name)
This commit is contained in:
tercio
2014-09-08 17:17:56 -03:00
parent 27c2e40bcc
commit 20a9773a58
43 changed files with 2960 additions and 2843 deletions
+69 -72
View File
@@ -644,6 +644,11 @@
table.wipe (self._NameIndexTable)
end
function atributo_custom:GetValue (actor)
local actor_table = self:GetActorTable (actor)
return actor_table.value
end
function atributo_custom:AddValue (actor, actortotal, checktop)
local actor_table = self:GetActorTable (actor)
actor_table.my_actor = actor
@@ -654,6 +659,8 @@
atributo_custom._TargetActorsProcessedTop = actor_table.value
end
end
return actor_table.value
end
function atributo_custom:SetValue (actor, actortotal)
@@ -1122,77 +1129,20 @@
self.custom [#self.custom+1] = Healthstone
end
local DamageActivityTime = {
name = Loc ["STRING_CUSTOM_ACTIVITY_DPS"],
icon = [[Interface\ICONS\Achievement_PVP_H_06]],
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local ActivityTime = {
name = Loc ["STRING_CUSTOM_ACTIVITY_ALL"],
icon = [[INTERFACE\ICONS\Achievement_PVP_G_15]],
attribute = false,
spellid = false,
author = "Details!",
desc = Loc ["STRING_CUSTOM_ACTIVITY_DPS_DESC"],
desc = Loc ["STRING_CUSTOM_ACTIVITY_ALL_DESC"],
source = false,
target = false,
total_script = [[
local value, top, total, combat, instance = ...
local minutos, segundos = math.floor (value/60), math.floor (value%60)
return minutos .. "m " .. segundos .. "s"
]],
percent_script = [[
local value, top, total, combat, instance = ...
return string.format ("%.1f", value/top*100)
]],
script = [[
--init:
local combat, instance_container, instance = ...
local total, amount = 0, 0
--get the misc actor container
local damage_container = combat:GetActorList ( DETAILS_ATTRIBUTE_DAMAGE )
--do the loop:
for _, player in ipairs ( damage_container ) do
if (player.grupo) then
local activity = player:Tempo()
total = total + activity
amount = amount + 1
--add amount to the player
instance_container:AddValue (player, activity)
end
end
--return:
return total, combat:GetCombatTime(), amount
]],
tooltip = [[
]],
}
local have = false
for _, custom in ipairs (self.custom) do
if (custom.name == Loc ["STRING_CUSTOM_ACTIVITY_DPS"]) then
have = true
break
end
end
if (not have) then
setmetatable (DamageActivityTime, _detalhes.atributo_custom)
DamageActivityTime.__index = _detalhes.atributo_custom
self.custom [#self.custom+1] = DamageActivityTime
end
local HealActivityTime = {
name = Loc ["STRING_CUSTOM_ACTIVITY_HPS"],
icon = [[Interface\ICONS\Achievement_PVP_G_06]],
attribute = false,
spellid = false,
author = "Details!",
desc = Loc ["STRING_CUSTOM_ACTIVITY_HPS_DESC"],
source = false,
target = false,
total_script = [[
local value, top, total, combat, instance = ...
local minutos, segundos = math.floor (value/60), math.floor (value%60)
return minutos .. "m " .. segundos .. "s"
return math.floor (value)
]],
percent_script = [[
local value, top, total, combat, instance = ...
@@ -1203,39 +1153,86 @@
local combat, instance_container, instance = ...
local total, top, amount = 0, 0, 0
--get the misc actor container
local damage_container = combat:GetActorList ( DETAILS_ATTRIBUTE_HEAL )
--get the heal actor container
local heal_container = combat:GetActorList ( DETAILS_ATTRIBUTE_HEAL )
--do the loop:
for _, player in ipairs ( damage_container ) do
for _, player in ipairs ( heal_container ) do
if (player.grupo) then
local activity = player:Tempo()
total = total + activity
amount = amount + 1
--add amount to the player
instance_container:AddValue (player, activity)
if (activity > top) then
top = activity
end
end
end
--get the damage actor container
local damage_container = combat:GetActorList ( DETAILS_ATTRIBUTE_DAMAGE )
--do the loop:
for _, player in ipairs ( damage_container ) do
if (player.grupo) then
local activity = player:Tempo()
total = total + activity
if (not instance_container._NameIndexTable [player:Name()]) then
amount = amount + 1
end
--add amount to the player
local value = instance_container:AddValue (player, activity)
if (value > top) then
top = value
end
end
end
--return:
return total, combat:GetCombatTime(), amount
return total, top, amount
]],
tooltip = [[
--init:
local player, combat, instance = ...
local damage_actor = combat (DETAILS_ATTRIBUTE_DAMAGE, player:Name())
if (damage_actor) then
local damage_activity = damage_actor:Tempo()
local minutos1, segundos1 = math.floor (damage_activity/60), math.floor (damage_activity%60)
GameCooltip:AddLine ("Damage Activity", minutos1 .. "m " .. segundos1 .. "s")
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon ('Interface\\ICONS\\Achievement_PVP_H_06', 1, 1, 14, 14)
else
GameCooltip:AddLine ("Damage Activity", "0m 0s")
end
local heal_actor = combat (DETAILS_ATTRIBUTE_HEAL, player:Name())
if (heal_actor) then
local heal_activity = heal_actor:Tempo()
local minutos2, segundos2 = math.floor (heal_activity/60), math.floor (heal_activity%60)
GameCooltip:AddLine ("Heal Activity", minutos2 .. "m " .. segundos2 .. "s")
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon ('Interface\\ICONS\\Achievement_PVP_G_06', 1, 1, 14, 14)
else
GameCooltip:AddLine ("Heal Activity", "0m 0s")
end
]],
}
--/run _detalhes:AddDefaultCustomDisplays()
local have = false
for _, custom in ipairs (self.custom) do
if (custom.name == Loc ["STRING_CUSTOM_ACTIVITY_HPS"]) then
if (custom.name == Loc ["STRING_CUSTOM_ACTIVITY_ALL"]) then
have = true
break
end
end
if (not have) then
setmetatable (HealActivityTime, _detalhes.atributo_custom)
HealActivityTime.__index = _detalhes.atributo_custom
self.custom [#self.custom+1] = HealActivityTime
setmetatable (ActivityTime, _detalhes.atributo_custom)
ActivityTime.__index = _detalhes.atributo_custom
self.custom [#self.custom+1] = ActivityTime
end
end