This commit is contained in:
tercio
2014-03-03 19:08:17 -03:00
parent e20807d95d
commit 67ddd10951
35 changed files with 749 additions and 89 deletions
+8 -1
View File
@@ -44,6 +44,13 @@ local function CreatePluginFrames (data)
local combat = select (1, ...)
--print (combat)
DmgRank:Start()
elseif (event == "PLUGIN_DISABLED") then
DmgRankFrame:SetScript ("OnUpdate", nil)
DmgRank:Cancel()
elseif (event == "PLUGIN_ENABLED") then
end
end
@@ -542,7 +549,7 @@ function DmgRank:OnEvent (_, event, ...)
local MINIMAL_DETAILS_VERSION_REQUIRED = 1
--> Install plugin inside details
local install = _G._detalhes:InstallPlugin ("SOLO", Loc ["STRING_PLUGIN_NAME"], "Interface\\Icons\\ACHIEVEMENT_GUILDPERK_HONORABLEMENTION_RANK2", DmgRank, "DETAILS_PLUGIN_DAMAGE_RANK", MINIMAL_DETAILS_VERSION_REQUIRED)
local install, saveddata = _G._detalhes:InstallPlugin ("SOLO", Loc ["STRING_PLUGIN_NAME"], "Interface\\Icons\\ACHIEVEMENT_GUILDPERK_HONORABLEMENTION_RANK2", DmgRank, "DETAILS_PLUGIN_DAMAGE_RANK", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", "v1.09")
if (type (install) == "table" and install.error) then
print (install.error)
end
@@ -123,6 +123,14 @@ local function CreatePluginFrames (data)
end
EncounterDetails:HideIcon()
EncounterDetails:CloseWindow()
elseif (event == "PLUGIN_DISABLED") then
EncounterDetails:HideIcon()
EncounterDetails:CloseWindow()
elseif (event == "PLUGIN_ENABLED") then
--EncounterDetails:ShowIcon()
end
end
@@ -182,7 +190,7 @@ local function CreatePluginFrames (data)
EncounterDetails.ToolbarButton = _detalhes.ToolBar:NewPluginToolbarButton (EncounterDetails.OpenWindow, "Interface\\Scenarios\\ScenarioIcon-Boss", Loc ["STRING_TOOLTIP"], 12, 12, "ENCOUNTERDETAILS_BUTTON") --"Interface\\COMMON\\help-i"
--> setpoint anchors mod if needed
EncounterDetails.ToolbarButton.y = 0.5
EncounterDetails.ToolbarButton.x = 5
EncounterDetails.ToolbarButton.x = 0
--> build all frames ans widgets
_detalhes.EncounterDetailsTempWindow (EncounterDetails)
@@ -1318,7 +1326,7 @@ function EncounterDetails:OnEvent (_, event, ...)
local MINIMAL_DETAILS_VERSION_REQUIRED = 1
--> Install
local install = _G._detalhes:InstallPlugin ("TOOLBAR", Loc ["STRING_PLUGIN_NAME"], "placeholder string", EncounterDetails, "DETAILS_PLUGIN_ENCOUNTER_DETAILS", MINIMAL_DETAILS_VERSION_REQUIRED)
local install, saveddata = _G._detalhes:InstallPlugin ("TOOLBAR", Loc ["STRING_PLUGIN_NAME"], "Interface\\Scenarios\\ScenarioIcon-Boss", EncounterDetails, "DETAILS_PLUGIN_ENCOUNTER_DETAILS", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", "v1.05")
if (type (install) == "table" and install.error) then
print (install.error)
end
@@ -282,7 +282,6 @@ Message: ..\AddOns\Details_EncounterDetails\frames.lua line 156:
if (g.max_damage > 0) then
local normalizePercent = g.max_damage / dps_max
print ("Normalizing: " .. normalizePercent)
for dataIndex, Data in ipairs (g.Data) do
local Points = Data.Points
for i = 1, #Points do
@@ -75,7 +75,13 @@
local BuildReportPanel = function()
function ErrorReport:OnDetailsEvent (event, ...)
return
if (event == "PLUGIN_DISABLED") then
ErrorReport:HideToolbarIcon (ErrorReport.ToolbarButton)
elseif (event == "PLUGIN_ENABLED") then
ErrorReport:ShowToolbarIcon (ErrorReport.ToolbarButton)
end
end
--> catch Details! main object
@@ -90,7 +96,7 @@
ErrorReport.ToolbarButton = _detalhes.ToolBar:NewPluginToolbarButton (ErrorReport.OpenWindow, "Interface\\HELPFRAME\\HelpIcon-Bug", Loc ["STRING_TOOLTIP"], 20, 20, "DETAILS_ERRORREPORT_BUTTON")
--> setpoint anchors mod if needed
ErrorReport.ToolbarButton.y = 0
ErrorReport.ToolbarButton.x = 1
ErrorReport.ToolbarButton.x = 0
ErrorReport:ShowToolbarIcon (ErrorReport.ToolbarButton)
@@ -232,7 +238,7 @@
BuildReportPanel (data)
--> Install
local install = _G._detalhes:InstallPlugin ("TOOLBAR", Loc ["STRING_PLUGIN_NAME"], "placeholder string", ErrorReport, "DETAILS_PLUGIN_REPORT_ERRORS")
local install, saveddata = _G._detalhes:InstallPlugin ("TOOLBAR", Loc ["STRING_PLUGIN_NAME"], "Interface\\HELPFRAME\\HelpIcon-Bug", ErrorReport, "DETAILS_PLUGIN_REPORT_ERRORS", 1, "Details! Team", "v1.03")
if (type (install) == "table" and install.error) then
print (install.error)
end
@@ -93,6 +93,10 @@ local function CreatePluginFrames (data)
--> trigger when a buff is applyed on player
SpellDetails:RefreshBuffs()
elseif (event == "PLUGIN_DISABLED") then
elseif (event == "PLUGIN_ENABLED") then
end
end
@@ -1272,7 +1276,7 @@ function SpellDetails:OnEvent (_, event, ...)
local MINIMAL_DETAILS_VERSION_REQUIRED = 1
--> Install plugin inside details
local install = _G._detalhes:InstallPlugin ("SOLO", Loc ["PLUGIN_NAME"], "Interface\\Icons\\INV_Fabric_Spellweave", SpellDetails, "DETAILS_PLUGIN_SPELL_DETAILS", MINIMAL_DETAILS_VERSION_REQUIRED)
local install = _G._detalhes:InstallPlugin ("SOLO", Loc ["PLUGIN_NAME"], "Interface\\Icons\\INV_Fabric_Spellweave", SpellDetails, "DETAILS_PLUGIN_SPELL_DETAILS", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", "v1.08")
if (type (install) == "table" and install.error) then
print (install.error)
end
@@ -41,6 +41,10 @@ local function CreatePluginFrames (data)
elseif (event == "COMBAT_PLAYER_ENTER") then --> combat started
TimeAttack:ScheduleTimer ("TimeAttackPluginStart", 2)
elseif (event == "PLUGIN_DISABLED") then
elseif (event == "PLUGIN_ENABLED") then
end
end
@@ -672,7 +676,7 @@ function TimeAttack:OnEvent (_, event, ...)
local MINIMAL_DETAILS_VERSION_REQUIRED = 1
--> Install
local install = _G._detalhes:InstallPlugin ("SOLO", Loc ["STRING_PLUGIN_NAME"], "Interface\\Icons\\SPELL_HOLY_BORROWEDTIME", TimeAttack, "DETAILS_PLUGIN_TIME_ATTACK", MINIMAL_DETAILS_VERSION_REQUIRED)
local install = _G._detalhes:InstallPlugin ("SOLO", Loc ["STRING_PLUGIN_NAME"], "Interface\\Icons\\SPELL_HOLY_BORROWEDTIME", TimeAttack, "DETAILS_PLUGIN_TIME_ATTACK", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", "v1.04")
if (type (install) == "table" and install.error) then
print (install.errortext)
return
@@ -113,6 +113,10 @@ local function CreatePluginFrames (data)
elseif (event == "DETAILS_INSTANCE_ENDSTRETCH") then
ThreatMeterFrame:SetFrameStrata ("MEDIUM")
elseif (event == "PLUGIN_DISABLED") then
elseif (event == "PLUGIN_ENABLED") then
end
end
@@ -364,7 +368,7 @@ function ThreatMeter:OnEvent (_, event, ...)
local MINIMAL_DETAILS_VERSION_REQUIRED = 1
--> Install
local install = _G._detalhes:InstallPlugin ("TANK", Loc ["STRING_PLUGIN_NAME"], "Interface\\Icons\\Ability_Paladin_ShieldofVengeance", ThreatMeter, "DETAILS_PLUGIN_TINY_THREAT", MINIMAL_DETAILS_VERSION_REQUIRED)
local install = _G._detalhes:InstallPlugin ("TANK", Loc ["STRING_PLUGIN_NAME"], "Interface\\Icons\\Ability_Paladin_ShieldofVengeance", ThreatMeter, "DETAILS_PLUGIN_TINY_THREAT", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", "v1.02")
if (type (install) == "table" and install.error) then
print (install.error)
end
@@ -139,6 +139,10 @@ local function CreatePluginFrames (data)
Vanguard.TankFrames [i].Life (100)
end
elseif (event == "PLUGIN_DISABLED") then
elseif (event == "PLUGIN_ENABLED") then
end
end
@@ -1210,7 +1214,7 @@ function Vanguard:OnEvent (_, event, ...)
local MINIMAL_DETAILS_VERSION_REQUIRED = 1
--> Install
local install = _G._detalhes:InstallPlugin ("TANK", Loc ["STRING_PLUGIN_NAME"], "Interface\\Icons\\INV_Shield_77", Vanguard, "DETAILS_PLUGIN_VANGUARD", MINIMAL_DETAILS_VERSION_REQUIRED)
local install = _G._detalhes:InstallPlugin ("TANK", Loc ["STRING_PLUGIN_NAME"], "Interface\\Icons\\INV_Shield_77", Vanguard, "DETAILS_PLUGIN_VANGUARD", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", "v1.06")
if (type (install) == "table" and install.error) then
print (install.error)
end
@@ -38,6 +38,13 @@ local function CreatePluginFrames()
table.wipe (YouAreNotPrepared.deaths_table)
YouAreNotPrepared:Clear()
elseif (event == "PLUGIN_DISABLED") then
table.wipe (YouAreNotPrepared.deaths_table)
YouAreNotPrepared:Clear()
YouAreNotPreparedFrame:Hide()
elseif (event == "PLUGIN_ENABLED") then
end
end
@@ -364,6 +371,12 @@ end
function YouAreNotPrepared:OnDeath (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, death_table, last_cooldown, time_of_death, max_health)
--> hooks run inside parser and do not check if the plugin is enabled or not.
--> we need to check this here before continue.
if (not YouAreNotPrepared.__enabled) then
return
end
if (alvo_name == YouAreNotPrepared.playername) then
--[[ debug mode
@@ -400,7 +413,7 @@ function YouAreNotPrepared:OnEvent (_, event, ...)
local MINIMAL_DETAILS_VERSION_REQUIRED = 12
--> install
local install = _G._detalhes:InstallPlugin ("TOOLBAR", Loc ["STRING_PLUGIN_NAME"], "placeholder string", YouAreNotPrepared, "DETAILS_PLUGIN_YANP", MINIMAL_DETAILS_VERSION_REQUIRED)
local install = _G._detalhes:InstallPlugin ("TOOLBAR", Loc ["STRING_PLUGIN_NAME"], [[Interface\ICONS\Achievement_Boss_Illidan]], YouAreNotPrepared, "DETAILS_PLUGIN_YANP", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", "v1.01")
if (type (install) == "table" and install.error) then
print (install.error)
end
+1 -1
View File
@@ -4,6 +4,6 @@ if (not Loc) then
return
end
Loc ["STRING_PLUGIN_NAME"] = "You Are Not Prepared (plugin for Details!)"
Loc ["STRING_PLUGIN_NAME"] = "You Are Not Prepared"
Loc ["STRING_PLUGIN_ALERT"] = "|cFFFFFF00YANP|r: click to see the death log "
+1 -1
View File
@@ -4,5 +4,5 @@ if (not Loc) then
return
end
Loc ["STRING_PLUGIN_NAME"] = "You Are Not Prepared (plugin for Details!)"
Loc ["STRING_PLUGIN_NAME"] = "You Are Not Prepared"
Loc ["STRING_PLUGIN_ALERT"] = "YANP: clique para ver o registro da morte"