- Changed thw way to set the broker text.

- Fixed a problem while reporting a custom display.

- New API: _detalhes:GetOpenedWindowsAmount()
This commit is contained in:
tercio
2014-09-18 13:57:28 -03:00
parent eafaab068d
commit 5adf84da6b
10 changed files with 1564 additions and 1196 deletions
+8 -8
View File
@@ -179,25 +179,25 @@
local total_script = _detalhes.custom_function_cache [instance.customName .. "Total"]
for index, actor in _ipairs (instance_container._ActorTable) do
local percent, total
local percent, ptotal
if (percent_script) then
percent = percent_script (actor.value, top, total, combat, instance)
percent = percent_script (_math_floor (actor.value), top, total, combat, instance)
else
percent = _cstr ("%.1f", self.value / total * 100)
percent = _cstr ("%.1f", _math_floor (actor.value) / total * 100)
end
if (total_script) then
local value = total_script (actor.value, top, total, combat, instance)
local value = total_script (_math_floor (actor.value), top, total, combat, instance)
if (type (value) == "number") then
total = SelectedToKFunction (_, value)
ptotal = SelectedToKFunction (_, value)
else
total = value
ptotal = value
end
else
total = SelectedToKFunction (_, self.value)
ptotal = SelectedToKFunction (_, _math_floor (actor.value))
end
actor.report_value = total .. " (" .. percent .. "%)"
actor.report_value = ptotal .. " (" .. percent .. "%)"
end
end
+10
View File
@@ -231,6 +231,16 @@ function _detalhes:GetFreeInstancesAmount()
return _detalhes.instances_amount - #_detalhes.tabela_instancias
end
function _detalhes:GetOpenedWindowsAmount()
local amount = 0
for _, instance in _detalhes:ListInstances() do
if (instance:IsEnabled()) then
amount = amount + 1
end
end
return amount
end
function _detalhes:GetNumRows()
return self.rows_fit_in_window
end