From ab0d4c1f24835de4cdfce11e1d68e25abb1fba20 Mon Sep 17 00:00:00 2001 From: Tercio Date: Sun, 25 Sep 2016 18:18:07 -0300 Subject: [PATCH] - more fixes for dungeon trash being tag as a dungeon boss. - more fixes for item level discovery. - more spells added to spell customization. --- Libs/DF/fw.lua | 40 ++++++++++++++++++++++++++++++++- boot.lua | 6 +++-- classes/container_historico.lua | 21 +++++++++-------- core/control.lua | 29 ++++++++++++------------ core/gears.lua | 28 +++++++++++++++++++---- core/parser.lua | 25 ++++++++++++++------- core/timemachine.lua | 2 +- functions/spellcache.lua | 5 ++--- 8 files changed, 112 insertions(+), 44 deletions(-) diff --git a/Libs/DF/fw.lua b/Libs/DF/fw.lua index 5d9eb5eb..087badb5 100644 --- a/Libs/DF/fw.lua +++ b/Libs/DF/fw.lua @@ -1,5 +1,5 @@ -local dversion = 45 +local dversion = 46 local major, minor = "DetailsFramework-1.0", dversion local DF, oldminor = LibStub:NewLibrary (major, minor) @@ -115,6 +115,7 @@ local embed_functions = { "CreateAnimation", "CreateScrollBox", "CreateBorder", + "FormatNumber", } DF.table = {} @@ -217,6 +218,43 @@ DF.www_icons = { mmoc = {0, 0.7890625, 80/123, 123/128}, } +local symbol_1K, symbol_10K, symbol_1B +if (GetLocale() == "koKR") then + symbol_1K, symbol_10K, symbol_1B = "천", "만", "억" +elseif (GetLocale() == "zhCN") then + symbol_1K, symbol_10K, symbol_1B = "천", "万", "亿" +elseif (GetLocale() == "zhTW") then + symbol_1K, symbol_10K, symbol_1B = "천", "萬", "億" +end + +if (symbol_1K) then + function DF.FormatNumber (numero) + if (numero > 99999999) then + return format ("%.2f", numero/100000000) .. symbol_1B + elseif (numero > 999999) then + return format ("%.2f", numero/10000) .. symbol_10K + elseif (numero > 99999) then + return floor (numero/10000) .. symbol_10K + elseif (numero > 9999) then + return format ("%.1f", (numero/10000)) .. symbol_10K + elseif (numero > 999) then + return format ("%.1f", (numero/1000)) .. symbol_1K + end + return format ("%.1f", numero) + end +else + function DF.FormatNumber (numero) + if (numero > 999999) then + return format ("%.2f", numero/1000000) .. "M" + elseif (numero > 99999) then + return floor (numero/1000) .. "K" + elseif (numero > 999) then + return format ("%.1f", (numero/1000)) .. "K" + end + return format ("%.1f", numero) + end +end + function DF:IntegerToTimer (value) return "" .. floor (value/60) .. ":" .. format ("%02.f", value%60) end diff --git a/boot.lua b/boot.lua index 5f59deb5..e6d5fe6a 100644 --- a/boot.lua +++ b/boot.lua @@ -3,7 +3,7 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.build_counter = 2984 + _detalhes.build_counter = 2994 _detalhes.userversion = "v7.0.3." .. _detalhes.build_counter _detalhes.realversion = 113 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" @@ -22,6 +22,8 @@ do --[[ |cFFFFFF00v7.0.3.2984 (|cFFFFCC00September 22th, 2016|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r |cFF0088EE[Devilsaur Shock-Baton]|r added to custom spells, its effect should be displayed: 'Devilsaur Shock Leash (trinket)'.\n\n +|cFFFFFF00-|r More fixes for dungeon trash being tag as a dungeon boss.\n\n |cFFFFFF00-|r Fixed the item level calculation when the player is using a main hand and offhand artifact.\n\n |cFFFFFF00-|r Added option to auto erase world segments (outdoors, e.g. doing world quests).\n\n |cFFFFFF00-|r Fixed the avoidance tab on the player detail window for Demon Hunters.\n\n @@ -31,7 +33,7 @@ do --]] -- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v7.0.3.2984 (|cFFFFCC00September 22th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed the item level calculation when the player is using a main hand and offhand artifact.\n\n|cFFFFFF00-|r Added option to auto erase world segments (outdoors, e.g. doing world quests).\n\n|cFFFFFF00-|r Fixed the avoidance tab on the player detail window for Demon Hunters.\n\n|cFFFFFF00-|r Added the tag {target} on custom text for the interrupt announcer.\n\n|cFFFFFF00-|r Merging Demon Hunter 'Fury of the Illidari' spell when the consolidade option is enabled under Spell Customization.\n\n|cFFFFFF00v7.0.3.2961 (|cFFFFCC00September 17th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option for consolidade spells with the same name (isn't working with all spells yet).\nThe option is under Spell Customization on options panel.\n\n|cFFFFFF00v7.0.3.2955 (|cFFFFCC00September 14th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Built-in custom displays has been updated to Legion.\n\n|cFFFFFF00-|r Raid Check (plugin) now checks for Legion food, rune and flash.\n\n|cFFFFFF00-|r removed the config button from the Player Details Window.\n\n|cFFFFFF00-|r the alert for this news window won't popup for each characters after the player opened it once for the update.\n\n|cFFFFFF00-|r added tooltip information for the two new arenas added in Legion.\n\n|cFFFFFF00v7.0.3.2941 (|cFFFFCC00September 13th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r fix for total bar where sometimes it desappears.\n\n|cFFFFFF00-|r fix for overall data reseting its elapsed time making dps and hps goes to millions.\n\n|cFFFFFF00-|r fix for overall not reseting when entering in a new dungeon.\n\n|cFFFFFF00-|r fix for trash cleanup on dungeons.\n\n|cFFFFFF00-|r fix for item level detection on dungeons.\n\n|cFFFFFF00-|r fix for artifact offhand always being counter as 750 item level.\n\n|cFFFFFF00-|r fix for segments menu sometimes not opening at all after a dungeon boss.\n\n|cFFFFFF00-|r fix for segments menu not showing the boss icon above the sub panel.\n\n|cFFFFFF00-|r fix for the top left corner of the window be ignoring the 'hide icon' setting at a /reload.\n\n|cFFFFFF00v7.0.3.2927 (|cFFFFCC00September 3rd, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Attempt to fix an issue with total bar hidding the latest bar shown.\n\n|cFFFFFF00v7.0.3.2899 (|cFFFFCC00August 26, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed a bug on tiny threat where it won't used the font set after a /reload.\n\n|cFFFFFF00-|r Bar spacing can now be set to -2 to 10 (from 0 to 10).\n\n|cFFFFFF00-|r Attempt to fix GBoM and Stormlash on dungeon boss fights.\n\n|cFFFFFF00v5.21 (|cFFFFCC00August 14, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for Monk's Soothing Mist on Streamer Plugin.\n\n|cFFFFFF00v5.20 (|cFFFFCC00August 13, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Warlock's Grimoire of Synergy buff uptime fix.\n\n|cFFFFFF00-|r Fix for the options panel background when using Classic panels.\n\n|cFFFFFF00-|r Tooltips are now slightly bigger.\n\n|cFFFFFF00-|r Fix for bookmark background where sometimes it has a light silver color.\n\n|cFFFFFF00-|r Fix for channel cast on Streamer Plugin.\n\n|cFFFFFF00-|r Legion followers fix.\n\n|cFFFFFF00-|r Boss detection for Legion dungeons.\n\n|cFFFFFF00-|r Priest spec detection review (thanks Yakumile-Azralon).\n\n|cFFFFFF00v5.15 (|cFFFFCC00August 5, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r fix for an error which happen sometimes during encounter start.\n\n|cFFFFFF00v5.14 (|cFFFFCC00August 2, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added outline option for bar's Left Text (experimental).\n\n|cFFFFFF00-|r 'Minimalistic' is once again the default skin for new windows, changed from the 'Safe Beta Skin'.\n\n|cFFFFFF00-|r Fixed some issues with spec detection and LibGroupInSpecT-1.1 has need enabled back again.\n\n|cFFFFFF00-|r Fixed an issue with micro displays not loading settings after a logon.\n\n|cFFFFFF00-|r Another wave of workarounds to prevent the client image cache bug.\n\n|cFFFFFF00-|r fixed the spam of 'segment not added to overall'.\n\n|cFFFFFF00-|r stormlash and blessing of might workarouds.\n\n|cFFFFFF00-|r warrior rampage fix.\n\n|cFFFFFF00-|r hunter throw axe fix.\n\n|cFFFFFF00v5.10c (|cFFFFCC00July 22, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Trying a workaround for the wow client's texture cache bug which causes FPS drops, please delete the file 'spec_icons_normal.TGA' from details/image folder.\n\n|cFFFFFF00v5.10b (|cFFFFCC00July 21, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed warlock's Soul Effigy.\n\n|cFFFFFF00v5.10a (|cFFFFCC00July 20, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with Calc Leech plugin.\n\n|cFFFFFF00v5.10 (|cFFFFCC00July 19, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Using .BLP format for images. If you have FPS drops caused by Details!, delete ALL .TGA files inside the folder Details/Images/\n\n|cFFFFFF00v5.8 (|cFFFFCC00July 11, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Big framework update. May have some bugs, please report to us if you find any.\n\n|cFFFFFF00v5.8 (|cFFFFCC00June 27, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Energy and Resources are working properly now.\n\n|cFFFFFF00-|r Added raid information for The Emerald Nightmare.\n\n|cFFFFFF00v5.7 (|cFFFFCC00June 16, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Most of the raid plugins got added on this version.\n\n|cFFFFFF00-|r Plugin 'Damage, The Game!' also got damage goals updated.\n\n|cFFFFFF00v5.5 (|cFFFFCC00June 03, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Default skin is now 'Safe Skin Legion Beta' which helps a little with the disabled texture issue.\n|cFFFFFF00-|r If you're using another skin, you may change at the options panel /details options > Skin Selection.\n|cFFFFFF00-|r You also can disable the class icons at Bars: General > Icon File." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v7.0.3.2994 (|cFFFFCC00September 25th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r |cFF0088EE[Devilsaur Shock-Baton]|r added to custom spells, its effect should be displayed: 'Devilsaur Shock Leash (trinket)'.\n\n|cFFFFFF00-|r More fixes for dungeon trash being tag as a dungeon boss.\n\n|cFFFFFF00-|r Fixed the item level calculation when the player is using a main hand and offhand artifact.\n\n|cFFFFFF00-|r Added option to auto erase world segments (outdoors, e.g. doing world quests).\n\n|cFFFFFF00-|r Fixed the avoidance tab on the player detail window for Demon Hunters.\n\n|cFFFFFF00-|r Added the tag {target} on custom text for the interrupt announcer.\n\n|cFFFFFF00-|r Merging Demon Hunter 'Fury of the Illidari' spell when the consolidade option is enabled under Spell Customization.\n\n|cFFFFFF00v7.0.3.2961 (|cFFFFCC00September 17th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option for consolidade spells with the same name (isn't working with all spells yet).\nThe option is under Spell Customization on options panel.\n\n|cFFFFFF00v7.0.3.2955 (|cFFFFCC00September 14th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Built-in custom displays has been updated to Legion.\n\n|cFFFFFF00-|r Raid Check (plugin) now checks for Legion food, rune and flash.\n\n|cFFFFFF00-|r removed the config button from the Player Details Window.\n\n|cFFFFFF00-|r the alert for this news window won't popup for each characters after the player opened it once for the update.\n\n|cFFFFFF00-|r added tooltip information for the two new arenas added in Legion.\n\n|cFFFFFF00v7.0.3.2941 (|cFFFFCC00September 13th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r fix for total bar where sometimes it desappears.\n\n|cFFFFFF00-|r fix for overall data reseting its elapsed time making dps and hps goes to millions.\n\n|cFFFFFF00-|r fix for overall not reseting when entering in a new dungeon.\n\n|cFFFFFF00-|r fix for trash cleanup on dungeons.\n\n|cFFFFFF00-|r fix for item level detection on dungeons.\n\n|cFFFFFF00-|r fix for artifact offhand always being counter as 750 item level.\n\n|cFFFFFF00-|r fix for segments menu sometimes not opening at all after a dungeon boss.\n\n|cFFFFFF00-|r fix for segments menu not showing the boss icon above the sub panel.\n\n|cFFFFFF00-|r fix for the top left corner of the window be ignoring the 'hide icon' setting at a /reload.\n\n|cFFFFFF00v7.0.3.2927 (|cFFFFCC00September 3rd, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Attempt to fix an issue with total bar hidding the latest bar shown.\n\n|cFFFFFF00v7.0.3.2899 (|cFFFFCC00August 26, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed a bug on tiny threat where it won't used the font set after a /reload.\n\n|cFFFFFF00-|r Bar spacing can now be set to -2 to 10 (from 0 to 10).\n\n|cFFFFFF00-|r Attempt to fix GBoM and Stormlash on dungeon boss fights.\n\n|cFFFFFF00v5.21 (|cFFFFCC00August 14, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for Monk's Soothing Mist on Streamer Plugin.\n\n|cFFFFFF00v5.20 (|cFFFFCC00August 13, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Warlock's Grimoire of Synergy buff uptime fix.\n\n|cFFFFFF00-|r Fix for the options panel background when using Classic panels.\n\n|cFFFFFF00-|r Tooltips are now slightly bigger.\n\n|cFFFFFF00-|r Fix for bookmark background where sometimes it has a light silver color.\n\n|cFFFFFF00-|r Fix for channel cast on Streamer Plugin.\n\n|cFFFFFF00-|r Legion followers fix.\n\n|cFFFFFF00-|r Boss detection for Legion dungeons.\n\n|cFFFFFF00-|r Priest spec detection review (thanks Yakumile-Azralon).\n\n|cFFFFFF00v5.15 (|cFFFFCC00August 5, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r fix for an error which happen sometimes during encounter start.\n\n|cFFFFFF00v5.14 (|cFFFFCC00August 2, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added outline option for bar's Left Text (experimental).\n\n|cFFFFFF00-|r 'Minimalistic' is once again the default skin for new windows, changed from the 'Safe Beta Skin'.\n\n|cFFFFFF00-|r Fixed some issues with spec detection and LibGroupInSpecT-1.1 has need enabled back again.\n\n|cFFFFFF00-|r Fixed an issue with micro displays not loading settings after a logon.\n\n|cFFFFFF00-|r Another wave of workarounds to prevent the client image cache bug.\n\n|cFFFFFF00-|r fixed the spam of 'segment not added to overall'.\n\n|cFFFFFF00-|r stormlash and blessing of might workarouds.\n\n|cFFFFFF00-|r warrior rampage fix.\n\n|cFFFFFF00-|r hunter throw axe fix.\n\n|cFFFFFF00v5.10c (|cFFFFCC00July 22, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Trying a workaround for the wow client's texture cache bug which causes FPS drops, please delete the file 'spec_icons_normal.TGA' from details/image folder.\n\n|cFFFFFF00v5.10b (|cFFFFCC00July 21, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed warlock's Soul Effigy.\n\n|cFFFFFF00v5.10a (|cFFFFCC00July 20, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with Calc Leech plugin.\n\n|cFFFFFF00v5.10 (|cFFFFCC00July 19, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Using .BLP format for images. If you have FPS drops caused by Details!, delete ALL .TGA files inside the folder Details/Images/\n\n|cFFFFFF00v5.8 (|cFFFFCC00July 11, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Big framework update. May have some bugs, please report to us if you find any.\n\n|cFFFFFF00v5.8 (|cFFFFCC00June 27, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Energy and Resources are working properly now.\n\n|cFFFFFF00-|r Added raid information for The Emerald Nightmare.\n\n|cFFFFFF00v5.7 (|cFFFFCC00June 16, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Most of the raid plugins got added on this version.\n\n|cFFFFFF00-|r Plugin 'Damage, The Game!' also got damage goals updated.\n\n|cFFFFFF00v5.5 (|cFFFFCC00June 03, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Default skin is now 'Safe Skin Legion Beta' which helps a little with the disabled texture issue.\n|cFFFFFF00-|r If you're using another skin, you may change at the options panel /details options > Skin Selection.\n|cFFFFFF00-|r You also can disable the class icons at Bars: General > Icon File." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/classes/container_historico.lua b/classes/container_historico.lua index 90f004c3..a1916a08 100644 --- a/classes/container_historico.lua +++ b/classes/container_historico.lua @@ -180,7 +180,8 @@ function historico:adicionar (tabela) _detalhes:Msg ("(debug) overall data flag match with the current combat.") end if (InCombatLockdown()) then - _detalhes.schedule_add_to_overall = true + _detalhes.schedule_add_to_overall = _detalhes.schedule_add_to_overall or {} + tinsert (_detalhes.schedule_add_to_overall, tabela) if (_detalhes.debug) then _detalhes:Msg ("(debug) player is in combat, scheduling overall addition.") end @@ -351,6 +352,10 @@ function historico:resetar_overall() instancia:ReajustaGump() end end + + if (_detalhes.schedule_add_to_overall) then + wipe (_detalhes.schedule_add_to_overall) + end end _detalhes:ClockPluginTickOnSegment() @@ -381,6 +386,10 @@ function historico:resetar() _table_wipe (_detalhes.tabela_overall) _table_wipe (_detalhes.spellcache) + if (_detalhes.schedule_add_to_overall) then + wipe (_detalhes.schedule_add_to_overall) + end + _detalhes:LimparPets() _detalhes:ResetSpecCache (true) --> forar @@ -428,16 +437,6 @@ function historico:resetar() _detalhes:SendEvent ("DETAILS_DATA_RESET", nil, nil) - --if (InCombatLockdown() and UnitAffectingCombat ("player")) then - -- _detalhes:ScheduleTimer ("DelayCheckCombat", 1) - --end - -end - -function _detalhes:DelayCheckCombat() - if (InCombatLockdown() and UnitAffectingCombat ("player") and not _detalhes.in_combat) then - _detalhes:EntrarEmCombate() - end end function _detalhes.refresh:r_historico (este_historico) diff --git a/core/control.lua b/core/control.lua index 577282c0..8302644b 100644 --- a/core/control.lua +++ b/core/control.lua @@ -296,9 +296,10 @@ -- ~start ~inicio ~novo ovo function _detalhes:EntrarEmCombate (...) - if (_detalhes.debug) then - _detalhes:Msg ("(debug) started a new combat.") + _detalhes:Msg ("(debug) |cFFFFFF00started a new combat|r|cFFFF7700", _detalhes.encounter_table and _detalhes.encounter_table.name or "") + local from = debugstack (2, 1, 0) + print (from) end if (not _detalhes.tabela_historico.tabelas[1]) then @@ -375,19 +376,19 @@ if (_detalhes:IsInInstance() or _detalhes.debug) then if (not _detalhes:CaptureIsAllEnabled()) then _detalhes:ScheduleSendCloudRequest() - if (_detalhes.debug) then - _detalhes:Msg ("(debug) requesting a cloud server.") - end + --if (_detalhes.debug) then + -- _detalhes:Msg ("(debug) requesting a cloud server.") + --end end else - if (_detalhes.debug) then - _detalhes:Msg ("(debug) isn't inside a registred instance", _detalhes:IsInInstance()) - end + --if (_detalhes.debug) then + -- _detalhes:Msg ("(debug) isn't inside a registred instance", _detalhes:IsInInstance()) + --end end else - if (_detalhes.debug) then - _detalhes:Msg ("(debug) isn't in group or cloud is turned off", _detalhes.in_group, _detalhes.cloud_capture) - end + --if (_detalhes.debug) then + -- _detalhes:Msg ("(debug) isn't in group or cloud is turned off", _detalhes.in_group, _detalhes.cloud_capture) + --end end --> hide / alpha / switch in combat @@ -429,7 +430,7 @@ function _detalhes:SairDoCombate (bossKilled, from_encounter_end) if (_detalhes.debug) then - _detalhes:Msg ("(debug) ended a combat.") + _detalhes:Msg ("(debug) |cFFFFFF00ended a combat|r|cFFFF7700", _detalhes.encounter_table and _detalhes.encounter_table.name or "") end --> in case of something somehow someway call to close the same combat a second time. @@ -573,8 +574,8 @@ end if (_detalhes.debug) then - _detalhes:Msg ("(debug) forcing equalize actors behavior.") - _detalhes:EqualizeActorsSchedule (_detalhes.host_of) + -- _detalhes:Msg ("(debug) forcing equalize actors behavior.") + -- _detalhes:EqualizeActorsSchedule (_detalhes.host_of) end --> verifica memoria diff --git a/core/gears.lua b/core/gears.lua index 9b7d14c1..90ba5ed6 100644 --- a/core/gears.lua +++ b/core/gears.lua @@ -1070,6 +1070,7 @@ local MAX_INSPECT_AMOUNT = 1 local MIN_ILEVEL_TO_STORE = 50 local LOOP_TIME = 7 +--if the item is an artifact off-hand, get the item level of the main hand local artifact_offhands = { ["133959"] = true, --mage fire ["128293"] = true, --dk frost @@ -1078,7 +1079,6 @@ local artifact_offhands = { ["128859"] = true, --druid feral ["128822"] = true, --druid guardian ["133948"] = true, --monk ww - ["128866"] = true, --paladin prot ["133958"] = true, --priest shadow ["128869"] = true, --rogue assassination ["134552"] = true, --rogue outlaw @@ -1086,8 +1086,13 @@ local artifact_offhands = { ["128936"] = true, --shaman elemental ["128873"] = true, --shaman en ["128934"] = true, --shaman resto - ["137246"] = true, --warlock demo - ["128289"] = true, --warrior prot +} + +--if the artifact has its main piece as the offhand, when scaning the main hand get the ilevel of the off-hand. +local offhand_ismain = { + ["137246"] = true, --warlock demo / spine of thalkiel + ["128288"] = true, --warrior prot / scaleshard + ["128867"] = true, --paladin prot / oathseeker } function _detalhes:IlvlFromNetwork (player, realm, core, ilvl) @@ -1132,7 +1137,22 @@ function ilvl_core:CalcItemLevel (unitid, guid, shout) --> upgrades handle by LibItemUpgradeInfo-1.0 --> http://www.wowace.com/addons/libitemupgradeinfo-1-0/ - if (equip_id == 17) then + if (equip_id == 16) then --main hand + local itemId = select (2, strsplit (":", item)) + --print (itemId, offhand_ismain [itemId], UnitName (unitid)) + --128867 nil Lithedora EmeraldDream + if (offhand_ismain [itemId]) then + local offHand = GetInventoryItemLink (unitid, 17) + if (offHand) then + local iName, _, itemRarity, offHandILevel, _, _, _, _, equipSlot = GetItemInfo (offHand) + if (offHandILevel) then + item = offHand + iLevel = offHandILevel + end + end + end + + elseif (equip_id == 17) then --off-hand local itemId = select (2, strsplit (":", item)) if (artifact_offhands [itemId]) then local mainHand = GetInventoryItemLink (unitid, 16) diff --git a/core/parser.lua b/core/parser.lua index 302f8857..e2b6b149 100644 --- a/core/parser.lua +++ b/core/parser.lua @@ -3513,7 +3513,7 @@ SPELL_POWER_OBSOLETE2 = 15; function _detalhes.parser_functions:ENCOUNTER_START (...) if (_detalhes.debug) then - _detalhes:Msg ("(debug) ENCOUNTER_START event triggered.") + _detalhes:Msg ("(debug) |cFFFFFF00ENCOUNTER_START|r event triggered.") end _detalhes.latest_ENCOUNTER_END = _detalhes.latest_ENCOUNTER_END or 0 @@ -3585,7 +3585,14 @@ SPELL_POWER_OBSOLETE2 = 15; function _detalhes.parser_functions:ENCOUNTER_END (...) if (_detalhes.debug) then - _detalhes:Msg ("(debug) ENCOUNTER_END event triggered.") + _detalhes:Msg ("(debug) |cFFFFFF00ENCOUNTER_END|r event triggered.") + end + + if (_detalhes.zone_type == "party") then + if (_detalhes.debug) then + _detalhes:Msg ("(debug) the zone type is 'party', ignoring ENCOUNTER_END.") + end + return end local encounterID, encounterName, difficultyID, raidSize, endStatus = _select (1, ...) @@ -3677,19 +3684,21 @@ SPELL_POWER_OBSOLETE2 = 15; if (_detalhes.schedule_remove_overall) then if (_detalhes.debug) then - _detalhes:Msg ("(debug) found schedule overall data deletion.") + _detalhes:Msg ("(debug) found schedule overall data clean up.") end _detalhes.schedule_remove_overall = false _detalhes.tabela_historico:resetar_overall() end - if (_detalhes.schedule_add_to_overall) then + if (_detalhes.schedule_add_to_overall and _detalhes.schedule_add_to_overall [1]) then if (_detalhes.debug) then - _detalhes:Msg ("(debug) found schedule overall data addition.") + _detalhes:Msg ("(debug) adding ", #_detalhes.schedule_add_to_overall, "combats in queue to overall data.") + end + + for i = #_detalhes.schedule_add_to_overall, 1, -1 do + local CombatToAdd = tremove (_detalhes.schedule_add_to_overall, i) + _detalhes.historico:adicionar_overall (CombatToAdd) end - _detalhes.schedule_add_to_overall = false - - _detalhes.historico:adicionar_overall (_detalhes.tabela_vigente) end if (_detalhes.schedule_store_boss_encounter) then diff --git a/core/timemachine.lua b/core/timemachine.lua index edd0f6d7..dd084a14 100644 --- a/core/timemachine.lua +++ b/core/timemachine.lua @@ -145,7 +145,7 @@ timeMachine.tabelas [tipo] = t if (_detalhes.debug) then - _detalhes:Msg ("timemachine r"..removed.."| e"..#t.."| t"..tipo) + --_detalhes:Msg ("timemachine r"..removed.."| e"..#t.."| t"..tipo) end end end diff --git a/functions/spellcache.lua b/functions/spellcache.lua index 6a9da38c..98602c90 100644 --- a/functions/spellcache.lua +++ b/functions/spellcache.lua @@ -79,9 +79,6 @@ do [158417] = {name = GetSpellInfo (158417) .. " (" .. Loc ["STRING_WAVE"] .. " #2)"}, --> Twins Ogron Pulverize waves. [158420] = {name = GetSpellInfo (158420) .. " (" .. Loc ["STRING_WAVE"] .. " #3)"}, --> Twins Ogron Pulverize waves. - [158159] = {name = GetSpellInfo (158159) .. ""}, --> Twins Ogron Charge. - [177608] = {name = GetSpellInfo (177608) .. " (copies)"}, --> Twins Ogron Charge. - [59638] = {name = GetSpellInfo (59638) .. " (" .. Loc ["STRING_MIRROR_IMAGE"] .. ")"}, --> Mirror Image's Frost Bolt (mage) [88082] = {name = GetSpellInfo (88082) .. " (" .. Loc ["STRING_MIRROR_IMAGE"] .. ")"}, --> Mirror Image's Fireball (mage) @@ -94,6 +91,8 @@ do [213786] = {name = GetSpellInfo (213786) .. " (trinket)"}, [214350] = {name = GetSpellInfo (214350) .. " (trinket)"}, + [224078] = {name = GetSpellInfo (224078) .. " (trinket)"}, + } function _detalhes:UserCustomSpellUpdate (index, name, icon)