Added Details:GetTop5Actors(attributeId) and Details:GetActorByRank(attributeId, rankIndex)
This commit is contained in:
@@ -314,6 +314,48 @@ function Details:GetNumLinesShown() --alis of _detalhes:GetNumRows()
|
||||
return self.rows_fit_in_window
|
||||
end
|
||||
|
||||
--@attributeId: DETAILS_ATTRIBUTE_DAMAGE, DETAILS_ATTRIBUTE_HEAL
|
||||
function Details:GetTop5Actors(attributeId)
|
||||
local combatObject = self.showing
|
||||
if (combatObject) then
|
||||
local container = combatObject:GetContainer(attributeId)
|
||||
if (container) then
|
||||
local actorTable = container._ActorTable
|
||||
return actorTable[1], actorTable[2], actorTable[3], actorTable[4], actorTable[5]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--@attributeId: DETAILS_ATTRIBUTE_DAMAGE, DETAILS_ATTRIBUTE_HEAL
|
||||
--@rankIndex: the rank id of the actor shown in the window
|
||||
function Details:GetActorByRank(attributeId, rankIndex)
|
||||
local combatObject = self.showing
|
||||
if (combatObject) then
|
||||
local container = combatObject:GetContainer(attributeId)
|
||||
if (container) then
|
||||
return container._ActorTable[rankIndex]
|
||||
end
|
||||
end
|
||||
|
||||
--[=[
|
||||
local firstRow = window1:GetLine(1)
|
||||
if (firstRow and firstRow:IsShown()) then
|
||||
local actor = firstRow:GetActor()
|
||||
if (actor) then
|
||||
local total = actor.total
|
||||
local combatTime = Details:GetCurrentCombat():GetCombatTime()
|
||||
print("dps:", total/combatTime)
|
||||
end
|
||||
end
|
||||
|
||||
local actorTable = container._ActorTable
|
||||
for i = 1, #actorTable do
|
||||
local actor = actorTable[rankIndex]
|
||||
return actor
|
||||
end
|
||||
--]=]
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
--> retorna se a inst�ncia esta ou n�o ativa
|
||||
|
||||
+3
-3
@@ -2691,9 +2691,9 @@ if (DetailsFramework.IsTBCWow()) then
|
||||
ShamanEnhancement = 263,
|
||||
ShamanRestoration = 264,
|
||||
|
||||
WarlockCurses = 265,
|
||||
WarlockDestruction = 266,
|
||||
WarlockSummoning = 267,
|
||||
WarlockCurses = 265, --affliction
|
||||
WarlockSummoning = 266, --demo
|
||||
WarlockDestruction = 267, --destruction
|
||||
|
||||
--WarriorArm = 71,
|
||||
WarriorArms = 71,
|
||||
|
||||
@@ -4053,6 +4053,10 @@ end
|
||||
|
||||
_detalhes.barras_criadas = 0
|
||||
|
||||
local getActor = function(self)
|
||||
return self.minha_tabela
|
||||
end
|
||||
|
||||
--> search key: ~row ~barra ~newbar ~createbar ~createrow
|
||||
function gump:CreateNewLine (instancia, index)
|
||||
|
||||
@@ -4067,6 +4071,8 @@ function gump:CreateNewLine (instancia, index)
|
||||
newLine.instance_id = instancia.meu_id
|
||||
newLine.animacao_fim = 0
|
||||
newLine.animacao_fim2 = 0
|
||||
|
||||
newLine.GetActor = getActor
|
||||
|
||||
--> set point, almost irrelevant here, it recalc this on SetBarGrowDirection()
|
||||
local y = instancia.row_height * (index-1)
|
||||
|
||||
Reference in New Issue
Block a user