@@ -102,6 +102,10 @@
|
||||
return self.combat_counter
|
||||
end
|
||||
|
||||
function combate:GetAlteranatePower()
|
||||
return self.alternate_power
|
||||
end
|
||||
|
||||
--return the name of the encounter or enemy
|
||||
function combate:GetCombatName (try_find)
|
||||
if (self.is_pvp) then
|
||||
@@ -166,7 +170,7 @@
|
||||
end
|
||||
|
||||
--return the total of a specific attribute
|
||||
local power_table = {0, 1, 3, 6}
|
||||
local power_table = {0, 1, 3, 6, 0, "alternatepower"}
|
||||
|
||||
function combate:GetTotal (attribute, subAttribute, onlyGroup)
|
||||
if (attribute == 1 or attribute == 2) then
|
||||
@@ -197,6 +201,12 @@
|
||||
|
||||
return 0
|
||||
end
|
||||
|
||||
function combate:CreateAlternatePowerTable (actorName)
|
||||
local t = {last = 0, total = 0}
|
||||
self.alternate_power [actorName] = t
|
||||
return t
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> internals
|
||||
@@ -252,6 +262,9 @@
|
||||
esta_tabela.frags = {}
|
||||
esta_tabela.frags_need_refresh = false
|
||||
|
||||
--> alternate power
|
||||
esta_tabela.alternate_power = {}
|
||||
|
||||
--> time data container
|
||||
esta_tabela.TimeData = _detalhes:TimeDataCreateCombatTables()
|
||||
esta_tabela.PhaseData = {{1, 1}, damage = {}, heal = {}, damage_section = {}, heal_section = {}} --[1] phase number [2] phase started
|
||||
@@ -290,7 +303,8 @@
|
||||
[0] = 0, --> mana
|
||||
[1] = 0, --> rage
|
||||
[3] = 0, --> energy (rogues cat)
|
||||
[6] = 0 --> runepower (dk)
|
||||
[6] = 0, --> runepower (dk)
|
||||
alternatepower = 0,
|
||||
},
|
||||
{--> misc
|
||||
cc_break = 0, --> armazena quantas quebras de CC
|
||||
@@ -316,7 +330,8 @@
|
||||
[0] = 0, --> mana
|
||||
[1] = 0, --> rage
|
||||
[3] = 0, --> energy (rogues cat)
|
||||
[6] = 0 --> runepower (dk)
|
||||
[6] = 0, --> runepower (dk)
|
||||
alternatepower = 0,
|
||||
},
|
||||
{--> misc
|
||||
cc_break = 0, --> armazena quantas quebras de CC
|
||||
@@ -467,7 +482,17 @@
|
||||
end
|
||||
end
|
||||
combate1.frags_need_refresh = true
|
||||
|
||||
|
||||
--> alternate power
|
||||
local overallPowerTable = combate1.alternate_power
|
||||
for actorName, powerTable in pairs (combate2.alternate_power) do
|
||||
local power = overallPowerTable [actorName]
|
||||
if (power) then
|
||||
power.total = power.total - powerTable.total
|
||||
end
|
||||
combate2.alternate_power [actorName].last = 0
|
||||
end
|
||||
|
||||
return combate1
|
||||
|
||||
end
|
||||
@@ -495,6 +520,17 @@
|
||||
shadow.grupo = actor.grupo
|
||||
end
|
||||
end
|
||||
|
||||
--> alternate power
|
||||
local overallPowerTable = combate1.alternate_power
|
||||
for actorName, powerTable in pairs (combate2.alternate_power) do
|
||||
local power = overallPowerTable [actorName]
|
||||
if (not power) then
|
||||
power = combate1:CreateAlternatePowerTable (actorName)
|
||||
end
|
||||
power.total = power.total + powerTable.total
|
||||
combate2.alternate_power [actorName].last = 0
|
||||
end
|
||||
|
||||
return combate1
|
||||
end
|
||||
|
||||
+91
-34
@@ -76,6 +76,7 @@ function atributo_energy:NovaTabela (serial, nome, link)
|
||||
total = alphabetical,
|
||||
received = alphabetical,
|
||||
resource = alphabetical,
|
||||
alternatepower = alphabetical,
|
||||
|
||||
last_value = nil,
|
||||
|
||||
@@ -146,6 +147,10 @@ local sort_energy = function (t1, t2)
|
||||
end
|
||||
end
|
||||
|
||||
local sort_energyalternate = function (t1, t2)
|
||||
return t1.alternatepower > t2.alternatepower
|
||||
end
|
||||
|
||||
local sort_energy_group = function (t1, t2)
|
||||
if (t1.grupo and t2.grupo) then
|
||||
if (t1.powertype == power_type and t2.powertype == power_type) then
|
||||
@@ -168,6 +173,20 @@ local sort_energy_group = function (t1, t2)
|
||||
end
|
||||
end
|
||||
|
||||
local sort_alternateenergy_group = function (t1, t2)
|
||||
if (t1.grupo and t2.grupo) then
|
||||
return t1.alternatepower > t2.alternatepower
|
||||
else
|
||||
if (t1.grupo) then
|
||||
return true
|
||||
elseif (t2.grupo) then
|
||||
return false
|
||||
else
|
||||
return t1.alternatepower > t2.alternatepower
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> resource refresh
|
||||
|
||||
local function RefreshBarraResources (tabela, barra, instancia)
|
||||
@@ -341,58 +360,93 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
|
||||
keyName = "received"
|
||||
|
||||
if (sub_atributo == 6) then
|
||||
keyName = "alternatepower"
|
||||
end
|
||||
|
||||
if (exportar) then
|
||||
if (_type (exportar) == "boolean") then
|
||||
keyName = "received"
|
||||
--keyName = "received"
|
||||
else
|
||||
keyName = exportar.key
|
||||
modo = exportar.modo
|
||||
end
|
||||
else
|
||||
keyName = "received"
|
||||
--keyName = "received"
|
||||
end
|
||||
|
||||
if (modo == modo_ALL) then
|
||||
|
||||
_table_sort (conteudo, sort_energy)
|
||||
_table_sort (conteudo, sort_energyalternate)
|
||||
|
||||
for i = amount, 1, -1 do
|
||||
if (conteudo[i].received < 1) then
|
||||
amount = amount-1
|
||||
elseif (conteudo[i].powertype ~= power_type) then
|
||||
amount = amount-1
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
total = tabela_do_combate.totals [class_type] [power_type]
|
||||
instancia.top = conteudo[1].received
|
||||
|
||||
elseif (modo == modo_GROUP) then
|
||||
|
||||
_table_sort (conteudo, sort_energy_group)
|
||||
|
||||
for index, player in _ipairs (conteudo) do
|
||||
if (player.grupo) then
|
||||
if (player.received < 1) then
|
||||
amount = index - 1
|
||||
break
|
||||
elseif (player.powertype ~= power_type) then
|
||||
amount = index - 1
|
||||
if (keyName == "alternatepower") then
|
||||
for i = amount, 1, -1 do
|
||||
if (conteudo[i].alternatepower < 1) then
|
||||
amount = amount-1
|
||||
else
|
||||
break
|
||||
end
|
||||
|
||||
total = total + player.received
|
||||
else
|
||||
amount = index-1
|
||||
break
|
||||
end
|
||||
|
||||
total = tabela_do_combate.totals [class_type] ["alternatepower"]
|
||||
instancia.top = conteudo[1].alternatepower
|
||||
else
|
||||
for i = amount, 1, -1 do
|
||||
if (conteudo[i].received < 1) then
|
||||
amount = amount-1
|
||||
elseif (conteudo[i].powertype ~= power_type) then
|
||||
amount = amount-1
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
total = tabela_do_combate.totals [class_type] [power_type]
|
||||
instancia.top = conteudo[1].received
|
||||
end
|
||||
|
||||
instancia.top = conteudo[1].received
|
||||
elseif (modo == modo_GROUP) then
|
||||
if (keyName == "alternatepower") then
|
||||
|
||||
_table_sort (conteudo, sort_alternateenergy_group)
|
||||
|
||||
for index, player in _ipairs (conteudo) do
|
||||
if (player.grupo) then
|
||||
if (player.alternatepower < 1) then
|
||||
amount = index - 1
|
||||
break
|
||||
end
|
||||
|
||||
total = total + player.alternatepower
|
||||
else
|
||||
amount = index-1
|
||||
break
|
||||
end
|
||||
end
|
||||
instancia.top = conteudo[1].alternatepower
|
||||
|
||||
else
|
||||
|
||||
_table_sort (conteudo, sort_energy_group)
|
||||
|
||||
for index, player in _ipairs (conteudo) do
|
||||
if (player.grupo) then
|
||||
if (player.received < 1) then
|
||||
amount = index - 1
|
||||
break
|
||||
elseif (player.powertype ~= power_type) then
|
||||
amount = index - 1
|
||||
break
|
||||
end
|
||||
|
||||
total = total + player.received
|
||||
else
|
||||
amount = index-1
|
||||
break
|
||||
end
|
||||
end
|
||||
instancia.top = conteudo[1].received
|
||||
end
|
||||
end
|
||||
|
||||
showing:remapear()
|
||||
@@ -1369,6 +1423,7 @@ end
|
||||
--> total das energias (captura de dados)
|
||||
shadow.total = shadow.total + actor.total
|
||||
shadow.received = shadow.received + actor.received
|
||||
shadow.alternatepower = shadow.alternatepower + actor.alternatepower
|
||||
|
||||
if (not actor.powertype) then
|
||||
--print ("actor without powertype", actor.nome, actor.powertype)
|
||||
@@ -1449,6 +1504,7 @@ atributo_energy.__add = function (tabela1, tabela2)
|
||||
--> total and received
|
||||
tabela1.total = tabela1.total + tabela2.total
|
||||
tabela1.received = tabela1.received + tabela2.received
|
||||
tabela1.alternatepower = tabela1.alternatepower + tabela2.alternatepower
|
||||
|
||||
--> targets
|
||||
for target_name, amount in _pairs (tabela2.targets) do
|
||||
@@ -1486,6 +1542,7 @@ atributo_energy.__sub = function (tabela1, tabela2)
|
||||
--> total and received
|
||||
tabela1.total = tabela1.total - tabela2.total
|
||||
tabela1.received = tabela1.received - tabela2.received
|
||||
tabela1.alternatepower = tabela1.alternatepower - tabela2.alternatepower
|
||||
|
||||
--> targets
|
||||
for target_name, amount in _pairs (tabela2.targets) do
|
||||
|
||||
+57
-2
@@ -266,7 +266,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
--> grava o total
|
||||
instancia.top = conteudo[1][keyName]
|
||||
|
||||
elseif (instancia.modo == modo_ALL or sub_atributo == 5) then --> mostrando ALL
|
||||
elseif (instancia.modo == modo_ALL or sub_atributo == 5 or sub_atributo == 7) then --> mostrando ALL
|
||||
|
||||
amount = _detalhes:ContainerSortHeal (conteudo, amount, keyName)
|
||||
|
||||
@@ -974,6 +974,7 @@ function atributo_heal:ToolTip_HealingDenied (instancia, numero, barra, keydown)
|
||||
local spellList = {} --spells the player used to deny heal
|
||||
local targetList = {} --all players affected
|
||||
local spellsDenied = {} --all spells which had heal denied
|
||||
local healersDenied = {} --heal denied on healers
|
||||
|
||||
local icon_size = _detalhes.tooltip.icon_size
|
||||
local icon_border = _detalhes.tooltip.icon_border_texcoord
|
||||
@@ -992,6 +993,11 @@ function atributo_heal:ToolTip_HealingDenied (instancia, numero, barra, keydown)
|
||||
for spellID, amount in _pairs (spell.heal_denied) do
|
||||
spellsDenied [spellID] = (spellsDenied [spellID] or 0) + amount
|
||||
end
|
||||
|
||||
--healers denied
|
||||
for healerName, amount in _pairs (spell.heal_denied_healers) do
|
||||
healersDenied [healerName] = (healersDenied [healerName] or 0) + amount
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1110,7 +1116,38 @@ function atributo_heal:ToolTip_HealingDenied (instancia, numero, barra, keydown)
|
||||
_detalhes:AddTooltipBackgroundStatusbar()
|
||||
|
||||
end
|
||||
|
||||
|
||||
--healers denied
|
||||
|
||||
_detalhes:AddTooltipSpellHeaderText ("Healers", headerColor, #spellsSorted, [[Interface\TUTORIALFRAME\UI-TutorialFrame-LevelUp]], 0.10546875, 0.89453125, 0.05859375, 0.6796875)
|
||||
_detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha)
|
||||
|
||||
local healersSorted = {}
|
||||
for healerName, amount in _pairs (healersDenied) do
|
||||
tinsert (healersSorted, {healerName, amount})
|
||||
end
|
||||
table.sort (healersSorted, _detalhes.Sort2)
|
||||
|
||||
for i = 1, #healersSorted do
|
||||
local playerName, amountDenied = unpack (healersSorted [i])
|
||||
|
||||
GameCooltip:AddLine (playerName .. ": ", FormatTooltipNumber (_, amountDenied) .." (" .. _cstr ("%.1f", amountDenied / totalDenied * 100) .. "%)")
|
||||
_detalhes:AddTooltipBackgroundStatusbar()
|
||||
|
||||
local targetActor = container:PegarCombatente (nil, playerName) or instancia.showing [1]:PegarCombatente (nil, playerName)
|
||||
if (targetActor) then
|
||||
local classe = targetActor.classe
|
||||
if (not classe) then
|
||||
classe = "UNKNOW"
|
||||
end
|
||||
if (classe == "UNKNOW") then
|
||||
GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, nil, 14, 14, .25, .5, 0, 1)
|
||||
else
|
||||
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, _unpack (_detalhes.class_coords [classe]))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -2348,12 +2385,18 @@ end
|
||||
if (habilidade.heal_denied) then
|
||||
--> cria o container na shadow de ele não existir
|
||||
habilidade_shadow.heal_denied = habilidade_shadow.heal_denied or {}
|
||||
habilidade_shadow.heal_denied_healers = habilidade_shadow.heal_denied_healers or {}
|
||||
--> copia
|
||||
for spellID, amount in _pairs (habilidade.heal_denied) do
|
||||
if (not habilidade_shadow.heal_denied [spellID]) then
|
||||
habilidade_shadow.heal_denied [spellID] = 0
|
||||
end
|
||||
end
|
||||
for healerName, amount in _pairs (habilidade.heal_denied_healers) do
|
||||
if (not habilidade_shadow.heal_denied_healers [healerName]) then
|
||||
habilidade_shadow.heal_denied_healers [healerName] = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
@@ -2464,10 +2507,14 @@ end
|
||||
if (habilidade.heal_denied) then
|
||||
--> cria o container na shadow de ele não existir
|
||||
habilidade_shadow.heal_denied = habilidade_shadow.heal_denied or {}
|
||||
habilidade_shadow.heal_denied_healers = habilidade_shadow.heal_denied_healers or {}
|
||||
--> copia
|
||||
for spellID, amount in _pairs (habilidade.heal_denied) do
|
||||
habilidade_shadow.heal_denied [spellID] = (habilidade_shadow.heal_denied [spellID] or 0) + amount
|
||||
end
|
||||
for healerName, amount in _pairs (habilidade.heal_denied_healers) do
|
||||
habilidade_shadow.heal_denied_healers [healerName] = (habilidade_shadow.heal_denied_healers [healerName] or 0) + amount
|
||||
end
|
||||
end
|
||||
|
||||
--> soma todos os demais valores
|
||||
@@ -2570,10 +2617,14 @@ atributo_heal.__add = function (tabela1, tabela2)
|
||||
if (habilidade.heal_denied) then
|
||||
--> cria o container na shadow de ele não existir
|
||||
habilidade_tabela1.heal_denied = habilidade_tabela1.heal_denied or {}
|
||||
habilidade_tabela1.heal_denied_healers = habilidade_tabela1.heal_denied_healers or {}
|
||||
--> copia
|
||||
for spellID, amount in _pairs (habilidade.heal_denied) do
|
||||
habilidade_tabela1.heal_denied [spellID] = (habilidade_tabela1.heal_denied [spellID] or 0) + amount
|
||||
end
|
||||
for healerName, amount in _pairs (habilidade.heal_denied_healers) do
|
||||
habilidade_tabela1.heal_denied_healers [healerName] = (habilidade_tabela1.heal_denied_healers [healerName] or 0) + amount
|
||||
end
|
||||
end
|
||||
|
||||
--> soma os valores da habilidade
|
||||
@@ -2676,10 +2727,14 @@ atributo_heal.__sub = function (tabela1, tabela2)
|
||||
if (habilidade.heal_denied) then
|
||||
--> cria o container na shadow de ele não existir
|
||||
habilidade_tabela1.heal_denied = habilidade_tabela1.heal_denied or {}
|
||||
habilidade_tabela1.heal_denied_healers = habilidade_tabela1.heal_denied_healers or {}
|
||||
--> copia
|
||||
for spellID, amount in _pairs (habilidade.heal_denied) do
|
||||
habilidade_tabela1.heal_denied [spellID] = (habilidade_tabela1.heal_denied [spellID] or 0) - amount
|
||||
end
|
||||
for healerName, amount in _pairs (habilidade.heal_denied_healers) do
|
||||
habilidade_tabela1.heal_denied_healers [healerName] = (habilidade_tabela1.heal_denied_healers [healerName] or 0) - amount
|
||||
end
|
||||
end
|
||||
|
||||
--> soma os valores da habilidade
|
||||
|
||||
@@ -64,13 +64,16 @@
|
||||
self.counter = self.counter + 1
|
||||
self.totaldenied = self.totaldenied + amount
|
||||
|
||||
local healerName = critical
|
||||
|
||||
--create the denied table spells, on the fly
|
||||
if (not self.heal_denied) then
|
||||
self.heal_denied = {}
|
||||
self.heal_denied_healers = {}
|
||||
end
|
||||
|
||||
self.heal_denied [extraSpellID] = (self.heal_denied [extraSpellID] or 0) + amount
|
||||
|
||||
self.heal_denied_healers [healerName] = (self.heal_denied_healers [healerName] or 0) + amount
|
||||
else
|
||||
|
||||
self.total = self.total + amount
|
||||
|
||||
+73
-24
@@ -1063,7 +1063,7 @@
|
||||
end
|
||||
|
||||
--return spell:Add (alvo_serial, alvo_name, alvo_flags, cura_efetiva, who_name, absorbed, critical, overhealing)
|
||||
return spell_heal_func (spell, alvo_serial, alvo_name, alvo_flags, amountDenied, spellidHeal, token, critical, overhealing)
|
||||
return spell_heal_func (spell, alvo_serial, alvo_name, alvo_flags, amountDenied, spellidHeal, token, nameHealer, overhealing)
|
||||
|
||||
|
||||
--print ("|token:", token, "|time:", time, "|whoserial:", who_serial, "|whoname:", who_name, "|whoflags:", who_flags, "|alvoserial:", alvo_serial, "|alvoname:", alvo_name, "|alvoflags", alvo_flags, "|alvoflags2:", alvo_flags2, "|spellidAbsorb:", spellidAbsorb, "|spellnameABsorb", spellnameAbsorb, "|spellschoolAbsorb", spellschoolAbsorb, "|serialhealer:", serialHealer, "|nameHealer:", nameHealer, "|flagsHealer:", flagsHealer, "|flagsHealer2:", flags2Healer, "|spellidHeal:", spellidHeal, "|spellnameHeal:", spellnameHeal, "|typeHeal:", typeHeal, "|amountDenied:", amountDenied)
|
||||
@@ -2122,25 +2122,25 @@ ameHealer: Bombad
|
||||
|
||||
local PowerEnum = Enum and Enum.PowerType
|
||||
|
||||
SPELL_POWER_MANA = SPELL_POWER_MANA or (PowerEnum and PowerEnum.Mana) or 0
|
||||
SPELL_POWER_RAGE = SPELL_POWER_RAGE or (PowerEnum and PowerEnum.Rage) or 1
|
||||
SPELL_POWER_FOCUS = SPELL_POWER_FOCUS or (PowerEnum and PowerEnum.Focus) or 2
|
||||
SPELL_POWER_ENERGY = SPELL_POWER_ENERGY or (PowerEnum and PowerEnum.Energy) or 3
|
||||
SPELL_POWER_COMBO_POINTS =SPELL_POWER_COMBO_POINTS or (PowerEnum and PowerEnum.ComboPoints) or 4
|
||||
SPELL_POWER_RUNES = SPELL_POWER_RUNES or (PowerEnum and PowerEnum.Runes) or 5
|
||||
SPELL_POWER_RUNIC_POWER = SPELL_POWER_RUNIC_POWER or (PowerEnum and PowerEnum.RunicPower) or 6
|
||||
SPELL_POWER_SOUL_SHARDS = SPELL_POWER_SOUL_SHARDS or (PowerEnum and PowerEnum.SoulShards) or 7
|
||||
SPELL_POWER_LUNAR_POWER = SPELL_POWER_LUNAR_POWER or (PowerEnum and PowerEnum.LunarPower) or 8
|
||||
SPELL_POWER_HOLY_POWER = SPELL_POWER_HOLY_POWER or (PowerEnum and PowerEnum.HolyPower) or 9
|
||||
SPELL_POWER_ALTERNATE_POWER = SPELL_POWER_ALTERNATE_POWER or (PowerEnum and PowerEnum.Alternate) or 10
|
||||
SPELL_POWER_MAELSTROM = SPELL_POWER_MAELSTROM or (PowerEnum and PowerEnum.Maelstrom) or 11
|
||||
SPELL_POWER_CHI = SPELL_POWER_CHI or (PowerEnum and PowerEnum.Chi) or 12
|
||||
SPELL_POWER_INSANITY = SPELL_POWER_INSANITY or (PowerEnum and PowerEnum.Insanity) or 13
|
||||
SPELL_POWER_OBSOLETE = SPELL_POWER_OBSOLETE or (PowerEnum and PowerEnum.Obsolete) or 14
|
||||
SPELL_POWER_OBSOLETE2 = SPELL_POWER_OBSOLETE2 or (PowerEnum and PowerEnum.Obsolete2) or 15
|
||||
SPELL_POWER_ARCANE_CHARGES = SPELL_POWER_ARCANE_CHARGES or (PowerEnum and PowerEnum.ArcaneCharges) or 16
|
||||
SPELL_POWER_FURY = SPELL_POWER_FURY or (PowerEnum and PowerEnum.Fury) or 17
|
||||
SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 18
|
||||
local SPELL_POWER_MANA = SPELL_POWER_MANA or (PowerEnum and PowerEnum.Mana) or 0
|
||||
local SPELL_POWER_RAGE = SPELL_POWER_RAGE or (PowerEnum and PowerEnum.Rage) or 1
|
||||
local SPELL_POWER_FOCUS = SPELL_POWER_FOCUS or (PowerEnum and PowerEnum.Focus) or 2
|
||||
local SPELL_POWER_ENERGY = SPELL_POWER_ENERGY or (PowerEnum and PowerEnum.Energy) or 3
|
||||
local SPELL_POWER_COMBO_POINTS2 = SPELL_POWER_COMBO_POINTS or (PowerEnum and PowerEnum.ComboPoints) or 4
|
||||
local SPELL_POWER_RUNES = SPELL_POWER_RUNES or (PowerEnum and PowerEnum.Runes) or 5
|
||||
local SPELL_POWER_RUNIC_POWER = SPELL_POWER_RUNIC_POWER or (PowerEnum and PowerEnum.RunicPower) or 6
|
||||
local SPELL_POWER_SOUL_SHARDS = SPELL_POWER_SOUL_SHARDS or (PowerEnum and PowerEnum.SoulShards) or 7
|
||||
local SPELL_POWER_LUNAR_POWER = SPELL_POWER_LUNAR_POWER or (PowerEnum and PowerEnum.LunarPower) or 8
|
||||
local SPELL_POWER_HOLY_POWER = SPELL_POWER_HOLY_POWER or (PowerEnum and PowerEnum.HolyPower) or 9
|
||||
local SPELL_POWER_ALTERNATE_POWER = SPELL_POWER_ALTERNATE_POWER or (PowerEnum and PowerEnum.Alternate) or 10
|
||||
local SPELL_POWER_MAELSTROM = SPELL_POWER_MAELSTROM or (PowerEnum and PowerEnum.Maelstrom) or 11
|
||||
local SPELL_POWER_CHI = SPELL_POWER_CHI or (PowerEnum and PowerEnum.Chi) or 12
|
||||
local SPELL_POWER_INSANITY = SPELL_POWER_INSANITY or (PowerEnum and PowerEnum.Insanity) or 13
|
||||
local SPELL_POWER_OBSOLETE = SPELL_POWER_OBSOLETE or (PowerEnum and PowerEnum.Obsolete) or 14
|
||||
local SPELL_POWER_OBSOLETE2 = SPELL_POWER_OBSOLETE2 or (PowerEnum and PowerEnum.Obsolete2) or 15
|
||||
local SPELL_POWER_ARCANE_CHARGES = SPELL_POWER_ARCANE_CHARGES or (PowerEnum and PowerEnum.ArcaneCharges) or 16
|
||||
local SPELL_POWER_FURY = SPELL_POWER_FURY or (PowerEnum and PowerEnum.Fury) or 17
|
||||
local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 18
|
||||
|
||||
local energy_types = {
|
||||
[SPELL_POWER_MANA] = true,
|
||||
@@ -2155,7 +2155,7 @@ SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 18
|
||||
[SPELL_POWER_HOLY_POWER] = true, --paladins
|
||||
[SPELL_POWER_LUNAR_POWER] = true, --balance druids
|
||||
[SPELL_POWER_SOUL_SHARDS] = true, --warlock affliction
|
||||
[SPELL_POWER_COMBO_POINTS] = true, --combo points
|
||||
[SPELL_POWER_COMBO_POINTS2] = true, --combo points
|
||||
[SPELL_POWER_MAELSTROM] = true, --shamans
|
||||
[SPELL_POWER_PAIN] = true, --demonhunter tank
|
||||
[SPELL_POWER_RUNES] = true, --dk
|
||||
@@ -2164,7 +2164,7 @@ SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 18
|
||||
}
|
||||
|
||||
local resource_power_type = {
|
||||
[SPELL_POWER_COMBO_POINTS] = SPELL_POWER_ENERGY, --combo points
|
||||
[SPELL_POWER_COMBO_POINTS2] = SPELL_POWER_ENERGY, --combo points
|
||||
[SPELL_POWER_SOUL_SHARDS] = SPELL_POWER_MANA, --warlock
|
||||
[SPELL_POWER_LUNAR_POWER] = SPELL_POWER_MANA, --druid
|
||||
[SPELL_POWER_HOLY_POWER] = SPELL_POWER_MANA, --paladin
|
||||
@@ -2178,7 +2178,7 @@ SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 18
|
||||
}
|
||||
|
||||
_detalhes.resource_strings = {
|
||||
[SPELL_POWER_COMBO_POINTS] = "Combo Point",
|
||||
[SPELL_POWER_COMBO_POINTS2] = "Combo Point",
|
||||
[SPELL_POWER_SOUL_SHARDS] = "Soul Shard",
|
||||
[SPELL_POWER_LUNAR_POWER] = "Lunar Power",
|
||||
[SPELL_POWER_HOLY_POWER] = "Holy Power",
|
||||
@@ -2192,7 +2192,7 @@ SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 18
|
||||
}
|
||||
|
||||
_detalhes.resource_icons = {
|
||||
[SPELL_POWER_COMBO_POINTS] = {file = [[Interface\PLAYERFRAME\ClassOverlayComboPoints]], coords = {58/128, 74/128, 25/64, 39/64}},
|
||||
[SPELL_POWER_COMBO_POINTS2] = {file = [[Interface\PLAYERFRAME\ClassOverlayComboPoints]], coords = {58/128, 74/128, 25/64, 39/64}},
|
||||
[SPELL_POWER_SOUL_SHARDS] = {file = [[Interface\PLAYERFRAME\UI-WARLOCKSHARD]], coords = {3/64, 17/64, 2/128, 16/128}},
|
||||
[SPELL_POWER_LUNAR_POWER] = {file = [[Interface\PLAYERFRAME\DruidEclipse]], coords = {117/256, 140/256, 83/128, 115/128}},
|
||||
[SPELL_POWER_HOLY_POWER] = {file = [[Interface\PLAYERFRAME\PALADINPOWERTEXTURES]], coords = {75/256, 94/256, 87/128, 100/128}},
|
||||
@@ -2204,12 +2204,57 @@ SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 18
|
||||
[SPELL_POWER_ARCANE_CHARGES] = {file = [[Interface\PLAYERFRAME\MageArcaneCharges]], coords = {68/256, 90/256, 68/128, 91/128}},
|
||||
[SPELL_POWER_FURY] = {file = [[Interface\PLAYERFRAME\UI-PlayerFrame-Deathknight-Blood-On]], coords = {0, 1, 0, 1}},
|
||||
}
|
||||
|
||||
local AlternatePowerEnableFrame = CreateFrame ("frame")
|
||||
local AlternatePowerMonitorFrame = CreateFrame ("frame")
|
||||
|
||||
AlternatePowerEnableFrame:RegisterEvent ("UNIT_POWER_BAR_SHOW")
|
||||
AlternatePowerEnableFrame:RegisterEvent ("UNIT_POWER_BAR_HIDE")
|
||||
|
||||
AlternatePowerEnableFrame:SetScript ("OnEvent", function (self, event)
|
||||
if (event == "UNIT_POWER_BAR_SHOW") then
|
||||
AlternatePowerMonitorFrame:RegisterEvent ("UNIT_POWER")
|
||||
else
|
||||
AlternatePowerMonitorFrame:UnregisterEvent ("UNIT_POWER")
|
||||
end
|
||||
end)
|
||||
|
||||
AlternatePowerMonitorFrame:SetScript ("OnEvent", function (self, event, unitID, powerType)
|
||||
if (powerType == "ALTERNATE") then
|
||||
local actorName = _detalhes:GetCLName (unitID)
|
||||
if (actorName) then
|
||||
local power = _current_combat.alternate_power [actorName]
|
||||
if (not power) then
|
||||
power = _current_combat:CreateAlternatePowerTable (actorName)
|
||||
end
|
||||
local currentPower = UnitPower (unitID, 10)
|
||||
if (currentPower and currentPower > power.last) then
|
||||
local addPower = currentPower - power.last
|
||||
power.total = power.total + addPower
|
||||
|
||||
--> main actor
|
||||
local este_jogador = energy_cache [actorName]
|
||||
if (not este_jogador) then --> pode ser um desconhecido ou um pet
|
||||
este_jogador, meu_dono, actorName = _current_energy_container:PegarCombatente (UnitGUID (unitID), actorName, 0x514, true)
|
||||
energy_cache [actorName] = este_jogador
|
||||
end
|
||||
este_jogador.alternatepower = este_jogador.alternatepower + addPower
|
||||
|
||||
_current_energy_container.need_refresh = true
|
||||
end
|
||||
|
||||
power.last = currentPower or 0
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
function parser:energize (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spelltype, amount, powertype, p6, p7)
|
||||
|
||||
------------------------------------------------------------------------------------------------
|
||||
--> early checks and fixes
|
||||
|
||||
--print (who_name, alvo_name, spellid, spellname, spelltype, amount, powertype)
|
||||
|
||||
if (not who_name) then
|
||||
who_name = "[*] "..spellname
|
||||
elseif (not alvo_name) then
|
||||
@@ -2256,6 +2301,10 @@ SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 18
|
||||
end
|
||||
end
|
||||
|
||||
if (not este_jogador.powertype) then
|
||||
este_jogador.powertype = powertype
|
||||
end
|
||||
|
||||
--> target
|
||||
local jogador_alvo, alvo_dono = energy_cache [alvo_name]
|
||||
if (not jogador_alvo) then
|
||||
|
||||
@@ -33,6 +33,7 @@ do
|
||||
--[[global]] DETAILS_SUBATTRIBUTE_REGENENERGY = 3
|
||||
--[[global]] DETAILS_SUBATTRIBUTE_REGENRUNE = 4
|
||||
--[[global]] DETAILS_SUBATTRIBUTE_RESOURCES = 5
|
||||
--[[global]] DETAILS_SUBATTRIBUTE_ALTERNATEPOWER = 6
|
||||
|
||||
--[[global]] DETAILS_ATTRIBUTE_MISC = 4
|
||||
|
||||
@@ -68,6 +69,7 @@ do
|
||||
"energy", --energy generated
|
||||
"energy", --runic power generated
|
||||
"energy", --resources
|
||||
"energy", --alternate power
|
||||
|
||||
"miscdata", --cc breaks
|
||||
"miscdata", --ress
|
||||
@@ -95,7 +97,7 @@ do
|
||||
|
||||
--[[ ENERGY ]]
|
||||
e_energy = 3,--> identifier
|
||||
[3] = 5, --> sub attributes
|
||||
[3] = 6, --> sub attributes
|
||||
|
||||
--[[ MISC ]]
|
||||
misc = 4, --> identifier
|
||||
@@ -189,12 +191,14 @@ do
|
||||
energy_ganha = 3, --id 3
|
||||
rune_ganha = 4, --id 6
|
||||
resources = 5, --
|
||||
alternatepower = 6, --
|
||||
lista = { --[[ String Names ]]
|
||||
Loc ["STRING_ATTRIBUTE_ENERGY_MANA"],
|
||||
Loc ["STRING_ATTRIBUTE_ENERGY_RAGE"],
|
||||
Loc ["STRING_ATTRIBUTE_ENERGY_ENERGY"],
|
||||
Loc ["STRING_ATTRIBUTE_ENERGY_RUNEPOWER"],
|
||||
Loc ["STRING_ATTRIBUTE_ENERGY_RESOURCES"],
|
||||
"Alternate Power (in testing)",
|
||||
},
|
||||
icones = {
|
||||
{"Interface\\AddOns\\Details\\images\\atributos_icones_energyze", {0, .125, 0, 1}},
|
||||
@@ -202,8 +206,9 @@ do
|
||||
{"Interface\\AddOns\\Details\\images\\atributos_icones_energyze", {.25, .375, 0, 1}},
|
||||
{"Interface\\AddOns\\Details\\images\\atributos_icones_energyze", {.375, .5, 0, 1}},
|
||||
{"Interface\\AddOns\\Details\\images\\atributos_icones_energyze", {.5, .625, 0, 1}},
|
||||
{"Interface\\AddOns\\Details\\images\\atributos_icones_energyze", {.625, .75, 0, 1}},
|
||||
},
|
||||
internal = {"mana", "e_rage", "e_energy", "runepower", "resource"}
|
||||
internal = {"mana", "e_rage", "e_energy", "runepower", "resource", "alternatepower"}
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
--errors ~pet
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
|
||||
local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
|
||||
@@ -2683,6 +2685,8 @@ function gump:CriaJanelaInfo()
|
||||
|
||||
table.sort (player_2_spells_sorted, _detalhes.Sort2)
|
||||
player_2_top = player_2_spells_sorted [1] [2]
|
||||
--se não existir uma magia no jogador e o jogador tiver um pet, ele não vai encontrar um valor em [1] e dar
|
||||
-- ~pet
|
||||
player_2_spell_info = {}
|
||||
for index, spelltable in _ipairs (player_2_spells_sorted) do
|
||||
player_2_spell_info [spelltable[1].id] = index
|
||||
@@ -3037,6 +3041,7 @@ function gump:CriaJanelaInfo()
|
||||
end
|
||||
end
|
||||
table.sort (player_1_skills, _detalhes.Sort2)
|
||||
-- ~pet
|
||||
local player_1_top = player_1_skills [1] [2]
|
||||
bar1 [2]:SetStatusBarColor (1, 1, 1, 1)
|
||||
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user