diff --git a/API UI.txt b/API UI.txt new file mode 100644 index 00000000..b478c1f6 --- /dev/null +++ b/API UI.txt @@ -0,0 +1,191 @@ + + +instance:DesaturateMenu (enabled) +enabled = boolean, if true, buttons on the window's title bar became black and white. + +instance:HideMainIcon (enabled) +enabled = boolean, if true, hides the attribute icon on the title bar (recommended). + +instance:MenuAnchor (x, y) +x,y = number, adjust the axis x and y of the buttons on the title bar. + +instance:StretchButtonAnchor (side) +side = number, 1 = top side of the window, 2 = bottom. + +instance:StretchButtonAlwaysOnTop (enabled) +enabled = boolean, if true, the stretch grab is always above other frames. + +instance:ToolbarSide (side) +side = number, 1 = top side of the window, 2 = bottom. Adjust which side the title bar will attach. + +instance:SetWindowScale (scale, refresh_group) +scale = number, 0.65 to 1.5. +refresh_group = boolean, if true it apply the scale to all windows in the group (recommended). + +instance:MicroDisplaysSide (side) +side = number, 1 = top side of the window, 2 = bottom. + +instance:SetAutoHideMenu (enabled) +enabled = boolean, if true, the buttons on window's title bar auto hide when the player isn't interacting with the window. + +instance:SetBackdropTexture (texturename) +texturename = string, texture name for SharedMedia. + +instance:AttributeMenu (enabled, pos_x, pos_y, font, size, color, side, shadow) +enabled = boolean, show or hide the window's title text. +pos_x = number, position on x axis. +pos_y = number, position on y axis. +font = string, font name for SharedMedia. +size = number, font size. +color = table {r, b, g, a} or string html color name. +side = number, 1 = align it on top side, 2 = bottom side. +shadow = boolean, draw the outline shadow to the text. + +instance:LeftMenuAnchorSide (side) +side = number, 1 = left, 2 = right, set the anchor point for buttons on window's title bar. + +instance:SetFrameStrata (strata) +strata = string, "BACKGROUND", "LOW", "MEDIUM", "HIGH" or "DIALOG". + +instance:SetCombatAlpha (modify_type, alpha_amount) +modify_type = number, 1 = none, 2 = While In Combat, 3 = "While Out of Combat", 4 = "While Out of a Group" (can be only one type) +alpha_amount = number, the amount of alpha. + +instance:ChangeSkin (skin_name) +skin_name = string, the name of the skin to apply. +if skin name is nil, it reaply all config based on the window's config table. + +instance:ToolbarMenuSetButtons (mode, segment, attributes, report, reset, close) +mode = boolean, show or hide this button on window`s title bar. +segment = boolean +attributes = boolean +report = boolean +reset = boolean +close = boolean + +instance:ToolbarMenuSetButtonsOptions (spacement, shadow) +spacement = number between -5 to 10, adjust the gap size between each button on window's title bar. +shadow = boolean, is true, draws a shadow outline on the button. + +instance:ToolbarMenuButtonsSize (size) +size = number between 0.4 to 1.6, adjust the size of window's title bar buttons. + +instance:InstanceColor (red, green, blue, alpha, no_save, change_statusbar) +red = number, red color on 0 to 1 scale +green = number, green color on 0 to 1 scale +blue = number, blue color on 0 to 1 scale +alpha = number, alpha on 0 to 1 scale +no_save = boolean, if true, these values are applied only in the textures without chaging the value on the window's config table. +change_statusbar = boolean, if true, it also change the color of window's statusbar. + +instance:InstanceWallpaper (texture, anchor, alpha, texcoord, width, height, overlay) +texture = string, path to a image file. +anchor = string, "all", "center", "stretchLR", "stretchTB". Sets how the texture align within the window. +alpha = number +texcoord = table {L, R, T, B} +width = number, most of the times is ignored due to anchors settings. +height = number, most of the times is ignored due to anchors settings. +overlay = table {r, b, g, a} + +instance:SetBarSettings (height, texture, colorclass, fixedcolor, backgroundtexture, backgroundcolorclass, backgroundfixedcolor, alpha, iconfile, barstart, spacement) +height = number, the height of the bars. +texture = texture name (SharedMedia), used on the statubar bar. +colorclass = boolean, if true, the bar is painted with the player's class color. +fixedcolor = table with {r, b, g, a} or html color string (e.g. "blue"). +backgroundtexture = texture name (SharedMedia), used below the bar, this bar always have the same width as the window. +backgroundcolorclass = boolean, if true, the bar is painted with the player's class color. +backgroundfixedcolor = table with {r, b, g, a} or html color string (e.g. "blue"). +alpha = number. +iconfile = string, icon file path to be used on bars. +barstart = boolean, if true the bar attaches on the right side of the icon, else, on the left side (useful for transparent icons). +spacement = number, how much space between bars. + +instance:SetBarModel (upper_enabled, upper_model, upper_alpha, lower_enabled, lower_model, lower_alpha) +upper_enabled = boolean +upper_model = string, path to the 3d model +upper_alpha = number +lower_enabled = boolean +lower_model = string, path to the 3d model +lower_alpha = number + +instance:SetBarBackdropSettings (enabled, size, color, texture) +enabled = boolean. +size = number, adjust the size of the border. +color = table, {r, g, b, a} +texture = string, edge name for SharedMedia:Fetch ("border", texture) + +instance:SetBarTextSettings (size, font, fixedcolor, leftcolorbyclass, rightcolorbyclass, leftoutline, rightoutline, customrighttextenabled, customrighttext, percentage_type, showposition, customlefttextenabled, customlefttext) +size = number, text size +font = string, text font, e.g "Arrial Narrow" +fixedcolor = table with {r, b, g, a} or html color string (e.g. "blue"). +leftcolorbyclass = boolean, if true text color uses the color of the shown player class, else, the color value on 'fixedcolor'. +rightcolorbyclass = boolean, if true text color uses the color of the shown player class, else, the color value on 'fixedcolor'. +leftoutline = boolean, if true, draws the outline shadow. +rightoutline = boolean, if true, draws the outline shadow. +customrighttextenabled = boolean, if true, uses the custom text. +customrighttext = string, the customized text to shown on the bar. +percentage_type = number, 1 = players's percentage is relative to total of all players. 2 = is relative to the top ranked player. +showposition = boolean, if true, show the rank number at the left side of the player's name. +customlefttextenabled = boolean, if true, uses the custom text. +customlefttext = string, the customized text to shown on the bar. + +instance:SetBarFollowPlayer (boolean) +when enabled the player's bar is always shown even if the player isn't in the top ranked. +example: player is the rank 13 on damage done, but the window only show 1-8. Window now shows 1-7 and 13. + +instance:SetBarGrowDirection (direction) +direction = 1 top to bottom / 2 bottom to top + +instance:HideStatusBar() // instance:ShowStatusBar() +Show or hide the statusbar for the window. + +instance:StatusBarColor (r, g, b, a, no_save) +r, g, b, a = number, color to set, +no_save = boolean, if true, the values isn't set on the instance config table. + +instance:ShowSideBars() // instance:HideSideBars() +Show or Hide the borders. + +-------------------- + +instance:InstanceMsg (text, icon, textcolor, iconcoords, iconcolor) +text = string or false to hide the alert +icon = texture path +textcolor = table with {r, b, g, a} or html color string (e.g. "blue"). +iconcoords = table with {L, R, T, B} +iconcolor = table with {r, b, g, a} or html color string (e.g. "blue"). + +instance:HaveInstanceAlert() +returns if the window is showing an alert. + +instance:InstanceAlert (msg, icon, time, clickfunc) +shows up an alert on the window. +msg = string or false to hide the alert +icon = texture path or NIL or table {texture, width, height, animate, coordL, coordR, coordT, coordB, r, g, b, a} +time = time in seconds the alert stay shown (default 15). +clickfunc = table {function, param1, param2, "left" or "right" button} + +-------------------- + +_detalhes:SetTooltipBackdrop (border_texture, border_size, border_color) +border_texture = string, border name for SharedMedia. +border_size = number, border size. +border_color = table {r, g, b, a} + +_detalhes:ReportSingleLine (instance, row object) +get the text on the chosen row and open report dialog for the player. + +-------------------- + +framework = _detalhes:GetFramework() +returns the framework object. + +framework:RegisterForDetailsMove (frame, instance) +set OnMouseDown and OnMouseUp scripts on 'frame', when is moved, the instance is also moved. + +instance:IsGroupedWith (instance) +returns true with the 'self instance' is groupped with the passed instance object. + +instance:GetInstanceGroup() +returns a table with instances objects of all instances inside the group. + diff --git a/boot.lua b/boot.lua index 7a4471b0..3bd1ad75 100644 --- a/boot.lua +++ b/boot.lua @@ -3,8 +3,8 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.build_counter = 259 --it's 259 for release - _detalhes.userversion = "v3.4.7" + _detalhes.build_counter = 281 --it's 281 for release + _detalhes.userversion = "v3.5.0" _detalhes.realversion = 49 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" @@ -18,31 +18,17 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ -|cFFFFFF00v3.4.7 (|cFFFFCC00Dec 11, 2014|r|cFFFFFF00)|r:\n\n -|cFFFFFF00-|r Advanced Death Logs plugin got updates on Endurance Player Value and few bug fixes.\n\n -|cFFFFFF00-|r Max Window Amount options can new be set to 1, before the minimum was 3.\n\n -|cFFFFFF00-|r Fixed a problem with friendly fire tooltip where sometimes it doesn't show up.\n\n -|cFFFFFF00-|r Fixed cooldowns tooltip which wasn't showing rounded numbers (49.99 instead of 50).\n\n -|cFFFFFF00-|r Fixed Warrior's Shield Block which wasn't being count as a cooldown.\n\n -|cFFFFFF00-|r Fixed a problem where sometimes when a hunter pull and reset the boss right after, was causing segments to merge.\n\n - -|cFFFFFF00v3.4.4 (|cFFFFCC00Dec 05, 2014|r|cFFFFFF00)|r:\n\n -|cFFFFFF00-|r Fixed a issue with Ko'Ragh boss on Highmaul raid.\n\n -|cFFFFFF00-|r Few changes on Bookmark panel.\n\n - -|cFFFFFF00v3.4.3 (|cFFFFCC00Dec 02, 2014|r|cFFFFFF00)|r:\n\n -|cFFFFFF00-|r Removed 'Simple Gray' skin.\n\n -|cFFFFFF00-|r Addde new skin: 'Forced Square'.\n\n -|cFFFFFF00-|r 'Default Skin' got renamed to 'WoW Interface'.\n\n - -|cFFFFFF00v3.4.2 (|cFFFFCC00Dec 01, 2014|r|cFFFFFF00)|r:\n\n -|cFFFFFF00-|r Fixed a bug with menu desaturation where erase and close buttons stay colored after clicking on it.\n\n -|cFFFFFF00-|r Fixed stretch where sometimes after release the window, all exceeded bars shows up and fade in again.\n\n -|cFFFFFF00-|r Fixed a bug with the +- buttons on the window's scale option.\n\n -|cFFFFFF00-|r Fixed the border for sub menus on mode menu.\n\n +|cFFFFFF00v3.5.0 (|cFFFFCC00Dec 14, 2014|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r Fixed tooltip for Auras and Voidzones, now shows sorted by damage and time.\n\n +|cFFFFFF00-|r More fixes for Korgath encounter on Highmaul.\n\n +|cFFFFFF00-|r Added slash commands: 'reset' 'config'.\n\n +|cFFFFFF00-|r Spell bars on Player Details Window now is painted with the spell spellschool color.\n\n +|cFFFFFF00-|r Multistrike doesn't count any more for spell's Minimal Damage.\n\n +|cFFFFFF00-|r Resource display got an tooltip which shows what resource is and resource gained per minute.\n\n +|cFFFFFF00-|r Clicking on report button when the report window is already open, make it close.\n\n --]] - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.4.7 (|cFFFFCC00Dec 11, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Advanced Death Logs plugin got updates on Endurance Player Value and few bug fixes.\n\n|cFFFFFF00-|r Max Window Amount options can new be set to 1, before the minimum was 3.\n\n|cFFFFFF00-|r Fixed a problem with friendly fire tooltip where sometimes it wasn't showing up.\n\n|cFFFFFF00-|r Fixed cooldowns tooltip which wasn't showing rounded numbers (49.99 instead of 50).\n\n|cFFFFFF00-|r Fixed Warrior's Shield Block which wasn't being count as a cooldown.\n\n|cFFFFFF00-|r Fixed a problem where sometimes when a hunter pull and reset the boss right after, was causing segments to merge.\n\n|cFFFFFF00v3.4.4 (|cFFFFCC00Dec 05, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed a issue with Ko'Ragh boss on Highmaul raid.\n\n|cFFFFFF00-|r Few changes on Bookmark panel.\n\n|cFFFFFF00v3.4.3 (|cFFFFCC00Dec 02, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Removed 'Simple Gray' skin.\n\n|cFFFFFF00-|r Addde new skin: 'Forced Square'.\n\n|cFFFFFF00-|r 'Default Skin' got renamed to 'WoW Interface'.\n\n|cFFFFFF00v3.4.2 (|cFFFFCC00Dec 01, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed a bug with menu desaturation where erase and close buttons stay colored after clicking on it.\n\n|cFFFFFF00-|r Fixed stretch where sometimes after release the window, all exceeded bars shows up and fade in again.\n\n|cFFFFFF00-|r Fixed a bug with the +- buttons on the window's scale option.\n\n|cFFFFFF00-|r Fixed the border for sub menus on mode menu.\n\n|cFFFFFF00v3.4.0 (|cFFFFCC00Nov 29, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed custom displays ignoring 'target' setted.\n\n|cFFFFFF00-|r Fixed plugins showing its icon even when auto hide menus is enabled.\n\n|cFFFFFF00-|r .Updates slash command 'worldboss' now it shows Draenor bosses.\n\n|cFFFFFF00v3.3.0 (|cFFFFCC00Nov 25, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added 3D models for the bars in the window. The options are at Appearance -> Rows: Advanced.\n\n|cFFFFFF00-|r Now when showing custom displays, clicking on a bar report what is shown on bar's tooltip.\n\n|cFFFFFF00-|r More fixes for dungeon bosses identification.\n\n|cFFFFFF00-|r Fixed a tooltip bug with Debuff Uptime and Aura & Voidzone displays.\n\n|cFFFFFF00-|r Fixed Player Details Window for friendly fire and damage taken.\n\n|cFFFFFF00-|r Fixed Molten Core Raid Finder version where all bosses was considered trash segments.\n\n|cFFFFFF00v3.2.4 (|cFFFFCC00Nov 19, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r More fixes for dungeon bosses recognition.\n\n|cFFFFFF00-|r Fixes for few errors during combat parser.\n\n|cFFFFFF00v3.2.3 (|cFFFFCC00Nov 18, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed Monk's Stagger ability which was counting as damage done.\n\n|cFFFFFF00-|r Added WoD dungeon information, this fixes dungeon bosses being assigned as 'trash cleanup'.\n\n|cFFFFFF00-|r Added more information on API.txt document (is in Details! root folder).\n\n|cFFFFFF00v3.2.1 (|cFFFFCC00Nov 14, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Custom Displays updated to track WoD potions.\n\n|cFFFFFF00-|r Added Feedback panel at options panel.\n\n|cFFFFFF00v3.2.0 (|cFFFFCC00Nov 11, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Major changes on the way Details! store information, these changes saves up to 40% memory and 4% cpu usage.\n\n|cFFFFFF00-|r Fixed problem with pet's healing messing with the owner activity time.\n\n|cFFFFFF00-|r Added Energy -> Resources.\n\n|cFFFFFF00-|r Fixed combat initialization when the player start casting a Dot spell.\n\n|cFFFFFF00-|r Added new custom display: Damage Taken By Spell.\n\n|cFFFFFF00v2.2.3 (|cFFFFCC00Oct 26, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed the healing done problem with Priest's Spirit of Redemption.\n\n|cFFFFFF00-|r Fixed avoidance by absorb when the hit missed was a multistrike hit.\n\n|cFFFFFF00-|r Fixed a script time out problem when erasing data while in combat.\n\n|cFFFFFF00-|r Fixed bug with interrupt tooltip when the player have a pet.\n\n|cFFFFFF00v2.2.1 (|cFFFFCC00Oct 22, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed the gap between the button and its menu which sometimes traveling the mouse between them was activating tooltips from window's bars.\n\n|cFFFFFF00-|r Fixed an annoying menu blink when the window was near the right side of the screen.\n\n|cFFFFFF00-|r Fixed the stretch grab which was over other windows even with the 'stretch always on top' option disabled.\n\n|cFFFFFF00-|r Few fixes on healing done from absorbs.\n\n|cFFFFFF00v2.1.6 (|cFFFFCC00Oct 21, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed death's tooltip which wasn't respecting tooltip's configuration set on options panel.\n\n|cFFFFFF00-|r Now when the window is close to the top of the screen, menus will anchor on bottom side of the menu icons.\n\n|cFFFFFF00-|r Added micro displays options on Window Settings bracket.\n\n|cFFFFFF00-|r Fixed the problem with bar's custom texts.\n\n|cFFFFFF00-|r Lua functions inside custom texts, Chart Data scripts and Custom Displays scripts are now protected calls and won't break the addon functionality if an error occurs. Unfortunately we still doesn't have a documentation for Details! API.\n\n|cFFFFFF00-|r Fixed an incomum bug with tank avoidance tables.\n\n|cFFFFFF00-|r Tiny Threat: added option to use class colors instead of green-to-red colors.\n\n|cFFFFFF00-|r Added option to enable shadows on toolbar's buttons.\n\n|cFFFFFF00-|r Added option to set the specing between each button on toolbar.\n\n|cFFFFFF00-|r Finally we merged the left and right menus into only one with 6 icons.\n\n|cFFFFFF00-|r Removed window button and added a new option bracket to manage windows under Mode Menu.\n\n|cFFFFFF00-|r Few changes on 'Default Skin', 'Minimalistic', 'Simple Gray' and 'ElvUI Frame Style BW' (need reaply).\n\n|cFFFFFF00- Important:|r If the menus is out of the position, just reaply the skin.\n\nv2.0.15 (|cFFFFCC00Oct 15, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed tooltips where sometimes it wans't showing at all.\n\n|cFFFFFF00-|r Fixed the healing done amount on Malkorok encounter.\n\nv2.0.14 (|cFFFFCC00Oct 14, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added pre-potion recognition for WoD pots.\n\n|cFFFFFF00-|r Added spell list for Blackrock Foundry encounters.\n\n|cFFFFFF00-|r Added mouse wheel scroll speed option.\n\n|cFFFFFF00-|r Added support for healing multistrike and damage multistrike.\n\n|cFFFFFF00-|r Added a Change Log button on Options Panel.\n\n|cFFFFFF00-|r When the windows is locked, trying to move the window through toolbar will stretch it instead.\n\n|cFFFFFF00-|r Renamed overheal for shields, now its called 'shield wasted'.\n\n|cFFFFFF00-|r Fine tuning on healing done, should have high accuracy now.\n\n|cFFFFFF00-|r Encounter Details plugin now supports Highmaul and Blackrock Foundry.\n\n|cFFFFFF00-|r New class cooldowns and spells recognition.\n\n|cFFFFFF00-|r Fixed few bugs on comparison panel and avoidance panel.\n\n|cFFFFFF00-|r Fixed encounter recognition, now it should show the encounter name over segments menu." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.5.0 (|cFFFFCC00Dec 14, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed tooltip for Auras and Voidzones, now shows sorted by damage and time.\n\n|cFFFFFF00-|r More fixes for Korgath encounter on Highmaul.\n\n|cFFFFFF00-|r Added slash commands: 'reset' 'config'.\n\n|cFFFFFF00-|r Spell bars on Player Details Window now is painted with the spell spellschool color.\n\n|cFFFFFF00-|r Multistrike doesn't count any more for spell's Minimal Damage.\n\n|cFFFFFF00-|r Resource display got an tooltip which shows what resource is and resource gained per minute.\n\n|cFFFFFF00-|r Clicking on report button when the report window is already open, make it close.\n\n|cFFFFFF00v3.4.7 (|cFFFFCC00Dec 11, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Advanced Death Logs plugin got updates on Endurance Player Value and few bug fixes.\n\n|cFFFFFF00-|r Max Window Amount options can new be set to 1, before the minimum was 3.\n\n|cFFFFFF00-|r Fixed a problem with friendly fire tooltip where sometimes it wasn't showing up.\n\n|cFFFFFF00-|r Fixed cooldowns tooltip which wasn't showing rounded numbers (49.99 instead of 50).\n\n|cFFFFFF00-|r Fixed Warrior's Shield Block which wasn't being count as a cooldown.\n\n|cFFFFFF00-|r Fixed a problem where sometimes when a hunter pull and reset the boss right after, was causing segments to merge.\n\n|cFFFFFF00v3.4.4 (|cFFFFCC00Dec 05, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed a issue with Ko'Ragh boss on Highmaul raid.\n\n|cFFFFFF00-|r Few changes on Bookmark panel.\n\n|cFFFFFF00v3.4.3 (|cFFFFCC00Dec 02, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Removed 'Simple Gray' skin.\n\n|cFFFFFF00-|r Addde new skin: 'Forced Square'.\n\n|cFFFFFF00-|r 'Default Skin' got renamed to 'WoW Interface'.\n\n|cFFFFFF00v3.4.2 (|cFFFFCC00Dec 01, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed a bug with menu desaturation where erase and close buttons stay colored after clicking on it.\n\n|cFFFFFF00-|r Fixed stretch where sometimes after release the window, all exceeded bars shows up and fade in again.\n\n|cFFFFFF00-|r Fixed a bug with the +- buttons on the window's scale option.\n\n|cFFFFFF00-|r Fixed the border for sub menus on mode menu.\n\n|cFFFFFF00v3.4.0 (|cFFFFCC00Nov 29, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed custom displays ignoring 'target' setted.\n\n|cFFFFFF00-|r Fixed plugins showing its icon even when auto hide menus is enabled.\n\n|cFFFFFF00-|r .Updates slash command 'worldboss' now it shows Draenor bosses.\n\n|cFFFFFF00v3.3.0 (|cFFFFCC00Nov 25, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added 3D models for the bars in the window. The options are at Appearance -> Rows: Advanced.\n\n|cFFFFFF00-|r Now when showing custom displays, clicking on a bar report what is shown on bar's tooltip.\n\n|cFFFFFF00-|r More fixes for dungeon bosses identification.\n\n|cFFFFFF00-|r Fixed a tooltip bug with Debuff Uptime and Aura & Voidzone displays.\n\n|cFFFFFF00-|r Fixed Player Details Window for friendly fire and damage taken.\n\n|cFFFFFF00-|r Fixed Molten Core Raid Finder version where all bosses was considered trash segments.\n\n|cFFFFFF00v3.2.4 (|cFFFFCC00Nov 19, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r More fixes for dungeon bosses recognition.\n\n|cFFFFFF00-|r Fixes for few errors during combat parser.\n\n|cFFFFFF00v3.2.3 (|cFFFFCC00Nov 18, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed Monk's Stagger ability which was counting as damage done.\n\n|cFFFFFF00-|r Added WoD dungeon information, this fixes dungeon bosses being assigned as 'trash cleanup'.\n\n|cFFFFFF00-|r Added more information on API.txt document (is in Details! root folder).\n\n|cFFFFFF00v3.2.1 (|cFFFFCC00Nov 14, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Custom Displays updated to track WoD potions.\n\n|cFFFFFF00-|r Added Feedback panel at options panel.\n\n|cFFFFFF00v3.2.0 (|cFFFFCC00Nov 11, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Major changes on the way Details! store information, these changes saves up to 40% memory and 4% cpu usage.\n\n|cFFFFFF00-|r Fixed problem with pet's healing messing with the owner activity time.\n\n|cFFFFFF00-|r Added Energy -> Resources.\n\n|cFFFFFF00-|r Fixed combat initialization when the player start casting a Dot spell.\n\n|cFFFFFF00-|r Added new custom display: Damage Taken By Spell.\n\n|cFFFFFF00v2.2.3 (|cFFFFCC00Oct 26, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed the healing done problem with Priest's Spirit of Redemption.\n\n|cFFFFFF00-|r Fixed avoidance by absorb when the hit missed was a multistrike hit.\n\n|cFFFFFF00-|r Fixed a script time out problem when erasing data while in combat.\n\n|cFFFFFF00-|r Fixed bug with interrupt tooltip when the player have a pet.\n\n|cFFFFFF00v2.2.1 (|cFFFFCC00Oct 22, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed the gap between the button and its menu which sometimes traveling the mouse between them was activating tooltips from window's bars.\n\n|cFFFFFF00-|r Fixed an annoying menu blink when the window was near the right side of the screen.\n\n|cFFFFFF00-|r Fixed the stretch grab which was over other windows even with the 'stretch always on top' option disabled.\n\n|cFFFFFF00-|r Few fixes on healing done from absorbs.\n\n|cFFFFFF00v2.1.6 (|cFFFFCC00Oct 21, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed death's tooltip which wasn't respecting tooltip's configuration set on options panel.\n\n|cFFFFFF00-|r Now when the window is close to the top of the screen, menus will anchor on bottom side of the menu icons.\n\n|cFFFFFF00-|r Added micro displays options on Window Settings bracket.\n\n|cFFFFFF00-|r Fixed the problem with bar's custom texts.\n\n|cFFFFFF00-|r Lua functions inside custom texts, Chart Data scripts and Custom Displays scripts are now protected calls and won't break the addon functionality if an error occurs. Unfortunately we still doesn't have a documentation for Details! API.\n\n|cFFFFFF00-|r Fixed an incomum bug with tank avoidance tables.\n\n|cFFFFFF00-|r Tiny Threat: added option to use class colors instead of green-to-red colors.\n\n|cFFFFFF00-|r Added option to enable shadows on toolbar's buttons.\n\n|cFFFFFF00-|r Added option to set the specing between each button on toolbar.\n\n|cFFFFFF00-|r Finally we merged the left and right menus into only one with 6 icons.\n\n|cFFFFFF00-|r Removed window button and added a new option bracket to manage windows under Mode Menu.\n\n|cFFFFFF00-|r Few changes on 'Default Skin', 'Minimalistic', 'Simple Gray' and 'ElvUI Frame Style BW' (need reaply).\n\n|cFFFFFF00- Important:|r If the menus is out of the position, just reaply the skin.\n\nv2.0.15 (|cFFFFCC00Oct 15, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed tooltips where sometimes it wans't showing at all.\n\n|cFFFFFF00-|r Fixed the healing done amount on Malkorok encounter.\n\nv2.0.14 (|cFFFFCC00Oct 14, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added pre-potion recognition for WoD pots.\n\n|cFFFFFF00-|r Added spell list for Blackrock Foundry encounters." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/classes/classe_damage.lua b/classes/classe_damage.lua index 23ede4ef..49dd49b9 100644 --- a/classes/classe_damage.lua +++ b/classes/classe_damage.lua @@ -546,6 +546,24 @@ return _detalhes:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true}) end + local sort_tooltip_void_zones = function (tabela1, tabela2) + if (tabela1 [2] > tabela2 [2]) then + return true + elseif (tabela1 [2] == tabela2 [2]) then + if (tabela1[1] ~= "" and tabela2[1] ~= "") then + return tabela1 [3].uptime > tabela2 [3].uptime + elseif (tabela1[1] ~= "") then + return true + elseif (tabela2[1] ~= "") then + return false + end + else + return false + end + end + + local tooltip_void_zone_temp = {} + function _detalhes:ToolTipVoidZones (instancia, actor, barra, keydown) local damage_actor = instancia.showing[1]:PegarCombatente (_, actor.damage_twin) @@ -574,35 +592,55 @@ debuff_table.damage = 0 end end - - --> sort no container: - _table_sort (container, function (tabela1, tabela2) - if (tabela1.damage > tabela2.damage) then - return true; - elseif (tabela1.damage == tabela2.damage) then - return tabela1.uptime > tabela2.uptime; + + for i = 1, #tooltip_void_zone_temp do + local t = tooltip_void_zone_temp [i] + t[1] = "" + t[2] = 0 + t[3] = 0 + end + + local i = 1 + for target_name, debuff_table in _pairs (container) do + local t = tooltip_void_zone_temp [i] + if (not t) then + t = {} + tinsert (tooltip_void_zone_temp, t) end - return false; - end) - - --actor.debuff_uptime_targets:remapear() + + t[1] = target_name + t[2] = debuff_table.damage + t[3] = debuff_table + + i = i + 1 + end + --> sort no container: + _table_sort (tooltip_void_zone_temp, sort_tooltip_void_zones) + --> monta o cooltip local GameCooltip = GameCooltip GameCooltip:AddLine (Loc ["STRING_VOIDZONE_TOOLTIP"], nil, nil, headerColor, nil, 12) GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.126953125, 0.1796875, 0, 0.0546875) - for target_name, debuff_table in _pairs (container) do + --for target_name, debuff_table in _pairs (container) do + for index, t in _ipairs (tooltip_void_zone_temp) do + + if (t[3] == 0) then + break + end + + local debuff_table = t[3] local minutos, segundos = _math_floor (debuff_table.uptime / 60), _math_floor (debuff_table.uptime % 60) if (minutos > 0) then - GameCooltip:AddLine (target_name, FormatTooltipNumber (_, debuff_table.damage) .. " (" .. minutos .. "m " .. segundos .. "s" .. ")") + GameCooltip:AddLine (t[1], FormatTooltipNumber (_, debuff_table.damage) .. " (" .. minutos .. "m " .. segundos .. "s" .. ")") else - GameCooltip:AddLine (target_name, FormatTooltipNumber (_, debuff_table.damage) .. " (" .. segundos .. "s" .. ")") + GameCooltip:AddLine (t[1], FormatTooltipNumber (_, debuff_table.damage) .. " (" .. segundos .. "s" .. ")") end - local classe = _detalhes:GetClass (target_name) + local classe = _detalhes:GetClass (t[1]) if (classe) then GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], nil, nil, 14, 14, unpack (_detalhes.class_coords [classe])) else @@ -2090,13 +2128,17 @@ function atributo_damage:MontaInfoFriendlyFire() local Skills = {} for target_name, ff_table in _pairs (self.friendlyfire) do - _table_insert (DamagedPlayers, {target_name, ff_table.total, ff_table.total / FriendlyFireTotal * 100, combat (1, target_name).classe}) - - for spellid, amount in _pairs (ff_table.spells) do - Skills [spellid] = (Skills [spellid] or 0) + amount + + local actor = combat (1, target_name) + if (actor) then + _table_insert (DamagedPlayers, {target_name, ff_table.total, ff_table.total / FriendlyFireTotal * 100, actor.classe}) + + for spellid, amount in _pairs (ff_table.spells) do + Skills [spellid] = (Skills [spellid] or 0) + amount + end end end - + _table_sort (DamagedPlayers, _detalhes.Sort2) local amt = #DamagedPlayers @@ -2137,12 +2179,12 @@ function atributo_damage:MontaInfoFriendlyFire() barra.textura:SetValue (tabela[2]/FirstPlaceDamage*100) end - barra.texto_esquerdo:SetText (index .. instancia.divisores.colocacao .. tabela[1]) --seta o texto da esqueda + barra.texto_esquerdo:SetText (index .. instancia.divisores.colocacao .. _detalhes:GetOnlyName (tabela[1])) --seta o texto da esqueda barra.texto_direita:SetText (_detalhes:comma_value (tabela[2]) .. " (" .. _cstr ("%.1f", tabela[3]) .."%)") --seta o texto da direita local classe = tabela[4] if (not classe) then - classe = "monster" + classe = "MONSTER" end barra.icone:SetTexture (info.instancia.row_info.icon_file) @@ -2153,6 +2195,13 @@ function atributo_damage:MontaInfoFriendlyFire() barra.icone:SetTexture (nil) end + local color = _detalhes.class_colors [classe] + if (color) then + barra.textura:SetStatusBarColor (_unpack (color)) + else + barra.textura:SetStatusBarColor (1, 1, 1) + end + barra.minha_tabela = self barra.show = tabela[1] barra:Show() @@ -2254,12 +2303,12 @@ function atributo_damage:MontaInfoDamageTaken() texCoords = _detalhes.class_coords ["UNKNOW"] end - self:UpdadeInfoBar (barra, index, tabela[1], tabela[1], tabela[2], _detalhes:comma_value (tabela[2]), max_, tabela[3], "Interface\\AddOns\\Details\\images\\classes_small", true, texCoords) + self:UpdadeInfoBar (barra, index, tabela[1], tabela[1], tabela[2], _detalhes:comma_value (tabela[2]), max_, tabela[3], "Interface\\AddOns\\Details\\images\\classes_small_alpha", true, texCoords, nil, tabela[4]) end end ---[[exported]] function _detalhes:UpdadeInfoBar (row, index, spellid, name, value, value_formated, max, percent, icon, detalhes, texCoords) +--[[exported]] function _detalhes:UpdadeInfoBar (row, index, spellid, name, value, value_formated, max, percent, icon, detalhes, texCoords, spellschool, class) --> seta o tamanho da barra if (index == 1) then row.textura:SetValue (100) @@ -2268,7 +2317,7 @@ end end --end - row.texto_esquerdo:SetText (index.."."..name) + row.texto_esquerdo:SetText (index .. ". " .. name) --> seta o texto da direita row.texto_direita:SetText (value_formated .. " (" .. _cstr ("%.1f", percent) .."%)") @@ -2292,6 +2341,25 @@ end row.show = spellid row:Show() --> mostra a barra + if (spellschool) then + local t = _detalhes.spells_school [spellschool] + if (t and t.decimals) then + row.textura:SetStatusBarColor (t.decimals[1], t.decimals[2], t.decimals[3]) + else + row.textura:SetStatusBarColor (1, 1, 1) + end + + elseif (class) then + local color = _detalhes.class_colors [class] + if (color) then + row.textura:SetStatusBarColor (_unpack (color)) + else + row.textura:SetStatusBarColor (1, 1, 1) + end + else + row.textura:SetStatusBarColor (1, 1, 1) + end + if (detalhes and self.detalhes and self.detalhes == spellid and info.showing == index) then --self:MontaDetalhes (spellid, row) --> poderia deixar isso pro final e montar uma tail call?? self:MontaDetalhes (row.show, row, info.instancia) --> poderia deixar isso pro final e montar uma tail call?? @@ -2339,22 +2407,22 @@ function atributo_damage:MontaInfoDamageDone() for _spellid, _skill in _pairs (ActorSkillsContainer) do --> da foreach em cada spellid do container local nome, _, icone = _GetSpellInfo (_spellid) - _table_insert (ActorSkillsSortTable, {_spellid, _skill.total, _skill.total/ActorTotalDamage*100, nome, icone}) + _table_insert (ActorSkillsSortTable, {_spellid, _skill.total, _skill.total/ActorTotalDamage*100, nome, icone, nil, _skill.spellschool}) end --> add pets local ActorPets = self.pets --local class_color = RAID_CLASS_COLORS [self.classe] and RAID_CLASS_COLORS [self.classe].colorStr local class_color = "FFDDDDDD" + local class_color = "FFDDDD44" for _, PetName in _ipairs (ActorPets) do local PetActor = instancia.showing (class_type, PetName) if (PetActor) then local PetSkillsContainer = PetActor.spells._ActorTable for _spellid, _skill in _pairs (PetSkillsContainer) do --> da foreach em cada spellid do container local nome, _, icone = _GetSpellInfo (_spellid) - _table_insert (ActorSkillsSortTable, {_spellid, _skill.total, _skill.total/ActorTotalDamage*100, nome .. " (|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r)", icone, PetActor}) + _table_insert (ActorSkillsSortTable, {_spellid, _skill.total, _skill.total/ActorTotalDamage*100, nome .. " |TInterface\\AddOns\\Details\\images\\classes_small_alpha:12:12:0:0:128:128:33:64:96:128|t|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r", icone, PetActor, _skill.spellschool}) end - --_table_insert (ActorSkillsSortTable, {PetName, PetActor.total, PetActor.total/ActorTotalDamage*100, PetName:gsub ((" <.*"), ""), "Interface\\AddOns\\Details\\images\\classes_small"}) end end @@ -2371,16 +2439,18 @@ function atributo_damage:MontaInfoDamageDone() barra = gump:CriaNovaBarraInfo1 (instancia, index) end - self:FocusLock (barra, tabela[1]) - barra.other_actor = tabela [6] + local name = tabela[4] + if (info.sub_atributo == 2) then - self:UpdadeInfoBar (barra, index, tabela[1], tabela[4], tabela[2], _detalhes:comma_value (_math_floor (tabela[2]/meu_tempo)), max_, tabela[3], tabela[5], true) + self:UpdadeInfoBar (barra, index, tabela[1], name, tabela[2], _detalhes:comma_value (_math_floor (tabela[2]/meu_tempo)), max_, tabela[3], tabela[5], true, nil, tabela [7]) else - self:UpdadeInfoBar (barra, index, tabela[1], tabela[4], tabela[2], _detalhes:comma_value (tabela[2]), max_, tabela[3], tabela[5], true) + self:UpdadeInfoBar (barra, index, tabela[1], name, tabela[2], _detalhes:comma_value (tabela[2]), max_, tabela[3], tabela[5], true, nil, tabela [7]) end - + + self:FocusLock (barra, tabela[1]) + end --> TOP INIMIGOS @@ -2432,10 +2502,10 @@ function atributo_damage:MontaInfoDamageDone() barra.textura:SetValue (tabela[2]/max_*100) end - barra.texto_esquerdo:SetText (index..instancia.divisores.colocacao..tabela[1]) --seta o texto da esqueda - barra.texto_direita:SetText (_detalhes:comma_value (tabela[2]) .." ".. instancia.divisores.abre .. _cstr ("%.1f", tabela[3]) .."%".. instancia.divisores.fecha) --seta o texto da direita + barra.texto_esquerdo:SetText (index .. ". " .. _detalhes:GetOnlyName (tabela[1])) --seta o texto da esqueda + barra.texto_direita:SetText (_detalhes:comma_value (tabela[2]) .. " (" .. _cstr ("%.1f", tabela[3]) .. "%)") --seta o texto da direita - barra.icone:SetTexture ([[Interface\AddOns\Details\images\classes_small]]) --CLASSE + barra.icone:SetTexture ([[Interface\AddOns\Details\images\classes_small_alpha]]) --CLASSE local texCoords = _detalhes.class_coords [tabela[4]] if (not texCoords) then @@ -2443,6 +2513,13 @@ function atributo_damage:MontaInfoDamageDone() end barra.icone:SetTexCoord (_unpack (texCoords)) + local color = _detalhes.class_colors [tabela[4]] + if (color) then + barra.textura:SetStatusBarColor (_unpack (color)) + else + barra.textura:SetStatusBarColor (1, 1, 1) + end + _detalhes:name_space_info (barra) if (barra.mouse_over) then --> atualizar o tooltip @@ -2501,6 +2578,13 @@ function atributo_damage:MontaInfoDamageDone() barra.textura:SetValue (tabela[2]/max_inimigos*100) end + barra.textura:SetStatusBarColor (1, 0.8, 0.8) + + barra.icone:SetTexture ([[Interface\AddOns\Details\images\classes_small_alpha]]) --CLASSE + + local texCoords = _detalhes.class_coords ["ENEMY"] + barra.icone:SetTexCoord (_unpack (texCoords)) + barra.texto_esquerdo:SetText (index..instancia.divisores.colocacao..tabela[1]) --seta o texto da esqueda if (info.sub_atributo == 2) then barra.texto_direita:SetText (_detalhes:comma_value ( _math_floor (tabela[2]/meu_tempo)) .." ".. instancia.divisores.abre .._cstr("%.1f", tabela[3]) .. instancia.divisores.fecha) --seta o texto da direita @@ -2638,7 +2722,7 @@ function atributo_damage:MontaDetalhesEnemy (spellid, barra) barra.textura:SetValue (tabela[2]/max_*100) --> muito mais rapido... end - barra.texto_esquerdo:SetText (index .. ". " .. tabela [1]) --seta o texto da esqueda + barra.texto_esquerdo:SetText (index .. ". " .. _detalhes:GetOnlyName (tabela [1])) --seta o texto da esqueda _detalhes:name_space_info (barra) if (spell.total > 0) then @@ -2652,7 +2736,14 @@ function atributo_damage:MontaDetalhesEnemy (spellid, barra) texCoords = _detalhes.class_coords ["UNKNOW"] end - barra.icone:SetTexture ("Interface\\AddOns\\Details\\images\\classes_small") + local color = _detalhes.class_colors [tabela[3]] + if (color) then + barra.textura:SetStatusBarColor (_unpack (color)) + else + barra.textura:SetStatusBarColor (1, 1, 1, 1) + end + + barra.icone:SetTexture ("Interface\\AddOns\\Details\\images\\classes_small_alpha") barra.icone:SetTexCoord (unpack (texCoords)) barra:Show() --> mostra a barra @@ -2739,10 +2830,15 @@ function atributo_damage:MontaDetalhesDamageTaken (nome, barra) end ------ Detalhe Info Damage Done e Dps -local defenses_table = {c = {117/255, 58/255, 0/255}, p = 0} -local normal_table = {c = {255/255, 180/255, 0/255, 0.5}, p = 0} -local multistrike_table = {c = {223/255, 249/255, 45/255, 0.5}, p = 0} -local critical_table = {c = {249/255, 74/255, 45/255, 0.5}, p = 0} +--local defenses_table = {c = {117/255, 58/255, 0/255}, p = 0} +--local normal_table = {c = {255/255, 180/255, 0/255, 0.5}, p = 0} +--local multistrike_table = {c = {223/255, 249/255, 45/255, 0.5}, p = 0} +--local critical_table = {c = {249/255, 74/255, 45/255, 0.5}, p = 0} + +local defenses_table = {c = {1, 1, 1, 0.5}, p = 0} +local normal_table = {c = {1, 1, 1, 0.5}, p = 0} +local multistrike_table = {c = {1, 1, 1, 0.5}, p = 0} +local critical_table = {c = {1, 1, 1, 0.5}, p = 0} local data_table = {} local t1, t2, t3, t4 = {}, {}, {}, {} @@ -2793,12 +2889,20 @@ function atributo_damage:MontaDetalhesDamageDone (spellid, barra, instancia) else this_dps = Loc ["STRING_DPS"] .. ": " .. Loc ["STRING_SEE_BELOW"] end + + local spellschool, schooltext = esta_magia.spellschool, "" + if (spellschool) then + local t = _detalhes.spells_school [spellschool] + if (t and t.name) then + schooltext = t.formated + end + end gump:SetaDetalheInfoTexto ( index, 100, Loc ["STRING_GERAL"], Loc ["STRING_DAMAGE"]..": ".._detalhes:ToK (esta_magia.total), --Loc ["STRING_MULTISTRIKE"] .. ": " .. _cstr ("%.1f", esta_magia.counter/esta_magia.m_amt*100) .. "%", - "", --offhand, + schooltext, --offhand, Loc ["STRING_AVERAGE"] .. ": " .. _detalhes:comma_value (media), this_dps, Loc ["STRING_HITS"]..": " .. total_hits) @@ -2925,7 +3029,7 @@ function atributo_damage:MontaTooltipDamageTaken (esta_barra, index) for spellid, spell in _pairs (container) do for target_name, amount in _pairs (spell.targets) do if (target_name == self.nome) then - total = total + actor.total + total = total + amount habilidades [#habilidades+1] = {spellid, amount} end end diff --git a/classes/classe_damage_habilidade.lua b/classes/classe_damage_habilidade.lua index d1d4a1a9..96230999 100644 --- a/classes/classe_damage_habilidade.lua +++ b/classes/classe_damage_habilidade.lua @@ -131,7 +131,7 @@ if (amount > self.c_max) then self.c_max = amount end - if (self.c_min > amount or self.c_min == 0) then + if ((self.c_min > amount or self.c_min == 0) and not multistrike) then self.c_min = amount end else @@ -140,7 +140,7 @@ if (amount > self.n_max) then self.n_max = amount end - if (self.n_min > amount or self.n_min == 0) then + if ((self.n_min > amount or self.n_min == 0) and not multistrike) then self.n_min = amount end end diff --git a/classes/classe_energy.lua b/classes/classe_energy.lua index 8bcc19aa..0847b115 100644 --- a/classes/classe_energy.lua +++ b/classes/classe_energy.lua @@ -834,9 +834,29 @@ function atributo_energy:KeyNames (sub_atributo) end ---------> TOOLTIPS BIFURCAÇÃO + +local resource_bg_color = {.1, .1, .1, 0.6} +local resource_bg_coords = {.6, 0.1, 0, 0.64453125} + function atributo_energy:ToolTip (instancia, numero, barra, keydown) if (instancia.sub_atributo <= 4) then return self:ToolTipRegenRecebido (instancia, numero, barra, keydown) + + elseif (instancia.sub_atributo == 5) then --resources + + local resource_string = _detalhes.resource_strings [self.resource_type] + + if (resource_string) then + + local icon = _detalhes.resource_icons [self.resource_type] + + GameCooltip:AddLine (resource_string, _cstr ("%.2f", self.resource / instancia.showing:GetCombatTime()) .. " per minute", 1, "white") + GameCooltip:AddIcon (icon.file, 1, 1, 16, 16, unpack (icon.coords)) + GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], resource_bg_coords, resource_bg_color, true) + + return true + end + end end @@ -1401,6 +1421,11 @@ end --> restaura a meta e indexes ao ator _detalhes.refresh:r_atributo_energy (actor, shadow) shadow.powertype = actor.powertype + + if (actor.resource) then + shadow.resource = (shadow.resource or 0) + actor.resource + shadow.resource_type = actor.resource_type + end --> targets for target_name, amount in _pairs (actor.targets) do @@ -1447,10 +1472,15 @@ end shadow.received = shadow.received + actor.received if (not actor.powertype) then - print ("actor without powertype", actor.nome, actor.powertype) + --print ("actor without powertype", actor.nome, actor.powertype) end shadow.powertype = actor.powertype + + if (actor.resource) then + shadow.resource = (shadow.resource or 0) + actor.resource + shadow.resource_type = actor.resource_type + end --> total no combate overall (captura de dados) _detalhes.tabela_overall.totals[3] [actor.powertype] = _detalhes.tabela_overall.totals[3] [actor.powertype] + actor.total @@ -1511,6 +1541,10 @@ atributo_energy.__add = function (tabela1, tabela2) if (not tabela1.powertype) then tabela1.powertype = tabela2.powertype end + + if (tabela1.resource) then + tabela1.resource = tabela1.resource + (tabela2.resource or 0) + end --> total and received tabela1.total = tabela1.total + tabela2.total @@ -1544,6 +1578,10 @@ atributo_energy.__sub = function (tabela1, tabela2) if (not tabela1.powertype) then tabela1.powertype = tabela2.powertype end + + if (tabela1.resource) then + tabela1.resource = tabela1.resource - (tabela2.resource or 0) + end --> total and received tabela1.total = tabela1.total - tabela2.total diff --git a/classes/classe_instancia.lua b/classes/classe_instancia.lua index 93e35ecc..935061b3 100644 --- a/classes/classe_instancia.lua +++ b/classes/classe_instancia.lua @@ -2121,7 +2121,7 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini end if (_detalhes.janela_info:IsShown() and instancia == _detalhes.janela_info.instancia) then - if (not instancia.showing) then + if (not instancia.showing or instancia.atributo > 4) then _detalhes:FechaJanelaInfo() else local actor = instancia.showing (instancia.atributo, _detalhes.janela_info.jogador.nome) diff --git a/classes/container_combatentes.lua b/classes/container_combatentes.lua index c0904c49..47a2a140 100644 --- a/classes/container_combatentes.lua +++ b/classes/container_combatentes.lua @@ -562,7 +562,10 @@ function _detalhes.clear:c_container_combatentes (container) container.__index = nil container.shadow = nil - container._NameIndexTable = nil + --container._NameIndexTable = nil container.need_refresh = nil container.funcao_de_criacao = nil + end + function _detalhes.clear:c_container_combatentes_index (container) + container._NameIndexTable = nil end \ No newline at end of file diff --git a/core/control.lua b/core/control.lua index 87784976..57927da0 100644 --- a/core/control.lua +++ b/core/control.lua @@ -457,7 +457,10 @@ --> add to storage if (not InCombatLockdown() and not UnitAffectingCombat ("player") and not _detalhes.logoff_saving_data) then - pcall (_detalhes.StoreEncounter) + local successful, errortext = pcall (_detalhes.StoreEncounter) + if (not successful) then + _detalhes:Msg ("error occurred on StoreEncounter():", errortext) + end else _detalhes.schedule_store_boss_encounter = true end diff --git a/core/gears.lua b/core/gears.lua index dbebc7ac..6311b3b7 100644 --- a/core/gears.lua +++ b/core/gears.lua @@ -227,99 +227,270 @@ function _detalhes:StoreEncounter (combat) return end - --> check if is a mythic encounter - local diff = combat:GetDifficulty() - if (difficulty ~= 16) then - --if (diff ~= 16 and false) then --> debug - return - end - local boss_info = combat:GetBossInfo() local encounter_id = boss_info and boss_info.id if (not encounter_id) then return end - - --> check the guild name - local match = 0 - local guildName = select (1, GetGuildInfo ("player")) - local raid_size = GetNumGroupMembers() or 0 - if (guildName) then - for i = 1, raid_size do - local gName = select (1, GetGuildInfo ("raid" .. i)) or "" - if (gName == guildName) then - match = match + 1 + local diff = combat:GetDifficulty() + + --> check for heroic mode + if (diff == 5 or diff == 6 or diff == 15) then + + local role = UnitGroupRolesAssigned ("player") + if (role ~= "DAMAGER" and role ~= "HEALER") then + return + end + + --> check if the storage is already loaded + if (not IsAddOnLoaded ("Details_DataStorage")) then + local loaded, reason = LoadAddOn ("Details_DataStorage") + if (not loaded) then + return end end - if (match < raid_size * 0.75) then + --> get the storage table + local db = DetailsDataStorage + + if (not db and _detalhes.CreateStorageDB) then + db = _detalhes:CreateStorageDB() + if (not db) then + return + end + elseif (not db) then return end - else - return - end - --> check if the storage is already loaded - if (not IsAddOnLoaded ("Details_DataStorage")) then - local loaded, reason = LoadAddOn ("Details_DataStorage") - if (not loaded) then + local self_database = db.SELF_STORAGE + + if (not self_database) then + --> outdate database? return end - end - - --> get the storage table - local db = DetailsDataStorage - - if (not db and _detalhes.CreateStorageDB) then - db = _detalhes:CreateStorageDB() - if (not db) then - return - end - end - - local raid_database = db.RAID_STORAGE - - if (not raid_database) then - db.RAID_STORAGE = {} - raid_database = db.RAID_STORAGE - end - - --> encounter_database: numeric table with combats - local encounter_database = raid_database [encounter_id] - - if (not encounter_database) then - raid_database [encounter_id] = {} - encounter_database = raid_database [encounter_id] - end - - --> get raid members data - local this_combat_data = { - damage = {}, - heal = {}, - date = date ("%H:%M %d/%m/%y"), - time = time(), - elapsed = combat:GetCombatTime(), - guild = guildName, - } - - for i = 1, raid_size do - local player_name, player_realm = UnitName ("raid" .. i) - if (player_realm and player_realm ~= "") then - player_name = player_name .. "-" .. player_realm - end - local damage_actor = combat (1, player_name) - if (damage_actor) then - this_combat_data.damage [player_name] = floor (damage_actor.total) + local heroic_branch = self_database ["HEROIC"] + if (not heroic_branch) then + heroic_branch = {} + self_database ["HEROIC"] = heroic_branch end - local heal_actor = combat (2, player_name) - if (heal_actor) then - this_combat_data.heal [player_name] = floor (heal_actor.total) + --> heroic database: numeric table with combats + local encounter_database = heroic_branch [encounter_id] + + if (not encounter_database) then + heroic_branch [encounter_id] = {} + encounter_database = heroic_branch [encounter_id] + end + + --> get player data + local t = { + total = 0, + spells = {}, + } + + if (role == "DAMAGER") then + local player = combat (1, _detalhes.player_name) + if (player) then + t.total = player.total + for spellid, spell in pairs (player.spells._ActorTable) do + t.spells [spellid] = spell.total + end + end + + elseif (role == "HEALER") then + local player = combat (2, _detalhes.player_name) + if (player) then + t.total = player.total + for spellid, spell in pairs (player.spells._ActorTable) do + t.spells [spellid] = spell.total + end + end end - end - - tinsert (encounter_database, this_combat_data) + if (t.total > 0) then + local this_combat_data = { + total = t.total, + spells = t.spells, + date = date ("%H:%M %d/%m/%y"), + time = time(), + elapsed = combat:GetCombatTime(), + } + tinsert (encounter_database, this_combat_data) + end + + --> check for normal mode + elseif (diff == 3 or diff == 4 or diff == 14) then + + local role = UnitGroupRolesAssigned ("player") + if (role ~= "DAMAGER" and role ~= "HEALER") then + return + end + + --> check if the storage is already loaded + if (not IsAddOnLoaded ("Details_DataStorage")) then + local loaded, reason = LoadAddOn ("Details_DataStorage") + if (not loaded) then + return + end + end + + --> get the storage table + local db = DetailsDataStorage + + if (not db and _detalhes.CreateStorageDB) then + db = _detalhes:CreateStorageDB() + if (not db) then + return + end + elseif (not db) then + return + end + + local self_database = db.SELF_STORAGE + + if (not self_database) then + --> outdate database? + return + end + + local normal_branch = self_database ["NORMAL"] + if (not normal_branch) then + normal_branch = {} + self_database ["NORMAL"] = normal_branch + end + + --> heroic database: numeric table with combats + local encounter_database = normal_branch [encounter_id] + + if (not encounter_database) then + normal_branch [encounter_id] = {} + encounter_database = normal_branch [encounter_id] + end + + --> get player data + local t = { + total = 0, + spells = {}, + role = role, + } + + if (role == "DAMAGER") then + local player = combat (1, _detalhes.player_name) + if (player) then + t.total = player.total + for spellid, spell in pairs (player.spells._ActorTable) do + t.spells [spellid] = spell.total + end + end + + elseif (role == "HEALER") then + local player = combat (2, _detalhes.player_name) + if (player) then + t.total = player.total + for spellid, spell in pairs (player.spells._ActorTable) do + t.spells [spellid] = spell.total + end + end + end + + if (t.total > 0) then + local this_combat_data = { + total = t.total, + spells = t.spells, + date = date ("%H:%M %d/%m/%y"), + time = time(), + elapsed = combat:GetCombatTime(), + } + tinsert (encounter_database, this_combat_data) + end + + --> check if is a mythic encounter and store the mythic encounter + elseif (difficulty == 16) then + + --> check the guild name + local match = 0 + local guildName = select (1, GetGuildInfo ("player")) + local raid_size = GetNumGroupMembers() or 0 + + if (guildName) then + for i = 1, raid_size do + local gName = select (1, GetGuildInfo ("raid" .. i)) or "" + if (gName == guildName) then + match = match + 1 + end + end + + if (match < raid_size * 0.75) then + return + end + else + return + end + + --> check if the storage is already loaded + if (not IsAddOnLoaded ("Details_DataStorage")) then + local loaded, reason = LoadAddOn ("Details_DataStorage") + if (not loaded) then + return + end + end + + --> get the storage table + local db = DetailsDataStorage + + if (not db and _detalhes.CreateStorageDB) then + db = _detalhes:CreateStorageDB() + if (not db) then + return + end + elseif (not db) then + return + end + + local raid_database = db.RAID_STORAGE + + if (not raid_database) then + db.RAID_STORAGE = {} + raid_database = db.RAID_STORAGE + end + + --> encounter_database: numeric table with combats + local encounter_database = raid_database [encounter_id] + + if (not encounter_database) then + raid_database [encounter_id] = {} + encounter_database = raid_database [encounter_id] + end + + --> get raid members data + local this_combat_data = { + damage = {}, + heal = {}, + date = date ("%H:%M %d/%m/%y"), + time = time(), + elapsed = combat:GetCombatTime(), + guild = guildName, + } + + for i = 1, raid_size do + local player_name, player_realm = UnitName ("raid" .. i) + if (player_realm and player_realm ~= "") then + player_name = player_name .. "-" .. player_realm + end + + local damage_actor = combat (1, player_name) + if (damage_actor) then + this_combat_data.damage [player_name] = floor (damage_actor.total) + end + + local heal_actor = combat (2, player_name) + if (heal_actor) then + this_combat_data.heal [player_name] = floor (heal_actor.total) + end + end + + tinsert (encounter_database, this_combat_data) + end end \ No newline at end of file diff --git a/core/meta.lua b/core/meta.lua index 1008db37..07b08535 100644 --- a/core/meta.lua +++ b/core/meta.lua @@ -321,6 +321,14 @@ end end + function _detalhes:DoContainerIndexCleanup() + for index, combat in _ipairs (_detalhes.tabela_historico.tabelas or {}) do + for index, container in _ipairs (combat) do + _detalhes.clear:c_container_combatentes_index (container) + end + end + end + --> limpa indexes, metatables e shadows function _detalhes:PrepareTablesForSave() @@ -507,6 +515,9 @@ --> clear owners _detalhes:DoOwnerCleanup() + + --> cleaer container indexes + _detalhes:DoContainerIndexCleanup() end function _detalhes:reset_window (instancia) diff --git a/core/parser.lua b/core/parser.lua index ea021eca..8fda7ceb 100644 --- a/core/parser.lua +++ b/core/parser.lua @@ -757,7 +757,8 @@ --> group checks if (este_jogador.grupo) then - _current_combat.totals_grupo[2] = _current_combat.totals_grupo[2] + cura_efetiva + --_current_combat.totals_grupo[2] = _current_combat.totals_grupo[2] + cura_efetiva + _current_gtotal [2] = _current_gtotal [2] + cura_efetiva end if (jogador_alvo.grupo) then @@ -1463,14 +1464,34 @@ } local resource_power_type = { - [4] = 3, --cat druids and rogues uses energy - [SPELL_POWER_SOUL_SHARDS] = 0, --warlock uses mana - [SPELL_POWER_ECLIPSE] = 0, --moonkin uses mana - [SPELL_POWER_HOLY_POWER] = 0, --paladins uses mana - [SPELL_POWER_SHADOW_ORBS] = 0, --shadow preist uses mana - [SPELL_POWER_DEMONIC_FURY] = 0, --warlock uses mana - [SPELL_POWER_BURNING_EMBERS] = 0, --warlock uses mana + [4] = SPELL_POWER_ENERGY, --combo points + [SPELL_POWER_SOUL_SHARDS] = SPELL_POWER_MANA, + [SPELL_POWER_ECLIPSE] = SPELL_POWER_MANA, + [SPELL_POWER_HOLY_POWER] = SPELL_POWER_MANA, + [SPELL_POWER_SHADOW_ORBS] = SPELL_POWER_MANA, + [SPELL_POWER_DEMONIC_FURY] = SPELL_POWER_MANA, + [SPELL_POWER_BURNING_EMBERS] = SPELL_POWER_MANA, } + + _detalhes.resource_strings = { + [4] = "Combo Point", + [SPELL_POWER_SOUL_SHARDS] = "Soul Shard", + [SPELL_POWER_ECLIPSE] = "Eclipse", + [SPELL_POWER_HOLY_POWER] = "Holy Power", + [SPELL_POWER_SHADOW_ORBS] = "Shadow Orb", + [SPELL_POWER_DEMONIC_FURY] = "Demonic Fury", + [SPELL_POWER_BURNING_EMBERS] = "Burning Embers", + } + + _detalhes.resource_icons = { + [4] = {file = [[Interface\CHARACTERFRAME\ComboPoint]], coords = {1/32, 18/32, 1/16, 14/16}}, + [SPELL_POWER_SOUL_SHARDS] = {file = [[Interface\PLAYERFRAME\UI-WARLOCKSHARD]], coords = {2/64, 2/64, 17/128, 16/128}}, + [SPELL_POWER_ECLIPSE] = {file = [[Interface\PLAYERFRAME\DruidEclipse]], coords = {117/256, 138/256, 72/128, 113/128}}, + [SPELL_POWER_HOLY_POWER] = {file = [[Interface\PLAYERFRAME\PALADINPOWERTEXTURES]], coords = {75/256, 94/256, 87/128, 100/128}}, + [SPELL_POWER_SHADOW_ORBS] = {file = [[Interface\PLAYERFRAME\Priest-ShadowUI]], coords = {119/256, 150/256, 61/128, 94/128}}, + [SPELL_POWER_DEMONIC_FURY] = {file = [[Interface\PLAYERFRAME\Warlock-DemonologyUI]], coords = {76/256, 109/256, 90/256, 104/256}}, + [SPELL_POWER_BURNING_EMBERS] = {file = [[Interface\PLAYERFRAME\Warlock-DestructionUI]], coords = {3/256, 33/256, 23/64, 52/64}} + } function parser:energize (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spelltype, amount, powertype, p6, p7) @@ -1487,7 +1508,7 @@ --> check if is energy or resource --> get resource type - local is_resource, resource_amount = resource_power_type [powertype], amount + local is_resource, resource_amount, resource_id = resource_power_type [powertype], amount, powertype --> check if is valid if (not energy_types [powertype] and not is_resource) then @@ -1575,6 +1596,7 @@ else --> is a resource este_jogador.resource = este_jogador.resource + resource_amount + este_jogador.resource_type = resource_id end end @@ -2337,6 +2359,8 @@ token_list ["RANGE_MISSED"] = nil token_list ["SWING_MISSED"] = nil token_list ["SPELL_MISSED"] = nil + token_list ["SPELL_PERIODIC_MISSED"] = nil + token_list ["DAMAGE_SHIELD_MISSED"] = nil token_list ["ENVIRONMENTAL_DAMAGE"] = nil elseif (capture_type == "heal") then @@ -2376,16 +2400,11 @@ end end - --SPELL_PERIODIC_MISSED --> need research - --DAMAGE_SHIELD_MISSED --> need research - --SPELL_EXTRA_ATTACKS --> need research --SPELL_DRAIN --> need research --SPELL_LEECH --> need research --SPELL_PERIODIC_DRAIN --> need research --SPELL_PERIODIC_LEECH --> need research --SPELL_DISPEL_FAILED --> need research - --SPELL_ABSORBED - function _detalhes:CaptureEnable (capture_type) @@ -2402,6 +2421,8 @@ token_list ["RANGE_MISSED"] = parser.rangemissed token_list ["SWING_MISSED"] = parser.swingmissed token_list ["SPELL_MISSED"] = parser.missed + token_list ["SPELL_PERIODIC_MISSED"] = parser.missed + token_list ["DAMAGE_SHIELD_MISSED"] = parser.missed token_list ["ENVIRONMENTAL_DAMAGE"] = parser.environment elseif (capture_type == "heal") then @@ -2701,7 +2722,10 @@ if (_detalhes.schedule_store_boss_encounter) then if (not _detalhes.logoff_saving_data) then - pcall (_detalhes.StoreEncounter) + local successful, errortext = pcall (_detalhes.StoreEncounter) + if (not successful) then + _detalhes:Msg ("error occurred on StoreEncounter():", errortext) + end end _detalhes.schedule_store_boss_encounter = nil end diff --git a/functions/boss.lua b/functions/boss.lua index 0bb3b286..83357cd4 100644 --- a/functions/boss.lua +++ b/functions/boss.lua @@ -174,6 +174,9 @@ do --> return the boss portrit function _detalhes:GetBossPortrait (mapid, bossindex) if (mapid and bossindex) then + --print (_detalhes.EncounterInformation [mapid]) + --print (_detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters) + --print (_detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters and _detalhes.EncounterInformation [mapid].encounters [bossindex]) return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters [bossindex].portrait else return false diff --git a/functions/slash.lua b/functions/slash.lua index de4707b9..5af769d7 100644 --- a/functions/slash.lua +++ b/functions/slash.lua @@ -29,6 +29,9 @@ function SlashCmdList.DETAILS (msg, editbox) elseif (command == Loc ["STRING_SLASH_WIPECONFIG"] or command == "reinstall") then _detalhes:WipeConfig() + elseif (command == Loc ["STRING_SLASH_RESET"] or command == Loc ["STRING_SLASH_RESET_ALIAS1"] or command == "reset") then + _detalhes.tabela_historico:resetar() + elseif (command == Loc ["STRING_SLASH_DISABLE"] or command == "disable") then _detalhes:CaptureSet (false, "damage", true) @@ -47,7 +50,7 @@ function SlashCmdList.DETAILS (msg, editbox) _detalhes:CaptureSet (true, "aura", true) print (Loc ["STRING_DETAILS1"] .. Loc ["STRING_SLASH_CAPTUREON"]) - elseif (command == Loc ["STRING_SLASH_OPTIONS"] or command == "options") then + elseif (command == Loc ["STRING_SLASH_OPTIONS"] or command == "options" or command == "config") then if (rest and tonumber (rest)) then local instanceN = tonumber (rest) @@ -844,6 +847,7 @@ function SlashCmdList.DETAILS (msg, editbox) print ("|cffffaeae/details " .. Loc ["STRING_SLASH_HIDE"] .. "|r: " .. Loc ["STRING_SLASH_HIDE_DESC"]) print ("|cffffaeae/details " .. Loc ["STRING_SLASH_ENABLE"] .. "|r: " .. Loc ["STRING_SLASH_ENABLE_DESC"]) print ("|cffffaeae/details " .. Loc ["STRING_SLASH_DISABLE"] .. "|r: " .. Loc ["STRING_SLASH_DISABLE_DESC"]) + print ("|cffffaeae/details " .. Loc ["STRING_SLASH_RESET"] .. "|r: " .. Loc ["STRING_SLASH_RESET_DESC"]) print ("|cffffaeae/details " .. Loc ["STRING_SLASH_OPTIONS"] .. "|r|cfffcffb0 |r: " .. Loc ["STRING_SLASH_OPTIONS_DESC"]) print ("|cffffaeae/details " .. Loc ["STRING_SLASH_CHANGES"] .. "|r: " .. Loc ["STRING_SLASH_CHANGES_DESC"]) print ("|cffffaeae/details " .. Loc ["STRING_SLASH_WIPECONFIG"] .. "|r: " .. Loc ["STRING_SLASH_WIPECONFIG_DESC"]) diff --git a/functions/spells.lua b/functions/spells.lua index 61835e9a..f130b34b 100644 --- a/functions/spells.lua +++ b/functions/spells.lua @@ -2180,35 +2180,36 @@ do [1] = {name = "Physical", formated = "|cFFFFFF00Physical|r", hex = "FFFFFF00", rgb = {255, 255, 0}, decimals = {1.00, 1.00, 0.00}}, [2] = {name = "Holy", formated = "|cFFFFE680Holy|r", hex = "FFFFE680", rgb = {255, 230, 128}, decimals = {1.00, 0.90, 0.50}}, [4] = {name = "Fire", formated = "|cFFFF8000Fire|r", hex = "FFFF8000", rgb = {255, 128, 0}, decimals = {1.00, 0.50, 0.00}}, - [8] = {name = "Nature", formated = "|cFF4DFF4DNature|r", hex = "FF4DFF4D", rgb = {77, 255, 77}, decimals = {0.30, 1.00, 0.30}}, + [8] = {name = "Nature", formated = "|cFFbeffbeNature|r", hex = "FFbeffbe", rgb = {190, 190, 190}, decimals = {0.7451, 1.0000, 0.7451}}, [16] = {name = "Frost", formated = "|cFF80FFFFFrost|r", hex = "FF80FFFF", rgb = {128, 255, 255}, decimals = {0.50, 1.00, 1.00}}, [32] = {name = "Shadow", formated = "|cFF8080FFShadow|r", hex = "FF8080FF", rgb = {128, 128, 255}, decimals = {0.50, 0.50, 1.00}}, [64] = {name = "Arcane", formated = "|cFFFF80FFArcane|r", hex = "FFFF80FF", rgb = {255, 128, 255}, decimals = {1.00, 0.50, 1.00}}, - [3] = {name = "Holystrike", formated = "|cFFFFE680Holy|r + |cFFFFFF00Physical|r"}, - [5] = {name = "Flamestrike", formated = "|cFFFF8000Fire|r + |cFFFFFF00Physical|r"}, - [6] = {name = "Holyfire", formated = "|cFFFF8000Fire|r + |cFFFFE680Holy|r"}, - [9] = {name = "Stormstrike", formated = "|cFF4DFF4DNature|r + |cFFFFFF00Physical|r"}, - [10] = {name = "Holystorm", formated = "|cFF4DFF4DNature|r + |cFFFFE680Holy|r"}, - [12] = {name = "Firestorm", formated = "|cFF4DFF4DNature|r + |cFFFF8000Fire|r"}, - [17] = {name = "Froststrike", formated = "|cFF80FFFFFrost|r + |cFFFFFF00Physical|r"}, - [18] = {name = "Holyfrost", formated = "|cFF80FFFFFrost|r + |cFFFFE680Holy|r"}, - [20] = {name = "Frostfire", formated = "|cFF80FFFFFrost|r + |cFFFF8000Fire|r"}, - [24] = {name = "Froststorm", formated = "|cFF80FFFFFrost|r + |cFF4DFF4DNature|r"}, - [33] = {name = "Shadowstrike", formated = "|cFF8080FFShadow|r + |cFFFFFF00Physical|r"}, - [34] = {name = "Shadowlight (Twilight)", formated = "|cFF8080FFShadow|r + |cFFFFE680Holy|r"}, - [36] = {name = "Shadowflame", formated = "|cFF8080FFShadow|r + |cFFFF8000Fire|r"}, - [40] = {name = "Shadowstorm (Plague)", formated = "|cFF8080FFShadow|r + |cFF4DFF4DNature|r"}, - [48] = {name = "Shadowfrost", formated = "|cFF8080FFShadow|r + |cFF80FFFFFrost|r"}, - [65] = {name = "Spellstrike", formated = "|cFFFF80FFArcane|r + |cFFFFFF00Physical|r"}, - [66] = {name = "Divine", formated = "|cFFFF80FFArcane|r + |cFFFFE680Holy|r"}, - [68] = {name = "Spellfire", formated = "|cFFFF80FFArcane|r + |cFFFF8000Fire|r"}, - [72] = {name = "Spellstorm", formated = "|cFFFF80FFArcane|r + |cFF4DFF4DNature|r"}, - [80] = {name = "Spellfrost", formated = "|cFFFF80FFArcane|r + |cFF80FFFFFrost|r"}, - [96] = {name = "Spellshadow", formated = "|cFFFF80FFArcane|r + |cFF8080FFShadow|r"}, - [28] = {name = "Elemental", formated = "|cFF80FFFFFrost|r + |cFF4DFF4DNature|r + |cFFFF8000Fire|r"}, - [124] = {name = "Chromatic", formated = "|cFFFF80FFArcane|r + |cFF8080FFShadow|r + |cFF80FFFFFrost|r + |cFF4DFF4DNature|r + |cFFFF8000Fire|r"}, - [126] = {name = "Magic", formated = "|cFFFF80FFArcane|r + |cFF8080FFShadow|r + |cFF80FFFFFrost|r + |cFF4DFF4DNature|r + |cFFFF8000Fire|r + |cFFFFE680Holy|r"}, - [127] = {name = "Chaos", formated = "|cFFFF80FFArcane|r + |cFF8080FFShadow|r + |cFF80FFFFFrost|r + |cFF4DFF4DNature|r + |cFFFF8000Fire|r + |cFFFFE680Holy|r + |cFFFFFF00Physical|r"}, + [3] = {name = "Holystrike", formated = "|cFFFFF240Holystrike|r", hex = "FFFFF240", rgb = {255, 64, 64}, decimals = {1.0000, 0.9490, 0.2510}}, --#FFF240 + [5] = {name = "Flamestrike", formated = "|cFFFFB900Flamestrike|r", hex = "FFFFB900", rgb = {255, 0, 0}, decimals = {1.0000, 0.7255, 0.0000}}, --#FFB900 + [6] = {name = "Holyfire", formated = "|cFFFFD266Holyfire|r", hex = "FFFFD266", rgb = {255, 102, 102}, decimals = {1.0000, 0.8235, 0.4000}}, --#FFD266 + [9] = {name = "Stormstrike", formated = "|cFFAFFF23Stormstrike|r", hex = "FFAFFF23", rgb = {175, 35, 35}, decimals = {0.6863, 1.0000, 0.1373}}, --#AFFF23 + [10] = {name = "Holystorm", formated = "|cFFC1EF6EHolystorm|r", hex = "FFC1EF6E", rgb = {193, 110, 110}, decimals = {0.7569, 0.9373, 0.4314}}, --#C1EF6E + [12] = {name = "Firestorm", formated = "|cFFAFB923Firestorm|r", hex = "FFAFB923", rgb = {175, 35, 35}, decimals = {0.6863, 0.7255, 0.1373}}, --#AFB923 + [17] = {name = "Froststrike", formated = "|cFFB3FF99Froststrike|r", hex = "FFB3FF99", rgb = {179, 153, 153}, decimals = {0.7020, 1.0000, 0.6000}},--#B3FF99 + [18] = {name = "Holyfrost", formated = "|cFFCCF0B3Holyfrost|r", hex = "FFCCF0B3", rgb = {204, 179, 179}, decimals = {0.8000, 0.9412, 0.7020}},--#CCF0B3 + [20] = {name = "Frostfire", formated = "|cFFC0C080Frostfire|r", hex = "FFC0C080", rgb = {192, 128, 128}, decimals = {0.7529, 0.7529, 0.5020}}, --#C0C080 + [24] = {name = "Froststorm", formated = "|cFF69FFAFFroststorm|r", hex = "FF69FFAF", rgb = {105, 175, 175}, decimals = {0.4118, 1.0000, 0.6863}}, --#69FFAF + [33] = {name = "Shadowstrike", formated = "|cFFC6C673Shadowstrike|r", hex = "FFC6C673", rgb = {198, 115, 115}, decimals = {0.7765, 0.7765, 0.4510}},--#C6C673 + [34] = {name = "Shadowlight (Twilight)", formated = "|cFFD3C2ACShadowlight (Twilight)|r", hex = "FFD3C2AC", rgb = {211, 172, 172}, decimals = {0.8275, 0.7608, 0.6745}},--#D3C2AC + [36] = {name = "Shadowflame", formated = "|cFFB38099Shadowflame|r", hex = "FFB38099", rgb = {179, 153, 153}, decimals = {0.7020, 0.5020, 0.6000}}, -- #B38099 + [40] = {name = "Shadowstorm (Plague)", formated = "|cFF6CB3B8Shadowstorm (Plague)|r", hex = "FF6CB3B8", rgb = {108, 184, 184}, decimals = {0.4235, 0.7020, 0.7216}}, --#6CB3B8 + [48] = {name = "Shadowfrost", formated = "|cFF80C6FFShadowfrost|r", hex = "FF80C6FF", rgb = {128, 255, 255}, decimals = {0.5020, 0.7765, 1.0000}},--#80C6FF + [65] = {name = "Spellstrike", formated = "|cFFFFCC66Spellstrike|r", hex = "FFFFCC66", rgb = {255, 102, 102}, decimals = {1.0000, 0.8000, 0.4000}},--#FFCC66 + [66] = {name = "Divine", formated = "|cFFFFBDB3Divine|r", hex = "FFFFBDB3", rgb = {255, 179, 179}, decimals = {1.0000, 0.7412, 0.7020}},--#FFBDB3 + [68] = {name = "Spellfire", formated = "|cFFFF808CSpellfire|r", hex = "FFFF808C", rgb = {255, 140, 140}, decimals = {1.0000, 0.5020, 0.5490}}, --#FF808C + [72] = {name = "Spellstorm", formated = "|cFFAFB9AFSpellstorm|r", hex = "FFAFB9AF", rgb = {175, 175, 175}, decimals = {0.6863, 0.7255, 0.6863}}, --#AFB9AF + [80] = {name = "Spellfrost", formated = "|cFFC0C0FFSpellfrost|r", hex = "FFC0C0FF", rgb = {192, 255, 255}, decimals = {0.7529, 0.7529, 1.0000}},--#C0C0FF + [96] = {name = "Spellshadow", formated = "|cFFB980FFSpellshadow|r", hex = "FFB980FF", rgb = {185, 255, 255}, decimals = {0.7255, 0.5020, 1.0000}},--#B980FF + + [28] = {name = "Elemental", formated = "|cFF0070DEElemental|r", hex = "FF0070DE", rgb = {0, 222, 222}, decimals = {0.0000, 0.4392, 0.8706}}, + [124] = {name = "Chromatic", formated = "|cFFC0C0C0Chromatic|r", hex = "FFC0C0C0", rgb = {192, 192, 192}, decimals = {0.7529, 0.7529, 0.7529}}, + [126] = {name = "Magic", formated = "|cFF1111FFMagic|r", hex = "FF1111FF", rgb = {17, 255, 255}, decimals = {0.0667, 0.0667, 1.0000}}, + [127] = {name = "Chaos", formated = "|cFFFF1111Chaos|r", hex = "FFFF1111", rgb = {255, 17, 17}, decimals = {1.0000, 0.0667, 0.0667}}, } function _detalhes:GetSpellSchoolName (school) diff --git a/gumps/janela_info.lua b/gumps/janela_info.lua index 868c8740..e390addf 100644 --- a/gumps/janela_info.lua +++ b/gumps/janela_info.lua @@ -589,7 +589,7 @@ local function cria_textos (este_gump) este_gump.atributo_nome = este_gump:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall") este_gump.targets = este_gump:CreateFontString (nil, "OVERLAY", "QuestFont_Large") - este_gump.targets:SetPoint ("TOPLEFT", este_gump, "TOPLEFT", 24, -235) + este_gump.targets:SetPoint ("TOPLEFT", este_gump, "TOPLEFT", 24, -233) este_gump.targets:SetText (Loc ["STRING_TARGETS"] .. ":") este_gump.avatar = este_gump:CreateTexture (nil, "overlay") @@ -3212,6 +3212,11 @@ function _detalhes.janela_info:monta_relatorio (botao) return instancia:envia_relatorio (report_lines) end +local row_backdrop = {bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", + insets = {left = 0, right = 0, top = 0, bottom = 0}} +local row_backdrop_onleave = {bgFile = "", edgeFile = "", tile = true, tileSize = 16, edgeSize = 32, + insets = {left = 1, right = 1, top = 0, bottom = 1}} + local row_on_enter = function (self) if (info.fading_in or info.faded) then return @@ -3219,33 +3224,31 @@ local row_on_enter = function (self) self.mouse_over = true + for index, block in pairs (_detalhes.janela_info.grupos_detalhes) do + detalhe_infobg_onleave (block.bg) + end + --> aumenta o tamanho da barra self:SetHeight (17) --> altura determinada pela instância --> poe a barra com alfa 1 ao invés de 0.9 self:SetAlpha(1) --> troca a cor da barra enquanto o mouse estiver em cima dela - self:SetBackdrop({ - --bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", - edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border", tile = true, tileSize = 16, edgeSize = 10, - insets = {left = 1, right = 1, top = 0, bottom = 1},}) - self:SetBackdropBorderColor (0.666, 0.666, 0.666) - self:SetBackdropColor (0.0941, 0.0941, 0.0941) + self:SetBackdrop (row_backdrop) + self:SetBackdropColor (0.8, 0.8, 0.8, 0.3) if (self.isAlvo) then --> monta o tooltip do alvo --> talvez devesse escurecer a janela no fundo... pois o tooltip é transparente e pode confundir GameTooltip:SetOwner (self, "ANCHOR_TOPRIGHT") - -- ~erro if (self.spellid == "enemies") then --> damage taken enemies if (not self.minha_tabela or not self.minha_tabela:MontaTooltipDamageTaken (self, self._index, info.instancia)) then -- > poderia ser aprimerado para uma tailcall return end - elseif (not self.minha_tabela or not self.minha_tabela:MontaTooltipAlvos (self, self._index, info.instancia)) then -- > poderia ser aprimerado para uma tailcall return - end + GameTooltip:Show() elseif (self.isMain) then @@ -3289,9 +3292,7 @@ local row_on_leave = function (self) self:SetAlpha(0.9) --> volto o background ao normal - self:SetBackdrop({ - bgFile = "", edgeFile = "", tile = true, tileSize = 16, edgeSize = 32, - insets = {left = 1, right = 1, top = 0, bottom = 1},}) + self:SetBackdrop (row_backdrop_onleave) self:SetBackdropBorderColor (0, 0, 0, 0) self:SetBackdropColor (0, 0, 0, 0) @@ -3302,7 +3303,7 @@ local row_on_leave = function (self) self.icone:SetWidth (14) self.icone:SetHeight (14) --> volta com a alfa antiga da barra - self.icone:SetAlpha (0.8) + self.icone:SetAlpha (1) --> remover o conteúdo que estava sendo mostrado na direita if (info.mostrando_mouse_over) then @@ -3402,19 +3403,29 @@ local function SetBarraScripts (esta_barra, instancia, i) end local function CriaTexturaBarra (instancia, barra) + barra.textura = _CreateFrame ("StatusBar", nil, barra) + + barra.textura:SetFrameLevel (barra:GetFrameLevel()-1) + barra.textura:SetAllPoints (barra) - --barra.textura:SetStatusBarTexture (instancia.row_info.texture_file) - barra.textura:SetStatusBarTexture (_detalhes.default_texture) + barra.textura:SetAlpha (0.5) + --barra.textura:SetStatusBarTexture ([[Interface\AddOns\Details\images\bar_serenity]]) + barra.textura:SetStatusBarTexture ([[Interface\AddOns\Details\images\bar_skyline]]) + --barra.textura:SetStatusBarTexture (_detalhes.default_texture) barra.textura:SetStatusBarColor (.5, .5, .5, 0) barra.textura:SetMinMaxValues (0,100) + barra.textura.bg = barra.textura:CreateTexture (nil, "background") + barra.textura.bg:SetAllPoints() + barra.textura.bg:SetTexture (1, 1, 1, 0.08) + if (barra.targets) then barra.targets:SetParent (barra.textura) barra.targets:SetFrameLevel (barra.textura:GetFrameLevel()+2) end - barra.texto_esquerdo = barra.textura:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall") + barra.texto_esquerdo = barra:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall") barra.texto_esquerdo:SetPoint ("LEFT", barra.textura, "LEFT", 22, 0) barra.texto_esquerdo:SetJustifyH ("LEFT") barra.texto_esquerdo:SetTextColor (1,1,1,1) @@ -3422,7 +3433,7 @@ local function CriaTexturaBarra (instancia, barra) barra.texto_esquerdo:SetNonSpaceWrap (true) barra.texto_esquerdo:SetWordWrap (false) - barra.texto_direita = barra.textura:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall") + barra.texto_direita = barra:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall") if (barra.targets) then barra.texto_direita:SetPoint ("RIGHT", barra.targets, "LEFT", -2, 0) else @@ -3590,18 +3601,18 @@ function gump:CriaNovaBarraInfo1 (instancia, index) --> icone esta_barra.miniframe = CreateFrame ("frame", nil, esta_barra) esta_barra.miniframe:SetSize (14, 14) - esta_barra.miniframe:SetPoint ("RIGHT", esta_barra.textura, "LEFT", 20, 0) + esta_barra.miniframe:SetPoint ("RIGHT", esta_barra.textura, "LEFT", 18, 0) esta_barra.miniframe:SetScript ("OnEnter", miniframe_func_on_enter) esta_barra.miniframe:SetScript ("OnLeave", miniframe_func_on_leave) - esta_barra.icone = esta_barra.textura:CreateTexture (nil, "OVERLAY") + esta_barra.icone = esta_barra:CreateTexture (nil, "OVERLAY") esta_barra.icone:SetWidth (14) esta_barra.icone:SetHeight (14) - esta_barra.icone:SetPoint ("RIGHT", esta_barra.textura, "LEFT", 20, 0) + esta_barra.icone:SetPoint ("RIGHT", esta_barra.textura, "LEFT", 18, 0) esta_barra:SetAlpha(0.9) - esta_barra.icone:SetAlpha (0.8) + esta_barra.icone:SetAlpha (1) esta_barra.isMain = true @@ -3642,13 +3653,13 @@ function gump:CriaNovaBarraInfo2 (instancia, index) CriaTexturaBarra (instancia, esta_barra) --> icone - esta_barra.icone = esta_barra.textura:CreateTexture (nil, "OVERLAY") + esta_barra.icone = esta_barra:CreateTexture (nil, "OVERLAY") esta_barra.icone:SetWidth (14) esta_barra.icone:SetHeight (14) - esta_barra.icone:SetPoint ("RIGHT", esta_barra.textura, "LEFT", 0+20, 0) + esta_barra.icone:SetPoint ("RIGHT", esta_barra.textura, "LEFT", 18, 0) - esta_barra:SetAlpha(0.9) - esta_barra.icone:SetAlpha (0.8) + esta_barra:SetAlpha (0.9) + esta_barra.icone:SetAlpha (1) esta_barra.isAlvo = true @@ -3687,13 +3698,13 @@ function gump:CriaNovaBarraInfo3 (instancia, index) CriaTexturaBarra (instancia, esta_barra) --> icone - esta_barra.icone = esta_barra.textura:CreateTexture (nil, "OVERLAY") + esta_barra.icone = esta_barra:CreateTexture (nil, "OVERLAY") esta_barra.icone:SetWidth (14) esta_barra.icone:SetHeight (14) - esta_barra.icone:SetPoint ("RIGHT", esta_barra.textura, "LEFT", 0+20, 0) + esta_barra.icone:SetPoint ("RIGHT", esta_barra.textura, "LEFT", 18, 0) - esta_barra:SetAlpha(0.9) - esta_barra.icone:SetAlpha (0.8) + esta_barra:SetAlpha (0.9) + esta_barra.icone:SetAlpha (1) esta_barra.isDetalhe = true diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua index 0e948254..d8984e70 100644 --- a/gumps/janela_principal.lua +++ b/gumps/janela_principal.lua @@ -2474,7 +2474,7 @@ function CreateAlertFrame (baseframe, instancia) frame_upper:SetPoint ("left", baseframe, "left", 3, 0) frame_upper:SetPoint ("right", baseframe, "right", -3, 0) frame_upper:SetHeight (13) - frame_upper:SetFrameStrata ("fullscreen") + frame_upper:SetFrameStrata ("TOOLTIP") local frame_lower = CreateFrame ("frame", "DetailsAlertFrameScrollChild" .. instancia.meu_id, frame_upper) frame_lower:SetHeight (25) @@ -2490,7 +2490,7 @@ function CreateAlertFrame (baseframe, instancia) alert_bg:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}}) alert_bg:SetBackdropColor (.1, .1, .1, 1) - alert_bg:SetFrameStrata ("HIGH") + alert_bg:SetFrameStrata ("FULLSCREEN") alert_bg:SetFrameLevel (baseframe:GetFrameLevel() + 6) alert_bg:Hide() @@ -2512,6 +2512,7 @@ function CreateAlertFrame (baseframe, instancia) rotate_frame:SetWidth (12) rotate_frame:SetPoint ("right", alert_bg, "right", -2, 0) rotate_frame:SetHeight (alert_bg:GetWidth()) + rotate_frame:SetFrameStrata ("FULLSCREEN") local icon = rotate_frame:CreateTexture (nil, "overlay") icon:SetPoint ("center", rotate_frame, "center") @@ -2521,6 +2522,7 @@ function CreateAlertFrame (baseframe, instancia) local button = gump:NewButton (alert_bg, nil, "DetailsInstance"..instancia.meu_id.."AlertButton", nil, 1, 1) button:SetAllPoints() button:SetHook ("OnMouseUp", function() alert_bg:Hide() end) + button:SetFrameStrata ("FULLSCREEN") local RotateAnimGroup = rotate_frame:CreateAnimationGroup() local rotate = RotateAnimGroup:CreateAnimation ("Rotation") @@ -4709,6 +4711,14 @@ local build_mode_list = function (self, elapsed) end end + if (ClosedInstances > 0 or _detalhes:GetNumInstancesAmount() < _detalhes:GetMaxInstancesAmount()) then + GameCooltip:AddLine ("$div", nil, 2, nil, -5, -11) + end + + GameCooltip:AddLine (Loc ["STRING_MENU_CLOSE_INSTANCE"], nil, 2, "white", nil, _detalhes.font_sizes.menus, font) + GameCooltip:AddIcon ([[Interface\Buttons\UI-Panel-MinimizeButton-Up]], 2, 1, 14, 14, 0.2, 0.8, 0.2, 0.8) + GameCooltip:AddMenu (2, _detalhes.close_instancia_func, instancia.baseframe.cabecalho.fechar) + CoolTip:SetWallpaper (2, [[Interface\SPELLBOOK\Spellbook-Page-1]], menu_wallpaper_tex, menu_wallpaper_color, true) --> options @@ -6880,7 +6890,7 @@ function gump:CriaCabecalho (baseframe, instancia) _G.GameCooltip:CoolTipInject (baseframe.cabecalho.atributo) --> REPORTAR ~report ---------------------------------------------------------------------------------------------------------------------------------------------------- - baseframe.cabecalho.report = gump:NewButton (baseframe, nil, "DetailsReportButton"..instancia.meu_id, nil, 8, 16, _detalhes.Reportar, instancia, nil, [[Interface\Addons\Details\Images\report_button]]) + baseframe.cabecalho.report = gump:NewButton (baseframe, nil, "DetailsReportButton"..instancia.meu_id, nil, 8, 16, _detalhes.Reportar, instancia, "INSTANCE" .. instancia.meu_id, [[Interface\Addons\Details\Images\report_button]]) local b = baseframe.cabecalho.report.widget b:SetNormalTexture ([[Interface\AddOns\Details\images\toolbar_icons]]) @@ -6915,7 +6925,7 @@ function gump:CriaCabecalho (baseframe, instancia) GameCooltip:AddLine ("Report Results", nil, 1, "white", nil, _detalhes.font_sizes.menus, SharedMedia:Fetch ("font", "Friz Quadrata TT")) GameCooltip:AddIcon ([[Interface\Addons\Details\Images\report_button]], 1, 1, 12, 19) - GameCooltip:AddMenu (1, _detalhes.Reportar, instancia) + GameCooltip:AddMenu (1, _detalhes.Reportar, instancia, nil, "INSTANCE" .. instancia.meu_id) GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], menu_wallpaper_tex, menu_wallpaper_color, true) GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color) diff --git a/gumps/janela_report.lua b/gumps/janela_report.lua index 7bedf620..4da78bb1 100644 --- a/gumps/janela_report.lua +++ b/gumps/janela_report.lua @@ -137,7 +137,7 @@ local _UISpecialFrames = UISpecialFrames --> wow api locals --> internal details report functions ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - function _detalhes:Reportar (param2, options, arg3) + function _detalhes:Reportar (param2, options, arg3, id) if (not _detalhes.janela_report) then _detalhes.janela_report = gump:CriaJanelaReport() @@ -147,6 +147,18 @@ local _UISpecialFrames = UISpecialFrames --> wow api locals self = options end + if (type (param2) == "string") then + id = param2 + end + + if (_detalhes.last_report_id and id and _detalhes.last_report_id == id) then + _detalhes.last_report_id = nil + _detalhes.janela_report.fechar:Click() + return + end + + _detalhes.last_report_id = id + --> trabalha com as opções: if (options and options._no_current) then _G ["Details_Report_CB_1"]:Disable() diff --git a/gumps/switch.lua b/gumps/switch.lua index f0a745ad..60002735 100644 --- a/gumps/switch.lua +++ b/gumps/switch.lua @@ -15,17 +15,16 @@ do local gump_fundo_backdrop = { bgFile = "Interface\\AddOns\\Details\\images\\background", - --edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border", - tile = true, tileSize = 16, --edgeSize = 4, + tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}} local frame = _CreateFrame ("frame", "DetailsSwitchPanel", _UIParent) frame:SetPoint ("center", _UIParent, "center", 500, -300) frame:SetWidth (250) frame:SetHeight (100) - --frame:SetBackdrop (gump_fundo_backdrop) + frame:SetBackdrop (gump_fundo_backdrop) frame:SetBackdropBorderColor (170/255, 170/255, 170/255) - frame:SetBackdropColor (24/255, 24/255, 24/255, .8) + frame:SetBackdropColor (0, 0, 0, .7) frame:SetFrameStrata ("FULLSCREEN") frame:SetFrameLevel (16) diff --git a/images/bar_detalhes2.tga b/images/bar_detalhes2.tga index 6c1c696e..be510427 100644 Binary files a/images/bar_detalhes2.tga and b/images/bar_detalhes2.tga differ diff --git a/images/info_window_background.tga b/images/info_window_background.tga index 4925b021..e459d492 100644 Binary files a/images/info_window_background.tga and b/images/info_window_background.tga differ diff --git a/plugins/Details_DataStorage/Details_DataStorage.lua b/plugins/Details_DataStorage/Details_DataStorage.lua index 9bde97df..950bbf3c 100644 --- a/plugins/Details_DataStorage/Details_DataStorage.lua +++ b/plugins/Details_DataStorage/Details_DataStorage.lua @@ -1,14 +1,27 @@ -DETAILS_STORAGE_VERSION = 1 +DETAILS_STORAGE_VERSION = 2 function _detalhes:CreateStorageDB() - DetailsDataStorage = {VERSION = DETAILS_STORAGE_VERSION, RAID_STORAGE = {}} + DetailsDataStorage = {VERSION = DETAILS_STORAGE_VERSION, RAID_STORAGE = {}, SELF_STORAGE = {}} return DetailsDataStorage end -DetailsDataStorage = DetailsDataStorage or _detalhes:CreateStorageDB() +local f = CreateFrame ("frame", nil, UIParent) +f:Hide() +f:RegisterEvent ("ADDON_LOADED") -if (DetailsDataStorage.VERSION < DETAILS_STORAGE_VERSION) then - --> do revisions -end +f:SetScript ("OnEvent", function (self, event, addonName) + if (addonName == "Details_DataStorage") then + DetailsDataStorage = DetailsDataStorage or _detalhes:CreateStorageDB() + if (DetailsDataStorage.VERSION < DETAILS_STORAGE_VERSION) then + --> do revisions + if (DetailsDataStorage.VERSION == 1) then + DetailsDataStorage.SELF_STORAGE = {} + DetailsDataStorage.VERSION = 2 + end + end + print ("|cFFFFFF00Details! Storage|r: loaded!") + DETAILS_STORAGE_LOADED = true + end +end) diff --git a/plugins/Details_RaidInfo-BlackrockFoundry/boss_faces.tga b/plugins/Details_RaidInfo-BlackrockFoundry/boss_faces.tga index be925024..4ef7e396 100644 Binary files a/plugins/Details_RaidInfo-BlackrockFoundry/boss_faces.tga and b/plugins/Details_RaidInfo-BlackrockFoundry/boss_faces.tga differ diff --git a/plugins/Details_RaidInfo-Highmaul/boss_faces.tga b/plugins/Details_RaidInfo-Highmaul/boss_faces.tga index 9a417aad..6159dc74 100644 Binary files a/plugins/Details_RaidInfo-Highmaul/boss_faces.tga and b/plugins/Details_RaidInfo-Highmaul/boss_faces.tga differ diff --git a/startup.lua b/startup.lua index 7ca268f8..aa35d313 100644 --- a/startup.lua +++ b/startup.lua @@ -160,6 +160,9 @@ function _G._detalhes:Start() self.RefreshAfterStartup = nil function _detalhes:CheckWallpaperAfterStartup() + + --print ("1 Checking WallPaper...") + if (not _detalhes.profile_loaded) then return _detalhes:ScheduleTimer ("CheckWallpaperAfterStartup", 2) end @@ -170,6 +173,11 @@ function _G._detalhes:Start() if (not instance.wallpaper.enabled) then instance:InstanceWallpaper (false) end + + --print ("==== 2 Moving Window ", instance.meu_id, instance.ativa) + --vardump (instance.snap) + --print ("===============") + self.move_janela_func (instance.baseframe, true, instance) self.move_janela_func (instance.baseframe, false, instance) end