diff --git a/.pkgmeta b/.pkgmeta index 89a38ebb..84f3d452 100644 --- a/.pkgmeta +++ b/.pkgmeta @@ -6,7 +6,6 @@ move-folders: Details/plugins/Details_TimeAttack: Details_TimeAttack Details/plugins/Details_TinyThreat: Details_TinyThreat Details/plugins/Details_Vanguard: Details_Vanguard - Details/plugins/Details_YouAreNotPrepared: Details_YouAreNotPrepared Details/plugins/Details_RaidInfo-BlackrockFoundry: Details_RaidInfo-BlackrockFoundry Details/plugins/Details_RaidInfo-Highmaul: Details_RaidInfo-Highmaul Details/plugins/Details_DataStorage: Details_DataStorage diff --git a/boot.lua b/boot.lua index ff5eb346..d793d265 100644 --- a/boot.lua +++ b/boot.lua @@ -3,8 +3,8 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.build_counter = 783 --it's 783 for release - _detalhes.userversion = "v3.13.0" + _detalhes.build_counter = 831 --it's 831 for release + _detalhes.userversion = "v3.13.1" _detalhes.realversion = 67 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" Details = _detalhes @@ -33,7 +33,7 @@ do -- |cFFFFFF00v3.13.0 (|cFFFFCC00April 25, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added casted amount for healing and damage spells. The result is shown on Player Detail Window.\n\n|cFFFFFF00-|r Added uptime amount for healing spells on Player Detail Window.\n\n|cFFFFFF00-|r Added an option to disable lock/resize/ungroup buttons. It's under miscellaneous bracket on Options Panel.\n\n|cFFFFFF00-|r Wallpaper for menus on title bar got a customization option under tooltips bracket on Options Panel.\n\n|cFFFFFF00-|r Updated spell list for Crowd Control and class detection.\n\n|cFFFFFF00-|r Improved Weakaura creation tool under Encounter Details Plugin.\n\n - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.13.0 (|cFFFFCC00April 25, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added casted amount for healing and damage spells. The result is shown on Player Detail Window.\n\n|cFFFFFF00-|r Added uptime amount for healing spells on Player Detail Window.\n\n|cFFFFFF00-|r Added an option to disable lock/resize/ungroup buttons. It's under miscellaneous bracket on Options Panel.\n\n|cFFFFFF00-|r Wallpaper for menus on title bar got a customization option under tooltips bracket on Options Panel.\n\n|cFFFFFF00-|r Updated spell list for Crowd Control and class detection.\n\n|cFFFFFF00-|r Improved Weakaura creation tool under Encounter Details Plugin.\n\n|cFFFFFF00v3.12.10 (|cFFFFCC00April 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added the spell uptime on damage player detail window.\n\n|cFFFFFF00-|r Added Rune Tap as cooldown.\n\n|cFFFFFF00-|r Report lines for deaths is now inverted. No need to scroll up the chat to see the cause of death anymore.\n\n|cFFFFFF00-|r Fixed some annoyances with auto current feature where it was changing the segments even when the user were using the window.\n\n|cFFFFFF00v3.12.7 (|cFFFFCC00April 09, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added slash command /details profile .\n\n|cFFFFFF00v3.12.6 (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): added a report button on Emotes tab.\n\n|cFFFFFF00-|r Encounter Details (plugin): improved Weakauras creation.\n\n|cFFFFFF00-|r Encounter Details (plugin): fixed the report text for interrupts and dispells.\n\n|cFFFFFF00-|r Crowd control by Pets now is merged with its owner.\n\n|cFFFFFF00-|r Truncated left text on bars now shows the entire text when hover over the bar.\n\n|cFFFFFF00-|r Added an extra option on minimap menu to disable the minimap icon.\n\n|cFFFFFF00-|r Fixed a problem when disabling the minimap icon through options panel.\n\n|cFFFFFF00-|r Fixed an issue with item level tracker feature.\n\n|cFFFFFF00v3.12.2 (|cFFFFCC00Mar 30, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Raid Check (plugin): added item level.\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): bug fixes, it's important to update it.\n\n|cFFFFFF00-|r Time Line (plugin): bug fixes.\n\n|cFFFFFF00-|r Added option to disabled th eitem level tracker.\n\n|cFFFFFF00-|r Added item level on Raid Check plugin panel.\n\n|cFFFFFF00-|r Added Spirit Link Totem damage and healing on death log.\n\n|cFFFFFF00-|r Added the total of life exchanged by the Spirit Link Totem on player detail window.\n\n|cFFFFFF00-|r Added more spells for crowd control.\n\n|cFFFFFF00-|r Added scroll on bookmark panel.\n\n|cFFFFFF00-|r Fixed issue with Dps/Hps data broker which wasn't respecting the type of time (effective/activity) selected.\n\n|cFFFFFF00-|r Fixed few bugs when using the key bind to toggle windows.\n\n|cFFFFFF00v3.11.5 (|cFFFFCC00Mar 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with overall data where max/min amount for spells was being calculated wrong.\n\n|cFFFFFF00-|r Fixed a problem while reporting enemy damage taken.\n\n|cFFFFFF00-|r Fixed an issue with damage taken by spell where some spells wasn't shown.\n\n|cFFFFFF00-|r Few improvements on tooltips.\n\n|cFFFFFF00-|r Fixed a accuracy problem with shaman's spirit link toten where its life exchange was considered healing done.\n\n|cFFFFFF00-|r Boss segments now need to have at least 30 seconds to be added on the overall data.\n\n|cFFFFFF00-|r When the segment limit is reach, segments with less combat time will be erased instead of the olders.\n\n|cFFFFFF00-|r Added item level tracker.\n\n|cFFFFFF00-|r Fixed window positioning when changing from Solo mode to Group mode.\n\n|cFFFFFF00-|r Added an option for change the amount of lines on death log.\n\n|cFFFFFF00-|r Added custom display for CC done.\n\n|cFFFFFF00v3.10.10 (|cFFFFCC00Mar 10, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): done a calibration on endurance calculation.\n\n|cFFFFFF00-|r Raid Check (plugin): now also show information for 50+ stats runes.\n\n|cFFFFFF00-|r Fixed cooldowns spell targets on overall data.\n\n|cFFFFFF00-|r Fixed report custom displays where sometimes it didn't report spell links.\n\n|cFFFFFF00-|r Replaced old report line saying 'for the last X segments' with 'overall data'.\n\n|cFFFFFF00-|r Mini-displays on statusbar are now more responsible to right button click.\n\n|cFFFFFF00-|r Added Mage's Greater Invisibility as cooldown.\n\n|cFFFFFF00v3.10.8 (|cFFFFCC00Mar 02, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Improved aura creation.\n\n|cFFFFFF00-|r Custom display 'My Spells' now also show your pets.\n\n|cFFFFFF00-|r Fixed 'Raid Check' plugin food detection.\n\n|cFFFFFF00v3.10.6 (|cFFFFCC00Feb 24, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): several bug fixes and improvements.\n\n|cFFFFFF00-|r Encounter Details (plugin): added new tab showing enemy spells from the encounter with an aura creation panel.\n\n|cFFFFFF00-|r Encounter Details (plugin): added phase indicators on graphic tab, hovering over shows the damage and heal for that specific phase.\n\n|cFFFFFF00-|r Segments menu now also show the encounter try number plus the elapsed combat time.\n\n|cFFFFFF00-|r Several improvements on Overall Data, also, now it has an option to not save it when the character logoff.\n\n|cFFFFFF00-|r Player Details window now closes with right click on any bar.\n\n|cFFFFFF00-|r Fixed Nature's Vigil cooldown.\n\n|cFFFFFF00v3.9.12a (|cFFFFCC00Feb 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Roll back on combat detection after reset data, might be causing problems.\n\n|cFFFFFF00v3.9.12 (|cFFFFCC00Feb 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): got report buttons for Endurance and Deaths Overall Damage.\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): the Deaths and Endurance limits can now be changed under the plugin options.\n\n|cFFFFFF00-|r Chart Viewer (plugin): has been revamped and now it's less complicated to use.\n\n|cFFFFFF00-|r Time Line (plugin): added options to change the background color and scale.\n\n|cFFFFFF00-|r Raid Check (plugin): its window is now 'always on top'.\n\n|cFFFFFF00-|r Accuracy adjustments on overheal of Divine Aegis and Illuminated Healing.\n\n|cFFFFFF00-|r Removed healthstone from cooldown list, added Nature's Vigil.\n\n|cFFFFFF00-|r Enemies display now shows damage taken instead of damage done.\n\n|cFFFFFF00-|r Tooltip for enemies display now also show damage and healing done by the enemy.\n\n|cFFFFFF00-|r Added an option under miscellaneous to show neutral and hostile creatures on damage taken display.\n\n|cFFFFFF00-|r Added an option to ignore nicknames and always use character names.\n\n|cFFFFFF00-|r Enabling the display icon on title bar now makes the title text automatically move slightly to right.\n\n|cFFFFFF00-|r Fixed issue with skin changing when the window has the statusbar enabled.\n\n|cFFFFFF00v3.9.4 (|cFFFFCC00Feb 03, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added option 'Ignore Mass Toggle', when enabled the window won't be affected when hiding, showing or toggling all windows.\n\n|cFFFFFF00-|r Added window number for slash commands 'hide', 'show' and 'toggle'. Usage: '/details hide 1' to hide window 1.\n\n|cFFFFFF00-|r Removed keybinds for Open and Close, added toggle instead.\n\n|cFFFFFF00-|r Added slash command 'toggle'.\n\n|cFFFFFF00-|r Added display icons for all skins which still didn't have they.\n\n|cFFFFFF00-|r Improved 'Align with right chat' tool, now it also supports Forced Square skin." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.13.1 (|cFFFFCC00April 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added casted amount for healing and damage spells. The result is shown on Player Detail Window and Comparison Panel.\n\n|cFFFFFF00-|r Added uptime amount for healing spells on Player Detail Window.\n\n|cFFFFFF00-|r Added an option to disable lock/resize/ungroup buttons. It's under miscellaneous bracket on Options Panel.\n\n|cFFFFFF00-|r Wallpaper for menus on title bar got a customization option under tooltips bracket on Options Panel.\n\n|cFFFFFF00-|r Updated spell list for Crowd Control and class detection.\n\n|cFFFFFF00-|r Improved Weakaura creation tool under Encounter Details Plugin.\n\n|cFFFFFF00v3.12.10 (|cFFFFCC00April 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added the spell uptime on damage player detail window.\n\n|cFFFFFF00-|r Added Rune Tap as cooldown.\n\n|cFFFFFF00-|r Report lines for deaths is now inverted. No need to scroll up the chat to see the cause of death anymore.\n\n|cFFFFFF00-|r Fixed some annoyances with auto current feature where it was changing the segments even when the user were using the window.\n\n|cFFFFFF00v3.12.7 (|cFFFFCC00April 09, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added slash command /details profile .\n\n|cFFFFFF00v3.12.6 (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): added a report button on Emotes tab.\n\n|cFFFFFF00-|r Encounter Details (plugin): improved Weakauras creation.\n\n|cFFFFFF00-|r Encounter Details (plugin): fixed the report text for interrupts and dispells.\n\n|cFFFFFF00-|r Crowd control by Pets now is merged with its owner.\n\n|cFFFFFF00-|r Truncated left text on bars now shows the entire text when hover over the bar.\n\n|cFFFFFF00-|r Added an extra option on minimap menu to disable the minimap icon.\n\n|cFFFFFF00-|r Fixed a problem when disabling the minimap icon through options panel.\n\n|cFFFFFF00-|r Fixed an issue with item level tracker feature.\n\n|cFFFFFF00v3.12.2 (|cFFFFCC00Mar 30, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Raid Check (plugin): added item level.\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): bug fixes, it's important to update it.\n\n|cFFFFFF00-|r Time Line (plugin): bug fixes.\n\n|cFFFFFF00-|r Added option to disabled th eitem level tracker.\n\n|cFFFFFF00-|r Added item level on Raid Check plugin panel.\n\n|cFFFFFF00-|r Added Spirit Link Totem damage and healing on death log.\n\n|cFFFFFF00-|r Added the total of life exchanged by the Spirit Link Totem on player detail window.\n\n|cFFFFFF00-|r Added more spells for crowd control.\n\n|cFFFFFF00-|r Added scroll on bookmark panel.\n\n|cFFFFFF00-|r Fixed issue with Dps/Hps data broker which wasn't respecting the type of time (effective/activity) selected.\n\n|cFFFFFF00-|r Fixed few bugs when using the key bind to toggle windows.\n\n|cFFFFFF00v3.11.5 (|cFFFFCC00Mar 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with overall data where max/min amount for spells was being calculated wrong.\n\n|cFFFFFF00-|r Fixed a problem while reporting enemy damage taken.\n\n|cFFFFFF00-|r Fixed an issue with damage taken by spell where some spells wasn't shown.\n\n|cFFFFFF00-|r Few improvements on tooltips.\n\n|cFFFFFF00-|r Fixed a accuracy problem with shaman's spirit link toten where its life exchange was considered healing done.\n\n|cFFFFFF00-|r Boss segments now need to have at least 30 seconds to be added on the overall data.\n\n|cFFFFFF00-|r When the segment limit is reach, segments with less combat time will be erased instead of the olders.\n\n|cFFFFFF00-|r Added item level tracker.\n\n|cFFFFFF00-|r Fixed window positioning when changing from Solo mode to Group mode.\n\n|cFFFFFF00-|r Added an option for change the amount of lines on death log.\n\n|cFFFFFF00-|r Added custom display for CC done.\n\n|cFFFFFF00v3.10.10 (|cFFFFCC00Mar 10, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): done a calibration on endurance calculation.\n\n|cFFFFFF00-|r Raid Check (plugin): now also show information for 50+ stats runes.\n\n|cFFFFFF00-|r Fixed cooldowns spell targets on overall data.\n\n|cFFFFFF00-|r Fixed report custom displays where sometimes it didn't report spell links.\n\n|cFFFFFF00-|r Replaced old report line saying 'for the last X segments' with 'overall data'.\n\n|cFFFFFF00-|r Mini-displays on statusbar are now more responsible to right button click.\n\n|cFFFFFF00-|r Added Mage's Greater Invisibility as cooldown.\n\n|cFFFFFF00v3.10.8 (|cFFFFCC00Mar 02, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Improved aura creation.\n\n|cFFFFFF00-|r Custom display 'My Spells' now also show your pets.\n\n|cFFFFFF00-|r Fixed 'Raid Check' plugin food detection.\n\n|cFFFFFF00v3.10.6 (|cFFFFCC00Feb 24, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): several bug fixes and improvements.\n\n|cFFFFFF00-|r Encounter Details (plugin): added new tab showing enemy spells from the encounter with an aura creation panel.\n\n|cFFFFFF00-|r Encounter Details (plugin): added phase indicators on graphic tab, hovering over shows the damage and heal for that specific phase.\n\n|cFFFFFF00-|r Segments menu now also show the encounter try number plus the elapsed combat time.\n\n|cFFFFFF00-|r Several improvements on Overall Data, also, now it has an option to not save it when the character logoff.\n\n|cFFFFFF00-|r Player Details window now closes with right click on any bar.\n\n|cFFFFFF00-|r Fixed Nature's Vigil cooldown.\n\n|cFFFFFF00v3.9.12a (|cFFFFCC00Feb 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Roll back on combat detection after reset data, might be causing problems.\n\n|cFFFFFF00v3.9.12 (|cFFFFCC00Feb 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): got report buttons for Endurance and Deaths Overall Damage.\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): the Deaths and Endurance limits can now be changed under the plugin options.\n\n|cFFFFFF00-|r Chart Viewer (plugin): has been revamped and now it's less complicated to use.\n\n|cFFFFFF00-|r Time Line (plugin): added options to change the background color and scale.\n\n|cFFFFFF00-|r Raid Check (plugin): its window is now 'always on top'.\n\n|cFFFFFF00-|r Accuracy adjustments on overheal of Divine Aegis and Illuminated Healing.\n\n|cFFFFFF00-|r Removed healthstone from cooldown list, added Nature's Vigil.\n\n|cFFFFFF00-|r Enemies display now shows damage taken instead of damage done.\n\n|cFFFFFF00-|r Tooltip for enemies display now also show damage and healing done by the enemy.\n\n|cFFFFFF00-|r Added an option under miscellaneous to show neutral and hostile creatures on damage taken display.\n\n|cFFFFFF00-|r Added an option to ignore nicknames and always use character names.\n\n|cFFFFFF00-|r Enabling the display icon on title bar now makes the title text automatically move slightly to right.\n\n|cFFFFFF00-|r Fixed issue with skin changing when the window has the statusbar enabled.\n\n|cFFFFFF00v3.9.4 (|cFFFFCC00Feb 03, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added option 'Ignore Mass Toggle', when enabled the window won't be affected when hiding, showing or toggling all windows.\n\n|cFFFFFF00-|r Added window number for slash commands 'hide', 'show' and 'toggle'. Usage: '/details hide 1' to hide window 1.\n\n|cFFFFFF00-|r Removed keybinds for Open and Close, added toggle instead.\n\n|cFFFFFF00-|r Added slash command 'toggle'.\n\n|cFFFFFF00-|r Added display icons for all skins which still didn't have they.\n\n|cFFFFFF00-|r Improved 'Align with right chat' tool, now it also supports Forced Square skin." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/gumps/janela_info.lua b/gumps/janela_info.lua index 75c5942b..4e25faf4 100644 --- a/gumps/janela_info.lua +++ b/gumps/janela_info.lua @@ -2137,6 +2137,7 @@ function gump:CriaJanelaInfo() end table.sort (player_1_skills, _detalhes.Sort2) local player_1_top = player_1_skills [1] [2] + bar1 [2]:SetStatusBarColor (1, 1, 1, 1) -- player 2 local player_2_skills = {} @@ -2151,6 +2152,7 @@ function gump:CriaJanelaInfo() end table.sort (player_2_skills, _detalhes.Sort2) player_2_top = player_2_skills [1] [2] + bar2 [2]:SetStatusBarColor (1, 1, 1, 1) end -- player 3 @@ -2166,6 +2168,7 @@ function gump:CriaJanelaInfo() end table.sort (player_3_skills, _detalhes.Sort2) player_3_top = player_3_skills [1] [2] + bar3 [2]:SetStatusBarColor (1, 1, 1, 1) end -- build tooltip @@ -2191,8 +2194,10 @@ function gump:CriaJanelaInfo() bar [2].lefttext:SetText (index .. ". " .. name) bar [2].righttext:SetText (_detalhes:ToK2Min (spell [2])) bar [2]:SetValue (spell [2]/player_1_top*100) + bar [2].bg:Show() if (player_2) then + local player_2_skill local found_skill = false for this_index, this_spell in _ipairs (player_2_skills) do @@ -2204,6 +2209,7 @@ function gump:CriaJanelaInfo() bar [1]:SetTexture (icon) bar [2].lefttext:SetText (this_index .. ". " .. name) + bar [2].bg:Show() if (spell [2] > this_spell [2]) then local diff = spell [2] - this_spell [2] @@ -2237,6 +2243,7 @@ function gump:CriaJanelaInfo() bar [1]:SetTexture (nil) bar [2].lefttext:SetText ("") bar [2].righttext:SetText ("") + bar [2].bg:Hide() end end @@ -2252,6 +2259,7 @@ function gump:CriaJanelaInfo() bar [1]:SetTexture (icon) bar [2].lefttext:SetText (this_index .. ". " .. name) + bar [2].bg:Show() if (spell [2] > this_spell [2]) then local diff = spell [2] - this_spell [2] @@ -2285,6 +2293,7 @@ function gump:CriaJanelaInfo() bar [1]:SetTexture (nil) bar [2].lefttext:SetText ("") bar [2].righttext:SetText ("") + bar [2].bg:Hide() end end @@ -2352,6 +2361,7 @@ function gump:CriaJanelaInfo() local player3_misc = info.instancia.showing (4, player3) local player1_uptime + local player1_casts if (bar1[2].righttext:GetText()) then bar1[2]:SetStatusBarColor (1, 1, 1, 1) @@ -2361,6 +2371,8 @@ function gump:CriaJanelaInfo() frame1.tooltip.crit_label2:SetText (critical .. "%") if (player1_misc) then + + --uptime local spell = player1_misc.debuff_uptime_spells and player1_misc.debuff_uptime_spells._ActorTable and player1_misc.debuff_uptime_spells._ActorTable [spellid] if (spell) then local minutos, segundos = _math_floor (spell.uptime/60), _math_floor (spell.uptime%60) @@ -2369,6 +2381,29 @@ function gump:CriaJanelaInfo() else frame1.tooltip.uptime_label2:SetText ("--x--x--") end + + --total casts + local amt_casts = player1_misc.spell_cast and player1_misc.spell_cast [spellid] + if (amt_casts) then + frame1.tooltip.casts_label2:SetText (amt_casts) + player1_casts = amt_casts + else + local spellname = GetSpellInfo (spellid) + local extra_search_found + for casted_spellid, amount in _pairs (player1_misc.spell_cast) do + local casted_spellname = GetSpellInfo (casted_spellid) + if (casted_spellname == spellname) then + frame1.tooltip.casts_label2:SetText (amount) + player1_casts = amount + extra_search_found = true + break + end + end + + if (not extra_search_found) then + frame1.tooltip.casts_label2:SetText ("?") + end + end else frame1.tooltip.uptime_label2:SetText ("--x--x--") end @@ -2436,6 +2471,8 @@ function gump:CriaJanelaInfo() end if (player2_misc) then + + --uptime local spell = player2_misc.debuff_uptime_spells and player2_misc.debuff_uptime_spells._ActorTable and player2_misc.debuff_uptime_spells._ActorTable [spellid] if (spell and spell.uptime) then local minutos, segundos = _math_floor (spell.uptime/60), _math_floor (spell.uptime%60) @@ -2463,8 +2500,47 @@ function gump:CriaJanelaInfo() else frame2.tooltip.uptime_label2:SetText ("--x--x--") end + + --total casts + local amt_casts = player2_misc.spell_cast and player2_misc.spell_cast [spellid] + if (not amt_casts) then + local spellname = GetSpellInfo (spellid) + for casted_spellid, amount in _pairs (player2_misc.spell_cast) do + local casted_spellname = GetSpellInfo (casted_spellid) + if (casted_spellname == spellname) then + amt_casts = amount + break + end + end + end + + if (amt_casts) then + + if (not player1_casts) then + frame2.tooltip.casts_label2:SetText (amt_casts) + elseif (player1_casts > amt_casts) then + local diff = player1_casts - amt_casts + local up = diff / amt_casts * 100 + up = _math_floor (up) + if (up > 999) then + up = ">" .. 999 + end + frame2.tooltip.casts_label2:SetText (amt_casts .. " |c" .. minor .. up .. "%)|r") + else + local diff = amt_casts - player1_casts + local down = diff / player1_casts * 100 + down = _math_floor (down) + if (down > 999) then + down = ">" .. 999 + end + frame2.tooltip.casts_label2:SetText (amt_casts .. " |c" .. plus .. down .. "%)|r") + end + else + frame2.tooltip.casts_label2:SetText ("?") + end else frame2.tooltip.uptime_label2:SetText ("--x--x--") + end frame2.tooltip:Show() @@ -2531,6 +2607,8 @@ function gump:CriaJanelaInfo() end if (player3_misc) then + + --uptime local spell = player3_misc.debuff_uptime_spells and player3_misc.debuff_uptime_spells._ActorTable and player3_misc.debuff_uptime_spells._ActorTable [spellid] if (spell and spell.uptime) then local minutos, segundos = _math_floor (spell.uptime/60), _math_floor (spell.uptime%60) @@ -2558,6 +2636,45 @@ function gump:CriaJanelaInfo() else frame3.tooltip.uptime_label2:SetText ("--x--x--") end + + --total casts + local amt_casts = player3_misc.spell_cast and player3_misc.spell_cast [spellid] + if (not amt_casts) then + local spellname = GetSpellInfo (spellid) + for casted_spellid, amount in _pairs (player3_misc.spell_cast) do + local casted_spellname = GetSpellInfo (casted_spellid) + if (casted_spellname == spellname) then + amt_casts = amount + break + end + end + end + + if (amt_casts) then + + if (not player1_casts) then + frame3.tooltip.casts_label2:SetText (amt_casts) + elseif (player1_casts > amt_casts) then + local diff = player1_casts - amt_casts + local up = diff / amt_casts * 100 + up = _math_floor (up) + if (up > 999) then + up = ">" .. 999 + end + frame3.tooltip.casts_label2:SetText (amt_casts .. " |c" .. minor .. up .. "%)|r") + else + local diff = amt_casts - player1_casts + local down = diff / player1_casts * 100 + down = _math_floor (down) + if (down > 999) then + down = ">" .. 999 + end + frame3.tooltip.casts_label2:SetText (amt_casts .. " |c" .. plus .. down .. "%)|r") + end + else + frame3.tooltip.casts_label2:SetText ("?") + end + else frame3.tooltip.uptime_label2:SetText ("--x--x--") end @@ -2706,57 +2823,28 @@ function gump:CriaJanelaInfo() tooltip.uptime_label2:SetJustifyH ("right") local bg_color = {0.5, 0.5, 0.5} - local bg_texture = [[Interface\WorldStateFrame\WORLDSTATEFINALSCORE-HIGHLIGHT]] - local bg_alpha = 0.3 - local bg_height = 20 + local bg_texture = [[Interface\AddOns\Details\images\bar_background]] + local bg_alpha = 1 + local bg_height = 12 + local colors = {{26/255, 26/255, 26/255}, {19/255, 19/255, 19/255}, {26/255, 26/255, 26/255}, {34/255, 39/255, 42/255}, {42/255, 51/255, 60/255}} - local bg_line1 = tooltip:CreateTexture (nil, "artwork") - bg_line1:SetTexture (bg_texture) - bg_line1:SetPoint ("topleft", tooltip, "topleft", 5, -10) - bg_line1:SetPoint ("topright", tooltip, "topright", -5, -10) - bg_line1:SetHeight (bg_height) - bg_line1:SetAlpha (bg_alpha) - bg_line1:SetVertexColor (unpack (bg_color)) - - local bg_line2 = tooltip:CreateTexture (nil, "artwork") - bg_line2:SetTexture (bg_texture) - bg_line2:SetPoint ("topleft", tooltip, "topleft", 5, -22) - bg_line2:SetPoint ("topright", tooltip, "topright", -5, -22) - bg_line2:SetHeight (bg_height) - bg_line2:SetAlpha (bg_alpha) - bg_line2:SetVertexColor (unpack (bg_color)) - - local bg_line3 = tooltip:CreateTexture (nil, "artwork") - bg_line3:SetTexture (bg_texture) - bg_line3:SetPoint ("topleft", tooltip, "topleft", 5, -34) - bg_line3:SetPoint ("topright", tooltip, "topright", -5, -34) - bg_line3:SetHeight (bg_height) - bg_line3:SetAlpha (bg_alpha) - bg_line3:SetVertexColor (unpack (bg_color)) - - local bg_line4 = tooltip:CreateTexture (nil, "artwork") - bg_line4:SetTexture (bg_texture) - bg_line4:SetPoint ("topleft", tooltip, "topleft", 5, -46) - bg_line4:SetPoint ("topright", tooltip, "topright", -5, -46) - bg_line4:SetHeight (bg_height) - bg_line4:SetAlpha (bg_alpha) - bg_line4:SetVertexColor (unpack (bg_color)) - - local bg_line5 = tooltip:CreateTexture (nil, "artwork") - bg_line5:SetTexture (bg_texture) - bg_line5:SetPoint ("topleft", tooltip, "topleft", 5, -56) - bg_line5:SetPoint ("topright", tooltip, "topright", -5, -56) - bg_line5:SetHeight (bg_height) - bg_line5:SetAlpha (bg_alpha) - bg_line5:SetVertexColor (unpack (bg_color)) + for i = 1, 5 do + local bg_line1 = tooltip:CreateTexture (nil, "artwork") + bg_line1:SetTexture (bg_texture) + bg_line1:SetPoint ("topleft", tooltip, "topleft", 5, -9 + (((i-1) * 12) * -1)) + bg_line1:SetPoint ("topright", tooltip, "topright", -5, -9 + (((i-1) * 12) * -1)) + bg_line1:SetHeight (bg_height) + bg_line1:SetAlpha (bg_alpha) + bg_line1:SetVertexColor (unpack (colors[i])) + end return tooltip end local create_tooltip_target = function (name) local tooltip = CreateFrame ("frame", name, UIParent) - tooltip:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]], tile = true, tileSize = 16, edgeSize = 12, insets = {left = 1, right = 1, top = 1, bottom = 1},}) - tooltip:SetBackdropColor (0, 0, 0, 1) + tooltip:SetBackdrop (_detalhes.tooltip_backdrop) + tooltip:SetBackdropColor (unpack (_detalhes.tooltip_border_color)) tooltip:SetSize (175, 67) tooltip:SetFrameStrata ("tooltip") tooltip.bars = {} @@ -2767,9 +2855,12 @@ function gump:CriaJanelaInfo() bar [2].lefttext:SetText ("") bar [2].righttext:SetText ("") bar [2]:SetValue (0) + bar [2].bg:Hide() end end + local bars_colors = {{19/255, 19/255, 19/255}, {26/255, 26/255, 26/255}} + function tooltip:CreateBar (index) if (index) then @@ -2794,7 +2885,7 @@ function gump:CriaJanelaInfo() bar:SetPoint ("topleft", spellicon, "topright", 0, 0) bar:SetPoint ("topright", parent, "topright", -4, y) bar:SetStatusBarTexture ([[Interface\AddOns\Details\images\bar_serenity]]) - bar:SetStatusBarColor (.5, .5, .5, 1) + bar:SetStatusBarColor (.68, .68, .68, 1) bar:SetMinMaxValues (0, 100) bar:SetValue (0) bar:SetHeight (14) @@ -2824,6 +2915,17 @@ function gump:CriaJanelaInfo() bar.righttext:SetJustifyH ("right") bar.righttext:SetTextColor (1, 1, 1, 1) + local bg_line1 = bar:CreateTexture (nil, "artwork") + bg_line1:SetTexture ([[Interface\AddOns\Details\images\bar_background]]) + bg_line1:SetAllPoints() + bg_line1:SetAlpha (0.7) + if (index % 2 == 0) then + bg_line1:SetVertexColor (_unpack (bars_colors [2])) + else + bg_line1:SetVertexColor (_unpack (bars_colors [2])) + end + bar.bg = bg_line1 + local object = {spellicon, bar} tinsert (tooltip.bars, object) return object diff --git a/images/spec_icons_normal_alpha.tga b/images/spec_icons_normal_alpha.tga index 5b2dde01..b54403c5 100644 Binary files a/images/spec_icons_normal_alpha.tga and b/images/spec_icons_normal_alpha.tga differ diff --git a/plugins/Details_YouAreNotPrepared/Details_YouAreNotPrepared.lua b/plugins/Details_YouAreNotPrepared/Details_YouAreNotPrepared.lua deleted file mode 100644 index a23c3d8e..00000000 --- a/plugins/Details_YouAreNotPrepared/Details_YouAreNotPrepared.lua +++ /dev/null @@ -1,627 +0,0 @@ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ---> init the plugin - - --> localization - local Loc = LibStub ("AceLocale-3.0"):GetLocale ("Details_YouAreNotPrepared") - --> create the plugin object - local YouAreNotPrepared = _detalhes:NewPluginObject ("Details_YouAreNotPrepared", DETAILSPLUGIN_ALWAYSENABLED) - tinsert (UISpecialFrames, "Details_YouAreNotPrepared") - --> main frame (shortcut) - local YouAreNotPreparedFrame = YouAreNotPrepared.Frame - - local debugmode = false - - YouAreNotPrepared:SetPluginDescription ("Tracks your deaths during raid encounters and shows it for you right after the fight end.") - YouAreNotPrepared.version = "v1.1.3" - ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ---> init the frames - - local function CreatePluginFrames() - - --> catch Details! main object - local _detalhes = _G._detalhes - local DetailsFrameWork = _detalhes.gump - - local GameCooltip = GameCooltip - local _GetSpellInfo = _detalhes.getspellinfo - - YouAreNotPrepared.last_death_combat_id = -1 - - ---------- event parser ------------- - function YouAreNotPrepared:OnDetailsEvent (event, ...) - if (event == "HIDE") then --> plugin hidded, disabled - self.open = false - - elseif (event == "SHOW") then --> plugin hidded, disabled - self.open = true - - elseif (event == "COMBAT_PLAYER_ENTER") then --> combat started - - elseif (event == "COMBAT_PLAYER_LEAVE") then --> combat ended - YouAreNotPrepared:EndCombat() - - elseif (event == "DETAILS_DATA_RESET") then - table.wipe (YouAreNotPrepared.db.deaths_table) - YouAreNotPrepared:Clear() - - elseif (event == "PLUGIN_DISABLED") then - table.wipe (YouAreNotPrepared.db.deaths_table) - YouAreNotPrepared:Clear() - YouAreNotPreparedFrame:Hide() - - elseif (event == "PLUGIN_ENABLED") then - - end - end - - ---------- build frames ------------- - - local BAR_HEIGHT = 13 - local BAR_AMOUNT = 10 - local BUTTON_AMOUNT = 6 - - function YouAreNotPrepared:Clear() - table.wipe (YouAreNotPrepared.db.deaths_table) - - for i = 1, BUTTON_AMOUNT do - local button = YouAreNotPrepared.buttons [i] - button:Disable() - button.widget.b_texture:SetDesaturated (true) - button.lefttext.text = "#" .. i - end - - for bar_index = 1, BAR_AMOUNT do - YouAreNotPrepared.container_bars.bars [bar_index]:Hide() - end - end - - --main frame - YouAreNotPreparedFrame:SetSize (424, 223) - YouAreNotPreparedFrame:SetPoint ("center", UIParent, "center") - YouAreNotPreparedFrame:EnableMouse (true) - YouAreNotPreparedFrame:SetResizable (false) - YouAreNotPreparedFrame:SetMovable (true) - - YouAreNotPreparedFrame:SetScript ("OnMouseUp", function (self, button) - if (button == "RightButton") then - YouAreNotPrepared.db.rightclick_closed = true - YouAreNotPreparedFrame:Hide() - else - if (YouAreNotPreparedFrame.isMoving) then - YouAreNotPreparedFrame:StopMovingOrSizing() - YouAreNotPreparedFrame.isMoving = false - end - end - end) - - YouAreNotPreparedFrame:SetScript ("OnMouseDown", function (self, button) - if (button == "LeftButton") then - if (not YouAreNotPreparedFrame.isMoving) then - YouAreNotPreparedFrame:StartMoving() - YouAreNotPreparedFrame.isMoving = true - end - end - end) - - --close button - local c = CreateFrame ("Button", nil, YouAreNotPreparedFrame, "UIPanelCloseButton") - c:SetWidth (32) - c:SetHeight (32) - c:SetPoint ("TOPRIGHT", YouAreNotPreparedFrame, "TOPRIGHT", 1, -15) - c:SetFrameLevel (YouAreNotPreparedFrame:GetFrameLevel()+1) - - --background image - local b = DetailsFrameWork:NewImage (YouAreNotPreparedFrame, [[Interface\AddOns\Details_YouAreNotPrepared\background]], 512, 256, "background", nil, nil, "$parentBackground") - b:SetPoint ("topleft", YouAreNotPreparedFrame, "topleft") - - --title - local t = DetailsFrameWork:NewLabel (YouAreNotPreparedFrame, nil, "$parentTitle", nil, Loc ["STRING_PLUGIN_NAME"], "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255}) - - t:SetPoint ("top", YouAreNotPreparedFrame, "top", 20, -26) - t:SetPoint ("center", YouAreNotPreparedFrame, "center", 0, 0) - - local on_mouse_down = function (self, button) - if (button == "RightButton" and not YouAreNotPreparedFrame.isMoving) then - YouAreNotPrepared.db.rightclick_closed = true - YouAreNotPreparedFrame:Hide() - else - if (not YouAreNotPreparedFrame.isMoving) then - YouAreNotPreparedFrame:StartMoving() - YouAreNotPreparedFrame.isMoving = true - end - end - end - local on_mouse_up = function (self, button) - if (YouAreNotPreparedFrame.isMoving) then - YouAreNotPreparedFrame:StopMovingOrSizing() - YouAreNotPreparedFrame.isMoving = false - end - end - - --bar container - local container_bars = CreateFrame ("frame", "Details_YouAreNotPrepared_FauxScroll_Box", YouAreNotPreparedFrame) - container_bars:SetPoint ("topleft", YouAreNotPreparedFrame, "topleft", 23, -80) - container_bars:SetSize (252, 137) - container_bars:SetBackdrop ({bgFile = "Interface\\AddOns\\Details\\images\\background", tile = true, tileSize = 16, - insets = {left = 0, right = 0, top = 0, bottom = 0}}) - container_bars:SetBackdropColor (.1, .1, .1, .2) - YouAreNotPrepared.container_bars = container_bars - - container_bars:SetScript ("OnMouseDown", on_mouse_down) - container_bars:SetScript ("OnMouseUp", on_mouse_up) - - container_bars.bars = {} - - local MouseDownCloseHook = function (_, button) - if (button == "RightButton") then - YouAreNotPrepared.db.rightclick_closed = true - YouAreNotPreparedFrame:Hide() - return true --> interrupt hook - end - end - - local on_enter_bar = function (self) - if (self.MyObject.spellid) then - GameTooltip:SetOwner (self, "ANCHOR_TOPLEFT") - GameTooltip:SetSpellByID (self.MyObject.spellid) - GameTooltip:Show() - end - end - local on_leave_bar = function (self) - GameTooltip:Hide() - end - - function container_bars:CreateChild() - - local bar_number = #self.bars + 1 - - local bar = DetailsFrameWork:NewPanel (self, YouAreNotPreparedFrame, "$parentBar" .. bar_number, nil, 250, BAR_HEIGHT) - bar:SetPoint ("topleft", self, "topleft", 1, bar_number*13*-1+9) - bar:SetHook ("OnMouseDown", MouseDownCloseHook) - bar.locked = false - bar.backdrop = nil - bar.hide = true - - local statusbar = DetailsFrameWork:NewBar (bar, nil, "$parentStatusbar", "statusbar", 250, BAR_HEIGHT) - statusbar:SetPoint ("left", bar, "left") - statusbar.fontsize = 9 - statusbar.textleft:SetHeight (16) - YouAreNotPrepared:SetFontFace (statusbar.textleft, "GameFontHighlightSmall") - YouAreNotPrepared:SetFontFace (statusbar.textleft, "GameFontNormal") - - statusbar:SetHook ("OnEnter", on_enter_bar) - statusbar:SetHook ("OnLeave", on_leave_bar) - statusbar:SetHook ("OnMouseDown", on_mouse_down) - statusbar:SetHook ("OnMouseUp", on_mouse_up) - - bar:SetHook ("OnMouseDown", on_mouse_down) - bar:SetHook ("OnMouseUp", on_mouse_up) - - container_bars.bars [bar_number] = bar - - return bar - end - - function container_bars:UpdateChild (bar_number, data, time_of_death, max_health) - - --> death parser - - local spellname, _, icon = _GetSpellInfo (data[2]) - local bar = container_bars.bars [bar_number] - - if (spellname) then - - local hp = math.floor (data[5] / max_health * 100) - if (hp > 100) then - hp = 100 - end - - if (data[1] and type (data [1]) == "boolean") then --> damage - bar.statusbar.textleft:SetText (string.format ("%.1f", data [4] - time_of_death) .. "s " .. spellname .. " (" .. data [6] .. ")") - bar.statusbar.textright:SetText ("-" .. YouAreNotPrepared:ToK (data [3]) .. " (" .. hp .. "%)") - bar.statusbar._icon:SetTexture (icon) - if (data [9]) then - bar.statusbar.color = "darkorange" - else - bar.statusbar.color = "red" - end - bar.statusbar.background:SetVertexColor (1, 0, 0, .2) - bar.statusbar.textleft:SetWidth (250 - bar.statusbar.textright:GetStringWidth() - 20) - bar.statusbar.value = hp - bar.statusbar.spellid = data[2] - return true - - elseif (not data[1] and type (data [1]) == "boolean") then --> healing - bar.statusbar.textleft:SetText (string.format ("%.1f", data [4] - time_of_death) .. "s " .. spellname .. " (" .. data [6] .. ")") - bar.statusbar.textright:SetText ("+" .. YouAreNotPrepared:ToK (data [3]) .. " (" .. hp .. "%)") - bar.statusbar._icon:SetTexture (icon) - bar.statusbar.color = "green" - bar.statusbar.background:SetVertexColor (0, 1, 0, .2) - bar.statusbar.textleft:SetWidth (250 - bar.statusbar.textright:GetStringWidth() - 20) - bar.statusbar.value = hp - bar.statusbar.spellid = data[2] - return true - - end - end - - return false - end - - --create 10 childs (bars) - for i = 1, 10 do - container_bars:CreateChild() - end - - --create scrollbar - - local refresh_function = function (self) - local offset = FauxScrollFrame_GetOffset (self) - - for bar_index = 1, BAR_AMOUNT do - local data = YouAreNotPrepared.s_table[4] [bar_index + offset] --bar_index + offset ---------- preciso pegar os dados de uma pool - - if (data) then - local successful = container_bars:UpdateChild (bar_index, data, YouAreNotPrepared.s_table[6], YouAreNotPrepared.s_table[5]) --index, death table, clock time of death, max health - if (not successful) then - container_bars.bars [bar_index]:Hide() - else - container_bars.bars [bar_index]:Show() - end - else - container_bars.bars [bar_index]:Hide() - end - end - - end - - local scrollbar = CreateFrame ("scrollframe", "Details_YouAreNotPrepared_FauxScroll", container_bars, "FauxScrollFrameTemplate") - scrollbar:SetScript ("OnVerticalScroll", function (self, offset) FauxScrollFrame_OnVerticalScroll (self, offset, BAR_HEIGHT, refresh_function) end) - scrollbar:SetPoint ("topleft", YouAreNotPreparedFrame, "topleft", 23, -80) - scrollbar:SetSize (250, 138) - scrollbar:SetScript ("OnMouseDown", function (self, button) - if (button == "RightButton" and not YouAreNotPreparedFrame.isMoving) then - YouAreNotPrepared.db.rightclick_closed = true - YouAreNotPreparedFrame:Hide() - else - if (not YouAreNotPreparedFrame.isMoving) then - YouAreNotPreparedFrame:StartMoving() - YouAreNotPreparedFrame.isMoving = true - end - end - end) - scrollbar:SetScript ("OnMouseUp", function (self, button) - if (button == "LeftButton") then - if (YouAreNotPreparedFrame.isMoving) then - YouAreNotPreparedFrame:StopMovingOrSizing() - YouAreNotPreparedFrame.isMoving = false - end - end - end) - - container_bars:EnableMouse (true) - - --choose death menu - - YouAreNotPrepared.buttons = {} - - local select_death = function (selected) - YouAreNotPrepared.s_table = YouAreNotPrepared.db.deaths_table [selected] - if (not YouAreNotPrepared.s_table) then - return - end - FauxScrollFrame_Update (scrollbar, #YouAreNotPrepared.s_table[4], BAR_AMOUNT, BAR_HEIGHT) - refresh_function (scrollbar) - end - YouAreNotPrepared.select_death = select_death - - function YouAreNotPrepared:CreateDeathButton() - local button_number = #self.buttons + 1 - - local button = DetailsFrameWork:NewButton (YouAreNotPreparedFrame, _, "$parentButton" .. button_number, nil, 113, 20, select_death, button_number) - button:SetPoint ("topleft", YouAreNotPreparedFrame, "topleft", 300, -59 + (button_number*23*-1)) - button:Disable() - - local b_texture = button:CreateTexture (nil, "artwork") - b_texture:SetTexture ([[Interface\AddOns\Details\images\icons]]) - b_texture:SetTexCoord (0.297851, 0.444335, 0.004882, 0.040039) --152 228 2 21 0.0009765625 - b_texture:SetPoint ("topleft", button.widget, "topleft") - b_texture:SetSize (113, 20) - b_texture:SetDesaturated (true) - button.widget.b_texture = b_texture - - local icon = DetailsFrameWork:NewImage (button, nil, 20, 20, nil, nil, "icon", "$parentIcon") - icon:SetTexCoord (0, 0.4921875, 0, 0.4921875) --0.0078125 - icon:SetPoint ("left", button, "left", 1, 0) - icon.texture = [[Interface\WorldStateFrame\SkullBones]] - icon:SetBlendMode ("ADD") - icon:SetAlpha (.5) - - button:SetHook ("OnMouseDown", function (self, button) - self.b_texture:SetPoint ("topleft", self, "topleft", 1, -1) - --self.MyObject.lefttext:SetPoint ("left", self.MyObject.icon, "right", 2, 0) - self.MyObject.icon:SetPoint ("left", self, "left", 2, -1) - end) - button:SetHook ("OnMouseUp", function (self, button) - self.b_texture:SetPoint ("topleft", self, "topleft") - --self.MyObject.lefttext:SetPoint ("left", self.MyObject.icon, "right", 2, 0) - self.MyObject.icon:SetPoint ("left", self, "left", 1, 0) - end) - button:SetHook ("OnEnter", function (self, button) - self.b_texture:SetBlendMode ("ADD") - end) - button:SetHook ("OnLeave", function (self, button) - self.b_texture:SetBlendMode ("BLEND") - end) - - local lefttext = DetailsFrameWork:NewLabel (button, nil, "$parentLeftText", "lefttext", "", "GameFontHighlightSmall", 9) - lefttext:SetPoint ("left", icon, "right", 2) - lefttext.width = 80 - lefttext.height = 13 - - local righttext = DetailsFrameWork:NewLabel (button, nil, "$parentRightText", "righttext", " ", "GameFontHighlightSmall", 9) - righttext:SetPoint ("right", button, "right", -1) - - YouAreNotPrepared.buttons [button_number] = button - - return bar - end - - for i = 1, 6 do - YouAreNotPrepared:CreateDeathButton() - end - - function YouAreNotPrepared:AddDeath (t) - - --> t = [1] = enemy name [2] = time of death [3] = last cooldown [4] = death table [5] = max health [6] = clock time of the death - - --add and remove - table.insert (YouAreNotPrepared.db.deaths_table, 1, t) - table.remove (YouAreNotPrepared.db.deaths_table, 7) - - --update buttons - for i = 1, 6 do - local button = YouAreNotPrepared.buttons [i] - local death_table = YouAreNotPrepared.db.deaths_table [i] - if (death_table) then - button:Enable() - button.widget.b_texture:SetDesaturated (false) - button.lefttext.text = "#" .. i .. " " .. death_table [1] - else - button:Disable() - button.widget.b_texture:SetDesaturated (true) - button.lefttext.text = "#" .. i - end - end - - YouAreNotPrepared:DeathWarning() - end - - function YouAreNotPrepared:UpdateButtons() - for i = 1, 6 do - local button = YouAreNotPrepared.buttons [i] - local death_table = YouAreNotPrepared.db.deaths_table [i] - if (death_table) then - button:Enable() - button.widget.b_texture:SetDesaturated (false) - button.lefttext.text = "#" .. i .. " " .. death_table [1] - else - button:Disable() - button.widget.b_texture:SetDesaturated (true) - button.lefttext.text = "#" .. i - end - end - end - - function YouAreNotPrepared:ShowMe() --> used for debug - YouAreNotPreparedFrame:Show() - - YouAreNotPrepared:UpdateButtons() - - _detalhes:InstanceAlert (Loc ["STRING_PLUGIN_ALERT"], {[[Interface\ICONS\Achievement_Boss_Illidan]], 14, 14, false, 0.8984375, 0.0546875, 0.0546875, 0.8984375}, YouAreNotPrepared.db.shown_time, {YouAreNotPrepared.ShowMeFromInstanceAlert}) - end - - --auto open box - local autoopen_checkbox = CreateFrame ("CheckButton", "YANP_AutoOpenCheckBox", YouAreNotPreparedFrame, "ChatConfigCheckButtonTemplate") - autoopen_checkbox:SetPoint ("bottomleft", container_bars, "topleft", 45, -1) - local text = _G ["YANP_AutoOpenCheckBoxText"] - text:SetText ("Auto Open") - autoopen_checkbox:SetFrameLevel (YouAreNotPreparedFrame:GetFrameLevel()+5) - --YouAreNotPrepared:SetFontSize (text, 10) - text:ClearAllPoints() - text:SetPoint ("left", autoopen_checkbox, "right", -2, 1) - --checkbox.tooltip = Loc ["STRING_REPORTFRAME_CURRENTINFO"] - autoopen_checkbox:SetHitRectInsets (0, -60, 0, 0) - autoopen_checkbox:SetScript ("PostClick", function(self) - if (self:GetChecked()) then - YouAreNotPrepared.db.auto_open = true - else - YouAreNotPrepared.db.auto_open = false - end - end) - YouAreNotPrepared:SetFontColor (text, "greenyellow") - - --> open options - local options_button = CreateFrame ("button", nil, YouAreNotPreparedFrame) - options_button:SetPoint ("left", text, "right", 2, 0) - options_button:SetSize (18, 18) - options_button:SetAlpha (0.8) - options_button:SetNormalTexture ([[Interface\Buttons\UI-OptionsButton]]) - options_button:SetHighlightTexture ([[Interface\Buttons\UI-OptionsButton]]) - options_button:SetPushedTexture ([[Interface\Buttons\UI-OptionsButton]]) - options_button:SetScript ("OnClick", YouAreNotPrepared.OpenOptionsPanel) - local right_text = YouAreNotPrepared.gump:CreateLabel (YouAreNotPreparedFrame, "Options", nil, "greenyellow", "GameFontHighlight", "optionstext", "$parentOptionsText") - right_text:SetPoint ("left", options_button, "right", 2, 0) - end - ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ---> functions - - function YouAreNotPrepared:ShowMeFromInstanceAlert() - YouAreNotPreparedFrame:Show() - YouAreNotPrepared.select_death (1) - YouAreNotPrepared:UpdateButtons() - _detalhes:InstanceAlert (false) - end - - function YouAreNotPrepared:DeathWarning() - _detalhes:InstanceAlert (Loc ["STRING_PLUGIN_ALERT"], {[[Interface\ICONS\Achievement_Boss_Illidan]], 14, 14, false, 0.8984375, 0.0546875, 0.0546875, 0.8984375} , 15, {YouAreNotPrepared.ShowMeFromInstanceAlert}) - end - - function YouAreNotPrepared:EndCombat() - if (YouAreNotPrepared.last_death_combat_id == YouAreNotPrepared.combat_counter) then - if (YouAreNotPrepared.db.auto_open) then - YouAreNotPrepared.ShowMeFromInstanceAlert() - else - _detalhes:InstanceAlert (Loc ["STRING_PLUGIN_ALERT"], {[[Interface\ICONS\Achievement_Boss_Illidan]], 14, 14, false, 0.8984375, 0.0546875, 0.0546875, 0.8984375} , 25, {YouAreNotPrepared.ShowMeFromInstanceAlert}) - end - end - 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 - local combat = YouAreNotPrepared:GetCombat ("current") - - --> store death - local d = YouAreNotPrepared:reverse_table (death_table) - death_table = d - - if (combat.is_boss) then --> encounter or pvp - YouAreNotPrepared.last_death_combat_id = YouAreNotPrepared.combat_counter - return YouAreNotPrepared:AddDeath ({combat.is_boss.name or combat.enemy or "Unknown", time_of_death, last_cooldown, death_table, max_health, time}) - end - end - end - - local build_options_panel = function() - local options_frame = CreateFrame ("frame", "YouAreNotPreparedOptionsWindow", UIParent, "ButtonFrameTemplate") - tinsert (UISpecialFrames, "YouAreNotPreparedOptionsWindow") - options_frame:SetSize (500, 200) - options_frame:SetFrameStrata ("DIALOG") - options_frame:SetScript ("OnMouseDown", function(self) self:StartMoving()end) - options_frame:SetScript ("OnMouseUp", function(self) self:StopMovingOrSizing()end) - options_frame:SetMovable (true) - options_frame:EnableMouse (true) - options_frame:Hide() - options_frame:SetPoint ("center", UIParent, "center") - options_frame.TitleText:SetText ("You Are Not Prepared Options") - options_frame.portrait:SetTexture ([[Interface\CHARACTERFRAME\TEMPORARYPORTRAIT-FEMALE-BLOODELF]]) - - local menu = { - --show when dropdown - { - type = "range", - get = function() return YouAreNotPrepared.db.shown_time end, - set = function (self, fixedparam, value) YouAreNotPrepared.db.shown_time = value end, - min = 15, - max = 120, - step = 1, - desc = "How much time the alert stay shown in the window.", - name = "Alert Timeout" - }, - { - type = "toggle", - get = function() return YouAreNotPrepared.db.auto_open end, - set = function (self, fixedparam, value) YouAreNotPrepared.db.auto_open = value end, - desc = "Open the window after leave the combat.", - name = "Auto Open" - }, - { - type = "toggle", - get = function() return YouAreNotPrepared.db.auto_close end, - set = function (self, fixedparam, value) YouAreNotPrepared.db.auto_close = value end, - desc = "Closes the window when you release or are resurrected.", - name = "Auto Close" - }, - } - - _detalhes.gump:BuildMenu (options_frame, menu, 15, -75, 260) - - end - YouAreNotPrepared.OpenOptionsPanel = function() - if (not YouAreNotPreparedOptionsWindow) then - build_options_panel() - end - YouAreNotPreparedOptionsWindow:Show() - end - ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ---> events - - function YouAreNotPrepared:OnEvent (_, event, ...) - - if (event == "PLAYER_ALIVE" or event == "PLAYER_UNGHOST") then - if (YouAreNotPrepared.db.auto_close and YouAreNotPreparedFrame:IsShown()) then - if (YouAreNotPreparedFrame.isMoving) then - YouAreNotPreparedFrame:StopMovingOrSizing() - YouAreNotPreparedFrame.isMoving = false - end - YouAreNotPreparedFrame:Hide() - end - - elseif (event == "ADDON_LOADED") then - local AddonName = select (1, ...) - if (AddonName == "Details_YouAreNotPrepared") then - - if (_G._detalhes) then - - --> create widgets - CreatePluginFrames() - - --> core version required - local MINIMAL_DETAILS_VERSION_REQUIRED = 12 - - local default_settings = { - shown_time = 30, - auto_open = true, - hide_on_combat = true, - rightclick_closed = false, - deaths_table = {}, - auto_close = true, - } - - --> install - local install, saveddata, is_enabled = _G._detalhes:InstallPlugin ("TOOLBAR", Loc ["STRING_PLUGIN_NAME"], [[Interface\ICONS\Achievement_Boss_Illidan]], YouAreNotPrepared, "DETAILS_PLUGIN_YANP", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", YouAreNotPrepared.version, default_settings) - if (type (install) == "table" and install.error) then - return print (install.error) - end - - YouAreNotPrepared.db = saveddata - - YANP_AutoOpenCheckBox:SetChecked (saveddata.auto_open) - - --> register needed events - _G._detalhes:RegisterEvent (YouAreNotPrepared, "DETAILS_DATA_RESET") - _G._detalhes:RegisterEvent (YouAreNotPrepared, "COMBAT_PLAYER_LEAVE") - - YouAreNotPreparedFrame:RegisterEvent ("PLAYER_ALIVE") - YouAreNotPreparedFrame:RegisterEvent ("PLAYER_UNGHOST") - - --> register needed hooks - _G._detalhes:InstallHook (DETAILS_HOOK_DEATH, YouAreNotPrepared.OnDeath) - - --> create right click to close - if (not YouAreNotPrepared.db.rightclick_closed) then - local right_click = YouAreNotPrepared.gump:NewImage (YouAreNotPreparedFrame, [[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 16, 18, "overlay", {8/512, 70/512, 328/512, 409/512}) - right_click:SetPoint ("left", _G [YouAreNotPreparedFrame:GetName() .. "OptionsText"], "right", 2, 0) - local right_text = YouAreNotPrepared.gump:CreateLabel (YouAreNotPreparedFrame, "Right Click to Close", nil, "greenyellow", "GameFontHighlight", "rightclicktext", "$parentRightClickText") - right_text:SetPoint ("left", right_click, "right", 2, 0) - end - - --> install slash command - SLASH_Details_YouAreNotPrepared1 = "/yanp" - function SlashCmdList.Details_YouAreNotPrepared (msg, editbox) - YouAreNotPrepared:ShowMeFromInstanceAlert() - end - - end - end - end - end diff --git a/plugins/Details_YouAreNotPrepared/Details_YouAreNotPrepared.toc b/plugins/Details_YouAreNotPrepared/Details_YouAreNotPrepared.toc deleted file mode 100644 index 6205595c..00000000 --- a/plugins/Details_YouAreNotPrepared/Details_YouAreNotPrepared.toc +++ /dev/null @@ -1,13 +0,0 @@ -## Interface: 60100 -## Title: Details You Are Not Prepared (plugin) -## Notes: Plugin for Details -## RequiredDeps: Details -## OptionalDeps: Ace3 - -#@no-lib-strip@ -embeds.xml -#@end-no-lib-strip@ - -enUS.lua -ptBR.lua -Details_YouAreNotPrepared.lua \ No newline at end of file diff --git a/plugins/Details_YouAreNotPrepared/Libs/AceLocale-3.0/AceLocale-3.0.lua b/plugins/Details_YouAreNotPrepared/Libs/AceLocale-3.0/AceLocale-3.0.lua deleted file mode 100644 index 2ecc0cb8..00000000 --- a/plugins/Details_YouAreNotPrepared/Libs/AceLocale-3.0/AceLocale-3.0.lua +++ /dev/null @@ -1,137 +0,0 @@ ---- **AceLocale-3.0** manages localization in addons, allowing for multiple locale to be registered with fallback to the base locale for untranslated strings. --- @class file --- @name AceLocale-3.0 --- @release $Id: AceLocale-3.0.lua 1035 2011-07-09 03:20:13Z kaelten $ -local MAJOR,MINOR = "AceLocale-3.0", 6 - -local AceLocale, oldminor = LibStub:NewLibrary(MAJOR, MINOR) - -if not AceLocale then return end -- no upgrade needed - --- Lua APIs -local assert, tostring, error = assert, tostring, error -local getmetatable, setmetatable, rawset, rawget = getmetatable, setmetatable, rawset, rawget - --- Global vars/functions that we don't upvalue since they might get hooked, or upgraded --- List them here for Mikk's FindGlobals script --- GLOBALS: GAME_LOCALE, geterrorhandler - -local gameLocale = GetLocale() -if gameLocale == "enGB" then - gameLocale = "enUS" -end - -AceLocale.apps = AceLocale.apps or {} -- array of ["AppName"]=localetableref -AceLocale.appnames = AceLocale.appnames or {} -- array of [localetableref]="AppName" - --- This metatable is used on all tables returned from GetLocale -local readmeta = { - __index = function(self, key) -- requesting totally unknown entries: fire off a nonbreaking error and return key - rawset(self, key, key) -- only need to see the warning once, really - geterrorhandler()(MAJOR..": "..tostring(AceLocale.appnames[self])..": Missing entry for '"..tostring(key).."'") - return key - end -} - --- This metatable is used on all tables returned from GetLocale if the silent flag is true, it does not issue a warning on unknown keys -local readmetasilent = { - __index = function(self, key) -- requesting totally unknown entries: return key - rawset(self, key, key) -- only need to invoke this function once - return key - end -} - --- Remember the locale table being registered right now (it gets set by :NewLocale()) --- NOTE: Do never try to register 2 locale tables at once and mix their definition. -local registering - --- local assert false function -local assertfalse = function() assert(false) end - --- This metatable proxy is used when registering nondefault locales -local writeproxy = setmetatable({}, { - __newindex = function(self, key, value) - rawset(registering, key, value == true and key or value) -- assigning values: replace 'true' with key string - end, - __index = assertfalse -}) - --- This metatable proxy is used when registering the default locale. --- It refuses to overwrite existing values --- Reason 1: Allows loading locales in any order --- Reason 2: If 2 modules have the same string, but only the first one to be --- loaded has a translation for the current locale, the translation --- doesn't get overwritten. --- -local writedefaultproxy = setmetatable({}, { - __newindex = function(self, key, value) - if not rawget(registering, key) then - rawset(registering, key, value == true and key or value) - end - end, - __index = assertfalse -}) - ---- Register a new locale (or extend an existing one) for the specified application. --- :NewLocale will return a table you can fill your locale into, or nil if the locale isn't needed for the players --- game locale. --- @paramsig application, locale[, isDefault[, silent]] --- @param application Unique name of addon / module --- @param locale Name of the locale to register, e.g. "enUS", "deDE", etc. --- @param isDefault If this is the default locale being registered (your addon is written in this language, generally enUS) --- @param silent If true, the locale will not issue warnings for missing keys. Must be set on the first locale registered. If set to "raw", nils will be returned for unknown keys (no metatable used). --- @usage --- -- enUS.lua --- local L = LibStub("AceLocale-3.0"):NewLocale("TestLocale", "enUS", true) --- L["string1"] = true --- --- -- deDE.lua --- local L = LibStub("AceLocale-3.0"):NewLocale("TestLocale", "deDE") --- if not L then return end --- L["string1"] = "Zeichenkette1" --- @return Locale Table to add localizations to, or nil if the current locale is not required. -function AceLocale:NewLocale(application, locale, isDefault, silent) - - -- GAME_LOCALE allows translators to test translations of addons without having that wow client installed - local gameLocale = GAME_LOCALE or gameLocale - - local app = AceLocale.apps[application] - - if silent and app and getmetatable(app) ~= readmetasilent then - geterrorhandler()("Usage: NewLocale(application, locale[, isDefault[, silent]]): 'silent' must be specified for the first locale registered") - end - - if not app then - if silent=="raw" then - app = {} - else - app = setmetatable({}, silent and readmetasilent or readmeta) - end - AceLocale.apps[application] = app - AceLocale.appnames[app] = application - end - - if locale ~= gameLocale and not isDefault then - return -- nop, we don't need these translations - end - - registering = app -- remember globally for writeproxy and writedefaultproxy - - if isDefault then - return writedefaultproxy - end - - return writeproxy -end - ---- Returns localizations for the current locale (or default locale if translations are missing). --- Errors if nothing is registered (spank developer, not just a missing translation) --- @param application Unique name of addon / module --- @param silent If true, the locale is optional, silently return nil if it's not found (defaults to false, optional) --- @return The locale table for the current language. -function AceLocale:GetLocale(application, silent) - if not silent and not AceLocale.apps[application] then - error("Usage: GetLocale(application[, silent]): 'application' - No locales registered for '"..tostring(application).."'", 2) - end - return AceLocale.apps[application] -end diff --git a/plugins/Details_YouAreNotPrepared/Libs/AceLocale-3.0/AceLocale-3.0.xml b/plugins/Details_YouAreNotPrepared/Libs/AceLocale-3.0/AceLocale-3.0.xml deleted file mode 100644 index d69dbb13..00000000 --- a/plugins/Details_YouAreNotPrepared/Libs/AceLocale-3.0/AceLocale-3.0.xml +++ /dev/null @@ -1,4 +0,0 @@ - -