From 2d1cf1b2207eeeb571d5f38233f3dc9048d800db Mon Sep 17 00:00:00 2001 From: tercio Date: Wed, 30 Jul 2014 11:41:45 -0300 Subject: [PATCH] - Full rework on how deaths are handled, now the last events before death should be more precise. - Added damage taken from environment, like falling, lava, drowning, etc. - Added Fire and Brimstone spell customizations for warlocks. - Bookmark now are shared between all characters. - Fixed few inconsistencies with trash recognition. - Fixed Cloud Capture where sometimes it wasn't sharing. - Fixed report where it wasn't sharing for guild and raid when the player name box were empty. - Report box now also saves the position and last report channel. - You Are Not Prepared plugin now have tooltips for spells and auto open after a boss encounter. - Advanced Death Logs plugin got full rewrite (and still are in development). - New API: _detalhes:GetFramework() return the framework object. - New API: combat:GetDifficult() return the raid difficult on the combat object. - New API: combat:GetBossInfo() return the boss info object. - New API: combat:GetDeaths() return the table used to store deaths. - New API: _detalhes:CreatePluginOptionsFrame (name, title, template), create a preset frame for options. - New API Alias: framework:CreateLabel (parent, text, size, color, font, member, name) --- boot.lua | 27 +- classes/classe_combate.lua | 33 ++- classes/classe_damage.lua | 13 +- classes/classe_heal.lua | 6 +- classes/classe_others.lua | 91 +++--- core/control.lua | 37 +-- core/network.lua | 2 + core/parser.lua | 247 ++++++++++------ core/plugins.lua | 55 +++- core/util.lua | 15 +- framework/label.lua | 5 + framework/normal_bar.lua | 41 +-- framework/panel.lua | 2 +- functions/loaddata.lua | 30 +- functions/profiles.lua | 7 +- functions/savedata.lua | 275 +----------------- functions/spellcache.lua | 10 + gumps/janela_report.lua | 78 +++-- locales/Details-enUS.lua | 7 + locales/Details-ptBR.lua | 8 + .../Details_TinyThreat/Details_TinyThreat.lua | 45 +-- plugins/Details_Vanguard/Details_Vanguard.lua | 15 +- .../Details_YouAreNotPrepared.lua | 148 +++++++++- startup.lua | 4 +- 24 files changed, 591 insertions(+), 610 deletions(-) diff --git a/boot.lua b/boot.lua index c8be0c35..837abccb 100644 --- a/boot.lua +++ b/boot.lua @@ -4,9 +4,9 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0", "LibHotCorners") - _detalhes.build_counter = 14 --it's 14 for release - _detalhes.userversion = "v1.19.2" - _detalhes.realversion = 23 + _detalhes.build_counter = 14 --it's 19 for release + _detalhes.userversion = "v1.20.0" + _detalhes.realversion = 24 _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -16,13 +16,23 @@ do local _detalhes = _G._detalhes + local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) + --[[ -|cFFFFFF00-|r Details! it's now able to be translated by its community for all supported languages through Curse Forge Web Site:\n\nhttp://wow.curseforge.com/addons/details/localization/.\n\n - + |cFFFFFF00a1.20.0 (|cFFFFCC00Jul 30, 2014|r|cFFFFFF00)|r:\n\n + |cFFFFFF00-|r Improvements done on how deaths are handled, now latest events before death will be more precise.\n\n + |cFFFFFF00-|r Implemented Damage Taken from environment like lava, gravity, etc.\n\n + |cFFFFFF00-|r Added Warlock's Fire and Brimstone spell on customization spells.\n\n + |cFFFFFF00-|r Bookmark now are shared between all characters.\n\n + |cFFFFFF00-|r Fixed few inconsistencies with trash recognition.\n\n + |cFFFFFF00-|r Fixed Cloud Capture where sometimes it wasn't sharing.\n\n + |cFFFFFF00-|r Fixed report where it wasn't sharing for guild and raid when the player name box were empty.\n\n + |cFFFFFF00-|r Report box now also saves the position and the last channel used to report.\n\n + |cFFFFFF00-|r You Are Not Prepared plugin now have tooltips for spells and its window auto opens after a boss encounter.\n\n + |cFFFFFF00-|r Advanced Death Logs plugin got full rewrite (and still are in development).\n\n --]] - local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.19.0 - v1.19.1 - v1.19.2 (|cFFFFCC00Jul 21, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Trash segments won't be saved anymore.\n\n|cFFFFFF00-|r Added support for plugins options.\n\n|cFFFFFF00-|r Revamp on Deaths report lines, adding links for harmful spells and changing the text order |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Modified the percentage used on Comparison panel |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed the Dps/Hps data exported by Data Broker |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00v1.18.4 - v1.18.5 - v1.18.6 (|cFFFFCC00Jul 13, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added option to customize the bar left text.\n\n|cFFFFFF00-|r Added option for show or hide bar placement number.\n\n|cFFFFFF00-|r Spell icon is shown in the bar when the enemy character is a environment spell type.\n\n|cFFFFFF00-|r Changed the non-player enemy icon (monsters).\n\n|cFFFFFF00-|r Fixed bug on flex performance profile |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Added new version tracker which should alert you when a newer Details! version is found.\n\n|cFFFFFF00-|r Added Enemy Damage Taken by clicking with middle mouse button over a enemy bar (enemies display).\n\n|cFFFFFF00-|r Added import/export for saved skins and custom displays created.\n\n|cFFFFFF00-|r Small changes on ElvUI Frame Style skin (need reaply).\n\n|cFFFFFF00-|r Fixed the death recognition for bosses, now it should show the correct color over segments menu.\n\n|cFFFFFF00-|r Fixed Dps inacuracy when plyaing solo (no party or raid group).\n\n|cFFFFFF00-|r Fixed the duration time of buffs applied before the pull, like pre-potions.\n\n|cFFFFFF00v1.17.5 (|cFFFFCC00Jun 30, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Shortcut panel is now known as Bookmarks and a revamp has done on its panel.\n\n|cFFFFFF00-|r NickTag now doesnt check anymore if a received nickname from other guild member is invalid.\n\n|cFFFFFF00-|r Healthstone now is considered a cooldown.\n\n|cFFFFFF00-|r Few improvements on Default Skin, Minimalistic Skin and ElvUI Frame Style Skin.\n\n|cFFFFFF00-|r Revamp on Image Editor, many bugs solves and now it is usable.\n\n|cFFFFFF00-|r 'Hide' slash command now hides all opened windows; 'Show', open all closed windows and 'New' create a new window.\n\n|cFFFFFF00-|r Added Devotion Aura, Rallying Cry as cooldowns.\n\n|cFFFFFF00-|r Added options for lock, unlock, break snap, close, reopen and create new window.\n\n|cFFFFFF00-|r Added a options panel for HotCorners, access it through options button or slash hotcorner command.\n\n|cFFFFFF00-|r Added 'Logos' and 'Raid & Dungeons' sections for Wallpapers. \n\n|cFFFFFF00-|r Added a option to load a image from the computer to use as wallpaper.\n\n|cFFFFFF00-|r Fixed the percent issue with Healing Done and HPS while in combat.\n\n|cFFFFFF00-|r Fixed non-combat switch by role where changing role wasnt changing the shown attribute.\n\n|cFFFFFF00-|r Fixed 'While in Combat' hiding schema |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed several bugs on Interact Auto Transparency.\n\n|cFFFFFF00-|r Fixed the report window alert when opening the report window and it already is opened |cFF999999(thanks @Rasstapp-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed the gap between last row created and the end of the window.\n\n|cFFFFFF00-|r Fixed all tooltips bugs on Wallpaper Section on Options Panel.\n\n|cFFFFFF00a1.17.0 (|cFFFFCC00Jun 21, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Support for Custom Displays has been rewrited, to access the new panel go to Sword Menu -> Custom -> Create New Display.\n\n|cFFFFFF00-|r Added a custom display for show potion usage.\n\n|cFFFFFF00-|r Fixed a bug where the player pet wasnt being tracked after logon in the game. This bug was affecting directly classes with pets playing out of a raid group.\n\n|cFFFFFF00-|r Fixed the report bug on healing, energy and misc attributes |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00a1.16.0 - a1.16.1 - a1.16.3b (|cFFFFCC00Jun 14, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed row creation while resizing where sometimes it was broking the last row in the window.\n\n|cFFFFFF00-|r Fixed small involuntary resizes after resizing a window. |cFF999999(thanks @Morimvudu-Nemesis)|r\n\n|cFFFFFF00-|r Fixed frame strata after stretching the window where was setting its strata to Medium.\n\n|cFFFFFF00-|r Fixed Vanguard strata where it wasnt following the strata from its host window.\n\n|cFFFFFF00-|r Mode menu now have a sub menu for raid plugins.\n\n|cFFFFFF00-|r Red and Green colors under comparison frame has been inverted. |cFF999999(thanks @skmzarn-mmochampion forum)|r\n\n|cFFFFFF00-|r Fixed some report issues with dps and hps, also almost all reports now have guide lines. |cFF999999(thanks @sosleapy-mmochampion forum)|r\n\n|cFFFFFF00-|r Pet dispell and interrupt count also for its owner as well. |cFF999999(thanks @skmzarn-mmochampion forum)|r\n\n|cFFFFFF00-|r Few fixes on comparison panel over Player Details Window.\n\n|cFFFFFF00-|r Added option to be able to save the windows size and position within the profile. |cFF999999(thanks @Torchler-mmochampion forum)|r\n\n|cFFFFFF00-|r Added performance profile settings. |cFF999999(thanks @SlippyCheeze-mmochampion forum)|r\n\n|cFFFFFF00-|r Added auto switch based on group roles also a switch for wipe. |cFF999999(thanks @SlippyCheeze-mmochampion forum)|r\n\n|cFFFFFF00-|r Fixed a bug where sometimes all non boss segments was considered boss encounters.\n\n|cFFFFFF00v1.15.4 (|cFFFFCC00Jun 06, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a compare tab under Player Details Window:\nThis new tab showns up when there is too characters with the same class and spec.\nIts useful to compare skills used, uptimes and targets.\n\n|cFFFFFF00-|r Few improvements on Default and ElvUI skins.\n\n|cFFFFFF00-|r Added a button for auto align two windows within right chat window when ElvUI skin is active.\n\n|cFFFFFF00-|r Fixed problem with Damage -> Enemies display.\n\n|cFFFFFF00-|r Fixed report Player Detail Window report buttons.\n\n|cFFFFFF00-|r Fixed some report lines where the numbers wasnt properly formatted.\n\n|cFFFFFF00-|r Fixed a rare bug where the owner of some pets wasnt detected.\n\n|cFFFFFF00-|r Fixed issue in dungeons where capture data get paused after a boss kill.\n\n|cFFFFFF00-|r Fixed issue with Encounter Details showing its icon for dungeons bosses.\n\n|cFFFFFF00-|r Fixed a rare bug where the capture of damage stops after erasing a trash segment.\n\n|cFFFFFF00v1.15.0 - v1.15.3 - v1.15.3b (|cFFFFCC00Jun 03, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Emergencial fix for death logs which sometimes was breaking the addon data capture.\n\n|cFFFFFF00-|r Fixed window alerts which was showing behind the bars.\n\n|cFFFFFF00-|r Fixed death log issue with friendly fire hits.\n\n|cFFFFFF00-|r Fixed a issue where Details! windows wasn't hidden when a pet battle starts.\n\n|cFFFFFF00-|r Fixed a issue with segments menu when a window is placed on the right side of the screen.\n\n|cFFFFFF00-|r Damage -> Enemies now also show neutral creatures.\n\n|cFFFFFF00-|r Added support to dungeons, bosses and trash mobs are now recognized." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00a1.20.0 (|cFFFFCC00Jul 30, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Improvements done on how deaths are handled, now latest events before death will be more precise.\n\n|cFFFFFF00-|r Implemented Damage Taken from environment like lava, gravity, etc.\n\n|cFFFFFF00-|r Added Warlock's Fire and Brimstone spell on customization spells.\n\n|cFFFFFF00-|r Bookmark now are shared between all characters.\n\n|cFFFFFF00-|r Fixed few inconsistencies with trash recognition.\n\n|cFFFFFF00-|r Fixed Cloud Capture where sometimes it wasn't sharing.\n\n|cFFFFFF00-|r Fixed report where it wasn't sharing for guild and raid when the player name box were empty.\n\n|cFFFFFF00-|r Report box now also saves the position and the last channel used to report.\n\n|cFFFFFF00-|r You Are Not Prepared plugin now have tooltips for spells and its window auto opens after a boss encounter.\n\n|cFFFFFF00-|r Advanced Death Logs plugin got full rewrite (and still are in development).\n\n|cFFFFFF00v1.19.0 - v1.19.1 - v1.19.2 (|cFFFFCC00Jul 21, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Details! is now able to be translated by its community for all supported languages through Curse Forge Web Site:\n\n|cFFFFFF00http://wow.curseforge.com/addons/details/localization/|r\n\n|cFFFFFF00-|r Slash commands now are multi language, accepting both english and the localized language.\n\n|cFFFFFF00-|r Added Data Broker for: Combat Time, Player Dps and Player Hps.\n\n|cFFFFFF00-|r Rework on plugins: Timeline, You Are Not Prepared, Tiny Threat, Encounter Details. All those plugins got a options panel and few improvaments.\n\n|cFFFFFF00-|r Trash segments won't be saved anymore.\n\n|cFFFFFF00-|r Added support for plugins options.\n\n|cFFFFFF00-|r Revamp on Deaths report lines, adding links for harmful spells and changing the text order |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Modified the percentage used on Comparison panel |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed the Raid Dps and Hps data exported by Data Broker |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00v1.18.4 - v1.18.5 - v1.18.6 (|cFFFFCC00Jul 13, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added option to customize the bar left text.\n\n|cFFFFFF00-|r Added option for show or hide bar placement number.\n\n|cFFFFFF00-|r Spell icon is shown in the bar when the enemy character is a environment spell type.\n\n|cFFFFFF00-|r Changed the non-player enemy icon (monsters).\n\n|cFFFFFF00-|r Fixed bug on flex performance profile |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Added new version tracker which should alert you when a newer Details! version is found.\n\n|cFFFFFF00-|r Added Enemy Damage Taken by clicking with middle mouse button over a enemy bar (enemies display).\n\n|cFFFFFF00-|r Added import/export for saved skins and custom displays created.\n\n|cFFFFFF00-|r Small changes on ElvUI Frame Style skin (need reaply).\n\n|cFFFFFF00-|r Fixed the death recognition for bosses, now it should show the correct color over segments menu.\n\n|cFFFFFF00-|r Fixed Dps inacuracy when plyaing solo (no party or raid group).\n\n|cFFFFFF00-|r Fixed the duration time of buffs applied before the pull, like pre-potions.\n\n|cFFFFFF00v1.17.5 (|cFFFFCC00Jun 30, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Shortcut panel is now known as Bookmarks and a revamp has done on its panel.\n\n|cFFFFFF00-|r NickTag now doesnt check anymore if a received nickname from other guild member is invalid.\n\n|cFFFFFF00-|r Healthstone now is considered a cooldown.\n\n|cFFFFFF00-|r Few improvements on Default Skin, Minimalistic Skin and ElvUI Frame Style Skin.\n\n|cFFFFFF00-|r Revamp on Image Editor, many bugs solves and now it is usable.\n\n|cFFFFFF00-|r 'Hide' slash command now hides all opened windows; 'Show', open all closed windows and 'New' create a new window.\n\n|cFFFFFF00-|r Added Devotion Aura, Rallying Cry as cooldowns.\n\n|cFFFFFF00-|r Added options for lock, unlock, break snap, close, reopen and create new window.\n\n|cFFFFFF00-|r Added a options panel for HotCorners, access it through options button or slash hotcorner command.\n\n|cFFFFFF00-|r Added 'Logos' and 'Raid & Dungeons' sections for Wallpapers. \n\n|cFFFFFF00-|r Added a option to load a image from the computer to use as wallpaper.\n\n|cFFFFFF00-|r Fixed the percent issue with Healing Done and HPS while in combat.\n\n|cFFFFFF00-|r Fixed non-combat switch by role where changing role wasnt changing the shown attribute.\n\n|cFFFFFF00-|r Fixed 'While in Combat' hiding schema |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed several bugs on Interact Auto Transparency.\n\n|cFFFFFF00-|r Fixed the report window alert when opening the report window and it already is opened |cFF999999(thanks @Rasstapp-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed the gap between last row created and the end of the window.\n\n|cFFFFFF00-|r Fixed all tooltips bugs on Wallpaper Section on Options Panel.\n\n|cFFFFFF00a1.17.0 (|cFFFFCC00Jun 21, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Support for Custom Displays has been rewrited, to access the new panel go to Sword Menu -> Custom -> Create New Display.\n\n|cFFFFFF00-|r Added a custom display for show potion usage.\n\n|cFFFFFF00-|r Fixed a bug where the player pet wasnt being tracked after logon in the game. This bug was affecting directly classes with pets playing out of a raid group.\n\n|cFFFFFF00-|r Fixed the report bug on healing, energy and misc attributes |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00a1.16.0 - a1.16.1 - a1.16.3b (|cFFFFCC00Jun 14, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed row creation while resizing where sometimes it was broking the last row in the window.\n\n|cFFFFFF00-|r Fixed small involuntary resizes after resizing a window. |cFF999999(thanks @Morimvudu-Nemesis)|r\n\n|cFFFFFF00-|r Fixed frame strata after stretching the window where was setting its strata to Medium.\n\n|cFFFFFF00-|r Fixed Vanguard strata where it wasnt following the strata from its host window.\n\n|cFFFFFF00-|r Mode menu now have a sub menu for raid plugins.\n\n|cFFFFFF00-|r Red and Green colors under comparison frame has been inverted. |cFF999999(thanks @skmzarn-mmochampion forum)|r\n\n|cFFFFFF00-|r Fixed some report issues with dps and hps, also almost all reports now have guide lines. |cFF999999(thanks @sosleapy-mmochampion forum)|r\n\n|cFFFFFF00-|r Pet dispell and interrupt count also for its owner as well. |cFF999999(thanks @skmzarn-mmochampion forum)|r\n\n|cFFFFFF00-|r Few fixes on comparison panel over Player Details Window.\n\n|cFFFFFF00-|r Added option to be able to save the windows size and position within the profile. |cFF999999(thanks @Torchler-mmochampion forum)|r\n\n|cFFFFFF00-|r Added performance profile settings. |cFF999999(thanks @SlippyCheeze-mmochampion forum)|r\n\n|cFFFFFF00-|r Added auto switch based on group roles also a switch for wipe. |cFF999999(thanks @SlippyCheeze-mmochampion forum)|r\n\n|cFFFFFF00-|r Fixed a bug where sometimes all non boss segments was considered boss encounters." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " --> startup @@ -43,6 +53,9 @@ do _detalhes.escudos = {} --> armazena as funções dos frames - Frames functions _detalhes.gump = {} + function _detalhes:GetFramework() + return self.gump + end --> armazena as funções para inicialização dos dados - Metatable functions _detalhes.refresh = {} --> armazena as funções para limpar e guardas os dados - Metatable functions diff --git a/classes/classe_combate.lua b/classes/classe_combate.lua index a1ae1557..33364d79 100644 --- a/classes/classe_combate.lua +++ b/classes/classe_combate.lua @@ -1,8 +1,9 @@ -- combat class object local _detalhes = _G._detalhes + local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) local _ - + --[[global]] DETAILS_TOTALS_ONLYGROUP = true ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -14,6 +15,7 @@ local _bit_band = bit.band -- lua local local _date = date -- lua local local _table_remove = table.remove -- lua local + local _rawget = rawget ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> constants @@ -53,7 +55,19 @@ end function combate:IsTrash() - return self.is_trash + return _rawget (self, "is_trash") + end + + function combate:GetDifficult() + return self.is_boss and self.is_boss.diff + end + + function combate:GetBossInfo() + return self.is_boss + end + + function combate:GetDeaths() + return self.last_events_tables end --return the name of the encounter or enemy @@ -62,7 +76,7 @@ return self.is_pvp.name elseif (self.is_boss) then return self.is_boss.encounter - elseif (self.is_tras) then + elseif (_rawget (self, "is_trash")) then return Loc ["STRING_SEGMENT_TRASH"] else if (self.enemy) then @@ -149,9 +163,12 @@ esta_tabela.data_fim = 0 esta_tabela.data_inicio = 0 - --> record last event before dead + --> record deaths esta_tabela.last_events_tables = {} + --> last events from players + esta_tabela.player_last_events = {} + --> players in the raid esta_tabela.raid_roster = {} @@ -236,6 +253,14 @@ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> core + function combate:CreateLastEventsTable (player_name) + --> sixteen indexes, thinking in 32 but it's just too much + local t = { {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {} } + t.n = 1 + self.player_last_events [player_name] = t + return t + end + --trava o tempo dos jogadores após o término do combate. function combate:TravarTempos() if (self [1]) then diff --git a/classes/classe_damage.lua b/classes/classe_damage.lua index 5ec578b3..3858aeb6 100644 --- a/classes/classe_damage.lua +++ b/classes/classe_damage.lua @@ -201,6 +201,13 @@ return table1 [4] > table2 [4] end +--[[exported]] function _detalhes.Sort4Reverse (table1, table2) + if (not table2) then + return true + end + return table1 [4] < table2 [4] + end + --[[exported]] function _detalhes:GetBarColor (actor) actor = actor or self @@ -266,8 +273,8 @@ _setmetatable (_new_damageActor, atributo_damage) if (link) then - _new_damageActor.last_events_table = _detalhes:CreateActorLastEventTable() - _new_damageActor.last_events_table.original = true + --_new_damageActor.last_events_table = _detalhes:CreateActorLastEventTable() + --_new_damageActor.last_events_table.original = true _new_damageActor.targets.shadow = link.targets _new_damageActor.spell_tables.shadow = link.spell_tables @@ -3014,7 +3021,7 @@ end if (not actor) then actor = self end - actor.last_events_table = _detalhes:CreateActorLastEventTable() + --actor.last_events_table = _detalhes:CreateActorLastEventTable() end --> restaura e liga o ator com a sua shadow durante a inicialização (startup function) diff --git a/classes/classe_heal.lua b/classes/classe_heal.lua index d080eabb..3fe09d6b 100644 --- a/classes/classe_heal.lua +++ b/classes/classe_heal.lua @@ -112,8 +112,8 @@ function atributo_heal:NovaTabela (serial, nome, link) _setmetatable (_new_healActor, atributo_heal) if (link) then --> se não for a shadow - _new_healActor.last_events_table = _detalhes:CreateActorLastEventTable() - _new_healActor.last_events_table.original = true + --_new_healActor.last_events_table = _detalhes:CreateActorLastEventTable() + --_new_healActor.last_events_table.original = true _new_healActor.targets.shadow = link.targets _new_healActor.spell_tables.shadow = link.spell_tables @@ -1981,7 +1981,7 @@ end if (not actor) then actor = self end - actor.last_events_table = _detalhes:CreateActorLastEventTable() + --actor.last_events_table = _detalhes:CreateActorLastEventTable() end --> restaura e liga o ator com a sua shadow durante a inicialização diff --git a/classes/classe_others.lua b/classes/classe_others.lua index e4bb2c4d..8e59332a 100644 --- a/classes/classe_others.lua +++ b/classes/classe_others.lua @@ -171,63 +171,65 @@ function _detalhes:ToolTipDead (instancia, morte, esta_barra, keydown) GameCooltip:AddLine (Loc ["STRING_REPORT_LEFTCLICK"], nil, 1, _unpack (self.click_to_report_color)) GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, 16, 0.015625, 0.13671875, 0.4375, 0.59765625) GameCooltip:AddStatusBar (0, 1, 1, 1, 1, 1, false, {value = 100, color = {.3, .3, .3, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar_serenity]]}) - - for index, evento in _ipairs (eventos) do - local hp = _math_floor (evento[5]/hp_max*100) + --death parser + for index, event in _ipairs (eventos) do + + local hp = _math_floor (event[5]/hp_max*100) if (hp > 100) then hp = 100 end - if (evento [1]) then --> Dano - --print ("DANO|"..evento [4]-hora_da_morte.."|"..evento [2].."|"..evento [3]) --> {true, spellid, amount, _tempo} - local nome_magia, _, icone_magia = _GetSpellInfo (evento [2]) - - if (evento[3]) then - local amt_golpes = evento[7] - if (amt_golpes) then - amt_golpes = "(x"..amt_golpes..") " - else - amt_golpes = "" - end - - if (type (evento [1]) ~= "boolean" and evento [1] == 2) then --> last cooldown - lastcooldown = evento - else - --> [1] left text [2] right text [3] main 1 or sub 2 [...] color - GameCooltip:AddLine ("".._cstr ("%.1f", evento[4] - hora_da_morte) .."s "..amt_golpes..nome_magia.." ("..evento[6]..")", "-".._detalhes:ToK (evento[3]).." (".. hp .."%)", 1, "white", "white") - --> [1] icon [2] main 1 or sub 2 [3] left or right [4,5] width height [...] texcoord - GameCooltip:AddIcon (icone_magia) --, 1, 1, nil, nil, 0.078125, 0.921875, 0.078125, 0.921875 - - --> [1] value [2] main 1 or sub 2 [...] color [4] glow - if (type (evento [1]) ~= "boolean" and evento [1] == 1) then --> cooldown - GameCooltip:AddStatusBar (100, 1, "yellow", true) - else - GameCooltip:AddStatusBar (hp, 1, "red", true) - end - end + local evtype = event [1] + local spellname, _, spellicon = _GetSpellInfo (event [2]) + local amount = event [3] + local time = event [4] + local source = event [6] - elseif (not battleress) then --> battle ress - battleress = evento + if (type (evtype) == "boolean") then + --> is damage or heal + if (evtype) then + --> damage + GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (" .. source .. ")", "-" .. _detalhes:ToK (amount) .. " (" .. hp .. "%)", 1, "white", "white") + GameCooltip:AddIcon (spellicon) + + if (event [9]) then + --> friendly fire + GameCooltip:AddStatusBar (hp, 1, "darkorange", true) + else + --> from a enemy + GameCooltip:AddStatusBar (hp, 1, "red", true) + end + else + --> heal + GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (" .. source .. ")", "+" .. _detalhes:ToK (amount) .. " (" .. hp .. "%)", 1, "white", "white") + GameCooltip:AddIcon (spellicon) + GameCooltip:AddStatusBar (hp, 1, "green", true) end - else --> Cura - local nome_magia, _, icone_magia = _GetSpellInfo (evento [2]) - GameCooltip:AddLine ("".._cstr ("%.1f", evento[4] - hora_da_morte) .."s "..nome_magia.." ("..evento[6]..")", "+".._detalhes:ToK (evento[3]).." (".. hp .."%)", 1, "white", "white") - GameCooltip:AddIcon (icone_magia) --, 1, 1, nil, nil, 0.0625, 0.9375, 0.0625, 0.9375 - GameCooltip:AddStatusBar (hp, 1, "green", true) + elseif (type (evtype) == "number") then + if (evtype == 1) then + --> cooldown + GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (" .. source .. ")", "cooldown (" .. hp .. "%)", 1, "white", "white") + GameCooltip:AddIcon (spellicon) + GameCooltip:AddStatusBar (100, 1, "yellow", true) + + elseif (evtype == 2 and not battleress) then + --> battle ress + battleress = event + + elseif (evtype == 3) then + --> last cooldown used + lastcooldown = event + + end end end - - --_table_insert (linhas, 2, {{"Interface\\AddOns\\Details\\images\\small_icons", .75, 1, 0, 1}, morte [6] .. " Morreu", "-- -- -- ", 100, {75/255, 75/255, 75/255, 1}, {noglow = true}}) --> localize-me GameCooltip:AddLine (morte [6] .. " " .. Loc ["STRING_TIME_OF_DEATH"] , "-- -- -- ", 1, "white") GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\small_icons", 1, 1, nil, nil, .75, 1, 0, 1) GameCooltip:AddStatusBar (0, 1, .5, .5, .5, .5, false, {value = 100, color = {.5, .5, .5, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar4_vidro]]}) - --GameCooltip:AddSpecial ("line", 2, nil, morte [6] .. " " .. Loc ["STRING_TIME_OF_DEATH"] , "-- -- -- ", 1, "white") - --GameCooltip:AddSpecial ("icon", 2, nil, "Interface\\AddOns\\Details\\images\\small_icons", 1, 1, nil, nil, .75, 1, 0, 1) - --GameCooltip:AddSpecial ("statusbar", 2, nil, 100, 1, "darkgray", false) if (battleress) then local nome_magia, _, icone_magia = _GetSpellInfo (battleress [2]) @@ -248,7 +250,6 @@ function _detalhes:ToolTipDead (instancia, morte, esta_barra, keydown) GameCooltip:AddStatusBar (0, 1, 1, 1, 1, 1, false, {value = 100, color = {.3, .3, .3, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar_serenity]]}) end - --GameCooltip:AddLine (" ", " ", 1, "white", "white") GameCooltip:SetOption ("StatusBarHeightMod", -6) GameCooltip:SetOption ("FixedWidth", 300) @@ -260,8 +261,6 @@ function _detalhes:ToolTipDead (instancia, morte, esta_barra, keydown) GameCooltip:ShowCooltip() - --_detalhes.popup:ShowMe (esta_barra, "tooltip_bars", linhas, 300, 16, 9) --> [1] ancora [2] tipo do painel [3] texto/linhas [4] largura [5] tamanho do icone e altura da barra [6] tamanho da fonte - end local function RefreshBarraMorte (morte, barra, instancia) @@ -313,7 +312,7 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia) tinsert (report_array, {elapsed .. " ", spelllink, " (" .. source .. ")", "-" .. _detalhes:ToK (amount) .. " (" .. hp .. "%) "}) end - elseif (not evento [1]) then --> heal + elseif (not evento [1] and type (evento [1]) == "boolean") then --> heal local elapsed = _cstr ("%.1f", evento [4] - time_of_death) .."s" local spelllink = GetSpellLink (evento [2]) local source = _detalhes:GetOnlyName (evento [6]) diff --git a/core/control.lua b/core/control.lua index 48deba67..9d9ffbef 100644 --- a/core/control.lua +++ b/core/control.lua @@ -52,30 +52,12 @@ local ZoneName, InstanceType, DifficultyID, _, _, _, _, ZoneMapID = _GetInstanceInfo() if (InstanceType == "party" or InstanceType == "raid") then - _detalhes.tabela_vigente.is_trash = true return Loc ["STRING_SEGMENT_TRASH"] end - local trash_list - if (_detalhes.in_group and _detalhes.last_instance) then - trash_list = _detalhes:GetInstanceTrashInfo (_detalhes.last_instance) - end - for _, actor in _ipairs (_detalhes.tabela_vigente[class_type_dano]._ActorTable) do if (not actor.grupo and not actor.owner and not actor.nome:find ("[*]") and _bit_band (actor.flag_original, 0x00000060) ~= 0) then --> 0x20+0x40 neutral + enemy reaction - - if (trash_list) then - local serial = tonumber (actor.serial:sub(6, 10), 16) - if (serial and trash_list [serial]) then - if (_detalhes.debug) then - _detalhes:Msg ("(debug) segment against trash mobs.") - end - _detalhes.tabela_vigente.is_trash = true - return Loc ["STRING_SEGMENT_TRASH"] - end - end - for name, _ in _pairs (actor.targets._NameIndexTable) do if (name == _detalhes.playername) then return actor.nome @@ -113,6 +95,7 @@ zone = zone, mapid = mapid, diff = diff, + diff_string = select (4, GetInstanceInfo()), ej_instance_id = EJ_GetCurrentInstance(), } @@ -421,13 +404,18 @@ _detalhes.tabela_vigente:seta_tempo_decorrido() --> salva o end_time _detalhes.tabela_overall:seta_tempo_decorrido() --seta o end_time + --> drop last events table to garbage collector + _detalhes.tabela_vigente.player_last_events = {} + --> flag instance type local _, InstanceType = _GetInstanceInfo() _detalhes.tabela_vigente.instance_type = InstanceType if (not _detalhes.tabela_vigente.is_boss) then - - local inimigo = _detalhes:FindEnemy() + + if (InstanceType == "party" or InstanceType == "raid") then + _detalhes.tabela_vigente.is_trash = true + end if (inimigo) then if (_detalhes.debug) then @@ -581,6 +569,7 @@ end end + _detalhes.pre_pot_used = nil _table_wipe (_detalhes.encounter_table) _detalhes:SendEvent ("COMBAT_PLAYER_LEAVE", nil, _detalhes.tabela_vigente) @@ -786,9 +775,9 @@ --_detalhes:ScheduleTimer ("EqualizePets", 1+math.random()) --> do not equilize if there is any disabled capture - if (_detalhes:CaptureIsAllEnabled()) then + --if (_detalhes:CaptureIsAllEnabled()) then _detalhes:ScheduleTimer ("EqualizeActors", 2+math.random()+math.random() , host_of) - end + --end end function _detalhes:EqualizeActors (host_of) @@ -806,13 +795,13 @@ end if (damage) then - damage = {damage.total, damage.damage_taken, damage.friendlyfire_total} + damage = {damage.total or 0, damage.damage_taken or 0, damage.friendlyfire_total or 0} else damage = {0, 0, 0} end if (heal) then - heal = {heal.total, heal.totalover, heal.healing_taken} + heal = {heal.total or 0, heal.totalover or 0, heal.healing_taken or 0} else heal = {0, 0, 0} end diff --git a/core/network.lua b/core/network.lua index ce37dbfb..e3ae2a29 100644 --- a/core/network.lua +++ b/core/network.lua @@ -421,6 +421,7 @@ if (_detalhes.schedule_chat_leave) then _detalhes:CancelTimer (_detalhes.schedule_chat_leave) + _detalhes.schedule_chat_leave = nil end _detalhes.schedule_chat_enter = nil @@ -451,6 +452,7 @@ if (_detalhes.schedule_chat_enter) then _detalhes:CancelTimer (_detalhes.schedule_chat_enter) + _detalhes.schedule_chat_enter = nil end _detalhes.schedule_chat_leave = nil diff --git a/core/parser.lua b/core/parser.lua index c8e977e4..6fe6bec7 100644 --- a/core/parser.lua +++ b/core/parser.lua @@ -79,6 +79,8 @@ local raid_members_cache = setmetatable ({}, _detalhes.weaktable) --> tanks local tanks_members_cache = setmetatable ({}, _detalhes.weaktable) + --> damage and heal last events + local last_events_cache = {} --> placeholder ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> constants @@ -92,13 +94,19 @@ local AFFILIATION_GROUP = 0x00000007 local REACTION_FRIENDLY = 0x00000010 - --> recording data options shortcuts + local ENVIRONMENTAL_FALLING_NAME = Loc ["STRING_ENVIRONMENTAL_FALLING"] + local ENVIRONMENTAL_DROWNING_NAME = Loc ["STRING_ENVIRONMENTAL_DROWNING"] + local ENVIRONMENTAL_FATIGUE_NAME = Loc ["STRING_ENVIRONMENTAL_FATIGUE"] + local ENVIRONMENTAL_FIRE_NAME = Loc ["STRING_ENVIRONMENTAL_FIRE"] + local ENVIRONMENTAL_LAVA_NAME = Loc ["STRING_ENVIRONMENTAL_LAVA"] + local ENVIRONMENTAL_SLIME_NAME = Loc ["STRING_ENVIRONMENTAL_SLIME"] + + --> recording data options flags local _recording_self_buffs = false local _recording_ability_with_buffs = false - --local _recording_took_damage = false local _recording_healing = false local _recording_buffs_and_debuffs = false - --> in combat shortcut + --> in combat flag local _in_combat = false --> hooks local _hook_cooldowns = false @@ -235,29 +243,31 @@ elseif (jogador_alvo.grupo) then --> record death log - local t = jogador_alvo.last_events_table + local t = last_events_cache [alvo_name] if (not t) then - jogador_alvo.last_events_table = _detalhes:CreateActorLastEventTable() - t = jogador_alvo.last_events_table + t = _current_combat:CreateLastEventsTable (alvo_name) end local i = t.n - - t.n = i + 1 - t = t [i] + local this_event = t [i] - t [1] = true --> true if this is a damage || false for healing - t [2] = spellid --> spellid || false if this is a battle ress line - t [3] = amount --> amount of damage or healing - t [4] = time --> parser time - t [5] = _UnitHealth (alvo_name) --> current unit heal - t [6] = who_name --> source name + this_event [1] = true --> true if this is a damage || false for healing + this_event [2] = spellid --> spellid || false if this is a battle ress line + this_event [3] = amount --> amount of damage or healing + this_event [4] = time --> parser time + this_event [5] = _UnitHealth (alvo_name) --> current unit heal + this_event [6] = who_name --> source name + this_event [7] = absorbed + this_event [8] = school i = i + 1 - if (i == 9) then - jogador_alvo.last_events_table.n = 1 + + if (i == 17) then + t.n = 1 + else + t.n = i end --> record avoidance only for player actors @@ -353,28 +363,31 @@ if (raid_members_cache [who_serial] and raid_members_cache [alvo_serial]) then --> record death log - local t = jogador_alvo.last_events_table + local t = last_events_cache [alvo_name] + if (not t) then - jogador_alvo.last_events_table = _detalhes:CreateActorLastEventTable() - t = jogador_alvo.last_events_table + t = _current_combat:CreateLastEventsTable (alvo_name) end local i = t.n - t.n = i + 1 - - t = t [i] - - t [1] = true --> true if this is a damage || false for healing - t [2] = spellid --> spellid || false if this is a battle ress line - t [3] = amount --> amount of damage or healing - t [4] = time --> parser time - t [5] = _UnitHealth (alvo_name) --> current unit heal - t [6] = who_name --> source name + local this_event = t [i] + this_event [1] = true --> true if this is a damage || false for healing + this_event [2] = spellid --> spellid || false if this is a battle ress line + this_event [3] = amount --> amount of damage or healing + this_event [4] = time --> parser time + this_event [5] = _UnitHealth (alvo_name) --> current unit heal + this_event [6] = who_name --> source name + this_event [7] = absorbed + this_event [8] = school + this_event [9] = true i = i + 1 - if (i == 9) then - jogador_alvo.last_events_table.n = 1 + + if (i == 17) then + t.n = 1 + else + t.n = i end --> faz a adução do friendly fire @@ -628,28 +641,33 @@ if (jogador_alvo.grupo) then - local t = jogador_alvo.last_events_table + local t = last_events_cache [alvo_name] + if (not t) then - jogador_alvo.last_events_table = _detalhes:CreateActorLastEventTable() - t = jogador_alvo.last_events_table + t = _current_combat:CreateLastEventsTable (alvo_name) end local i = t.n - t.n = i + 1 - - t = t [i] - t [1] = false --> true if this is a damage || false for healing - t [2] = spellid --> spellid || false if this is a battle ress line - t [3] = amount --> amount of damage or healing - t [4] = time --> parser time - t [5] = _UnitHealth (alvo_name) --> current unit heal - t [6] = who_name --> source name + local this_event = t [i] + + this_event [1] = false --> true if this is a damage || false for healing + this_event [2] = spellid --> spellid || false if this is a battle ress line + this_event [3] = amount --> amount of damage or healing + this_event [4] = time --> parser time + this_event [5] = _UnitHealth (alvo_name) --> current unit heal + this_event [6] = who_name --> source name + this_event [7] = is_shield + this_event [8] = absorbed i = i + 1 - if (i == 9) then - jogador_alvo.last_events_table.n = 1 + + if (i == 17) then + t.n = 1 + else + t.n = i end + end ------------------------------------------------------------------------------------------------ @@ -1490,28 +1508,28 @@ end end - local t = damage_actor.last_events_table + --> last events + local t = last_events_cache [who_name] if (not t) then - damage_actor.last_events_table = _detalhes:CreateActorLastEventTable() - t = damage_actor.last_events_table + t = _current_combat:CreateLastEventsTable (who_name) end local i = t.n - t.n = i + 1 - - t = t [i] + local this_event = t [i] - t [1] = 1 --> true if this is a damage || false for healing || 1 for cooldown - t [2] = spellid --> spellid || false if this is a battle ress line - t [3] = 1 --> amount of damage or healing - t [4] = time --> parser time - t [5] = _UnitHealth (who_name) --> current unit heal - t [6] = who_name --> source name + this_event [1] = 1 --> true if this is a damage || false for healing || 1 for cooldown + this_event [2] = spellid --> spellid || false if this is a battle ress line + this_event [3] = 1 --> amount of damage or healing + this_event [4] = time --> parser time + this_event [5] = _UnitHealth (who_name) --> current unit heal + this_event [6] = who_name --> source name i = i + 1 - if (i == 9) then - damage_actor.last_events_table.n = 1 + if (i == 17) then + t.n = 1 + else + t.n = i end este_jogador.last_cooldown = {time, spellid} @@ -2008,7 +2026,14 @@ end if (not jaTem) then - _table_insert (_current_combat.last_events_tables [i] [1], 1, {true, spellid, false, time, _UnitHealth (alvo_name), who_name }) + _table_insert (_current_combat.last_events_tables [i] [1], 1, { + 2, + spellid, + 1, + time, + _UnitHealth (alvo_name), + who_name + }) break end end @@ -2214,57 +2239,55 @@ end --> monta a estrutura da morte pegando a tabela de dano e a tabela de cura - local dano = _current_combat[1]:PegarCombatente (alvo_serial, alvo_name, alvo_flags, true) --> container do dano - local cura = _current_combat[2]:PegarCombatente (alvo_serial, alvo_name, alvo_flags, true) --> container da cura --> objeto da morte local esta_morte = {} - --> adiciona a tabela da morte apenas os DANOS recentes - for index, tabela in _ipairs (dano.last_events_table) do - if (tabela [4]) then - if (tabela [4] + 12 > time) then --> mostra apenas eventos recentes - esta_morte [#esta_morte+1] = tabela - end - end + --> add events + local t = last_events_cache [alvo_name] + if (not t) then + t = _current_combat:CreateLastEventsTable (alvo_name) end - --> adiciona a tabela da morte apenas as CURAS recentes - if (cura.last_events_table) then - for index, tabela in _ipairs (cura.last_events_table) do - if (tabela [4]) then - if (tabela [4] + 12 > time) then - esta_morte [#esta_morte+1] = tabela - end + local last_index = t.n --or 'next index' + if (last_index < 17 and not t[last_index][4]) then + for i = 1, last_index-1 do + if (t[i][4] and t[i][4]+16 > time) then + _table_insert (esta_morte, t[i]) + end + end + else + for i = last_index, 16 do --next index to 16 + if (t[i][4] and t[i][4]+16 > time) then + _table_insert (esta_morte, t[i]) + end + end + for i = 1, last_index-1 do --1 to latest index + if (t[i][4] and t[i][4]+16 > time) then + _table_insert (esta_morte, t[i]) end end end - --parser:safe_sort_dead (esta_morte) - _table_sort (esta_morte, _detalhes.Sort4) - if (_hook_deaths) then --> send event to registred functions local death_at = _tempo - _current_combat.start_time local max_health = _UnitHealthMax (alvo_name) - - local new_death_table = {} - for index, t in _ipairs (esta_morte) do - new_death_table [index] = t - end + for _, func in _ipairs (_hook_deaths_container) do + local new_death_table = table_deepcopy (esta_morte) func (nil, token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, new_death_table, este_jogador.last_cooldown, death_at, max_health) end - end + end - if (_detalhes.deadlog_limit and #esta_morte > _detalhes.deadlog_limit) then - for i = #esta_morte, _detalhes.deadlog_limit+1, -1 do - _table_remove (esta_morte, i) + if (_detalhes.deadlog_limit and #esta_morte > _detalhes.deadlog_limit) then + while (#esta_morte > _detalhes.deadlog_limit) do + _table_remove (esta_morte, 1) end end if (este_jogador.last_cooldown) then local t = {} - t [1] = 2 --> true if this is a damage || false for healing || 1 for cooldown usage || 2 for last cooldown + t [1] = 3 --> true if this is a damage || false for healing || 1 for cooldown usage || 2 for last cooldown t [2] = este_jogador.last_cooldown[2] --> spellid || false if this is a battle ress line t [3] = 1 --> amount of damage or healing t [4] = este_jogador.last_cooldown[1] --> parser time @@ -2273,7 +2296,7 @@ esta_morte [#esta_morte+1] = t else local t = {} - t [1] = 2 --> true if this is a damage || false for healing || 1 for cooldown usage || 2 for last cooldown + t [1] = 3 --> true if this is a damage || false for healing || 1 for cooldown usage || 2 for last cooldown t [2] = 0 --> spellid || false if this is a battle ress line t [3] = 0 --> amount of damage or healing t [4] = 0 --> parser time @@ -2285,13 +2308,14 @@ local decorrido = _tempo - _current_combat.start_time local minutos, segundos = _math_floor (decorrido/60), _math_floor (decorrido%60) - local t = {esta_morte, time, este_jogador.nome, este_jogador.classe, _UnitHealthMax (alvo_name), minutos.."m "..segundos.."s", ["dead"] = true} + local t = {esta_morte, time, este_jogador.nome, este_jogador.classe, _UnitHealthMax (alvo_name), minutos.."m "..segundos.."s", ["dead"] = true, ["last_cooldown"] = este_jogador.last_cooldown, ["dead_at"] = decorrido} _table_insert (_current_combat.last_events_tables, #_current_combat.last_events_tables+1, t) --> reseta a pool - dano.last_events_table = _detalhes:CreateActorLastEventTable() - cura.last_events_table = _detalhes:CreateActorLastEventTable() + last_events_cache [alvo_name] = nil + --dano.last_events_table = _detalhes:CreateActorLastEventTable() + --cura.last_events_table = _detalhes:CreateActorLastEventTable() end end @@ -2344,10 +2368,38 @@ death_table = t local status, error = xpcall (do_death_sort, sort_error) if (not status) then - _table_sort (t, _detalhes.Sort4) + --_detalhes:Msg ("(debug) xpcall return false, sort got error.") + _table_sort (t, _detalhes.Sort4Reverse) end end + function parser:environment (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, env_type, amount) + + local spelid + + if (env_type == "Falling") then + who_name = ENVIRONMENTAL_FALLING_NAME + spelid = 3 + elseif (env_type == "Drowning") then + who_name = ENVIRONMENTAL_DROWNING_NAME + spelid = 4 + elseif (env_type == "Fatigue") then + who_name = ENVIRONMENTAL_FATIGUE_NAME + spelid = 5 + elseif (env_type == "Fire") then + who_name = ENVIRONMENTAL_FIRE_NAME + spelid = 6 + elseif (env_type == "Lava") then + who_name = ENVIRONMENTAL_LAVA_NAME + spelid = 7 + elseif (env_type == "Slime") then + who_name = ENVIRONMENTAL_SLIME_NAME + spelid = 8 + end + + return parser:spell_dmg (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spelid or 1, env_type, 00000003, amount) --> localize-me + end + ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> core @@ -2428,6 +2480,7 @@ token_list ["RANGE_MISSED"] = nil token_list ["SWING_MISSED"] = nil token_list ["SPELL_MISSED"] = nil + token_list ["ENVIRONMENTAL_DAMAGE"] = nil elseif (capture_type == "heal") then token_list ["SPELL_HEAL"] = nil @@ -2490,6 +2543,7 @@ token_list ["RANGE_MISSED"] = parser.rangemissed token_list ["SWING_MISSED"] = parser.swingmissed token_list ["SPELL_MISSED"] = parser.missed + token_list ["ENVIRONMENTAL_DAMAGE"] = parser.environment elseif (capture_type == "heal") then token_list ["SPELL_HEAL"] = parser.heal @@ -3085,6 +3139,9 @@ --> refresh combat tables _current_combat = _detalhes.tabela_vigente + + --> last events pointer + last_events_cache = _current_combat.player_last_events --> refresh total containers _current_total = _current_combat.totals diff --git a/core/plugins.lua b/core/plugins.lua index 68e4ade0..2982c464 100644 --- a/core/plugins.lua +++ b/core/plugins.lua @@ -30,8 +30,8 @@ else if (current [key] == nil) then current [key] = value - elseif (type (current [key]) ~= type (value)) then - current [key] = value + --elseif (type (current [key]) ~= type (value)) then + -- current [key] = value end end end @@ -224,3 +224,54 @@ return NewPlugin end + + function _detalhes:CreatePluginOptionsFrame (name, title, template) + + template = template or 1 + + if (template == 1) then + local options_frame = CreateFrame ("frame", name, UIParent) + tinsert (UISpecialFrames, name) + options_frame:SetSize (500, 200) + options_frame:SetFrameStrata ("DIALOG") + options_frame:SetScript ("OnMouseDown", function(self, button) + if (button == "RightButton") then + if (self.moving) then + self.moving = false + self:StopMovingOrSizing() + end + return options_frame:Hide() + elseif (button == "LeftButton" and not self.moving) then + self.moving = true + self:StartMoving() + end + end) + options_frame:SetScript ("OnMouseUp", function(self) + if (self.moving) then + self.moving = false + self:StopMovingOrSizing() + end + end) + options_frame:SetMovable (true) + options_frame:EnableMouse (true) + options_frame:Hide() + options_frame:SetPoint ("center", UIParent, "center") + + options_frame:SetBackdrop ({bgFile = [[Interface\ACHIEVEMENTFRAME\UI-Achievement-Parchment-Horizontal]], tile = true, tileSize = 830, + edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", edgeSize = 32, + insets = {left = 5, right = 5, top = 5, bottom = 5}}) + options_frame:SetBackdropColor (0, 0, 0, .7) + + local title = _detalhes.gump:NewLabel (options_frame, nil, "$parentTitle", nil, title, nil, 20, "yellow") + title:SetPoint (12, -13) + _detalhes:SetFontOutline (title, true) + + local c = CreateFrame ("Button", nil, options_frame, "UIPanelCloseButton") + c:SetWidth (32) + c:SetHeight (32) + c:SetPoint ("TOPRIGHT", options_frame, "TOPRIGHT", -3, -3) + c:SetFrameLevel (options_frame:GetFrameLevel()+1) + + return options_frame + end + end \ No newline at end of file diff --git a/core/util.lua b/core/util.lua index c1077070..9fdbe5e2 100644 --- a/core/util.lua +++ b/core/util.lua @@ -191,7 +191,7 @@ end --> unpack more than 1 table - -- thanks http://www.dzone.com/snippets/lua-unpack-multiple-tables + -- http://www.dzone.com/snippets/lua-unpack-multiple-tables function _detalhes:unpacks (...) local values = {} for i = 1, select ('#', ...) do @@ -202,11 +202,22 @@ return unpack (values) end - --> trim thanks from http://lua-users.org/wiki/StringTrim + --> trim http://lua-users.org/wiki/StringTrim function _detalhes:trim (s) local from = s:match"^%s*()" return from > #s and "" or s:match(".*%S", from) end + + --> reverse numerical table + function _detalhes:reverse_table (t) + local new = {} + local index = 1 + for i = #t, 1, -1 do + new [index] = t[i] + index = index + 1 + end + return new + end -- lua base64 codec (c) 2006-2008 by Alex Kloss - http://www.it-rfc.de - licensed under the terms of the LGPL2 - http://lua-users.org/wiki/BaseSixtyFour do diff --git a/framework/label.lua b/framework/label.lua index c9c57923..4f9dc161 100644 --- a/framework/label.lua +++ b/framework/label.lua @@ -208,6 +208,9 @@ local LabelMetaFunctions = {} ------------------------------------------------------------------------------------------------------------ --> object constructor +function gump:CreateLabel (parent, text, size, color, font, member, name) + return gump:NewLabel (parent, nil, name, member, text, font, size, color) +end function gump:NewLabel (parent, container, name, member, text, font, size, color) @@ -224,6 +227,8 @@ function gump:NewLabel (parent, container, name, member, text, font, size, color end if (name:find ("$parent")) then + local pname = parent:GetName() + assert (pname, "label used $parent but parent has no name.") name = name:gsub ("$parent", parent:GetName()) end diff --git a/framework/normal_bar.lua b/framework/normal_bar.lua index 24a06c25..7e3fc005 100644 --- a/framework/normal_bar.lua +++ b/framework/normal_bar.lua @@ -408,47 +408,10 @@ local APIBarFunctions --> hooks function BarMetaFunctions:SetHook (hookType, func) if (func) then - if (hookType == "OnEnterHook") then - self.OnEnterHook = func - return true - elseif (hookType == "OnLeaveHook") then - self.OnLeaveHook = func - return true - elseif (hookType == "OnHideHook") then - self.OnHideHook = func - return true - elseif (hookType == "OnShowHook") then - self.OnShowHook = func - return true - elseif (hookType == "OnMouseDownHook") then - self.OnMouseDownHook = func - return true - elseif (hookType == "OnMouseUpHook") then - self.OnMouseUpHook = func - return true - end + _rawset (self, hookType.."Hook", func) else - if (hookType == "OnEnterHook") then - self.OnEnterHook = nil - return true - elseif (hookType == "OnLeaveHook") then - self.OnLeaveHook = nil - return true - elseif (hookType == "OnHideHook") then - self.OnHideHook = nil - return true - elseif (hookType == "OnShowHook") then - self.OnShowHook = nil - return true - elseif (hookType == "OnMouseDownHook") then - self.OnMouseDownHook = nil - return true - elseif (hookType == "OnMouseUpHook") then - self.OnMouseUpHook = nil - return true - end + _rawset (self, hookType.."Hook", nil) end - return false end ------------------------------------------------------------------------------------------------------------ diff --git a/framework/panel.lua b/framework/panel.lua index 0b579581..9e7867db 100644 --- a/framework/panel.lua +++ b/framework/panel.lua @@ -715,7 +715,7 @@ function gump:NewFillPanel (parent, rows, name, member, w, h, total_lines, fill_ for i = 1, amount do - local row = gump:NewPanel (scrollframe, nil, "$parentRow_" .. i, nil, 1, size) + local row = gump:NewPanel (parent, nil, "$parentRow_" .. i, nil, 1, size) row.backdrop = {bgFile = [[Interface\DialogFrame\UI-DialogBox-Background]]} row.color = {1, 1, 1, .2} row:SetPoint ("topleft", scrollframe, "topleft", 0, (i-1) * size * -1) diff --git a/functions/loaddata.lua b/functions/loaddata.lua index b65681ad..811cfc40 100644 --- a/functions/loaddata.lua +++ b/functions/loaddata.lua @@ -93,7 +93,7 @@ function _detalhes:LoadGlobalAndCharacterData() if (_detalhes_global and not _detalhes_global.profile_pool) then _detalhes_global.profile_pool = {} end - + for key, value in pairs (_detalhes.default_player_data) do --> check if key exists @@ -109,7 +109,7 @@ function _detalhes:LoadGlobalAndCharacterData() if (type (value) == "table") then _detalhes [key] = table_deepcopy (_detalhes_database [key]) else - _detalhes [key] = value + _detalhes [key] = _detalhes_database [key] end end @@ -118,7 +118,7 @@ function _detalhes:LoadGlobalAndCharacterData() if (not _detalhes_global) then _detalhes_global = table_deepcopy (_detalhes.default_global_data) end - + for key, value in pairs (_detalhes.default_global_data) do --> check if key exists @@ -145,9 +145,9 @@ function _detalhes:LoadGlobalAndCharacterData() if (type (value) == "table") then _detalhes [key] = table_deepcopy (_detalhes_global [key]) else - _detalhes [key] = value + _detalhes [key] = _detalhes_global [key] end - + end --> end @@ -270,25 +270,9 @@ function _detalhes:LoadConfig() end end - --if (_detalhes_database.RaidTablesSaved) then - - --for id, instance in ipairs (_detalhes.tabela_instancias) do - -- if (instance.modo == _detalhes._detalhes_props["MODO_RAID"]) then - -- _detalhes:AlteraModo (instance, _detalhes._detalhes_props["MODO_GROUP"]) - -- end - --end - - --if (_detalhes_database.RaidTablesSaved.Mode) then - -- _detalhes.RaidTables.Mode = _detalhes_database.RaidTablesSaved.Mode - -- _detalhes.RaidTables.LastSelected = _detalhes_database.RaidTablesSaved.LastSelected - --else - -- _detalhes.RaidTables.Mode = 1 - --end - --end - --> switch tables - _detalhes.switch.slots = _detalhes_database.switchSaved.slots - _detalhes.switch.table = _detalhes_database.switchSaved.table + _detalhes.switch.slots = _detalhes_global.switchSaved.slots + _detalhes.switch.table = _detalhes_global.switchSaved.table --> last boss _detalhes.last_encounter = _detalhes_database.last_encounter diff --git a/functions/profiles.lua b/functions/profiles.lua index 60de50d3..1b79d4d6 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -632,8 +632,6 @@ local default_player_data = { --> plugins tables SoloTablesSaved = {}, RaidTablesSaved = {}, - --> switch tables - switchSaved = {slots = 6, table = {}}, --> saved skins savedStyles = {}, } @@ -649,6 +647,11 @@ local default_global_data = { savedCustomSpells = {}, savedTimeCaptures = {}, lastUpdateWarning = 0, + report_where = "SAY", + --> switch tables + switchSaved = {slots = 6, table = {}}, + report_pos = {1, 1}, + --> tutorial tutorial = { logons = 0, unlock_button = 0, diff --git a/functions/savedata.lua b/functions/savedata.lua index 70ab2a82..961dbe9d 100644 --- a/functions/savedata.lua +++ b/functions/savedata.lua @@ -1,269 +1,8 @@ ---[[this file save the data when player logout and load data and player login back again]] +--[[this file save the data when player leave the game]] local _detalhes = _G._detalhes -function _detalhes:SaveData() - - if (_G._detalhes_saver) then - return - end - - _detalhes:SaveDataOnLogout() -end - -function _detalhes:SaveDataOnLogout() - if (true) then - return - end -end - -local force_reset = function() - print ("Check Point: Force reset.") - _detalhes.tabela_instancias = {} - _detalhes.tabela_historico = _detalhes.historico:NovoHistorico() - _detalhes.tabela_pets = _detalhes.container_pets:NovoContainer() - _detalhes.tabela_overall = _detalhes.combate:NovaTabela() - _detalhes.tabela_vigente = _detalhes.combate:NovaTabela (_, _detalhes.tabela_overall) - _detalhes_database = {} - return -end - -function _detalhes:LoadData() - ---[[ - if (true) then --> DEBUG, force empty data - return force_reset() -end --]] - - local _detalhes_database = _G._detalhes_database - - if (_detalhes_database) then - - ---------------------------------------------------------------------------------------- - --> fora dos profiles - ---------------------------------------------------------------------------------------- - - --> nicktag cache - _detalhes.nick_tag_cache = _detalhes_database.nick_tag_cache or {} - _detalhes:NickTagSetCache (_detalhes.nick_tag_cache) - - --> plugin data - _detalhes.plugin_database = _detalhes_database.plugin_database - - --> character info - _detalhes.character_data = _detalhes_database.character_data - - --> build basic containers - _detalhes.tabela_historico = _detalhes_database.tabela_historico or _detalhes.historico:NovoHistorico() -- segments - _detalhes.tabela_overall = _detalhes.combate:NovaTabela() -- overall - _detalhes.tabela_pets = _detalhes_database.tabela_pets or _detalhes.container_pets:NovoContainer() -- pets - - --> version - _detalhes.last_realversion = _detalhes_database.last_realversion or _detalhes.realversion --> core - _detalhes.last_version = _detalhes_database.last_version or "v1.0.0" --> version - - if (_detalhes.last_realversion < _detalhes.realversion) then - --> details was been hard upgraded - _detalhes.tabela_historico = _detalhes.historico:NovoHistorico() - _detalhes.tabela_pets = _detalhes.container_pets:NovoContainer() - _detalhes.tabela_overall = _detalhes.combate:NovaTabela() - _detalhes.tabela_vigente = _detalhes.combate:NovaTabela (_, _detalhes.tabela_overall) - end - - if (_detalhes.last_version ~= _detalhes.userversion) then - _detalhes.is_version_first_run = true - end - - --> re-build all indexes and metatables - _detalhes:RestauraMetaTables() - - --> get last combat table - local historico_UM = _detalhes.tabela_historico.tabelas[1] - - if (historico_UM) then - _detalhes.tabela_vigente = historico_UM --> significa que elas eram a mesma tabela, então aqui elas se tornam a mesma tabela - else - _detalhes.tabela_vigente = _detalhes.combate:NovaTabela (_, _detalhes.tabela_overall) - end - - _detalhes.combat_id = _detalhes_database.combat_id - - ---------------------------------------------------------------------------------------- - --> estão nos profiles - ---------------------------------------------------------------------------------------- - - --> minimap - _detalhes.minimap = _detalhes_database.minimap - --> PvP - _detalhes.only_pvp_frags = _detalhes_database.only_pvp_frags - - --> instances (windows) - - _detalhes.tabela_instancias = _detalhes_database.tabela_instancias or {} - _detalhes.class_icons_small = _detalhes_database.class_icons_small - _detalhes.class_coords = _detalhes_database.class_coords - _detalhes.class_colors = _detalhes_database.class_colors - - if (_detalhes_database.SoloTables) then - if (_detalhes_database.SoloTables.Mode) then - _detalhes.SoloTables.Mode = _detalhes_database.SoloTables.Mode - _detalhes.SoloTables.LastSelected = _detalhes_database.SoloTables.LastSelected - else - _detalhes.SoloTables.Mode = 1 - end - end - - if (_detalhes_database.RaidTables) then - if (_detalhes_database.RaidTables.Mode) then - _detalhes.RaidTables.Mode = _detalhes_database.RaidTables.Mode - _detalhes.RaidTables.LastSelected = _detalhes_database.RaidTables.LastSelected - else - _detalhes.RaidTables.Mode = 1 - end - end - - --> load options data - --window size - _detalhes.max_window_size = _detalhes_database.max_window_size - _detalhes.new_window_size = _detalhes_database.new_window_size - _detalhes.window_clamp = _detalhes_database.window_clamp - -- max segments - _detalhes.segments_amount = _detalhes_database.segments_amount - _detalhes.instances_amount = _detalhes_database.instances_amount - _detalhes.clear_ungrouped = _detalhes_database.clear_ungrouped - _detalhes.clear_graphic = _detalhes_database.clear_graphic - --> text sizes - _detalhes.font_sizes = _detalhes_database.font_sizes - _detalhes.ps_abbreviation = _detalhes_database.ps_abbreviation - -- row animation - _detalhes.use_row_animations = _detalhes_database.use_row_animations - _detalhes.animate_scroll = _detalhes_database.animate_scroll - _detalhes.use_scroll = _detalhes_database.use_scroll - -- death log - _detalhes.deadlog_limit = _detalhes_database.deadlog_limit - -- report - _detalhes.report_lines = _detalhes_database.report_lines - _detalhes.report_to_who = _detalhes_database.report_to_who - -- colors - _detalhes.default_bg_color = _detalhes_database.default_bg_color - _detalhes.default_bg_alpha = _detalhes_database.default_bg_alpha - -- fades - _detalhes.row_fade_in = _detalhes_database.row_fade_in - _detalhes.windows_fade_in = _detalhes_database.windows_fade_in - _detalhes.row_fade_out = _detalhes_database.row_fade_out - _detalhes.windows_fade_out = _detalhes_database.windows_fade_out - -- modes - _detalhes.solo = _detalhes_database.solo - _detalhes.raid = _detalhes_database.tank - -- switch - if (_detalhes_database.switch) then - _detalhes.switch.slots = _detalhes_database.switch.slots - _detalhes.switch.table = _detalhes_database.switch.table - end - - --> buffs - _detalhes.savedbuffs = _detalhes_database.savedbuffs - _detalhes.Buffs:BuildTables() - - --> customs - _detalhes.custom = _detalhes_database.custom - - --> need refresh for all containers - for _, container in ipairs (_detalhes.tabela_overall) do - container.need_refresh = true - end - for _, container in ipairs (_detalhes.tabela_vigente) do - container.need_refresh = true - end - - _detalhes_database.tabela_vigente = nil - _detalhes_database.tabela_historico = nil - _detalhes_database.tabela_pets = nil - - else - _detalhes.tabela_instancias = {} - _detalhes.tabela_historico = _detalhes.historico:NovoHistorico() - _detalhes.tabela_pets = _detalhes.container_pets:NovoContainer() - _detalhes.tabela_overall = _detalhes.combate:NovaTabela() - _detalhes.tabela_vigente = _detalhes.combate:NovaTabela (_, _detalhes.tabela_overall) - _detalhes_database = {} - end - - -- capture - _detalhes.capture_real = _detalhes_database and _detalhes_database.capture_real or { - ["damage"] = true, - ["heal"] = true, - ["energy"] = false, - ["miscdata"] = true, - ["aura"] = true, - ["spellcast"] = true, - } - - if (_detalhes.capture_real.spellcast == nil) then - _detalhes.capture_real.spellcast = true - end - - _detalhes.capture_current = {} - for captureType, captureValue in pairs (_detalhes.capture_real) do - _detalhes.capture_current [captureType] = captureValue - end - - _detalhes.cloud_capture = _detalhes_database.cloud_capture - _detalhes.minimum_combat_time = _detalhes_database.minimum_combat_time - --- On Account - - local _detalhes_global = _G._detalhes_global - - if (_detalhes_global) then - --saved styles - --vardump (_detalhes_global.savedStyles) - - _detalhes.__profiiles = _detalhes_global.__profiiles - - _detalhes.savedStyles = _detalhes_global.savedStyles or _detalhes.savedStyles - _detalhes.standard_skin = _detalhes_global.standard_skin - - if (not _detalhes_global.got_first_run) then - _detalhes.is_first_run = true - end - --max segments - _detalhes.segments_amount = _detalhes_global.segments_amount or _detalhes.segments_amount - _detalhes.segments_amount_to_save = _detalhes_global.segments_amount_to_save or _detalhes.segments_amount_to_save - _detalhes.segments_panic_mode = _detalhes_global.segments_panic_mode or _detalhes.segments_panic_mode - -- row animation - _detalhes.use_row_animations = _detalhes_global.use_row_animations or _detalhes.use_row_animations - _detalhes.animate_scroll = _detalhes_global.animate_scroll or _detalhes.animate_scroll - -- scrollbar - _detalhes.use_scroll = _detalhes_global.use_scroll or _detalhes.use_scroll - -- core - _detalhes.clear_ungrouped = _detalhes_global.clear_ungrouped or _detalhes.clear_ungrouped - _detalhes.update_speed = _detalhes_global.update_speed or _detalhes.update_speed - _detalhes.time_type = _detalhes_global.time_type or _detalhes.time_type - _detalhes.memory_threshold = _detalhes_global.memory_threshold - _detalhes.memory_ram = _detalhes_global.memory_ram - _detalhes.remove_realm_from_name = _detalhes_global.remove_realm_from_name - _detalhes.trash_concatenate = _detalhes_global.trash_concatenate - _detalhes.trash_auto_remove = _detalhes_global.trash_auto_remove - - _detalhes.SpellOverwriteUser = _detalhes_global.SpellOverwriteUser or _detalhes.SpellOverwriteUser - - --tutorial - _detalhes.tutorial = _detalhes_global.tutorial - - --profiles - _detalhes.__profiiles = _detalhes_global.__profiiles - - else - _detalhes.is_first_run = true - end - - return true -end - - function _detalhes:WipeConfig() - local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) local b = CreateFrame ("button", "DetailsResetConfigButton", UIParent, "OptionsButtonTemplate") @@ -273,7 +12,6 @@ function _detalhes:WipeConfig() b:SetText (Loc ["STRING_SLASH_WIPECONFIG_CONFIRM"]) b:SetScript ("OnClick", function() _detalhes.wipe_full_config = true; ReloadUI(); end) b:SetPoint ("center", UIParent, "center", 0, 0) - end local is_exception = { @@ -324,18 +62,11 @@ function _detalhes:SaveConfig() end end - --if (_detalhes.RaidTables.Mode) then - -- _detalhes_database.RaidTablesSaved = {} - -- _detalhes_database.RaidTablesSaved.Mode = _detalhes.RaidTables.Mode - -- if (_detalhes.RaidTables.Plugins [_detalhes.RaidTables.Mode]) then - -- _detalhes_database.RaidTablesSaved.LastSelected = _detalhes.RaidTables.Plugins [_detalhes.RaidTables.Mode].real_name - -- end - --end _detalhes_database.RaidTablesSaved = nil --> salva switch tables - _detalhes_database.switchSaved.slots = _detalhes.switch.slots - _detalhes_database.switchSaved.table = _detalhes.switch.table + _detalhes_global.switchSaved.slots = _detalhes.switch.slots + _detalhes_global.switchSaved.table = _detalhes.switch.table --> last boss _detalhes_database.last_encounter = _detalhes.last_encounter diff --git a/functions/spellcache.lua b/functions/spellcache.lua index 9b80e56e..fc99c2b9 100644 --- a/functions/spellcache.lua +++ b/functions/spellcache.lua @@ -58,6 +58,12 @@ do local default_user_spells = { [1] = {name = Loc ["STRING_MELEE"], icon = [[Interface\AddOns\Details\images\melee.tga]]}, [2] = {name = Loc ["STRING_AUTOSHOT"], icon = [[Interface\AddOns\Details\images\autoshot.tga]]}, + [3] = {name = Loc ["STRING_ENVIRONMENTAL_FALLING"], icon = [[Interface\ICONS\Spell_Magic_FeatherFall]]}, + [4] = {name = Loc ["STRING_ENVIRONMENTAL_DROWNING"], icon = [[Interface\ICONS\Ability_Suffocate]]}, + [5] = {name = Loc ["STRING_ENVIRONMENTAL_FATIGUE"], icon = [[Interface\ICONS\Spell_Arcane_MindMastery]]}, + [6] = {name = Loc ["STRING_ENVIRONMENTAL_FIRE"], icon = [[Interface\ICONS\INV_SummerFest_FireSpirit]]}, + [7] = {name = Loc ["STRING_ENVIRONMENTAL_LAVA"], icon = [[Interface\ICONS\Ability_Rhyolith_Volcano]]}, + [8] = {name = Loc ["STRING_ENVIRONMENTAL_SLIME"], icon = [[Interface\ICONS\Ability_Creature_Poison_02]]}, [124464] = {name = GetSpellInfo (124464) .. " (" .. Loc ["STRING_MASTERY"] .. ")"}, --> shadow word: pain mastery proc (priest) [124465] = {name = GetSpellInfo (124465) .. " (" .. Loc ["STRING_MASTERY"] .. ")"}, --> vampiric touch mastery proc (priest) @@ -74,6 +80,10 @@ do [131079] = {name = GetSpellInfo (131079) .. " (Icy Veins)"}, --> frostbolt with icy veins glyph (mage) [131080] = {name = GetSpellInfo (131080) .. " (Icy Veins)"}, --> ice lance with icy veins glyph (mage) [131081] = {name = GetSpellInfo (131081) .. " (Icy Veins)"}, --> frostfire with icy veins glyph (mage) + + [108686] = {name = GetSpellInfo (108686) .. " (" .. GetSpellInfo (108683) .. ")" }, --> immolate (brimstone) + [108685] = {name = GetSpellInfo (108685) .. " (" .. GetSpellInfo (108683) .. ")" }, --> conflagrate (brimstone) + [114654] = {name = GetSpellInfo (114654) .. " (" .. GetSpellInfo (108683) .. ")" }, --> incinetate (brimstone) } function _detalhes:UserCustomSpellUpdate (index, name, icon) diff --git a/gumps/janela_report.lua b/gumps/janela_report.lua index 7dd9fa6a..71e0fc9c 100644 --- a/gumps/janela_report.lua +++ b/gumps/janela_report.lua @@ -185,6 +185,26 @@ local _UISpecialFrames = UISpecialFrames --> wow api locals --> build report frame gump ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> script + local savepos = function (self) + local xofs, yofs = self:GetCenter() + local scale = self:GetEffectiveScale() + local UIscale = UIParent:GetScale() + xofs = xofs * scale - GetScreenWidth() * UIscale / 2 + yofs = yofs * scale - GetScreenHeight() * UIscale / 2 + local x = xofs / UIscale + local y = yofs / UIscale + _detalhes.report_pos [1] = x + _detalhes.report_pos [2] = y + end + local restorepos = function (self) + local x, y = _detalhes.report_pos [1], _detalhes.report_pos [2] + local scale = self:GetEffectiveScale() + local UIscale = UIParent:GetScale() + x = x * UIscale / scale + y = y * UIscale / scale + self:ClearAllPoints() + self:SetPoint ("center", UIParent, "center", x, y) + end local function seta_scripts (este_gump) --> Janela este_gump:SetScript ("OnMouseDown", @@ -199,6 +219,7 @@ local _UISpecialFrames = UISpecialFrames --> wow api locals function (self) if (self.isMoving) then self:StopMovingOrSizing() + savepos (self) self.isMoving = false end end) @@ -207,16 +228,6 @@ local _UISpecialFrames = UISpecialFrames --> wow api locals --> dropdown menus local function cria_drop_down (este_gump) - - --local selecionar = _CreateFrame ("Button", "Details_Report_DropDown", este_gump, "UIDropDownMenuTemplate") - --este_gump.select = selecionar - --selecionar:SetPoint ("topleft", este_gump, "topleft", 93, -53) - - --local function OnClick (self) - -- _UIDropDownMenu_SetSelectedID (selecionar, self:GetID()) - -- _detalhes.report_where = self.value - --end - --[[ Emote: 255 251 255 Yell: 255 63 64 @@ -325,9 +336,39 @@ local lista = { end end end - - _detalhes.report_where = "WHISPER" - + + function select_output:CheckValid() + + local last_selected = _detalhes.report_where + local check_func + for i, t in ipairs (lista) do + if (t[2] == last_selected) then + check_func = t[3] + break + end + end + + if (check_func) then + local is_shown = check_func() + if (is_shown) then + select_output:Select (last_selected) + else + if (IsInRaid()) then + select_output:Select ("RAID") + elseif (IsInParty()) then + select_output:Select ("PARTY") + elseif (IsInGuild()) then + select_output:Select ("GUILD") + else + select_output:Select ("SAY") + end + end + else + select_output:Select (last_selected) + end + end + + select_output:CheckValid() end --> slider @@ -526,26 +567,21 @@ local lista = { function gump:CriaJanelaReport() local este_gump = _CreateFrame ("Frame", "DetailsReportWindow", _UIParent) + este_gump:SetPoint ("CENTER", UIParent, "CENTER") este_gump:SetFrameStrata ("HIGH") _tinsert (_UISpecialFrames, este_gump:GetName()) este_gump:SetScript ("OnHide", function (self) - --[[ avoid taint problems - if (not este_gump.hidden or este_gump.fading_in) then --> trick to fade an window closed by pressing escape - este_gump:Show() - gump:Fade (este_gump, "in") - end - --]] _detalhes.janela_report.ativa = false end) - - este_gump:SetPoint ("CENTER", UIParent) + este_gump:SetWidth (320) este_gump:SetHeight (128) este_gump:EnableMouse (true) este_gump:SetResizable (false) este_gump:SetMovable (true) + restorepos (este_gump) _detalhes.janela_report = este_gump diff --git a/locales/Details-enUS.lua b/locales/Details-enUS.lua index 2286cd7e..4929fec0 100644 --- a/locales/Details-enUS.lua +++ b/locales/Details-enUS.lua @@ -223,6 +223,13 @@ if not Loc then return end --> Attributes + Loc ["STRING_ENVIRONMENTAL_FALLING"] = "Environment (falling)" + Loc ["STRING_ENVIRONMENTAL_DROWNING"] = "Environment (Drowning)" + Loc ["STRING_ENVIRONMENTAL_FATIGUE"] = "Environment (Fatigue)" + Loc ["STRING_ENVIRONMENTAL_FIRE"] = "Environment (Fire)" + Loc ["STRING_ENVIRONMENTAL_LAVA"] = "Environment (Lava)" + Loc ["STRING_ENVIRONMENTAL_SLIME"] = "Environment (Slime)" + Loc ["STRING_ATTRIBUTE_DAMAGE"] = "Damage" Loc ["STRING_ATTRIBUTE_DAMAGE_DONE"] = "Damage Done" Loc ["STRING_ATTRIBUTE_DAMAGE_DPS"] = "DPS" diff --git a/locales/Details-ptBR.lua b/locales/Details-ptBR.lua index 41f7758b..07151be7 100644 --- a/locales/Details-ptBR.lua +++ b/locales/Details-ptBR.lua @@ -131,6 +131,12 @@ L["STRING_DODGE"] = "Desvio" L["STRING_DOT"] = " (DoT)" L["STRING_DPS"] = "Dps" L["STRING_EMPTY_SEGMENT"] = "Segmento vazio" +L["STRING_ENVIRONMENTAL_DROWNING"] = "Ambiente (afogar)" -- Needs review +L["STRING_ENVIRONMENTAL_FALLING"] = "Ambiente (queda)" -- Needs review +L["STRING_ENVIRONMENTAL_FATIGUE"] = "Ambiente (fadiga)" -- Needs review +L["STRING_ENVIRONMENTAL_FIRE"] = "Ambiente (fogo)" -- Needs review +L["STRING_ENVIRONMENTAL_LAVA"] = "Ambiente (lava)" -- Needs review +L["STRING_ENVIRONMENTAL_SLIME"] = "Ambiente (\195\161cido)" -- Needs review L["STRING_EQUILIZING"] = "Compartilhando dados" -- Needs review L["STRING_ERASE"] = "apagar" L["STRING_ERASE_DATA"] = "Zerar todos os dados" @@ -1216,3 +1222,5 @@ L["STRING_VOIDZONE_TOOLTIP"] = "Dano e tempo:" L["STRING_WAITPLUGIN"] = "esperando por\ plugins" L["STRING_YES"] = "Sim" + + diff --git a/plugins/Details_TinyThreat/Details_TinyThreat.lua b/plugins/Details_TinyThreat/Details_TinyThreat.lua index a9ab8be9..82ce66ad 100644 --- a/plugins/Details_TinyThreat/Details_TinyThreat.lua +++ b/plugins/Details_TinyThreat/Details_TinyThreat.lua @@ -520,48 +520,9 @@ local function CreatePluginFrames (data) end local build_options_panel = function() - local options_frame = CreateFrame ("frame", "ThreatMeterOptionsWindow", UIParent) - tinsert (UISpecialFrames, "ThreatMeterOptionsWindow") - options_frame:SetSize (500, 200) - options_frame:SetFrameStrata ("DIALOG") - options_frame:SetScript ("OnMouseDown", function(self, button) - if (button == "RightButton") then - if (self.moving) then - self.moving = false - self:StopMovingOrSizing() - end - return options_frame:Hide() - elseif (button == "LeftButton" and not self.moving) then - self.moving = true - self:StartMoving() - end - end) - options_frame:SetScript ("OnMouseUp", function(self) - if (self.moving) then - self.moving = false - self:StopMovingOrSizing() - end - end) - options_frame:SetMovable (true) - options_frame:EnableMouse (true) - options_frame:Hide() - options_frame:SetPoint ("center", UIParent, "center") - - options_frame:SetBackdrop ({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16, - edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", edgeSize = 32, - insets = {left = 5, right = 5, top = 5, bottom = 5}}) - options_frame:SetBackdropColor (.3, .3, .3, .3) - - local title = ThreatMeter.gump:NewLabel (options_frame, nil, "$parentTitle", nil, "Tiny Threat Options", nil, 20, "yellow") - title:SetPoint (12, -13) - ThreatMeter:SetFontOutline (title, true) - - local c = CreateFrame ("Button", nil, options_frame, "UIPanelCloseButton") - c:SetWidth (32) - c:SetHeight (32) - c:SetPoint ("TOPRIGHT", options_frame, "TOPRIGHT", -3, -3) - c:SetFrameLevel (options_frame:GetFrameLevel()+1) - + + local options_frame = ThreatMeter:CreatePluginOptionsFrame ("ThreatMeterOptionsWindow", "Tiny Threat Options", 1) + local menu = { { type = "range", diff --git a/plugins/Details_Vanguard/Details_Vanguard.lua b/plugins/Details_Vanguard/Details_Vanguard.lua index 60d119f6..e9a900fe 100644 --- a/plugins/Details_Vanguard/Details_Vanguard.lua +++ b/plugins/Details_Vanguard/Details_Vanguard.lua @@ -1123,13 +1123,16 @@ local function CreatePluginFrames (data) local amt = 1 local hp = _UnitHealthMax (_track_player_name)/3 - for _, tabela in _ipairs (_track_player_object.last_events_table) do - if (tabela[1]) then - Vanguard:InsertDamage (tabela[3], amt, hp) - if (amt == Vanguard.DamageLabels.Spots) then - break + local last_events_table = _combat_object.player_last_events [MyName] + if (last_events_table) then + for _, tabela in _ipairs (last_events_table) do + if (tabela[1]) then + Vanguard:InsertDamage (tabela[3], amt, hp) + if (amt == Vanguard.DamageLabels.Spots) then + break + end + amt = amt+1 end - amt = amt+1 end end diff --git a/plugins/Details_YouAreNotPrepared/Details_YouAreNotPrepared.lua b/plugins/Details_YouAreNotPrepared/Details_YouAreNotPrepared.lua index 4f281b74..cacf9e0b 100644 --- a/plugins/Details_YouAreNotPrepared/Details_YouAreNotPrepared.lua +++ b/plugins/Details_YouAreNotPrepared/Details_YouAreNotPrepared.lua @@ -83,6 +83,7 @@ YouAreNotPreparedFrame:SetScript ("OnMouseUp", function (self, button) if (button == "RightButton") then + YouAreNotPrepared.db.rightclick_closed = true YouAreNotPreparedFrame:Hide() else if (YouAreNotPreparedFrame.isMoving) then @@ -107,9 +108,9 @@ c:SetHeight (32) c:SetPoint ("TOPRIGHT", YouAreNotPreparedFrame, "TOPRIGHT", 1, -15) c:SetFrameLevel (YouAreNotPreparedFrame:GetFrameLevel()+1) - + --background image - local b = DetailsFrameWork:NewImage (YouAreNotPreparedFrame, [[Interface\AddOns\Details_YouAreNotPrepared\background]], 512, 256, nil, nil, nil, "$parentBackground") + local b = DetailsFrameWork:NewImage (YouAreNotPreparedFrame, [[Interface\AddOns\Details_YouAreNotPrepared\background]], 512, 256, "background", nil, nil, "$parentBackground") b:SetPoint ("topleft", YouAreNotPreparedFrame, "topleft") --title @@ -118,6 +119,24 @@ t:SetPoint ("top", YouAreNotPreparedFrame, "top", 20, -26) t:SetPoint ("center", YouAreNotPreparedFrame, "center", 0, 0) + local on_mouse_down = function (self, button) + if (button == "RightButton" and not YouAreNotPreparedFrame.isMoving) then + YouAreNotPrepared.db.rightclick_closed = true + YouAreNotPreparedFrame:Hide() + else + if (not YouAreNotPreparedFrame.isMoving) then + YouAreNotPreparedFrame:StartMoving() + YouAreNotPreparedFrame.isMoving = true + end + end + end + local on_mouse_up = function (self, button) + if (YouAreNotPreparedFrame.isMoving) then + YouAreNotPreparedFrame:StopMovingOrSizing() + YouAreNotPreparedFrame.isMoving = false + end + end + --bar container local container_bars = CreateFrame ("frame", "Details_YouAreNotPrepared_FauxScroll_Box", YouAreNotPreparedFrame) container_bars:SetPoint ("topleft", YouAreNotPreparedFrame, "topleft", 23, -80) @@ -127,22 +146,37 @@ container_bars:SetBackdropColor (.1, .1, .1, .2) YouAreNotPrepared.container_bars = container_bars + container_bars:SetScript ("OnMouseDown", on_mouse_down) + container_bars:SetScript ("OnMouseUp", on_mouse_up) + container_bars.bars = {} - local MouseUpCloseHook = function (_, button) + local MouseDownCloseHook = function (_, button) if (button == "RightButton") then + YouAreNotPrepared.db.rightclick_closed = true YouAreNotPreparedFrame:Hide() - return true --> interrupt + return true --> interrupt hook end end + local on_enter_bar = function (self) + if (self.MyObject.spellid) then + GameTooltip:SetOwner (self, "ANCHOR_TOPLEFT") + GameTooltip:SetSpellByID (self.MyObject.spellid) + GameTooltip:Show() + end + end + local on_leave_bar = function (self) + GameTooltip:Hide() + end + function container_bars:CreateChild() local bar_number = #self.bars + 1 local bar = DetailsFrameWork:NewPanel (self, YouAreNotPreparedFrame, "$parentBar" .. bar_number, nil, 250, BAR_HEIGHT) bar:SetPoint ("topleft", self, "topleft", 1, bar_number*13*-1+9) - bar:SetHook ("OnMouseUp", MouseUpCloseHook) + bar:SetHook ("OnMouseDown", MouseDownCloseHook) bar.locked = false bar.backdrop = nil bar.hide = true @@ -154,6 +188,14 @@ YouAreNotPrepared:SetFontFace (statusbar.textleft, "GameFontHighlightSmall") YouAreNotPrepared:SetFontFace (statusbar.textleft, "GameFontNormal") + statusbar:SetHook ("OnEnter", on_enter_bar) + statusbar:SetHook ("OnLeave", on_leave_bar) + statusbar:SetHook ("OnMouseDown", on_mouse_down) + statusbar:SetHook ("OnMouseUp", on_mouse_up) + + bar:SetHook ("OnMouseDown", on_mouse_down) + bar:SetHook ("OnMouseUp", on_mouse_up) + container_bars.bars [bar_number] = bar return bar @@ -161,6 +203,8 @@ function container_bars:UpdateChild (bar_number, data, time_of_death, max_health) + --> death parser + local spellname, _, icon = _GetSpellInfo (data[2]) local bar = container_bars.bars [bar_number] @@ -171,18 +215,22 @@ hp = 100 end - if (data[1]) then --> damage - if (data[3] and type (data [1]) == "boolean") then --> is a real damage, not a battle ress and its not a last cooldown line - bar.statusbar.textleft:SetText (string.format ("%.1f", data [4] - time_of_death) .. "s " .. spellname .. " (" .. data [6] .. ")") - bar.statusbar.textright:SetText ("-" .. YouAreNotPrepared:ToK (data [3]) .. " (" .. hp .. "%)") - bar.statusbar._icon:SetTexture (icon) + if (data[1] and type (data [1]) == "boolean") then --> damage + bar.statusbar.textleft:SetText (string.format ("%.1f", data [4] - time_of_death) .. "s " .. spellname .. " (" .. data [6] .. ")") + bar.statusbar.textright:SetText ("-" .. YouAreNotPrepared:ToK (data [3]) .. " (" .. hp .. "%)") + bar.statusbar._icon:SetTexture (icon) + if (data [9]) then + bar.statusbar.color = "darkorange" + else bar.statusbar.color = "red" - bar.statusbar.background:SetVertexColor (1, 0, 0, .2) - bar.statusbar.textleft:SetWidth (250 - bar.statusbar.textright:GetStringWidth() - 20) - bar.statusbar.value = hp - return true end - else + bar.statusbar.background:SetVertexColor (1, 0, 0, .2) + bar.statusbar.textleft:SetWidth (250 - bar.statusbar.textright:GetStringWidth() - 20) + bar.statusbar.value = hp + bar.statusbar.spellid = data[2] + return true + + elseif (not data[1] and type (data [1]) == "boolean") then --> healing bar.statusbar.textleft:SetText (string.format ("%.1f", data [4] - time_of_death) .. "s " .. spellname .. " (" .. data [6] .. ")") bar.statusbar.textright:SetText ("+" .. YouAreNotPrepared:ToK (data [3]) .. " (" .. hp .. "%)") bar.statusbar._icon:SetTexture (icon) @@ -190,7 +238,9 @@ bar.statusbar.background:SetVertexColor (0, 1, 0, .2) bar.statusbar.textleft:SetWidth (250 - bar.statusbar.textright:GetStringWidth() - 20) bar.statusbar.value = hp + bar.statusbar.spellid = data[2] return true + end end @@ -228,6 +278,25 @@ scrollbar:SetScript ("OnVerticalScroll", function (self, offset) FauxScrollFrame_OnVerticalScroll (self, offset, BAR_HEIGHT, refresh_function) end) scrollbar:SetPoint ("topleft", YouAreNotPreparedFrame, "topleft", 23, -80) scrollbar:SetSize (250, 138) + scrollbar:SetScript ("OnMouseDown", function (self, button) + if (button == "RightButton" and not YouAreNotPreparedFrame.isMoving) then + YouAreNotPrepared.db.rightclick_closed = true + YouAreNotPreparedFrame:Hide() + else + if (not YouAreNotPreparedFrame.isMoving) then + YouAreNotPreparedFrame:StartMoving() + YouAreNotPreparedFrame.isMoving = true + end + end + end) + scrollbar:SetScript ("OnMouseUp", function (self, button) + if (button == "LeftButton") then + if (YouAreNotPreparedFrame.isMoving) then + YouAreNotPreparedFrame:StopMovingOrSizing() + YouAreNotPreparedFrame.isMoving = false + end + end + end) container_bars:EnableMouse (true) @@ -350,6 +419,38 @@ _detalhes:InstanceAlert (Loc ["STRING_PLUGIN_ALERT"], {[[Interface\ICONS\Achievement_Boss_Illidan]], 14, 14, false, 0.8984375, 0.0546875, 0.0546875, 0.8984375}, YouAreNotPrepared.db.shown_time, {YouAreNotPrepared.ShowMeFromInstanceAlert}) end + + --auto open box + local autoopen_checkbox = CreateFrame ("CheckButton", "YANP_AutoOpenCheckBox", YouAreNotPreparedFrame, "ChatConfigCheckButtonTemplate") + autoopen_checkbox:SetPoint ("bottomleft", container_bars, "topleft", 45, -1) + local text = _G ["YANP_AutoOpenCheckBoxText"] + text:SetText ("Auto Open") + autoopen_checkbox:SetFrameLevel (YouAreNotPreparedFrame:GetFrameLevel()+5) + --YouAreNotPrepared:SetFontSize (text, 10) + text:ClearAllPoints() + text:SetPoint ("left", autoopen_checkbox, "right", -2, 1) + --checkbox.tooltip = Loc ["STRING_REPORTFRAME_CURRENTINFO"] + autoopen_checkbox:SetHitRectInsets (0, -60, 0, 0) + autoopen_checkbox:SetScript ("PostClick", function(self) + if (self:GetChecked()) then + YouAreNotPrepared.db.auto_open = true + else + YouAreNotPrepared.db.auto_open = false + end + end) + YouAreNotPrepared:SetFontColor (text, "greenyellow") + + --> open options + local options_button = CreateFrame ("button", nil, YouAreNotPreparedFrame) + options_button:SetPoint ("left", text, "right", 2, 0) + options_button:SetSize (18, 18) + options_button:SetAlpha (0.8) + options_button:SetNormalTexture ([[Interface\Buttons\UI-OptionsButton]]) + options_button:SetHighlightTexture ([[Interface\Buttons\UI-OptionsButton]]) + options_button:SetPushedTexture ([[Interface\Buttons\UI-OptionsButton]]) + options_button:SetScript ("OnClick", YouAreNotPrepared.OpenOptionsPanel) + local right_text = YouAreNotPrepared.gump:CreateLabel (YouAreNotPreparedFrame, "Options", nil, "greenyellow", "GameFontHighlight", "optionstext", "$parentOptionsText") + right_text:SetPoint ("left", options_button, "right", 2, 0) end ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -385,6 +486,10 @@ if (alvo_name == YouAreNotPrepared.playername) then local combat = YouAreNotPrepared:GetCombat ("current") + + --> store death + local d = YouAreNotPrepared:reverse_table (death_table) + death_table = d if (combat.is_boss) then --> encounter or pvp YouAreNotPrepared.last_death_combat_id = YouAreNotPrepared.combat_id @@ -457,8 +562,9 @@ local default_settings = { shown_time = 30, -- - auto_open = false, -- + auto_open = true, -- hide_on_combat = true, -- + rightclick_closed = false, deaths_table = {} } @@ -470,6 +576,8 @@ YouAreNotPrepared.db = saveddata + YANP_AutoOpenCheckBox:SetChecked (saveddata.auto_open) + --> register needed events _G._detalhes:RegisterEvent (YouAreNotPrepared, "DETAILS_DATA_RESET") _G._detalhes:RegisterEvent (YouAreNotPrepared, "COMBAT_PLAYER_LEAVE") @@ -477,6 +585,14 @@ --> register needed hooks _G._detalhes:InstallHook (DETAILS_HOOK_DEATH, YouAreNotPrepared.OnDeath) + --> create right click to close + if (not YouAreNotPrepared.db.rightclick_closed) then + local right_click = YouAreNotPrepared.gump:NewImage (YouAreNotPreparedFrame, [[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 16, 18, "overlay", {8/512, 70/512, 328/512, 409/512}) + right_click:SetPoint ("left", _G [YouAreNotPreparedFrame:GetName() .. "OptionsText"], "right", 2, 0) + local right_text = YouAreNotPrepared.gump:CreateLabel (YouAreNotPreparedFrame, "Right Click to Close", nil, "greenyellow", "GameFontHighlight", "rightclicktext", "$parentRightClickText") + right_text:SetPoint ("left", right_click, "right", 2, 0) + end + --> install slash command SLASH_Details_YouAreNotPrepared1 = "/yanp" function SlashCmdList.Details_YouAreNotPrepared (msg, editbox) diff --git a/startup.lua b/startup.lua index 2637afca..15694fe9 100644 --- a/startup.lua +++ b/startup.lua @@ -62,7 +62,7 @@ function _G._detalhes:Start() --> start time machine self.timeMachine:Ligar() - --> update abbreviation shorcut + --> update abbreviation shortcut self.atributo_damage:UpdateSelectedToKFunction() self.atributo_heal:UpdateSelectedToKFunction() @@ -377,6 +377,6 @@ function _G._detalhes:Start() if (not _detalhes.schedule_chat_enter and not _detalhes.schedule_chat_leave) then _detalhes.schedule_chat_enter = _detalhes:ScheduleTimer ("EnterChatChannel", 30) end - + end