- Revamp on Death report.

- Data send to broker now is correctly formated.
- Modified the percentage method used on Comparison Panel.
- Added options panel for Encounter Details.

- New API: _detalhes:GetCurrentCombat() returns the current combat object
- New API: _detalhes:GetCombatSegments() returns a numeric table with all stored combats.
- New API: _detalhes:GetZoneType() returns the type from GetInstanceInfo().
- New API: _detalhes:InGroup()return true if Details! is considering the player inside a group.
- New API: _detalhes:GetOnlyName (string) return self.nome or string without realm name.

- New Event: ZONE_TYPE_CHANGED, it's triggered when the player change the zoze type.
- New Event: GROUP_ONENTER GROUP_ONLEAVE, trigger when the player left or enter in a group.
This commit is contained in:
tercio
2014-07-17 17:57:32 -03:00
parent 436e86b669
commit e406fe464b
18 changed files with 1949 additions and 1191 deletions
+24 -1
View File
@@ -18,8 +18,26 @@
function _detalhes:GetPluginSavedTable (PluginAbsoluteName)
return _detalhes.plugin_database [PluginAbsoluteName]
end
function _detalhes:CheckDefaultTable (current, default)
for key, value in pairs (default) do
if (type (value) == "table") then
if (type (current [key]) ~= "table") then
current [key] = table_deepcopy (value)
else
_detalhes:CheckDefaultTable (current [key], value)
end
else
if (current [key] == nil) then
current [key] = value
elseif (type (current [key]) ~= type (value)) then
current [key] = value
end
end
end
end
function _detalhes:InstallPlugin (PluginType, PluginName, PluginIcon, PluginObject, PluginAbsoluteName, MinVersion, Author, Version)
function _detalhes:InstallPlugin (PluginType, PluginName, PluginIcon, PluginObject, PluginAbsoluteName, MinVersion, Author, Version, DefaultSavedTable)
if (MinVersion and MinVersion > _detalhes.realversion) then
print (PluginName, Loc ["STRING_TOOOLD"])
@@ -60,11 +78,16 @@
if (PluginType ~= "STATUSBAR") then
saved_table = _detalhes.plugin_database [PluginAbsoluteName]
if (not saved_table) then
saved_table = {enabled = true, author = Author or "--------"}
_detalhes.plugin_database [PluginAbsoluteName] = saved_table
end
if (DefaultSavedTable) then
_detalhes:CheckDefaultTable (saved_table, DefaultSavedTable)
end
PluginObject.__enabled = saved_table.enabled
end