diff --git a/API General.txt b/API General.txt new file mode 100644 index 00000000..16475e5d --- /dev/null +++ b/API General.txt @@ -0,0 +1,24 @@ +======================================= +Item Level +======================================= + +Details.ilevel:IsTrackerEnabled() +return if the item level tracker is enabled. + +Details.ilevel:TrackItemLevel (bool) +enable or disable the tracker, item level tracker only work when inside a raid instance and out of combat. + +Details.ilevel:GetPool() +return a table containing all tracked players: +{[GUID] = {["name"] = name-realm, ["ilvl"] = item level, ["time"] = time()}} + +Details.ilevel:GetIlvl (guid) +return the item level table for the requested guid. + +Details.ilevel:GetInOrder() +return a new numeric table with sorted in decreasing order: +{{name-realm, item level, time()}, {name-realm, item level, time()}} + +======================================= + +======================================= \ No newline at end of file diff --git a/Details.toc b/Details.toc index 1c39dc84..110c7209 100644 --- a/Details.toc +++ b/Details.toc @@ -16,7 +16,6 @@ locales\Details-deDE.lua locales\Details-frFR.lua locales\Details-koKR.lua locales\Details-ruRU.lua -locales\Details-zhCN.lua locales\Details-zhTW.lua boot.lua diff --git a/boot.lua b/boot.lua index 21445048..e501cc81 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 = 711 --it's 731 for release - _detalhes.userversion = "v3.12.1" + _detalhes.build_counter = 711 --it's 751 for release + _detalhes.userversion = "v3.12.2" _detalhes.realversion = 66 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" Details = _detalhes @@ -23,13 +23,18 @@ do --[[ |cFFFFFF00-|r .\n\n -|cFFFFFF00v3.12.1 (|cFFFFCC00Mar 27, 2015|r|cFFFFFF00)|r:\n\n -|cFFFFFF00-|r Fixed few bugs when using the key bind to toggle windows.\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 spell was being calculated wrong.\n\n @@ -46,8 +51,8 @@ do --]] -- - - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.12.1 (|cFFFFCC00Mar 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed few bugs when using keybinds to toggle windows.\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|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.\n\n|cFFFFFF00-|r Improvements on Bookmark panel.\n\n|cFFFFFF00-|r Improvements on spec icons with transparency.\n\n|cFFFFFF00-|r Created custom spell for Living Bomb explosion.\n\n|cFFFFFF00-|r Fixed statusbar textures and mini displays.\n\n|cFFFFFF00-|r Fixed an issue with title bar buttons when toggling the titlebar anchor from bottom to top position.\n\n|cFFFFFF00-|r Fixed an issue with title bar text when toggling the statusbar position from bottom to top.\n\n|cFFFFFF00-|r Fixed yet another bug with avoidance tab on player detail window.\n\n|cFFFFFF00-|r Fixed the window ungroup button (above the resize one).\n\n|cFFFFFF00v3.8.13 (|cFFFFCC00Jan 26, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r RaidCheck (plugin): added an option to be able to use the report panel.\n\n|cFFFFFF00-|r You Are Not Prepared (plugin): added Auto Close the window, can be disabled through its options panel.\n\n|cFFFFFF00-|r Vanguard (plugin): Added Options Panel.\n\n|cFFFFFF00-|r Details! is now using 'LibWindow-1.1' to save and restore the positioning of the windows, bug might appear, please report if something weird happen.\n\n|cFFFFFF00-|r Improved specialization detection in order to try detect spec changes.\n\n|cFFFFFF00-|r Added options to change the brackets and the separator for dps/percent block.\n\n|cFFFFFF00-|r Added options for show (or hide) totals, dps and percent amount.\n\n|cFFFFFF00-|r Added Segments shortcut menu pressing Shift + Right click.\n\n|cFFFFFF00-|r Fixed positioning after reopen a window previously closed on last logon." +--|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 + Loc ["STRING_VERSION_LOG"] = "|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.\n\n|cFFFFFF00-|r Improvements on Bookmark panel.\n\n|cFFFFFF00-|r Improvements on spec icons with transparency.\n\n|cFFFFFF00-|r Created custom spell for Living Bomb explosion.\n\n|cFFFFFF00-|r Fixed statusbar textures and mini displays.\n\n|cFFFFFF00-|r Fixed an issue with title bar buttons when toggling the titlebar anchor from bottom to top position.\n\n|cFFFFFF00-|r Fixed an issue with title bar text when toggling the statusbar position from bottom to top.\n\n|cFFFFFF00-|r Fixed yet another bug with avoidance tab on player detail window.\n\n|cFFFFFF00-|r Fixed the window ungroup button (above the resize one).\n\n|cFFFFFF00v3.8.13 (|cFFFFCC00Jan 26, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r RaidCheck (plugin): added an option to be able to use the report panel.\n\n|cFFFFFF00-|r You Are Not Prepared (plugin): added Auto Close the window, can be disabled through its options panel.\n\n|cFFFFFF00-|r Vanguard (plugin): Added Options Panel.\n\n|cFFFFFF00-|r Details! is now using 'LibWindow-1.1' to save and restore the positioning of the windows, bug might appear, please report if something weird happen.\n\n|cFFFFFF00-|r Improved specialization detection in order to try detect spec changes.\n\n|cFFFFFF00-|r Added options to change the brackets and the separator for dps/percent block.\n\n|cFFFFFF00-|r Added options for show (or hide) totals, dps and percent amount.\n\n|cFFFFFF00-|r Added Segments shortcut menu pressing Shift + Right click.\n\n|cFFFFFF00-|r Fixed positioning after reopen a window previously closed on last logon." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/classes/classe_others.lua b/classes/classe_others.lua index 8d2790e9..071cee1d 100644 --- a/classes/classe_others.lua +++ b/classes/classe_others.lua @@ -166,6 +166,8 @@ function atributo_misc:CreateBuffTargetObject() end local backgroundColor = {0, 0, 0, 1} +local backgroud_bar_damage = {value = 100, texture = [[Interface\AddOns\Details\images\bar_serenity]], color = {1, 0, 0, 0.1}} +--local backgroud_bar_heal = {value = 100, texture = [[Interface\AddOns\Details\images\bar_background]], color = {0, 0, 0, 1}} function _detalhes:ToolTipDead (instancia, morte, esta_barra, keydown) @@ -220,16 +222,16 @@ function _detalhes:ToolTipDead (instancia, morte, esta_barra, keydown) if (event [9]) then --> friendly fire - GameCooltip:AddStatusBar (hp, 1, "darkorange", true) + GameCooltip:AddStatusBar (hp, 1, "darkorange", true, backgroud_bar_damage) else --> from a enemy - GameCooltip:AddStatusBar (hp, 1, "red", true) + GameCooltip:AddStatusBar (hp, 1, "red", true, backgroud_bar_damage) end else --> heal GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. _detalhes:ToK (amount) .. " (" .. hp .. "%)", 1, "white", "white") GameCooltip:AddIcon (spellicon) - GameCooltip:AddStatusBar (hp, 1, "green", true) + GameCooltip:AddStatusBar (hp, 1, "green", true) --, backgroud_bar_heal end diff --git a/classes/container_combatentes.lua b/classes/container_combatentes.lua index 4229ded1..57bf94e4 100644 --- a/classes/container_combatentes.lua +++ b/classes/container_combatentes.lua @@ -178,7 +178,7 @@ end end - if ( (_bit_band (flag, IS_GROUP_OBJECT) ~= 0 and novo_objeto.classe ~= "UNGROUPPLAYER")) then --> faz parte do grupo + if ((_bit_band (flag, IS_GROUP_OBJECT) ~= 0 and novo_objeto.classe ~= "UNKNOW" and novo_objeto.classe ~= "UNGROUPPLAYER") or _detalhes:IsInCache (serial)) then novo_objeto.grupo = true if (_detalhes:IsATank (serial)) then diff --git a/core/gears.lua b/core/gears.lua index a8205ffc..0df12583 100644 --- a/core/gears.lua +++ b/core/gears.lua @@ -508,6 +508,7 @@ end -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> inspect stuff +_detalhes.ilevel = {} local ilvl_core = _detalhes:CreateEventListener() ilvl_core:RegisterEvent ("GROUP_ONENTER", "OnEnter") @@ -518,22 +519,17 @@ ilvl_core:RegisterEvent ("ZONE_TYPE_CHANGED", "ZoneChanged") local inspecting = {} local inspect_frame = CreateFrame ("frame") +inspect_frame:RegisterEvent ("INSPECT_READY") -local check_inspect_queue = function() - for spellid, timeout_id in pairs (inspecting) do - return - end - - inspect_frame:UnregisterEvent ("INSPECT_READY") -end +local two_hand = { + ["INVTYPE_2HWEAPON"] = true, + ["INVTYPE_RANGED"] = true, + ["INVTYPE_RANGEDRIGHT"] = true, +} -local inspect_amout = function() - local i = 0 - for spellid, timeout_id in pairs (inspecting) do - i = i + 1 - end - return i -end +local MAX_INSPECT_AMOUNT = 1 +local MIN_ILEVEL_TO_STORE = 580 +local LOOP_TIME = 3 function _detalhes:IlvlFromNetwork (player, realm, core, ilvl) local guid = UnitGUID (player .. "-" .. realm) @@ -547,51 +543,89 @@ function _detalhes:IlvlFromNetwork (player, realm, core, ilvl) _detalhes.item_level_pool [guid] = {name = player, ilvl = ilvl, time = time()} end -inspect_frame:SetScript ("OnEvent", function (self, event, ...) - local guid, unitid, arg3 = select (1, ...) +--test on your self: +--/run _detalhes.ilevel:CalcItemLevel ("player", UnitGUID("player"), true) +--/run wipe (_detalhes.item_level_pool) +function ilvl_core:CalcItemLevel (unitid, guid, shout) + + if (type (unitid) == "table") then + shout = unitid [3] + guid = unitid [2] + unitid = unitid [1] + end + if (CheckInteractDistance (unitid, 1)) then + + --16 = all itens including main and off hand + local item_amount = 16 + local item_level = 0 + local failed = 0 + + for equip_id = 1, 17 do + if (equip_id ~= 4) then --shirt slot + local item = GetInventoryItemLink (unitid, equip_id) + if (item) then + local _, _, _, iLevel, _, _, _, _, equipSlot = GetItemInfo (item) + if (iLevel and iLevel > 100) then + item_level = item_level + iLevel + -- 16 = main hand 17 = off hand + -- if using a two-hand, ignore the off hand slot + if (equip_id == 16 and two_hand [equipSlot]) then + item_amount = 15 + break + end + end + else + failed = failed + 1 + if (failed > 2) then + break + end + end + end + end + + local average = item_level / item_amount + + -- register + if (average > 0) then + if (shout) then + _detalhes:Msg (name .. " item level: " .. average) + end + + if (average > MIN_ILEVEL_TO_STORE) then + local name = _detalhes:GetCLName (unitid) + _detalhes.item_level_pool [guid] = {name = name, ilvl = average, time = time()} + end + end + end +end +_detalhes.ilevel.CalcItemLevel = ilvl_core.CalcItemLevel + +inspect_frame:SetScript ("OnEvent", function (self, event, ...) + local guid = select (1, ...) + if (inspecting [guid]) then local unitid, cancel_tread = inspecting [guid] [1], inspecting [guid] [2] inspecting [guid] = nil + ilvl_core.amt_inspecting = ilvl_core.amt_inspecting - 1 ilvl_core:CancelTimer (cancel_tread) --> do inspect stuff if (unitid) then - if (CheckInteractDistance (unitid, 1)) then - local item_amount = 0 - local item_level = 0 - - for equip_id = 1, 17 do - if (equip_id ~= 4) then --shirt slot - local item = GetInventoryItemLink (unitid, equip_id) - if (item) then - local name, link, quality, iLevel, reqLevel, class, subclass, maxStack, equipSlot, texture, vendorPrice = GetItemInfo (item) - if (iLevel) then - item_amount = item_amount + 1 - item_level = item_level + iLevel - end - end - end - end - - local average = item_level / item_amount - - -- register - if (average > 0) then - _detalhes.item_level_pool [guid] = {name = UnitName (unitid), ilvl = average, time = time()} - end - end + local t = {unitid, guid} + --ilvl_core:ScheduleTimer ("CalcItemLevel", 0.5, t) + ilvl_core:ScheduleTimer ("CalcItemLevel", 0.5, t) + ilvl_core:ScheduleTimer ("CalcItemLevel", 2, t) + ilvl_core:ScheduleTimer ("CalcItemLevel", 4, t) + ilvl_core:ScheduleTimer ("CalcItemLevel", 8, t) end - - --> check queue - check_inspect_queue() end end) function ilvl_core:InspectTimeOut (guid) inspecting [guid] = nil - check_inspect_queue() + ilvl_core.amt_inspecting = ilvl_core.amt_inspecting - 1 end function ilvl_core:GetItemLevel (unitid, guid) @@ -602,22 +636,48 @@ function ilvl_core:GetItemLevel (unitid, guid) if (not unitid or not CanInspect (unitid) or not CheckInteractDistance (unitid, 1)) then return end - - inspect_frame:RegisterEvent ("INSPECT_READY") + inspecting [guid] = {unitid, ilvl_core:ScheduleTimer ("InspectTimeOut", 12, guid)} - + ilvl_core.amt_inspecting = ilvl_core.amt_inspecting + 1 + NotifyInspect (unitid) end +local NotifyInspectHook = function (unitid) + if (IsInRaid() and _detalhes:GetZoneType() == "raid") then + local guid = UnitGUID (unitid) + local name = _detalhes:GetCLName (unitid) + + if (guid and name and not inspecting [guid]) then + for i = 1, GetNumGroupMembers() do + if (name == _detalhes:GetCLName ("raid" .. i)) then + unitid = "raid" .. i + break + end + end + + inspecting [guid] = {unitid, ilvl_core:ScheduleTimer ("InspectTimeOut", 12, guid)} + ilvl_core.amt_inspecting = ilvl_core.amt_inspecting + 1 + end + end +end +hooksecurefunc ("NotifyInspect", NotifyInspectHook) + function ilvl_core:Reset() ilvl_core.raid_id = 1 + ilvl_core.amt_inspecting = 0 + + for guid, t in pairs (inspecting) do + ilvl_core:CancelTimer (t[2]) + inspecting [guid] = nil + end end function ilvl_core:Loop() - if (inspect_amout() > 1) then + if (ilvl_core.amt_inspecting >= MAX_INSPECT_AMOUNT) then return end - + local members_amt = GetNumGroupMembers() if (ilvl_core.raid_id > members_amt) then ilvl_core.raid_id = 1 @@ -634,7 +694,7 @@ function ilvl_core:Loop() if (inspecting [guid]) then return end - + local ilvl_table = _detalhes.ilevel:GetIlvl (guid) if (ilvl_table and ilvl_table.time + 3600 > time()) then ilvl_core.raid_id = ilvl_core.raid_id + 1 @@ -653,7 +713,7 @@ function ilvl_core:EnterCombat() end local can_start_loop = function() - if (_detalhes:GetZoneType() ~= "raid" or ilvl_core.loop_process or _detalhes.in_combat) then + if (_detalhes:GetZoneType() ~= "raid" or ilvl_core.loop_process or _detalhes.in_combat or not _detalhes.track_item_level) then return false end return true @@ -662,14 +722,14 @@ end function ilvl_core:LeaveCombat() if (can_start_loop()) then ilvl_core:Reset() - ilvl_core.loop_process = ilvl_core:ScheduleRepeatingTimer ("Loop", 2) + ilvl_core.loop_process = ilvl_core:ScheduleRepeatingTimer ("Loop", LOOP_TIME) end end function ilvl_core:ZoneChanged (zone_type) if (can_start_loop()) then ilvl_core:Reset() - ilvl_core.loop_process = ilvl_core:ScheduleRepeatingTimer ("Loop", 2) + ilvl_core.loop_process = ilvl_core:ScheduleRepeatingTimer ("Loop", LOOP_TIME) end end @@ -680,7 +740,7 @@ function ilvl_core:OnEnter() if (can_start_loop()) then ilvl_core:Reset() - ilvl_core.loop_process = ilvl_core:ScheduleRepeatingTimer ("Loop", 2) + ilvl_core.loop_process = ilvl_core:ScheduleRepeatingTimer ("Loop", LOOP_TIME) end end @@ -692,7 +752,26 @@ function ilvl_core:OnLeave() end --> ilvl API -_detalhes.ilevel = {} +function _detalhes.ilevel:IsTrackerEnabled() + return _detalhes.track_item_level +end +function _detalhes.ilevel:TrackItemLevel (bool) + if (type (bool) == "boolean") then + if (bool) then + _detalhes.track_item_level = true + if (can_start_loop()) then + ilvl_core:Reset() + ilvl_core.loop_process = ilvl_core:ScheduleRepeatingTimer ("Loop", LOOP_TIME) + end + else + _detalhes.track_item_level = false + if (ilvl_core.loop_process) then + ilvl_core:CancelTimer (ilvl_core.loop_process) + ilvl_core.loop_process = nil + end + end + end +end function _detalhes.ilevel:GetPool() return _detalhes.item_level_pool diff --git a/core/parser.lua b/core/parser.lua index 46533713..c6d7ba5e 100644 --- a/core/parser.lua +++ b/core/parser.lua @@ -141,6 +141,7 @@ end -- /run local f=CreateFrame("frame");f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");f:SetScript("OnEvent", function(self, ...)print (...);end) +-- /run local f=CreateFrame("frame");f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");f:SetScript("OnEvent",function(self, ...) local a = select(6, ...);if (a=="")then print (...) end end) function parser:spell_dmg (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, amount, overkill, school, resisted, blocked, absorbed, critical, glacing, crushing, isoffhand, multistrike) diff --git a/core/windows.lua b/core/windows.lua index 9da259cb..b5efa171 100644 --- a/core/windows.lua +++ b/core/windows.lua @@ -742,6 +742,8 @@ --> cooltip presets local preset2_backdrop = {bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]], edgeFile = [[Interface\AddOns\Details\images\border_3]], tile=true, edgeSize = 16, tileSize = 64, insets = {left = 3, right = 3, top = 4, bottom = 4}} + _detalhes.cooltip_preset2_backdrop = preset2_backdrop + local white_table = {1, 1, 1, 1} --"Details BarBorder 3" function _detalhes:CooltipPreset (preset) @@ -768,7 +770,7 @@ GameCooltip:SetOption ("IgnoreButtonAutoHeight", true) GameCooltip:SetColor (1, 0.5, 0.5, 0.5, 0.5) - GameCooltip:SetBackdrop (1, preset2_backdrop, nil, {1, 1, 1, 1}) + GameCooltip:SetBackdrop (1, preset2_backdrop, nil, white_table) end end diff --git a/functions/classes.lua b/functions/classes.lua index bc78fd6d..04470bac 100644 --- a/functions/classes.lua +++ b/functions/classes.lua @@ -118,6 +118,15 @@ do end return self.nome:gsub (("%-.*"), "") end + function _detalhes:GetCLName (id) + local name, realm = UnitName (id) + if (name) then + if (realm and realm ~= "") then + name = name .. "-" .. realm + end + return name + end + end function _detalhes:Class (actor) return self.classe or actor.classe end diff --git a/functions/playerclass.lua b/functions/playerclass.lua index e8577c94..9f435f08 100644 --- a/functions/playerclass.lua +++ b/functions/playerclass.lua @@ -59,7 +59,7 @@ do elseif (c == "PET") then return [[Interface\AddOns\Details\images\classes_small]], 0.25, 0.49609375, 0.75, 1 else - return [[Interface\AddOns\Details\images\classes_small]], _unpack (CLASS_ICON_TCOORDS [c]) + return [[Interface\AddOns\Details\images\classes_small]], _unpack (_detalhes.class_coords [c]) end end diff --git a/functions/profiles.lua b/functions/profiles.lua index 4497436f..49d4a27a 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -859,6 +859,9 @@ local default_profile = { --> if clear graphic data when logout clear_graphic = true, + + --> item level tracker + track_item_level = true, --> text sizes font_sizes = {menus = 10}, diff --git a/functions/slash.lua b/functions/slash.lua index 89878e09..6ff5bb19 100644 --- a/functions/slash.lua +++ b/functions/slash.lua @@ -936,6 +936,42 @@ function SlashCmdList.DETAILS (msg, editbox) print ("outline:",flags) end + elseif (msg == "sell") then + + --sell gray + local c, i, n, v = 0 + for b = 0, 4 do + for s = 1, GetContainerNumSlots(b) do + i = {GetContainerItemInfo (b, s)} + n = i[7] + if n and string.find(n,"9d9d9d") then + v = {GetItemInfo(n)} + q = i[2] + c = c+v[11]*q + UseContainerItem (b, s) + print (n, q) + end + end + end + print(GetCoinText(c)) + + --sell green equip + local c, i, n, v = 0 + for b = 0, 4 do + for s = 1, GetContainerNumSlots(b) do + local texture, itemCount, locked, quality, readable, lootable, itemLink = GetContainerItemInfo (b, s) + if (quality == 2) then --a green item + local itemName, itemLink, itemRarity, itemLevel, _, itemType, itemSubType = GetItemInfo (itemLink) + if (itemType == "Armor" or itemType == "Weapon") then --a weapon or armor + if (itemLevel < 460) then + print ("Selling", itemName, itemType) + UseContainerItem (b, s) + end + end + end + end + end + elseif (msg == "ilvl") then local item_amount = 0 local item_level = 0 diff --git a/functions/spells.lua b/functions/spells.lua index 3acb43f7..fb496867 100644 --- a/functions/spells.lua +++ b/functions/spells.lua @@ -1432,7 +1432,7 @@ do --[29842] = "WARRIOR", --undribled wrath } - -- updated on 24/03/2015 (@Tonyleila - WoWInterface) + -- updated on 30/03/2015 (@Tonyleila - WoWInterface) _detalhes.CrowdControlSpells = { --Racials @@ -1453,7 +1453,7 @@ do --druid [33786] = true, -- Cyclone - [339] = true, -- Entangling Toots + [339] = true, -- Entangling Toots [45334] = true, -- Immobilized (from Wild Charge) [99] = true, -- Incapacitating Roar [22570] = true, -- Maim @@ -1463,6 +1463,7 @@ do [106839] = true, -- Skull Bash [81261] = true, -- Solar Beam [107566] = true, -- Staggering Shout + [16979] = true, -- Wild Charge (talent) --hunter [117405] = true, -- Binding Shot @@ -1480,11 +1481,11 @@ do [58534] = true, -- Deep Freeze [31661] = true, -- Dragon's Breath [33395] = true, -- Freeze (pet) - [122] = true, -- Frost Nova + [122] = true, -- Frost Nova [102051] = true, -- Frostjaw [157997] = true, -- Ice Nova [111340] = true, -- Ice Ward - [118] = true, -- Polymorph sheep + [118] = true, -- Polymorph sheep [28272] = true, -- Polymorph pig [126819] = true, -- Polymorph pig 2 [61305] = true, -- Polymorph black cat @@ -1510,12 +1511,13 @@ do [31935] = true, -- Avenger's Shield [105421] = true, -- Blinding light [105593] = true, -- Fist of Justice - [853] = true, -- Hammer of Justice + [853] = true, -- Hammer of Justice + [96231] = true, -- Rebuke [20066] = true, -- Repentance [145067] = true, -- Turn Evil --priest - [605] = true, -- Dominate Mind + [605] = true, -- Dominate Mind [87194] = true, -- Glyph of Mind Blast [88625] = true, -- Holy Word: Chastise [64044] = true, -- Psychic Horror @@ -1531,7 +1533,7 @@ do [1330] = true, -- Garrote [1776] = true, -- Gouge [1766] = true, -- Kick - [408] = true, -- Kidney shot + [408] = true, -- Kidney shot [6770] = true, -- Sap [76577] = true, -- Smoke Bomb @@ -1552,14 +1554,16 @@ do [5484] = true, -- Howl of terror [115268] = true, -- Mesmerize (shivarra) [6789] = true, -- Mortal Coil - [6358] = true, -- Seduction (succubus + [115781] = true, -- Optical Blast (improved spell lock from Grimoire of Supremacy) + [6358] = true, -- Seduction (succubus) [30283] = true, -- Shadowfury [19647] = true, -- Spell Lock (Felhunters) [31117] = true, -- Unstable Affliction --warrior - [100] = true, -- Charge + [100] = true, -- Charge [105771] = true, -- Charge + [102060] = true, -- Disrupting Shout [118895] = true, -- Dragon Roar [5246] = true, -- Intimidating shout [6552] = true, -- Pummel @@ -1573,7 +1577,7 @@ do --priest [47753] = true, --Divine Aegis (discipline) - [17] = true, --Power Word: Shield (discipline) + [17] = true, --Power Word: Shield (discipline) [114908] = true, --Spirit Shell (discipline) [114214] = true, --Angelic Bulwark (talent) [152118] = true, --Clarity of Will (talent) diff --git a/functions/timedata.lua b/functions/timedata.lua index 0318ac03..8a6106f1 100644 --- a/functions/timedata.lua +++ b/functions/timedata.lua @@ -415,12 +415,22 @@ local get_player_dps = function() local damage_player = _detalhes.tabela_vigente (1, _detalhes.playername) if (damage_player) then - local combat_time = _detalhes.tabela_vigente:GetCombatTime() - if (combat_time > 0) then - return ToKFunctions [_detalhes.minimap.text_format] (_, damage_player.total / combat_time) - else - return 0 + if (_detalhes.time_type == 1) then --activity time + local combat_time = damage_player:Tempo() + if (combat_time > 0) then + return ToKFunctions [_detalhes.minimap.text_format] (_, damage_player.total / combat_time) + else + return 0 + end + else --effective time + local combat_time = _detalhes.tabela_vigente:GetCombatTime() + if (combat_time > 0) then + return ToKFunctions [_detalhes.minimap.text_format] (_, damage_player.total / combat_time) + else + return 0 + end end + return 0 else return 0 end @@ -429,12 +439,22 @@ local get_player_hps = function() local heal_player = _detalhes.tabela_vigente (2, _detalhes.playername) if (heal_player) then - local combat_time = _detalhes.tabela_vigente:GetCombatTime() - if (combat_time > 0) then - return ToKFunctions [_detalhes.minimap.text_format] (_, heal_player.total / combat_time) - else - return 0 + if (_detalhes.time_type == 1) then --activity time + local combat_time = heal_player:Tempo() + if (combat_time > 0) then + return ToKFunctions [_detalhes.minimap.text_format] (_, heal_player.total / combat_time) + else + return 0 + end + else --effective time + local combat_time = _detalhes.tabela_vigente:GetCombatTime() + if (combat_time > 0) then + return ToKFunctions [_detalhes.minimap.text_format] (_, heal_player.total / combat_time) + else + return 0 + end end + return 0 else return 0 end diff --git a/gumps/janela_info.lua b/gumps/janela_info.lua index 24a56950..d1bd2ff2 100644 --- a/gumps/janela_info.lua +++ b/gumps/janela_info.lua @@ -924,7 +924,7 @@ function gump:CriaJanelaInfo() --> tabs: --> tab default - _detalhes:CreatePlayerDetailsTab ("Summary", --[1] tab name + _detalhes:CreatePlayerDetailsTab ("Summary", Loc ["STRING_INFO_TAB_SUMMARY"], --[1] tab name [2] localized name function (tabOBject, playerObject) --[2] condition if (playerObject) then return true @@ -1537,7 +1537,7 @@ function gump:CriaJanelaInfo() --]] end - _detalhes:CreatePlayerDetailsTab ("Avoidance", --[1] tab name + _detalhes:CreatePlayerDetailsTab ("Avoidance", Loc ["STRING_INFO_TAB_AVOIDANCE"], --[1] tab name [2] localized name function (tabOBject, playerObject) --[2] condition if (playerObject.isTank) then return true @@ -2050,13 +2050,19 @@ function gump:CriaJanelaInfo() local label2 = _G ["DetailsPlayerComparisonBox2"].name_label local label3 = _G ["DetailsPlayerComparisonBox3"].name_label + local label2_percent = _G ["DetailsPlayerComparisonBox2"].name_label_percent + local label3_percent = _G ["DetailsPlayerComparisonBox3"].name_label_percent + if (players_to_compare [1]) then label2:SetText (players_to_compare [1]:Name()) + label2_percent:SetText (player:Name() .. " %") end if (players_to_compare [2]) then label3:SetText (players_to_compare [2]:Name()) + label3_percent:SetText (player:Name() .. " %") else - label3:SetText ("Player 3") + label3:SetText ("") + label3_percent:SetText ("") end refresh_comparison_box (DetailsPlayerComparisonBox1) @@ -2802,6 +2808,13 @@ function gump:CriaJanelaInfo() playername2:SetText ("Player 2") frame2.name_label = playername2 + local playername2_percent = frame2:CreateFontString (nil, "overlay", "GameFontHighlightSmall") + playername2_percent:SetPoint ("bottomright", frame2, "topright", -2, 0) + playername2_percent:SetText ("Player 1 %") + playername2_percent:SetTextColor (.6, .6, .6) + + frame2.name_label_percent = playername2_percent + --criar as barras do frame2 for i = 1, 9 do create_bar ("DetailsPlayerComparisonBox2Bar"..i, frame2, i) @@ -2833,6 +2846,12 @@ function gump:CriaJanelaInfo() playername3:SetText ("Player 3") frame3.name_label = playername3 + local playername3_percent = frame3:CreateFontString (nil, "overlay", "GameFontHighlightSmall") + playername3_percent:SetPoint ("bottomright", frame3, "topright", -2, 0) + playername3_percent:SetText ("Player 1 %") + playername3_percent:SetTextColor (.6, .6, .6) + frame3.name_label_percent = playername3_percent + --criar as barras do frame3 for i = 1, 9 do create_bar ("DetailsPlayerComparisonBox3Bar"..i, frame3, i) @@ -2854,7 +2873,7 @@ function gump:CriaJanelaInfo() end -- ~compare - _detalhes:CreatePlayerDetailsTab ("Compare", --[1] tab name + _detalhes:CreatePlayerDetailsTab ("Compare", Loc ["STRING_INFO_TAB_COMPARISON"], --[1] tab name [2] localized name function (tabOBject, playerObject) --[2] condition if (info.atributo > 2) then @@ -2916,6 +2935,23 @@ function gump:CriaJanelaInfo() local tab = _detalhes.player_details_tabs [index] if (tab:condition (info.jogador, info.atributo, info.sub_atributo)) then + + if (tab.tabname == "Compare") then + + --_detalhes:SetTutorialCVar ("DETAILS_INFO_TUTORIAL1", false) + + if (not _detalhes:GetTutorialCVar ("DETAILS_INFO_TUTORIAL1")) then + _detalhes:SetTutorialCVar ("DETAILS_INFO_TUTORIAL1", true) + + local alert = CreateFrame ("frame", "DetailsInfoPopUp1", info, "DetailsHelpBoxTemplate") + alert.ArrowUP:Show() + alert.ArrowGlowUP:Show() + alert.Text:SetText (Loc ["STRING_INFO_TUTORIAL_COMPARISON1"]) + alert:SetPoint ("bottom", tab, "top", 5, 28) + alert:Show() + end + end + tab:Show() amt_positive = amt_positive + 1 tab:SetPoint ("BOTTOMLEFT", info.container_barras, "TOPLEFT", 390 - (67 * (amt_positive-1)), 1) @@ -2951,7 +2987,7 @@ end _detalhes.player_details_tabs = {} -function _detalhes:CreatePlayerDetailsTab (tabname, condition, fillfunction, onclick, oncreate) +function _detalhes:CreatePlayerDetailsTab (tabname, localized_name, condition, fillfunction, onclick, oncreate) if (not tabname) then tabname = "unnamed" end @@ -2959,7 +2995,7 @@ function _detalhes:CreatePlayerDetailsTab (tabname, condition, fillfunction, onc local index = #_detalhes.player_details_tabs local newtab = CreateFrame ("button", "DetailsInfoWindowTab" .. index, info, "ChatTabTemplate") - newtab:SetText (tabname) + newtab:SetText (localized_name) newtab:SetParent (info) newtab:SetFrameStrata ("HIGH") newtab:SetFrameLevel (info:GetFrameLevel()+1) @@ -2967,6 +3003,7 @@ function _detalhes:CreatePlayerDetailsTab (tabname, condition, fillfunction, onc newtab.condition = condition newtab.tabname = tabname + newtab.localized_name = localized_name newtab.onclick = onclick newtab.fillfunction = fillfunction newtab.last_actor = {} diff --git a/gumps/janela_options.lua b/gumps/janela_options.lua index 2dfa4c3b..01ee4fad 100644 --- a/gumps/janela_options.lua +++ b/gumps/janela_options.lua @@ -21,7 +21,7 @@ 16 - data for charts 17 - auto hide settings 18 - misc settings - 19 - externals widgets + 19 - externals widgets (data feed) 20 - tooltip --]] @@ -1806,6 +1806,19 @@ function window:CreateFrame19() window:CreateLineBackground2 (frame19, "BrokerNumberAbbreviateDropdown", "BrokerNumberAbbreviateLabel", Loc ["STRING_OPTIONS_PS_ABBREVIATE_DESC"]) + --> item level tracker + --anchor + g:NewLabel (frame19, _, "$parentItemLevelTrackerAnchor", "ItemLevelTrackerAnchorLabel", Loc ["STRING_OPTIONS_ILVL_TRACKER"], "GameFontNormal") + --switch + g:NewLabel (frame19, _, "$parentItemLevelLabel", "ItemLevelLabel", Loc ["STRING_OPTIONS_ILVL_TRACKER_TEXT"], "GameFontHighlightLeft") + g:NewSwitch (frame19, _, "$parentItemLevelSlider", "ItemLevelSlider", 60, 20, _, _, _detalhes.ilevel:IsTrackerEnabled()) + + frame19.ItemLevelSlider:SetPoint ("left", frame19.ItemLevelLabel, "right", 2, 0) + frame19.ItemLevelSlider.OnSwitch = function (self, _, value) + _detalhes.ilevel:TrackItemLevel (value) + end + window:CreateLineBackground2 (frame19, "ItemLevelSlider", "ItemLevelLabel", Loc ["STRING_OPTIONS_ILVL_TRACKER_DESC"]) + --> anchors: local x = window.left_start_at @@ -1822,6 +1835,8 @@ function window:CreateFrame19() {"brokerAnchorLabel", 6, true}, {"brokerTextLabel", 7}, {"BrokerNumberAbbreviateLabel", 8}, + {"ItemLevelTrackerAnchorLabel", 9, true}, + {"ItemLevelLabel", 10} } window:arrange_menu (frame19, left_side, x, -90) @@ -4095,6 +4110,7 @@ function window:CreateFrame2() _detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance) end local timetypeOptions = { + --localize-me {value = 1, label = "Activity Time", onclick = onSelectTimeType, icon = "Interface\\Icons\\Achievement_Quests_Completed_Daily_08", iconcolor = {1, .9, .9}, texcoord = {0.078125, 0.921875, 0.078125, 0.921875}}, --, desc = "" {value = 2, label = "Effective Time", onclick = onSelectTimeType, icon = "Interface\\Icons\\Achievement_Quests_Completed_08"} --, desc = "" } @@ -10395,6 +10411,8 @@ end --> if not window else _G.DetailsOptionsWindow19HotcornerSlider.MyObject:SetValue (not _detalhes.hotcorner_topleft.hide) end + + _G.DetailsOptionsWindow19ItemLevelSlider.MyObject:SetValue (_detalhes.track_item_level) --> window 20 _G.DetailsOptionsWindow20TooltipTextColorPick.MyObject:SetColor (unpack (_detalhes.tooltip.fontcolor)) diff --git a/images/classes_small_alpha.tga b/images/classes_small_alpha.tga index ddd9fa4b..6b1bb306 100644 Binary files a/images/classes_small_alpha.tga and b/images/classes_small_alpha.tga differ diff --git a/plugins/Details_RaidCheck/Details_RaidCheck.lua b/plugins/Details_RaidCheck/Details_RaidCheck.lua index 9dec65f4..46c8b2c7 100644 --- a/plugins/Details_RaidCheck/Details_RaidCheck.lua +++ b/plugins/Details_RaidCheck/Details_RaidCheck.lua @@ -472,6 +472,7 @@ local runes_id = { if (self.one_second > 5) then self.one_second = 0 local ilvl = "" + local average = 0 for _, ilvl_char in ipairs (_detalhes.ilevel:GetInOrder()) do local _, class = _UnitClass (ilvl_char [1]) @@ -480,18 +481,25 @@ local runes_id = { local class_color = "|TInterface\\AddOns\\Details\\images\\classes_small_alpha:12:12:0:-5:128:128:" .. coords[1]*128 .. ":" .. coords[2]*128 .. ":" .. coords[3]*128 .. ":" .. coords[4]*128 .. "|t |c" .. RAID_CLASS_COLORS [class].colorStr ilvl = ilvl .. class_color .. DetailsRaidCheck:GetOnlyName (ilvl_char [1]) .. "|r: " .. floor (ilvl_char[2]) .. "\n" + average = average + ilvl_char[2] amount7 = amount7 + 1 end end - self.last_ilvl_amount = amount7 + average = average / amount7 + ilvl = ilvl .. "\n" + ilvl = ilvl .. "|TInterface\\TARGETINGFRAME\\PetBadge-Humanoid:12:12:0:-5:32:32:2:30:2:30|t Average: " .. format ("%.2f", average) .. "\n" + ilvl_str:SetText (ilvl) + + self.last_ilvl_amount = amount7 + 2 else amount7 = self.last_ilvl_amount or 0 end --t.name, t.ilvl, t.time --best food + --[[ local b = "" for name, foodid in pairs (DetailsRaidCheck.havefood_table) do if (best_food [foodid]) then @@ -510,6 +518,7 @@ local runes_id = { end end bestfood_str:SetText (b) + --]] --food local s, f, p, n = "", "", "", "" diff --git a/startup.lua b/startup.lua index d8385fa5..21c40bd0 100644 --- a/startup.lua +++ b/startup.lua @@ -78,7 +78,7 @@ function _G._detalhes:Start() --> bookmarks if (self.switch.InitSwitch) then - self.switch:InitSwitch() + --self.switch:InitSwitch() end --> custom window