diff --git a/Libs/LibHotCorners/LibHotCorners.lua b/Libs/LibHotCorners/LibHotCorners.lua
deleted file mode 100644
index 0d376476..00000000
--- a/Libs/LibHotCorners/LibHotCorners.lua
+++ /dev/null
@@ -1,412 +0,0 @@
-local major, minor = "LibHotCorners", 6
-local LibHotCorners, oldminor = LibStub:NewLibrary (major, minor)
-
-if (not LibHotCorners) then
- return
-end
-
-local LBD = LibStub ("LibDataBroker-1.1")
-
-local debug = false
-local tinsert = tinsert
-
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---> main function
-
- LibHotCorners.embeds = LibHotCorners.embeds or {}
- local embed_functions = {
- "RegisterHotCornerButton",
- "HideHotCornerButton",
- "QuickHotCornerEnable"
- }
-
- function LibHotCorners:Embed (target)
- for k, v in pairs (embed_functions) do
- target[v] = self[v]
- end
- self.embeds [target] = true
- return target
- end
-
- local CallbackHandler = LibStub:GetLibrary ("CallbackHandler-1.0")
- LibHotCorners.callbacks = LibHotCorners.callbacks or CallbackHandler:New (LibHotCorners)
-
- LibHotCorners.topleft = LibHotCorners.topleft or {widgets = {}, quickclick = false, is_enabled = false, map = {}}
- LibHotCorners.bottomleft = {}
- LibHotCorners.topright = {}
- LibHotCorners.bottomright = {}
-
- local function test (corner)
- assert (corner == "topleft" or corner == "bottomleft" or corner == "topright" or corner == "bottomright", "LibHotCorners:RegisterAddon expects a corner on #1 argument.")
- end
-
- function LibHotCorners:RegisterHotCornerButton (name, corner, savedtable, fname, icon, tooltip, clickfunc, menus, quickfunc, onenter, onleave)
-
- corner = string.lower (corner)
- test (corner)
-
- if (savedtable and not LibHotCorners.options) then
- if (not savedtable.__cachedoptions) then
- savedtable.__cachedoptions = {age = 0, clicks = {}, disabled = {}, is_enabled = true}
- end
- LibHotCorners.options = savedtable.__cachedoptions
- LibHotCorners.options.age = LibHotCorners.options.age + 1
-
- --> version 6
- if (type (LibHotCorners.options.is_enabled) ~= "boolean") then
- LibHotCorners.options.is_enabled = true
- end
- elseif (savedtable) then
- if (LibHotCorners.options.age < savedtable.__cachedoptions.age) then
- LibHotCorners.options = savedtable.__cachedoptions
- LibHotCorners.options.age = LibHotCorners.options.age + 1
- end
-
- --> version 6
- if (type (LibHotCorners.options.is_enabled) ~= "boolean") then
- LibHotCorners.options.is_enabled = true
- end
- end
-
- savedtable = savedtable or {}
-
- tinsert (LibHotCorners [corner], {name = name, fname = fname, savedtable = savedtable, icon = icon, tooltip = tooltip, click = clickfunc, menus = menus, quickfunc = quickfunc, onenter = onenter, onleave = onleave})
- LibHotCorners [corner].map [name] = #LibHotCorners [corner]
-
- if (not savedtable.hide) then
- LibHotCorners [corner].is_enabled = true
- end
-
- if (quickfunc and savedtable [corner .. "_quickclick"]) then
- LibHotCorners [corner].quickfunc = quickfunc
- end
-
- return LibHotCorners [corner].map [name]
- end
-
- function LibHotCorners:QuickHotCornerEnable (name, corner, value)
-
- corner = string.lower (corner)
- test (corner)
-
- local corner_table = LibHotCorners [corner]
- local addon_table = corner_table [corner_table.map [name]]
-
- addon_table.savedtable [corner .. "_quickclick"] = value
-
- if (value and addon_table.quickfunc) then
- corner_table.quickfunc = addon_table.quickfunc
- else
- local got = false
- for index, button_table in ipairs (corner_table) do
- if (button_table.savedtable.quickclick) then
- corner_table.quickfunc = button_table.quickfunc
- got = true
- break
- end
- end
-
- if (not got) then
- corner_table.quickfunc = nil
- end
- end
- end
-
- function LibHotCorners:HideHotCornerButton (name, corner, value)
-
- corner = string.lower (corner)
- test (corner)
-
- local corner_table = LibHotCorners [corner]
- local addon_table = corner_table [corner_table.map [name]]
-
- addon_table.savedtable.hide = value
-
- --print (LibHotCorners, corner)
- LibHotCorners [corner].is_enabled = false
-
- for index, button_table in ipairs (corner_table) do
- if (not button_table.savedtable.hide) then
- LibHotCorners [corner].is_enabled = true
- break
- end
- end
-
- return true
- end
-
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---> data broker stuff
- function LibHotCorners:DataBrokerCallback (event, name, dataobj)
- if (not name or not dataobj or not dataobj.type) then
- return
- end
- if (dataobj.icon and dataobj.OnClick and not dataobj.HotCornerIgnore) then
- LibHotCorners:RegisterHotCornerButton (name, "TopLeft", nil, name .. "HotCornerLauncher", dataobj.icon, dataobj.OnTooltipShow, dataobj.OnClick, nil, nil, dataobj.OnEnter, dataobj.OnLeave)
- end
- end
- LBD.RegisterCallback (LibHotCorners, "DataBrokerCallback")
-
- local f = CreateFrame ("frame")
- f:RegisterEvent ("PLAYER_LOGIN")
- f:SetScript ("OnEvent", function()
-
- SLASH_HOTCORNER1, SLASH_HOTCORNER2 = "/hotcorners", "/hotcorner"
- function SlashCmdList.HOTCORNER (msg, editbox)
- HotCornersOpenOptions (self);
- end
-
- for name, dataobj in LBD:DataObjectIterator() do
- if (dataobj.type and dataobj.icon and dataobj.OnClick and not dataobj.HotCornerIgnore) then
- LibHotCorners:RegisterHotCornerButton (name, "TopLeft", nil, name .. "HotCornerLauncher", dataobj.icon, dataobj.OnTooltipShow, dataobj.OnClick, nil, nil, dataobj.OnEnter, dataobj.OnLeave)
- end
- end
- for k, v in pairs (LBD.attributestorage) do
- --print (k, v)
- --print ("----------------")
- --vardump (v)
-
- end
- f:UnregisterEvent ("PLAYER_LOGIN")
- end)
-
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---> scripts
-
- --> background (window mode fix)
- function HotCornersBackgroundOnEnter (self)
- if (LibHotCornersTopLeft and LibHotCornersTopLeft:IsShown()) then
- if (LibHotCornersTopLeft:GetWidth() > 2) then
- HotCornersOnLeave (LibHotCornersTopLeft)
- end
- end
- self:EnableMouse (false)
- end
-
- --> set size
- local function set_size (self)
- if (self.position == "topleft" or self.position == "topright") then
- self:SetSize (40, GetScreenHeight())
- else
- self:SetSize (GetScreenWidth(), 40)
- end
- end
-
- --> show tooltip
- local show_tooltip = function (self)
- if (self.table.tooltip) then
- if (type (self.table.tooltip) == "function") then
- GameTooltip:SetOwner (self, "ANCHOR_RIGHT")
- self.table.tooltip (GameTooltip)
- GameTooltip:Show()
- elseif (type (self.table.tooltip) == "string") then
- GameTooltip:SetOwner (self, "ANCHOR_RIGHT")
- GameTooltip:AddLine (self.table.tooltip)
- GameTooltip:Show()
- end
- elseif (self.table.onenter) then
- self.table.onenter (self)
- end
- end
-
- --> corner frame on enter
- local more_clicked = function (t1, t2)
- return t1[1] > t2[1]
- end
-
- function HotCornersOnEnter (self)
-
- if (not LibHotCorners.options.is_enabled) then
- return
- end
-
- if (not LibHotCorners [self.position].is_enabled) then
- return
- end
-
- set_size (self)
-
- HotCornersBackgroundFrame:EnableMouse (true)
-
- local i = 1
-
- local sort = {}
- for index, button_table in ipairs (LibHotCorners [self.position]) do
- tinsert (sort, {LibHotCorners.options.clicks [button_table.name] or 0, button_table})
- end
- table.sort (sort, more_clicked)
-
- local last_button
-
- for index, button_table in ipairs (sort) do
- button_table = button_table [2]
- if (not button_table.widget) then
- LibHotCorners:CreateAddonWidget (self, button_table, index, self.position)
- end
-
- button_table.widget:ClearAllPoints()
-
- if (not button_table.savedtable.hide) then
- if (self.position == "topleft" or self.position == "topright") then
- local y = i * 35 * -1
- button_table.widget:SetPoint ("topleft", self, "topleft", 4, y)
- button_table.widget.y = y
- else
- local x = i * 35
- button_table.widget:SetPoint ("topleft", self, "topleft", x, -4)
- button_table.widget.x = x
- end
-
- button_table.widget:Show()
- last_button = button_table.widget
-
- i = i + 1
- else
- button_table.widget:Hide()
- end
- end
-
- local OptionsButton = LibHotCorners [self.position].optionsbutton
- local y = i * 35 * -1
- OptionsButton:SetPoint ("top", self, "top", 0, y)
- OptionsButton:Show()
-
- end
-
- --> corner frame on leave
- function HotCornersOnLeave (self)
- self:SetSize (1, 1)
- for index, button_table in ipairs (LibHotCorners [self.position]) do
- button_table.widget:Hide()
- end
- local OptionsButton = LibHotCorners [self.position].optionsbutton
- OptionsButton:Hide()
- end
-
- --> quick corner on click
- function HotCornersOnQuickClick (self, button)
- local parent_position = self:GetParent().position
- if (LibHotCorners [parent_position].quickfunc) then
- LibHotCorners [parent_position].quickfunc (self, button)
- end
- end
-
- --> options button onenter
- function HotCornersOptionsButtonOnEnter (self)
- set_size (self:GetParent())
- for index, button_table in ipairs (LibHotCorners [self:GetParent().position]) do
- if (not button_table.savedtable.hide) then
- button_table.widget:Show()
- end
- end
- self:Show()
- end
-
- function HotCornersOpenOptions (self)
- HotCornersOptionsFrame:Show()
- HotCornersOptionsFrameEnableCheckBox:SetChecked (LibHotCorners.options.is_enabled)
- end
-
- function HotCornersSetEnabled (state)
- LibHotCorners.options.is_enabled = state
- end
-
- --> options button onleave
- function HotCornersOptionsButtonOnLeave (self)
- self:GetParent():GetScript("OnLeave")(self:GetParent())
- end
-
- --> button onenter
- function HotCornersButtonOnEnter (self)
- set_size (self:GetParent())
- for index, button_table in ipairs (LibHotCorners [self:GetParent().position]) do
- if (not button_table.savedtable.hide) then
- button_table.widget:Show()
- end
- end
- show_tooltip (self)
- local OptionsButton = LibHotCorners [self:GetParent().position].optionsbutton
- OptionsButton:Show()
- end
-
- --> button onleave
- function HotCornersButtonOnLeave (self)
- GameTooltip:Hide()
- if (self.table.onleave) then
- self.table.onleave (self)
- end
- self:GetParent():GetScript("OnLeave")(self:GetParent())
- local OptionsButton = LibHotCorners [self:GetParent().position].optionsbutton
- OptionsButton:Hide()
- end
-
- --> button onmousedown
- function HotCornersButtonOnMouseDown (self, button)
- if (self:GetParent().position == "topleft" or self:GetParent().position == "topright") then
- self:SetPoint ("topleft", self:GetParent(), "topleft", 5, self.y - 1)
- else
- self:SetPoint ("topleft", self:GetParent(), "topleft", self.x+1, -6)
- end
- end
-
- --> button onmouseup
- function HotCornersButtonOnMouseUp (self, button)
- if (self:GetParent().position == "topleft" or self:GetParent().position == "topright") then
- self:SetPoint ("topleft", self:GetParent(), "topleft", 4, self.y)
- else
- self:SetPoint ("topleft", self:GetParent(), "topleft", self.x, -4)
- end
- if (self.table.click) then
- LibHotCorners.options.clicks [self.table.name] = LibHotCorners.options.clicks [self.table.name] or 0
- LibHotCorners.options.clicks [self.table.name] = LibHotCorners.options.clicks [self.table.name] + 1
- self.table.click (self, button)
- end
- end
-
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---> create top left corner
-
- local TopLeftCorner = CreateFrame ("Frame", "LibHotCornersTopLeft", nil, "HotCornersFrameCornerTemplate")
- TopLeftCorner:SetPoint ("topleft", UIParent, "topleft", 0, 0)
- TopLeftCorner.position = "topleft"
-
- --fast corner button
- local QuickClickButton = CreateFrame ("button", "LibHotCornersTopLeftFastButton", TopLeftCorner, "HotCornersQuickCornerButtonTemplate")
-
- --options button
- local OptionsButton = CreateFrame ("button", "LibHotCornersTopLeftOptionsButton", TopLeftCorner, "HotCornersOptionsButtonTemplate")
-
- if (debug) then
- QuickClickButton:SetSize (20, 20)
- QuickClickButton:SetBackdrop ({bgFile = [[Interface\DialogFrame\UI-DialogBox-Gold-Background]], tile = true, tileSize = 40})
- QuickClickButton:SetBackdropColor (1, 0, 0, 1)
- end
-
- LibHotCorners.topleft.quickbutton = QuickClickButton
- LibHotCorners.topleft.optionsbutton = OptionsButton
-
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---> buttons
-
- function LibHotCorners:CreateAddonWidget (frame, button_table, index, side)
-
- --> create the button
- local button = CreateFrame ("button", "LibHotCorners" .. side .. button_table.fname, frame, "HotCornersButtonTemplate")
-
- --> write some attributes
- button.index = index
- button.table = button_table
- button.parent = frame
- button_table.widget = button
-
- --> set the icon
- button:SetNormalTexture (button_table.icon)
- button:SetHighlightTexture (button_table.icon)
-
- if (string.lower (button_table.icon):find ([[\icons\]])) then
- button:GetNormalTexture():SetTexCoord (0.078125, 0.9375, 0.078125, 0.9375)
- button:GetHighlightTexture():SetTexCoord (0.078125, 0.9375, 0.078125, 0.9375)
- end
-
- return button
- end
\ No newline at end of file
diff --git a/Libs/LibHotCorners/LibHotCorners.xml b/Libs/LibHotCorners/LibHotCorners.xml
deleted file mode 100644
index d30ba064..00000000
--- a/Libs/LibHotCorners/LibHotCorners.xml
+++ /dev/null
@@ -1,164 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- self:EnableMouse (false);
-
-
- HotCornersBackgroundOnEnter (self);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- HotCornersOnEnter (self);
-
-
- HotCornersOnLeave (self);
-
-
-
-
-
-
-
-
-
-
-
-
- self:SetFrameLevel (self:GetParent():GetFrameLevel()+2);
-
-
- HotCornersOnQuickClick (self, button);
-
-
- HotCornersOnEnter (self:GetParent());
-
-
-
-
-
-
-
-
- self:SetFrameLevel (self:GetParent():GetFrameLevel()+2);
-
-
- HotCornersButtonOnEnter (self);
-
-
- HotCornersButtonOnLeave (self);
-
-
- HotCornersButtonOnMouseDown (self, button);
-
-
- HotCornersButtonOnMouseUp (self, button);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- _G [self:GetName() .. "Text"]:SetText ("Enabled");
- self.tooltip = "Enable or Disable HorCorners";
- tinsert (UISpecialFrames, "HotCornersOptionsFrame");
-
-
- if (self:GetChecked()) then
- HotCornersSetEnabled (true);
- else
- HotCornersSetEnabled (false);
- end
-
-
-
-
-
-
-
- self.TitleText:SetText ("HotCorners Options");
- self.portrait:SetTexture ([[Interface\FriendsFrame\FriendsFrameScrollIcon]]);
-
-
- self:StartMoving();
-
-
- self:StopMovingOrSizing();
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Libs/libs.xml b/Libs/libs.xml
index 99b8dddf..cf295794 100644
--- a/Libs/libs.xml
+++ b/Libs/libs.xml
@@ -11,7 +11,6 @@
-
\ No newline at end of file
diff --git a/boot.lua b/boot.lua
index d8adf1ec..8df54765 100644
--- a/boot.lua
+++ b/boot.lua
@@ -2,10 +2,10 @@
--> global name declaration
_ = nil
- _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0", "LibHotCorners")
+ _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0")
- _detalhes.build_counter = 20 --it's 22 for release
- _detalhes.userversion = "v1.21.0"
+ _detalhes.build_counter = 20 --it's 28 for release
+ _detalhes.userversion = "v1.21.2"
_detalhes.realversion = 25
_detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")"
@@ -19,16 +19,20 @@ do
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
--[[
-|cFFFFFF00a1.21.0 (|cFFFFCC00Ago 4, 2014|r|cFFFFFF00)|r:\n\n
+|cFFFFFF00a1.21.0 (|cFFFFCC00Ago 7, 2014|r|cFFFFFF00)|r:\n\n
+|cFFFFFF00-|r Fixed a bug over Healing Player Details Window where pets wasn't being shown |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n
+|cFFFFFF00-|r Fixed issue with summoning pets with unknown owners where it was breaking the summon of all the others pets. |cFF999999(thanks @ThunderLost-curse website)|r.\n\n
+|cFFFFFF00-|r Hot Corners isn't no more a part of Details!, instead of that, Hot Corner is now a standalone addon which needs to be installed separately for who wants to use it.\n\n
+|cFFFFFF00-|r Skin data is now stored inside the profiles, many code parts got rewrite, still may have few bugs but it's more reliable then before.\n\n
|cFFFFFF00-|r Rework on Auras and Voidzones: now shows damage, dps and percentage. Also its tooltip got fixes and now shows the correct damage done to players.\n\n
|cFFFFFF00-|r Tooltip for Enemies now shows damage taken from players |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n
|cFFFFFF00-|r Right clicking a real-time enemy bar, makes it back to Enemies display instead of show Bookmark panel |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n
|cFFFFFF00-|r Tank comparison from previous segment now uses the same percentage method from player comparison panel.\n\n
-|cFFFFFF00-|r Fix bug with the slash command 'show' where was ignoring the window limit set on options panel |cFF999999(thanks @Castiel-US-Azralon realm)|r.\n\n
+|cFFFFFF00-|r Fixed bug with the slash command 'show' where was ignoring the window limit set on options panel |cFF999999(thanks @Castiel-US-Azralon realm)|r.\n\n
|cFFFFFF00-|r Fixed few bugs with scroll bars, including scrolls on dropdown menu and player detail window |cFF999999(thanks @Revi-mmochampion forum)|r.\n\n
--]]
- Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00a1.21.0 (|cFFFFCC00Ago 4, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Rework on Auras and Voidzones: now shows damage, dps and percentage. Also its tooltip got fixes and now shows the correct damage done to players.\n\n|cFFFFFF00-|r Tooltip for Enemies now shows damage taken from players |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00-|r Right clicking a real-time enemy bar, makes it back to Enemies display instead of show Bookmark panel |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00-|r Tank comparison from previous segment now uses the same percentage method from player comparison panel.\n\n|cFFFFFF00-|r Fix bug with the slash command 'show' where was ignoring the window limit set on options panel |cFF999999(thanks @Castiel-US-Azralon realm)|r.\n\n|cFFFFFF00-|r Fixed few bugs with scroll bars, including scrolls on dropdown menu and player detail window |cFF999999(thanks @Revi-mmochampion forum)|r.\n\n|cFFFFFF00v1.20.2 (|cFFFFCC00Aug 1, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a option under Miscellaneous section to provide spell link instead of spell name for helpful spells when reporting a death |cFF999999(thanks @skmzarn-mmochampion forum)|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 customized spells.\n\n|cFFFFFF00-|r Added dwarf racial Stone Form on cooldown list |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\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 |cFF999999(thanks @skmzarn-mmochampion forum)|r.\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"
+ Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00a1.21.2 (|cFFFFCC00Ago 7, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed a bug over Healing Player Details Window where pets wasn't being shown |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed issue with summoning pets with unknown owners where it was breaking the summon of all the others pets. |cFF999999(thanks @ThunderLost-curse website)|r.\n\n|cFFFFFF00-|r Hot Corners isn't no more a part of Details!, instead of that, Hot Corner is now a standalone addon which needs to be installed separately for who wants to use it.\n\n|cFFFFFF00-|r Skin data is now stored inside the profiles, many code parts got rewrite, still may have few bugs but it's more reliable then before.\n\n|cFFFFFF00-|r Rework on Auras and Voidzones: now shows damage, dps and percentage. Also its tooltip got fixes and now shows the correct damage done to players.\n\n|cFFFFFF00-|r Tooltip for Enemies now shows damage taken from players |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00-|r Right clicking a real-time enemy bar, makes it back to Enemies display instead of show Bookmark panel |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00-|r Tank comparison from previous segment now uses the same percentage method from player comparison panel.\n\n|cFFFFFF00-|r Fix bug with the slash command 'show' where was ignoring the window limit set on options panel |cFF999999(thanks @Castiel-US-Azralon realm)|r.\n\n|cFFFFFF00-|r Fixed few bugs with scroll bars, including scrolls on dropdown menu and player detail window |cFF999999(thanks @Revi-mmochampion forum)|r.\n\n|cFFFFFF00v1.20.2 (|cFFFFCC00Aug 1, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a option under Miscellaneous section to provide spell link instead of spell name for helpful spells when reporting a death |cFF999999(thanks @skmzarn-mmochampion forum)|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 customized spells.\n\n|cFFFFFF00-|r Added dwarf racial Stone Form on cooldown list |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\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 |cFF999999(thanks @skmzarn-mmochampion forum)|r.\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."
Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r "
--> startup
@@ -90,6 +94,8 @@ do
[1134] = {file = "LoadingScreen_Shadowpan_bg", coords = {0, 1, 0.29296875, 0.857421875}}, -- Tiger's Peak
--"LoadScreenOrgrimmarArena", --Ring of Valor
}
+ --> armazena instancias inativas
+ _detalhes.unused_instances = {}
function _detalhes:GetArenaInfo (mapid)
local t = _detalhes.arena_info [mapid]
diff --git a/classes/classe_heal.lua b/classes/classe_heal.lua
index d84dbbb6..52ccbe3e 100644
--- a/classes/classe_heal.lua
+++ b/classes/classe_heal.lua
@@ -1530,7 +1530,23 @@ function atributo_heal:MontaInfoHealingDone()
_table_insert (minhas_curas, {spellid, tabela.total, tabela.total/total*100, nome, icone})
end
- _table_sort (minhas_curas, function(a, b) return a[2] > b[2] 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"
+ for _, PetName in _ipairs (ActorPets) do
+ local PetActor = instancia.showing (class_type, PetName)
+ if (PetActor) then
+ local PetSkillsContainer = PetActor.spell_tables._ActorTable
+ for _spellid, _skill in _pairs (PetSkillsContainer) do --> da foreach em cada spellid do container
+ local nome, _, icone = _GetSpellInfo (_spellid)
+ _table_insert (minhas_curas, {_spellid, _skill.total, _skill.total/total*100, nome .. " (|c" .. class_color .. PetName:gsub ((" <.*"), "") .. "|r)", icone, PetActor})
+ end
+ --_table_insert (ActorSkillsSortTable, {PetName, PetActor.total, PetActor.total/ActorTotalDamage*100, PetName:gsub ((" <.*"), ""), "Interface\\AddOns\\Details\\images\\classes_small"})
+ end
+ end
+
+ _table_sort (minhas_curas, _detalhes.Sort2)
local amt = #minhas_curas
gump:JI_AtualizaContainerBarras (amt)
@@ -1549,6 +1565,8 @@ function atributo_heal:MontaInfoHealingDone()
self:FocusLock (barra, tabela[1])
+ barra.other_actor = tabela [6]
+
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)
else
@@ -1565,7 +1583,7 @@ function atributo_heal:MontaInfoHealingDone()
end
end
- --> SERIA TOP CURADOS
+ --> TOP CURADOS
local meus_inimigos = {}
tabela = self.targets._ActorTable
for _, tabela in _ipairs (tabela) do
@@ -1618,39 +1636,58 @@ function atributo_heal:MontaInfoHealingDone()
end
-function atributo_heal:MontaTooltipAlvos (esta_barra, index)
+function atributo_heal:MontaTooltipAlvos (esta_barra, index, instancia)
-- eu ja sei quem é o alvo a mostrar os detalhes
-- dar foreach no container de habilidades -- pegar os alvos da habilidade -- e ver se dentro do container tem o meu alvo.
local inimigo = esta_barra.nome_inimigo
local container = self.spell_tables._ActorTable
local habilidades = {}
- local total = self.total
+ local total
+ local sub_atributo = info.instancia.sub_atributo
- if (info.instancia.sub_atributo == 3) then --> overheal
+ if (sub_atributo == 3) then --> overheal
total = self.totalover
- for spellid, tabela in _pairs (container) do
- --> tabela = classe_damage_habilidade
- local alvos = tabela.targets._ActorTable
- for _, tabela in _ipairs (alvos) do
- --> tabela = classe_target
- if (tabela.nome == inimigo) then
- habilidades [#habilidades+1] = {spellid, tabela.overheal}
- end
- end
- end
else
-
- for spellid, tabela in _pairs (container) do
- local alvos = tabela.targets._ActorTable
- for _, tabela in _ipairs (alvos) do
- if (tabela.nome == inimigo) then
- habilidades [#habilidades+1] = {spellid, tabela.total}
+ total = self.total
+ end
+
+ --> add spells
+ for spellid, tabela in _pairs (container) do
+ local alvos = tabela.targets._ActorTable
+ for _, tabela in _ipairs (alvos) do
+ if (tabela.nome == inimigo) then
+ local nome, _, icone = _GetSpellInfo (spellid)
+ if (sub_atributo == 3) then --> overheal
+ habilidades [#habilidades+1] = {nome, tabela.overheal, icone}
+ else
+ habilidades [#habilidades+1] = {nome, tabela.total, icone}
end
end
end
-
end
+
+ --> add pets
+ local ActorPets = self.pets
+ for _, PetName in _ipairs (ActorPets) do
+ local PetActor = instancia.showing (class_type, PetName)
+ if (PetActor) then
+ local PetSkillsContainer = PetActor.spell_tables._ActorTable
+ for _spellid, _skill in _pairs (PetSkillsContainer) do
+ local alvos = _skill.targets._ActorTable
+ for _, tabela in _ipairs (alvos) do
+ if (tabela.nome == inimigo) then
+ local nome, _, icone = _GetSpellInfo (_spellid)
+ if (sub_atributo == 3) then --> overheal
+ habilidades [#habilidades+1] = {nome .. " (" .. PetName:gsub ((" <.*"), "") .. ")", tabela.overheal, icone}
+ else
+ habilidades [#habilidades+1] = {nome .. " (" .. PetName:gsub ((" <.*"), "") .. ")", tabela.total, icone}
+ end
+ end
+ end
+ end
+ end
+ end
_table_sort (habilidades, function (a, b) return a[2] > b[2] end)
@@ -1675,7 +1712,7 @@ function atributo_heal:MontaTooltipAlvos (esta_barra, index)
end
for index, tabela in _ipairs (habilidades) do
- local nome, rank, icone = _GetSpellInfo (tabela[1])
+ local nome, icone = tabela[1], tabela [3]
if (index < 8) then
if (is_hps) then
GameTooltip:AddDoubleLine (index..". |T"..icone..":0|t "..nome, _detalhes:comma_value (_math_floor (tabela[2]/meu_tempo)).." (".. _cstr ("%.1f", tabela[2]/total*100).."%)", 1, 1, 1, 1, 1, 1)
@@ -1776,9 +1813,14 @@ function atributo_heal:MontaDetalhesHealingTaken (nome, barra)
end
function atributo_heal:MontaDetalhesHealingDone (spellid, barra)
- --> localize-me
- local esta_magia = self.spell_tables._ActorTable [spellid]
+ local esta_magia
+ if (barra.other_actor) then
+ esta_magia = barra.other_actor.spell_tables._ActorTable [spellid]
+ else
+ esta_magia = self.spell_tables._ActorTable [spellid]
+ end
+
if (not esta_magia) then
return
end
diff --git a/classes/classe_instancia.lua b/classes/classe_instancia.lua
index b1139465..b8e295df 100644
--- a/classes/classe_instancia.lua
+++ b/classes/classe_instancia.lua
@@ -208,6 +208,18 @@ function _detalhes:ResetAttribute()
end
end
+function _detalhes:ListInstances()
+ return _ipairs (_detalhes.tabela_instancias)
+end
+
+function _detalhes:GetPosition()
+ return self.posicao
+end
+
+function _detalhes:GetDisplay()
+ return self.atributo, self.sub_atributo
+end
+
------------------------------------------------------------------------------------------------------------------------
--> retorna se a instância esta ou não ativa
@@ -223,9 +235,30 @@ function _detalhes:IsStarted()
return self.iniciada
end
-
------------------------------------------------------------------------------------------------------------------------
+ function _detalhes:LoadLocalInstanceConfig()
+ local config = _detalhes.local_instances_config [self.meu_id]
+ if (config) then
+
+ if (not _detalhes.profile_save_pos) then
+ self.posicao = config.pos
+ end
+
+ self.ativa = config.is_open
+ self.atributo = config.attribute
+ self.sub_atributo = config.sub_attribute
+ self.modo = config.mode
+ self.segmento = config.segment
+ self.snap = config.snap or {}
+ self.horizontalSnap = config.horizontalSnap
+ self.verticalSnap = config.verticalSnap
+ self.sub_atributo_last = config.sub_atributo_last
+ self.isLocked = config.isLocked
+
+ end
+ end
+
function _detalhes:ShutDownAllInstances()
for index, instance in _ipairs (_detalhes.tabela_instancias) do
if (instance:IsEnabled()) then
@@ -237,6 +270,10 @@ end
function _detalhes:ShutDown()
return self:DesativarInstancia()
end
+
+ function _detalhes:GetNumWindows()
+
+ end
--> desativando a instância ela fica em stand by e apenas hida a janela
function _detalhes:DesativarInstancia()
@@ -259,9 +296,13 @@ end
self:ResetaGump()
--gump:Fade (self.baseframe.cabecalho.atributo_icon, _unpack (_detalhes.windows_fade_in))
- gump:Fade (self.baseframe.cabecalho.ball, _unpack (_detalhes.windows_fade_in))
- gump:Fade (self.baseframe, _unpack (_detalhes.windows_fade_in))
- gump:Fade (self.rowframe, _unpack (_detalhes.windows_fade_in))
+ --gump:Fade (self.baseframe.cabecalho.ball, _unpack (_detalhes.windows_fade_in))
+ --gump:Fade (self.baseframe, _unpack (_detalhes.windows_fade_in))
+ --gump:Fade (self.rowframe, _unpack (_detalhes.windows_fade_in))
+
+ gump:Fade (self.baseframe.cabecalho.ball, 1)
+ gump:Fade (self.baseframe, 1)
+ gump:Fade (self.rowframe, 1)
self:Desagrupar (-1)
@@ -420,18 +461,99 @@ end
------------------------------------------------------------------------------------------------------------------------
function _detalhes:DeleteInstance (id)
-
+
local instance = _detalhes:GetInstance (id)
if (not instance) then
return false
end
+
+ --> check is is open
+ --if (instance:IsEnabled()) then
+ -- instance:ShutDown()
+ --end
- --verifica se esta aberta
- if (instance:IsEnabled()) then
- instance:ShutDown()
+ -- deletei a janela 1
+ -- a janela 2 ficou com snap [1] = 1 [3] = 3
+
+ --> break snaps of previous and next window
+ local left_instance = _detalhes:GetInstance (id-1)
+ if (left_instance) then
+ for snap_side, instance_id in _pairs (left_instance.snap) do
+ if (instance_id == id) then --snap na proxima instancia
+ left_instance.snap [snap_side] = nil
+ end
+ end
+ end
+ local right_instance = _detalhes:GetInstance (id+1)
+ if (right_instance) then
+ for snap_side, instance_id in _pairs (right_instance.snap) do
+ if (instance_id == id) then --snap na proxima instancia
+ right_instance.snap [snap_side] = nil
+ end
+ end
+ end
+
+ --> re align snaps for higher instances
+ for i = id+1, #_detalhes.tabela_instancias do
+ local this_instance = _detalhes:GetInstance (i)
+ --fix the snaps
+ for snap_side, instance_id in _pairs (this_instance.snap) do
+ if (instance_id == i+1) then --snap na proxima instancia
+ this_instance.snap [snap_side] = i
+ elseif (instance_id == i-1 and i-2 > 0) then --snap na instancia anterior
+ this_instance.snap [snap_side] = i-2
+ else
+ this_instance.snap [snap_side] = nil
+ end
+ end
+ end
+
+ table.remove (_detalhes.tabela_instancias, id)
+
+ if (true) then
+ return
+ end
+
+ table.remove (_detalhes.local_instances_config, id)
+ _detalhes:SaveProfile()
+ _detalhes:SaveLocalInstanceConfig()
+ table.insert (_detalhes.tabela_instancias, 3, instance)
+ _detalhes:ApplyProfile (_detalhes:GetCurrentProfileName(), true)
+
+ if (true) then
+ return
end
+ --> break snaps of previous and next window
+ local left_instance = _detalhes:GetInstance (id-1)
+ if (left_instance) then
+ for index, instance_id in _pairs (left_instance.snap) do
+ if (index == id) then --snap na proxima instancia
+ left_instance.snap [index] = nil
+ end
+ end
+ end
+ local right_instance = _detalhes:GetInstance (id+1)
+ if (right_instance) then
+ for index, instance_id in _pairs (right_instance.snap) do
+ if (index == id) then --snap na proxima instancia
+ right_instance.snap [index] = nil
+ end
+ end
+ end
+
+ --> copy skins from next instances
+ for i = id+1, #_detalhes.tabela_instancias do
+ local current_instance = _detalhes:GetInstance (i-1)
+ local next_instance = _detalhes:GetInstance (i)
+
+ if (next_instance) then
+ local exported = next_instance:ExportSkin()
+
+ end
+ end
+
--fixas os snaps nas janelas superiores
for i = id+1, #_detalhes.tabela_instancias do
local this_instance = _detalhes:GetInstance (i)
@@ -449,8 +571,23 @@ end
end
end
+
+
+
+
--remover do container tabela_instancias
- tremove (_detalhes.tabela_instancias, id)
+
+ -- fiz alterações das outras instancias, precisa salvar agora? // ele salva ao sair ou mudar o profile
+ -- remover a instancia do container deste profile
+
+ --local profile = _detalhes:GetProfile (current_profile_name)
+ --local saved_skins = profile.instances
+ --tremove (saved_skins, id)
+
+ --tremove (_detalhes.tabela_instancias, id)
+
+ --> save the current profile
+ _detalhes:SaveProfile()
end
@@ -471,8 +608,17 @@ end
return false
end
- local new_instance = _detalhes:NovaInstancia (#_detalhes.tabela_instancias+1)
+ local next_id = #_detalhes.tabela_instancias+1
+ if (_detalhes.unused_instances [next_id]) then
+ local new_instance = _detalhes.unused_instances [next_id]
+ _detalhes.tabela_instancias [next_id] = new_instance
+ _detalhes.unused_instances [next_id] = nil
+ new_instance:AtivarInstancia()
+ return new_instance
+ end
+
+ local new_instance = _detalhes:NovaInstancia (next_id)
return new_instance
elseif (id) then
@@ -770,23 +916,6 @@ function _detalhes:agrupar_janelas (lados)
end
-local function FixSnaps (instancia)
- --_detalhes:DelayMsg ("DEBUG verificando snaps para instancia "..instancia.meu_id)
- for snap, esta_instancia in _pairs (instancia.snap) do
- if (esta_instancia) then
- esta_instancia = _detalhes.tabela_instancias [esta_instancia]
- --_detalhes:DelayMsg ("DEBUG janela "..instancia.meu_id.." com snap "..snap.. " em " .. esta_instancia.meu_id)
- if (snap == 2) then
- --instancia.baseframe.rodape.StatusBarLeftAnchor:SetPoint ("left", instancia.baseframe.rodape.top_bg, "left", 25, 10)
- --instancia.baseframe.rodape.StatusBarCenterAnchor:SetPoint ("center", instancia.baseframe.rodape.top_bg, "center", 20, 10)
- --instancia.baseframe.rodape.esquerdo:SetTexture ("Interface\\AddOns\\Details\\images\\bar_down_left_snap")
- --instancia.baseframe.rodape.esquerdo.have_snap = true
- end
- end
- end
-end
-
-
function _detalhes:Desagrupar (instancia, lado)
if (self.meu_id) then --> significa que self é uma instancia
@@ -898,6 +1027,99 @@ end
--> cria uma janela para uma nova instância
--> search key: ~new ~nova
+ function _detalhes:CreateDisabledInstance (ID, skin_table)
+
+ --> first check if we can recycle a old instance
+ if (_detalhes.unused_instances [ID]) then
+ local new_instance = _detalhes.unused_instances [ID]
+ _detalhes.tabela_instancias [ID] = new_instance
+ _detalhes.unused_instances [ID] = nil
+ --> replace the values on recycled instance
+ new_instance:ResetInstanceConfig()
+
+ --> copy values from a previous skin saved
+ if (skin_table) then
+ --> copy from skin_table to new_instance
+ _detalhes.table.copy (new_instance, skin_table)
+ end
+
+ return new_instance
+ end
+
+ --> must create a new one
+ local new_instance = {
+ --> instance id
+ meu_id = ID,
+ --> internal stuff
+ barras = {}, --container que irá armazenar todas as barras
+ barraS = {nil, nil}, --de x até x são as barras que estão sendo mostradas na tela
+ rolagem = false, --barra de rolagem não esta sendo mostrada
+ largura_scroll = 26,
+ bar_mod = 0,
+ bgdisplay_loc = 0,
+
+ --> displaying row info
+ rows_created = 0,
+ rows_showing = 0,
+ rows_max = 50,
+
+ --> saved pos for normal mode and lone wolf mode
+ posicao = {
+ ["normal"] = {x = 1, y = 2, w = 300, h = 200},
+ ["solo"] = {x = 1, y = 2, w = 300, h = 200}
+ },
+
+ --> save information about window snaps
+ snap = {},
+
+ --> current state starts as normal
+ mostrando = "normal",
+ --> menu consolidated
+ consolidate = false, --deprecated
+ icons = {true, true, true, true},
+
+ --> status bar stuff
+ StatusBar = {options = {}},
+
+ --> more stuff
+ atributo = 1, --> dano
+ sub_atributo = 1, --> damage done
+ sub_atributo_last = {1, 1, 1, 1, 1},
+ segmento = -1, --> combate atual
+ modo = modo_grupo,
+ last_modo = modo_grupo,
+ LastModo = modo_grupo,
+ }
+
+ _setmetatable (new_instance, _detalhes)
+ _detalhes.tabela_instancias [#_detalhes.tabela_instancias+1] = new_instance
+
+ --> fill the empty instance with default values
+ new_instance:ResetInstanceConfig()
+
+ --> copy values from a previous skin saved
+ if (skin_table) then
+ --> copy from skin_table to new_instance
+ _detalhes.table.copy (new_instance, skin_table)
+ end
+
+ --> setup default wallpaper
+ local spec = GetSpecialization()
+ if (spec) then
+ local id, name, description, icon, _background, role = GetSpecializationInfo (spec)
+ if (_background) then
+ local bg = "Interface\\TALENTFRAME\\" .. _background
+ if (new_instance.wallpaper) then
+ new_instance.wallpaper.texture = bg
+ new_instance.wallpaper.texcoord = {0, 1, 0, 0.703125}
+ end
+ end
+ end
+
+ --> finish
+ return new_instance
+ end
+
function _detalhes:NovaInstancia (ID)
local new_instance = {}
@@ -938,11 +1160,11 @@ end
--> saved pos for normal mode and lone wolf mode
new_instance.posicao = {
- ["normal"] = {},
- ["solo"] = {}
+ ["normal"] = {x = 1, y = 2, w = 300, h = 200},
+ ["solo"] = {x = 1, y = 2, w = 300, h = 200}
}
--> save information about window snaps
- new_instance.snap = {nil, nil, nil, nil}
+ new_instance.snap = {}
--> current state starts as normal
new_instance.mostrando = "normal"
@@ -951,6 +1173,7 @@ end
new_instance.icons = {true, true, true, true}
--> create window frames
+
local _baseframe, _bgframe, _bgframe_display, _scrollframe = gump:CriaJanelaPrincipal (ID, new_instance, true)
new_instance.baseframe = _baseframe
new_instance.bgframe = _bgframe
@@ -1001,12 +1224,11 @@ end
new_instance:ShowSideBars()
- --local skin = fazer aqui o esquema de resgatar a skin salva no profile.
-
- new_instance:ChangeSkin ("Default Skin")
+ new_instance.skin = "no skin"
new_instance:ChangeSkin ("Minimalistic")
--> apply standard skin if have one saved
+ --[[
if (_detalhes.standard_skin) then
local style = _detalhes.standard_skin
@@ -1028,9 +1250,10 @@ end
end
end
+ --]]
--> apply all changed attributes
- new_instance:ChangeSkin()
+ --new_instance:ChangeSkin()
return new_instance
end
@@ -1092,8 +1315,7 @@ function _detalhes:RestauraJanela (index, temp, load_only)
self:EsconderScrollBar (true)
--> check snaps
- self.snap = self.snap or {nil, nil, nil, nil}
- FixSnaps (self)
+ self.snap = self.snap or {}
--> status bar stuff
self.StatusBar = {}
diff --git a/classes/classe_instancia_include.lua b/classes/classe_instancia_include.lua
index a37d0b93..df9876e6 100644
--- a/classes/classe_instancia_include.lua
+++ b/classes/classe_instancia_include.lua
@@ -10,6 +10,10 @@ function _detalhes:ResetInstanceConfig()
self [key] = value
end
end
+ self.snap = {}
+ self.horizontalSnap = nil
+ self.verticalSnap = nil
+ self:LockInstance (false)
end
function _detalhes:LoadInstanceConfig()
diff --git a/core/control.lua b/core/control.lua
index 6b4ce138..8c58984f 100644
--- a/core/control.lua
+++ b/core/control.lua
@@ -308,7 +308,6 @@
_detalhes:CatchRaidBuffUptime ("BUFF_UPTIME_IN")
_detalhes:CatchRaidDebuffUptime ("DEBUFF_UPTIME_IN")
_detalhes:UptadeRaidMembersCache()
- _detalhes:HaveOneCurrentInstance()
--> hide / alpha / switch in combat
for index, instancia in ipairs (_detalhes.tabela_instancias) do
@@ -319,6 +318,7 @@
end
_detalhes:SendEvent ("COMBAT_PLAYER_ENTER", nil, _detalhes.tabela_vigente)
+ _detalhes:HaveOneCurrentInstance()
end
diff --git a/core/parser.lua b/core/parser.lua
index 79de5569..46749f0f 100644
--- a/core/parser.lua
+++ b/core/parser.lua
@@ -539,6 +539,10 @@
-----------------------------------------------------------------------------------------------------------------------------------------
function parser:summon (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellName)
+ if (not who_name) then
+ who_name = "[*] " .. spellName
+ end
+
--> pet summon another pet
local sou_pet = _detalhes.tabela_pets.pets [who_serial]
if (sou_pet) then --> okey, ja é um pet
@@ -2877,6 +2881,7 @@
end
end
+ -- ~load
function _detalhes.parser_functions:ADDON_LOADED (...)
local addon_name = _select (1, ...)
@@ -2893,11 +2898,12 @@
--> check group
_detalhes.in_group = IsInGroup() or IsInRaid()
- --> write into details object all basic keys
+ --> write into details object all basic keys and default profile
_detalhes:ApplyBasicKeys()
- --> check if is first run
+ --> check if is first run, update keys for character and global data
_detalhes:LoadGlobalAndCharacterData()
+ --> details updated and not reopened the game client
if (_detalhes.FILEBROKEN) then
return
end
@@ -2945,7 +2951,7 @@
_detalhes.listener:SetScript ("OnEvent", _detalhes.OnEvent)
- --> protected logout function
+ --> logout function ~save
function _detalhes:PLAYER_LOGOUT (...)
--> close info window
diff --git a/core/util.lua b/core/util.lua
index b48a84ae..40093669 100644
--- a/core/util.lua
+++ b/core/util.lua
@@ -177,6 +177,19 @@
return false
end
+ _detalhes.table = {}
+
+ function _detalhes.table.copy (t1, t2)
+ local table_deepcopy = table_deepcopy
+ for key, value in pairs (t2) do
+ if (type (value) == "table") then
+ t1 [key] = table_deepcopy (value)
+ else
+ t1 [key] = value
+ end
+ end
+ end
+
function _detalhes:hex (num)
local hexstr = '0123456789abcdef'
local s = ''
diff --git a/core/windows.lua b/core/windows.lua
index c36736b0..10be6c48 100644
--- a/core/windows.lua
+++ b/core/windows.lua
@@ -231,12 +231,12 @@
self.posicao[self.mostrando].h = pre_defined.altura
end
+ self.baseframe:SetWidth (self.posicao[self.mostrando].w)
+ self.baseframe:SetHeight (self.posicao[self.mostrando].h)
+
self.baseframe:ClearAllPoints()
self.baseframe:SetPoint ("CENTER", _UIParent, "CENTER", novo_x, novo_y)
- self.baseframe:SetWidth (self.posicao[self.mostrando].w) --slider frame
- self.baseframe:SetHeight (self.posicao[self.mostrando].h)
-
self.baseframe.BoxBarrasAltura = self.baseframe:GetHeight() - end_window_spacement --> espaço para o final da janela
end
@@ -1518,25 +1518,28 @@
end
end
- _detalhes:RegisterHotCornerButton (
- --> absolute name
- "Details!",
- --> corner
- "TOPLEFT",
- --> config table
- self.hotcorner_topleft,
- --> frame _G name
- "DetailsLeftCornerButton",
- --> icon
- [[Interface\AddOns\Details\images\minimap]],
- --> tooltip
- tooltip_hotcorner,
- --> click function
- on_click_on_hotcorner_button,
- --> menus
- nil,
- --> quick click
- on_click_on_quickclick_button)
+ if (_G.HotCorners) then
+ _G.HotCorners:RegisterHotCornerButton (
+ --> absolute name
+ "Details!",
+ --> corner
+ "TOPLEFT",
+ --> config table
+ _detalhes.hotcorner_topleft,
+ --> frame _G name
+ "DetailsLeftCornerButton",
+ --> icon
+ [[Interface\AddOns\Details\images\minimap]],
+ --> tooltip
+ tooltip_hotcorner,
+ --> click function
+ on_click_on_hotcorner_button,
+ --> menus
+ nil,
+ --> quick click
+ on_click_on_quickclick_button
+ )
+ end
end
--old versions dialog
@@ -1634,4 +1637,21 @@
end
_detalhes:ScheduleTimer ("ResetWarningDialog", 7)
---]]
\ No newline at end of file
+--]]
+
+--[[
+ local background_up = f:CreateTexture (nil, "background")
+ background_up:SetPoint ("topleft", f, "topleft")
+ background_up:SetSize (250, 150)
+ background_up:SetTexture ("Interface\\QuestionFrame\\Question-Main")
+ background_up:SetTexCoord (0, 420/512, 320/512, 475/512)
+
+ local background_down = f:CreateTexture (nil, "background")
+ background_down:SetPoint ("topleft", background_up, "bottomleft")
+ background_down:SetSize (250, 150)
+ background_down:SetTexture ("Interface\\QuestionFrame\\Question-Main")
+ background_down:SetTexCoord (0, 420/512, 156/512, 308/512)
+
+ background_up:SetDesaturated (true)
+ background_down:SetDesaturated (true)
+--]]
\ No newline at end of file
diff --git a/framework/dropdown.lua b/framework/dropdown.lua
index 2d390da7..093599a3 100644
--- a/framework/dropdown.lua
+++ b/framework/dropdown.lua
@@ -254,11 +254,19 @@ local DropDownMetaFunctions = {}
function DropDownMetaFunctions:IsEnabled()
return self.dropdown:IsEnabled()
end
+
function DropDownMetaFunctions:Enable()
- return self.dropdown:Enable()
+
+ self:SetAlpha (.4)
+ return _rawset (self, "lockdown", false)
+ --return self.dropdown:Enable()
end
+
function DropDownMetaFunctions:Disable()
- return self.dropdown:Disable()
+
+ self:SetAlpha (.4)
+ return _rawset (self, "lockdown", true)
+ --return self.dropdown:Disable()
end
--> fixed value
@@ -517,8 +525,8 @@ end
function DetailsDropDownOnMouseDown (button)
local object = button.MyObject
-
- if (not object.opened) then --> click to open
+
+ if (not object.opened and not _rawget (object, "lockdown")) then --> click to open
local menu = object:func()
object.builtMenu = menu
diff --git a/functions/loaddata.lua b/functions/loaddata.lua
index 811cfc40..5198ee30 100644
--- a/functions/loaddata.lua
+++ b/functions/loaddata.lua
@@ -86,23 +86,33 @@ end
function _detalhes:LoadGlobalAndCharacterData()
--> check and build the default container for character database
+
+ --> it exists?
if (not _detalhes_database) then
_detalhes_database = table_deepcopy (_detalhes.default_player_data)
end
-
- 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
+ --> load saved values
+ for key, value in pairs (_detalhes.default_player_data) do
- --> check if key exists
+ --> check if key exists, e.g. a new key was added
if (_detalhes_database [key] == nil) then
if (type (value) == "table") then
_detalhes_database [key] = table_deepcopy (_detalhes.default_player_data [key])
else
_detalhes_database [key] = value
end
+
+ elseif (type (_detalhes_database [key]) == "table") then
+ for key2, value2 in pairs (_detalhes.default_player_data [key]) do
+ if (_detalhes_database [key] [key2] == nil) then
+ if (type (value2) == "table") then
+ _detalhes_database [key] [key2] = table_deepcopy (_detalhes.default_player_data [key] [key2])
+ else
+ _detalhes_database [key] [key2] = value2
+ end
+ end
+ end
end
--> copy the key from saved table to details object
@@ -118,7 +128,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
@@ -228,29 +238,9 @@ end
function _detalhes:LoadConfig()
- --> profile
-
- --> instances
- _detalhes.tabela_instancias = _detalhes_database.tabela_instancias or {}
- --> plugins data
+ --> plugins data
_detalhes.plugin_database = _detalhes_database.plugin_database or {}
-
- _detalhes:ReativarInstancias()
-
- --> fix for the 500
- if (_detalhes_database.active_profile == "") then
- --> é a primeira vez que este character usa profiles, precisa copiar as keys existentes
- local current_profile_name = _detalhes:GetCurrentProfileName()
- _detalhes:GetProfile (current_profile_name, true)
- _detalhes:SaveProfileSpecial()
- end
-
- --> load profile and active instances
- local current_profile_name = _detalhes:GetCurrentProfileName()
- _detalhes:GetProfile (current_profile_name, true)
-
- _detalhes:ApplyProfile (current_profile_name, true)
-
+
--> startup
--> set the nicktag cache host
@@ -259,7 +249,6 @@ function _detalhes:LoadConfig()
--> count data
_detalhes:CountDataOnLoad()
-
--> solo e raid plugin
if (_detalhes_database.SoloTablesSaved) then
if (_detalhes_database.SoloTablesSaved.Mode) then
@@ -302,6 +291,76 @@ function _detalhes:LoadConfig()
_detalhes.is_version_first_run = true
end
+ --> profile
+ --> fix for the 500
+ if (_detalhes_database.active_profile == "") then
+ --> é a primeira vez que este character usa profiles, precisa copiar as keys existentes
+ local current_profile_name = _detalhes:GetCurrentProfileName()
+ _detalhes:GetProfile (current_profile_name, true)
+ _detalhes:SaveProfileSpecial()
+ end
+
+ --> load profile and active instances
+ local current_profile_name = _detalhes:GetCurrentProfileName()
+ --> check if exists, if not, create one
+ local profile = _detalhes:GetProfile (current_profile_name, true)
+
+ --> instances
+ _detalhes.tabela_instancias = _detalhes_database.tabela_instancias or {}
+
+ --> fix for version 1.21.0
+ if (#_detalhes.tabela_instancias > 0) then --> only happens once after the character logon
+ --if (current_profile_name:find (UnitName ("player"))) then
+ for index, saved_skin in ipairs (profile.instances) do
+ local instance = _detalhes.tabela_instancias [index]
+ if (instance) then
+ saved_skin.__was_opened = instance.ativa
+ saved_skin.__pos = table_deepcopy (instance.posicao)
+ saved_skin.__locked = instance.isLocked
+ saved_skin.__snap = table_deepcopy (instance.snap)
+ saved_skin.__snapH = instance.horizontalSnap
+ saved_skin.__snapV = instance.verticalSnap
+
+ for key, value in pairs (instance) do
+ if (_detalhes.instance_defaults [key] ~= nil) then
+ if (type (value) == "table") then
+ saved_skin [key] = table_deepcopy (value)
+ else
+ saved_skin [key] = value
+ end
+ end
+ end
+ end
+ end
+
+ for index, instance in _detalhes:ListInstances() do
+ _detalhes.local_instances_config [index] = {
+ pos = table_deepcopy (instance.posicao),
+ is_open = instance.ativa,
+ attribute = instance.atributo,
+ sub_attribute = instance.sub_atributo,
+ mode = instance.modo,
+ segment = instance.segmento,
+ snap = table_deepcopy (instance.snap),
+ horizontalSnap = instance.horizontalSnap,
+ verticalSnap = instance.verticalSnap,
+ sub_atributo_last = instance.sub_atributo_last,
+ isLocked = instance.isLocked
+ }
+
+ if (_detalhes.local_instances_config [index].isLocked == nil) then
+ _detalhes.local_instances_config [index].isLocked = false
+ end
+ end
+ --end
+
+ _detalhes.tabela_instancias = {}
+ end
+ --_detalhes:ReativarInstancias()
+
+ --> apply the profile
+ _detalhes:ApplyProfile (current_profile_name, true)
+
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/functions/profiles.lua b/functions/profiles.lua
index b1bc0ff0..e60a045f 100644
--- a/functions/profiles.lua
+++ b/functions/profiles.lua
@@ -117,6 +117,24 @@ function _detalhes:GetProfile (name, create)
return profile
end
+function _detalhes:SetProfileCProp (name, cprop, value)
+ if (not name) then
+ name = _detalhes:GetCurrentProfileName()
+ end
+
+ local profile = _detalhes:GetProfile (name, false)
+
+ if (profile) then
+ if (type (value) == "table") then
+ rawset (profile, cprop, table_deepcopy (value))
+ else
+ rawset (profile, cprop, value)
+ end
+ else
+ return
+ end
+end
+
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> Profiles:
--> reset the profile
@@ -131,17 +149,7 @@ function _detalhes:ResetProfile (profile_name)
--> reset
- local instances = profile.instances
- for index, instance in ipairs (instances) do
- for key, value in pairs (_detalhes.instance_defaults) do
- if (type (value) == "table") then
- instance [key] = table_deepcopy (value)
- else
- instance [key] = value
- end
- end
- end
-
+ profile.instances = {}
local profile = table_deepcopy (_detalhes.default_profile)
profile.instances = instances
@@ -204,51 +212,190 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
else
_detalhes [key] = value
end
-
end
+ --> set the current profile
+ if (not is_copy) then
+ _detalhes.active_profile = profile_name
+ _detalhes_database.active_profile = profile_name
+ end
+
--> apply the skin
- local saved_skins = profile.instances
+ --> first save the local instance configs
+ _detalhes:SaveLocalInstanceConfig()
- --> we need to create instances if the profile have more saved skins then the current amount of instances
- if (#_detalhes.tabela_instancias < #saved_skins) then
- for i = #_detalhes.tabela_instancias+1, #saved_skins do
+ local saved_skins = profile.instances
+ local instance_limit = _detalhes.instances_amount
+
+ --> then close all opened instances
+ for index, instance in _detalhes:ListInstances() do
+ if (not getmetatable (instance)) then
+ instance.iniciada = false
+ setmetatable (instance, _detalhes)
+ end
+ if (instance:IsStarted()) then
+ if (instance:IsEnabled()) then
+ instance:ShutDown()
+ end
+ end
+ end
+
+ --> check if there is a skin saved or this is a empty profile
+ if (#saved_skins == 0) then
+ --> is empty profile, let's set default skin on #1 window
+ local instance1 = _detalhes:GetInstance (1)
+ if (not instance1) then
+ instance1 = _detalhes:CreateInstance (1)
+ end
+
+ --> apply default config on this instance (flat skin texture was 'ResetInstanceConfig' running).
+ instance1:ResetInstanceConfig()
+ instance1.skin = "no skin"
+ instance1:ChangeSkin ("Minimalistic")
- --> esse inicio precisa ser em silêncio
-
- local new_instance = _detalhes:CreateInstance (true)
- if (not new_instance) then
+ --> release the snap and lock
+ instance1:LoadLocalInstanceConfig()
+ instance1.snap = {}
+ instance1.horizontalSnap = nil
+ instance1.verticalSnap = nil
+ instance1:LockInstance (false)
+
+ if (#_detalhes.tabela_instancias > 1) then
+ for i = #_detalhes.tabela_instancias, 2, -1 do
+ _detalhes.unused_instances [i] = _detalhes.tabela_instancias [i]
+ _detalhes.tabela_instancias [i] = nil
+ end
+ end
+
+ else
+
+ --> load skins
+ local instances_loaded = 0
+
+ for index, skin in ipairs (saved_skins) do
+ if (instance_limit < index) then
break
end
- new_instance:ShutDown()
+ --> get the instance
+ local instance = _detalhes:GetInstance (index)
+ if (not instance) then
+ --> create a instance without creating its frames (not initializing)
+ instance = _detalhes:CreateDisabledInstance (index, skin)
+ end
+
+ --> copy skin
+ for key, value in pairs (skin) do
+ if (type (value) == "table") then
+ instance [key] = table_deepcopy (value)
+ else
+ instance [key] = value
+ end
+ end
+
+ --> reset basic config
+ instance.snap = {}
+ instance.horizontalSnap = nil
+ instance.verticalSnap = nil
+ instance:LockInstance (false)
+
+ --> load data saved for this character only
+ instance:LoadLocalInstanceConfig()
+
+ if (skin.__was_opened) then
+ instance:AtivarInstancia()
+ else
+ instance.ativa = false
+ end
+
+ --> load data saved again
+ instance:LoadLocalInstanceConfig()
+
+ --> check window positioning
+ if (_detalhes.profile_save_pos) then
+ if (skin.__pos) then
+ instance.posicao = table_deepcopy (skin.__pos)
+ else
+ if (not instance.posicao) then
+ instance.posicao = {normal = {x = 1, y = 1, w = 300, h = 200}, solo = {}}
+ elseif (not instance.posicao.normal) then
+ instance.posicao.normal = {x = 1, y = 1, w = 300, h = 200}
+ end
+ end
+
+ instance.isLocked = skin.__locked
+ instance.snap = table_deepcopy (skin.__snap) or {}
+ instance.horizontalSnap = skin.__snapH
+ instance.verticalSnap = skin.__snapV
+ else
+ if (not instance.posicao) then
+ instance.posicao = {normal = {x = 1, y = 1, w = 300, h = 200}, solo = {}}
+ elseif (not instance.posicao.normal) then
+ instance.posicao.normal = {x = 1, y = 1, w = 300, h = 200}
+ end
+ end
+
+ --> open the instance
+ if (instance:IsEnabled()) then
+ instance:LockInstance (instance.isLocked)
+ instance:RestoreMainWindowPosition()
+ instance:ReajustaGump()
+ instance:SaveMainWindowPosition()
+ instance:ChangeSkin()
+ else
+ instance.skin = skin.skin
+ end
+
+ instances_loaded = instances_loaded + 1
end
- end
-
- for index, instance in ipairs (_detalhes.tabela_instancias) do
- local this_skin = saved_skins [index]
-
- if (this_skin) then
- if (not instance.iniciada and not _detalhes.initializing) then
- instance:RestauraJanela()
- instance:ApplySavedSkin (this_skin)
- instance:DesativarInstancia()
- elseif (instance.iniciada) then
- instance:ApplySavedSkin (this_skin)
+ --> move unused instances for unused container
+ if (#_detalhes.tabela_instancias > instances_loaded) then
+ for i = #_detalhes.tabela_instancias, instances_loaded+1, -1 do
+ _detalhes.unused_instances [i] = _detalhes.tabela_instancias [i]
+ _detalhes.tabela_instancias [i] = nil
end
end
+
+ --> check all snaps for invalid entries
+ for i = 1, instances_loaded do
+ local instance = _detalhes:GetInstance (i)
+ local previous_instance_id = _detalhes:GetInstance (i-1) and _detalhes:GetInstance (i-1):GetId() or 0
+ local next_instance_id = _detalhes:GetInstance (i+1) and _detalhes:GetInstance (i+1):GetId() or 0
+
+ for snap_side, instance_id in pairs (instance.snap) do
+ if (instance_id < 1) then --> invalid instance
+ instance.snap [snap_side] = nil
+ elseif (instance_id ~= previous_instance_id and instance_id ~= next_instance_id) then --> no match
+ instance.snap [snap_side] = nil
+ end
+ end
+ end
+
+ --> auto realign windows
+ if (not _detalhes.initializing) then
+ for _, instance in _detalhes:ListInstances() do
+ if (instance:IsEnabled()) then
+ _detalhes.move_janela_func (instance.baseframe, true, instance)
+ _detalhes.move_janela_func (instance.baseframe, false, instance)
+ end
+ end
+ end
+
end
+ --> check instance amount
+ _detalhes.opened_windows = 0
+ for index = 1, _detalhes.instances_amount do
+ local instance = _detalhes.tabela_instancias [index]
+ if (instance and instance.ativa) then
+ _detalhes.opened_windows = _detalhes.opened_windows + 1
+ end
+ end
+
--> end
-
- if (not is_copy) then
- _detalhes.active_profile = profile_name
- _detalhes_database.active_profile = profile_name
- --_detalhes:SaveProfile()
- end
-
+
return true
end
@@ -290,6 +437,12 @@ function _detalhes:SaveProfile (saveas)
for index, instance in ipairs (_detalhes.tabela_instancias) do
local exported = instance:ExportSkin()
+ exported.__was_opened = instance:IsEnabled()
+ exported.__pos = table_deepcopy (instance:GetPosition())
+ exported.__locked = instance.isLocked
+ exported.__snap = table_deepcopy (instance.snap)
+ exported.__snapH = instance.horizontalSnap
+ exported.__snapV = instance.verticalSnap
profile.instances [index] = exported
end
@@ -635,6 +788,8 @@ local default_player_data = {
RaidTablesSaved = {},
--> saved skins
savedStyles = {},
+ --> instance config
+ local_instances_config = {},
}
_detalhes.default_player_data = default_player_data
@@ -700,9 +855,11 @@ function _detalhes:SaveProfileSpecial()
--> save skins
table.wipe (profile.instances)
- for index, instance in ipairs (_detalhes.tabela_instancias) do
- local exported = instance:ExportSkin()
- profile.instances [index] = exported
+ if (_detalhes.tabela_instancias) then
+ for index, instance in ipairs (_detalhes.tabela_instancias) do
+ local exported = instance:ExportSkin()
+ profile.instances [index] = exported
+ end
end
--> end
diff --git a/functions/savedata.lua b/functions/savedata.lua
index 961dbe9d..c24a9726 100644
--- a/functions/savedata.lua
+++ b/functions/savedata.lua
@@ -18,14 +18,38 @@ local is_exception = {
["nick_tag_cache"] = true
}
+function _detalhes:SaveLocalInstanceConfig()
+ for index, instance in _detalhes:ListInstances() do
+ local a1, a2 = instance:GetDisplay()
+ _detalhes.local_instances_config [index] = {
+ pos = table_deepcopy (instance:GetPosition()),
+ is_open = instance:IsEnabled(),
+ attribute = a1,
+ sub_attribute = a2,
+ mode = instance:GetMode(),
+ segment = instance:GetSegment(),
+ snap = table_deepcopy (instance.snap),
+ horizontalSnap = instance.horizontalSnap,
+ verticalSnap = instance.verticalSnap,
+ sub_atributo_last = instance.sub_atributo_last,
+ isLocked = instance.isLocked
+ }
+
+ if (_detalhes.local_instances_config [index].isLocked == nil) then
+ _detalhes.local_instances_config [index].isLocked = false
+ end
+ end
+end
+
function _detalhes:SaveConfig()
- --> nicktag cache
- --_detalhes.copy_nick_tag = table_deepcopy (_detalhes_database.nick_tag_cache)
-
+ --> save instance configs localy
+ _detalhes:SaveLocalInstanceConfig()
+
--> cleanup
_detalhes:PrepareTablesForSave()
- _detalhes_database.tabela_instancias = _detalhes.tabela_instancias
+
+ _detalhes_database.tabela_instancias = {} --_detalhes.tabela_instancias --[[instances now saves only inside the profile --]]
_detalhes_database.tabela_historico = _detalhes.tabela_historico
local name, ttype, difficulty, difficultyName, maxPlayers, playerDifficulty, isDynamicInstance, mapID, instanceGroupSize = GetInstanceInfo()
diff --git a/gumps/janela_options.lua b/gumps/janela_options.lua
index 9b75eb2a..d4acf3a7 100644
--- a/gumps/janela_options.lua
+++ b/gumps/janela_options.lua
@@ -3739,8 +3739,7 @@ function window:CreateFrame13()
profile_create_button:SetPoint ("left", profile_name, "right", 2, 0)
window:CreateLineBackground2 (frame13, profile_name, profile_name_label, Loc ["STRING_OPTIONS_PROFILES_CREATE_DESC"])
-
-
+
--> copy profile
local profile_selectedCopy = function (_, instance, profile_name)
--copiar o profile
@@ -3836,12 +3835,15 @@ function window:CreateFrame13()
window:CreateLineBackground2 (frame13, profile_reset_button, hiddenlabel, Loc ["STRING_OPTIONS_PROFILES_RESET_DESC"])
--profile_reset_button.button.texture:SetVertexColor (1, .8, 0)
-
+
+ --> save window position within profile
+
g:NewLabel (frame13, _, "$parentSavePosAndSizeLabel", "PosAndSizeLabel", Loc ["STRING_OPTIONS_PROFILE_POSSIZE"], "GameFontHighlightLeft")
g:NewSwitch (frame13, _, "$parentPosAndSizeSlider", "PosAndSizeSlider", 60, 20, _, _, _detalhes.profile_save_pos)
frame13.PosAndSizeSlider:SetPoint ("left", frame13.PosAndSizeLabel, "right", 2, -1)
frame13.PosAndSizeSlider.OnSwitch = function (self, _, value)
_detalhes.profile_save_pos = value
+ _detalhes:SetProfileCProp (nil, "profile_save_pos", value)
end
frame13.PosAndSizeSlider:SetPoint ("left", frame13.PosAndSizeLabel, "right", 3, 0)
window:CreateLineBackground2 (frame13, "PosAndSizeSlider", "PosAndSizeLabel", Loc ["STRING_OPTIONS_PROFILE_POSSIZE_DESC"])
@@ -6182,13 +6184,13 @@ function window:CreateFrame9()
end
instance:InstanceWallpaper (true)
- _G.DetailsOptionsWindow9BackgroundDropdown.MyObject:Enable()
- _G.DetailsOptionsWindow9BackgroundDropdown2.MyObject:Enable()
+ --_G.DetailsOptionsWindow9BackgroundDropdown.MyObject:Enable()
+ --_G.DetailsOptionsWindow9BackgroundDropdown2.MyObject:Enable()
else
instance:InstanceWallpaper (false)
- _G.DetailsOptionsWindow9BackgroundDropdown.MyObject:Disable()
- _G.DetailsOptionsWindow9BackgroundDropdown2.MyObject:Disable()
+ --_G.DetailsOptionsWindow9BackgroundDropdown.MyObject:Disable()
+ --_G.DetailsOptionsWindow9BackgroundDropdown2.MyObject:Disable()
end
window:update_wallpaper_info()
@@ -7664,7 +7666,16 @@ function window:update_all (editing_instance)
_G.DetailsOptionsWindow19QuickClickDropdown.MyObject:Select (_detalhes.hotcorner_topleft.quickclick_what_todo)
_G.DetailsOptionsWindow19BrokerTextDropdown.MyObject:Select (_detalhes.minimap.text_type)
-
+ if (not _G.HotCorners) then
+ _G.DetailsOptionsWindow19HotcornerSlider.MyObject:Disable()
+ _G.DetailsOptionsWindow19HotcornerActionDropdown.MyObject:Disable()
+ _G.DetailsOptionsWindow19HotcornerQuickClickSlider.MyObject:Disable()
+ _G.DetailsOptionsWindow19QuickClickDropdown.MyObject:Disable()
+ if (not _G.DetailsOptionsWindow19HotcornerAnchor.MyObject:GetText():find ("not installed")) then
+ _G.DetailsOptionsWindow19HotcornerAnchor.MyObject:SetText (_G.DetailsOptionsWindow19HotcornerAnchor.MyObject:GetText() .. " |cFFFF5555(not installed)|r")
+ end
+ end
+
--> window 20
_G.DetailsOptionsWindow20TooltipTextColorPick.MyObject:SetColor (unpack (_detalhes.tooltip.fontcolor))
_G.DetailsOptionsWindow20TooltipTextSizeSlider.MyObject:SetValue (_detalhes.tooltip.fontsize)
diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua
index 9324f310..219077d9 100644
--- a/gumps/janela_principal.lua
+++ b/gumps/janela_principal.lua
@@ -60,7 +60,7 @@ end
-- 0.00048828125
- local DEFAULT_SKIN = [[Interface\AddOns\Details\images\skins\default_skin]]
+ local DEFAULT_SKIN = [[Interface\AddOns\Details\images\skins\classic_skin]]
--local COORDS_LEFT_BALL = {0.15673828125, 0.27978515625, 0.08251953125, 0.20556640625} -- 160 84 287 211 (updated)
--160 84 287 211
@@ -663,6 +663,7 @@ local function move_janela (baseframe, iniciando, instancia)
end
end
+_detalhes.move_janela_func = move_janela
local function BGFrame_scripts (BG, baseframe, instancia)
@@ -4518,7 +4519,7 @@ function _detalhes:ChangeSkin (skin_name)
local this_skin = _detalhes.skins [skin_name]
if (not this_skin) then
- skin_name = "Default Skin"
+ skin_name = "Minimalistic"
this_skin = _detalhes.skins [skin_name]
end
@@ -4530,6 +4531,7 @@ function _detalhes:ChangeSkin (skin_name)
if (not just_updating) then
--> skin updater
+ --print ("debug", self.meu_id, self.iniciada, self.baseframe, self.bgframe)
if (self.bgframe.skin_script) then
self.bgframe:SetScript ("OnUpdate", nil)
self.bgframe.skin_script = false
@@ -4588,6 +4590,7 @@ function _detalhes:ChangeSkin (skin_name)
local skin_file = this_skin.file
--> set textures
+
self.baseframe.cabecalho.ball:SetTexture (skin_file) --> bola esquerda
self.baseframe.cabecalho.emenda:SetTexture (skin_file) --> emenda que liga a bola a textura do centro
diff --git a/startup.lua b/startup.lua
index b6e0abb2..b83cde73 100644
--- a/startup.lua
+++ b/startup.lua
@@ -163,6 +163,10 @@ function _G._detalhes:Start()
instance:InstanceWallpaper (false)
end
end
+ if (instance:IsEnabled()) then
+ _detalhes.move_janela_func (instance.baseframe, true, instance)
+ _detalhes.move_janela_func (instance.baseframe, false, instance)
+ end
end
self.CheckWallpaperAfterStartup = nil
end
@@ -234,7 +238,7 @@ function _G._detalhes:Start()
self:ScheduleTimer ("ShowDelayMsg", 10)
--> send instance open signal
- for index, instancia in ipairs (self.tabela_instancias) do
+ for index, instancia in _detalhes:ListInstances() do
if (instancia.ativa) then
self:SendEvent ("DETAILS_INSTANCE_OPEN", nil, instancia)
end
@@ -259,7 +263,7 @@ function _G._detalhes:Start()
--> announce alpha version
function self:AnnounceVersion()
- for index, instancia in ipairs (self.tabela_instancias) do
+ for index, instancia in _detalhes:ListInstances() do
if (instancia.ativa) then
self.gump:Fade (instancia._version, "in", 0.1)
end
@@ -421,5 +425,33 @@ function _G._detalhes:Start()
_detalhes.schedule_chat_enter = _detalhes:ScheduleTimer ("EnterChatChannel", 30)
end
+ local f = CreateFrame ("frame", "DetailsSelectProfile", UIParent)
+ f:SetSize (250, 300)
+ f:SetPoint ("center", UIParent)
+ f:SetMovable (true)
+ f:SetScript ("OnMouseDown", function (self)
+ if (not self.moving) then
+ self:StartMoving()
+ self.moving = true
+ end
+ end)
+ f:SetScript ("OnMouseUp", function (self)
+ if (self.moving) then
+ self:StopMovingOrSizing()
+ self.moving = false
+ end
+ end)
+
+ local background = f:CreateTexture (nil, "background")
+ background:SetAllPoints()
+ background:SetTexture ([[Interface\AddOns\Details\images\welcome]])
+
+ local logo = f:CreateTexture (nil, "artwork")
+ logo:SetTexture ([[Interface\AddOns\Details\images\logotipo]])
+ logo:SetSize (256*0.8, 128*0.8)
+ logo:SetPoint ("center", f, "center", 0, 0)
+ logo:SetPoint ("top", f, "top", 20, 20)
+
+ f:Hide()
end