- 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:
+1
-1
@@ -80,7 +80,7 @@
|
||||
if (lower_instance) then
|
||||
lower_instance = _detalhes:GetInstance (lower_instance)
|
||||
if (lower_instance) then
|
||||
lower_instance:InstanceAlert ("Update Available!", {[[Interface\GossipFrame\AvailableQuestIcon]], 16, 16, false}, 60, {_detalhes.OpenUpdateWindow})
|
||||
lower_instance:InstanceAlert ("Update Available!", {[[Interface\GossipFrame\AvailableQuestIcon]], 16, 16, false}, 360, {_detalhes.OpenUpdateWindow})
|
||||
end
|
||||
end
|
||||
_detalhes.lastUpdateWarning = time()
|
||||
|
||||
+13
-1
@@ -2510,12 +2510,19 @@
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- PARSER
|
||||
--serach key: ~parser ~event ~start ~inicio
|
||||
function _detalhes:GetZoneType()
|
||||
return _detalhes.zone_type
|
||||
end
|
||||
function _detalhes.parser_functions:ZONE_CHANGED_NEW_AREA (...)
|
||||
local zoneName, zoneType, _, _, _, _, _, zoneMapID = _GetInstanceInfo()
|
||||
|
||||
if (_detalhes.last_zone_type ~= zoneType) then
|
||||
_detalhes:SendEvent ("ZONE_TYPE_CHANGED", nil, zoneType)
|
||||
_detalhes.last_zone_type = zoneType
|
||||
end
|
||||
|
||||
_detalhes.zone_type = zoneType
|
||||
_detalhes.zone_id = zoneMapID
|
||||
_detalhes.zone_name = zoneName
|
||||
@@ -2744,6 +2751,9 @@
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:InGroup()
|
||||
return _detalhes.in_group
|
||||
end
|
||||
function _detalhes.parser_functions:GROUP_ROSTER_UPDATE (...)
|
||||
if (not _detalhes.in_group) then
|
||||
_detalhes.in_group = IsInGroup() or IsInRaid()
|
||||
@@ -2755,6 +2765,7 @@
|
||||
_detalhes:InstanceCall (_detalhes.SetCombatAlpha, nil, nil, true)
|
||||
_detalhes:CheckSwitchOnLogon()
|
||||
_detalhes:CheckVersion()
|
||||
_detalhes:SendEvent ("GROUP_ONENTER")
|
||||
end
|
||||
else
|
||||
_detalhes.in_group = IsInGroup() or IsInRaid()
|
||||
@@ -2766,6 +2777,7 @@
|
||||
_table_wipe (_detalhes.details_users)
|
||||
_detalhes:InstanceCall (_detalhes.SetCombatAlpha, nil, nil, true)
|
||||
_detalhes:CheckSwitchOnLogon()
|
||||
_detalhes:SendEvent ("GROUP_ONLEAVE")
|
||||
else
|
||||
_detalhes:SchedulePetUpdate (2)
|
||||
end
|
||||
|
||||
+24
-1
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user