Small bug fixes and improvements

This commit is contained in:
Tercio Jose
2022-10-10 13:26:13 -03:00
parent b588d5e30c
commit 1ed29008aa
119 changed files with 6556 additions and 6650 deletions
+18 -18
View File
@@ -15,14 +15,14 @@
local _table_insert = table.insert --lua local
local _table_size = table.getn --lua local
local _setmetatable = setmetatable --lua local
local _ipairs = ipairs --lua local
local ipairs = ipairs --lua local
local _pairs = pairs --lua local
local _rawget= rawget --lua local
local _math_min = math.min --lua local
local _math_max = math.max --lua local
local _bit_band = bit.band --lua local
local _unpack = unpack --lua local
local _type = type --lua local
local type = type --lua local
local _GetSpellInfo = _detalhes.getspellinfo -- api local
local _IsInRaid = IsInRaid -- api local
@@ -52,7 +52,7 @@
local target_func = function(main_table)
local i = 1
for name, amount in _pairs (main_table) do
for name, amount in _pairs(main_table) do
local t = temp_table [i]
if (not t) then
t = {"", 0}
@@ -68,7 +68,7 @@
local spells_used_func = function(main_table, target)
local i = 1
for spellid, spell_table in _pairs (main_table) do
for spellid, spell_table in _pairs(main_table) do
local target_amount = spell_table.targets [target]
if (target_amount) then
local t = temp_table [i]
@@ -111,14 +111,14 @@
local this_actor = combat (2, targetname)
if (this_actor) then
for name, _ in _pairs (this_actor.healing_from) do
for name, _ in _pairs(this_actor.healing_from) do
local healer = combat (2, name)
if (healer) then
local spell = healer.spells._ActorTable [spellid]
if (spell) then
local on_me = spell.targets [targetname]
if (on_me) then
GameCooltip:AddLine (healer.nome, FormatTooltipNumber (_, on_me))
GameCooltip:AddLine(healer.nome, FormatTooltipNumber (_, on_me))
end
end
end
@@ -128,12 +128,12 @@
return
else
local name, _, icon = _GetSpellInfo(spellid)
GameCooltip:AddLine (name)
GameCooltip:AddLine(name)
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
GameCooltip:AddLine (Loc ["STRING_HEAL"] .. ": ", spell.total)
GameCooltip:AddLine (Loc ["STRING_HITS"] .. ": ", spell.counter)
GameCooltip:AddLine (Loc ["STRING_CRITICAL_HITS"] .. ": ", spell.c_amt)
GameCooltip:AddLine(Loc ["STRING_HEAL"] .. ": ", spell.total)
GameCooltip:AddLine(Loc ["STRING_HITS"] .. ": ", spell.counter)
GameCooltip:AddLine(Loc ["STRING_CRITICAL_HITS"] .. ": ", spell.c_amt)
end
elseif (target) then
@@ -147,7 +147,7 @@
break
end
GameCooltip:AddLine (t[1], FormatTooltipNumber (_, t[2]))
GameCooltip:AddLine(t[1], FormatTooltipNumber (_, t[2]))
_detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon ([[Interface\FriendsFrame\StatusIcon-Offline]], 1, 1, 14, 14)
end
@@ -165,14 +165,14 @@
end
if (roster [t[1]]) then
GameCooltip:AddLine (t[1], FormatTooltipNumber (_, t[2]))
GameCooltip:AddLine(t[1], FormatTooltipNumber (_, t[2]))
end
end
elseif (target == "[player]") then
local target_amount = actor.targets [_detalhes.playername]
if (target_amount) then
GameCooltip:AddLine (targetactor.nome, FormatTooltipNumber (_, target_amount))
GameCooltip:AddLine(targetactor.nome, FormatTooltipNumber (_, target_amount))
end
else
@@ -187,7 +187,7 @@
end
local name, _, icon = _GetSpellInfo(t[1])
GameCooltip:AddLine (name, FormatTooltipNumber (_, t[2]))
GameCooltip:AddLine(name, FormatTooltipNumber (_, t[2]))
GameCooltip:AddIcon (icon, 1, 1, 14, 14)
end
end
@@ -208,7 +208,7 @@
if (spell) then
if (target) then
if (target == "[all]") then
for target_name, amount in _pairs (spell.targets) do
for target_name, amount in _pairs(spell.targets) do
--add amount
--we need to pass a object here in order to get name and class, so we just get the main heal actor from the combat
@@ -225,7 +225,7 @@
elseif (target == "[raid]") then
local roster = combat.raid_roster
for target_name, amount in _pairs (spell.targets) do
for target_name, amount in _pairs(spell.targets) do
if (roster [target_name]) then
--add amount
instance_container:AddValue (combat (1, target_name), amount, true)
@@ -278,14 +278,14 @@
if (target == "[all]") then
local total = 0
for target_name, amount in _pairs (actor.targets) do
for target_name, amount in _pairs(actor.targets) do
total = total + amount
end
return total
elseif (target == "[raid]") then
local total = 0
for target_name, amount in _pairs (actor.targets) do
for target_name, amount in _pairs(actor.targets) do
if (combat.raid_roster [target_name]) then
total = total + amount
end