From 5773dc14b5ad9987d47b1a8a2dd87148c5dc00a1 Mon Sep 17 00:00:00 2001 From: Tercio Date: Sun, 9 Oct 2016 20:57:11 -0300 Subject: [PATCH] - debug player table creation. - fix akaari's soul. --- boot.lua | 17 ++--- classes/container_combatentes.lua | 14 +++- core/control.lua | 112 ++++++++++++++++++++++++++++++ core/network.lua | 38 ++++++++++ functions/slash.lua | 17 ++++- 5 files changed, 185 insertions(+), 13 deletions(-) diff --git a/boot.lua b/boot.lua index e6d5fe6a..7de56aaa 100644 --- a/boot.lua +++ b/boot.lua @@ -3,9 +3,9 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.build_counter = 2994 + _detalhes.build_counter = 3057 _detalhes.userversion = "v7.0.3." .. _detalhes.build_counter - _detalhes.realversion = 113 --core version + _detalhes.realversion = 114 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" Details = _detalhes @@ -21,19 +21,13 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ -|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 -|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.3057 (|cFFFFCC00October 09th, 2016|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r attempt to make all Details! users on the party or raid to track rogue's akaari's soul.\n\n --]] -- - 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_VERSION_LOG"] = "|cFFFFFF00v7.0.3.3057 (|cFFFFCC00October 09th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r attempt to make all Details! users on the party or raid to track rogue's akaari's soul.\n\n|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 " @@ -43,6 +37,7 @@ do _detalhes.__index = _detalhes _detalhes._tempo = time() _detalhes.debug = false + _detalhes.debug_chr = false _detalhes.opened_windows = 0 _detalhes.last_combat_time = 0 diff --git a/classes/container_combatentes.lua b/classes/container_combatentes.lua index 8b611e69..f99e33be 100644 --- a/classes/container_combatentes.lua +++ b/classes/container_combatentes.lua @@ -454,7 +454,7 @@ --> não achou, criar elseif (criar) then - + local novo_objeto = self.funcao_de_criacao (_, serial, nome) novo_objeto.nome = nome novo_objeto.flag_original = flag @@ -606,6 +606,18 @@ novo_objeto.pvp = true end + if (_detalhes.debug) then + if (_detalhes.debug_chr and nome:find (_detalhes.debug_chr) and self.tipo == 1) then + local logLine = "" + local when = "[" .. date ("%H:%M:%S") .. format (".%4f", GetTime()-floor (GetTime())) .. "]" + local log = "actor created - class: " .. (novo_objeto.classe or "noclass") + local from = debugstack (2, 1, 0) + logLine = logLine .. when .. " " .. log .. " " .. from .. "\n" + + _detalhes_global.debug_chr_log = _detalhes_global.debug_chr_log .. logLine + end + end + return novo_objeto, dono_do_pet, nome else return nil, nil, nil diff --git a/core/control.lua b/core/control.lua index 8302644b..317581b0 100644 --- a/core/control.lua +++ b/core/control.lua @@ -691,6 +691,8 @@ if ((tempo_do_combate >= _detalhes.minimum_combat_time or not _detalhes.tabela_historico.tabelas[1]) and not _detalhes.tabela_vigente.discard_segment) then _detalhes.tabela_historico:adicionar (_detalhes.tabela_vigente) --move a tabela atual para dentro do histórico + + _detalhes:CanSendMissData() else invalid_combat = _detalhes.tabela_vigente @@ -922,6 +924,116 @@ end + local validSpells = { + [220893] = {class = "ROGUE", spec = 261, maxPercent = 0.075, container = 1, commID = "MISSDATA_ROGUE_SOULRIP"}, + --[11366] = {class = "MAGE", spec = 63, maxPercent = 0.9, container = 1, commID = "MISSDATA_ROGUE_SOULRIP"}, + } + function _detalhes:CanSendMissData() + if (not IsInRaid() and not IsInGroup()) then + return + end + local _, playerClass = UnitClass ("player") + local specIndex = GetSpecialization() + local playerSpecID + if (specIndex) then + playerSpecID = GetSpecializationInfo (specIndex) + end + + if (playerSpecID and playerClass) then + for spellID, t in pairs (validSpells) do + if (playerClass == t.class and playerSpecID == t.spec) then + _detalhes:SendMissData (spellID, t.container, _detalhes.network.ids [t.commID]) + end + end + end + return false + end + + function _detalhes:SendMissData (spellID, containerType, commID) + local combat = _detalhes.tabela_vigente + if (combat) then + local damageActor = combat (containerType, _detalhes.playername) + if (damageActor) then + local spell = damageActor.spells:GetSpell (spellID) + if (spell) then + local data = { + [1] = containerType, + [2] = spellID, + [3] = spell.total, + [4] = spell.counter + } + + if (_detalhes.debug) then + _detalhes:Msg ("(debug) sending miss data packet:", spellID, containerType, commID) + end + + _detalhes:SendRaidOrPartyData (commID, data) + end + end + end + end + + function _detalhes.HandleMissData (playerName, data) + local combat = _detalhes.tabela_vigente + + if (_detalhes.debug) then + _detalhes:Msg ("(debug) miss data received from:", playerName, "spellID:", data [2], data [3], data [4]) + end + + if (combat) then + local containerType = data[1] + if (type (containerType) ~= "number" or containerType < 1 or containerType > 4) then + return + end + + local damageActor = combat (containerType, playerName) + if (damageActor) then + local spellID = data[2] --a spellID has been passed? + if (not spellID or type (spellID) ~= "number") then + return + end + + local validateSpell = validSpells [spellID] + if (not validateSpell) then --is a valid spell? + return + end + + --does the target player fit in the spell requirement on OUR end? + local class, spec, maxPercent = validateSpell.class, validateSpell.spec, validateSpell.maxPercent + if (class ~= damageActor.classe or spec ~= damageActor.spec) then + return + end + + local total, counter = data[3], data[4] + if (type (total) ~= "number" or type (counter) ~= "number") then + return + end + + if (total > (damageActor.total * maxPercent)) then + return + end + + local spellObject = damageActor.spells:PegaHabilidade (spellID, true) + if (spellObject) then + if (spellObject.total < total and total > 0 and damageActor.nome ~= _detalhes.playername) then + local difference = total - spellObject.total + if (difference > 0) then + spellObject.total = total + spellObject.counter = counter + damageActor.total = damageActor.total + difference + + combat [containerType].need_refresh = true + + if (_detalhes.debug) then + _detalhes:Msg ("(debug) miss data successful added from:", playerName, data [2], "difference:", difference) + end + end + end + end + end + end + end + function _detalhes:MakeEqualizeOnActor (player, realm, receivedActor) local combat = _detalhes:GetCombat ("current") diff --git a/core/network.lua b/core/network.lua index ca723da2..0643df98 100644 --- a/core/network.lua +++ b/core/network.lua @@ -41,6 +41,8 @@ local CONST_CLOUD_DATARC = "CE" local CONST_CLOUD_EQUALIZE = "EQ" + local CONST_ROGUE_SR = "SR" --soul rip from akaari's soul (LEGION ONLY) + _detalhes.network.ids = { ["HIGHFIVE_REQUEST"] = CONST_HIGHFIVE_REQUEST, ["HIGHFIVE_DATA"] = CONST_HIGHFIVE_DATA, @@ -51,7 +53,10 @@ ["CLOUD_DATARQ"] = CONST_CLOUD_DATARQ, ["CLOUD_DATARC"] = CONST_CLOUD_DATARC, ["CLOUD_EQUALIZE"] = CONST_CLOUD_EQUALIZE, + ["WIPE_CALL"] = CONST_WIPE_CALL, + + ["MISSDATA_ROGUE_SOULRIP"] = CONST_ROGUE_SR, --soul rip from akaari's soul (LEGION ONLY) } local plugins_registred = {} @@ -258,6 +263,29 @@ end end + function _detalhes.network.HandleMissData (player, realm, core_version, data) + +-- [1] - container +-- [2] - spellid +-- [3] - spell total +-- [4] - spell counter + + core_version = tonumber (core_version) or 0 + if (core_version ~= _detalhes.realversion) then + if (core_version > _detalhes.realversion) then + _detalhes:Msg ("your Details! is out dated and cannot communicate with other players.") + end + return + end + if (type (player) ~= "string") then + return + end + local playerName = _detalhes:GetCLName (player) + if (playerName) then + _detalhes.HandleMissData (playerName, data) + end + end + _detalhes.network.functions = { [CONST_HIGHFIVE_REQUEST] = _detalhes.network.HighFive_Request, [CONST_HIGHFIVE_DATA] = _detalhes.network.HighFive_DataReceived, @@ -270,6 +298,8 @@ [CONST_CLOUD_DATARC] = _detalhes.network.Cloud_DataReceived, [CONST_CLOUD_EQUALIZE] = _detalhes.network.Cloud_Equalize, [CONST_WIPE_CALL] = _detalhes.network.Wipe_Call, + + [CONST_ROGUE_SR] = _detalhes.network.HandleMissData, --soul rip from akaari's soul (LEGION ONLY) } ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -433,6 +463,14 @@ end end + function _detalhes:SendRaidOrPartyData (type, ...) + if (IsInRaid()) then + _detalhes:SendRaidData (type, ...) + elseif (IsInGroup()) then + _detalhes:SendPartyData (type, ...) + end + end + function _detalhes:SendGuildData (type, ...) if not IsInGuild() then return end --> fix from Tim@WoWInterface _detalhes:SendCommMessage (CONST_DETAILS_PREFIX, _detalhes:Serialize (type, _UnitName ("player"), _GetRealmName(), _detalhes.realversion, ...), "GUILD") diff --git a/functions/slash.lua b/functions/slash.lua index 5863a049..6d96dd1d 100644 --- a/functions/slash.lua +++ b/functions/slash.lua @@ -886,13 +886,26 @@ function SlashCmdList.DETAILS (msg, editbox) end --> debug - elseif (msg == "debug") then + elseif (command == "debug") then if (_detalhes.debug) then _detalhes.debug = false print (Loc ["STRING_DETAILS1"] .. "diagnostic mode has been turned off.") + return else _detalhes.debug = true print (Loc ["STRING_DETAILS1"] .. "diagnostic mode has been turned on.") + + if (rest and rest ~= "") then + if (rest == "-clear") then + _detalhes_global.debug_chr_log = "" + print (Loc ["STRING_DETAILS1"] .. "log for characters has been wiped.") + return + end + _detalhes.debug_chr = rest + _detalhes_global.debug_chr_log = _detalhes_global.debug_chr_log or "" + print (Loc ["STRING_DETAILS1"] .. "diagnostic for character " .. rest .. " turned on.") + return + end end --> debug combat log @@ -1368,3 +1381,5 @@ function _detalhes:CreateListPanel() return _detalhes.ListPanel end + +--endd elsee \ No newline at end of file