diff --git a/Details.toc b/Details.toc
index 080bf62a..ce1f5ca0 100644
--- a/Details.toc
+++ b/Details.toc
@@ -1,4 +1,4 @@
-## Interface: 70300
+## Interface: 80000
## Title: Details
## Notes: Computes detailed infos about combats.
## SavedVariables: _detalhes_global
diff --git a/Libs/AceComm-3.0/AceComm-3.0.lua b/Libs/AceComm-3.0/AceComm-3.0.lua
index 2fb637dc..87e55f8e 100644
--- a/Libs/AceComm-3.0/AceComm-3.0.lua
+++ b/Libs/AceComm-3.0/AceComm-3.0.lua
@@ -9,7 +9,7 @@
-- make into AceComm.
-- @class file
-- @name AceComm-3.0
--- @release $Id: AceComm-3.0.lua 1171 2018-04-20 07:33:22Z nevcairiel $
+-- @release $Id: AceComm-3.0.lua 1174 2018-05-14 17:29:49Z h.leppkes@gmail.com $
--[[ AceComm-3.0
@@ -20,7 +20,7 @@ TODO: Time out old data rotting around from dead senders? Not a HUGE deal since
local CallbackHandler = LibStub("CallbackHandler-1.0")
local CTL = assert(ChatThrottleLib, "AceComm-3.0 requires ChatThrottleLib")
-local MAJOR, MINOR = "AceComm-3.0", 11
+local MAJOR, MINOR = "AceComm-3.0", 12
local AceComm,oldminor = LibStub:NewLibrary(MAJOR, MINOR)
if not AceComm then return end
@@ -89,7 +89,7 @@ function AceComm:SendCommMessage(prefix, text, distribution, target, prio, callb
if not( type(prefix)=="string" and
type(text)=="string" and
type(distribution)=="string" and
- (target==nil or type(target)=="string") and
+ (target==nil or type(target)=="string" or type(target)=="number") and
(prio=="BULK" or prio=="NORMAL" or prio=="ALERT")
) then
error('Usage: SendCommMessage(addon, "prefix", "text", "distribution"[, "target"[, "prio"[, callbackFn, callbackarg]]])', 2)
diff --git a/Libs/CallbackHandler-1.0/CallbackHandler-1.0.xml b/Libs/CallbackHandler-1.0/CallbackHandler-1.0.xml
index 1aad3a2e..a5b22a75 100644
--- a/Libs/CallbackHandler-1.0/CallbackHandler-1.0.xml
+++ b/Libs/CallbackHandler-1.0/CallbackHandler-1.0.xml
@@ -1,4 +1,4 @@
-
\ No newline at end of file
+
diff --git a/Libs/DF/LibDFramework-1.0.toc b/Libs/DF/LibDFramework-1.0.toc
index a87fe1b9..b3137ad6 100644
--- a/Libs/DF/LibDFramework-1.0.toc
+++ b/Libs/DF/LibDFramework-1.0.toc
@@ -1,4 +1,4 @@
-## Interface: 70300
+## Interface: 80000
## Title: Lib: LibDFramework-1.0
## Notes: Base Framework for many Addons
diff --git a/Libs/DF/auras.lua b/Libs/DF/auras.lua
index 5009b74d..d71af62a 100644
--- a/Libs/DF/auras.lua
+++ b/Libs/DF/auras.lua
@@ -10,6 +10,98 @@ local GetSpellInfo = GetSpellInfo
local lower = string.lower
local GetSpellBookItemInfo = GetSpellBookItemInfo
+local CONST_MAX_SPELLS = 300000
+
+function DF:GetAuraByName (unit, spellName, isDebuff)
+ isDebuff = isDebuff and "HARMFUL|PLAYER"
+
+ for i = 1, 40 do
+ local name, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId, canApplyAura, isBossDebuff, isCastByPlayer, nameplateShowAll = UnitAura (unit, i, isDebuff)
+ if (not name) then
+ return
+ end
+
+ if (name == spellName) then
+ return name, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId, canApplyAura, isBossDebuff, isCastByPlayer, nameplateShowAll
+ end
+ end
+end
+
+local default_text_for_aura_frame = {
+ AUTOMATIC = "Automatic",
+ MANUAL = "Manual",
+ METHOD = "Aura Tracking Method:",
+ BUFFS_IGNORED = "Buffs Ignored",
+ DEBUFFS_IGNORED = "Debuffs Ignored",
+ BUFFS_TRACKED = "Buffs Tracked",
+ DEBUFFS_TRACKED = "Debuffs Tracked",
+
+ AUTOMATIC_DESC = "Auras are being tracked automatically, the addon controls what to show.\nYou may add auras to the blacklist or add extra auras to track.",
+ MANUAL_DESC = "Auras are being tracked manually, the addon only check for auras you entered below.",
+
+ MANUAL_ADD_BLACKLIST_BUFF = "Add Buff to Blacklist",
+ MANUAL_ADD_BLACKLIST_DEBUFF = "Add Debuff to Blacklist",
+ MANUAL_ADD_TRACKLIST_BUFF = "Add Buff to Tracklist",
+ MANUAL_ADD_TRACKLIST_DEBUFF = "Add Debuff to Tracklist",
+}
+
+function DF:LoadAllSpells (hashMap, indexTable)
+
+ --pre checking which tables to fill to avoid checking if the table exists during the gigantic loop for performance
+
+ if (not DF.LoadingAuraAlertFrame) then
+ DF.LoadingAuraAlertFrame = CreateFrame ("frame", "DetailsFrameworkLoadingAurasAlert", UIParent)
+ DF.LoadingAuraAlertFrame:SetSize (340, 75)
+ DF.LoadingAuraAlertFrame:SetPoint ("center")
+ DF.LoadingAuraAlertFrame:SetFrameStrata ("TOOLTIP")
+ DF:ApplyStandardBackdrop (DF.LoadingAuraAlertFrame)
+ DF.LoadingAuraAlertFrame:SetBackdropBorderColor (1, 0.8, 0.1)
+
+ DF.LoadingAuraAlertFrame.IsLoadingLabel1 = DF:CreateLabel (DF.LoadingAuraAlertFrame, "We are currently loading spell names and spell IDs")
+ DF.LoadingAuraAlertFrame.IsLoadingLabel2 = DF:CreateLabel (DF.LoadingAuraAlertFrame, "This may take only a few seconds")
+ DF.LoadingAuraAlertFrame.IsLoadingImage1 = DF:CreateImage (DF.LoadingAuraAlertFrame, [[Interface\DialogFrame\UI-Dialog-Icon-AlertOther]], 32, 32)
+ DF.LoadingAuraAlertFrame.IsLoadingLabel1.align = "center"
+ DF.LoadingAuraAlertFrame.IsLoadingLabel2.align = "center"
+
+ DF.LoadingAuraAlertFrame.IsLoadingLabel1:SetPoint ("center", 16, 10)
+ DF.LoadingAuraAlertFrame.IsLoadingLabel2:SetPoint ("center", 16, -5)
+ DF.LoadingAuraAlertFrame.IsLoadingImage1:SetPoint ("left", 10, 0)
+ end
+
+ DF.LoadingAuraAlertFrame:Show()
+
+ C_Timer.After (0.1, function()
+ if (hashMap and not indexTable) then
+ for i = 1, CONST_MAX_SPELLS do
+ local spellName = GetSpellInfo (i)
+ if (spellName) then
+ hashMap [lower (spellName)] = i
+ end
+ end
+
+ elseif (not hashMap and indexTable) then
+ for i = 1, CONST_MAX_SPELLS do
+ local spellName = GetSpellInfo (i)
+ if (spellName) then
+ indexTable [#indexTable+1] = lower (spellName)
+ end
+ end
+
+ elseif (hashMap and indexTable) then
+ for i = 1, CONST_MAX_SPELLS do
+ local spellName = GetSpellInfo (i)
+ if (spellName) then
+ indexTable [#indexTable+1] = lower (spellName)
+ hashMap [indexTable [#indexTable]] = i
+ end
+ end
+ end
+
+ DF.LoadingAuraAlertFrame:Hide()
+ end)
+
+end
+
local cleanfunction = function() end
do
@@ -32,10 +124,13 @@ local on_profile_changed = function (self, newdb)
--automatic
self.buff_ignored:SetData (newdb.aura_tracker.buff_banned)
self.debuff_ignored:SetData (newdb.aura_tracker.debuff_banned)
- self.buff_available:Refresh()
+ self.buff_tracked:SetData (newdb.aura_tracker.buff_tracked)
+ self.debuff_tracked:SetData (newdb.aura_tracker.debuff_tracked)
+
self.buff_ignored:Refresh()
- self.debuff_available:Refresh()
self.debuff_ignored:Refresh()
+ self.buff_tracked:Refresh()
+ self.debuff_tracked:Refresh()
--manual
self.buffs_added:SetData (newdb.aura_tracker.buff)
@@ -47,18 +142,29 @@ local on_profile_changed = function (self, newdb)
if (newdb.aura_tracker.track_method == 0x1) then
self.f_auto:Show()
self.f_manual:Hide()
+
+ self.AutomaticTrackingCheckbox:SetValue (true)
+ self.ManualTrackingCheckbox:SetValue (false)
+ self.desc_label.text = texts.AUTOMATIC_DESC
+
elseif (newdb.aura_tracker.track_method == 0x2) then
self.f_auto:Hide()
self.f_manual:Show()
+
+ self.AutomaticTrackingCheckbox:SetValue (false)
+ self.ManualTrackingCheckbox:SetValue (true)
+ self.desc_label.text = texts.MANUAL_DESC
end
end
local aura_panel_defaultoptions = {
height = 400,
- row_height = 16,
+ row_height = 18,
width = 230,
+ button_text_template = "OPTIONS_FONT_TEMPLATE"
}
-function DF:CreateAuraConfigPanel (parent, name, db, method_change_callback, options)
+
+function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, texts)
local options_text_template = DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")
local options_dropdown_template = DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
@@ -81,155 +187,412 @@ function DF:CreateAuraConfigPanel (parent, name, db, method_change_callback, opt
f.f_auto = f_auto
f.f_manual = f_manual
- local on_select_tracking_option = function (_, _, method)
+ --check if the texts table is valid and also deploy default values into the table in case some value is nil
+ texts = (type (texts == "table") and texts) or default_text_for_aura_frame
+ DF.table.deploy (texts, default_text_for_aura_frame)
+
+ -------------
+
+ local on_switch_tracking_method = function (self)
+ local method = self.Method
+
f.db.aura_tracker.track_method = method
- if (method_change_callback) then
- method_change_callback (self, method)
+ if (change_callback) then
+ DF:QuickDispatch (change_callback)
end
if (method == 0x1) then
f_auto:Show()
f_manual:Hide()
- f.desc_label.text = "Auras are being tracked automatically, the addon controls what to show. You may entry an aura to ignore.\nCast spells to fill the Buff and Buff available boxes."
- f.desc_label:SetPoint ("topleft", f.tracking_method, "topright", 10, 8)
+ f.AutomaticTrackingCheckbox:SetValue (true)
+ f.ManualTrackingCheckbox:SetValue (false)
+ f.desc_label.text = texts.AUTOMATIC_DESC
+
elseif (method == 0x2) then
f_auto:Hide()
f_manual:Show()
- f.desc_label.text = "Auras are being tracked manually, the addon only check for auras you entered below."
- f.desc_label:SetPoint ("topleft", f.tracking_method, "topright", 10, 1)
+ f.AutomaticTrackingCheckbox:SetValue (false)
+ f.ManualTrackingCheckbox:SetValue (true)
+ f.desc_label.text = texts.MANUAL_DESC
end
end
- local tracking_options = function()
- return {
- {label = "Automatic", value = 0x1, onclick = on_select_tracking_option, desc = "Show all your auras by default, you can exclude those you don't want to show."},
- {label = "Manual", value = 0x2, onclick = on_select_tracking_option, desc = "Do not show any aura by default, you need to manually add each aura you want to track."},
- }
- end
+ local background_method_selection = CreateFrame ("frame", nil, f)
+ background_method_selection:SetHeight (82)
+ background_method_selection:SetPoint ("topleft", f, "topleft", 0, 0)
+ background_method_selection:SetPoint ("topright", f, "topright", 0, 0)
+ DF:ApplyStandardBackdrop (background_method_selection)
- local tracking_method_label = self:CreateLabel (f, "Tracking Aura Method:", 12, "orange")
- local tracking_method = self:CreateDropDown (f, tracking_options, f.db.aura_tracker.track_method, 120, 20, "dropdown_tracking_method", _, self:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
-
- tracking_method_label:SetPoint ("topleft", f, "topleft", 10, -10)
- tracking_method:SetPoint ("left", tracking_method_label, "right", 2, 0)
- tracking_method:SetFrameStrata ("tooltip")
- tracking_method.tooltip = "Choose which aura tracking method you want to use."
- f.tracking_method = tracking_method
-
- f.desc_label = self:CreateLabel (f, "", 10, "silver")
- f.desc_label:SetSize (400, 40)
- f.desc_label:SetPoint ("topleft", tracking_method, "topright", 10, 8)
- f.desc_label:SetJustifyV ("top")
+ local tracking_method_label = self:CreateLabel (background_method_selection, texts.METHOD, 12, "orange")
+ tracking_method_label:SetPoint ("topleft", background_method_selection, "topleft", 6, -4)
---------automatic
+ f.desc_label = self:CreateLabel (background_method_selection, "", 10, "silver")
+ f.desc_label:SetPoint ("left", background_method_selection, "left", 130, 0)
+ f.desc_label:SetJustifyV ("top")
+
+ local automatic_tracking_checkbox = DF:CreateSwitch (background_method_selection, on_switch_tracking_method, f.db.aura_tracker.track_method == 0x1, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, DF:GetTemplate ("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"))
+ automatic_tracking_checkbox.Method = 0x1
+ automatic_tracking_checkbox:SetAsCheckBox()
+ automatic_tracking_checkbox:SetSize (24, 24)
+ f.AutomaticTrackingCheckbox = automatic_tracking_checkbox
+
+ local automatic_tracking_label = DF:CreateLabel (background_method_selection, "Automatic")
+ automatic_tracking_label:SetPoint ("left", automatic_tracking_checkbox, "right", 2, 0)
+
+ local manual_tracking_checkbox = DF:CreateSwitch (background_method_selection, on_switch_tracking_method, f.db.aura_tracker.track_method == 0x2, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, DF:GetTemplate ("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE"))
+ manual_tracking_checkbox.Method = 0x2
+ manual_tracking_checkbox:SetAsCheckBox()
+ manual_tracking_checkbox:SetSize (24, 24)
+ f.ManualTrackingCheckbox = manual_tracking_checkbox
+
+ local manual_tracking_label = DF:CreateLabel (background_method_selection, "Manual")
+ manual_tracking_label:SetPoint ("left", manual_tracking_checkbox, "right", 2, 0)
+
+ automatic_tracking_checkbox:SetPoint ("topleft", tracking_method_label, "bottomleft", 0, -6)
+ manual_tracking_checkbox:SetPoint ("topleft", automatic_tracking_checkbox, "bottomleft", 0, -6)
+
+
+-------- anchors points
+
+ local y = -110
+ local xLocation = 230
+
+
+-------- automatic
+
+ --manual add the buff and ebuff names
+ local AllSpellsMap = {}
+ local AllSpellNames = {}
+
+ local load_all_spells = function (self, capsule)
+ if (not next (AllSpellsMap)) then
+ DF:LoadAllSpells (AllSpellsMap, AllSpellNames)
+
+ f_auto.AddBuffBlacklistTextBox.SpellAutoCompleteList = AllSpellNames
+ f_auto.AddDebuffBlacklistTextBox.SpellAutoCompleteList = AllSpellNames
+ f_auto.AddBuffTracklistTextBox.SpellAutoCompleteList = AllSpellNames
+ f_auto.AddDebuffTracklistTextBox.SpellAutoCompleteList = AllSpellNames
+
+ f_manual.NewBuffTextBox.SpellAutoCompleteList = AllSpellNames
+ f_manual.NewDebuffTextBox.SpellAutoCompleteList = AllSpellNames
+
+ --
+
+ f_auto.AddBuffBlacklistTextBox:SetAsAutoComplete ("SpellAutoCompleteList")
+ f_auto.AddDebuffBlacklistTextBox:SetAsAutoComplete ("SpellAutoCompleteList")
+ f_auto.AddBuffTracklistTextBox:SetAsAutoComplete ("SpellAutoCompleteList")
+ f_auto.AddDebuffTracklistTextBox:SetAsAutoComplete ("SpellAutoCompleteList")
+
+ f_manual.NewBuffTextBox:SetAsAutoComplete ("SpellAutoCompleteList")
+ f_manual.NewDebuffTextBox:SetAsAutoComplete ("SpellAutoCompleteList")
+
+ --
+
+ f_auto.AddBuffBlacklistTextBox.ShouldOptimizeAutoComplete = true
+ f_auto.AddDebuffBlacklistTextBox.ShouldOptimizeAutoComplete = true
+ f_auto.AddBuffTracklistTextBox.ShouldOptimizeAutoComplete = true
+ f_auto.AddDebuffTracklistTextBox.ShouldOptimizeAutoComplete = true
+
+ f_manual.NewBuffTextBox.ShouldOptimizeAutoComplete = true
+ f_manual.NewDebuffTextBox.ShouldOptimizeAutoComplete = true
+ end
+ end
+
+ local background_add_blacklist = CreateFrame ("frame", nil, f_auto)
+ background_add_blacklist:SetSize (220, 135)
+ DF:ApplyStandardBackdrop (background_add_blacklist)
+
+ local background_add_tracklist = CreateFrame ("frame", nil, f_auto)
+ background_add_tracklist:SetSize (220, 135)
+ DF:ApplyStandardBackdrop (background_add_tracklist)
+
+ --black list
+ local buff_blacklist_label = self:CreateLabel (background_add_blacklist, texts.MANUAL_ADD_BLACKLIST_BUFF, DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
+ local debuff_blacklist_label = self:CreateLabel (background_add_blacklist, texts.MANUAL_ADD_BLACKLIST_DEBUFF, DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
+
+ local buff_name_blacklist_entry = self:CreateTextEntry (background_add_blacklist, function()end, 200, 20, "AddBuffBlacklistTextBox", _, _, options_dropdown_template)
+ buff_name_blacklist_entry:SetHook ("OnEditFocusGained", load_all_spells)
+ buff_name_blacklist_entry:SetJustifyH ("left")
+ buff_name_blacklist_entry.tooltip = "Enter the buff name using lower case letters."
+ f_auto.AddBuffBlacklistTextBox = buff_name_blacklist_entry
+
+ local debuff_name_blacklist_entry = self:CreateTextEntry (background_add_blacklist, function()end, 200, 20, "AddDebuffBlacklistTextBox", _, _, options_dropdown_template)
+ debuff_name_blacklist_entry:SetHook ("OnEditFocusGained", load_all_spells)
+ debuff_name_blacklist_entry:SetJustifyH ("left")
+ debuff_name_blacklist_entry.tooltip = "Enter the debuff name using lower case letters."
+ f_auto.AddDebuffBlacklistTextBox = debuff_name_blacklist_entry
+
+ local add_blacklist_buff_button = self:CreateButton (background_add_blacklist, function()
+ local text = buff_name_blacklist_entry.text
+ buff_name_blacklist_entry:SetText ("")
+ buff_name_blacklist_entry:ClearFocus()
+
+ if (text ~= "") then
+ text = lower (text)
+
+ --get the spellId
+ local spellId = AllSpellsMap [text]
+ if (not spellId) then
+ print ("spell not found")
+ return
+ end
+
+ --add the spellId to the blacklist
+ f.db.aura_tracker.buff_banned [spellId] = true
+
+ --refresh the buff blacklist frame
+ _G [f_auto:GetName() .. "BuffIgnored"]:Refresh()
+
+ DF:QuickDispatch (change_callback)
+ end
+
+ end, 100, 20, "Add to Blacklist", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate ("font", options.button_text_template))
+
+ local add_blacklist_debuff_button = self:CreateButton (background_add_blacklist, function()
+ local text = debuff_name_blacklist_entry.text
+ debuff_name_blacklist_entry:SetText ("")
+ debuff_name_blacklist_entry:ClearFocus()
+
+ if (text ~= "") then
+ text = lower (text)
+
+ --get the spellId
+ local spellId = AllSpellsMap [text]
+ if (not spellId) then
+ print ("spell not found")
+ return
+ end
+
+ --add the spellId to the blacklist
+ f.db.aura_tracker.debuff_banned [spellId] = true
+
+ --refresh the buff blacklist frame
+ _G [f_auto:GetName() .. "DebuffIgnored"]:Refresh()
+
+ DF:QuickDispatch (change_callback)
+ end
+ end, 100, 20, "Add to Blacklist", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate ("font", options.button_text_template))
+
+
+ --track list
+ local buff_tracklist_label = self:CreateLabel (background_add_tracklist, texts.MANUAL_ADD_TRACKLIST_BUFF, DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
+ local debuff_tracklist_label = self:CreateLabel (background_add_tracklist, texts.MANUAL_ADD_TRACKLIST_DEBUFF, DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
+
+ local buff_name_tracklist_entry = self:CreateTextEntry (background_add_tracklist, function()end, 200, 20, "AddBuffTracklistTextBox", _, _, options_dropdown_template)
+ buff_name_tracklist_entry:SetHook ("OnEditFocusGained", load_all_spells)
+ buff_name_tracklist_entry:SetJustifyH ("left")
+ buff_name_tracklist_entry.tooltip = "Enter the buff name using lower case letters."
+ f_auto.AddBuffTracklistTextBox = buff_name_tracklist_entry
+
+ local debuff_name_tracklist_entry = self:CreateTextEntry (background_add_tracklist, function()end, 200, 20, "AddDebuffTracklistTextBox", _, _, options_dropdown_template)
+ debuff_name_tracklist_entry:SetHook ("OnEditFocusGained", load_all_spells)
+ debuff_name_tracklist_entry:SetJustifyH ("left")
+ debuff_name_tracklist_entry.tooltip = "Enter the debuff name using lower case letters."
+ f_auto.AddDebuffTracklistTextBox = debuff_name_tracklist_entry
+
+ local add_tracklist_buff_button = self:CreateButton (background_add_tracklist, function()
+ local text = buff_name_tracklist_entry.text
+ buff_name_tracklist_entry:SetText ("")
+ buff_name_tracklist_entry:ClearFocus()
+
+ if (text ~= "") then
+ text = lower (text)
+
+ --get the spellId
+ local spellId = AllSpellsMap [text]
+ if (not spellId) then
+ print ("spell not found")
+ return
+ end
+
+ --add the spellId to the blacklist
+ f.db.aura_tracker.buff_tracked [spellId] = true
+
+ --refresh the buff blacklist frame
+ _G [f_auto:GetName() .. "BuffTracked"]:Refresh()
+
+ DF:QuickDispatch (change_callback)
+ end
+
+ end, 100, 20, "Add to Tracklist", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate ("font", options.button_text_template))
+
+ local add_tracklist_debuff_button = self:CreateButton (background_add_tracklist, function()
+ local text = debuff_name_tracklist_entry.text
+ debuff_name_tracklist_entry:SetText ("")
+ debuff_name_tracklist_entry:ClearFocus()
+
+ if (text ~= "") then
+ text = lower (text)
+
+ --get the spellId
+ local spellId = AllSpellsMap [text]
+ if (not spellId) then
+ print ("spell not found")
+ return
+ end
+
+ --add the spellId to the blacklist
+ f.db.aura_tracker.debuff_tracked [spellId] = true
+
+ --refresh the buff blacklist frame
+ _G [f_auto:GetName() .. "DebuffTracked"]:Refresh()
+
+ DF:QuickDispatch (change_callback)
+ end
+ end, 100, 20, "Add to Tracklist", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate ("font", options.button_text_template))
+
+ --anchors:
+ background_add_blacklist:SetPoint ("topleft", f_auto, "topleft", 0, y)
+ background_add_tracklist:SetPoint ("topleft", background_add_blacklist, "bottomleft", 0, -10)
+
+ --debuff blacklist
+ debuff_name_blacklist_entry:SetPoint ("topleft", background_add_blacklist, "topleft", 4, -20)
+ debuff_blacklist_label:SetPoint ("bottomleft", debuff_name_blacklist_entry, "topleft", 0, 2)
+ add_blacklist_debuff_button:SetPoint ("topleft", debuff_name_blacklist_entry, "bottomleft", 0, -2)
+
+ --buff blacklist
+ buff_blacklist_label:SetPoint ("topleft", add_blacklist_debuff_button.widget, "bottomleft", 0, -10)
+ buff_name_blacklist_entry:SetPoint ("topleft", buff_blacklist_label, "bottomleft", 0, -2)
+ add_blacklist_buff_button:SetPoint ("topleft", buff_name_blacklist_entry, "bottomleft", 0, -2)
+
+
+ --debuff tracklist
+ debuff_name_tracklist_entry:SetPoint ("topleft", background_add_tracklist, "topleft", 4, -20)
+ debuff_tracklist_label:SetPoint ("bottomleft", debuff_name_tracklist_entry, "topleft", 0, 2)
+ add_tracklist_debuff_button:SetPoint ("topleft", debuff_name_tracklist_entry, "bottomleft", 0, -2)
+
+ --buff tracklist
+ buff_tracklist_label:SetPoint ("topleft", add_tracklist_debuff_button.widget, "bottomleft", 0, -10)
+ buff_name_tracklist_entry:SetPoint ("topleft", buff_tracklist_label, "bottomleft", 0, -2)
+ add_tracklist_buff_button:SetPoint ("topleft", buff_name_tracklist_entry, "bottomleft", 0, -2)
local ALL_BUFFS = {}
local ALL_DEBUFFS = {}
+ --options passed to the create aura panel
local width, height, row_height = options.width, options.height, options.row_height
-
- local buff_ignored = self:CreateSimpleListBox (f_auto, "$parentBuffIgnored", "Buffs Ignored", "The list is empty, select a spell from the buff list to ignore it.", f.db.aura_tracker.buff_banned,
- function (spellid)
- f.db.aura_tracker.buff_banned [spellid] = nil;
- end,
- {
- icon = function(spellid) return select (3, GetSpellInfo (spellid)) end,
- text = function(spellid) return select (1, GetSpellInfo (spellid)) end,
- height = height,
- row_height = row_height,
- width = width,
- onenter = function(self, capsule, value) GameTooltip:SetOwner (self, "ANCHOR_RIGHT"); GameTooltip:SetSpellByID(value); GameTooltip:AddLine (" "); GameTooltip:AddLine ("Click to un-ignore this aura", .2, 1, .2); GameTooltip:Show() end,
- })
- local buff_available = self:CreateSimpleListBox (f_auto, "$parentBuffAvailable", "Buffs Available", "The list is empty, cast spells to fill it", ALL_BUFFS, function (spellid)
- f.db.aura_tracker.buff_banned [spellid] = true; buff_ignored:Refresh()
- end,
- {
- icon = function(spellid) return select (3, GetSpellInfo (spellid)) end,
- text = function(spellid) return select (1, GetSpellInfo (spellid)) end,
- height = height,
- row_height = row_height,
- width = width,
- onenter = function(self, capsule, value) GameTooltip:SetOwner (self, "ANCHOR_RIGHT"); GameTooltip:SetSpellByID(value); GameTooltip:AddLine (" "); GameTooltip:AddLine ("Click to ignore this aura", .2, 1, .2); GameTooltip:Show() end,
- })
- local debuff_ignored = self:CreateSimpleListBox (f_auto, "$parentDebuffIgnored", "Debuffs Ignored", "The list is empty, select a spell from the debuff list to ignore it.", f.db.aura_tracker.debuff_banned, function (spellid)
- f.db.aura_tracker.debuff_banned [spellid] = nil;
- end,
- {
- icon = function(spellid) return select (3, GetSpellInfo (spellid)) end,
- text = function(spellid) return select (1, GetSpellInfo (spellid)) end,
- height = height,
- row_height = row_height,
- width = width,
- onenter = function(self, capsule, value) GameTooltip:SetOwner (self, "ANCHOR_RIGHT"); GameTooltip:SetSpellByID(value); GameTooltip:AddLine (" "); GameTooltip:AddLine ("Click to un-ignore this aura", .2, 1, .2); GameTooltip:Show() end,
- })
-
- local debuff_available = self:CreateSimpleListBox (f_auto, "$parentDebuffAvailable", "Debuffs Available", "The list is empty, cast spells to fill it", ALL_DEBUFFS, function (spellid)
- f.db.aura_tracker.debuff_banned [spellid] = true; debuff_ignored:Refresh()
- end, {
- icon = function(spellid) return select (3, GetSpellInfo (spellid)) end,
- text = function(spellid) return select (1, GetSpellInfo (spellid)) end,
- height = height,
- row_height = row_height,
- width = width,
- onenter = function(self, capsule, value) GameTooltip:SetOwner (self, "ANCHOR_RIGHT"); GameTooltip:SetSpellByID(value); GameTooltip:AddLine (" "); GameTooltip:AddLine ("Click to ignore this aura", .2, 1, .2); GameTooltip:Show() end,
- })
-
- --como ira preencher ela no inicio e como ficara o lance dos profiles
+ --Debuffs on the black list
+ local debuff_ignored = self:CreateSimpleListBox (f_auto, "$parentDebuffIgnored", texts.DEBUFFS_IGNORED, "the list is empty", f.db.aura_tracker.debuff_banned, function (spellid)
+ --f.db.aura_tracker.debuff_banned [spellid] = nil; DF:QuickDispatch (change_callback);
+ end,
+ {
+ icon = function(spellid) return select (3, GetSpellInfo (spellid)) end,
+ text = function(spellid) return select (1, GetSpellInfo (spellid)) end,
+ height = height,
+ row_height = row_height,
+ width = width,
+ backdrop_color = {.8, .8, .8, 0.2},
+ panel_border_color = {.01, 0, 0, 1},
+ iconcoords = {.1, .9, .1, .9},
+ onenter = function(self, capsule, value) GameTooltip:SetOwner (self, "ANCHOR_RIGHT"); GameTooltip:SetSpellByID(value); GameTooltip:AddLine (" "); GameTooltip:Show() end,
+ show_x_button = true,
+ x_button_func = function (spellId)
+ f.db.aura_tracker.debuff_banned [spellId] = nil; DF:QuickDispatch (change_callback);
+ end,
+ })
+
+ --Buffs on the black list
+ local buff_ignored = self:CreateSimpleListBox (f_auto, "$parentBuffIgnored", texts.BUFFS_IGNORED, "the list is empty", f.db.aura_tracker.buff_banned,
+ function (spellid)
+ --f.db.aura_tracker.buff_banned [spellid] = nil; DF:QuickDispatch (change_callback);
+ end,
+ {
+ icon = function(spellid) return select (3, GetSpellInfo (spellid)) end,
+ text = function(spellid) return select (1, GetSpellInfo (spellid)) end,
+ height = height,
+ row_height = row_height,
+ width = width,
+ backdrop_color = {.8, .8, .8, 0.2},
+ panel_border_color = {.02, 0, 0, 1},
+ iconcoords = {.1, .9, .1, .9},
+ onenter = function(self, capsule, value) GameTooltip:SetOwner (self, "ANCHOR_RIGHT"); GameTooltip:SetSpellByID(value); GameTooltip:AddLine (" "); GameTooltip:Show() end,
+ show_x_button = true,
+ x_button_func = function (spellId)
+ f.db.aura_tracker.buff_banned [spellId] = nil; DF:QuickDispatch (change_callback);
+ end,
+ })
+
+ --Debuffs on the track list
+ local debuff_tracked = self:CreateSimpleListBox (f_auto, "$parentDebuffTracked", texts.DEBUFFS_TRACKED, "the list is empty", f.db.aura_tracker.debuff_tracked, function (spellid)
+ --f.db.aura_tracker.debuff_tracked [spellid] = nil; DF:QuickDispatch (change_callback);
+ end,
+ {
+ icon = function(spellid) return select (3, GetSpellInfo (spellid)) end,
+ text = function(spellid) return select (1, GetSpellInfo (spellid)) end,
+ height = height,
+ row_height = row_height,
+ width = width,
+ backdrop_color = {.8, .8, .8, 0.2},
+ panel_border_color = {0, .02, 0, 1},
+ iconcoords = {.1, .9, .1, .9},
+ onenter = function(self, capsule, value) GameTooltip:SetOwner (self, "ANCHOR_RIGHT"); GameTooltip:SetSpellByID(value); GameTooltip:AddLine (" "); GameTooltip:Show() end,
+ show_x_button = true,
+ x_button_func = function (spellId)
+ f.db.aura_tracker.debuff_tracked [spellId] = nil; DF:QuickDispatch (change_callback);
+ end,
+ })
+
+ --Buffs on the track list
+ local buff_tracked = self:CreateSimpleListBox (f_auto, "$parentBuffTracked", texts.BUFFS_TRACKED, "the list is empty", f.db.aura_tracker.buff_tracked, function (spellid)
+ --f.db.aura_tracker.buff_tracked [spellid] = nil; DF:QuickDispatch (change_callback);
+ end,
+ {
+ icon = function(spellid) return select (3, GetSpellInfo (spellid)) end,
+ text = function(spellid) return select (1, GetSpellInfo (spellid)) end,
+ height = height,
+ row_height = row_height,
+ width = width,
+ backdrop_color = {.8, .8, .8, 0.2},
+ panel_border_color = {0, .01, 0, 1},
+ iconcoords = {.1, .9, .1, .9},
+ onenter = function(self, capsule, value) GameTooltip:SetOwner (self, "ANCHOR_RIGHT"); GameTooltip:SetSpellByID(value); GameTooltip:AddLine (" "); GameTooltip:Show() end,
+ show_x_button = true,
+ x_button_func = function (spellId)
+ f.db.aura_tracker.buff_tracked [spellId] = nil; DF:QuickDispatch (change_callback);
+ end,
+ })
+
+ debuff_ignored:SetPoint ("topleft", f_auto, "topleft", 0 + xLocation, y)
+ buff_ignored:SetPoint ("topleft", f_auto, "topleft", 8 + width + xLocation, y)
+ debuff_tracked:SetPoint ("topleft", f_auto, "topleft", 16 + (width*2) + xLocation, y)
+ buff_tracked:SetPoint ("topleft", f_auto, "topleft", 24 + (width*3) + xLocation, y)
- local y = -40
- buff_available:SetPoint ("topleft", f_auto, "topleft", 0, y)
- buff_ignored:SetPoint ("topleft", f_auto, "topleft", 6 + width, y)
- debuff_available:SetPoint ("topleft", f_auto, "topleft", 12 + (width*2), y)
- debuff_ignored:SetPoint ("topleft", f_auto, "topleft", 18 + (width*3), y)
-
- f.buff_available = buff_available
f.buff_ignored = buff_ignored
- f.debuff_available = debuff_available
f.debuff_ignored = debuff_ignored
+ f.buff_tracked = buff_tracked
+ f.debuff_tracked = debuff_tracked
- local readCombatLog = CreateFrame ("frame", nil, f_auto)
- readCombatLog:SetScript ("OnEvent", function (self, event, time, token, hidding, sourceGUID, sourceName, sourceFlag, sourceFlag2, targetGUID, targetName, targetFlag, targetFlag2, spellid, spellname, spellschool, auraType, amount)
- if (auraType == "BUFF" and sourceGUID == readCombatLog.playerGUID) then
- if (not ALL_BUFFS [spellid]) then
- ALL_BUFFS [spellid] = true
- buff_available:Refresh()
- end
- elseif (auraType == "DEBUFF" and sourceGUID == readCombatLog.playerGUID) then
- if (not ALL_DEBUFFS [spellid]) then
- ALL_DEBUFFS [spellid] = true
- debuff_available:Refresh()
- end
- end
- end)
-
f_auto:SetScript ("OnShow", function()
for i = 1, BUFF_MAX_DISPLAY do
- local name, rank, texture, count, debuffType, duration, expirationTime, caster, _, nameplateShowPersonal, spellId, _, _, _, nameplateShowAll = UnitAura ("player", i, "HELPFUL")
+ local name, texture, count, debuffType, duration, expirationTime, caster, _, nameplateShowPersonal, spellId, _, _, _, nameplateShowAll = UnitAura ("player", i, "HELPFUL")
if (name) then
ALL_BUFFS [spellId] = true
end
- local name, rank, texture, count, debuffType, duration, expirationTime, caster, _, nameplateShowPersonal, spellId, _, _, _, nameplateShowAll = UnitAura ("player", i, "HARMFUL")
+ local name, texture, count, debuffType, duration, expirationTime, caster, _, nameplateShowPersonal, spellId, _, _, _, nameplateShowAll = UnitAura ("player", i, "HARMFUL")
if (name) then
ALL_DEBUFFS [spellId] = true
end
end
- buff_available:Refresh()
- buff_ignored:Refresh()
- debuff_available:Refresh()
+ buff_tracked:Refresh()
+ debuff_tracked:Refresh()
+ buff_ignored:Refresh()
debuff_ignored:Refresh()
- readCombatLog.playerGUID = UnitGUID ("player")
- readCombatLog:RegisterEvent ("COMBAT_LOG_EVENT_UNFILTERED")
end)
f_auto:SetScript ("OnHide", function()
- readCombatLog:UnregisterEvent ("COMBAT_LOG_EVENT_UNFILTERED")
+ --
end)
-
+
--show the frame selecton on the f.db
- on_select_tracking_option (_, _, f.db.aura_tracker.track_method)
+
+ if (f.db.aura_tracker.track_method == 0x1) then
+ on_switch_tracking_method (automatic_tracking_checkbox)
+ elseif (f.db.aura_tracker.track_method == 0x2) then
+ on_switch_tracking_method (manual_tracking_checkbox)
+ end
-------manual
@@ -250,7 +613,6 @@ function DF:CreateAuraConfigPanel (parent, name, db, method_change_callback, opt
GameTooltip:SetOwner (self, "ANCHOR_RIGHT");
GameTooltip:SetSpellByID (spellid)
GameTooltip:AddLine (" ")
- GameTooltip:AddLine ("Click to untrack this aura", .2, 1, .2)
GameTooltip:Show()
end
end
@@ -259,9 +621,10 @@ function DF:CreateAuraConfigPanel (parent, name, db, method_change_callback, opt
self:SetBackdropColor (unpack (backdrop_color))
GameTooltip:Hide()
end
- local line_onclick = function (self)
- local spell = self.value
- local data = self:GetParent():GetData()
+
+ local onclick_remove_button = function (self)
+ local spell = self:GetParent().value
+ local data = self:GetParent():GetParent():GetData()
for i = 1, #data do
if (data[i] == spell) then
@@ -270,27 +633,36 @@ function DF:CreateAuraConfigPanel (parent, name, db, method_change_callback, opt
end
end
- self:GetParent():Refresh()
+ self:GetParent():GetParent():Refresh()
end
local scroll_createline = function (self, index)
local line = CreateFrame ("button", "$parentLine" .. index, self)
- line:SetPoint ("topleft", self, "topleft", 0, -((index-1)*(scroll_line_height+1)))
- line:SetSize (scroll_width, scroll_line_height)
+ line:SetPoint ("topleft", self, "topleft", 1, -((index-1)*(scroll_line_height+1)) - 1)
+ line:SetSize (scroll_width - 2, scroll_line_height)
line:SetScript ("OnEnter", line_onenter)
line:SetScript ("OnLeave", line_onleave)
- line:SetScript ("OnClick", line_onclick)
line:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
line:SetBackdropColor (unpack (backdrop_color))
local icon = line:CreateTexture ("$parentIcon", "overlay")
- icon:SetSize (scroll_line_height, scroll_line_height)
+ icon:SetSize (scroll_line_height - 2, scroll_line_height - 2)
+
local name = line:CreateFontString ("$parentName", "overlay", "GameFontNormal")
+
+ local remove_button = CreateFrame ("button", "$parentRemoveButton", line, "UIPanelCloseButton")
+ remove_button:SetSize (16, 16)
+ remove_button:SetScript ("OnClick", onclick_remove_button)
+ remove_button:SetPoint ("topright", line, "topright")
+ remove_button:GetNormalTexture():SetDesaturated (true)
+
icon:SetPoint ("left", line, "left", 2, 0)
name:SetPoint ("left", icon, "right", 2, 0)
+
line.icon = icon
line.name = name
+ line.removebutton = remove_button
return line
end
@@ -306,6 +678,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, method_change_callback, opt
if (name) then
line.name:SetText (name)
line.icon:SetTexture (icon)
+ line.icon:SetTexCoord (.1, .9, .1, .9)
else
line.name:SetText (aura)
line.icon:SetTexture ([[Interface\InventoryItems\WoWUnknownItem01]])
@@ -316,18 +689,16 @@ function DF:CreateAuraConfigPanel (parent, name, db, method_change_callback, opt
local buffs_added = self:CreateScrollBox (f_manual, "$parentBuffsAdded", scroll_refresh, f.db.aura_tracker.buff, scroll_width, scroll_height, scroll_lines, scroll_line_height)
buffs_added:SetPoint ("topleft", f_manual, "topleft", 0, y)
- buffs_added:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
- buffs_added:SetBackdropColor (0, 0, 0, 0.2)
- buffs_added:SetBackdropBorderColor (0, 0, 0, 1)
+ DF:ReskinSlider (buffs_added)
+
for i = 1, scroll_lines do
buffs_added:CreateLine (scroll_createline)
end
local debuffs_added = self:CreateScrollBox (f_manual, "$parentDebuffsAdded", scroll_refresh, f.db.aura_tracker.debuff, scroll_width, scroll_height, scroll_lines, scroll_line_height)
debuffs_added:SetPoint ("topleft", f_manual, "topleft", width+30, y)
- debuffs_added:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
- debuffs_added:SetBackdropColor (0, 0, 0, 0.2)
- debuffs_added:SetBackdropBorderColor (0, 0, 0, 1)
+ DF:ReskinSlider (debuffs_added)
+
for i = 1, scroll_lines do
debuffs_added:CreateLine (scroll_createline)
end
@@ -339,6 +710,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, method_change_callback, opt
buffs_added_name:SetTemplate (DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
buffs_added_name:SetPoint ("bottomleft", buffs_added, "topleft", 0, 2)
buffs_added.Title = buffs_added_name
+
local debuffs_added_name = DF:CreateLabel (debuffs_added, "Debuffs", 12, "silver")
debuffs_added_name:SetTemplate (DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
debuffs_added_name:SetPoint ("bottomleft", debuffs_added, "topleft", 0, 2)
@@ -347,36 +719,55 @@ function DF:CreateAuraConfigPanel (parent, name, db, method_change_callback, opt
--> build the text entry to type the spellname
local new_buff_string = self:CreateLabel (f_manual, "Add Buff")
local new_debuff_string = self:CreateLabel (f_manual, "Add Debuff")
-
local new_buff_entry = self:CreateTextEntry (f_manual, function()end, 200, 20, "NewBuffTextBox", _, _, options_dropdown_template)
local new_debuff_entry = self:CreateTextEntry (f_manual, function()end, 200, 20, "NewDebuffTextBox", _, _, options_dropdown_template)
+ new_buff_entry:SetHook ("OnEditFocusGained", load_all_spells)
+ new_debuff_entry:SetHook ("OnEditFocusGained", load_all_spells)
+ new_buff_entry.tooltip = "Enter the buff name using lower case letters.\n\nYou can add several spells at once using |cFFFFFF00;|r to separate each spell name."
+ new_debuff_entry.tooltip = "Enter the debuff name using lower case letters.\n\nYou can add several spells at once using |cFFFFFF00;|r to separate each spell name."
+
new_buff_entry:SetJustifyH ("left")
new_debuff_entry:SetJustifyH ("left")
- DF:SetAutoCompleteWithSpells (new_buff_entry)
- DF:SetAutoCompleteWithSpells (new_debuff_entry)
-
local add_buff_button = self:CreateButton (f_manual, function()
+
local text = new_buff_entry.text
new_buff_entry:SetText ("")
new_buff_entry:ClearFocus()
+
if (text ~= "") then
--> check for more than one spellname
if (text:find (";")) then
- for _, spellname in ipairs ({strsplit (";", text)}) do
- spellname = self:trim (spellname)
- if (string.len (spellname) > 0) then
- tinsert (f.db.aura_tracker.buff, spellname)
+ for _, spellName in ipairs ({strsplit (";", text)}) do
+ spellName = self:trim (spellName)
+ spellName = lower (spellName)
+ if (string.len (spellName) > 0) then
+ local spellId = AllSpellsMap [spellName]
+ if (spellId) then
+ tinsert (f.db.aura_tracker.buff, spellId)
+ else
+ print ("spellId not found for spell:", spellName)
+ end
end
end
else
- tinsert (f.db.aura_tracker.buff, text)
+ --get the spellId
+ local spellName = lower (text)
+ local spellId = AllSpellsMap [spellName]
+ if (not spellId) then
+ print ("spellIs for spell ", spellName, "not found")
+ return
+ end
+
+ tinsert (f.db.aura_tracker.buff, spellId)
end
buffs_added:Refresh()
end
+
end, 100, 20, "Add Buff", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
+
local add_debuff_button = self:CreateButton (f_manual, function()
local text = new_debuff_entry.text
new_debuff_entry:SetText ("")
@@ -384,29 +775,47 @@ function DF:CreateAuraConfigPanel (parent, name, db, method_change_callback, opt
if (text ~= "") then
--> check for more than one spellname
if (text:find (";")) then
- for _, spellname in ipairs ({strsplit (";", text)}) do
- spellname = self:trim (spellname)
- if (string.len (spellname) > 0) then
- tinsert (f.db.aura_tracker.debuff, spellname)
+ for _, spellName in ipairs ({strsplit (";", text)}) do
+ spellName = self:trim (spellName)
+ spellName = lower (spellName)
+ if (string.len (spellName) > 0) then
+ local spellId = AllSpellsMap [spellName]
+ if (spellId) then
+ tinsert (f.db.aura_tracker.debuff, spellId)
+ else
+ print ("spellId not found for spell:", spellName)
+ end
end
end
else
- tinsert (f.db.aura_tracker.debuff, text)
+ --get the spellId
+ local spellName = lower (text)
+ local spellId = AllSpellsMap [spellName]
+ if (not spellId) then
+ print ("spellIs for spell ", spellName, "not found")
+ return
+ end
+
+ tinsert (f.db.aura_tracker.debuff, spellId)
end
+
debuffs_added:Refresh()
end
end, 100, 20, "Add Debuff", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
local multiple_spells_label = DF:CreateLabel (buffs_added, "You can add multiple auras at once by separating them with ';'.\nExample: Fireball; Frostbolt; Flamestrike", 10, "gray")
- multiple_spells_label:SetSize (350, 60)
+ multiple_spells_label:SetSize (350, 24)
multiple_spells_label:SetJustifyV ("top")
local export_box = self:CreateTextEntry (f_manual, function()end, 242, 20, "ExportAuraTextBox", _, _, options_dropdown_template)
local export_buff_button = self:CreateButton (f_manual, function()
local str = ""
- for _, spellname in ipairs (f.db.aura_tracker.buff) do
- str = str .. spellname .. "; "
+ for _, spellId in ipairs (f.db.aura_tracker.buff) do
+ local spellName = GetSpellInfo (spellId)
+ if (spellName) then
+ str = str .. spellName .. "; "
+ end
end
export_box.text = str
export_box:SetFocus (true)
@@ -416,30 +825,34 @@ function DF:CreateAuraConfigPanel (parent, name, db, method_change_callback, opt
local export_debuff_button = self:CreateButton (f_manual, function()
local str = ""
- for _, spellname in ipairs (f.db.aura_tracker.debuff) do
- str = str .. spellname .. "; "
+ for _, spellId in ipairs (f.db.aura_tracker.debuff) do
+ local spellName = GetSpellInfo (spellId)
+ if (spellName) then
+ str = str .. spellName .. "; "
+ end
end
+
export_box.text = str
export_box:SetFocus (true)
export_box:HighlightText()
end, 120, 20, "Export Debuffs", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"))
- multiple_spells_label:SetPoint ("topleft", f_manual, "topleft", 480, -120)
-
- export_buff_button:SetPoint ("topleft", f_manual, "topleft", 480, -160)
- export_debuff_button:SetPoint ("left",export_buff_button, "right", 2, 0)
- export_box:SetPoint ("topleft", f_manual, "topleft", 480, -185)
-
- new_buff_string:SetPoint ("topleft", f_manual, "topleft", 480, -40)
- new_buff_entry:SetPoint ("topleft", new_buff_string, "bottomleft", 0, -2)
+ new_buff_entry:SetPoint ("topleft", f_manual, "topleft", 480, y)
+ new_buff_string:SetPoint ("bottomleft", new_buff_entry, "topleft", 0, 2)
add_buff_button:SetPoint ("left", new_buff_entry, "right", 2, 0)
add_buff_button.tooltip = "Add the aura to be tracked.\n\nClick an aura on the list to remove it."
- new_debuff_string:SetPoint ("topleft", f_manual, "topleft", 480, -80)
+ new_debuff_string:SetPoint ("topleft", new_buff_entry, "bottomleft", 0, -6)
new_debuff_entry:SetPoint ("topleft", new_debuff_string, "bottomleft", 0, -2)
add_debuff_button:SetPoint ("left", new_debuff_entry, "right", 2, 0)
add_debuff_button.tooltip = "Add the aura to be tracked.\n\nClick an aura on the list to remove it."
+
+ multiple_spells_label:SetPoint ("topleft", new_debuff_entry, "bottomleft", 0, -6)
+
+ export_buff_button:SetPoint ("topleft", multiple_spells_label, "bottomleft", 0, -12)
+ export_debuff_button:SetPoint ("left",export_buff_button, "right", 2, 0)
+ export_box:SetPoint ("topleft", export_buff_button, "bottomleft", 0, -6)
buffs_added:Refresh()
debuffs_added:Refresh()
diff --git a/Libs/DF/button.lua b/Libs/DF/button.lua
index 37a73bbd..d0976cf5 100644
--- a/Libs/DF/button.lua
+++ b/Libs/DF/button.lua
@@ -404,6 +404,12 @@ local ButtonMetaFunctions = _G [DF.GlobalWidgetControlNames ["button"]]
end
-- icon
+ function ButtonMetaFunctions:GetIconTexture()
+ if (self.icon) then
+ return self.icon:GetTexture()
+ end
+ end
+
function ButtonMetaFunctions:SetIcon (texture, width, height, layout, texcoord, overlay, textdistance, leftpadding, textheight, short_method)
if (not self.icon) then
self.icon = self:CreateTexture (nil, "artwork")
diff --git a/Libs/DF/cooltip.lua b/Libs/DF/cooltip.lua
index 2a615c3c..305acafa 100644
--- a/Libs/DF/cooltip.lua
+++ b/Libs/DF/cooltip.lua
@@ -121,6 +121,14 @@ function DF:CreateCoolTip()
["SelectedRightAnchorMod"] = true,
}
+ CoolTip.AliasList = {
+ ["VerticalOffset"] = "ButtonsYMod",
+ ["VerticalPadding"] = "YSpacingMod",
+ ["LineHeightSizeOffset"] = "ButtonHeightMod",
+ ["FrameHeightSizeOffset"] = "HeighMod",
+
+ }
+
CoolTip.OptionsTable = {}
--cprops
@@ -1824,14 +1832,18 @@ function DF:CreateCoolTip()
CoolTip:SetOption ("HeightAnchorMod", 0)
end
- function CoolTip:SetOption (option, value)
+ function CoolTip:SetOption (optionName, value)
+
+ --> check for name alias
+ optionName = CoolTip.AliasList [optionName] or optionName
+
--> check if this options exists
- if (not CoolTip.OptionsList [option]) then
+ if (not CoolTip.OptionsList [optionName]) then
return --> error
end
-
+
--> set options
- CoolTip.OptionsTable [option] = value
+ CoolTip.OptionsTable [optionName] = value
end
----------------------------------------------------------------------
diff --git a/Libs/DF/dropdown.lua b/Libs/DF/dropdown.lua
index 56f46232..6b41a614 100644
--- a/Libs/DF/dropdown.lua
+++ b/Libs/DF/dropdown.lua
@@ -537,6 +537,10 @@ function DetailsFrameworkDropDownOptionOnEnter (frame)
GameCooltip2:SetOption ("TextFont", frame.table.descfont)
end
+ if (frame.table.tooltipwidth) then
+ GameCooltip2:SetOption ("FixedWidth", frame.table.tooltipwidth)
+ end
+
GameCooltip2:SetHost (frame, "topleft", "topright", 10, 0)
GameCooltip2:ShowCooltip (nil, "tooltip")
diff --git a/Libs/DF/fw.lua b/Libs/DF/fw.lua
index 8dc1f50a..ae643b8f 100644
--- a/Libs/DF/fw.lua
+++ b/Libs/DF/fw.lua
@@ -1,5 +1,5 @@
-local dversion = 68
+local dversion = 83
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary (major, minor)
@@ -15,6 +15,10 @@ local _
local _type = type
local _unpack = unpack
local upper = string.upper
+local string_match = string.match
+
+SMALL_NUMBER = 0.000001
+ALPHA_BLEND_AMOUNT = 0.8400251
--> will always give a very random name for our widgets
local init_counter = math.random (1, 1000000)
@@ -117,6 +121,12 @@ local embed_functions = {
"CreateBorder",
"FormatNumber",
"IntegerToTimer",
+ "QuickDispatch",
+ "CommaValue",
+ "RemoveRealmName",
+ "Trim",
+ "CreateGlowOverlay",
+ "CreateFrameShake",
}
DF.table = {}
@@ -181,6 +191,7 @@ function DF.table.deploy (t1, t2)
t1 [key] = value
end
end
+ return t1
end
function DF.table.dump (t, s, deep)
@@ -258,6 +269,22 @@ else
end
end
+function DF:CommaValue (value)
+ if (not value) then
+ return "0"
+ end
+
+ value = floor (value)
+
+ if (value == 0) then
+ return "0"
+ end
+
+ --source http://richard.warburton.it
+ local left, num, right = string_match (value, '^([^%d]*%d)(%d*)(.-)$')
+ return left .. (num:reverse():gsub ('(%d%d%d)','%1,'):reverse()) .. right
+end
+
function DF:IntegerToTimer (value)
return "" .. floor (value/60) .. ":" .. format ("%02.f", value%60)
end
@@ -328,13 +355,17 @@ function DF:SetFontOutline (fontString, outline)
fontString:SetFont (fonte, size, outline)
end
+function DF:Trim (s) --hello name conventions!
+ return DF:trim (s)
+end
+
function DF:trim (s)
local from = s:match"^%s*()"
return from > #s and "" or s:match(".*%S", from)
end
function DF:Msg (msg)
- print ("|cFFFFFFAA" .. self.__name .. "|r " .. msg)
+ print ("|cFFFFFFAA" .. (self.__name or "FW Msg:") .. "|r ", msg)
end
function DF:GetNpcIdFromGuid (guid)
@@ -345,6 +376,25 @@ function DF:GetNpcIdFromGuid (guid)
return 0
end
+function DF.SortOrder1 (t1, t2)
+ return t1[1] > t2[1]
+end
+function DF.SortOrder2 (t1, t2)
+ return t1[2] > t2[2]
+end
+function DF.SortOrder3 (t1, t2)
+ return t1[3] > t2[3]
+end
+function DF.SortOrder1R (t1, t2)
+ return t1[1] < t2[1]
+end
+function DF.SortOrder2R (t1, t2)
+ return t1[2] < t2[2]
+end
+function DF.SortOrder3R (t1, t2)
+ return t1[3] < t2[3]
+end
+
local onFinish = function (self)
if (self.showWhenDone) then
self.frame:SetAlpha (1)
@@ -462,6 +512,77 @@ end
return v1 or "topleft", v2, v3 or "topleft", v4 or 0, v5 or 0
end
+ local anchoring_functions = {
+ function (frame, anchorTo, offSetX, offSetY) --> 1 TOP LEFT
+ frame:ClearAllPoints()
+ frame:SetPoint ("bottomleft", anchorTo, "topleft", offSetX, offSetY)
+ end,
+
+ function (frame, anchorTo, offSetX, offSetY) --> 2 LEFT
+ frame:ClearAllPoints()
+ frame:SetPoint ("right", anchorTo, "left", offSetX, offSetY)
+ end,
+
+ function (frame, anchorTo, offSetX, offSetY) --> 3 BOTTOM LEFT
+ frame:ClearAllPoints()
+ frame:SetPoint ("topleft", anchorTo, "bottomleft", offSetX, offSetY)
+ end,
+
+ function (frame, anchorTo, offSetX, offSetY) --> 4 BOTTOM
+ frame:ClearAllPoints()
+ frame:SetPoint ("top", anchorTo, "bottom", offSetX, offSetY)
+ end,
+
+ function (frame, anchorTo, offSetX, offSetY) --> 5 BOTTOM RIGHT
+ frame:ClearAllPoints()
+ frame:SetPoint ("topright", anchorTo, "bottomright", offSetX, offSetY)
+ end,
+
+ function (frame, anchorTo, offSetX, offSetY) --> 6 RIGHT
+ frame:ClearAllPoints()
+ frame:SetPoint ("left", anchorTo, "right", offSetX, offSetY)
+ end,
+
+ function (frame, anchorTo, offSetX, offSetY) --> 7 TOP RIGHT
+ frame:ClearAllPoints()
+ frame:SetPoint ("bottomright", anchorTo, "topright", offSetX, offSetY)
+ end,
+
+ function (frame, anchorTo, offSetX, offSetY) --> 8 TOP
+ frame:ClearAllPoints()
+ frame:SetPoint ("bottom", anchorTo, "top", offSetX, offSetY)
+ end,
+
+ function (frame, anchorTo, offSetX, offSetY) --> 9 CENTER
+ frame:ClearAllPoints()
+ frame:SetPoint ("center", anchorTo, "center", offSetX, offSetY)
+ end,
+
+ function (frame, anchorTo, offSetX, offSetY) --> 10
+ frame:ClearAllPoints()
+ frame:SetPoint ("left", anchorTo, "left", offSetX, offSetY)
+ end,
+
+ function (frame, anchorTo, offSetX, offSetY) --> 11
+ frame:ClearAllPoints()
+ frame:SetPoint ("right", anchorTo, "right", offSetX, offSetY)
+ end,
+
+ function (frame, anchorTo, offSetX, offSetY) --> 12
+ frame:ClearAllPoints()
+ frame:SetPoint ("top", anchorTo, "top", offSetX, offSetY)
+ end,
+
+ function (frame, anchorTo, offSetX, offSetY) --> 13
+ frame:ClearAllPoints()
+ frame:SetPoint ("bottom", anchorTo, "bottom", offSetX, offSetY)
+ end
+ }
+
+ function DF:SetAnchor (widget, config, anchorTo)
+ anchorTo = anchorTo or widget:GetParent()
+ anchoring_functions [config.side] (widget, anchorTo, config.x, config.y)
+ end
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> colors
@@ -550,6 +671,7 @@ end
local cur_x = x_offset
local cur_y = y_offset
local max_x = 0
+ local line_widgets_created = 0 --how many widgets has been created on this line loop pass
height = abs ((height or parent:GetHeight()) - abs (y_offset) + 20)
height = height*-1
@@ -567,6 +689,7 @@ end
label.widget_type = "label"
label:SetPoint (cur_x, cur_y)
tinsert (parent.widget_list, label)
+ line_widgets_created = line_widgets_created + 1
elseif (widget_table.type == "select" or widget_table.type == "dropdown") then
local dropdown = DF:NewDropDown (parent, nil, "$parentWidget" .. index, nil, 140, 18, widget_table.values, widget_table.get(), dropdown_template)
@@ -584,6 +707,7 @@ end
tinsert (parent.widget_list, dropdown)
widget_created = dropdown
+ line_widgets_created = line_widgets_created + 1
elseif (widget_table.type == "toggle" or widget_table.type == "switch") then
local switch = DF:NewSwitch (parent, nil, "$parentWidget" .. index, nil, 60, 20, nil, nil, widget_table.get(), nil, nil, nil, nil, switch_template)
@@ -607,6 +731,7 @@ end
tinsert (parent.widget_list, switch)
widget_created = switch
+ line_widgets_created = line_widgets_created + 1
elseif (widget_table.type == "range" or widget_table.type == "slider") then
local is_decimanls = widget_table.usedecimals
@@ -631,6 +756,7 @@ end
tinsert (parent.widget_list, slider)
widget_created = slider
+ line_widgets_created = line_widgets_created + 1
elseif (widget_table.type == "color" or widget_table.type == "color") then
local colorpick = DF:NewColorPickButton (parent, "$parentWidget" .. index, nil, widget_table.set, nil, button_template)
@@ -656,6 +782,7 @@ end
tinsert (parent.widget_list, colorpick)
widget_created = colorpick
+ line_widgets_created = line_widgets_created + 1
elseif (widget_table.type == "execute" or widget_table.type == "button") then
@@ -675,7 +802,7 @@ end
tinsert (parent.widget_list, button)
widget_created = button
-
+ line_widgets_created = line_widgets_created + 1
elseif (widget_table.type == "textentry") then
local textentry = DF:CreateTextEntry (parent, widget_table.func, 120, 18, nil, "$parentWidget" .. index, nil, button_template)
@@ -697,6 +824,7 @@ end
tinsert (parent.widget_list, textentry)
widget_created = textentry
+ line_widgets_created = line_widgets_created + 1
end
@@ -713,6 +841,7 @@ end
if (widget_table.type == "breakline" or cur_y < height) then
cur_y = y_offset
cur_x = cur_x + max_x + 30
+ line_widgets_created = 0
max_x = 0
end
@@ -1303,6 +1432,274 @@ function DF:CreateAnimation (animation, type, order, duration, arg1, arg2, arg3,
return anim
end
+local frameshake_shake_finished = function (parent, shakeObject)
+ if (shakeObject.IsPlaying) then
+ shakeObject.IsPlaying = false
+
+ --> update the amount of shake running on this frame
+ parent.__frameshakes.enabled = parent.__frameshakes.enabled - 1
+
+ --> restore the default anchors, in case where deltaTime was too small that didn't triggered an update
+ for i = 1, #shakeObject.Anchors do
+ local anchor = shakeObject.Anchors [i]
+
+ if (#anchor == 3) then
+ local anchorTo, point1, point2 = unpack (anchor)
+ parent:SetPoint (anchorTo, point1, point2)
+
+ elseif (#anchor == 5) then
+ local anchorName1, anchorTo, anchorName2, point1, point2 = unpack (anchor)
+ parent:SetPoint (anchorName1, anchorTo, anchorName2, point1, point2)
+ end
+ end
+ end
+end
+
+local frameshake_do_update = function (parent, shakeObject, deltaTime)
+
+ --> check delta time
+ deltaTime = deltaTime or 0
+
+ --> update time left
+ shakeObject.TimeLeft = max (shakeObject.TimeLeft - deltaTime, 0)
+
+ if (shakeObject.TimeLeft > 0) then
+
+ --> update fade in and out
+ if (shakeObject.IsFadingIn) then
+ shakeObject.IsFadingInTime = shakeObject.IsFadingInTime + deltaTime
+ end
+ if (shakeObject.IsFadingOut) then
+ shakeObject.IsFadingOutTime = shakeObject.IsFadingOutTime + deltaTime
+ end
+
+ --> check if can disable fade in
+ if (shakeObject.IsFadingIn and shakeObject.IsFadingInTime > shakeObject.FadeInTime) then
+ shakeObject.IsFadingIn = false
+ end
+
+ --> check if can enable fade out
+ if (not shakeObject.IsFadingOut and shakeObject.TimeLeft < shakeObject.FadeOutTime) then
+ shakeObject.IsFadingOut = true
+ shakeObject.IsFadingOutTime = shakeObject.FadeOutTime - shakeObject.TimeLeft
+ end
+
+ --> update position
+ local scaleShake = min (shakeObject.IsFadingIn and (shakeObject.IsFadingInTime / shakeObject.FadeInTime) or 1, shakeObject.IsFadingOut and (1 - shakeObject.IsFadingOutTime / shakeObject.FadeOutTime) or 1)
+
+ if (scaleShake > 0) then
+
+ --> delate the time by the frequency on both X and Y offsets
+ shakeObject.XSineOffset = shakeObject.XSineOffset + (deltaTime * shakeObject.Frequency)
+ shakeObject.YSineOffset = shakeObject.YSineOffset + (deltaTime * shakeObject.Frequency)
+
+ --> calc the new position
+ local newX, newY
+ if (shakeObject.AbsoluteSineX) then
+ --absoluting only the sine wave, passing a negative scale will reverse the absolute direction
+ newX = shakeObject.Amplitude * abs (math.sin (shakeObject.XSineOffset)) * scaleShake * shakeObject.ScaleX
+ else
+ newX = shakeObject.Amplitude * math.sin (shakeObject.XSineOffset) * scaleShake * shakeObject.ScaleX
+ end
+
+ if (shakeObject.AbsoluteSineY) then
+ newY = shakeObject.Amplitude * abs (math.sin (shakeObject.YSineOffset)) * scaleShake * shakeObject.ScaleY
+ else
+ newY = shakeObject.Amplitude * math.sin (shakeObject.YSineOffset) * scaleShake * shakeObject.ScaleY
+ end
+
+ --> apply the offset to the frame anchors
+ for i = 1, #shakeObject.Anchors do
+ local anchor = shakeObject.Anchors [i]
+
+ if (#anchor == 3) then
+ local anchorTo, point1, point2 = unpack (anchor)
+ parent:SetPoint (anchorTo, point1 + newX, point2 + newY)
+
+ elseif (#anchor == 5) then
+ local anchorName1, anchorTo, anchorName2, point1, point2 = unpack (anchor)
+ parent:SetPoint (anchorName1, anchorTo, anchorName2, point1 + newX, point2 + newY)
+ end
+ end
+
+ end
+ else
+ frameshake_shake_finished (parent, shakeObject)
+ end
+end
+
+local frameshake_update_all = function (parent, deltaTime)
+ --> check if there's a shake running
+ --print ("Shakes Enabled: ", parent.__frameshakes.enabled)
+ if (parent.__frameshakes.enabled > 0) then
+ --update all shakes
+ for i = 1, #parent.__frameshakes do
+ local shakeObject = parent.__frameshakes [i]
+ if (shakeObject.IsPlaying) then
+ frameshake_do_update (parent, shakeObject, deltaTime)
+ end
+ end
+ end
+end
+
+local frameshake_play = function (parent, shakeObject, scaleX, scaleY)
+
+ --> check if is already playing
+ if (shakeObject.TimeLeft > 0) then
+ --> reset the time left
+ shakeObject.TimeLeft = shakeObject.Duration
+
+ if (shakeObject.IsFadingOut) then
+ if (shakeObject.FadeInTime > 0) then
+ shakeObject.IsFadingIn = true
+ --> scale the current fade out into fade in, so it starts the fade in at the point where it was fading out
+ shakeObject.IsFadingInTime = shakeObject.FadeInTime * (1 - shakeObject.IsFadingOutTime / shakeObject.FadeOutTime)
+ else
+ shakeObject.IsFadingIn = false
+ shakeObject.IsFadingInTime = 0
+ end
+
+ --> disable fade out and enable fade in
+ shakeObject.IsFadingOut = false
+ shakeObject.IsFadingOutTime = 0
+ end
+
+ else
+ --> create a new random offset
+ shakeObject.XSineOffset = math.pi * 2 * math.random()
+ shakeObject.YSineOffset = math.pi * 2 * math.random()
+
+ --> store the initial position if case it needs a reset
+ shakeObject.StartedXSineOffset = shakeObject.XSineOffset
+ shakeObject.StartedYSineOffset = shakeObject.YSineOffset
+
+ --> check if there's a fade in time
+ if (shakeObject.FadeInTime > 0) then
+ shakeObject.IsFadingIn = true
+ else
+ shakeObject.IsFadingIn = false
+ end
+
+ shakeObject.IsFadingInTime = 0
+ shakeObject.IsFadingOut = false
+ shakeObject.IsFadingOutTime = 0
+
+ --> apply custom scale
+ shakeObject.ScaleX = scaleX or shakeObject.OriginalScaleX
+ shakeObject.ScaleY = scaleY or shakeObject.OriginalScaleY
+
+ --> update the time left
+ shakeObject.TimeLeft = shakeObject.Duration
+
+ --> check if is dynamic points
+ if (shakeObject.IsDynamicAnchor) then
+ wipe (shakeObject.Anchors)
+ for i = 1, parent:GetNumPoints() do
+ local p1, p2, p3, p4, p5 = parent:GetPoint (i)
+ shakeObject.Anchors [#shakeObject.Anchors+1] = {p1, p2, p3, p4, p5}
+ end
+ end
+
+ --> update the amount of shake running on this frame
+ parent.__frameshakes.enabled = parent.__frameshakes.enabled + 1
+ end
+
+ shakeObject.IsPlaying = true
+
+ frameshake_do_update (parent, shakeObject)
+end
+
+function DF:CreateFrameShake (parent, duration, amplitude, frequency, absoluteSineX, absoluteSineY, scaleX, scaleY, fadeInTime, fadeOutTime, anchorPoints)
+
+ --> create the shake table
+ local frameShake = {
+ Amplitude = amplitude or 2,
+ Frequency = frequency or 5,
+ Duration = duration or 0.3,
+ FadeInTime = fadeInTime or 0.01,
+ FadeOutTime = fadeOutTime or 0.01,
+ ScaleX = scaleX or 0.2,
+ ScaleY = scaleY or 1,
+ AbsoluteSineX = absoluteSineX,
+ AbsoluteSineY = absoluteSineY,
+ --
+ IsPlaying = false,
+ TimeLeft = 0,
+ }
+
+ frameShake.OriginalScaleX = frameShake.ScaleX
+ frameShake.OriginalScaleY = frameShake.ScaleY
+
+ if (type (anchorPoints) ~= "table") then
+ frameShake.IsDynamicAnchor = true
+ frameShake.Anchors = {}
+ else
+ frameShake.Anchors = anchorPoints
+ end
+
+ --> inject frame shake table into the frame
+ if (not parent.__frameshakes) then
+ parent.__frameshakes = {
+ enabled = 0,
+ }
+ parent.PlayFrameShake = frameshake_play
+ parent.UpdateFrameShake = frameshake_do_update
+ parent.UpdateAllFrameShake = frameshake_update_all
+ parent:HookScript ("OnUpdate", frameshake_update_all)
+ end
+
+ tinsert (parent.__frameshakes, frameShake)
+
+ return frameShake
+end
+
+
+-----------------------------
+--> glow overlay
+
+local play_glow_overlay = function (self)
+ self:Show()
+ if (self.animOut:IsPlaying()) then
+ self.animOut:Stop()
+ end
+ self.animIn:Play()
+end
+
+local stop_glow_overlay = function (self)
+ self.animOut:Stop()
+ self.animIn:Stop()
+ self:Hide()
+end
+
+local defaultColor = {1, 1, 1, 1}
+
+--this is most copied from the wow client code, few changes applied to customize it
+function DF:CreateGlowOverlay (parent, antsColor, glowColor)
+ local glowFrame = CreateFrame ("frame", parent:GetName() and "$parentGlow2" or "OverlayActionGlow" .. math.random (1, 10000000), parent, "ActionBarButtonSpellActivationAlert")
+
+ glowFrame.Play = play_glow_overlay
+ glowFrame.Stop = stop_glow_overlay
+
+ parent.overlay = glowFrame
+ local frameWidth, frameHeight = parent:GetSize()
+
+ local scale = 1.4
+
+ --Make the height/width available before the next frame:
+ parent.overlay:SetSize(frameWidth * scale, frameHeight * scale)
+ parent.overlay:SetPoint("TOPLEFT", parent, "TOPLEFT", -frameWidth * 0.2, frameHeight * 0.2)
+ parent.overlay:SetPoint("BOTTOMRIGHT", parent, "BOTTOMRIGHT", frameWidth * 0.2, -frameHeight * 0.2)
+
+ local r, g, b, a = DF:ParseColors (antsColor or defaultColor)
+ glowFrame.ants:SetVertexColor (r, g, b, a)
+
+ local r, g, b, a = DF:ParseColors (glowColor or defaultColor)
+ glowFrame.outerGlow:SetVertexColor (r, g, b, a)
+
+ glowFrame.outerGlow:SetScale (1.2)
+
+ return glowFrame
+end
-----------------------------
--> borders
@@ -1327,6 +1724,34 @@ local SetBorderAlpha = function (self, alpha1, alpha2, alpha3)
end
end
+local SetBorderColor = function (self, r, g, b)
+ for _, texture in ipairs (self.Borders.Layer1) do
+ texture:SetColorTexture (r, g, b)
+ end
+ for _, texture in ipairs (self.Borders.Layer2) do
+ texture:SetColorTexture (r, g, b)
+ end
+ for _, texture in ipairs (self.Borders.Layer3) do
+ texture:SetColorTexture (r, g, b)
+ end
+end
+
+local SetLayerVisibility = function (self, layer1Shown, layer2Shown, layer3Shown)
+
+ for _, texture in ipairs (self.Borders.Layer1) do
+ texture:SetShown (layer1Shown)
+ end
+
+ for _, texture in ipairs (self.Borders.Layer2) do
+ texture:SetShown (layer2Shown)
+ end
+
+ for _, texture in ipairs (self.Borders.Layer3) do
+ texture:SetShown (layer3Shown)
+ end
+
+end
+
function DF:CreateBorder (parent, alpha1, alpha2, alpha3)
parent.Borders = {
@@ -1339,6 +1764,8 @@ function DF:CreateBorder (parent, alpha1, alpha2, alpha3)
}
parent.SetBorderAlpha = SetBorderAlpha
+ parent.SetBorderColor = SetBorderColor
+ parent.SetLayerVisibility = SetLayerVisibility
local border1 = parent:CreateTexture (nil, "background")
border1:SetPoint ("topleft", parent, "topleft", -1, 1)
@@ -1410,6 +1837,115 @@ function DF:CreateBorder (parent, alpha1, alpha2, alpha3)
end
+
+function DF:CreateBorderWithSpread (parent, alpha1, alpha2, alpha3, size, spread)
+
+ parent.Borders = {
+ Layer1 = {},
+ Layer2 = {},
+ Layer3 = {},
+ Alpha1 = alpha1 or default_border_color1,
+ Alpha2 = alpha2 or default_border_color2,
+ Alpha3 = alpha3 or default_border_color3,
+ }
+
+ parent.SetBorderAlpha = SetBorderAlpha
+ parent.SetBorderColor = SetBorderColor
+ parent.SetLayerVisibility = SetLayerVisibility
+
+ --left
+ local border1 = parent:CreateTexture (nil, "background")
+ border1:SetPoint ("topleft", parent, "topleft", -1 + spread, 1 + (-spread))
+ border1:SetPoint ("bottomleft", parent, "bottomleft", -1 + spread, -1 + spread)
+ border1:SetColorTexture (0, 0, 0, alpha1 or default_border_color1)
+ border1:SetWidth (size)
+
+ local border2 = parent:CreateTexture (nil, "background")
+ border2:SetPoint ("topleft", parent, "topleft", -2 + spread, 2 + (-spread))
+ border2:SetPoint ("bottomleft", parent, "bottomleft", -2 + spread, -2 + spread)
+ border2:SetColorTexture (0, 0, 0, alpha2 or default_border_color2)
+ border2:SetWidth (size)
+
+ local border3 = parent:CreateTexture (nil, "background")
+ border3:SetPoint ("topleft", parent, "topleft", -3 + spread, 3 + (-spread))
+ border3:SetPoint ("bottomleft", parent, "bottomleft", -3 + spread, -3 + spread)
+ border3:SetColorTexture (0, 0, 0, alpha3 or default_border_color3)
+ border3:SetWidth (size)
+
+ tinsert (parent.Borders.Layer1, border1)
+ tinsert (parent.Borders.Layer2, border2)
+ tinsert (parent.Borders.Layer3, border3)
+
+ --top
+ local border1 = parent:CreateTexture (nil, "background")
+ border1:SetPoint ("topleft", parent, "topleft", 0 + spread, 1 + (-spread))
+ border1:SetPoint ("topright", parent, "topright", 1 + (-spread), 1 + (-spread))
+ border1:SetColorTexture (0, 0, 0, alpha1 or default_border_color1)
+ border1:SetHeight (size)
+
+ local border2 = parent:CreateTexture (nil, "background")
+ border2:SetPoint ("topleft", parent, "topleft", -1 + spread, 2 + (-spread))
+ border2:SetPoint ("topright", parent, "topright", 2 + (-spread), 2 + (-spread))
+ border2:SetColorTexture (0, 0, 0, alpha2 or default_border_color2)
+ border2:SetHeight (size)
+
+ local border3 = parent:CreateTexture (nil, "background")
+ border3:SetPoint ("topleft", parent, "topleft", -2 + spread, 3 + (-spread))
+ border3:SetPoint ("topright", parent, "topright", 3 + (-spread), 3 + (-spread))
+ border3:SetColorTexture (0, 0, 0, alpha3 or default_border_color3)
+ border3:SetHeight (size)
+
+ tinsert (parent.Borders.Layer1, border1)
+ tinsert (parent.Borders.Layer2, border2)
+ tinsert (parent.Borders.Layer3, border3)
+
+ --right
+ local border1 = parent:CreateTexture (nil, "background")
+ border1:SetPoint ("topright", parent, "topright", 1 + (-spread), 0 + (-spread))
+ border1:SetPoint ("bottomright", parent, "bottomright", 1 + (-spread), -1 + spread)
+ border1:SetColorTexture (0, 0, 0, alpha1 or default_border_color1)
+ border1:SetWidth (size)
+
+ local border2 = parent:CreateTexture (nil, "background")
+ border2:SetPoint ("topright", parent, "topright", 2 + (-spread), 1 + (-spread))
+ border2:SetPoint ("bottomright", parent, "bottomright", 2 + (-spread), -2 + spread)
+ border2:SetColorTexture (0, 0, 0, alpha2 or default_border_color2)
+ border2:SetWidth (size)
+
+ local border3 = parent:CreateTexture (nil, "background")
+ border3:SetPoint ("topright", parent, "topright", 3 + (-spread), 2 + (-spread))
+ border3:SetPoint ("bottomright", parent, "bottomright", 3 + (-spread), -3 + spread)
+ border3:SetColorTexture (0, 0, 0, alpha3 or default_border_color3)
+ border3:SetWidth (size)
+
+ tinsert (parent.Borders.Layer1, border1)
+ tinsert (parent.Borders.Layer2, border2)
+ tinsert (parent.Borders.Layer3, border3)
+
+ local border1 = parent:CreateTexture (nil, "background")
+ border1:SetPoint ("bottomleft", parent, "bottomleft", 0 + spread, -1 + spread)
+ border1:SetPoint ("bottomright", parent, "bottomright", 0 + (-spread), -1 + spread)
+ border1:SetColorTexture (0, 0, 0, alpha1 or default_border_color1)
+ border1:SetHeight (size)
+
+ local border2 = parent:CreateTexture (nil, "background")
+ border2:SetPoint ("bottomleft", parent, "bottomleft", -1 + spread, -2 + spread)
+ border2:SetPoint ("bottomright", parent, "bottomright", 1 + (-spread), -2 + spread)
+ border2:SetColorTexture (0, 0, 0, alpha2 or default_border_color2)
+ border2:SetHeight (size)
+
+ local border3 = parent:CreateTexture (nil, "background")
+ border3:SetPoint ("bottomleft", parent, "bottomleft", -2 + spread, -3 + spread)
+ border3:SetPoint ("bottomright", parent, "bottomright", 2 + (-spread), -3 + spread)
+ border3:SetColorTexture (0, 0, 0, alpha3 or default_border_color3)
+ border3:SetHeight (size)
+
+ tinsert (parent.Borders.Layer1, border1)
+ tinsert (parent.Borders.Layer2, border2)
+ tinsert (parent.Borders.Layer3, border3)
+
+end
+
function DF:ReskinSlider (slider, heightOffset)
if (slider.slider) then
slider.cima:SetNormalTexture ([[Interface\Buttons\Arrow-Up-Up]])
@@ -1451,49 +1987,76 @@ function DF:ReskinSlider (slider, heightOffset)
slider.slider.thumb:SetTexCoord (482/512, 492/512, 104/512, 120/512)
slider.slider.thumb:SetSize (12, 12)
slider.slider.thumb:SetVertexColor (0.6, 0.6, 0.6, 0.95)
+
else
+ --up button
+ do
+ local normalTexture = slider.ScrollBar.ScrollUpButton.Normal
+ normalTexture:SetTexture ([[Interface\Buttons\Arrow-Up-Up]])
+ normalTexture:SetTexCoord (0, 1, .2, 1)
+
+ normalTexture:SetPoint ("topleft", slider.ScrollBar.ScrollUpButton, "topleft", 1, 0)
+ normalTexture:SetPoint ("bottomright", slider.ScrollBar.ScrollUpButton, "bottomright", 1, 0)
+
+ local pushedTexture = slider.ScrollBar.ScrollUpButton.Pushed
+ pushedTexture:SetTexture ([[Interface\Buttons\Arrow-Up-Down]])
+ pushedTexture:SetTexCoord (0, 1, .2, 1)
+
+ pushedTexture:SetPoint ("topleft", slider.ScrollBar.ScrollUpButton, "topleft", 1, 0)
+ pushedTexture:SetPoint ("bottomright", slider.ScrollBar.ScrollUpButton, "bottomright", 1, 0)
- slider.ScrollBar.ScrollUpButton:SetNormalTexture ([[Interface\Buttons\Arrow-Up-Up]])
- slider.ScrollBar.ScrollUpButton:GetNormalTexture():SetTexCoord (0, 1, 0, 1)
- slider.ScrollBar.ScrollUpButton:SetPushedTexture ([[Interface\Buttons\Arrow-Up-Down]])
- slider.ScrollBar.ScrollUpButton:GetPushedTexture():SetTexCoord (0, 1, 0, 1)
- slider.ScrollBar.ScrollUpButton:SetDisabledTexture ([[Interface\Buttons\Arrow-Up-Disabled]])
- slider.ScrollBar.ScrollUpButton:GetDisabledTexture():SetTexCoord (0, 1, 0, 1)
+ local disabledTexture = slider.ScrollBar.ScrollUpButton.Disabled
+ disabledTexture:SetTexture ([[Interface\Buttons\Arrow-Up-Disabled]])
+ disabledTexture:SetTexCoord (0, 1, .2, 1)
+ disabledTexture:SetAlpha (.5)
+
+ disabledTexture:SetPoint ("topleft", slider.ScrollBar.ScrollUpButton, "topleft", 1, 0)
+ disabledTexture:SetPoint ("bottomright", slider.ScrollBar.ScrollUpButton, "bottomright", 1, 0)
+
+ slider.ScrollBar.ScrollUpButton:SetSize (16, 16)
+ slider.ScrollBar.ScrollUpButton:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = "Interface\\Tooltips\\UI-Tooltip-Background"})
+ slider.ScrollBar.ScrollUpButton:SetBackdropColor (0, 0, 0, 0.3)
+ slider.ScrollBar.ScrollUpButton:SetBackdropBorderColor (0, 0, 0, 1)
+
+ --it was having problems with the texture anchor when calling ClearAllPoints() and setting new points different from the original
+ --now it is using the same points from the original with small offsets tp align correctly
+ end
+
+ --down button
+ do
+ local normalTexture = slider.ScrollBar.ScrollDownButton.Normal
+ normalTexture:SetTexture ([[Interface\Buttons\Arrow-Down-Up]])
+ normalTexture:SetTexCoord (0, 1, 0, .8)
+
+ normalTexture:SetPoint ("topleft", slider.ScrollBar.ScrollDownButton, "topleft", 1, -4)
+ normalTexture:SetPoint ("bottomright", slider.ScrollBar.ScrollDownButton, "bottomright", 1, -4)
+
+ local pushedTexture = slider.ScrollBar.ScrollDownButton.Pushed
+ pushedTexture:SetTexture ([[Interface\Buttons\Arrow-Down-Down]])
+ pushedTexture:SetTexCoord (0, 1, 0, .8)
+
+ pushedTexture:SetPoint ("topleft", slider.ScrollBar.ScrollDownButton, "topleft", 1, -4)
+ pushedTexture:SetPoint ("bottomright", slider.ScrollBar.ScrollDownButton, "bottomright", 1, -4)
+
+ local disabledTexture = slider.ScrollBar.ScrollDownButton.Disabled
+ disabledTexture:SetTexture ([[Interface\Buttons\Arrow-Down-Disabled]])
+ disabledTexture:SetTexCoord (0, 1, 0, .8)
+ disabledTexture:SetAlpha (.5)
+
+ disabledTexture:SetPoint ("topleft", slider.ScrollBar.ScrollDownButton, "topleft", 1, -4)
+ disabledTexture:SetPoint ("bottomright", slider.ScrollBar.ScrollDownButton, "bottomright", 1, -4)
+
+ slider.ScrollBar.ScrollDownButton:SetSize (16, 16)
+ slider.ScrollBar.ScrollDownButton:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = "Interface\\Tooltips\\UI-Tooltip-Background"})
+ slider.ScrollBar.ScrollDownButton:SetBackdropColor (0, 0, 0, 0.3)
+ slider.ScrollBar.ScrollDownButton:SetBackdropBorderColor (0, 0, 0, 1)
- slider.ScrollBar.ScrollUpButton:SetSize (16, 16)
- slider.ScrollBar.ScrollUpButton:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = "Interface\\Tooltips\\UI-Tooltip-Background"})
- slider.ScrollBar.ScrollUpButton:SetBackdropColor (0, 0, 0, 0.3)
- slider.ScrollBar.ScrollUpButton:SetBackdropBorderColor (0, 0, 0, 1)
-
- slider.ScrollBar.ScrollUpButton:GetNormalTexture():ClearAllPoints()
- slider.ScrollBar.ScrollUpButton:GetPushedTexture():ClearAllPoints()
- slider.ScrollBar.ScrollUpButton:GetDisabledTexture():ClearAllPoints()
- slider.ScrollBar.ScrollUpButton:GetNormalTexture():SetPoint ("center", slider.ScrollBar.ScrollUpButton, "center", 1, 1)
- slider.ScrollBar.ScrollUpButton:GetPushedTexture():SetPoint ("center", slider.ScrollBar.ScrollUpButton, "center", 1, 1)
- slider.ScrollBar.ScrollUpButton:GetDisabledTexture():SetPoint ("center", slider.ScrollBar.ScrollUpButton, "center", 1, 1)
-
+ --
+ --slider.ScrollBar.ScrollDownButton:SetPoint ("top", slider.ScrollBar, "bottom", 0, 0)
+ end
+
--
- slider.ScrollBar.ScrollDownButton:SetNormalTexture ([[Interface\Buttons\Arrow-Down-Up]])
- slider.ScrollBar.ScrollDownButton:GetNormalTexture():SetTexCoord (0, 1, 0, 1)
- slider.ScrollBar.ScrollDownButton:SetPushedTexture ([[Interface\Buttons\Arrow-Down-Down]])
- slider.ScrollBar.ScrollDownButton:GetPushedTexture():SetTexCoord (0, 1, 0, 1)
- slider.ScrollBar.ScrollDownButton:SetDisabledTexture ([[Interface\Buttons\Arrow-Down-Disabled]])
- slider.ScrollBar.ScrollDownButton:GetDisabledTexture():SetTexCoord (0, 1, 0, 1)
-
- slider.ScrollBar.ScrollDownButton:SetSize (16, 16)
- slider.ScrollBar.ScrollDownButton:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = "Interface\\Tooltips\\UI-Tooltip-Background"})
- slider.ScrollBar.ScrollDownButton:SetBackdropColor (0, 0, 0, 0.3)
- slider.ScrollBar.ScrollDownButton:SetBackdropBorderColor (0, 0, 0, 1)
-
- slider.ScrollBar.ScrollDownButton:GetNormalTexture():ClearAllPoints()
- slider.ScrollBar.ScrollDownButton:GetPushedTexture():ClearAllPoints()
- slider.ScrollBar.ScrollDownButton:GetDisabledTexture():ClearAllPoints()
- slider.ScrollBar.ScrollDownButton:GetNormalTexture():SetPoint ("center", slider.ScrollBar.ScrollDownButton, "center", 1, -5)
- slider.ScrollBar.ScrollDownButton:GetPushedTexture():SetPoint ("center", slider.ScrollBar.ScrollDownButton, "center", 1, -5)
- slider.ScrollBar.ScrollDownButton:GetDisabledTexture():SetPoint ("center", slider.ScrollBar.ScrollDownButton, "center", 1, -5)
-
- --
slider.ScrollBar:SetPoint ("TOPLEFT", slider, "TOPRIGHT", 6, -16)
slider.ScrollBar:SetPoint ("BOTTOMLEFT", slider, "BOTTOMRIGHT", 6, 16 + (heightOffset and heightOffset*-1 or 0))
@@ -1508,4 +2071,57 @@ function DF:ReskinSlider (slider, heightOffset)
end
end
---doo elsee
\ No newline at end of file
+function DF:GetCurrentSpec()
+ local specIndex = GetSpecialization()
+ if (specIndex) then
+ local specID = GetSpecializationInfo (specIndex)
+ if (specID and specID ~= 0) then
+ return specID
+ end
+ end
+end
+
+local specs_per_class = {
+ ["DEMONHUNTER"] = {577, 581},
+ ["DEATHKNIGHT"] = {250, 251, 252},
+ ["WARRIOR"] = {71, 72, 73},
+ ["MAGE"] = {62, 63, 64},
+ ["ROGUE"] = {259, 260, 261},
+ ["DRUID"] = {102, 103, 104, 105},
+ ["HUNTER"] = {253, 254, 255},
+ ["SHAMAN"] = {262, 263, 254},
+ ["PRIEST"] = {256, 257, 258},
+ ["WARLOCK"] = {265, 266, 267},
+ ["PALADIN"] = {65, 66, 70},
+ ["MONK"] = {268, 269, 270},
+}
+
+function DF:GetClassSpecIDs (class)
+ return specs_per_class [class]
+end
+
+local dispatch_error = function (context, errortext)
+ DF:Msg ( (context or "") .. " |cFFFF9900error|r: " .. (errortext or ""))
+end
+
+--> safe call an external func with payload and without telling who is calling
+function DF:QuickDispatch (func, ...)
+ if (type (func) ~= "function") then
+ return
+ end
+
+ local okay, errortext = pcall (func, ...)
+
+ if (not okay) then
+ --> trigger an error msg
+ dispatch_error (_, errortext)
+ return
+ end
+
+ return true
+end
+
+
+
+--doo elsee
+--was doing double loops due to not enought height
\ No newline at end of file
diff --git a/Libs/DF/load.xml b/Libs/DF/load.xml
index 72344efb..bd66152f 100644
--- a/Libs/DF/load.xml
+++ b/Libs/DF/load.xml
@@ -8,6 +8,7 @@
+
diff --git a/Libs/DF/math.lua b/Libs/DF/math.lua
index cc83038b..bf8f1a19 100644
--- a/Libs/DF/math.lua
+++ b/Libs/DF/math.lua
@@ -8,6 +8,9 @@ end
local UnitExists = UnitExists
local atan2 = math.atan2
local pi = math.pi
+local abs = math.abs
+
+SMALL_FLOAT = 0.000001
--find distance between two players
function DF:GetDistance_Unit (unit1, unit2)
@@ -45,7 +48,7 @@ function DF:MapRangeUnclamped (inputX, inputY, outputX, outputY, value)
return DF:GetRangeValue (outputX, outputY, DF:GetRangePercent (inputX, inputY, value))
end
---find the normalized percent fo the value in the range. e.g range of 200-400 and a value of 250 result in 0.25
+--find the normalized percent of the value in the range. e.g range of 200-400 and a value of 250 result in 0.25
function DF:GetRangePercent (minValue, maxValue, value)
return (value - minValue) / (maxValue - minValue)
end
@@ -55,12 +58,51 @@ function DF:GetRangeValue (minValue, maxValue, percent)
return Lerp (minValue, maxValue, percent)
end
---dot product of two vectors
-function DF:GetDotProduct (v1, v2)
- return (v1.x * v2.x) + (v1.y * v2.y)
+--dot product of two 2D Vectors
+function DF:GetDotProduct (value1, value2)
+ return (value1.x * value2.x) + (value1.y * value2.y)
end
--normalized value 0-1 result in the value on the range given, e.g 200-400 range with a value of .5 result in 300
function DF:LerpNorm (minValue, maxValue, value)
return (minValue + value * (maxValue - minValue))
-end
\ No newline at end of file
+end
+
+--change the color by the deltaTime
+function DF:LerpLinearColor (deltaTime, interpSpeed, r1, g1, b1, r2, g2, b2)
+ deltaTime = deltaTime * interpSpeed
+ local r = r1 + (r2 - r1) * deltaTime
+ local g = g1 + (g2 - g1) * deltaTime
+ local b = b1 + (b2 - b1) * deltaTime
+ return r, g, b
+end
+
+--check if a number is near another number by a tolerance
+function DF:IsNearlyEqual (value1, value2, tolerance)
+ tolerance = tolerance or SMALL_FLOAT
+ return abs (value1 - value2) <= tolerance
+end
+
+--check if a number is near zero
+function DF:IsNearlyZero (value, tolerance)
+ tolerance = tolerance or SMALL_FLOAT
+ return abs (value) <= tolerance
+end
+
+--check if a number is within a two other numbers, if isInclusive is true, it'll include the max value
+function DF:IsWithin (minValue, maxValue, value, isInclusive)
+ if (isInclusive) then
+ return ((value >= minValue) and (value <= maxValue))
+ else
+ return ((value >= minValue) and (value < maxValue))
+ end
+end
+
+--dont allow a number ot be lower or bigger than a certain range
+function DF:Clamp (minValue, maxValue, value)
+ return value < minValue and minValue or value < maxValue and value or maxValue
+end
+
+function DF:ScaleBack ()
+
+end
diff --git a/Libs/DF/normal_bar.lua b/Libs/DF/normal_bar.lua
index 245f4f55..be4c8ecb 100644
--- a/Libs/DF/normal_bar.lua
+++ b/Libs/DF/normal_bar.lua
@@ -212,6 +212,11 @@ local BarMetaFunctions = _G [DF.GlobalWidgetControlNames ["normal_bar"]]
return _object._texture:SetVertexColor (_value1, _value2, _value3, _value4)
end
+ --> background color
+ local smember_backgroundcolor = function (_object, _value)
+ local _value1, _value2, _value3, _value4 = DF:ParseColors (_value)
+ return _object.background:SetVertexColor (_value1, _value2, _value3, _value4)
+ end
--> icon
local smember_icon = function (_object, _value)
if (type (_value) == "table") then
@@ -255,6 +260,20 @@ local BarMetaFunctions = _G [DF.GlobalWidgetControlNames ["normal_bar"]]
end
return
end
+ --> background texture
+ local smember_backgroundtexture = function (_object, _value)
+ if (_value:find ("\\")) then
+ _object.background:SetTexture (_value)
+ else
+ local file = SharedMedia:Fetch ("statusbar", _value)
+ if (file) then
+ _object.background:SetTexture (file)
+ else
+ _object.background:SetTexture (_value)
+ end
+ end
+ return
+ end
--> font face
local smember_textfont = function (_object, _value)
DF:SetFontFace (_object.textleft, _value)
@@ -286,8 +305,10 @@ local BarMetaFunctions = _G [DF.GlobalWidgetControlNames ["normal_bar"]]
BarMetaFunctions.SetMembers["righttext"] = smember_rtext
BarMetaFunctions.SetMembers["lefttext"] = smember_ltext
BarMetaFunctions.SetMembers["color"] = smember_color
+ BarMetaFunctions.SetMembers["backgroundcolor"] = smember_backgroundcolor
BarMetaFunctions.SetMembers["icon"] = smember_icon
BarMetaFunctions.SetMembers["texture"] = smember_texture
+ BarMetaFunctions.SetMembers["backgroundtexture"] = smember_backgroundtexture
BarMetaFunctions.SetMembers["fontsize"] = smember_textsize
BarMetaFunctions.SetMembers["fontface"] = smember_textfont
BarMetaFunctions.SetMembers["fontcolor"] = smember_textcolor
diff --git a/Libs/DF/panel.lua b/Libs/DF/panel.lua
index 81bf40cf..7517c506 100644
--- a/Libs/DF/panel.lua
+++ b/Libs/DF/panel.lua
@@ -29,6 +29,40 @@ end
local PanelMetaFunctions = _G [DF.GlobalWidgetControlNames ["panel"]]
+--> mixin for options functions
+DF.OptionsFunctions = {
+ SetOption = function (self, optionName, optionValue)
+ if (self.options) then
+ self.options [optionName] = optionValue
+ else
+ self.options = {}
+ self.options [optionName] = optionValue
+ end
+ end,
+
+ GetOption = function (self, optionName)
+ return self.options and self.options [optionName]
+ end,
+
+ GetAllOptions = function (self)
+ if (self.options) then
+ local optionsTable = {}
+ for key, _ in pairs (self.options) do
+ optionsTable [#optionsTable + 1] = key
+ end
+ return optionsTable
+ else
+ return {}
+ end
+ end,
+
+ BuildOptionsTable = function (self, defaultOptions, userOptions)
+ self.options = self.options or {}
+ DF.table.deploy (self.options, userOptions or {})
+ DF.table.deploy (self.options, defaultOptions or {})
+ end
+}
+
------------------------------------------------------------------------------------------------------------
--> metatables
@@ -1216,19 +1250,21 @@ function DF:IconPick (callback, close_when_select, param1, param2)
DF.IconPickFrame = CreateFrame ("frame", "DetailsFrameworkIconPickFrame", UIParent)
tinsert (UISpecialFrames, "DetailsFrameworkIconPickFrame")
- DF.IconPickFrame:SetFrameStrata ("DIALOG")
+ DF.IconPickFrame:SetFrameStrata ("TOOLTIP")
DF.IconPickFrame:SetPoint ("center", UIParent, "center")
DF.IconPickFrame:SetWidth (350)
- DF.IconPickFrame:SetHeight (227)
+ DF.IconPickFrame:SetHeight (277)
DF.IconPickFrame:EnableMouse (true)
DF.IconPickFrame:SetMovable (true)
+ DF:CreateTitleBar (DF.IconPickFrame, "Icon Picker")
+
DF.IconPickFrame:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
DF.IconPickFrame:SetBackdropBorderColor (0, 0, 0)
DF.IconPickFrame:SetBackdropColor (24/255, 24/255, 24/255, .8)
- DF.IconPickFrame:SetFrameLevel (1)
+ DF.IconPickFrame:SetFrameLevel (5000)
DF.IconPickFrame:SetScript ("OnMouseDown", function (self)
if (not self.isMoving) then
@@ -1249,16 +1285,29 @@ function DF:IconPick (callback, close_when_select, param1, param2)
DF.IconPickFrame.preview = CreateFrame ("frame", nil, UIParent)
DF.IconPickFrame.preview:SetFrameStrata ("tooltip")
+ DF.IconPickFrame.preview:SetFrameLevel (6001)
DF.IconPickFrame.preview:SetSize (76, 76)
+
+ local preview_image_bg = DF:NewImage (DF.IconPickFrame.preview, nil, 76, 76)
+ preview_image_bg:SetDrawLayer ("background", 0)
+ preview_image_bg:SetAllPoints (DF.IconPickFrame.preview)
+ preview_image_bg:SetColorTexture (0, 0, 0)
+
local preview_image = DF:NewImage (DF.IconPickFrame.preview, nil, 76, 76)
preview_image:SetAllPoints (DF.IconPickFrame.preview)
+
DF.IconPickFrame.preview.icon = preview_image
DF.IconPickFrame.preview:Hide()
+ --serach
DF.IconPickFrame.searchLabel = DF:NewLabel (DF.IconPickFrame, nil, "$parentSearchBoxLabel", nil, "search:", font, size, color)
- DF.IconPickFrame.searchLabel:SetPoint ("topleft", DF.IconPickFrame, "topleft", 12, -20)
+ DF.IconPickFrame.searchLabel:SetPoint ("topleft", DF.IconPickFrame, "topleft", 12, -36)
+ DF.IconPickFrame.searchLabel:SetTemplate (DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
+
DF.IconPickFrame.search = DF:NewTextEntry (DF.IconPickFrame, nil, "$parentSearchBox", nil, 140, 20)
DF.IconPickFrame.search:SetPoint ("left", DF.IconPickFrame.searchLabel, "right", 2, 0)
+ DF.IconPickFrame.search:SetTemplate (DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
+
DF.IconPickFrame.search:SetHook ("OnTextChanged", function()
DF.IconPickFrame.searching = DF.IconPickFrame.search:GetText()
if (DF.IconPickFrame.searching == "") then
@@ -1273,12 +1322,48 @@ function DF:IconPick (callback, close_when_select, param1, param2)
end
end)
+ --manually enter the icon path
+ DF.IconPickFrame.customIcon = DF:CreateLabel (DF.IconPickFrame, "Icon Path:", DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
+ DF.IconPickFrame.customIcon:SetPoint ("bottomleft", DF.IconPickFrame, "bottomleft", 12, 16)
+
+ DF.IconPickFrame.customIconEntry = DF:CreateTextEntry (DF.IconPickFrame, function()end, 200, 20, "CustomIconEntry", _, _, DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
+ DF.IconPickFrame.customIconEntry:SetPoint ("left", DF.IconPickFrame.customIcon, "right", 2, 0)
+
+ DF.IconPickFrame.customIconEntry:SetHook ("OnTextChanged", function()
+ DF.IconPickFrame.preview:SetPoint ("bottom", DF.IconPickFrame.customIconEntry.widget, "top", 0, 2)
+ DF.IconPickFrame.preview.icon:SetTexture (DF.IconPickFrame.customIconEntry:GetText())
+ DF.IconPickFrame.preview:Show()
+ end)
+
+ DF.IconPickFrame.customIconEntry:SetHook ("OnEnter", function()
+ DF.IconPickFrame.preview:SetPoint ("bottom", DF.IconPickFrame.customIconEntry.widget, "top", 0, 2)
+ DF.IconPickFrame.preview.icon:SetTexture (DF.IconPickFrame.customIconEntry:GetText())
+ DF.IconPickFrame.preview:Show()
+ end)
+
--> close button
local close_button = CreateFrame ("button", nil, DF.IconPickFrame, "UIPanelCloseButton")
close_button:SetWidth (32)
close_button:SetHeight (32)
close_button:SetPoint ("TOPRIGHT", DF.IconPickFrame, "TOPRIGHT", -8, -7)
close_button:SetFrameLevel (close_button:GetFrameLevel()+2)
+ close_button:SetAlpha (0) --just hide, it is used below
+
+ --> accept custom icon button
+ local accept_custom_icon = function()
+ local path = DF.IconPickFrame.customIconEntry:GetText()
+
+ DF:QuickDispatch (DF.IconPickFrame.callback, path, DF.IconPickFrame.param1, DF.IconPickFrame.param2)
+
+ if (DF.IconPickFrame.click_close) then
+ close_button:Click()
+ end
+ end
+
+ DF.IconPickFrame.customIconAccept = DF:CreateButton (DF.IconPickFrame, accept_custom_icon, 82, 20, "Accept", nil, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
+ DF.IconPickFrame.customIconAccept:SetPoint ("left", DF.IconPickFrame.customIconEntry, "right", 2, 0)
+
+ --fill with icons
local MACRO_ICON_FILENAMES = {}
local SPELLNAMES_CACHE = {}
@@ -1320,18 +1405,25 @@ function DF:IconPick (callback, close_when_select, param1, param2)
GetLooseMacroIcons (MACRO_ICON_FILENAMES)
GetMacroIcons (MACRO_ICON_FILENAMES)
GetMacroItemIcons (MACRO_ICON_FILENAMES)
-
+
+ --reset the custom icon text entry
+ DF.IconPickFrame.customIconEntry:SetText ("")
+ --reset the search text entry
+ DF.IconPickFrame.search:SetText ("")
end)
DF.IconPickFrame:SetScript ("OnHide", function()
wipe (MACRO_ICON_FILENAMES)
+ DF.IconPickFrame.preview:Hide()
collectgarbage()
end)
DF.IconPickFrame.buttons = {}
local OnClickFunction = function (self)
- DF.IconPickFrame.callback (self.icon:GetTexture(), DF.IconPickFrame.param1, DF.IconPickFrame.param2)
+
+ DF:QuickDispatch (DF.IconPickFrame.callback, self.icon:GetTexture(), DF.IconPickFrame.param1, DF.IconPickFrame.param2)
+
if (DF.IconPickFrame.click_close) then
close_button:Click()
end
@@ -1362,7 +1454,7 @@ function DF:IconPick (callback, close_when_select, param1, param2)
newcheck:SetScript ("OnClick", OnClickFunction)
newcheck.param1 = i+1
- newcheck:SetPoint ("topleft", DF.IconPickFrame, "topleft", 12 + (i*30), -40)
+ newcheck:SetPoint ("topleft", DF.IconPickFrame, "topleft", 12 + (i*30), -60)
newcheck:SetID (i+1)
DF.IconPickFrame.buttons [#DF.IconPickFrame.buttons+1] = newcheck
newcheck:SetScript ("OnEnter", onenter)
@@ -1455,6 +1547,7 @@ function DF:IconPick (callback, close_when_select, param1, param2)
end
local scroll = CreateFrame ("ScrollFrame", "DetailsFrameworkIconPickFrameScroll", DF.IconPickFrame, "ListScrollFrameTemplate")
+ DF:ReskinSlider (scroll)
local ChecksFrame_Update = function (self)
@@ -1527,7 +1620,7 @@ function DF:IconPick (callback, close_when_select, param1, param2)
DF.IconPickFrame.updateFunc = ChecksFrame_Update
- scroll:SetPoint ("topleft", DF.IconPickFrame, "topleft", -18, -37)
+ scroll:SetPoint ("topleft", DF.IconPickFrame, "topleft", -18, -58)
scroll:SetWidth (330)
scroll:SetHeight (178)
scroll:SetScript ("OnVerticalScroll", function (self, offset) FauxScrollFrame_OnVerticalScroll (scroll, offset, 20, ChecksFrame_Update) end)
@@ -1609,9 +1702,12 @@ local SimplePanel_frame_backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], e
local SimplePanel_frame_backdrop_color = {0, 0, 0, 0.9}
local SimplePanel_frame_backdrop_border_color = {0, 0, 0, 1}
+--with_label was making the frame stay in place while its parent moves
+--the slider was anchoring to with_label and here here were anchoring the slider again
function DF:CreateScaleBar (frame, config)
- local scaleBar = DF:CreateSlider (frame, 120, 14, 0.6, 1.6, 0.1, config.scale, true, "ScaleBar", nil, "Scale:", DF:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE"), DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
- scaleBar:SetPoint ("right", frame.Close, "left", -26, 0)
+ local scaleBar, text = DF:CreateSlider (frame, 120, 14, 0.6, 1.6, 0.1, config.scale, true, "ScaleBar", nil, "Scale:", DF:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE"), DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
+ --scaleBar:SetPoint ("right", frame.Close, "left", -26, 0)
+ text:SetPoint ("topleft", frame, "topleft", 12, -7)
scaleBar:SetFrameLevel (DF.FRAMELEVEL_OVERLAY)
scaleBar.OnValueChanged = function (_, _, value)
config.scale = value
@@ -1622,6 +1718,10 @@ function DF:CreateScaleBar (frame, config)
scaleBar:SetHook ("OnMouseUp", function()
frame:SetScale (config.scale)
end)
+
+ scaleBar:SetAlpha (0.2)
+
+ return scaleBar
end
local no_options = {}
@@ -3531,15 +3631,20 @@ function DF:CreateTabContainer (parent, title, frame_name, frame_list, options_t
tabButton.mainFrame = mainFrame
DF.TabContainerFunctions.CreateUnderlineGlow (tabButton)
+ local right_click_to_back
if (i == 1) then
- local right_click_to_back = DF:CreateLabel (f, "right click to close", 10, "gray")
+ right_click_to_back = DF:CreateLabel (f, "right click to close", 10, "gray")
right_click_to_back:SetPoint ("bottomright", f, "bottomright", -1, 0)
f.IsFrontPage = true
else
- local right_click_to_back = DF:CreateLabel (f, "right click to go back to main menu", 10, "gray")
+ right_click_to_back = DF:CreateLabel (f, "right click to go back to main menu", 10, "gray")
right_click_to_back:SetPoint ("bottomright", f, "bottomright", -1, 0)
end
+ if (options_table.hide_click_label) then
+ right_click_to_back:Hide()
+ end
+
f:SetScript ("OnMouseDown", DF.TabContainerFunctions.OnMouseDown)
f:SetScript ("OnMouseUp", DF.TabContainerFunctions.OnMouseUp)
@@ -3607,6 +3712,18 @@ local simple_list_box_GetOrCreateWidget = function (self)
widget:SetHook ("OnEnter", simple_list_box_onenter)
widget:SetHook ("OnLeave", simple_list_box_onleave)
widget.textcolor = self.options.textcolor
+ widget.textsize = self.options.text_size
+ widget.onleave_backdrop = self.options.backdrop_color
+
+ widget.XButton = DF:CreateButton (widget, function()end, 16, 16)
+ widget.XButton:SetPoint ("topright", widget.widget, "topright")
+ widget.XButton:SetIcon ([[Interface\BUTTONS\UI-Panel-MinimizeButton-Up]], 16, 16, "overlay", nil, nil, 0, -4, 0, false)
+ widget.XButton.icon:SetDesaturated (true)
+
+ if (not self.options.show_x_button) then
+ widget.XButton:Hide()
+ end
+
tinsert (self.widgets, widget)
end
self.nextWidget = self.nextWidget + 1
@@ -3620,16 +3737,29 @@ local simple_list_box_RefreshWidgets = function (self)
local widget = self:GetOrCreateWidget()
widget:SetPoint ("topleft", self, "topleft", 1, -self.options.row_height * (self.nextWidget-2) - 4)
widget:SetPoint ("topright", self, "topright", -1, -self.options.row_height * (self.nextWidget-2) - 4)
+
widget:SetClickFunction (self.func, value)
+
+ if (self.options.show_x_button) then
+ widget.XButton:SetClickFunction (self.options.x_button_func, value)
+ widget.XButton.value = value
+ widget.XButton:Show()
+ else
+ widget.XButton:Hide()
+ end
+
widget.value = value
if (self.options.icon) then
if (type (self.options.icon) == "string" or type (self.options.icon) == "number") then
- widget:SetIcon (self.options.icon, self.options.row_height, self.options.row_height)
+ local coords = type (self.options.iconcoords) == "table" and self.options.iconcoords or {0, 1, 0, 1}
+ widget:SetIcon (self.options.icon, self.options.row_height - 2, self.options.row_height - 2, "overlay", coords)
+
elseif (type (self.options.icon) == "function") then
local icon = self.options.icon (value)
if (icon) then
- widget:SetIcon (icon, self.options.row_height, self.options.row_height)
+ local coords = type (self.options.iconcoords) == "table" and self.options.iconcoords or {0, 1, 0, 1}
+ widget:SetIcon (icon, self.options.row_height - 2, self.options.row_height - 2, "overlay", coords)
end
end
else
@@ -3652,6 +3782,10 @@ local simple_list_box_RefreshWidgets = function (self)
end
widget.value = value
+
+ local r, g, b, a = DF:ParseColors (self.options.backdrop_color)
+ widget:SetBackdropColor (r, g, b, a)
+
widget:Show()
amt = amt + 1
end
@@ -3669,7 +3803,12 @@ local default_options = {
width = 230,
icon = false,
text = "",
+ text_size = 10,
textcolor = "wheat",
+
+ backdrop_color = {1, 1, 1, .5},
+ panel_border_color = {0, 0, 0, 0.5},
+
onenter = function (self, capsule)
if (capsule) then
capsule.textcolor = "white"
@@ -3697,16 +3836,27 @@ function DF:CreateSimpleListBox (parent, name, title, empty_text, list_table, on
f.nextWidget = 1
f.list_table = list_table
f.func = function (self, button, value)
- onclick (value)
+ --onclick (value)
+ DF:QuickDispatch (onclick, value)
f:Refresh()
end
f.widgets = {}
- f:SetBackdrop (backdrop)
- f:SetBackdropColor (0, 0, 0, 0.3)
- f:SetBackdropBorderColor (0, 0, 0, 0.5)
+
+ DF:ApplyStandardBackdrop (f)
+
f.options = options or {}
self.table.deploy (f.options, default_options)
+ if (f.options.x_button_func) then
+ local original_X_function = f.options.x_button_func
+ f.options.x_button_func = function (self, button, value)
+ DF:QuickDispatch (original_X_function, value)
+ f:Refresh()
+ end
+ end
+
+ f:SetBackdropBorderColor (unpack (f.options.panel_border_color))
+
f:SetSize (f.options.width + 2, f.options.height)
local name = DF:CreateLabel (f, title, 12, "silver")
@@ -3899,6 +4049,8 @@ end
function DF:CreateScrollBox (parent, name, refresh_func, data, width, height, line_amount, line_height, create_line_func, auto_amount, no_scroll)
local scroll = CreateFrame ("scrollframe", name, parent, "FauxScrollFrameTemplate")
+ DF:ApplyStandardBackdrop (scroll)
+
scroll:SetSize (width, height)
scroll.LineAmount = line_amount
scroll.LineHeight = line_height
@@ -3950,3 +4102,833 @@ function DF:CreateResizeGrips (parent)
return leftResizer, rightResizer
end
end
+
+
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- ~keybind
+
+
+--------------------------------
+--> keybind frame ~key
+
+
+local ignoredKeys = {
+ ["LSHIFT"] = true,
+ ["RSHIFT"] = true,
+ ["LCTRL"] = true,
+ ["RCTRL"] = true,
+ ["LALT"] = true,
+ ["RALT"] = true,
+ ["UNKNOWN"] = true,
+}
+
+local mouseKeys = {
+ ["LeftButton"] = "type1",
+ ["RightButton"] = "type2",
+ ["MiddleButton"] = "type3",
+ ["Button4"] = "type4",
+ ["Button5"] = "type5",
+ ["Button6"] = "type6",
+ ["Button7"] = "type7",
+ ["Button8"] = "type8",
+ ["Button9"] = "type9",
+ ["Button10"] = "type10",
+ ["Button11"] = "type11",
+ ["Button12"] = "type12",
+ ["Button13"] = "type13",
+ ["Button14"] = "type14",
+ ["Button15"] = "type15",
+ ["Button16"] = "type16",
+}
+
+local keysToMouse = {
+ ["type1"] = "LeftButton",
+ ["type2"] = "RightButton",
+ ["type3"] = "MiddleButton",
+ ["type4"] = "Button4",
+ ["type5"] = "Button5",
+ ["type6"] = "Button6",
+ ["type7"] = "Button7",
+ ["type8"] = "Button8",
+ ["type9"] = "Button9",
+ ["type10"] = "Button10",
+ ["type11"] = "Button11",
+ ["type12"] = "Button12",
+ ["type13"] = "Button13",
+ ["type14"] = "Button14",
+ ["type15"] = "Button15",
+ ["type16"] = "Button16",
+}
+
+local keybind_set_data = function (self, new_data_table)
+ self.Data = new_data_table
+ self.keybindScroll:UpdateScroll()
+end
+
+function DF:CreateKeybindBox (parent, name, data, callback, width, height, line_amount, line_height)
+
+ local options_text_template = DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")
+ local options_dropdown_template = DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
+ local options_switch_template = DF:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")
+ local options_slider_template = DF:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")
+ local options_button_template = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
+
+ local SCROLL_ROLL_AMOUNT = line_amount
+
+ --keybind set frame
+ local new_keybind_frame = CreateFrame ("frame", name, parent)
+ new_keybind_frame:SetSize (width, height)
+
+ -- keybind scrollframe
+ local keybindScroll = CreateFrame ("scrollframe", "$parentScrollFrame", new_keybind_frame, "FauxScrollFrameTemplate")
+ keybindScroll:SetSize (1019, 348)
+ keybindScroll.Frames = {}
+ new_keybind_frame.keybindScroll = keybindScroll
+
+ --waiting the player to press a key
+ new_keybind_frame.IsListening = false
+
+ --check for valid data table
+ if (type (data) ~= "table") then
+ print ("error: data must be a table. DF > CreateKeybindBox()")
+ return
+ end
+
+ if (not next (data)) then
+ --> build data table for the character class
+ local _, unitClass = UnitClass ("player")
+ if (unitClass) then
+ local specIds = DF:GetClassSpecIDs (unitClass)
+ if (specIds) then
+ for _, specId in ipairs (specIds) do
+ data [specId] = {}
+ end
+ end
+ end
+ end
+
+ new_keybind_frame.Data = data
+ new_keybind_frame.SetData = keybind_set_data
+
+ new_keybind_frame.EditingSpec = DF:GetCurrentSpec()
+ new_keybind_frame.CurrentKeybindEditingSet = new_keybind_frame.Data [new_keybind_frame.EditingSpec]
+
+ local allSpecButtons = {}
+ local switch_spec = function (self, button, specID)
+ new_keybind_frame.EditingSpec = specID
+ new_keybind_frame.CurrentKeybindEditingSet = new_keybind_frame.Data [specID]
+
+ for _, button in ipairs (allSpecButtons) do
+ button.selectedTexture:Hide()
+ end
+ self.MyObject.selectedTexture:Show()
+
+ --feedback ao jogador uma vez que as keybinds podem ter o mesmo valor
+ C_Timer.After (.04, function() new_keybind_frame:Hide() end)
+ C_Timer.After (.06, function() new_keybind_frame:Show() end)
+
+ --atualiza a scroll
+ keybindScroll:UpdateScroll()
+ end
+
+ --choose which spec to use
+ local spec1 = DF:CreateButton (new_keybind_frame, switch_spec, 160, 20, "Spec1 Placeholder Text", 1, _, _, "SpecButton1", _, 0, options_button_template, options_text_template)
+ local spec2 = DF:CreateButton (new_keybind_frame, switch_spec, 160, 20, "Spec2 Placeholder Text", 1, _, _, "SpecButton2", _, 0, options_button_template, options_text_template)
+ local spec3 = DF:CreateButton (new_keybind_frame, switch_spec, 160, 20, "Spec3 Placeholder Text", 1, _, _, "SpecButton3", _, 0, options_button_template, options_text_template)
+ local spec4 = DF:CreateButton (new_keybind_frame, switch_spec, 160, 20, "Spec4 Placeholder Text", 1, _, _, "SpecButton4", _, 0, options_button_template, options_text_template)
+
+ --format the button label and icon with the spec information
+ local className, class = UnitClass ("player")
+ local i = 1
+ local specIds = DF:GetClassSpecIDs (class)
+
+ for index, specId in ipairs (specIds) do
+ local button = new_keybind_frame ["SpecButton" .. index]
+ local spec_id, spec_name, spec_description, spec_icon, spec_background, spec_role, spec_class = GetSpecializationInfoByID (specId)
+ button.text = spec_name
+ button:SetClickFunction (switch_spec, specId)
+ button:SetIcon (spec_icon)
+ button.specID = specId
+
+ local selectedTexture = button:CreateTexture (nil, "background")
+ selectedTexture:SetAllPoints()
+ selectedTexture:SetColorTexture (1, 1, 1, 0.5)
+ if (specId ~= new_keybind_frame.EditingSpec) then
+ selectedTexture:Hide()
+ end
+ button.selectedTexture = selectedTexture
+
+ tinsert (allSpecButtons, button)
+ i = i + 1
+ end
+
+ local specsTitle = DF:CreateLabel (new_keybind_frame, "Config keys for spec:", 12, "silver")
+ specsTitle:SetPoint ("topleft", new_keybind_frame, "topleft", 10, mainStartY)
+
+ keybindScroll:SetPoint ("topleft", specsTitle.widget, "bottomleft", 0, -120)
+
+ spec1:SetPoint ("topleft", specsTitle, "bottomleft", 0, -10)
+ spec2:SetPoint ("topleft", specsTitle, "bottomleft", 0, -30)
+ spec3:SetPoint ("topleft", specsTitle, "bottomleft", 0, -50)
+ if (class == "DRUID") then
+ spec4:SetPoint ("topleft", specsTitle, "bottomleft", 0, -70)
+ end
+
+ local enter_the_key = CreateFrame ("frame", nil, new_keybind_frame)
+ enter_the_key:SetFrameStrata ("tooltip")
+ enter_the_key:SetSize (200, 60)
+ enter_the_key:SetBackdrop ({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
+ enter_the_key:SetBackdropColor (0, 0, 0, 1)
+ enter_the_key:SetBackdropBorderColor (1, 1, 1, 1)
+ enter_the_key.text = DF:CreateLabel (enter_the_key, "- Press a keyboard key to bind.\n- Click to bind a mouse button.\n- Press escape to cancel.", 11, "orange")
+ enter_the_key.text:SetPoint ("center", enter_the_key, "center")
+ enter_the_key:Hide()
+
+ local registerKeybind = function (self, key)
+ if (ignoredKeys [key]) then
+ return
+ end
+ if (key == "ESCAPE") then
+ enter_the_key:Hide()
+ new_keybind_frame.IsListening = false
+ new_keybind_frame:SetScript ("OnKeyDown", nil)
+ return
+ end
+
+ local bind = (IsShiftKeyDown() and "SHIFT-" or "") .. (IsControlKeyDown() and "CTRL-" or "") .. (IsAltKeyDown() and "ALT-" or "")
+ bind = bind .. key
+
+ --adiciona para a tabela de keybinds
+ local keybind = new_keybind_frame.CurrentKeybindEditingSet [self.keybindIndex]
+ keybind.key = bind
+
+ new_keybind_frame.IsListening = false
+ new_keybind_frame:SetScript ("OnKeyDown", nil)
+
+ enter_the_key:Hide()
+ new_keybind_frame.keybindScroll:UpdateScroll()
+
+ DF:QuickDispatch (callback)
+ end
+
+ local set_keybind_key = function (self, button, keybindIndex)
+ if (new_keybind_frame.IsListening) then
+ key = mouseKeys [button] or button
+ return registerKeybind (new_keybind_frame, key)
+ end
+ new_keybind_frame.IsListening = true
+ new_keybind_frame.keybindIndex = keybindIndex
+ new_keybind_frame:SetScript ("OnKeyDown", registerKeybind)
+
+ enter_the_key:Show()
+ enter_the_key:SetPoint ("bottom", self, "top")
+ end
+
+ local new_key_bind = function (self, button, specID)
+ tinsert (new_keybind_frame.CurrentKeybindEditingSet, {key = "-none-", action = "_target", actiontext = ""})
+ FauxScrollFrame_SetOffset (new_keybind_frame.keybindScroll, max (#new_keybind_frame.CurrentKeybindEditingSet-SCROLL_ROLL_AMOUNT, 0))
+ new_keybind_frame.keybindScroll:UpdateScroll()
+ end
+
+ local set_action_text = function (keybindIndex, _, text)
+ local keybind = new_keybind_frame.CurrentKeybindEditingSet [keybindIndex]
+ keybind.actiontext = text
+ DF:QuickDispatch (callback)
+ end
+
+ local set_action_on_espace_press = function (textentry, capsule)
+ capsule = capsule or textentry.MyObject
+ local keybind = new_keybind_frame.CurrentKeybindEditingSet [capsule.CurIndex]
+ textentry:SetText (keybind.actiontext)
+ DF:QuickDispatch (callback)
+ end
+
+ local lock_textentry = {
+ ["_target"] = true,
+ ["_taunt"] = true,
+ ["_interrupt"] = true,
+ ["_dispel"] = true,
+ ["_spell"] = false,
+ ["_macro"] = false,
+ }
+
+ local change_key_action = function (self, keybindIndex, value)
+ local keybind = new_keybind_frame.CurrentKeybindEditingSet [keybindIndex]
+ keybind.action = value
+ new_keybind_frame.keybindScroll:UpdateScroll()
+ DF:QuickDispatch (callback)
+ end
+ local fill_action_dropdown = function()
+
+ local locClass, class = UnitClass ("player")
+
+ local taunt = ""
+ local interrupt = ""
+ local dispel = ""
+
+ if (type (dispel) == "table") then
+ local dispelString = "\n"
+ for specID, spellid in pairs (dispel) do
+ local specid, specName = GetSpecializationInfoByID (specID)
+ local spellName = GetSpellInfo (spellid)
+ dispelString = dispelString .. "|cFFE5E5E5" .. specName .. "|r: |cFFFFFFFF" .. spellName .. "\n"
+ end
+ dispel = dispelString
+ else
+ dispel = ""
+ end
+
+ return {
+ --{value = "_target", label = "Target", onclick = change_key_action, desc = "Target the unit"},
+ --{value = "_taunt", label = "Taunt", onclick = change_key_action, desc = "Cast the taunt spell for your class\n\n|cFFFFFFFFSpell: " .. taunt},
+ --{value = "_interrupt", label = "Interrupt", onclick = change_key_action, desc = "Cast the interrupt spell for your class\n\n|cFFFFFFFFSpell: " .. interrupt},
+ --{value = "_dispel", label = "Dispel", onclick = change_key_action, desc = "Cast the interrupt spell for your class\n\n|cFFFFFFFFSpell: " .. dispel},
+ {value = "_spell", label = "Cast Spell", onclick = change_key_action, desc = "Type the spell name in the text box"},
+ {value = "_macro", label = "Run Macro", onclick = change_key_action, desc = "Type your macro in the text box"},
+ }
+ end
+
+ local copy_keybind = function (self, button, keybindIndex)
+ local keybind = new_keybind_frame.CurrentKeybindEditingSet [keybindIndex]
+ for specID, t in pairs (new_keybind_frame.Data) do
+ if (specID ~= new_keybind_frame.EditingSpec) then
+ local key = CopyTable (keybind)
+ local specid, specName = GetSpecializationInfoByID (specID)
+ tinsert (new_keybind_frame.Data [specID], key)
+ DF:Msg ("Keybind copied to " .. specName)
+ end
+ end
+ DF:QuickDispatch (callback)
+ end
+
+ local delete_keybind = function (self, button, keybindIndex)
+ tremove (new_keybind_frame.CurrentKeybindEditingSet, keybindIndex)
+ new_keybind_frame.keybindScroll:UpdateScroll()
+ DF:QuickDispatch (callback)
+ end
+
+ local newTitle = DF:CreateLabel (new_keybind_frame, "Create a new Keybind:", 12, "silver")
+ newTitle:SetPoint ("topleft", new_keybind_frame, "topleft", 200, mainStartY)
+ local createNewKeybind = DF:CreateButton (new_keybind_frame, new_key_bind, 160, 20, "New Key Bind", 1, _, _, "NewKeybindButton", _, 0, options_button_template, options_text_template)
+ createNewKeybind:SetPoint ("topleft", newTitle, "bottomleft", 0, -10)
+ --createNewKeybind:SetIcon ([[Interface\Buttons\UI-GuildButton-PublicNote-Up]])
+
+ local update_keybind_list = function (self)
+
+ local keybinds = new_keybind_frame.CurrentKeybindEditingSet
+ FauxScrollFrame_Update (self, #keybinds, SCROLL_ROLL_AMOUNT, 21)
+ local offset = FauxScrollFrame_GetOffset (self)
+
+ for i = 1, SCROLL_ROLL_AMOUNT do
+ local index = i + offset
+ local f = self.Frames [i]
+ local data = keybinds [index]
+
+ if (data) then
+ --index
+ f.Index.text = index
+ --keybind
+ local keyBindText = keysToMouse [data.key] or data.key
+
+ keyBindText = keyBindText:gsub ("type1", "LeftButton")
+ keyBindText = keyBindText:gsub ("type2", "RightButton")
+ keyBindText = keyBindText:gsub ("type3", "MiddleButton")
+
+ f.KeyBind.text = keyBindText
+ f.KeyBind:SetClickFunction (set_keybind_key, index, nil, "left")
+ f.KeyBind:SetClickFunction (set_keybind_key, index, nil, "right")
+ --action
+ f.ActionDrop:SetFixedParameter (index)
+ f.ActionDrop:Select (data.action)
+ --action text
+ f.ActionText.text = data.actiontext
+ f.ActionText:SetEnterFunction (set_action_text, index)
+ f.ActionText.CurIndex = index
+
+ if (lock_textentry [data.action]) then
+ f.ActionText:Disable()
+ else
+ f.ActionText:Enable()
+ end
+
+ --copy
+ f.Copy:SetClickFunction (copy_keybind, index)
+ --delete
+ f.Delete:SetClickFunction (delete_keybind, index)
+
+ f:Show()
+ else
+ f:Hide()
+ end
+ end
+
+ self:Show()
+ end
+
+
+
+ keybindScroll:SetScript ("OnVerticalScroll", function (self, offset)
+ FauxScrollFrame_OnVerticalScroll (self, offset, 21, update_keybind_list)
+ end)
+ keybindScroll.UpdateScroll = update_keybind_list
+
+ local backdropColor = {.3, .3, .3, .3}
+ local backdropColorOnEnter = {.6, .6, .6, .6}
+ local on_enter = function (self)
+ self:SetBackdropColor (unpack (backdropColorOnEnter))
+ end
+ local on_leave = function (self)
+ self:SetBackdropColor (unpack (backdropColor))
+ end
+
+ local font = "GameFontHighlightSmall"
+
+ for i = 1, SCROLL_ROLL_AMOUNT do
+ local f = CreateFrame ("frame", "$KeyBindFrame" .. i, keybindScroll)
+ f:SetSize (1009, 20)
+ f:SetPoint ("topleft", keybindScroll, "topleft", 0, -(i-1)*29)
+ f:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
+ f:SetBackdropColor (unpack (backdropColor))
+ f:SetScript ("OnEnter", on_enter)
+ f:SetScript ("OnLeave", on_leave)
+ tinsert (keybindScroll.Frames, f)
+
+ f.Index = DF:CreateLabel (f, "1")
+ f.KeyBind = DF:CreateButton (f, set_key_bind, 100, 20, "", _, _, _, "SetNewKeybindButton", _, 0, options_button_template, options_text_template)
+ f.ActionDrop = DF:CreateDropDown (f, fill_action_dropdown, 0, 120, 20, "ActionDropdown", _, options_dropdown_template)
+ f.ActionText = DF:CreateTextEntry (f, function()end, 660, 20, "TextBox", _, _, options_dropdown_template)
+ f.Copy = DF:CreateButton (f, copy_keybind, 20, 20, "", _, _, _, "CopyKeybindButton", _, 0, options_button_template, options_text_template)
+ f.Delete = DF:CreateButton (f, delete_keybind, 16, 20, "", _, _, _, "DeleteKeybindButton", _, 2, options_button_template, options_text_template)
+
+ f.Index:SetPoint ("left", f, "left", 10, 0)
+ f.KeyBind:SetPoint ("left", f, "left", 43, 0)
+ f.ActionDrop:SetPoint ("left", f, "left", 150, 0)
+ f.ActionText:SetPoint ("left", f, "left", 276, 0)
+ f.Copy:SetPoint ("left", f, "left", 950, 0)
+ f.Delete:SetPoint ("left", f, "left", 990, 0)
+
+ f.Copy:SetIcon ([[Interface\Buttons\UI-GuildButton-PublicNote-Up]], nil, nil, nil, nil, nil, nil, 4)
+ f.Delete:SetIcon ([[Interface\Buttons\UI-StopButton]], nil, nil, nil, nil, nil, nil, 4)
+
+ f.Copy.tooltip = "copy this keybind to other specs"
+ f.Delete.tooltip = "erase this keybind"
+
+ --editbox
+ f.ActionText:SetJustifyH ("left")
+ f.ActionText:SetHook ("OnEscapePressed", set_action_on_espace_press)
+ f.ActionText:SetHook ("OnEditFocusGained", function()
+ local playerSpells = {}
+ local tab, tabTex, offset, numSpells = GetSpellTabInfo (2)
+ for i = 1, numSpells do
+ local index = offset + i
+ local spellType, spellId = GetSpellBookItemInfo (index, "player")
+ if (spellType == "SPELL") then
+ local spellName = GetSpellInfo (spellId)
+ tinsert (playerSpells, spellName)
+ end
+ end
+ f.ActionText.WordList = playerSpells
+ end)
+
+ f.ActionText:SetAsAutoComplete ("WordList")
+ end
+
+ local header = CreateFrame ("frame", "$parentOptionsPanelFrameHeader", keybindScroll)
+ header:SetPoint ("bottomleft", keybindScroll, "topleft", 0, 2)
+ header:SetPoint ("bottomright", keybindScroll, "topright", 0, 2)
+ header:SetHeight (16)
+
+ header.Index = DF:CreateLabel (header, "Index", DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
+ header.Key = DF:CreateLabel (header, "Key", DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
+ header.Action = DF:CreateLabel (header, "Action", DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
+ header.Macro = DF:CreateLabel (header, "Spell Name / Macro", DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
+ header.Copy = DF:CreateLabel (header, "Copy", DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
+ header.Delete = DF:CreateLabel (header, "Delete", DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
+
+ header.Index:SetPoint ("left", header, "left", 10, 0)
+ header.Key:SetPoint ("left", header, "left", 43, 0)
+ header.Action:SetPoint ("left", header, "left", 150, 0)
+ header.Macro:SetPoint ("left", header, "left", 276, 0)
+ header.Copy:SetPoint ("left", header, "left", 950, 0)
+ header.Delete:SetPoint ("left", header, "left", 990, 0)
+
+ new_keybind_frame:SetScript ("OnShow", function()
+
+ --new_keybind_frame.EditingSpec = EnemyGrid.CurrentSpec
+ --new_keybind_frame.CurrentKeybindEditingSet = EnemyGrid.CurrentKeybindSet
+
+ for _, button in ipairs (allSpecButtons) do
+ if (new_keybind_frame.EditingSpec ~= button.specID) then
+ button.selectedTexture:Hide()
+ else
+ button.selectedTexture:Show()
+ end
+ end
+
+ keybindScroll:UpdateScroll()
+ end)
+
+ new_keybind_frame:SetScript ("OnHide", function()
+ if (new_keybind_frame.IsListening) then
+ new_keybind_frame.IsListening = false
+ new_keybind_frame:SetScript ("OnKeyDown", nil)
+ end
+ end)
+
+ return new_keybind_frame
+end
+
+function DF:BuildKeybindFunctions (data, prefix)
+
+ --~keybind
+ local classLoc, class = UnitClass ("player")
+ local bindingList = data
+
+ local bindString = "self:ClearBindings();"
+ local bindKeyBindTypeFunc = [[local unitFrame = ...;]]
+ local bindMacroTextFunc = [[local unitFrame = ...;]]
+ local isMouseBinding
+
+ for i = 1, #bindingList do
+ local bind = bindingList [i]
+ local bindType
+
+ --which button to press
+ if (bind.key:find ("type")) then
+ local keyNumber = tonumber (bind.key:match ("%d"))
+ bindType = keyNumber
+ isMouseBinding = true
+ else
+ bindType = prefix .. "" .. i
+ bindString = bindString .. "self:SetBindingClick (0, '" .. bind.key .. "', self:GetName(), '" .. bindType .. "');"
+ bindType = "-" .. prefix .. "" .. i
+ isMouseBinding = nil
+ end
+
+ --keybind type
+ local shift, alt, ctrl = bind.key:match ("SHIFT"), bind.key:match ("ALT"), bind.key:match ("CTRL")
+ local CommandKeys = alt and alt .. "-" or ""
+ CommandKeys = ctrl and CommandKeys .. ctrl .. "-" or CommandKeys
+ CommandKeys = shift and CommandKeys .. shift .. "-" or CommandKeys
+
+ local keyBindType
+ if (isMouseBinding) then
+ keyBindType = [[unitFrame:SetAttribute ("@COMMANDtype@BINDTYPE", "macro");]]
+ else
+ keyBindType = [[unitFrame:SetAttribute ("type@BINDTYPE", "macro");]]
+ end
+
+ keyBindType = keyBindType:gsub ("@BINDTYPE", bindType)
+ keyBindType = keyBindType:gsub ("@COMMAND", CommandKeys)
+ bindKeyBindTypeFunc = bindKeyBindTypeFunc .. keyBindType
+
+ --spell or macro
+ if (bind.action == "_spell") then
+ local macroTextLine
+ if (isMouseBinding) then
+ macroTextLine = [[unitFrame:SetAttribute ("@COMMANDmacrotext@BINDTYPE", "/cast [@mouseover] @SPELL");]]
+ else
+ macroTextLine = [[unitFrame:SetAttribute ("macrotext@BINDTYPE", "/cast [@mouseover] @SPELL");]]
+ end
+ macroTextLine = macroTextLine:gsub ("@BINDTYPE", bindType)
+ macroTextLine = macroTextLine:gsub ("@SPELL", bind.actiontext)
+ macroTextLine = macroTextLine:gsub ("@COMMAND", CommandKeys)
+ bindMacroTextFunc = bindMacroTextFunc .. macroTextLine
+
+ elseif (bind.action == "_macro") then
+ local macroTextLine
+ if (isMouseBinding) then
+ macroTextLine = [[unitFrame:SetAttribute ("@COMMANDmacrotext@BINDTYPE", "@MACRO");]]
+ else
+ macroTextLine = [[unitFrame:SetAttribute ("macrotext@BINDTYPE", "@MACRO");]]
+ end
+ macroTextLine = macroTextLine:gsub ("@BINDTYPE", bindType)
+ macroTextLine = macroTextLine:gsub ("@MACRO", bind.actiontext)
+ macroTextLine = macroTextLine:gsub ("@COMMAND", CommandKeys)
+ bindMacroTextFunc = bindMacroTextFunc .. macroTextLine
+
+ end
+ end
+
+ --~key
+ local bindTypeFuncLoaded = loadstring (bindKeyBindTypeFunc)
+ local bindMacroFuncLoaded = loadstring (bindMacroTextFunc)
+
+ if (not bindMacroFuncLoaded or not bindTypeFuncLoaded) then
+ return
+ end
+
+ return bindString, bindTypeFuncLoaded, bindMacroFuncLoaded
+end
+
+
+function DF:SetKeybindsOnProtectedFrame (frame, bind_string, bind_type_func, bind_macro_func)
+
+ bind_type_func (frame)
+ bind_macro_func (frame)
+ frame:SetAttribute ("_onenter", bind_string)
+
+end
+
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- ~standard backdrop
+
+function DF:ApplyStandardBackdrop (f, darkTheme, alphaScale)
+ alphaScale = alphaScale or 1.0
+
+ if (darkTheme) then
+ f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Cooldown\cooldown2]], tileSize = 32, tile = true})
+ f:SetBackdropBorderColor (0, 0, 0, 1)
+ f:SetBackdropColor (.54, .54, .54, .54 * alphaScale)
+ else
+ f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
+ f:SetBackdropBorderColor (0, 0, 0, 1)
+ f:SetBackdropColor (0, 0, 0, 0.2 * alphaScale)
+ end
+
+ if (not f.__background) then
+ f.__background = f:CreateTexture (nil, "background")
+ end
+
+ f.__background:SetColorTexture (0.2317647, 0.2317647, 0.2317647)
+ f.__background:SetVertexColor (0.27, 0.27, 0.27)
+ f.__background:SetAlpha (0.8 * alphaScale)
+ f.__background:SetVertTile (true)
+ f.__background:SetHorizTile (true)
+ f.__background:SetAllPoints()
+end
+
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- ~title bar
+
+DF.TitleFunctions = {
+
+ SetTitle = function (self, titleText, titleColor, font, size)
+ self.TitleLabel:SetText (titleText or self.TitleLabel:GetText())
+
+ if (titleColor) then
+ local r, g, b, a = DF:ParseColors (titleColor)
+ self.TitleLabel:SetTextColor (r, g, b, a)
+ end
+
+ if (font) then
+ DF:SetFontFace (self.TitleLabel, font)
+ end
+
+ if (size) then
+ DF:SetFontSize (self.TitleLabel, size)
+ end
+ end
+
+
+}
+
+function DF:CreateTitleBar (f, titleText)
+
+ local titleBar = CreateFrame ("frame", f:GetName() and f:GetName() .. "TitleBar" or nil, f)
+ titleBar:SetPoint ("topleft", f, "topleft", 2, -3)
+ titleBar:SetPoint ("topright", f, "topright", -2, -3)
+ titleBar:SetHeight (20)
+ titleBar:SetBackdrop (SimplePanel_frame_backdrop) --it's an upload from this file
+ titleBar:SetBackdropColor (.2, .2, .2, 1)
+ titleBar:SetBackdropBorderColor (0, 0, 0, 1)
+
+ local closeButton = CreateFrame ("button", titleBar:GetName() and titleBar:GetName() .. "CloseButton" or nil, titleBar)
+ closeButton:SetSize (16, 16)
+ closeButton:SetNormalTexture (DF.folder .. "icons")
+ closeButton:SetHighlightTexture (DF.folder .. "icons")
+ closeButton:SetPushedTexture (DF.folder .. "icons")
+ closeButton:GetNormalTexture():SetTexCoord (0, 16/128, 0, 1)
+ closeButton:GetHighlightTexture():SetTexCoord (0, 16/128, 0, 1)
+ closeButton:GetPushedTexture():SetTexCoord (0, 16/128, 0, 1)
+ closeButton:SetAlpha (0.7)
+ closeButton:SetScript ("OnClick", simple_panel_close_click) --upvalue from this file
+
+ local titleLabel = titleBar:CreateFontString (titleBar:GetName() and titleBar:GetName() .. "TitleText" or nil, "overlay", "GameFontNormal")
+ titleLabel:SetTextColor (.8, .8, .8, 1)
+ titleLabel:SetText (titleText or "")
+
+ --anchors
+ closeButton:SetPoint ("right", titleBar, "right", -2, 0)
+ titleLabel:SetPoint ("center", titleBar, "center")
+
+ --members
+ f.TitleBar = titleBar
+ f.CloseButton = closeButton
+ f.TitleLabel = titleLabel
+
+ DF:Mixin (f, DF.TitleFunctions)
+
+ return titleBar
+end
+
+
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- ~icon row
+
+DF.IconRowFunctions = {
+
+ GetIcon = function (self)
+ local iconFrame = self.IconPool [self.NextIcon]
+
+ if (not iconFrame) then
+ local newIconFrame = CreateFrame ("cooldown", "$parentIconCooldown" .. self.NextIcon, self, "CooldownFrameTemplate")
+ newIconFrame:SetSize (self.options.icon_width, self.options.icon_height)
+
+ newIconFrame.Texture = newIconFrame:CreateTexture (nil, "background")
+ newIconFrame.Texture:SetAllPoints()
+
+ newIconFrame.Text = newIconFrame:CreateFontString (nil, "overlay", "GameFontNormal")
+ newIconFrame.Text:SetPoint ("center")
+ newIconFrame.Text:Hide()
+
+ newIconFrame:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
+ newIconFrame:SetBackdropBorderColor (0, 0, 0, 0)
+ newIconFrame:EnableMouse (false)
+
+ self.IconPool [self.NextIcon] = newIconFrame
+ iconFrame = newIconFrame
+ end
+
+ iconFrame:ClearAllPoints()
+
+ local anchor = self.options.anchor
+ local anchorTo = self.NextIcon == 1 and self or self.IconPool [self.NextIcon - 1]
+ local xPadding = self.NextIcon == 1 and self.options.left_padding or self.options.icon_padding
+ local growDirection = self.options.grow_direction
+
+ if (growDirection == 1) then --grow to right
+ if (self.NextIcon == 1) then
+ iconFrame:SetPoint ("left", anchorTo, "left", xPadding, 0)
+ else
+ iconFrame:SetPoint ("left", anchorTo, "right", xPadding, 0)
+ end
+
+ elseif (growDirection == 2) then --grow to left
+ if (self.NextIcon == 1) then
+ iconFrame:SetPoint ("right", anchorTo, "right", xPadding, 0)
+ else
+ iconFrame:SetPoint ("right", anchorTo, "left", xPadding, 0)
+ end
+
+ end
+
+ DF:SetFontColor (iconFrame.Text, self.options.text_color)
+
+ self.NextIcon = self.NextIcon + 1
+ return iconFrame
+ end,
+
+ SetIcon = function (self, spellId, borderColor, startTime, duration)
+ local spellName, _, spellIcon = GetSpellInfo (spellId)
+
+ if (spellIcon) then
+ local iconFrame = self:GetIcon()
+ iconFrame.Texture:SetTexture (spellIcon)
+ iconFrame.Texture:SetTexCoord (unpack (self.options.texcoord))
+
+ if (borderColor) then
+ iconFrame:SetBackdropBorderColor (Plater:ParseColors (borderColor))
+ else
+ iconFrame:SetBackdropBorderColor (0, 0, 0 ,0)
+ end
+
+ if (startTime) then
+ CooldownFrame_Set (iconFrame, startTime, duration, true, true)
+
+ if (self.options.show_text) then
+ iconFrame.Text:Show()
+ iconFrame.Text:SetText (floor (startTime + duration - GetTime()))
+ else
+ iconFrame.Text:Hide()
+ end
+ else
+ iconFrame.Text:Hide()
+ end
+
+ iconFrame:Show()
+
+ --> update the size of the frame
+ self:SetWidth ((self.options.left_padding * 2) + (self.options.icon_padding * (self.NextIcon-2)) + (self.options.icon_width * (self.NextIcon - 1)))
+
+ --> show the frame
+ self:Show()
+
+ return iconFrame
+ end
+ end,
+
+ ClearIcons = function (self)
+ for i = 1, self.NextIcon -1 do
+ self.IconPool [i]:Hide()
+ end
+ self.NextIcon = 1
+ self:Hide()
+ end,
+
+ GetIconGrowDirection = function (self)
+ local side = self.options.anchor.side
+
+ if (side == 1) then
+ return 1
+ elseif (side == 2) then
+ return 2
+ elseif (side == 3) then
+ return 1
+ elseif (side == 4) then
+ return 1
+ elseif (side == 5) then
+ return 2
+ elseif (side == 6) then
+ return 1
+ elseif (side == 7) then
+ return 2
+ elseif (side == 8) then
+ return 1
+ elseif (side == 9) then
+ return 1
+ elseif (side == 10) then
+ return 1
+ elseif (side == 11) then
+ return 2
+ elseif (side == 12) then
+ return 1
+ elseif (side == 13) then
+ return 1
+ end
+ end
+}
+
+local default_icon_row_options = {
+ icon_width = 20,
+ icon_height = 20,
+ texcoord = {.1, .9, .1, .9},
+ show_text = true,
+ text_color = {1, 1, 1, 1},
+ left_padding = 2, --distance between right and left
+ top_padding = 2, --distance between top and bottom
+ icon_padding = 2, --distance between each icon
+ backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true},
+ backdrop_color = {0, 0, 0, 0.5},
+ backdrop_border_color = {0, 0, 0, 1},
+ anchor = {side = 6, x = 2, y = 0},
+ grow_direction = 1, --1 = to right 2 = to left
+}
+
+function DF:CreateIconRow (parent, name, options)
+ local f = CreateFrame ("frame", name, parent)
+ f.IconPool = {}
+ f.NextIcon = 1
+
+ DF:Mixin (f, DF.IconRowFunctions)
+ DF:Mixin (f, DF.OptionsFunctions)
+
+ f:BuildOptionsTable (default_icon_row_options, options)
+
+ f:SetSize (f.options.icon_width, f.options.icon_height + (f.options.top_padding * 2))
+ f:SetBackdrop (f.options.backdrop)
+ f:SetBackdropColor (unpack (f.options.backdrop_color))
+ f:SetBackdropBorderColor (unpack (f.options.backdrop_border_color))
+
+ return f
+end
diff --git a/Libs/DF/slider.lua b/Libs/DF/slider.lua
index d878915c..b92d1457 100644
--- a/Libs/DF/slider.lua
+++ b/Libs/DF/slider.lua
@@ -338,7 +338,6 @@ local DFSliderMetaFunctions = _G [DF.GlobalWidgetControlNames ["slider"]]
--> scripts
local OnEnter = function (slider)
-
if (_rawget (slider.MyObject, "lockdown")) then
return
end
@@ -362,8 +361,8 @@ local DFSliderMetaFunctions = _G [DF.GlobalWidgetControlNames ["slider"]]
GameCooltip2:AddLine (slider.MyObject.have_tooltip)
GameCooltip2:ShowCooltip (slider, "tooltip")
else
- GameCooltip2:Preset (1)
- GameCooltip2:AddLine ("Right Click to Type the Value")
+ GameCooltip2:Preset (2)
+ GameCooltip2:AddLine ("Right Click to Type the Value", "", 1, "", "", 10)
GameCooltip2:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 16, 16, 0.015625, 0.15671875, 0.640625, 0.798828125)
GameCooltip2:ShowCooltip (slider, "tooltip")
end
@@ -396,7 +395,6 @@ local DFSliderMetaFunctions = _G [DF.GlobalWidgetControlNames ["slider"]]
local f = CreateFrame ("frame", "DetailsFrameworkSliderButtons1", UIParent)
f:Hide()
- --f:SetBackdrop ({bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]], tile = true, tileSize = 5})
f:SetHeight (18)
local t = 0
@@ -413,8 +411,9 @@ local DFSliderMetaFunctions = _G [DF.GlobalWidgetControlNames ["slider"]]
function f:ShowMe (host)
f:SetPoint ("bottomleft", host, "topleft", -3, -5)
f:SetPoint ("bottomright", host, "topright", 3, -5)
- f:SetFrameStrata (host:GetFrameStrata())
- f:SetFrameLevel (host:GetFrameLevel())
+ --f:SetFrameStrata (host:GetFrameStrata())
+ f:SetFrameStrata ("FULLSCREEN")
+ f:SetFrameLevel (host:GetFrameLevel() + 1000)
f:Show()
if (f.is_going_hide) then
f:SetScript ("OnUpdate", nil)
@@ -1146,7 +1145,6 @@ function DF:NewSlider (parent, container, name, member, w, h, min, max, step, de
SliderObject.slider:SetBackdrop ({edgeFile = "Interface\\Buttons\\UI-SliderBar-Border", edgeSize = 8})
SliderObject.slider:SetBackdropColor (0.9, 0.7, 0.7, 1.0)
- --SliderObject.slider:SetBackdropColor (0, 0, 0, 1)
SliderObject.thumb = SliderObject.slider:CreateTexture (nil, "artwork")
SliderObject.thumb:SetTexture ("Interface\\Buttons\\UI-ScrollBar-Knob")
diff --git a/Libs/DF/spells.lua b/Libs/DF/spells.lua
new file mode 100644
index 00000000..3313c836
--- /dev/null
+++ b/Libs/DF/spells.lua
@@ -0,0 +1,595 @@
+
+local DF = _G ["DetailsFramework"]
+if (not DF or not DetailsFrameworkCanLoad) then
+ return
+end
+
+DF.CooldownsBySpec = {
+ -- 1 attack cooldown
+ -- 2 personal defensive cooldown
+ -- 3 targetted defensive cooldown
+ -- 4 raid defensive cooldown
+ -- 5 personal utility cooldown
+
+ --MAGE
+ --arcane
+ [62] = {
+ [12042] = 1, --Arcane Power
+ [55342] = 1, --Mirror Image
+ [45438] = 2, --Ice Block
+ [12051] = 5, --Evocation
+ [110960] = 5, --Greater Invisibility
+ },
+ --fire
+ [63] = {
+ [190319] = 1, --Combustion
+ [55342] = 1, --Mirror Image
+ [45438] = 2, --Ice Block
+ [66] = 5, --Invisibility
+ },
+ --frost
+ [64] = {
+ [12472] = 1, --Icy Veins
+ [205021] = 1, --Ray of Frost
+ [55342] = 1, --Mirror Image
+ [45438] = 2, --Ice Block
+ [66] = 5, --Invisibility
+ [235219] = 5, --Cold Snap
+ },
+
+ --PRIEST
+ --discipline
+ [256] = {
+ [34433] = 1, --Shadowfiend
+ [123040] = 1, --Mindbender
+ [33206] = 3, --Pain Suppression
+ [62618] = 4, --Power Word: Barrier
+ [271466] = 4, --Luminous Barrier (talent)
+ [47536] = 5, --Rapture
+ [19236] = 5, --Desperate Prayer
+ [8122] = 5, --Psychic Scream
+ },
+ --holy
+ [257] = {
+ [200183] = 2, --Apotheosis
+ [47788] = 3, --Guardian Spirit
+ [64844] = 4, --Divine Hymn
+ [64901] = 4, --Symbol of Hope
+ [265202] = 4, --Holy Word: Salvation
+ [88625] = 5, --Holy Word: Chastise
+ [34861] = 5, --Holy Word: Sanctify
+ [2050] = 5, --Holy Word: Serenity
+ [19236] = 5, --Desperate Prayer
+ [8122] = 5, --Psychic Scream
+ },
+ --shadow priest
+ [258] = {
+ [34433] = 1, --Shadowfiend
+ [200174] = 1, --Mindbender
+ [193223] = 1, --Surrender to Madness
+ [47585] = 2, --Dispersion
+ [15286] = 4, --Vampiric Embrace
+ [64044] = 5, --Psychic Horror
+ [8122] = 5, --Psychic Scream
+ },
+
+ --ROGUE
+ --assassination
+ [259] = {
+ [79140] = 1, --Vendetta
+ [1856] = 2, --Vanish
+ [5277] = 2, --Evasion
+ [31224] = 2, --Cloak of Shadows
+ [2094] = 5, --Blind
+ [114018] = 5, --Shroud of Concealment
+ },
+ --outlaw
+ [260] = {
+ [13750] = 1, --Adrenaline Rush
+ [51690] = 1, --Killing Spree (talent)
+ [199754] = 2, --Riposte
+ [31224] = 2, --Cloak of Shadows
+ [1856] = 2, --Vanish
+ [2094] = 5, --Blind
+ [114018] = 5, --Shroud of Concealment
+ },
+ --subtlety
+ [261] = {
+ [121471] = 1, --Shadow Blades
+ [31224] = 2, --Cloak of Shadows
+ [1856] = 2, --Vanish
+ [5277] = 2, --Evasion
+ [2094] = 5, --Blind
+ [114018] = 5, --Shroud of Concealment
+ },
+
+ --WARLOCK
+ --affliction
+ [265] = {
+ [205180] = 1, --Summon Darkglare
+ [113860] = 1, --Dark Soul: Misery
+ [104773] = 2, --Unending Resolve
+
+ [108416] = 2, --Dark Pact
+
+ [30283] = 5, --Shadowfury
+ [6789] = 5, --Mortal Coil
+ },
+ --demo
+ [266] = {
+ [265187] = 1, --Summon Demonic Tyrant
+ [111898] = 1, --Grimoire: Felguard
+ [267217] = 1, --Nether Portal
+
+ [104773] = 2, --Unending Resolve
+ [108416] = 2, --Dark Pact
+
+ [30283] = 5, --Shadowfury
+ [6789] = 5, --Mortal Coil
+ },
+ --destro
+ [267] = {
+ [1122] = 1, --Summon Infernal
+ [113858] = 1, --Dark Soul: Instability
+
+ [104773] = 2, --Unending Resolve
+ [108416] = 2, --Dark Pact
+
+ [6789] = 5, --Mortal Coil
+ [30283] = 5, --Shadowfury
+ },
+
+ --WARRIOR
+ --Arms
+ [71] = {
+ [107574] = 1, --Avatar
+ [227847] = 1, --Bladestorm
+ [152277] = 1, --Ravager (talent)
+
+ [118038] = 2, --Die by the Sword
+
+ [97462] = 4, --Rallying Cry
+
+ [18499] = 5, --Berserker Rage
+ [5246] = 5, --Intimidating Shout
+ },
+ --Fury
+ [72] = {
+ [1719] = 1, --Recklessness
+ [46924] = 1, --Bladestorm (talent)
+
+ [184364] = 2, --Enraged Regeneration
+
+ [97462] = 4, --Rallying Cry
+
+ [18499] = 5, --Berserker Rage
+ [5246] = 5, --Intimidating Shout
+ },
+ --Protection
+ [73] = {
+ [228920] = 1, --Ravager (talent)
+ [107574] = 1, --Avatar
+
+ [12975] = 2, --Last Stand
+ [871] = 2, --Shield Wall
+
+ [97462] = 4, --Rallying Cry
+
+ [18499] = 5, --Berserker Rage
+ [5246] = 5, --Intimidating Shout
+ },
+
+ --PALADIN
+ --holy
+ [65] = {
+ [31884] = 1, --Avenging Wrath
+ [216331] = 1, --Avenging Crusader (talent)
+
+ [498] = 2, --Divine Protection
+ [642] = 2, --Divine Shield
+ [105809] = 2, --Holy Avenger (talent)
+
+ [1022] = 3, --Blessing of Protection
+ [633] = 3, --Lay on Hands
+
+ [31821] = 4, --Aura Mastery
+
+ [1044] = 5, --Blessing of Freedom
+ [853] = 5, --Hammer of Justice
+ [115750] = 5, --Blinding Light (talent)
+ },
+
+ --protection
+ [66] = {
+ [31884] = 1, --Avenging Wrath
+
+ [31850] = 2, --Ardent Defender
+ [86659] = 2, --Guardian of Ancient Kings
+
+ [1022] = 3, --Blessing of Protection
+ [204018] = 3, --Blessing of Spellwarding (talent)
+ [6940] = 3, --Blessing of Sacrifice
+
+ [204150] = 4, --Aegis of Light (talent)
+
+ [1044] = 5, --Blessing of Freedom
+ [853] = 5, --Hammer of Justice
+ [115750] = 5, --Blinding Light (talent)
+ },
+
+ --retribution
+ [70] = {
+ [31884] = 1, --Avenging Wrath
+ [231895] = 1, --Crusade (talent)
+
+ [184662] = 2, --Shield of Vengeance
+ [642] = 2, --Divine Shield
+
+ [1022] = 3, --Blessing of Protection
+ [633] = 3, --Lay on Hands
+
+ [1044] = 5, --Blessing of Freedom
+ [853] = 5, --Hammer of Justice
+ [115750] = 5, --Blinding Light (talent)
+ },
+
+ --DEMON HUNTER
+ --havoc
+ [577] = {
+ [200166] = 1, --Metamorphosis
+ [206491] = 1, --Nemesis (talent)
+
+ [196555] = 2, --Netherwalk (talent)
+
+ [196718] = 4, --Darkness
+ },
+ --vengeance
+ [581] = {
+ [187827] = 2, --Metamorphosis
+
+ [207684] = 5, --Sigil of Misery
+ [202137] = 5, --Sigil of Silence
+ [202138] = 5, --Sigil of Chains (talent)
+ },
+
+ --DEATH KNIGHT
+ --unholy
+ [252] = {
+ [275699] = 1, --Apocalypse
+ [42650] = 1, --Army of the Dead
+ [49206] = 1, --Summon Gargoyle (talent)
+
+ [48792] = 2, --Icebound Fortitude
+ [48743] = 2, --Death Pact (talent)
+
+ },
+ --frost
+ [251] = {
+ [152279] = 1, --Breath of Sindragosa (talent)
+ [47568] = 1, --Empower Rune Weapon
+ [279302] = 1, --Frostwyrm's Fury (talent)
+
+ [48792] = 2, --Icebound Fortitude
+ [48743] = 2, --Death Pact (talent)
+
+ [207167] = 5, --Blinding Sleet (talent)
+ },
+ --blood
+ [250] = {
+ [49028] = 1, --Dancing Rune Weapon
+
+ [55233] = 2, --Vampiric Blood
+ [48792] = 2, --Icebound Fortitude
+
+ [108199] = 5, --Gorefiend's Grasp
+ },
+
+ --DRUID
+ --balance
+ [102] = {
+ [194223] = 1, --Celestial Alignment
+ [102560] = 1, --Incarnation: Chosen of Elune (talent)
+
+ [22812] = 2, --Barkskin
+ [108238] = 2, --Renewal (talent)
+
+ [29166] = 3, --Innervate
+
+ [78675] = 5, --Solar Beam
+ },
+ --feral
+ [103] = {
+ [106951] = 1, --Berserk
+ [102543] = 1, --Incarnation: King of the Jungle (talent)
+
+ [61336] = 2, --Survival Instincts
+ [108238] = 2, --Renewal (talent)
+
+ [77764] = 4, --Stampeding Roar
+ },
+ --guardian
+ [104] = {
+ [22812] = 2, --Barkskin
+ [61336] = 2, --Survival Instincts
+ [102558] = 2, --Incarnation: Guardian of Ursoc (talent)
+
+ [77761] = 4, --Stampeding Roar
+
+ [99] = 5, --Incapacitating Roar
+ },
+ --restoration
+ [105] = {
+
+ [22812] = 2, --Barkskin
+ [108238] = 2, --Renewal (talent)
+ [33891] = 2, --Incarnation: Tree of Life (talent)
+
+ [102342] = 3, --Ironbark
+ [29166] = 3, --Innervate
+
+ [740] = 4, --Tranquility
+ [197721] = 4, --Flourish (talent)
+
+ [102793] = 5, --Ursol's Vortex
+ },
+
+ --HUNTER
+ --beast mastery
+ [253] = {
+ [193530] = 1, --Aspect of the Wild
+ [19574] = 1, --Bestial Wrath
+ [201430] = 1, --Stampede (talent)
+ [194407] = 1, --Spitting Cobra (talent)
+
+ [186265] = 2, --Aspect of the Turtle
+
+ [19577] = 5, --Intimidation
+ },
+ --marksmanship
+ [254] = {
+ [193526] = 1, --Trueshot
+
+ [186265] = 2, --Aspect of the Turtle
+ [109304] = 2, --Exhilaration
+ [281195] = 2, --Survival of the Fittest
+
+ [187650] = 5, --Freezing Trap
+ },
+ --survival
+ [255] = {
+ [266779] = 1, --Coordinated Assault
+
+ [186265] = 2, --Aspect of the Turtle
+ [109304] = 2, --Exhilaration
+
+ [19577] = 5, --Intimidation
+ },
+
+ --MONK
+ --brewmaster
+ [268] = {
+ [115203] = 2, --Fortifying Brew
+ [115176] = 2, --Zen Meditation
+ [122278] = 2, --Dampen Harm (talent)
+ },
+ --windwalker
+ [269] = {
+ [137639] = 1, --Storm, Earth, and Fire
+ [123904] = 1, --Invoke Xuen, the White Tiger (talent)
+ [152173] = 1, --Serenity (talent)
+
+ [122470] = 2, --Touch of Karma
+ [122278] = 2, --Dampen Harm (talent)
+ [122783] = 2, --Diffuse Magic (talent)
+
+ [119381] = 5, --Leg Sweep
+ },
+ --mistweaver
+ [270] = {
+ [122278] = 2, --Dampen Harm (talent)
+ [198664] = 2, --Invoke Chi-Ji, the Red Crane (talent)
+ [243435] = 2, --Fortifying Brew
+ [122783] = 2, --Diffuse Magic (talent)
+
+ [116849] = 3, --Life Cocoon
+
+ [115310] = 4, --Revival
+ },
+
+ --SHAMAN
+ --elemental
+ [262] = {
+ [198067] = 1, --Fire Elemental
+ [192249] = 1, --Storm Elemental (talent)
+ [114050] = 1, --Ascendance (talent)
+
+ [108271] = 2, --Astral Shift
+
+ [108281] = 4, --Ancestral Guidance (talent)
+ },
+ --enhancement
+ [263] = {
+ [51533] = 1, --Feral Spirit
+ [114051] = 1, --Ascendance (talent)
+
+ [108271] = 2, --Astral Shift
+ },
+ --restoration
+ [263] = {
+ [108271] = 2, --Astral Shift
+ [114052] = 2, --Ascendance (talent)
+ [98008] = 4, --Spirit Link Totem
+ [108280] = 4, --Healing Tide Totem
+ [207399] = 4, --Ancestral Protection Totem (talent)
+ },
+}
+
+DF.CrowdControlSpells = {
+ [5246] = "WARRIOR", --Intimidating Shout
+ [132168] = "WARRIOR", --Shockwave (debuff spellid)
+ [132169] = "WARRIOR", --Storm Bolt (talent debuff spellid)
+
+ [118699] = "WARLOCK", --Fear (debuff spellid)
+ [6789] = "WARLOCK", --Mortal Coil
+ [30283] = "WARLOCK", --Shadowfury
+ [710] = "WARLOCK", --Banish
+
+ [118] = "MAGE", --Polymorph
+ [82691] = "MAGE", --Ring of Frost (debuff spellid)
+ [122] = "MAGE", --Frost Nova
+ [157997] = "MAGE", --Ice Nova
+ [31661] = "MAGE", --Dragon's Breath
+
+ [205364] = "PRIEST", --Mind Control (talent)
+ [605] = "PRIEST", --Mind Control
+ [8122] = "PRIEST", --Psychic Scream
+ [9484] = "PRIEST", --Shackle Undead
+ [200196] = "PRIEST", --Holy Word: Chastise (debuff spellid)
+ [200200] = "PRIEST", --Holy Word: Chastise (talent debuff spellid)
+ [226943] = "PRIEST", --Mind Bomb (talent)
+ [64044] = "PRIEST", --Psychic Horror (talent)
+
+ [2094] = "ROGUE", --Blind
+ [1833] = "ROGUE", --Cheap Shot
+ [408] = "ROGUE", --Kidney Shot
+ [6770] = "ROGUE", --Sap
+ [1776] = "ROGUE", --Gouge
+
+ [853] = "PALADIN", --Hammer of Justice
+ [20066] = "PALADIN", --Repentance (talent)
+ [105421] = "PALADIN", --Blinding Light (talent)
+
+ [221562] = "DEATHKNIGHT", --Asphyxiate
+ [108194] = "DEATHKNIGHT", --Asphyxiate (talent)
+ [207167] = "DEATHKNIGHT", --Blinding Sleet
+
+ [339] = "DRUID", --Entangling Roots
+ [2637] = "DRUID", --Hibernate
+ [61391] = "DRUID", --Typhoon
+ [102359] = "DRUID", --Mass Entanglement
+ [99] = "DRUID", --Incapacitating Roar
+ [236748] = "DRUID", --Intimidating Roar
+ [5211] = "DRUID", --Mighty Bash
+ [45334] = "DRUID", --Immobilized
+ [203123] = "DRUID", --Maim
+ [50259] = "DRUID", --Dazed (from Wild Charge)
+
+ [3355] = "HUNTER", --Freezing Trap
+ [19577] = "HUNTER", --Intimidation
+ [190927] = "HUNTER", --Harpoon
+ [162480] = "HUNTER", --Steel Trap
+
+ [119381] = "MONK", --Leg Sweep
+ [115078] = "MONK", --Paralysis
+ [198909] = "MONK", --Song of Chi-Ji (talent)
+ [116706] = "MONK", --Disable
+
+ [118905] = "SHAMAN", --Static Charge (Capacitor Totem)
+ [51514] = "SHAMAN", --Hex
+ [64695] = "SHAMAN", --Earthgrab (talent)
+
+ [179057] = "DEMONHUNTER", --Chaos Nova
+ [217832] = "DEMONHUNTER", --Imprison
+ [200166] = "DEMONHUNTER", --Metamorphosis
+ [207685] = "DEMONHUNTER", --Sigil of Misery
+}
+
+DF.SpecIds = {
+ [577] = "DEMONHUNTER",
+ [581] = "DEMONHUNTER",
+
+ [250] = "DEATHKNIGHT",
+ [251] = "DEATHKNIGHT",
+ [252] = "DEATHKNIGHT",
+
+ [71] = "WARRIOR",
+ [72] = "WARRIOR",
+ [73] = "WARRIOR",
+
+ [62] = "MAGE",
+ [63] = "MAGE",
+ [64] = "MAGE",
+
+ [259] = "ROGUE",
+ [260] = "ROGUE",
+ [261] = "ROGUE",
+
+ [102] = "DRUID",
+ [103] = "DRUID",
+ [104] = "DRUID",
+ [105] = "DRUID",
+
+ [253] = "HUNTER",
+ [254] = "HUNTER",
+ [255] = "HUNTER",
+
+ [262] = "SHAMAN",
+ [263] = "SHAMAN",
+ [254] = "SHAMAN",
+
+ [256] = "PRIEST",
+ [257] = "PRIEST",
+ [258] = "PRIEST",
+
+ [265] = "WARLOCK",
+ [266] = "WARLOCK",
+ [267] = "WARLOCK",
+
+ [65] = "PALADIN",
+ [66] = "PALADIN",
+ [70] = "PALADIN",
+
+ [268] = "MONK",
+ [269] = "MONK",
+ [270] = "MONK",
+}
+
+DF.CooldownToClass = {}
+
+DF.CooldownsAttack = {}
+DF.CooldownsDeffense = {}
+DF.CooldownsExternals = {}
+DF.CooldownsRaid = {}
+
+DF.CooldownsAllDeffensive = {}
+
+for specId, cooldownTable in pairs (DF.CooldownsBySpec) do
+
+ for spellId, cooldownType in pairs (cooldownTable) do
+
+ if (cooldownType == 1) then
+ DF.CooldownsAttack [spellId] = true
+
+ elseif (cooldownType == 2) then
+ DF.CooldownsDeffense [spellId] = true
+ DF.CooldownsAllDeffensive [spellId] = true
+
+ elseif (cooldownType == 3) then
+ DF.CooldownsExternals [spellId] = true
+ DF.CooldownsAllDeffensive [spellId] = true
+
+ elseif (cooldownType == 4) then
+ DF.CooldownsRaid [spellId] = true
+ DF.CooldownsAllDeffensive [spellId] = true
+
+ elseif (cooldownType == 5) then
+
+
+ end
+
+ DF.CooldownToClass [spellId] = DF.SpecIds [spellId]
+
+ end
+
+end
+
+
+function DF:FindClassForCooldown (spellId)
+ for specId, cooldownTable in pairs (DF.CooldownsBySpec) do
+ local hasCooldown = cooldownTable [spellId]
+ if (hasCooldown) then
+ return DF.SpecIds [specId]
+ end
+ end
+end
+
diff --git a/Libs/DF/textentry.lua b/Libs/DF/textentry.lua
index dcb98aac..37d118ad 100644
--- a/Libs/DF/textentry.lua
+++ b/Libs/DF/textentry.lua
@@ -14,6 +14,7 @@ local _math_floor = math.floor --> lua local
local loadstring = loadstring --> lua local
local _string_len = string.len --> lua local
+
local cleanfunction = function() end
local APITextEntryFunctions = false
@@ -712,69 +713,7 @@ local function_setfocus = function (self)
return self.editbox:SetFocus (true)
end
-function DF:NewSpecialLuaEditorEntry (parent, w, h, member, name, nointent)
-
- if (name:find ("$parent")) then
- local parentName = DF.GetParentName (parent)
- name = name:gsub ("$parent", parentName)
- end
-
- local borderframe = CreateFrame ("Frame", name, parent)
- borderframe:SetSize (w, h)
-
- if (member) then
- parent [member] = borderframe
- end
-
- local scrollframe = CreateFrame ("ScrollFrame", name, borderframe, "DetailsFrameworkEditBoxMultiLineTemplate")
-
- scrollframe:SetScript ("OnSizeChanged", function (self)
- scrollframe.editbox:SetSize (self:GetSize())
- end)
-
- scrollframe:SetPoint ("topleft", borderframe, "topleft", 10, -10)
- scrollframe:SetPoint ("bottomright", borderframe, "bottomright", -30, 10)
-
- scrollframe.editbox:SetMultiLine (true)
- scrollframe.editbox:SetJustifyH ("left")
- scrollframe.editbox:SetJustifyV ("top")
- scrollframe.editbox:SetMaxBytes (1024000)
- scrollframe.editbox:SetMaxLetters (128000)
-
- borderframe.GetText = function_gettext
- borderframe.SetText = function_settext
- borderframe.ClearFocus = function_clearfocus
- borderframe.SetFocus = function_setfocus
-
- borderframe.Enable = TextEntryMetaFunctions.Enable
- borderframe.Disable = TextEntryMetaFunctions.Disable
-
- borderframe.SetTemplate = TextEntryMetaFunctions.SetTemplate
-
- if (not nointent) then
- IndentationLib.enable (scrollframe.editbox, nil, 4)
- end
-
- borderframe:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]],
- tile = 1, tileSize = 16, edgeSize = 16, insets = {left = 5, right = 5, top = 5, bottom = 5}})
-
- scrollframe.editbox.current_bordercolor = {1, 1, 1, 0.7}
- borderframe:SetBackdropBorderColor (1, 1, 1, 0.7)
- borderframe:SetBackdropColor (0.090195, 0.090195, 0.188234, 1)
-
- borderframe.enabled_border_color = {borderframe:GetBackdropBorderColor()}
- borderframe.enabled_backdrop_color = {borderframe:GetBackdropColor()}
- borderframe.enabled_text_color = {scrollframe.editbox:GetTextColor()}
- borderframe.onleave_backdrop = {scrollframe.editbox:GetBackdropColor()}
- borderframe.onleave_backdrop_border_color = {scrollframe.editbox:GetBackdropBorderColor()}
-
- borderframe.scroll = scrollframe
- borderframe.editbox = scrollframe.editbox
- borderframe.editbox.borderframe = borderframe
-
- return borderframe
-end
------------------------------------------------------------------------------------
@@ -893,6 +832,7 @@ local get_last_word = function (self)
local character = text:sub (i, i)
if (character:match ("%a")) then
self.lastword = character .. self.lastword
+ --print (self.lastword)
else
break
end
@@ -901,7 +841,7 @@ end
--On Text Changed
local AutoComplete_OnTextChanged = function (editboxWidget, byUser, capsule)
- capsule = capsule or editboxWidget.MyObject
+ capsule = capsule or editboxWidget.MyObject or editboxWidget
local chars_now = editboxWidget:GetText():len()
if (not editboxWidget.ignore_textchange) then
@@ -921,7 +861,7 @@ local AutoComplete_OnTextChanged = function (editboxWidget, byUser, capsule)
end
local AutoComplete_OnSpacePressed = function (editboxWidget, capsule)
- capsule = capsule or editboxWidget.MyObject
+ capsule = capsule or editboxWidget.MyObject or editboxWidget
-- if (not gotMatch) then
--editboxWidget.end_selection = nil
@@ -934,7 +874,7 @@ end
local AutoComplete_OnEnterPressed = function (editboxWidget)
- local capsule = editboxWidget.MyObject
+ local capsule = editboxWidget.MyObject or editboxWidget
if (editboxWidget.end_selection) then
editboxWidget:SetCursorPosition (editboxWidget.end_selection)
editboxWidget:HighlightText (0, 0)
@@ -959,19 +899,51 @@ local AutoComplete_OnEnterPressed = function (editboxWidget)
end
local AutoComplete_OnEditFocusGained = function (editboxWidget)
- local capsule = editboxWidget.MyObject
+ local capsule = editboxWidget.MyObject or editboxWidget
capsule:GetLastWord()
+ --print ("last word:", editboxWidget.lastword)
editboxWidget.end_selection = nil
editboxWidget.focusGained = true
capsule.characters_count = editboxWidget:GetText():len()
end
+local OptimizeAutoCompleteTable = function (self, wordList)
+ local optimizedTable = {}
+
+ local lower = string.lower
+ local sub = string.sub
+ local len = string.len
+
+ local subTables = 0
+
+ for i = 1, #wordList do
+ local thisWord = wordList [i]
+ if (len (thisWord) > 0) then
+ thisWord = lower (thisWord)
+
+ local firstCharacter = sub (thisWord, 1, 1)
+
+ local charTable = optimizedTable [firstCharacter]
+ if (not charTable) then
+ charTable = {}
+ optimizedTable [firstCharacter] = charTable
+
+ subTables = subTables + 1
+ end
+
+ charTable [#charTable+1] = thisWord
+ end
+ end
+
+ wordList.Optimized = optimizedTable
+end
+
local AutoComplete_OnChar = function (editboxWidget, char, capsule)
if (char == "") then
return
end
- capsule = capsule or editboxWidget.MyObject
+ capsule = capsule or editboxWidget.MyObject or editboxWidget
editboxWidget.end_selection = nil
if (editboxWidget.ignore_input) then
@@ -993,13 +965,41 @@ local AutoComplete_OnChar = function (editboxWidget, char, capsule)
end
editboxWidget.ignore_input = true
+
if (capsule.lastword:len() >= 2) then
local wordList = capsule [capsule.poolName]
if (not wordList) then
- if (DF.debug) then
- error ("Details! Framework: Invalid word list table.")
+ error ("Details! Framework: TextEntry has AutoComplete but no word list table.")
+ return
+ end
+
+ if (capsule.ShouldOptimizeAutoComplete) then
+ if (not wordList.Optimized) then
+ OptimizeAutoCompleteTable (capsule, wordList)
end
+
+ local firstCharacter = string.lower (string.sub (capsule.lastword, 1, 1))
+ wordList = wordList.Optimized [firstCharacter]
+
+ if (wordList) then
+ for i = 1, #wordList do
+ local thisWord = wordList [i]
+ if (thisWord and (thisWord:find ("^" .. capsule.lastword) or thisWord:lower():find ("^" .. capsule.lastword))) then
+ local rest = thisWord:gsub (capsule.lastword, "")
+ rest = rest:lower():gsub (capsule.lastword, "")
+ local cursor_pos = editboxWidget:GetCursorPosition()
+ editboxWidget:Insert (rest)
+ editboxWidget:HighlightText (cursor_pos, cursor_pos + rest:len())
+ editboxWidget:SetCursorPosition (cursor_pos)
+ editboxWidget.end_selection = cursor_pos + rest:len()
+ editboxWidget.ignore_textchange = true
+ break
+ end
+ end
+ end
+
+ editboxWidget.ignore_input = false
return
end
@@ -1017,32 +1017,1420 @@ local AutoComplete_OnChar = function (editboxWidget, char, capsule)
break
end
end
-
end
+
editboxWidget.ignore_input = false
end
-function TextEntryMetaFunctions:SetAsAutoComplete (poolName)
+function TextEntryMetaFunctions:SetAsAutoComplete (poolName, poolTable, shouldOptimize)
- self.lastword = ""
- self.characters_count = 0
- self.poolName = poolName
- self.GetLastWord = get_last_word --editbox:GetLastWord()
- self.NoClearFocusOnEnterPressed = true --avoid auto clear focus
-
- self:SetHook ("OnEditFocusGained", AutoComplete_OnEditFocusGained)
- self.editbox:HookScript ("OnEscapePressed", AutoComplete_OnEscapePressed)
-
--- self:SetHook ("OnTextChanged", AutoComplete_OnTextChanged)
- self:SetHook ("OnEnterPressed", AutoComplete_OnEnterPressed)
--- self:SetHook ("OnChar", AutoComplete_OnChar)
--- self:SetHook ("OnSpacePressed", AutoComplete_OnSpacePressed)
-
- self.editbox:SetScript ("OnTextChanged", AutoComplete_OnTextChanged)
--- self.editbox:SetScript ("OnEnterPressed", AutoComplete_OnEnterPressed)
- self.editbox:SetScript ("OnChar", AutoComplete_OnChar)
- self.editbox:SetScript ("OnSpacePressed", AutoComplete_OnSpacePressed)
+ if (not self.SetHook) then
+ --self is borderframe
+ self = self.editbox
+ self.editbox = self --compatible with fw functions
+
+ self.lastword = ""
+ self.characters_count = 0
+ self.poolName = poolName
+ self.GetLastWord = get_last_word --editbox:GetLastWord()
+ self.NoClearFocusOnEnterPressed = true --avoid auto clear focus
+ self.ShouldOptimizeAutoComplete = shouldOptimize
+
+ if (poolTable) then
+ self [poolName] = poolTable
+ end
+
+ self:HookScript ("OnEditFocusGained", AutoComplete_OnEditFocusGained)
+ self:HookScript ("OnEnterPressed", AutoComplete_OnEnterPressed)
+ self:HookScript ("OnEscapePressed", AutoComplete_OnEscapePressed)
+ self:HookScript ("OnTextChanged", AutoComplete_OnTextChanged)
+ self:HookScript ("OnChar", AutoComplete_OnChar)
+ self:HookScript ("OnSpacePressed", AutoComplete_OnSpacePressed)
+ else
+ --fw textfield
+ self.lastword = ""
+ self.characters_count = 0
+ self.poolName = poolName
+ self.GetLastWord = get_last_word --editbox:GetLastWord()
+ self.NoClearFocusOnEnterPressed = true --avoid auto clear focus
+ self.ShouldOptimizeAutoComplete = shouldOptimize
+
+ self:SetHook ("OnEditFocusGained", AutoComplete_OnEditFocusGained)
+ self:SetHook ("OnEnterPressed", AutoComplete_OnEnterPressed)
+ self.editbox:HookScript ("OnEscapePressed", AutoComplete_OnEscapePressed)
+ self.editbox:SetScript ("OnTextChanged", AutoComplete_OnTextChanged)
+ self.editbox:SetScript ("OnChar", AutoComplete_OnChar)
+ self.editbox:SetScript ("OnSpacePressed", AutoComplete_OnSpacePressed)
+ end
end
+function DF:NewSpecialLuaEditorEntry (parent, w, h, member, name, nointent)
+
+ if (name:find ("$parent")) then
+ local parentName = DF.GetParentName (parent)
+ name = name:gsub ("$parent", parentName)
+ end
+
+ local borderframe = CreateFrame ("Frame", name, parent)
+ borderframe:SetSize (w, h)
+
+ if (member) then
+ parent [member] = borderframe
+ end
+
+ local scrollframe = CreateFrame ("ScrollFrame", name, borderframe, "DetailsFrameworkEditBoxMultiLineTemplate")
+
+ borderframe.SetAsAutoComplete = TextEntryMetaFunctions.SetAsAutoComplete
+
+ scrollframe:SetScript ("OnSizeChanged", function (self)
+ scrollframe.editbox:SetSize (self:GetSize())
+ end)
+
+ scrollframe:SetPoint ("topleft", borderframe, "topleft", 10, -10)
+ scrollframe:SetPoint ("bottomright", borderframe, "bottomright", -30, 10)
+
+ scrollframe.editbox:SetMultiLine (true)
+ scrollframe.editbox:SetJustifyH ("left")
+ scrollframe.editbox:SetJustifyV ("top")
+ scrollframe.editbox:SetMaxBytes (1024000)
+ scrollframe.editbox:SetMaxLetters (128000)
+
+ borderframe.GetText = function_gettext
+ borderframe.SetText = function_settext
+ borderframe.ClearFocus = function_clearfocus
+ borderframe.SetFocus = function_setfocus
+
+ borderframe.Enable = TextEntryMetaFunctions.Enable
+ borderframe.Disable = TextEntryMetaFunctions.Disable
+
+ borderframe.SetTemplate = TextEntryMetaFunctions.SetTemplate
+
+ if (not nointent) then
+ IndentationLib.enable (scrollframe.editbox, nil, 4)
+ end
+
+ borderframe:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]],
+ tile = 1, tileSize = 16, edgeSize = 16, insets = {left = 5, right = 5, top = 5, bottom = 5}})
+
+ scrollframe.editbox.current_bordercolor = {1, 1, 1, 0.7}
+ borderframe:SetBackdropBorderColor (1, 1, 1, 0.7)
+ borderframe:SetBackdropColor (0.090195, 0.090195, 0.188234, 1)
+
+ borderframe.enabled_border_color = {borderframe:GetBackdropBorderColor()}
+ borderframe.enabled_backdrop_color = {borderframe:GetBackdropColor()}
+ borderframe.enabled_text_color = {scrollframe.editbox:GetTextColor()}
+
+ borderframe.onleave_backdrop = {scrollframe.editbox:GetBackdropColor()}
+ borderframe.onleave_backdrop_border_color = {scrollframe.editbox:GetBackdropBorderColor()}
+
+ borderframe.scroll = scrollframe
+ borderframe.editbox = scrollframe.editbox
+ borderframe.editbox.borderframe = borderframe
+
+ return borderframe
+end
+
+-- encryption table
+local base64chars = {[0]='A',[1]='B',[2]='C',[3]='D',[4]='E',[5]='F',[6]='G',[7]='H',[8]='I',[9]='J',[10]='K',[11]='L',[12]='M',[13]='N',[14]='O',[15]='P',[16]='Q',[17]='R',[18]='S',[19]='T',[20]='U',[21]='V',[22]='W',[23]='X',[24]='Y',[25]='Z',[26]='a',[27]='b',[28]='c',[29]='d',[30]='e',[31]='f',[32]='g',[33]='h',[34]='i',[35]='j',[36]='k',[37]='l',[38]='m',[39]='n',[40]='o',[41]='p',[42]='q',[43]='r',[44]='s',[45]='t',[46]='u',[47]='v',[48]='w',[49]='x',[50]='y',[51]='z',[52]='0',[53]='1',[54]='2',[55]='3',[56]='4',[57]='5',[58]='6',[59]='7',[60]='8',[61]='9',[62]='-',[63]='_'}
+
+-- decryption table
+local base64bytes = {['A']=0,['B']=1,['C']=2,['D']=3,['E']=4,['F']=5,['G']=6,['H']=7,['I']=8,['J']=9,['K']=10,['L']=11,['M']=12,['N']=13,['O']=14,['P']=15,['Q']=16,['R']=17,['S']=18,['T']=19,['U']=20,['V']=21,['W']=22,['X']=23,['Y']=24,['Z']=25,['a']=26,['b']=27,['c']=28,['d']=29,['e']=30,['f']=31,['g']=32,['h']=33,['i']=34,['j']=35,['k']=36,['l']=37,['m']=38,['n']=39,['o']=40,['p']=41,['q']=42,['r']=43,['s']=44,['t']=45,['u']=46,['v']=47,['w']=48,['x']=49,['y']=50,['z']=51,['0']=52,['1']=53,['2']=54,['3']=55,['4']=56,['5']=57,['6']=58,['7']=59,['8']=60,['9']=61,['-']=62,['_']=63,['=']=nil}
+
+-- shift left
+local function lsh (value,shift)
+ return (value*(2^shift)) % 256
+end
+
+-- shift right
+local function rsh (value,shift)
+ return math.floor(value/2^shift) % 256
+end
+
+-- return single bit (for OR)
+local function bit (x,b)
+ return (x % 2^b - x % 2^(b-1) > 0)
+end
+
+local function lor (x,y)
+ result = 0
+ for p=1,8 do result = result + (((bit(x,p) or bit(y,p)) == true) and 2^(p-1) or 0) end
+ return result
+end
+
+function DF.EncodeString (data)
+ local bytes = {}
+ local result = ""
+ for spos=0,string.len(data)-1,3 do
+ for byte=1,3 do bytes[byte] = string.byte(string.sub(data,(spos+byte))) or 0 end
+ result = string.format('%s%s%s%s%s',result,base64chars[rsh(bytes[1],2)],base64chars[lor(lsh((bytes[1] % 4),4), rsh(bytes[2],4))] or "=",((#data-spos) > 1) and base64chars[lor(lsh(bytes[2] % 16,2), rsh(bytes[3],6))] or "=",((#data-spos) > 2) and base64chars[(bytes[3] % 64)] or "=")
+ end
+ return result
+end
+
+function DF.DecodeString (data)
+ local chars = {}
+ local result=""
+ for dpos=0,string.len(data)-1,4 do
+ for char=1,4 do chars[char] = base64bytes[(string.sub(data,(dpos+char),(dpos+char)) or "=")] end
+ result = string.format('%s%s%s%s',result,string.char(lor(lsh(chars[1],2), rsh(chars[2],4))),(chars[3] ~= nil) and string.char(lor(lsh(chars[2],4), rsh(chars[3],2))) or "",(chars[4] ~= nil) and string.char(lor(lsh(chars[3],6) % 192, (chars[4]))) or "")
+ end
+ return result
+end
+
+
+DF.AutoCompleteAPI = {
+ "local",
+ "AddTrackedAchievement", -- [1]
+ "CanShowAchievementUI", -- [2]
+ "ClearAchievementComparisonUnit", -- [3]
+ "GetAchievementCategory", -- [4]
+ "GetAchievementComparisonInfo", -- [5]
+ "GetAchievementCriteriaInfo", -- [6]
+ "GetAchievementInfo", -- [7]
+ "GetAchievementInfoFromCriteria", -- [8]
+ "GetAchievementLink", -- [9]
+ "GetAchievementNumCriteria", -- [10]
+ "GetAchievementNumRewards", -- [11]
+ "GetCategoryInfo", -- [12]
+ "GetCategoryList", -- [13]
+ "GetCategoryNumAchievements", -- [14]
+ "GetComparisonAchievementPoints", -- [15]
+ "GetComparisonCategoryNumAchievements", -- [16]
+ "GetComparisonStatistic", -- [17]
+ "GetLatestCompletedAchievements", -- [18]
+ "GetLatestCompletedComparisonAchievements", -- [19]
+ "GetLatestUpdatedComparisonStatsGetLatestUpdatedStats", -- [20]
+ "GetNextAchievement", -- [21]
+ "GetNumComparisonCompletedAchievements", -- [22]
+ "GetNumCompletedAchievements", -- [23]
+ "GetPreviousAchievement", -- [24]
+ "GetStatistic", -- [25]
+ "GetStatisticsCategoryList", -- [26]
+ "GetTotalAchievementPoints", -- [27]
+ "GetTrackedAchievements", -- [28]
+ "GetNumTrackedAchievements", -- [29]
+ "RemoveTrackedAchievement", -- [30]
+ "SetAchievementComparisonUnit", -- [31]
+ "ActionButtonDown", -- [32]
+ "ActionButtonUp", -- [33]
+ "ActionHasRange", -- [34]
+ "CameraOrSelectOrMoveStart", -- [35]
+ "CameraOrSelectOrMoveStop", -- [36]
+ "ChangeActionBarPage", -- [37]
+ "GetActionBarPage", -- [38]
+ "GetActionBarToggles", -- [39]
+ "GetActionCooldown", -- [40]
+ "GetActionCount", -- [41]
+ "GetActionInfo", -- [42]
+ "GetActionText", -- [43]
+ "GetActionTexture", -- [44]
+ "GetBonusBarOffset", -- [45]
+ "GetMouseButtonClicked", -- [46]
+ "GetMultiCastBarOffset", -- [47]
+ "GetPossessInfo", -- [48]
+ "HasAction", -- [49]
+ "IsActionInRange", -- [50]
+ "IsAttackAction", -- [51]
+ "IsAutoRepeatAction", -- [52]
+ "IsCurrentAction", -- [53]
+ "IsConsumableAction", -- [54]
+ "IsEquippedAction", -- [55]
+ "IsUsableAction", -- [56]
+ "PetHasActionBar", -- [57]
+ "PickupAction", -- [58]
+ "PickupPetAction", -- [59]
+ "PlaceAction", -- [60]
+ "SetActionBarToggles", -- [61]
+ "StopAttack", -- [62]
+ "TurnOrActionStart", -- [63]
+ "TurnOrActionStop", -- [64]
+ "UseAction", -- [65]
+ "AcceptDuel", -- [66]
+ "AttackTarget", -- [67]
+ "CancelDuel", -- [68]
+ "CancelLogout", -- [69]
+ "ClearTutorials", -- [70]
+ "CancelSummon", -- [71]
+ "ConfirmSummon", -- [72]
+ "DescendStop", -- [73]
+ "Dismount", -- [74]
+ "FlagTutorial", -- [75]
+ "ForceQuit", -- [76]
+ "GetPVPTimer", -- [77]
+ "GetSummonConfirmAreaName", -- [78]
+ "GetSummonConfirmSummoner", -- [79]
+ "GetSummonConfirmTimeLeft", -- [80]
+ "RandomRoll", -- [81]
+ "SetPVP", -- [82]
+ "StartDuel", -- [84]
+ "TogglePVP", -- [85]
+ "ToggleSheath", -- [86]
+ "UseSoulstone", -- [87]
+ "CanSolveArtifact", -- [89]
+ "UIParent", -- [90]
+ "GetArtifactInfoByRace", -- [91]
+ "GetArtifactProgress", -- [92]
+ "GetNumArtifactsByRace", -- [93]
+ "GetSelectedArtifactInfo", -- [94]
+ "IsArtifactCompletionHistoryAvailable", -- [95]
+ "ItemAddedToArtifact", -- [96]
+ "RemoveItemFromArtifact", -- [97]
+ "RequestArtifactCompletionHistory", -- [98]
+ "SocketItemToArtifact", -- [99]
+ "AcceptArenaTeam", -- [101]
+ "ArenaTeamInviteByName", -- [102]
+ "ArenaTeamSetLeaderByName", -- [103]
+ "ArenaTeamLeave", -- [104]
+ "ArenaTeamRoster", -- [105]
+ "ArenaTeamUninviteByName", -- [106]
+ "ArenaTeamDisband", -- [107]
+ "DeclineArenaTeam", -- [108]
+ "GetArenaTeam", -- [109]
+ "GetArenaTeamGdfInf", -- [110]
+ "oGetArenaTeamRosterInfo", -- [111]
+ "GetBattlefieldTeamInfo", -- [112]
+ "GetCurrentArenaSeason", -- [113]
+ "GetInspectArenaTeamData", -- [114]
+ "GetNumArenaTeamMembers", -- [115]
+ "GetPreviousArenaSeason", -- [116]
+ "IsActiveBattlefieldArena", -- [117]
+ "IsArenaTeamCaptain", -- [118]
+ "IsInArenaTeam", -- [119]
+ "CalculateAuctionDeposit", -- [121]
+ "CanCancelAuction", -- [122]
+ "CancelSell", -- [123]
+ "CanSendAuctionQuery", -- [124]
+ "CancelAuction", -- [125]
+ "ClickAuctionSellItemButton", -- [126]
+ "CloseAuctionHouse", -- [127]
+ "GetAuctionHouseDepositRate", -- [128]
+ "GetAuctionInvTypes", -- [129]
+ "GetAuctionItemClasses", -- [130]
+ "GetAuctionItemInfo", -- [131]
+ "GetAuctionItemLink", -- [132]
+ "GetAuctionItemSubClasses", -- [133]
+ "GetAuctionItemTimeLeft", -- [134]
+ "GetAuctionSellItemInfo", -- [135]
+ "GetBidderAuctionItems", -- [136]
+ "GetNumAuctionItems", -- [137]
+ "GetOwnerAuctionItems", -- [138]
+ "GetSelectedAuctionItem", -- [139]
+ "IsAuctionSortReversed", -- [140]
+ "PlaceAuctionBid", -- [141]
+ "QueryAuctionItems", -- [142]
+ "SetAuctionsTabShowing", -- [143]
+ "SetSelectedAuctionItem", -- [144]
+ "SortAuctionItems", -- [145]
+ "StartAuction", -- [146]
+ "BankButtonIDToInvSlotID", -- [148]
+ "CloseBankFrame", -- [149]
+ "GetBankSlotCost", -- [150]
+ "GetNumBankSlots", -- [151]
+ "PurchaseSlot", -- [152]
+ "AcceptAreaSpiritHeal", -- [154]
+ "AcceptBattlefieldPort", -- [155]
+ "CancelAreaSpiritHeal", -- [156]
+ "CanJoinBattlefieldAsGroup", -- [157]
+ "CheckSpiritHealerDist", -- [158]
+ "GetAreaSpiritHealerTime", -- [159]
+ "GetBattlefieldEstimatedWaitTime", -- [160]
+ "GetBattlefieldFlagPosition", -- [161]
+ "GetBattlefieldInstanceExpiration", -- [162]
+ "GetBattlefieldInstanceRunTime", -- [163]
+ "GetBattlefieldMapIconScale", -- [164]
+ "GetBattlefieldPortExpiration", -- [165]
+ "GetBattlefieldPosition", -- [166]
+ "GetBattlefieldScore", -- [167]
+ "GetBattlefieldStatData", -- [168]
+ "GetBattlefieldStatInfo", -- [169]
+ "GetBattlefieldStatus", -- [170]
+ "GetBattlefieldTimeWaited", -- [171]
+ "GetBattlefieldWinner", -- [172]
+ "GetBattlegroundInfo", -- [173]
+ "GetNumBattlefieldFlagPositions", -- [174]
+ "GetNumBattlefieldPositions", -- [175]
+ "GetNumBattlefieldScores", -- [176]
+ "GetNumBattlefieldStats", -- [177]
+ "GetNumWorldStateUI", -- [178]
+ "GetWintergraspWaitTime", -- [179]
+ "GetWorldStateUIInfo", -- [180]
+ "IsPVPTimerRunning", -- [181]
+ "JoinBattlefield", -- [182]
+ "LeaveBattlefield", -- [183]
+ "ReportPlayerIsPVPAFK", -- [184]
+ "RequestBattlefieldPositions", -- [185]
+ "RequestBattlefieldScoreData", -- [186]
+ "RequestBattlegroundInstanceInfo", -- [187]
+ "SetBattlefieldScoreFaction", -- [188]
+ "GetBinding", -- [190]
+ "GetBindingAction", -- [191]
+ "GetBindingKey", -- [192]
+ "GetBindingText", -- [193]
+ "GetCurrentBindingSet", -- [194]
+ "GetNumBindings", -- [195]
+ "LoadBindings", -- [196]
+ "RunBinding", -- [197]
+ "SaveBindings", -- [198]
+ "SetBinding", -- [199]
+ "SetBindingSpell", -- [200]
+ "SetBindingClick", -- [201]
+ "SetBindingItem", -- [202]
+ "SetBindingMacro", -- [203]
+ "SetConsoleKey", -- [204]
+ "SetOverrideBinding", -- [205]
+ "SetOverrideBindingSpell", -- [206]
+ "SetOverrideBindingClick", -- [207]
+ "SetOverrideBindingItem", -- [208]
+ "SetOverrideBindingMacro", -- [209]
+ "ClearOverrideBindings", -- [210]
+ "SetMouselookOverrideBinding", -- [211]
+ "IsModifierKeyDown", -- [212]
+ "IsModifiedClick", -- [213]
+ "IsMouseButtonDown", -- [214]
+ "CancelUnitBuff", -- [216]
+ "CancelShapeshiftForm", -- [217]
+ "CancelItemTempEnchantment", -- [218]
+ "GetWeaponEnchantInfo", -- [219]
+ "UnitAura", -- [220]
+ "UnitBuff", -- [221]
+ "UnitDebuff", -- [222]
+ "AddChatWindowChannel", -- [224]
+ "ChannelBan", -- [225]
+ "ChannelInvite", -- [226]
+ "ChannelKick", -- [227]
+ "ChannelModerator", -- [228]
+ "ChannelMute", -- [229]
+ "ChannelToggleAnnouncements", -- [230]
+ "ChannelUnban", -- [231]
+ "ChannelUnmoderator", -- [232]
+ "ChannelUnmute", -- [233]
+ "DisplayChannelOwner", -- [234]
+ "DeclineInvite", -- [235]
+ "EnumerateServerChannels", -- [236]
+ "GetChannelList", -- [237]
+ "GetChannelName", -- [238]
+ "GetChatWindowChannels", -- [239]
+ "JoinChannelByName", -- [240]
+ "LeaveChannelByName", -- [241]
+ "ListChannelByName", -- [242]
+ "ListChannels", -- [243]
+ "RemoveChatWindowChannel", -- [244]
+ "SendChatMessage", -- [245]
+ "SetChannelOwner", -- [246]
+ "SetChannelPassword", -- [247]
+ "AcceptResurrect", -- [249]
+ "AcceptXPLoss", -- [250]
+ "CheckBinderDist", -- [251]
+ "ConfirmBinder", -- [252]
+ "DeclineResurrect", -- [253]
+ "DestroyTotem", -- [254]
+ "GetBindLocation", -- [255]
+ "GetComboPoints", -- [256]
+ "GetCorpseRecoveryDelay", -- [257]
+ "GetCurrentTitle", -- [258]
+ "GetMirrorTimerInfo", -- [259]
+ "GetMirrorTimerProgress", -- [260]
+ "GetMoney", -- [261]
+ "GetNumTitles", -- [262]
+ "GetPlayerFacing", -- [263]
+ "GetPVPDesired", -- [264]
+ "GetReleaseTimeRemaining", -- [265]
+ "GetResSicknessDuration", -- [266]
+ "GetRestState", -- [267]
+ "GetRuneCooldown", -- [268]
+ "GetRuneCount", -- [269]
+ "GetRuneType", -- [270]
+ "GetTimeToWellRested", -- [271]
+ "GetTitleName", -- [272]
+ "GetUnitPitch", -- [273]
+ "GetXPExhaustion", -- [274]
+ "HasFullControl", -- [275]
+ "HasSoulstone", -- [276]
+ "IsFalling", -- [277]
+ "IsFlying", -- [278]
+ "IsFlyableArea", -- [279]
+ "IsIndoors", -- [280]
+ "IsMounted", -- [281]
+ "IsOutdoors", -- [282]
+ "IsOutOfBounds", -- [283]
+ "IsResting", -- [284]
+ "IsStealthed", -- [285]
+ "IsSwimming", -- [286]
+ "IsTitleKnown", -- [287]
+ "IsXPUserDisabled", -- [288]
+ "NotWhileDeadError", -- [289]
+ "ResurrectHasSickness", -- [290]
+ "ResurrectHasTimer", -- [291]
+ "ResurrectGetOfferer", -- [292]
+ "RetrieveCorpse", -- [293]
+ "SetCurrentTitle", -- [294]
+ "TargetTotem", -- [295]
+ "GetArmorPenetration", -- [296]
+ "GetAttackPowerForStat", -- [297]
+ "GetAverageItemLevel", -- [298]
+ "GetBlockChance", -- [299]
+ "GetCombatRating", -- [300]
+ "GetCombatRatingBonus", -- [301]
+ "GetCritChance", -- [302]
+ "GetCritChanceFromAgility", -- [303]
+ "GetDodgeChance", -- [304]
+ "GetExpertise", -- [305]
+ "GetExpertisePercent", -- [306]
+ "GetManaRegen", -- [307]
+ "GetMaxCombatRatingBonus", -- [308]
+ "GetParryChance", -- [309]
+ "GetPetSpellBonusDamage", -- [310]
+ "GetPowerRegen", -- [311]
+ "GetSpellBonusDamage", -- [312]
+ "GetRangedCritChance", -- [313]
+ "GetSpellBonusHealing", -- [314]
+ "GetSpellCritChance", -- [315]
+ "GetShieldBlock", -- [316]
+ "GetSpellCritChanceFromIntellect", -- [317]
+ "GetSpellPenetration", -- [318]
+ "AddChatWindowChannel", -- [319]
+ "ChangeChatColor", -- [320]
+ "ChatFrame_AddChannel", -- [321]
+ "ChatFrame_AddMessageEventFilter", -- [322]
+ "ChatFrame_GetMessageEventFilters", -- [323]
+ "ChatFrame_OnHyperlinkShow", -- [324]
+ "ChatFrame_RemoveMessageEventFilter", -- [325]
+ "GetAutoCompleteResults", -- [326]
+ "GetChatTypeIndex", -- [327]
+ "GetChatWindowChannels", -- [328]
+ "GetChatWindowInfo", -- [329]
+ "GetChatWindowMessages", -- [330]
+ "JoinChannelByName", -- [331]
+ "LoggingChat", -- [332]
+ "LoggingCombat", -- [333]
+ "RemoveChatWindowChannel", -- [334]
+ "RemoveChatWindowMessages", -- [335]
+ "SetChatWindowAlpha", -- [336]
+ "SetChatWindowColor", -- [337]
+ "SetChatWindowDocked", -- [338]
+ "SetChatWindowLocked", -- [339]
+ "SetChatWindowName", -- [340]
+ "SetChatWindowShown", -- [341]
+ "SetChatWindowSize", -- [342]
+ "SetChatWindowUninteractable", -- [343]
+ "DoEmote", -- [345]
+ "GetDefaultLanguage", -- [346]
+ "GetLanguageByIndex", -- [347]
+ "GetNumLanguages", -- [348]
+ "GetRegisteredAddonMessagePrefixes", -- [349]
+ "IsAddonMessagePrefixRegistered", -- [350]
+ "RegisterAddonMessagePrefix", -- [352]
+ "SendAddonMessage", -- [353]
+ "SendChatMessage", -- [354]
+ "CallCompanion", -- [356]
+ "DismissCompanion", -- [357]
+ "GetCompanionInfo", -- [358]
+ "GetNumCompanions", -- [359]
+ "GetCompanionCooldown", -- [360]
+ "PickupCompanion", -- [361]
+ "SummonRandomCritter", -- [362]
+ "ContainerIDToInventoryID", -- [364]
+ "GetBagName", -- [365]
+ "GetContainerItemCooldown", -- [366]
+ "GetContainerItemDurability", -- [367]
+ "GetContainerItemGems", -- [368]
+ "GetContainerItemID", -- [369]
+ "GetContainerItemInfo", -- [370]
+ "GetContainerItemLink", -- [371]
+ "GetContainerNumSlots", -- [372]
+ "GetContainerItemQuestInfo", -- [373]
+ "GetContainerNumFreeSlots", -- [374]
+ "OpenAllBags", -- [376]
+ "CloseAllBags", -- [377]
+ "PickupBagFromSlot", -- [378]
+ "PickupContainerItem", -- [379]
+ "PutItemInBackpack", -- [380]
+ "PutItemInBag", -- [381]
+ "PutKeyInKeyRing", -- [382]
+ "SplitContainerItem", -- [383]
+ "ToggleBackpack", -- [384]
+ "ToggleBag", -- [385]
+ "GetCoinText", -- [388]
+ "GetCoinTextureString", -- [389]
+ "GetCurrencyInfo", -- [390]
+ "GetCurrencyListSize", -- [391]
+ "GetCurrencyListInfo", -- [392]
+ "ExpandCurrencyList", -- [393]
+ "SetCurrencyUnused", -- [394]
+ "GetNumWatchedTokens", -- [395]
+ "GetBackpackCurrencyInfo", -- [396]
+ "SetCurrencyBackpack", -- [397]
+ "AutoEquipCursorItem", -- [399]
+ "ClearCursor", -- [400]
+ "CursorCanGoInSlot", -- [401]
+ "CursorHasItem", -- [402]
+ "CursorHasMoney", -- [403]
+ "CursorHasSpell", -- [404]
+ "DeleteCursorItem", -- [405]
+ "DropCursorMoney", -- [406]
+ "DropItemOnUnit", -- [407]
+ "EquipCursorItem", -- [408]
+ "GetCursorInfo", -- [409]
+ "GetCursorPosition", -- [410]
+ "HideRepairCursor", -- [411]
+ "InRepairMode", -- [412]
+ "PickupAction", -- [413]
+ "PickupBagFromSlot", -- [414]
+ "PickupContainerItem", -- [415]
+ "PickupInventoryItem", -- [416]
+ "PickupItem", -- [417]
+ "PickupMacro", -- [418]
+ "PickupMerchantItem", -- [419]
+ "PickupPetAction", -- [420]
+ "PickupSpell", -- [421]
+ "PickupStablePet", -- [422]
+ "PickupTradeMoney", -- [423]
+ "PlaceAction", -- [424]
+ "PutItemInBackpack", -- [425]
+ "PutItemInBag", -- [426]
+ "ResetCursor", -- [427]
+ "SetCursor", -- [428]
+ "ShowContainerSellCursor", -- [429]
+ "ShowInspectCursor", -- [430]
+ "ShowInventorySellCursor", -- [431]
+ "ShowMerchantSellCursor", -- [432]
+ "ShowRepairCursor", -- [433]
+ "SplitContainerItem", -- [434]
+ "GetWeaponEnchantInfo", -- [435]
+ "ReplaceEnchant", -- [436]
+ "ReplaceTradeEnchant", -- [437]
+ "BindEnchant", -- [438]
+ "CollapseFactionHeader", -- [439]
+ "CollapseAllFactionHeaders", -- [440]
+ "ExpandFactionHeader", -- [441]
+ "ExpandAllFactionHeaders", -- [442]
+ "FactionToggleAtWar", -- [443]
+ "GetFactionInfo", -- [444]
+ "GetNumFactions", -- [445]
+ "GetSelectedFaction", -- [446]
+ "GetWatchedFactionInfo", -- [447]
+ "IsFactionInactive", -- [448]
+ "SetFactionActive", -- [449]
+ "SetFactionInactive", -- [450]
+ "SetSelectedFaction", -- [451]
+ "SetWatchedFactionIndex", -- [452]
+ "UnitFactionGroup", -- [453]
+ "CreateFrame", -- [454]
+ "CreateFont", -- [455]
+ "GetFramesRegisteredForEvent", -- [456]
+ "GetNumFrames", -- [457]
+ "EnumerateFrames", -- [458]
+ "GetMouseFocus", -- [459]
+ "ToggleDropDownMenu", -- [460]
+ "UIFrameFadeIn", -- [461]
+ "UIFrameFadeOut", -- [462]
+ "UIFrameFlash", -- [463]
+ "EasyMenu", -- [464]
+ "AddFriend", -- [466]
+ "AddOrRemoveFriend", -- [467]
+ "GetFriendInfo", -- [468]
+ "SetFriendNotes", -- [469]
+ "GetNumFriends", -- [470]
+ "GetSelectedFriend", -- [471]
+ "RemoveFriend", -- [472]
+ "SetSelectedFriend", -- [473]
+ "ShowFriends", -- [474]
+ "ToggleFriendsFrame", -- [475]
+ "GetNumGlyphSockets", -- [477]
+ "GetGlyphSocketInfo", -- [478]
+ "GetGlyphLink", -- [479]
+ "GlyphMatchesSocket", -- [480]
+ "PlaceGlyphInSocket", -- [481]
+ "RemoveGlyphFromSocket", -- [482]
+ "SpellCanTargetGlyph", -- [483]
+ "CanComplainChat", -- [485]
+ "CanComplainInboxItem", -- [486]
+ "ComplainChat", -- [487]
+ "ComplainInboxItem", -- [488]
+ "CloseGossip", -- [501]
+ "ForceGossip", -- [502]
+ "GetGossipActiveQuests", -- [503]
+ "GetGossipAvailableQuests", -- [504]
+ "GetGossipOptions", -- [505]
+ "GetGossipText", -- [506]
+ "GetNumGossipActiveQuests", -- [507]
+ "GetNumGossipAvailableQuests", -- [508]
+ "GetNumGossipOptions", -- [509]
+ "SelectGossipActiveQuest", -- [510]
+ "SelectGossipAvailableQuest", -- [511]
+ "SelectGossipOption", -- [512]
+ "AcceptGroup", -- [514]
+ "ConfirmReadyCheck", -- [515]
+ "ConvertToRaid", -- [516]
+ "DeclineGroup", -- [517]
+ "DoReadyCheck", -- [518]
+ "GetLootMethod", -- [519]
+ "GetLootThreshold", -- [520]
+ "GetMasterLootCandidate", -- [521]
+ "GetNumPartyMembers", -- [522]
+ "GetRealNumPartyMembers", -- [523]
+ "GetPartyLeaderIndex", -- [524]
+ "GetPartyMember", -- [525]
+ "InviteUnit", -- [526]
+ "IsPartyLeader", -- [527]
+ "LeaveParty", -- [528]
+ "PromoteToLeader", -- [529]
+ "SetLootMethod", -- [530]
+ "SetLootThreshold", -- [531]
+ "UninviteUnit", -- [532]
+ "UnitInParty", -- [533]
+ "UnitIsPartyLeader", -- [534]
+ "AcceptGuild", -- [536]
+ "BuyGuildCharter", -- [537]
+ "CanEditGuildEvent", -- [538]
+ "CanEditGuildInfo", -- [539]
+ "CanEditMOTD", -- [540]
+ "CanEditOfficerNote", -- [541]
+ "CanEditPublicNote", -- [542]
+ "CanGuildDemote", -- [543]
+ "CanGuildInvite", -- [544]
+ "CanGuildPromote", -- [545]
+ "CanGuildRemove", -- [546]
+ "CanViewOfficerNote", -- [547]
+ "CloseGuildRegistrar", -- [548]
+ "CloseGuildRoster", -- [549]
+ "CloseTabardCreation", -- [550]
+ "DeclineGuild", -- [551]
+ "GetGuildCharterCost", -- [552]
+ "GetGuildEventInfo", -- [553]
+ "GetGuildInfo", -- [554]
+ "GetGuildInfoText", -- [555]
+ "GetGuildRosterInfo", -- [556]
+ "GetGuildRosterLastOnline", -- [557]
+ "GetGuildRosterMOTD", -- [558]
+ "GetGuildRosterSelection", -- [559]
+ "GetGuildRosterShowOffline", -- [560]
+ "GetNumGuildEvents", -- [561]
+ "GetNumGuildMembers", -- [562]
+ "GetTabardCreationCost", -- [563]
+ "GetTabardInfo", -- [564]
+ "GuildControlAddRank", -- [565]
+ "GuildControlDelRank", -- [566]
+ "GuildControlGetNumRanks", -- [567]
+ "GuildControlGetRankFlags", -- [568]
+ "GuildControlGetRankName", -- [569]
+ "GuildControlSaveRank", -- [570]
+ "GuildControlSetRank", -- [571]
+ "GuildControlSetRankFlag", -- [572]
+ "GuildDemote", -- [573]
+ "GuildDisband", -- [574]
+ "GuildInfo", -- [575]
+ "GuildInvite", -- [576]
+ "GuildLeave", -- [577]
+ "GuildPromote", -- [578]
+ "GuildRoster", -- [579]
+ "GuildRosterSetOfficerNote", -- [580]
+ "GuildRosterSetPublicNote", -- [581]
+ "GuildSetMOTD", -- [582]
+ "GuildSetLeader", -- [583]
+ "GuildUninvite", -- [584]
+ "IsGuildLeader", -- [585]
+ "IsInGuild", -- [586]
+ "QueryGuildEventLog", -- [587]
+ "SetGuildInfoText", -- [588]
+ "SetGuildRosterSelection", -- [589]
+ "SetGuildRosterShowOffline", -- [590]
+ "SortGuildRoster", -- [591]
+ "UnitGetGuildXP", -- [592]
+ "AutoStoreGuildBankItem", -- [593]
+ "BuyGuildBankTab", -- [594]
+ "CanGuildBankRepair", -- [595]
+ "CanWithdrawGuildBankMoney", -- [596]
+ "CloseGuildBankFrame", -- [597]
+ "DepositGuildBankMoney", -- [598]
+ "GetCurrentGuildBankTab", -- [599]
+ "GetGuildBankItemInfo", -- [600]
+ "GetGuildBankItemLink", -- [601]
+ "GetGuildBankMoney", -- [602]
+ "GetGuildBankMoneyTransaction", -- [603]
+ "GetGuildBankTabCost", -- [604]
+ "GetGuildBankTabInfo", -- [605]
+ "GetGuildBankTabPermissions", -- [606]
+ "GetGuildBankText", -- [607]
+ "GetGuildBankTransaction", -- [608]
+ "GetGuildTabardFileNames", -- [611]
+ "GetNumGuildBankMoneyTransactions", -- [612]
+ "GetNumGuildBankTabs", -- [613]
+ "GetNumGuildBankTransactions", -- [614]
+ "PickupGuildBankItem", -- [615]
+ "PickupGuildBankMoney", -- [616]
+ "QueryGuildBankLog", -- [617]
+ "QueryGuildBankTab", -- [618]
+ "SetCurrentGuildBankTab", -- [619]
+ "SetGuildBankTabInfo", -- [620]
+ "SetGuildBankTabPermissions", -- [621]
+ "SplitGuildBankItem", -- [624]
+ "WithdrawGuildBankMoney", -- [625]
+ "GetHolidayBGHonorCurrencyBonuses", -- [627]
+ "GetInspectHonorData", -- [628]
+ "GetPVPLifetimeStats", -- [629]
+ "GetPVPRankInfo", -- [630]
+ "GetPVPRankProgress", -- [631]
+ "GetPVPSessionStats", -- [632]
+ "GetPVPYesterdayStats", -- [633]
+ "GetRandomBGHonorCurrencyBonuses", -- [634]
+ "HasInspectHonorData", -- [635]
+ "RequestInspectHonorData", -- [636]
+ "UnitPVPName", -- [637]
+ "UnitPVPRank", -- [638]
+ "AddIgnore", -- [640]
+ "AddOrDelIgnore", -- [641]
+ "DelIgnore", -- [642]
+ "GetIgnoreName", -- [643]
+ "GetNumIgnores", -- [644]
+ "GetSelectedIgnore", -- [645]
+ "SetSelectedIgnore", -- [646]
+ "CanInspect", -- [648]
+ "CheckInteractDistance", -- [649]
+ "ClearInspectPlayer", -- [650]
+ "GetInspectArenaTeamData", -- [651]
+ "HasInspectHonorData", -- [652]
+ "RequestInspectHonorData", -- [653]
+ "GetInspectHonorData", -- [654]
+ "NotifyInspect", -- [655]
+ "InspectUnit", -- [656]
+ "CanShowResetInstances", -- [658]
+ "GetBattlefieldInstanceExpiration", -- [659]
+ "GetBattlefieldInstanceInfo", -- [660]
+ "GetBattlefieldInstanceRunTime", -- [661]
+ "GetInstanceBootTimeRemaining", -- [662]
+ "GetInstanceInfo", -- [663]
+ "GetNumSavedInstances", -- [664]
+ "GetSavedInstanceInfo", -- [665]
+ "IsInInstance", -- [666]
+ "ResetInstances", -- [667]
+ "GetDungeonDifficulty", -- [668]
+ "SetDungeonDifficulty", -- [669]
+ "GetInstanceDifficulty", -- [670]
+ "GetInstanceLockTimeRemaining", -- [671]
+ "GetInstanceLockTimeRemainingEncounter", -- [672]
+ "AutoEquipCursorItem", -- [674]
+ "BankButtonIDToInvSlotID", -- [675]
+ "CancelPendingEquip", -- [676]
+ "ConfirmBindOnUse", -- [677]
+ "ContainerIDToInventoryID", -- [678]
+ "CursorCanGoInSlot", -- [679]
+ "EquipCursorItem", -- [680]
+ "EquipPendingItem", -- [681]
+ "GetInventoryAlertStatus", -- [682]
+ "GetInventoryItemBroken", -- [683]
+ "GetInventoryItemCooldown", -- [684]
+ "GetInventoryItemCount", -- [685]
+ "GetInventoryItemDurability", -- [686]
+ "GetInventoryItemGems", -- [687]
+ "GetInventoryItemID", -- [688]
+ "GetInventoryItemLink", -- [689]
+ "GetInventoryItemQuality", -- [690]
+ "GetInventoryItemTexture", -- [691]
+ "GetInventorySlotInfo", -- [692]
+ "GetWeaponEnchantInfo", -- [693]
+ "HasWandEquipped", -- [694]
+ "IsInventoryItemLocked", -- [695]
+ "KeyRingButtonIDToInvSlotID", -- [696]
+ "PickupBagFromSlot", -- [697]
+ "PickupInventoryItem", -- [698]
+ "UpdateInventoryAlertStatus", -- [699]
+ "UseInventoryItem", -- [700]
+ "EquipItemByName", -- [702]
+ "GetAuctionItemLink", -- [703]
+ "GetContainerItemLink", -- [704]
+ "GetItemCooldown", -- [705]
+ "GetItemCount", -- [706]
+ "GetItemFamily", -- [707]
+ "GetItemIcon", -- [708]
+ "GetItemInfo", -- [709]
+ "GetItemQualityColor", -- [710]
+ "GetItemSpell", -- [711]
+ "GetItemStats", -- [712]
+ "GetMerchantItemLink", -- [713]
+ "GetQuestItemLink", -- [714]
+ "GetQuestLogItemLink", -- [715]
+ "GetTradePlayerItemLink", -- [716]
+ "GetTradeSkillItemLink", -- [717]
+ "GetTradeSkillReagentItemLink", -- [718]
+ "GetTradeTargetItemLink", -- [719]
+ "IsUsableItem", -- [720]
+ "IsConsumableItem", -- [721]
+ "IsCurrentItem", -- [722]
+ "IsEquippedItem", -- [723]
+ "IsEquippableItem", -- [724]
+ "IsEquippedItemType", -- [725]
+ "IsItemInRange", -- [726]
+ "ItemHasRange", -- [727]
+ "OffhandHasWeapon", -- [728]
+ "SplitContainerItem", -- [729]
+ "SetItemRef", -- [730]
+ "AcceptSockets", -- [731]
+ "ClickSocketButton", -- [732]
+ "CloseSocketInfo", -- [733]
+ "GetSocketItemInfo", -- [734]
+ "GetSocketItemRefundable", -- [735]
+ "GetSocketItemBoundTradeable", -- [736]
+ "GetNumSockets", -- [737]
+ "GetSocketTypes", -- [738]
+ "GetExistingSocketInfo", -- [739]
+ "GetExistingSocketLink", -- [740]
+ "GetNewSocketInfo", -- [741]
+ "GetNewSocketLink", -- [742]
+ "SocketInventoryItem", -- [743]
+ "SocketContainerItem", -- [744]
+ "CloseItemText", -- [745]
+ "ItemTextGetCreator", -- [746]
+ "ItemTextGetItem", -- [747]
+ "ItemTextGetMaterial", -- [748]
+ "ItemTextGetPage", -- [749]
+ "ItemTextGetText", -- [750]
+ "ItemTextHasNextPage", -- [751]
+ "ItemTextNextPage", -- [752]
+ "ItemTextPrevPage", -- [753]
+ "GetMinimapZoneText", -- [755]
+ "GetRealZoneText", -- [756]
+ "GetSubZoneText", -- [757]
+ "GetZonePVPInfo", -- [758]
+ "GetZoneText", -- [759]
+ "CompleteLFGRoleCheck", -- [760]
+ "GetLFGDeserterExpiration", -- [761]
+ "GetLFGRandomCooldownExpiration", -- [762]
+ "GetLFGBootProposal", -- [763]
+ "GetLFGMode", -- [764]
+ "GetLFGQueueStats", -- [765]
+ "GetLFGRoles", -- [766]
+ "GetLFGRoleUpdate", -- [767]
+ "GetLFGRoleUpdateSlot", -- [768]
+ "SetLFGBootVote", -- [769]
+ "SetLFGComment", -- [770]
+ "SetLFGRoles", -- [771]
+ "UninviteUnit", -- [772]
+ "UnitGroupRolesAssigned", -- [773]
+ "UnitHasLFGDeserter", -- [774]
+ "UnitHasLFGRandomCooldown", -- [775]
+ "CloseLoot", -- [777]
+ "ConfirmBindOnUse", -- [778]
+ "ConfirmLootRoll", -- [779]
+ "ConfirmLootSlot", -- [780]
+ "GetLootMethod", -- [781]
+ "GetLootRollItemInfo", -- [782]
+ "GetLootRollItemLink", -- [783]
+ "GetLootRollTimeLeft", -- [784]
+ "GetLootSlotInfo", -- [785]
+ "GetLootSlotLink", -- [786]
+ "GetLootThreshold", -- [787]
+ "GetMasterLootCandidate", -- [788]
+ "GetNumLootItems", -- [789]
+ "GetOptOutOfLoot", -- [790]
+ "GiveMasterLoot", -- [791]
+ "IsFishingLoot", -- [792]
+ "LootSlot", -- [793]
+ "LootSlotIsCoin", -- [794]
+ "LootSlotIsCurrency", -- [795]
+ "LootSlotIsItem", -- [796]
+ "RollOnLoot", -- [797]
+ "SetLootMethod", -- [798]
+ "SetLootPortrait", -- [799]
+ "SetLootThreshold", -- [800]
+ "SetOptOutOfLoot", -- [801]
+ "CursorHasMacro", -- [804]
+ "DeleteMacro", -- [805]
+ "GetMacroBody", -- [807]
+ "GetMacroIconInfo", -- [808]
+ "GetMacroItemIconInfo", -- [809]
+ "GetMacroIndexByName", -- [810]
+ "GetMacroInfo", -- [811]
+ "GetNumMacroIcons", -- [812]
+ "GetNumMacroItemIcons", -- [813]
+ "GetNumMacros", -- [814]
+ "PickupMacro", -- [815]
+ "RunMacro", -- [816]
+ "RunMacroText", -- [817]
+ "SecureCmdOptionParse", -- [818]
+ "StopMacro", -- [819]
+ "AutoLootMailItem", -- [821]
+ "CheckInbox", -- [822]
+ "ClearSendMail", -- [823]
+ "ClickSendMailItemButton", -- [824]
+ "CloseMail", -- [825]
+ "DeleteInboxItem", -- [826]
+ "GetCoinIcon", -- [827]
+ "GetInboxHeaderInfo", -- [828]
+ "GetInboxItem", -- [829]
+ "GetInboxItemLink", -- [830]
+ "GetInboxNumItems", -- [831]
+ "GetInboxText", -- [832]
+ "GetInboxInvoiceInfo", -- [833]
+ "GetNumPackages", -- [834]
+ "GetNumStationeries", -- [835]
+ "GetPackageInfo", -- [836]
+ "GetSelectedStationeryTexture", -- [837]
+ "GetSendMailCOD", -- [838]
+ "GetSendMailItem", -- [839]
+ "GetSendMailItemLink", -- [840]
+ "GetSendMailMoney", -- [841]
+ "GetSendMailPrice", -- [842]
+ "GetStationeryInfo", -- [843]
+ "HasNewMail", -- [844]
+ "InboxItemCanDelete", -- [845]
+ "ReturnInboxItem", -- [846]
+ "SelectPackage", -- [847]
+ "SelectStationery", -- [848]
+ "SendMail", -- [849]
+ "SetSendMailCOD", -- [850]
+ "SetSendMailMoney", -- [851]
+ "TakeInboxItem", -- [852]
+ "TakeInboxMoney", -- [853]
+ "TakeInboxTextItem", -- [854]
+ "ClickLandmark", -- [856]
+ "GetCorpseMapPosition", -- [857]
+ "GetCurrentMapContinent", -- [858]
+ "GetCurrentMapDungeonLevel", -- [859]
+ "GetNumDungeonMapLevels", -- [860]
+ "GetCurrentMapAreaID", -- [861]
+ "GetCurrentMapZone", -- [862]
+ "GetMapContinents", -- [863]
+ "GetMapDebugObjectInfo", -- [864]
+ "GetMapInfo", -- [865]
+ "GetMapLandmarkInfo", -- [866]
+ "GetMapOverlayInfo", -- [867]
+ "GetMapZones", -- [868]
+ "GetNumMapDebugObjects", -- [869]
+ "GetNumMapLandmarks", -- [870]
+ "GetNumMapOverlays", -- [871]
+ "GetPlayerMapPosition", -- [872]
+ "ProcessMapClick", -- [873]
+ "RequestBattlefieldPositions", -- [874]
+ "SetDungeonMapLevel", -- [875]
+ "SetMapByID", -- [876]
+ "SetMapToCurrentZone", -- [877]
+ "SetMapZoom", -- [878]
+ "SetupFullscreenScale", -- [879]
+ "UpdateMapHighlight", -- [880]
+ "CreateWorldMapArrowFrame", -- [881]
+ "UpdateWorldMapArrowFrames", -- [882]
+ "ShowWorldMapArrowFrame", -- [883]
+ "PositionWorldMapArrowFrame", -- [884]
+ "ZoomOut", -- [885]
+ "BuyMerchantItem", -- [887]
+ "BuybackItem", -- [888]
+ "CanMerchantRepair", -- [889]
+ "CloseMerchant", -- [890]
+ "GetBuybackItemInfo", -- [891]
+ "GetBuybackItemLink", -- [892]
+ "GetMerchantItemCostInfo", -- [893]
+ "GetMerchantItemCostItem", -- [894]
+ "GetMerchantItemInfo", -- [895]
+ "GetMerchantItemLink", -- [896]
+ "GetMerchantItemMaxStack", -- [897]
+ "GetMerchantNumItems", -- [898]
+ "GetRepairAllCost", -- [899]
+ "HideRepairCursor", -- [900]
+ "InRepairMode", -- [901]
+ "PickupMerchantItem", -- [902]
+ "RepairAllItems", -- [903]
+ "ShowMerchantSellCursor", -- [904]
+ "ShowRepairCursor", -- [905]
+ "GetNumBuybackItems", -- [906]
+ "CastPetAction", -- [908]
+ "ClosePetStables", -- [909]
+ "DropItemOnUnit", -- [910]
+ "GetPetActionCooldown", -- [911]
+ "GetPetActionInfo", -- [912]
+ "GetPetActionSlotUsable", -- [913]
+ "GetPetActionsUsable", -- [914]
+ "GetPetExperience", -- [915]
+ "GetPetFoodTypes", -- [916]
+ "GetPetHappiness", -- [917]
+ "GetPetIcon", -- [918]
+ "GetPetTimeRemaining", -- [919]
+ "GetStablePetFoodTypes", -- [920]
+ "GetStablePetInfo", -- [921]
+ "HasPetSpells", -- [922]
+ "HasPetUI", -- [923]
+ "PetAbandon", -- [924]
+ "PetAggressiveMode", -- [925]
+ "PetAttack", -- [926]
+ "IsPetAttackActive", -- [927]
+ "PetStopAttack", -- [928]
+ "PetCanBeAbandoned", -- [929]
+ "PetCanBeDismissed", -- [930]
+ "PetCanBeRenamed", -- [931]
+ "PetDefensiveMode", -- [932]
+ "PetDismiss", -- [933]
+ "PetFollow", -- [934]
+ "PetHasActionBar", -- [935]
+ "PetPassiveMode", -- [936]
+ "PetRename", -- [937]
+ "PetWait", -- [938]
+ "PickupPetAction", -- [939]
+ "PickupStablePet", -- [940]
+ "SetPetStablePaperdoll", -- [941]
+ "TogglePetAutocast", -- [942]
+ "ToggleSpellAutocast", -- [943]
+ "GetSpellAutocast", -- [944]
+ "AddQuestWatch", -- [946]
+ "GetActiveLevel", -- [947]
+ "GetActiveTitle", -- [948]
+ "GetAvailableLevel", -- [949]
+ "GetAvailableTitle", -- [950]
+ "GetAvailableQuestInfo", -- [951]
+ "GetGreetingText", -- [952]
+ "GetNumQuestLeaderBoards", -- [953]
+ "GetNumQuestWatches", -- [954]
+ "GetObjectiveText", -- [955]
+ "GetProgressText", -- [956]
+ "GetQuestGreenRange", -- [957]
+ "GetQuestIndexForWatch", -- [958]
+ "GetQuestLink", -- [959]
+ "GetQuestLogGroupNum", -- [960]
+ "GetQuestLogLeaderBoard", -- [961]
+ "GetQuestLogTitle", -- [962]
+ "GetQuestReward", -- [963]
+ "GetRewardArenaPoints", -- [964]
+ "GetRewardHonor", -- [965]
+ "GetRewardMoney", -- [966]
+ "GetRewardSpell", -- [967]
+ "GetRewardTalents", -- [968]
+ "GetRewardText", -- [969]
+ "GetRewardTitle", -- [970]
+ "GetRewardXP", -- [971]
+ "IsQuestWatched", -- [972]
+ "IsUnitOnQuest", -- [973]
+ "QuestFlagsPVP", -- [974]
+ "QuestGetAutoAccept", -- [975]
+ "RemoveQuestWatch", -- [976]
+ "ShiftQuestWatches", -- [977]
+ "SortQuestWatches", -- [978]
+ "QueryQuestsCompleted", -- [979]
+ "GetQuestsCompleted", -- [980]
+ "QuestIsDaily", -- [981]
+ "QuestIsWeekly", -- [982]
+ "ClearRaidMarker", -- [984]
+ "ConvertToRaid", -- [985]
+ "ConvertToParty", -- [986]
+ "DemoteAssistant", -- [987]
+ "GetAllowLowLevelRaid", -- [988]
+ "GetNumRaidMembers", -- [989]
+ "GetRealNumRaidMembers", -- [990]
+ "GetPartyAssignment", -- [991]
+ "GetPartyAssignment", -- [992]
+ "GetRaidRosterInfo", -- [993]
+ "GetRaidTargetIndex", -- [994]
+ "GetReadyCheckStatus", -- [995]
+ "InitiateRolePoll", -- [996]
+ "IsRaidLeader", -- [997]
+ "IsRaidOfficer", -- [998]
+ "PlaceRaidMarker", -- [999]
+ "PromoteToAssistant", -- [1000]
+ "RequestRaidInfo", -- [1001]
+ "SetPartyAssignment", -- [1002]
+ "SetAllowLowLevelRaid", -- [1003]
+ "SetRaidRosterSelection", -- [1004]
+ "SetRaidSubgroup", -- [1005]
+ "SwapRaidSubgroup", -- [1006]
+ "SetRaidTarget", -- [1007]
+ "UnitInRaid", -- [1008]
+ "LFGGetDungeonInfoByID", -- [1009]
+ "GetInstanceLockTimeRemainingEncounter", -- [1010]
+ "RefreshLFGList", -- [1011]
+ "SearchLFGGetEncounterResults", -- [1012]
+ "SearchLFGGetJoinedID", -- [1013]
+ "SearchLFGGetNumResults", -- [1014]
+ "SearchLFGGetPartyResults", -- [1015]
+ "SearchLFGGetResults", -- [1016]
+ "SearchLFGJoin", -- [1017]
+ "SearchLFGLeave", -- [1018]
+ "SearchLFGSort", -- [1019]
+ "SetLFGComment", -- [1020]
+ "ClearAllLFGDungeons", -- [1021]
+ "JoinLFG", -- [1022]
+ "LeaveLFG", -- [1023]
+ "RequestLFDPartyLockInfo", -- [1024]
+ "RequestLFDPlayerLockInfo", -- [1025]
+ "SetLFGDungeon", -- [1026]
+ "SetLFGDungeonEnabled", -- [1027]
+ "SetLFGHeaderCollapsed", -- [1028]
+ "GetAddOnCPUUsage", -- [1029]
+ "GetAddOnMemoryUsage", -- [1030]
+ "GetEventCPUUsage", -- [1031]
+ "GetFrameCPUUsage", -- [1032]
+ "GetFunctionCPUUsage", -- [1033]
+ "GetScriptCPUUsage", -- [1034]
+ "ResetCPUUsage", -- [1035]
+ "UpdateAddOnCPUUsage", -- [1036]
+ "UpdateAddOnMemoryUsage", -- [1037]
+ "issecure", -- [1038]
+ "forceinsecure", -- [1039]
+ "issecurevariable", -- [1040]
+ "securecall", -- [1041]
+ "hooksecurefunc", -- [1042]
+ "InCombatLockdown", -- [1043]
+ "CombatTextSetActiveUnit", -- [1046]
+ "DownloadSettings", -- [1047]
+ "GetCVar", -- [1048]
+ "GetCVarDefault", -- [1049]
+ "GetCVarBool", -- [1050]
+ "GetCVarInfo", -- [1051]
+ "GetCurrentMultisampleFormat", -- [1052]
+ "GetCurrentResolution", -- [1053]
+ "GetGamma", -- [1054]
+ "GetMultisampleFormats", -- [1055]
+ "GetRefreshRates", -- [1056]
+ "GetScreenResolutions", -- [1057]
+ "GetVideoCaps", -- [1058]
+ "IsThreatWarningEnabled", -- [1059]
+ "RegisterCVar", -- [1060]
+ "ResetPerformanceValues", -- [1061]
+ "ResetTutorials", -- [1062]
+ "SetCVar", -- [1063]
+ "SetEuropeanNumbers", -- [1064]
+ "SetGamma", -- [1065]
+ "SetLayoutMode", -- [1066]
+ "SetMultisampleFormat", -- [1067]
+ "SetScreenResolution", -- [1068]
+ "ShowCloak", -- [1069]
+ "ShowHelm", -- [1070]
+ "ShowNumericThreat", -- [1071]
+ "ShowingCloak", -- [1072]
+ "ShowingHelm", -- [1073]
+ "UploadSettings", -- [1074]
+ "AbandonSkill", -- [1076]
+ "CastShapeshiftForm", -- [1078]
+ "CastSpell", -- [1079]
+ "CastSpellByName", -- [1080]
+ "GetMultiCastTotemSpells", -- [1081]
+ "GetNumShapeshiftForms", -- [1082]
+ "GetNumSpellTabs", -- [1083]
+ "GetShapeshiftForm", -- [1084]
+ "GetShapeshiftFormCooldown", -- [1085]
+ "GetShapeshiftFormInfo", -- [1086]
+ "GetSpellAutocast", -- [1087]
+ "GetSpellBookItemInfo", -- [1088]
+ "GetSpellBookItemName", -- [1089]
+ "GetSpellCooldown", -- [1090]
+ "GetSpellDescription", -- [1091]
+ "GetSpellInfo", -- [1092]
+ "GetSpellLink", -- [1093]
+ "GetSpellTabInfo", -- [1094]
+ "GetSpellTexture", -- [1095]
+ "GetTotemInfo", -- [1096]
+ "IsAttackSpell", -- [1097]
+ "IsAutoRepeatSpell", -- [1098]
+ "IsPassiveSpell", -- [1099]
+ "IsSpellInRange", -- [1100]
+ "IsUsableSpell", -- [1101]
+ "PickupSpell", -- [1102]
+ "QueryCastSequence", -- [1103]
+ "SetMultiCastSpell", -- [1104]
+ "SpellCanTargetUnit", -- [1105]
+ "SpellHasRange", -- [1106]
+ "SpellIsTargeting", -- [1107]
+ "SpellStopCasting", -- [1108]
+ "SpellStopTargeting", -- [1109]
+ "SpellTargetUnit", -- [1110]
+ "ToggleSpellAutocast", -- [1111]
+ "UnitCastingInfo", -- [1112]
+ "UnitChannelInfo", -- [1113]
+ "ConsoleExec", -- [1115]
+ "DetectWowMouse", -- [1116]
+ "GetBuildInfo", -- [1117]
+ "geterrorhandler", -- [1118]
+ "GetCurrentKeyBoardFocus", -- [1119]
+ "GetExistingLocales", -- [1120]
+ "GetFramerate", -- [1121]
+ "GetGameTime", -- [1122]
+ "GetLocale", -- [1123]
+ "GetCursorPosition", -- [1124]
+ "GetNetStats", -- [1125]
+ "GetRealmName", -- [1126]
+ "GetScreenHeight", -- [1127]
+ "GetScreenWidth", -- [1128]
+ "GetText", -- [1129]
+ "GetTime", -- [1130]
+ "IsAltKeyDown", -- [1131]
+ "InCinematic", -- [1132]
+ "IsControlKeyDown", -- [1133]
+ "IsDebugBuild", -- [1134]
+ "IsDesaturateSupported", -- [1135]
+ "IsLeftAltKeyDown", -- [1136]
+ "IsLeftControlKeyDown", -- [1137]
+ "IsLeftShiftKeyDown", -- [1138]
+ "IsLinuxClient", -- [1139]
+ "IsLoggedIn", -- [1140]
+ "IsMacClient", -- [1141]
+ "IsRightAltKeyDown", -- [1142]
+ "IsRightControlKeyDown", -- [1143]
+ "IsRightShiftKeyDown", -- [1144]
+ "IsShiftKeyDown", -- [1145]
+ "IsStereoVideoAvailable", -- [1146]
+ "IsWindowsClient", -- [1147]
+ "OpeningCinematic", -- [1148]
+ "PlayMusic", -- [1149]
+ "PlaySound", -- [1150]
+ "PlaySoundFile", -- [1151]
+ "ReloadUI", -- [1152]
+ "RepopMe", -- [1153]
+ "RequestTimePlayed", -- [1154]
+ "RestartGx", -- [1155]
+ "RunScript", -- [1156]
+ "Screenshot", -- [1157]
+ "SetAutoDeclineGuildInvites", -- [1158]
+ "seterrorhandler", -- [1159]
+ "StopCinematic", -- [1160]
+ "StopMusic", -- [1161]
+ "UIParentLoadAddOn", -- [1162]
+ "TakeScreenshot", -- [1163]
+ "BuyTrainerService", -- [1168]
+ "CheckTalentMasterDist", -- [1169]
+ "ConfirmTalentWipe", -- [1170]
+ "GetActiveTalentGroup", -- [1171]
+ "GetNumTalentTabs", -- [1172]
+ "GetNumTalents", -- [1173]
+ "GetTalentInfo", -- [1174]
+ "GetTalentLink", -- [1175]
+ "GetTalentPrereqs", -- [1176]
+ "GetTalentTabInfo", -- [1177]
+ "LearnTalent", -- [1178]
+ "SetActiveTalentGroup", -- [1179]
+ "GetNumTalentGroups", -- [1180]
+ "GetActiveTalentGroup", -- [1181]
+ "AddPreviewTalentPoints", -- [1182]
+ "GetGroupPreviewTalentPointsSpent", -- [1183]
+ "GetPreviewTalentPointsSpent", -- [1184]
+ "GetUnspentTalentPoints", -- [1185]
+ "LearnPreviewTalents", -- [1186]
+ "ResetGroupPreviewTalentPoints", -- [1187]
+ "ResetPreviewTalentPoints", -- [1188]
+ "AssistUnit", -- [1190]
+ "AttackTarget", -- [1191]
+ "ClearTarget", -- [1192]
+ "ClickTargetTradeButton", -- [1193]
+ "TargetLastEnemy", -- [1194]
+ "TargetLastTarget", -- [1195]
+ "TargetNearestEnemy", -- [1196]
+ "TargetNearestEnemyPlayer", -- [1197]
+ "TargetNearestFriend", -- [1198]
+ "TargetNearestFriendPlayer", -- [1199]
+ "TargetNearestPartyMember", -- [1200]
+ "TargetNearestRaidMember", -- [1201]
+ "TargetUnit", -- [1202]
+ "ToggleBackpack", -- [1204]
+ "ToggleBag", -- [1205]
+ "ToggleCharacter", -- [1206]
+ "ToggleFriendsFrame", -- [1207]
+ "ToggleSpellBook", -- [1208]
+ "TradeSkill", -- [1209]
+ "CloseTradeSkill", -- [1210]
+ "CollapseTradeSkillSubClass", -- [1211]
+ "PickupPlayerMoney", -- [1212]
+ "PickupTradeMoney", -- [1213]
+ "SetTradeMoney", -- [1214]
+ "ReplaceTradeEnchant", -- [1215]
+ "AssistUnit", -- [1217]
+ "CheckInteractDistance", -- [1218]
+ "DropItemOnUnit", -- [1219]
+ "FollowUnit", -- [1220]
+ "FocusUnit", -- [1221]
+ "ClearFocus", -- [1222]
+ "GetUnitName", -- [1223]
+ "GetUnitPitch", -- [1224]
+ "GetUnitSpeed", -- [1225]
+ "InviteUnit", -- [1226]
+ "IsUnitOnQuest", -- [1227]
+ "SpellCanTargetUnit", -- [1228]
+ "SpellTargetUnit", -- [1229]
+ "TargetUnit", -- [1230]
+ "UnitAffectingCombat", -- [1231]
+ "UnitArmor", -- [1232]
+ "UnitAttackBothHands", -- [1233]
+ "UnitAttackPower", -- [1234]
+ "UnitAttackSpeed", -- [1235]
+ "UnitAura", -- [1236]
+ "UnitBuff", -- [1237]
+ "UnitCanAssist", -- [1238]
+ "UnitCanAttack", -- [1239]
+ "UnitCanCooperate", -- [1240]
+ "UnitClass", -- [1241]
+ "UnitClassification", -- [1242]
+ "UnitCreatureFamily", -- [1243]
+ "UnitCreatureType", -- [1244]
+ "UnitDamage", -- [1245]
+ "UnitDebuff", -- [1246]
+ "UnitDefense", -- [1247]
+ "UnitDetailedThreatSituation", -- [1248]
+ "UnitExists", -- [1249]
+ "UnitFactionGroup", -- [1250]
+ "UnitGroupRolesAssigned", -- [1251]
+ "UnitGUID", -- [1252]
+ "GetPlayerInfoByGUID", -- [1253]
+ "UnitHasLFGDeserter", -- [1254]
+ "UnitHasLFGRandomCooldown", -- [1255]
+ "UnitHasRelicSlot", -- [1256]
+ "UnitHealth", -- [1257]
+ "UnitHealthMax", -- [1258]
+ "UnitInParty", -- [1259]
+ "UnitInRaid", -- [1260]
+ "UnitInBattleground", -- [1261]
+ "UnitIsInMyGuild", -- [1262]
+ "UnitInRange", -- [1263]
+ "UnitIsAFK", -- [1264]
+ "UnitIsCharmed", -- [1265]
+ "UnitIsConnected", -- [1266]
+ "UnitIsCorpse", -- [1267]
+ "UnitIsDead", -- [1268]
+ "UnitIsDeadOrGhost", -- [1269]
+ "UnitIsDND", -- [1270]
+ "UnitIsEnemy", -- [1271]
+ "UnitIsFeignDeath", -- [1272]
+ "UnitIsFriend", -- [1273]
+ "UnitIsGhost", -- [1274]
+ "UnitIsPVP", -- [1275]
+ "UnitIsPVPFreeForAll", -- [1276]
+ "UnitIsPVPSanctuary", -- [1277]
+ "UnitIsPartyLeader", -- [1278]
+ "UnitIsPlayer", -- [1279]
+ "UnitIsPossessed", -- [1280]
+ "UnitIsRaidOfficer", -- [1281]
+ "UnitIsSameServer", -- [1282]
+ "UnitIsTapped", -- [1283]
+ "UnitIsTappedByPlayer", -- [1284]
+ "UnitIsTappedByAllThreatList", -- [1285]
+ "UnitIsTrivial", -- [1286]
+ "UnitIsUnit", -- [1287]
+ "UnitIsVisible", -- [1288]
+ "UnitLevel", -- [1289]
+ "UnitMana", -- [1290]
+ "UnitManaMax", -- [1291]
+ "UnitName", -- [1292]
+ "UnitOnTaxi", -- [1293]
+ "UnitPlayerControlled", -- [1294]
+ "UnitPlayerOrPetInParty", -- [1295]
+ "UnitPlayerOrPetInRaid", -- [1296]
+ "UnitPVPName", -- [1297]
+ "UnitPVPRank", -- [1298]
+ "UnitPower", -- [1299]
+ "UnitPowerMax", -- [1300]
+ "UnitPowerType", -- [1301]
+ "UnitRace", -- [1302]
+ "UnitRangedAttack", -- [1303]
+ "UnitRangedAttackPower", -- [1304]
+ "UnitRangedDamage", -- [1305]
+ "UnitReaction", -- [1306]
+ "UnitResistance", -- [1307]
+ "UnitSelectionColor", -- [1308]
+ "UnitSex", -- [1309]
+ "UnitStat", -- [1310]
+ "UnitThreatSituation", -- [1311]
+ "UnitUsingVehicle", -- [1312]
+ "GetThreatStatusColor", -- [1313]
+ "UnitXP", -- [1314]
+ "UnitXPMax", -- [1315]
+ "SetPortraitTexture", -- [1316]
+ "SetPortraitToTexture", -- [1317]
+ "tinsert", -- [1318]
+}
+
-- endp
\ No newline at end of file
diff --git a/Libs/LibCompress/LibCompress.lua b/Libs/LibCompress/LibCompress.lua
index 4eba26e9..63bda273 100644
--- a/Libs/LibCompress/LibCompress.lua
+++ b/Libs/LibCompress/LibCompress.lua
@@ -5,12 +5,12 @@
-- Authors: jjsheets and Galmok of European Stormrage (Horde)
-- Email : sheets.jeff@gmail.com and galmok@gmail.com
-- Licence: GPL version 2 (General Public License)
--- Revision: $Revision: 77 $
--- Date: $Date: 2017-07-13 16:54:12 -0300 (qui, 13 jul 2017) $
+-- Revision: $Revision: 81 $
+-- Date: $Date: 2018-02-25 06:31:34 +0000 (Sun, 25 Feb 2018) $
----------------------------------------------------------------------------------
-local LibCompress = LibStub:NewLibrary("LibCompress", 90000 + tonumber(("$Revision: 77 $"):match("%d+")))
+local LibCompress = LibStub:NewLibrary("LibCompress", 90000 + tonumber(("$Revision: 81 $"):match("%d+")))
if not LibCompress then return end
@@ -101,10 +101,10 @@ local function encode(x)
for k = 1, #bytes do
bytes[k] = nil
end
-
+
bytes[#bytes + 1] = x % 255
x=math.floor(x/255)
-
+
while x > 0 do
bytes[#bytes + 1] = x % 255
x=math.floor(x/255)
@@ -148,15 +148,15 @@ function LibCompress:CompressLZW(uncompressed)
for k in pairs(dict) do
dict[k] = nil
end
-
+
local result = {"\002"}
local w = ''
local ressize = 1
-
+
for i = 0, 255 do
dict[string_char(i)] = i
end
-
+
for i = 1, #uncompressed do
local c = uncompressed:sub(i, i)
local wc = w..c
@@ -171,13 +171,13 @@ function LibCompress:CompressLZW(uncompressed)
w = c
end
end
-
+
if w then
local r = encode(dict[w])
ressize = ressize + #r
result[#result + 1] = r
end
-
+
if (#uncompressed + 1) > ressize then
return table_concat(result)
else
@@ -196,25 +196,25 @@ function LibCompress:DecompressLZW(compressed)
if compressed:sub(1, 1) ~= "\002" then
return nil, "Can only decompress LZW compressed data ("..tostring(compressed:sub(1, 1))..")"
end
-
+
compressed = compressed:sub(2)
local dict_size = 256
-
+
for k in pairs(dict) do
dict[k] = nil
end
-
+
for i = 0, 255 do
dict[i] = string_char(i)
end
-
+
local result = {}
local t = 1
local delta, k
k, delta = decode(compressed, t)
t = t + delta
result[#result + 1] = dict[k]
-
+
local w = dict[k]
local entry
while t <= #compressed do
@@ -277,7 +277,7 @@ local function addBits(tbl, code, length)
remainder = remainder + bit_lshift(code, remainder_length) -- this overflows! Top part of code is lost (but we handle it below)
-- remainder now holds 4 full bytes to store. So lets do it.
compressed_size = compressed_size + 1
- tbl[compressed_size] = string_char(bit_band(remainder, 255)) ..
+ tbl[compressed_size] = string_char(bit_band(remainder, 255)) ..
string_char(bit_band(bit_rshift(remainder, 8), 255)) ..
string_char(bit_band(bit_rshift(remainder, 16), 255)) ..
string_char(bit_band(bit_rshift(remainder, 24), 255))
@@ -309,7 +309,8 @@ local function addBits(tbl, code, length)
end
end
--- word size for this huffman algorithm is 8 bits (1 byte). This means the best compression is representing 1 byte with 1 bit, i.e. compress to 0.125 of original size.
+-- word size for this huffman algorithm is 8 bits (1 byte).
+-- this means the best compression is representing 1 byte with 1 bit, i.e. compress to 0.125 of original size.
function LibCompress:CompressHuffman(uncompressed)
if type(uncompressed) ~= "string" then
return nil, "Can only compress strings"
@@ -317,10 +318,9 @@ function LibCompress:CompressHuffman(uncompressed)
if #uncompressed == 0 then
return "\001"
end
-
+
-- make histogram
local hist = {}
- local n = 0
-- don't have to use all data to make the histogram
local uncompressed_size = string_len(uncompressed)
local c
@@ -338,8 +338,9 @@ function LibCompress:CompressHuffman(uncompressed)
symbols[symbol] = leaf
table_insert(leafs, leaf)
end
-
- --Enqueue all leaf nodes into the first queue (by probability in increasing order so that the least likely item is in the head of the queue).
+
+ -- Enqueue all leaf nodes into the first queue (by probability in increasing order,
+ -- so that the least likely item is in the head of the queue).
sort(leafs, function(a, b)
if a.weight < b.weight then
return true
@@ -351,7 +352,7 @@ function LibCompress:CompressHuffman(uncompressed)
end)
local nLeafs = #leafs
-
+
-- create tree
local huff = {}
--While there is more than one node in the queues:
@@ -377,7 +378,7 @@ function LibCompress:CompressHuffman(uncompressed)
table_remove(huff, hi)
end
end
-
+
-- Dequeue second
if not next(huff) then
li, leaf2 = next(leafs)
@@ -405,7 +406,7 @@ function LibCompress:CompressHuffman(uncompressed)
}
table_insert(huff,newNode)
end
-
+
if #leafs > 0 then
li, length = next(leafs)
table_insert(huff, length)
@@ -423,7 +424,7 @@ function LibCompress:CompressHuffman(uncompressed)
huff.bcode = 0
huff.blength = 1
end
-
+
-- READING
-- bitfield = 0
-- bitfield_len = 0
@@ -440,20 +441,20 @@ function LibCompress:CompressHuffman(uncompressed)
-- read byte3
-- bitfield = bitfield + bit_lshift(byte3, bitfield_len)
-- bitfield_len = bitfield_len + 8
-
+
-- WRITING
remainder = 0
remainder_length = 0
-
+
local compressed = tables.Huffman_compressed
--compressed_size = 0
-- first byte is version info. 0 = uncompressed, 1 = 8 - bit word huffman compressed
compressed[1] = "\003"
-
+
-- Header: byte 0 = #leafs, bytes 1-3 = size of uncompressed data
-- max 2^24 bytes
- local length = string_len(uncompressed)
+ length = string_len(uncompressed)
compressed[2] = string_char(bit_band(nLeafs -1, 255)) -- number of leafs
compressed[3] = string_char(bit_band(length, 255)) -- bit 0-7
compressed[4] = string_char(bit_band(bit_rshift(length, 8), 255)) -- bit 8-15
@@ -478,29 +479,29 @@ function LibCompress:CompressHuffman(uncompressed)
local ulimit
for i = 1, length, 200 do
ulimit = length < (i + 199) and length or (i + 199)
-
+
for sub_i = i, ulimit do
c = string_byte(uncompressed, sub_i)
addBits(compressed, symbols[c].bcode, symbols[c].blength)
end
-
+
large_compressed_size = large_compressed_size + 1
large_compressed[large_compressed_size] = table_concat(compressed, "", 1, compressed_size)
compressed_size = 0
end
-
+
-- add remaining bits (if any)
if remainder_length > 0 then
large_compressed_size = large_compressed_size + 1
large_compressed[large_compressed_size] = string_char(remainder)
end
local compressed_string = table_concat(large_compressed, "", 1, large_compressed_size)
-
+
-- is compression worth it? If not, return uncompressed data.
if (#uncompressed + 1) <= #compressed_string then
return "\001"..uncompressed
end
-
+
setCleanupTables("Huffman_compressed", "Huffman_large_compressed")
return compressed_string
end
@@ -543,7 +544,7 @@ local function lshift64(value_high, value, lshift_amount)
return 0, 0
end
if lshift_amount < 32 then
- return bit_bor(bit_lshift(value_high, lshift_amount), bit_rshift(value, 32-lshift_amount)),
+ return bit_bor(bit_lshift(value_high, lshift_amount), bit_rshift(value, 32-lshift_amount)),
bit_lshift(value, lshift_amount)
end
-- 32-63 bit shift
@@ -649,7 +650,7 @@ function LibCompress:DecompressHuffman(compressed)
return v
end
})
-
+
local i = 6 -- byte 1-5 are header bytes
local c, cl
local minCodeLen = 1000
@@ -666,7 +667,7 @@ function LibCompress:DecompressHuffman(compressed)
temp_high, temp = lshift64(0, c, bitfield_len)
bitfield_high, bitfield = bor64(bitfield_high, bitfield, temp_high, temp)
bitfield_len = bitfield_len + 8
-
+
if state == 0 then
symbol = bit_band(bitfield, 255)
bitfield_high, bitfield = rshift64(bitfield_high, bitfield, 8)
@@ -690,33 +691,32 @@ function LibCompress:DecompressHuffman(compressed)
end
i = i + 1
end
-
+
-- don't create new subtables for entries not in the map. Waste of space.
-- But do return an empty table to prevent runtime errors. (instead of returning nil)
local mt = {}
setmetatable(map, {
__index = function (t, k)
- return mt
+ return mt
end
})
-
+
local uncompressed = tables.Huffman_uncompressed
local large_uncompressed = tables.Huffman_large_uncompressed
local uncompressed_size = 0
local large_uncompressed_size = 0
local test_code
local test_code_len = minCodeLen
- local symbol
local dec_size = 0
compressed_size = compressed_size + 1
local temp_limit = 200 -- first limit of uncompressed data. large_uncompressed will hold strings of length 200
temp_limit = temp_limit > orig_size and orig_size or temp_limit
-
+
while true do
- if test_code_len <= bitfield_len then
+ if test_code_len <= bitfield_len then
test_code = bit_band( bitfield, lshiftMinusOneMask[test_code_len])
symbol = map[test_code_len][test_code]
-
+
if symbol then
uncompressed_size = uncompressed_size + 1
uncompressed[uncompressed_size] = symbol
@@ -732,7 +732,7 @@ function LibCompress:DecompressHuffman(compressed)
temp_limit = temp_limit + 200 -- repeated chunk size is 200 uncompressed bytes
temp_limit = temp_limit > orig_size and orig_size or temp_limit
end
-
+
bitfield = bit_rshift(bitfield, test_code_len)
bitfield_len = bitfield_len - test_code_len
test_code_len = minCodeLen
@@ -826,29 +826,29 @@ end
Howto: Encode and Decode:
3 functions are supplied, 2 of them are variants of the first. They return a table with functions to encode and decode text.
-
+
table, msg = LibCompress:GetEncodeTable(reservedChars, escapeChars, mapChars)
-
+
reservedChars: The characters in this string will not appear in the encoded data.
escapeChars: A string of characters used as escape-characters (don't supply more than needed). #escapeChars >= 1
mapChars: First characters in reservedChars maps to first characters in mapChars. (#mapChars <= #reservedChars)
-
+
return value:
table
if nil then msg holds an error message, otherwise use like this:
-
+
encoded_message = table:Encode(message)
message = table:Decode(encoded_message)
-
+
GetAddonEncodeTable: Sets up encoding for the addon channel (\000 is encoded)
GetChatEncodeTable: Sets up encoding for the chat channel (many bytes encoded, see the function for details)
-
+
Except for the mapped characters, all encoding will be with 1 escape character followed by 1 suffix, i.e. 2 bytes.
]]
-- to be able to match any requested byte value, the search string must be preprocessed
-- characters to escape with %:
-- ( ) . % + - * ? [ ] ^ $
--- "illegal" byte values:
+-- "illegal" byte values:
-- 0 is replaces %z
local gsub_escape_table = {
['\000'] = "%z",
@@ -874,44 +874,44 @@ function LibCompress:GetEncodeTable(reservedChars, escapeChars, mapChars)
reservedChars = reservedChars or ""
escapeChars = escapeChars or ""
mapChars = mapChars or ""
-
+
-- select a default escape character
if escapeChars == "" then
return nil, "No escape characters supplied"
end
-
+
if #reservedChars < #mapChars then
return nil, "Number of reserved characters must be at least as many as the number of mapped chars"
end
-
+
if reservedChars == "" then
return nil, "No characters to encode"
end
-
+
-- list of characters that must be encoded
local encodeBytes = reservedChars..escapeChars..mapChars
-
+
-- build list of bytes not available as a suffix to a prefix byte
local taken = {}
- for i = 1, string_len(encodeBytes) do
+ for i = 1, string_len(encodeBytes) do
taken[string_sub(encodeBytes, i, i)] = true
end
-
+
-- allocate a table to hold encode/decode strings/functions
local codecTable = {}
-
+
-- the encoding can be a single gsub, but the decoding can require multiple gsubs
local decode_func_string = {}
-
+
local encode_search = {}
local encode_translate = {}
local encode_func
local decode_search = {}
local decode_translate = {}
local decode_func
- local c, r, i, to, from
+ local c, r, to, from
local escapeCharIndex, escapeChar = 0
-
+
-- map single byte to single byte
if #mapChars > 0 then
for i = 1, #mapChars do
@@ -927,7 +927,7 @@ function LibCompress:GetEncodeTable(reservedChars, escapeChars, mapChars)
table_insert(decode_func_string, "str = str:gsub(self.decode_search"..tostring(escapeCharIndex)..", self.decode_translate"..tostring(escapeCharIndex)..");")
end
-
+
-- map single byte to double-byte
escapeCharIndex = escapeCharIndex + 1
escapeChar = string_sub(escapeChars, escapeCharIndex, escapeCharIndex)
@@ -944,14 +944,14 @@ function LibCompress:GetEncodeTable(reservedChars, escapeChars, mapChars)
if escapeChar == "" then -- we are out of escape chars and we need more!
return nil, "Out of escape characters"
end
-
+
codecTable["decode_search"..tostring(escapeCharIndex)] = escape_for_gsub(escapeChar).."([".. escape_for_gsub(table_concat(decode_search)).."])"
codecTable["decode_translate"..tostring(escapeCharIndex)] = decode_translate
table_insert(decode_func_string, "str = str:gsub(self.decode_search"..tostring(escapeCharIndex)..", self.decode_translate"..tostring(escapeCharIndex)..");")
-
+
escapeCharIndex = escapeCharIndex + 1
escapeChar = string_sub(escapeChars, escapeCharIndex, escapeCharIndex)
-
+
r = 0
decode_search = {}
decode_translate = {}
@@ -964,23 +964,23 @@ function LibCompress:GetEncodeTable(reservedChars, escapeChars, mapChars)
r = r + 1
end
end
-
+
if r > 0 then
codecTable["decode_search"..tostring(escapeCharIndex)] = escape_for_gsub(escapeChar).."([".. escape_for_gsub(table_concat(decode_search)).."])"
codecTable["decode_translate"..tostring(escapeCharIndex)] = decode_translate
table_insert(decode_func_string, "str = str:gsub(self.decode_search"..tostring(escapeCharIndex)..", self.decode_translate"..tostring(escapeCharIndex)..");")
end
-
+
-- change last line from "str = ...;" to "return ...;";
decode_func_string[#decode_func_string] = decode_func_string[#decode_func_string]:gsub("str = (.*);", "return %1;")
decode_func_string = "return function(self, str) "..table_concat(decode_func_string).." end"
-
+
encode_search = "([".. escape_for_gsub(table_concat(encode_search)).."])"
decode_search = escape_for_gsub(escapeChars).."([".. escape_for_gsub(table_concat(decode_search)).."])"
-
+
encode_func = assert(loadstring("return function(self, str) return str:gsub(self.encode_search, self.encode_translate); end"))()
decode_func = assert(loadstring(decode_func_string))()
-
+
codecTable.encode_search = encode_search
codecTable.encode_translate = encode_translate
codecTable.Encode = encode_func
@@ -992,7 +992,7 @@ function LibCompress:GetEncodeTable(reservedChars, escapeChars, mapChars)
return codecTable
end
--- Addons: Call this only once and reuse the returned table for all encodings/decodings.
+-- Addons: Call this only once and reuse the returned table for all encodings/decodings.
function LibCompress:GetAddonEncodeTable(reservedChars, escapeChars, mapChars )
reservedChars = reservedChars or ""
escapeChars = escapeChars or ""
@@ -1015,26 +1015,25 @@ function LibCompress:GetChatEncodeTable(reservedChars, escapeChars, mapChars)
-- Because SendChatMessage will error if an UTF8 multibyte character is incomplete,
-- all character values above 127 have to be encoded to avoid this. This costs quite a bit of bandwidth (about 13-14%)
-- Also, because drunken status is unknown for the received, strings used with SendChatMessage should be terminated with
- -- an identifying byte value, after which the server MAY add "...hic!" or as much as it can fit(!).
+ -- an identifying byte value, after which the server MAY add "...hic!" or as much as it can fit(!).
-- Pass the identifying byte as a reserved character to this function to ensure the encoding doesn't contain that value.
-- or use this: local message, match = arg1:gsub("^(.*)\029.-$", "%1")
-- arg1 is message from channel, \029 is the string terminator, but may be used in the encoded datastream as well. :-)
-- This encoding will expand data anywhere from:
-- 0% (average with pure ascii text)
- -- 53.5% (average with random data valued zero to 255)
+ -- 53.5% (average with random data valued zero to 255)
-- 100% (only encoding data that encodes to two bytes)
- local i
local r = {}
-
+
for i = 128, 255 do
table_insert(r, string_char(i))
end
-
+
reservedChars = "sS\000\010\013\124%"..table_concat(r)..(reservedChars or "")
if escapeChars == "" then
escapeChars = "\029\031"
end
-
+
if mapChars == "" then
mapChars = "\015\020";
end
@@ -1067,7 +1066,7 @@ function LibCompress:Encode7bit(str)
remainder_length = remainder_length -7
end
end
-
+
if remainder_length > 0 then
encoded_size = encoded_size + 1
tbl[encoded_size] = string_char(remainder)
@@ -1139,7 +1138,7 @@ and/or fitness for purpose.
--// FCS-16 algorithm implemented as described in RFC 1331
local FCSINIT16 = 65535
--// Fast 16 bit FCS lookup table
-local fcs16tab = { [0]=0, 4489, 8978, 12955, 17956, 22445, 25910, 29887,
+local fcs16tab = { [0]=0, 4489, 8978, 12955, 17956, 22445, 25910, 29887,
35912, 40385, 44890, 48851, 51820, 56293, 59774, 63735,
4225, 264, 13203, 8730, 22181, 18220, 30135, 25662,
40137, 36160, 49115, 44626, 56045, 52068, 63999, 59510,
@@ -1177,7 +1176,6 @@ function LibCompress:fcs16init()
end
function LibCompress:fcs16update(uFcs16, pBuffer)
- local i
local length = string_len(pBuffer)
for i = 1, length do
uFcs16 = bit_bxor(bit_rshift(uFcs16,8), fcs16tab[bit_band(bit_bxor(uFcs16, string_byte(pBuffer, i)), 255)])
@@ -1246,7 +1244,6 @@ function LibCompress:fcs32init()
end
function LibCompress:fcs32update(uFcs32, pBuffer)
- local i
local length = string_len(pBuffer)
for i = 1, length do
uFcs32 = bit_bxor(bit_rshift(uFcs32, 8), fcs32tab[bit_band(bit_bxor(uFcs32, string_byte(pBuffer, i)), 255)])
@@ -1256,4 +1253,4 @@ end
function LibCompress:fcs32final(uFcs32)
return bit_bnot(uFcs32)
-end
\ No newline at end of file
+end
diff --git a/Libs/LibCompress/LibCompress.toc b/Libs/LibCompress/LibCompress.toc
index 42f16e96..08c48d22 100644
--- a/Libs/LibCompress/LibCompress.toc
+++ b/Libs/LibCompress/LibCompress.toc
@@ -1,9 +1,9 @@
-## Interface: 70200
+## Interface: 70300
## Title: Lib: Compress
## Notes: Compression and Decompression library
## Author: Galmok at Stormrage-EU (Horde) and JJSheets
-## Version: @project-version@
+## Version: r82-release
## X-Website: http://www.wowace.com/addons/libcompress/
## X-Category: Library
## X-eMail: galmok AT gmail DOT com, sheets DOT jeff AT gmail DOT com
@@ -11,4 +11,4 @@
## LoadOnDemand: 1
LibStub\LibStub.lua
-lib.xml
\ No newline at end of file
+lib.xml
diff --git a/Libs/LibCompress/lib.xml b/Libs/LibCompress/lib.xml
index c85b2134..d35c6a9f 100644
--- a/Libs/LibCompress/lib.xml
+++ b/Libs/LibCompress/lib.xml
@@ -1,4 +1,4 @@
-
\ No newline at end of file
+
diff --git a/Libs/LibDBIcon-1.0/LibDBIcon-1.0.lua b/Libs/LibDBIcon-1.0/LibDBIcon-1.0.lua
index 341dbe8b..00925ec0 100644
--- a/Libs/LibDBIcon-1.0/LibDBIcon-1.0.lua
+++ b/Libs/LibDBIcon-1.0/LibDBIcon-1.0.lua
@@ -6,7 +6,7 @@
--
local DBICON10 = "LibDBIcon-1.0"
-local DBICON10_MINOR = 34 -- Bump on changes
+local DBICON10_MINOR = 36 -- Bump on changes
if not LibStub then error(DBICON10 .. " requires LibStub.") end
local ldb = LibStub("LibDataBroker-1.1", true)
if not ldb then error(DBICON10 .. " requires LibDataBroker-1.1.") end
@@ -18,6 +18,7 @@ lib.objects = lib.objects or {}
lib.callbackRegistered = lib.callbackRegistered or nil
lib.callbacks = lib.callbacks or LibStub("CallbackHandler-1.0"):New(lib)
lib.notCreated = lib.notCreated or {}
+lib.tooltip = lib.tooltip or CreateFrame("GameTooltip", "LibDBIconTooltip", UIParent, "GameTooltipTemplate")
function lib:IconCallback(event, name, key, value)
if lib.objects[name] then
@@ -58,10 +59,10 @@ local function onEnter(self)
if self.isMoving then return end
local obj = self.dataObject
if obj.OnTooltipShow then
- GameTooltip:SetOwner(self, "ANCHOR_NONE")
- GameTooltip:SetPoint(getAnchors(self))
- obj.OnTooltipShow(GameTooltip)
- GameTooltip:Show()
+ lib.tooltip:SetOwner(self, "ANCHOR_NONE")
+ lib.tooltip:SetPoint(getAnchors(self))
+ obj.OnTooltipShow(lib.tooltip)
+ lib.tooltip:Show()
elseif obj.OnEnter then
obj.OnEnter(self)
end
@@ -69,7 +70,7 @@ end
local function onLeave(self)
local obj = self.dataObject
- GameTooltip:Hide()
+ lib.tooltip:Hide()
if obj.OnLeave then obj.OnLeave(self) end
end
@@ -137,7 +138,7 @@ do
self.icon:UpdateCoord()
self:SetScript("OnUpdate", onUpdate)
self.isMoving = true
- GameTooltip:Hide()
+ lib.tooltip:Hide()
end
end
diff --git a/Libs/LibGroupInSpecT-1.1/LibGroupInSpecT-1.1.toc b/Libs/LibGroupInSpecT-1.1/LibGroupInSpecT-1.1.toc
index 63aa683c..20212ba7 100644
--- a/Libs/LibGroupInSpecT-1.1/LibGroupInSpecT-1.1.toc
+++ b/Libs/LibGroupInSpecT-1.1/LibGroupInSpecT-1.1.toc
@@ -1,11 +1,9 @@
-## Interface: 70200
+## Interface: 70300
## Title: Lib: GroupInSpecT-1.1
## Notes: Keeps track of group members and keeps an up-to-date cache of their specialization and talents.
-## Version: @project-version@
+## Version: r92
## Author: Anyia of HordeYakka (Jubei'Thos)
## X-Category: Library
-Libs\LibStub\LibStub.lua
-Libs\CallbackHandler-1.0\CallbackHandler-1.0.lua
-
+embeds.xml
lib.xml
diff --git a/Libs/LibGroupInSpecT-1.1/lib.xml b/Libs/LibGroupInSpecT-1.1/lib.xml
index 898d4cc5..9794319f 100644
--- a/Libs/LibGroupInSpecT-1.1/lib.xml
+++ b/Libs/LibGroupInSpecT-1.1/lib.xml
@@ -1,3 +1,6 @@
-
+
+
+
diff --git a/Libs/LibItemUpgradeInfo-1.0/Core.lua b/Libs/LibItemUpgradeInfo-1.0/Core.lua
index 29aa7209..6f1bea78 100644
--- a/Libs/LibItemUpgradeInfo-1.0/Core.lua
+++ b/Libs/LibItemUpgradeInfo-1.0/Core.lua
@@ -1,4 +1,4 @@
-local MAJOR, MINOR = "LibItemUpgradeInfo-1.0", 28
+local MAJOR, MINOR = "LibItemUpgradeInfo-1.0", 27
local type,tonumber,select,strsplit,GetItemInfoFromHyperlink=type,tonumber,select,strsplit,GetItemInfoFromHyperlink
local library,previous = _G.LibStub:NewLibrary(MAJOR, MINOR)
local lib=library --#lib Needed to keep Eclipse LDT happy
@@ -28,7 +28,7 @@ Caching system
12 itemClassID Number This is the numerical value that determines the string to display for 'itemType'.
13 itemSubClassID Number This is the numerical value that determines the string to display for 'itemSubType'
14 ? number
-15 expansionId
+15 ? number
16 ? ?
17 ? boolean
--]]
@@ -46,7 +46,7 @@ local i_EquipLoc=9
local i_TextureId=10
local i_SellPrice=11
local i_ClassID=12
-local i_SubClass_ID=13
+local i_SubCkass_ID=13
local i_unk1=14
local i_unk2=15
local i_unk3=16
@@ -66,19 +66,12 @@ lib.itemcache=lib.itemcache or
local itemLink=cached[2]
if not itemLink then return nil end
local itemID=lib:GetItemID(itemLink)
- local quality=cached[3]
- local cacheIt=true
- if quality==LE_ITEM_QUALITY_ARTIFACT then
- local relic1, relic2, relic3 = select(4,strsplit(':', itemLink))
- if relic1 and relic1 ~= '' and not oGetItemInfo(relic1) then cacheIt = false end
- if relic2 and relic2 ~= '' and not oGetItemInfo(relic2) then cacheIt = false end
- if relic3 and relic3 ~= '' and not oGetItemInfo(relic3) then cacheIt = false end
- end
+ local name=cached[1]
cached.englishClass=GetItemClassInfo(cached[12])
cached.englishSubClass=GetItemSubClassInfo(cached[12],cached[13])
- if cacheIt then
- rawset(table,key,cached)
- end
+ rawset(table,itemLink,cached)
+ rawset(table,itemID,cached)
+ rawset(table,name,cached)
table.miss=table.miss+1
return cached
end
@@ -177,8 +170,7 @@ local function ScanTip(itemLink,itemLevel,show)
itemLink=CachedGetItemInfo(itemLink,2)
if not itemLink then return emptytable end
end
- if type(tipCache[itemLink].ilevel)=="nil"then -- or not tipCache[itemLink].cached then
- local cacheIt=true
+ if true or type(tipCache[itemLink].ilevel)=="nil" then
if not scanningTooltip then
anchor=CreateFrame("Frame")
anchor:Hide()
@@ -198,13 +190,7 @@ local function ScanTip(itemLink,itemLevel,show)
-- line 2 may be the item level, or it may be a modifier like "Heroic"
-- check up to line 6 just in case
local ilevel,soulbound,bop,boe,boa,heirloom
- if quality==LE_ITEM_QUALITY_ARTIFACT and itemLevel then
- local relic1, relic2, relic3 = select(4,strsplit(':', itemLink))
- if relic1 and relic1 ~= '' and not CachedGetItemInfo(relic1) then cacheIt = false end
- if relic2 and relic2 ~= '' and not CachedGetItemInfo(relic2) then cacheIt = false end
- if relic3 and relic3 ~= '' and not CachedGetItemInfo(relic3) then cacheIt = false end
- ilevel=itemLevel
- end
+ if quality==LE_ITEM_QUALITY_ARTIFACT and itemLevel then ilevel=itemLevel end
if show then
for i=1,12 do
local l, ltext = _G["LibItemUpgradeInfoTooltipTextLeft"..i], nil
@@ -230,8 +216,7 @@ local function ScanTip(itemLink,itemLevel,show)
ilevel=ilevel or itemLevel,
soulbound=soulbound,
bop=bop,
- boe=boe,
- cached=cacheIt
+ boe=boe
}
scanningTooltip:Hide()
end
diff --git a/Libs/LibItemUpgradeInfo-1.0/LibItemUpgradeInfo-1.0.toc b/Libs/LibItemUpgradeInfo-1.0/LibItemUpgradeInfo-1.0.toc
index ca4e3315..e955581e 100644
--- a/Libs/LibItemUpgradeInfo-1.0/LibItemUpgradeInfo-1.0.toc
+++ b/Libs/LibItemUpgradeInfo-1.0/LibItemUpgradeInfo-1.0.toc
@@ -1,9 +1,13 @@
-## Interface: 70200
+## Interface: 70100
## Title: Lib: ItemUpgradeInfo-1.0
## Notes: Database of item upgrade IDs
## Author: eridius
-## Version: Release-70200-28 70200
-## X-Revision: 7c5485a
+## Version: Release-70100-27 7.1.0
+## X-Revision: 5c48ff2
## X-Category: Library
+## X-Curse-Packaged-Version: Release-70100-27
+## X-Curse-Project-Name: LibItemUpgradeInfo-1.0
+## X-Curse-Project-ID: libitemupgradeinfo-1-0
+## X-Curse-Repository-ID: wow/libitemupgradeinfo-1-0/mainline
LibItemUpgradeInfo-1.0.xml
diff --git a/Libs/LibItemUpgradeInfo-1.0/LibStub/LibStub.toc b/Libs/LibItemUpgradeInfo-1.0/LibStub/LibStub.toc
index 846aeae7..3c21a7fa 100644
--- a/Libs/LibItemUpgradeInfo-1.0/LibStub/LibStub.toc
+++ b/Libs/LibItemUpgradeInfo-1.0/LibStub/LibStub.toc
@@ -1,9 +1,13 @@
-## Interface: 70200
+## Interface: 50001
## Title: Lib: LibStub
## Notes: Universal Library Stub
## Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel
## X-Website: http://www.wowace.com/addons/libstub/
## X-Category: Library
## X-License: Public Domain
+## X-Curse-Packaged-Version: Release-70100-27
+## X-Curse-Project-Name: LibItemUpgradeInfo-1.0
+## X-Curse-Project-ID: libitemupgradeinfo-1-0
+## X-Curse-Repository-ID: wow/libitemupgradeinfo-1-0/mainline
LibStub.lua
diff --git a/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test.lua b/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test.lua
index fb3bcbd6..645a08b1 100644
--- a/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test.lua
+++ b/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test.lua
@@ -38,4 +38,4 @@ assert(newOldMinor == 3) -- previous version was 3 (even though it gave a string
local newLib, newOldMinor = LibStub:NewLibrary("Pants", 5) -- register a new library, using a normal number instead of a string
assert(newLib)
-assert(newOldMinor == 4) -- previous version was 4 (even though it gave a string)
+assert(newOldMinor == 4) -- previous version was 4 (even though it gave a string)
\ No newline at end of file
diff --git a/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test3.lua b/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test3.lua
index 3c06002c..01aabb8d 100644
--- a/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test3.lua
+++ b/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test3.lua
@@ -11,4 +11,4 @@ assert(not success or not ret) -- either error because proxy is not a string or
assert(not pcall(LibStub.NewLibrary, LibStub, "Something", "No number in here")) -- should error, minor has no string in it.
-assert(not LibStub:GetLibrary("Something", true)) -- shouldn't've created it from the above statement
+assert(not LibStub:GetLibrary("Something", true)) -- shouldn't've created it from the above statement
\ No newline at end of file
diff --git a/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test4.lua b/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test4.lua
index 294623b9..15a9c9cd 100644
--- a/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test4.lua
+++ b/Libs/LibItemUpgradeInfo-1.0/LibStub/tests/test4.lua
@@ -38,4 +38,4 @@ loadfile("../LibStub.lua")()
assert(LibStub.IterateLibraries == 123)
-print("OK")
+print("OK")
\ No newline at end of file
diff --git a/Libs/libs.xml b/Libs/libs.xml
index 2c5908c5..a97063f9 100644
--- a/Libs/libs.xml
+++ b/Libs/libs.xml
@@ -15,6 +15,6 @@
-
+
\ No newline at end of file
diff --git a/boot.lua b/boot.lua
index 6660b6f5..73f20367 100644
--- a/boot.lua
+++ b/boot.lua
@@ -1,22 +1,18 @@
- -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> global name declaration
_ = nil
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0")
- _detalhes.build_counter = 5572
- _detalhes.userversion = "v7.3.5." .. _detalhes.build_counter
- _detalhes.realversion = 130 --core version
+ _detalhes.build_counter = 5985
+ _detalhes.userversion = "v8.0.1." .. _detalhes.build_counter
+ _detalhes.realversion = 131 --core version
_detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")"
+ _detalhes.BFACORE = 131
Details = _detalhes
-
+
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> initialization stuff
- local version, build, date, tocversion = GetBuildInfo()
- --in case someone is using details! retail version on BFA beta
- --also when BFA launches, it should work in case the player doesn't update it
- _detalhes.IsBFAClient = tocversion >= 80000
-
do
local _detalhes = _G._detalhes
@@ -166,6 +162,15 @@ do
--> player detail skin
_detalhes.playerdetailwindow_skins = {}
+ --> auto run code
+ _detalhes.RunCodeTypes = {
+ {Name = "On Initialization", Desc = "Run code when Details! initialize or when a profile is changed.", Value = 1, ProfileKey = "on_init"},
+ {Name = "On Zone Changed", Desc = "Run code when the zone where the player is in has changed (e.g. entered in a raid).", Value = 2, ProfileKey = "on_zonechanged"},
+ {Name = "On Enter Combat", Desc = "Run code when the player enters in combat.", Value = 3, ProfileKey = "on_entercombat"},
+ {Name = "On Leave Combat", Desc = "Run code when the player left combat.", Value = 4, ProfileKey = "on_leavecombat"},
+ {Name = "On Spec Change", Desc = "Run code when the player has changed its specialization.", Value = 5, ProfileKey = "on_specchanged"},
+ }
+
--> tooltip
_detalhes.tooltip_backdrop = {
bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]],
diff --git a/classes/classe_damage.lua b/classes/classe_damage.lua
index 464ae963..a53f4ae1 100644
--- a/classes/classe_damage.lua
+++ b/classes/classe_damage.lua
@@ -33,6 +33,9 @@
local _GetSpellInfo = _detalhes.getspellinfo --details api
local _string_replace = _detalhes.string.replace --details api
+ --show more information about spells
+ local debugmode = false
+
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> constants
@@ -2679,7 +2682,7 @@ local InBarIconPadding = 0
if (UsingCustomLeftText) then
bar.texto_esquerdo:SetText (_string_replace (instance.row_info.textL_custom_text, bar.colocacao, self.displayName, " ", self, instance.showing))
else
- bar.texto_esquerdo:SetText (bar_number .. " " .. self.displayName)
+ bar.texto_esquerdo:SetText (bar_number .. self.displayName)
end
end
else
@@ -3863,7 +3866,11 @@ end
end
if (type (index) == "number") then
- row.texto_esquerdo:SetText (index .. ". " .. name)
+ if (debugmode) then
+ row.texto_esquerdo:SetText (index .. ". " .. name .. " (" .. spellid .. ")")
+ else
+ row.texto_esquerdo:SetText (index .. ". " .. name)
+ end
else
row.texto_esquerdo:SetText (name)
end
@@ -3915,7 +3922,7 @@ end
row.textura:SetStatusBarColor (1, 1, 1)
end
else
- if (spellid == 98021) then
+ if (spellid == 98021) then --spirit linkl
row.textura:SetStatusBarColor (1, 0.4, 0.4)
else
row.textura:SetStatusBarColor (1, 1, 1)
diff --git a/classes/classe_instancia.lua b/classes/classe_instancia.lua
index 4c253dc6..80fbdd79 100644
--- a/classes/classe_instancia.lua
+++ b/classes/classe_instancia.lua
@@ -475,8 +475,10 @@ end
local instance1 = _detalhes:GetInstance (1)
local instance2 = _detalhes:GetInstance (2)
- if (not instance1.ignore_mass_showhide and not instance2.ignore_mass_showhide) then
- _detalhes:CheckCoupleWindows (instance1, instance2)
+ if (instance1 and instance2) then
+ if (not instance1.ignore_mass_showhide and not instance2.ignore_mass_showhide) then
+ _detalhes:CheckCoupleWindows (instance1, instance2)
+ end
end
end
end
@@ -2332,6 +2334,8 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
_detalhes:InstanceCall (_detalhes.CheckPsUpdate)
_detalhes:SendEvent ("DETAILS_INSTANCE_CHANGEATTRIBUTE", nil, instancia, atributo, sub_atributo)
+
+ instancia:ChangeIcon()
end
if (_detalhes.janela_info:IsShown() and instancia == _detalhes.janela_info.instancia) then
@@ -2498,7 +2502,7 @@ function _detalhes:MontaAtributosOption (instancia, func)
end
else
--> wallpaper = main window
- CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
+ --CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
end
local options = sub_atributos [i].lista
@@ -2547,7 +2551,7 @@ function _detalhes:MontaAtributosOption (instancia, func)
if (_detalhes.tooltip.submenu_wallpaper) then
CoolTip:SetWallpaper (2, [[Interface\TALENTFRAME\WarriorArm-TopLeft]], menu_wallpaper_custom_color, wallpaper_bg_color)
else
- CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
+ --CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
end
if (#_detalhes.custom == 0) then
@@ -2561,10 +2565,11 @@ function _detalhes:MontaAtributosOption (instancia, func)
end
CoolTip:SetOption ("StatusBarTexture", [[Interface\AddOns\Details\images\bar4_vidro]])
- CoolTip:SetOption ("ButtonsYMod", -5)
- CoolTip:SetOption ("ButtonsYModSub", -5)
- CoolTip:SetOption ("HeighMod", 6)
- CoolTip:SetOption ("HeighModSub", 6)
+ CoolTip:SetOption ("ButtonsYMod", -7)
+ CoolTip:SetOption ("HeighMod", 7)
+
+ CoolTip:SetOption ("ButtonsYModSub", -7)
+ CoolTip:SetOption ("HeighModSub", 7)
CoolTip:SetOption ("SelectedTopAnchorMod", -2)
CoolTip:SetOption ("SelectedBottomAnchorMod", 2)
@@ -2579,7 +2584,8 @@ function _detalhes:MontaAtributosOption (instancia, func)
end
CoolTip:SetLastSelected (1, last_selected)
- CoolTip:SetWallpaper (1, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
+ --removed the menu backdrop
+ --CoolTip:SetWallpaper (1, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
return menu_principal, sub_menus
end
@@ -2606,6 +2612,8 @@ function _detalhes:ChangeIcon (icon)
self.baseframe.cabecalho.atributo_icon:SetWidth (icon_size[1])
self.baseframe.cabecalho.atributo_icon:SetHeight (icon_size[2])
local icon_anchor = skin.icon_anchor_plugins
+
+ self.baseframe.cabecalho.atributo_icon:ClearAllPoints()
self.baseframe.cabecalho.atributo_icon:SetPoint ("TOPRIGHT", self.baseframe.cabecalho.ball_point, "TOPRIGHT", icon_anchor[1], icon_anchor[2])
elseif (self.modo == modo_alone) then --> solo
@@ -2624,6 +2632,8 @@ function _detalhes:ChangeIcon (icon)
self.baseframe.cabecalho.atributo_icon:SetWidth (icon_size[1])
self.baseframe.cabecalho.atributo_icon:SetHeight (icon_size[2])
local icon_anchor = skin.icon_anchor_plugins
+
+ self.baseframe.cabecalho.atributo_icon:ClearAllPoints()
self.baseframe.cabecalho.atributo_icon:SetPoint ("TOPRIGHT", self.baseframe.cabecalho.ball_point, "TOPRIGHT", icon_anchor[1], icon_anchor[2])
end
else
@@ -2636,14 +2646,26 @@ function _detalhes:ChangeIcon (icon)
--self.baseframe.cabecalho.atributo_icon:SetTexture (icones [self.sub_atributo] [1])
--self.baseframe.cabecalho.atributo_icon:SetTexCoord ( unpack (icones [self.sub_atributo] [2]) )
- self.baseframe.cabecalho.atributo_icon:SetTexture (skin.file)
- self.baseframe.cabecalho.atributo_icon:SetTexCoord ( (0.03125 * (self.atributo-1)) + half, (0.03125 * self.atributo) - half, 0.35693359375, 0.38720703125)
+ --default
+ --self.baseframe.cabecalho.atributo_icon:SetTexture (skin.file)
+ --self.baseframe.cabecalho.atributo_icon:SetTexCoord ( (0.03125 * (self.atributo-1)) + half, (0.03125 * self.atributo) - half, 0.35693359375, 0.38720703125)
- local icon_anchor = skin.icon_anchor_main
- self.baseframe.cabecalho.atributo_icon:SetPoint ("TOPRIGHT", self.baseframe.cabecalho.ball_point, "TOPRIGHT", icon_anchor[1], icon_anchor[2])
+ --set the attribute icon
+ self.baseframe.cabecalho.atributo_icon:SetTexture (menu_icones [self.atributo])
+ local p = 0.125 --> 32/256
+ self.baseframe.cabecalho.atributo_icon:SetTexCoord (p * (self.sub_atributo-1), p * (self.sub_atributo), 0, 1)
+ self.baseframe.cabecalho.atributo_icon:SetSize (16, 16)
- self.baseframe.cabecalho.atributo_icon:SetWidth (32)
- self.baseframe.cabecalho.atributo_icon:SetHeight (32)
+ self.baseframe.cabecalho.atributo_icon:ClearAllPoints()
+ if (self.menu_attribute_string) then
+ self.baseframe.cabecalho.atributo_icon:SetPoint ("right", self.menu_attribute_string.widget, "left", -4, -1)
+ end
+
+ -- local icon_anchor = skin.icon_anchor_main
+ -- self.baseframe.cabecalho.atributo_icon:SetPoint ("TOPRIGHT", self.baseframe.cabecalho.ball_point, "TOPRIGHT", icon_anchor[1], icon_anchor[2])
+
+ -- self.baseframe.cabecalho.atributo_icon:SetWidth (32)
+ -- self.baseframe.cabecalho.atributo_icon:SetHeight (32)
end
elseif (self.modo == modo_raid) then --> raid
@@ -2965,13 +2987,12 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
break
end
end
+
if (already_exists) then
- local t = _detalhes.latest_report_table [already_exists]
+ --push it to front
+ local t = tremove (_detalhes.latest_report_table, already_exists)
t [4] = amt
- if (already_exists > 5) then
- tremove (_detalhes.latest_report_table, already_exists)
- tinsert (_detalhes.latest_report_table, 1, t)
- end
+ tinsert (_detalhes.latest_report_table, 1, t)
else
if (self.atributo == 5) then
local custom_name = self:GetCustomObject():GetName()
@@ -2980,6 +3001,7 @@ function _detalhes:monta_relatorio (este_relatorio, custom)
tinsert (_detalhes.latest_report_table, 1, {self.meu_id, self.atributo, self.sub_atributo, amt, _detalhes.report_where})
end
end
+
tremove (_detalhes.latest_report_table, 11)
end
diff --git a/classes/classe_instancia_include.lua b/classes/classe_instancia_include.lua
index 0ddce6a4..6cbca50f 100644
--- a/classes/classe_instancia_include.lua
+++ b/classes/classe_instancia_include.lua
@@ -131,6 +131,9 @@ _detalhes.instance_defaults = {
bars_sort_direction = 1,
--left to right or right to left bars
bars_inverted = false,
+ --toolbar icons file
+ --toolbar_icon_file = [[Interface\AddOns\Details\images\toolbar_icons_grayscale]],
+ toolbar_icon_file = [[Interface\AddOns\Details\images\toolbar_icons]],
--menus:
--anchor store the anchor point of main menu
menu_anchor = {5, 1, side = 1}, --mode segment attribute report on top position
diff --git a/classes/classe_others.lua b/classes/classe_others.lua
index 52568565..2f38d7bc 100644
--- a/classes/classe_others.lua
+++ b/classes/classe_others.lua
@@ -145,6 +145,30 @@ function _detalhes:ContainerSortMisc (container, amount, keyName2)
end
end
+--[[exported]] function _detalhes:GetSpellCastAmount (combat, actorName, spellId)
+ local misc_actor = combat:GetActor (4, actorName)
+ if (misc_actor) then
+ local spell_cast = misc_actor.spell_cast and misc_actor.spell_cast [spellId]
+
+ --try to find a spell with the same name and get the amount of casts of that spell object
+ if (not spell_cast and misc_actor.spell_cast) then
+ local spellname = GetSpellInfo (spellId)
+ for casted_spellid, amount in _pairs (misc_actor.spell_cast) do
+ local casted_spellname = GetSpellInfo (casted_spellid)
+ if (casted_spellname == spellname) then
+ return amount, true
+ end
+ end
+ end
+
+ if (not spell_cast) then
+ return false
+ end
+
+ return spell_cast
+ end
+end
+
function atributo_misc:NovaTabela (serial, nome, link)
local _new_miscActor = {
@@ -1264,14 +1288,7 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
checked [his_target] = true
for debuffIndex = 1, 41 do
-
- local name, unitCaster, spellid
- if (_detalhes.IsBFAClient) then --8.0 compatibility
- name, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff (target, debuffIndex)
- else
- name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff (target, debuffIndex)
- end
-
+ local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff (target, debuffIndex)
if (name and unitCaster) then
local playerGUID = _UnitGUID (unitCaster)
if (playerGUID) then
@@ -1299,14 +1316,7 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
checked [his_target] = true
for debuffIndex = 1, 40 do
-
- local name, unitCaster, spellid
- if (_detalhes.IsBFAClient) then --8.0 compatibility
- name, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("party"..raidIndex.."target", debuffIndex)
- else
- name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("party"..raidIndex.."target", debuffIndex)
- end
-
+ local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("party"..raidIndex.."target", debuffIndex)
if (name and unitCaster) then
local playerName, realmName = _UnitName (unitCaster)
local playerGUID = _UnitGUID (unitCaster)
@@ -1326,14 +1336,7 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
local rect = UnitReaction ("playertarget", "player")
if (his_target and not checked [his_target] and rect and rect <= 4) then
for debuffIndex = 1, 40 do
-
- local name, unitCaster, spellid
- if (_detalhes.IsBFAClient) then --8.0 compatibility
- name, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex)
- else
- name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex)
- end
-
+ local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex)
if (name and unitCaster) then
local playerName, realmName = _UnitName (unitCaster)
local playerGUID = _UnitGUID (unitCaster)
@@ -1353,14 +1356,7 @@ function _detalhes:CatchRaidDebuffUptime (in_or_out) -- "DEBUFF_UPTIME_IN"
local reaction = UnitReaction ("playertarget", "player")
if (reaction and reaction <= 4) then
for debuffIndex = 1, 40 do
-
- local name, unitCaster, spellid
- if (_detalhes.IsBFAClient) then --8.0 compatibility
- name, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex)
- else
- name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex)
- end
-
+ local name, _, _, _, _, _, _, unitCaster, _, _, spellid = UnitDebuff ("playertarget", debuffIndex)
if (name and unitCaster) then
local playerName, realmName = _UnitName (unitCaster)
local playerGUID = _UnitGUID (unitCaster)
@@ -1405,13 +1401,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
end
for buffIndex = 1, 41 do
- local name, unitCaster, spellid
- if (_detalhes.IsBFAClient) then --8.0 compatibility
- name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura (RaidIndex, buffIndex, nil, "HELPFUL")
- else
- name, _, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura (RaidIndex, buffIndex, nil, "HELPFUL")
- end
-
+ local name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura (RaidIndex, buffIndex, nil, "HELPFUL")
if (name and unitCaster == RaidIndex) then
_detalhes.parser:add_buff_uptime (nil, cacheGetTime, playerGUID, playerName, 0x00000514, playerGUID, playerName, 0x00000514, 0x0, spellid, name, in_or_out)
if (in_or_out == "BUFF_UPTIME_IN") then
@@ -1441,13 +1431,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
end
for buffIndex = 1, 41 do
- local name, unitCaster, spellid
- if (_detalhes.IsBFAClient) then --8.0 compatibility
- name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura (PartyIndex, buffIndex, nil, "HELPFUL")
- else
- name, _, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura (PartyIndex, buffIndex, nil, "HELPFUL")
- end
-
+ local name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura (PartyIndex, buffIndex, nil, "HELPFUL")
if (name and unitCaster == PartyIndex) then
_detalhes.parser:add_buff_uptime (nil, cacheGetTime, playerGUID, playerName, 0x00000514, playerGUID, playerName, 0x00000514, 0x0, spellid, name, in_or_out)
@@ -1465,14 +1449,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
--> unitCaster return player instead of raidIndex
for buffIndex = 1, 41 do
-
- local name, unitCaster, spellid
- if (_detalhes.IsBFAClient) then --8.0 compatibility
- name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
- else
- name, _, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
- end
-
+ local name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
if (name and unitCaster == "player") then
local playerName = _UnitName ("player")
local playerGUID = _UnitGUID ("player")
@@ -1516,14 +1493,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
for groupIndex = 1, _GetNumGroupMembers()-1 do
for buffIndex = 1, 41 do
-
- local name, unitCaster, spellid
- if (_detalhes.IsBFAClient) then --8.0 compatibility
- name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("party"..groupIndex, buffIndex, nil, "HELPFUL")
- else
- name, _, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("party"..groupIndex, buffIndex, nil, "HELPFUL")
- end
-
+ local name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("party"..groupIndex, buffIndex, nil, "HELPFUL")
if (name and unitCaster == "party"..groupIndex) then
local playerName, realmName = _UnitName ("party"..groupIndex)
@@ -1549,13 +1519,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
end
for buffIndex = 1, 41 do
- local name, unitCaster, spellid
- if (_detalhes.IsBFAClient) then --8.0 compatibility
- name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
- else
- name, _, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
- end
-
+ local name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
if (name and unitCaster == "player") then
local playerName = _UnitName ("player")
local playerGUID = _UnitGUID ("player")
@@ -1596,13 +1560,7 @@ function _detalhes:CatchRaidBuffUptime (in_or_out)
local focus_augmentation = {}
for buffIndex = 1, 41 do
- local name, unitCaster, spellid
- if (_detalhes.IsBFAClient) then --8.0 compatibility
- name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
- else
- name, _, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
- end
-
+ local name, _, _, _, _, _, unitCaster, _, _, spellid = _UnitAura ("player", buffIndex, nil, "HELPFUL")
if (name and unitCaster == "player") then
local playerName = _UnitName ("player")
local playerGUID = _UnitGUID ("player")
@@ -2052,6 +2010,11 @@ end
function atributo_misc:MontaInfoInterrupt()
local meu_total = self ["interrupt"]
+
+ if (not self.interrupt_spells) then
+ return
+ end
+
local minha_tabela = self.interrupt_spells._ActorTable
local barras = info.barras1
diff --git a/core/control.lua b/core/control.lua
index 58fd8ebf..cec2d5e5 100644
--- a/core/control.lua
+++ b/core/control.lua
@@ -111,26 +111,23 @@
end
local boss_found = function (index, name, zone, mapid, diff, encounterid)
-
+
+ local mapID = C_Map.GetBestMapForUnit ("player")
local ejid
-
- if (_detalhes.IsBFAClient) then
- local mapID = C_Map.GetBestMapForUnit ("player")
- if (mapID) then
- ejid = EJ_GetInstanceForMap (mapID)
- end
-
- if (not mapID) then
- --print ("Details! exeption handled: zone has no map")
- return
- end
- else
- ejid = EJ_GetCurrentInstance()
- if (ejid == 0) then
- ejid = _detalhes:GetInstanceEJID()
- end
+ if (mapID) then
+ ejid = EJ_GetInstanceForMap (mapID)
end
-
+
+ if (not mapID) then
+ --print ("Details! exeption handled: zone has no map")
+ return
+ end
+
+ --local ejid = EJ_GetCurrentInstance()
+ if (ejid == 0) then
+ ejid = _detalhes:GetInstanceEJID()
+ end
+
local boss_table = {
index = index,
name = name,
@@ -314,7 +311,7 @@
-- ~start ~inicio ~novo ñovo
function _detalhes:EntrarEmCombate (...)
if (_detalhes.debug) then
- --_detalhes:Msg ("(debug) |cFFFFFF00started a new combat|r|cFFFF7700", _detalhes.encounter_table and _detalhes.encounter_table.name or "")
+ _detalhes:Msg ("(debug) |cFFFFFF00started a new combat|r|cFFFF7700", _detalhes.encounter_table and _detalhes.encounter_table.name or "")
--local from = debugstack (2, 1, 0)
--print (from)
end
@@ -534,22 +531,19 @@
if (encounterID) then
local ZoneName, InstanceType, DifficultyID, DifficultyName, _, _, _, ZoneMapID = GetInstanceInfo()
- local ejid
- if (_detalhes.IsBFAClient) then
- local mapID = C_Map.GetBestMapForUnit ("player")
-
- if (not mapID) then
- mapID = 0
- end
-
- ejid = EJ_GetInstanceForMap (mapID)
- else
- ejid = EJ_GetCurrentInstance()
- if (ejid == 0) then
- ejid = _detalhes:GetInstanceEJID()
- end
+ local mapID = C_Map.GetBestMapForUnit ("player")
+
+ if (not mapID) then
+ mapID = 0
end
+ local ejid = EJ_GetInstanceForMap (mapID)
+
+ --local ejid = EJ_GetCurrentInstance()
+
+ if (ejid == 0) then
+ ejid = _detalhes:GetInstanceEJID()
+ end
local _, boss_index = _detalhes:GetBossEncounterDetailsFromEncounterId (ZoneMapID, encounterID)
_detalhes.tabela_vigente.is_boss = {
diff --git a/core/gears.lua b/core/gears.lua
index 827c89df..517780fd 100644
--- a/core/gears.lua
+++ b/core/gears.lua
@@ -9,13 +9,8 @@ local floor = floor
local GetNumGroupMembers = GetNumGroupMembers
local ItemUpgradeInfo = LibStub ("LibItemUpgradeInfo-1.0")
-
-local LibGroupInSpecT
-if (_detalhes.IsBFAClient) then
- --nop
-else
- LibGroupInSpecT = LibStub ("LibGroupInSpecT-1.1")
-end
+--local LibGroupInSpecT = LibStub ("LibGroupInSpecT-1.1")
+local LibGroupInSpecT = false
local storageDebug = false
local store_instances = _detalhes.InstancesToStoreData
diff --git a/core/network.lua b/core/network.lua
index 63b1c0f7..00d48646 100644
--- a/core/network.lua
+++ b/core/network.lua
@@ -683,18 +683,19 @@
}
function _detalhes:IsInCity()
- if (_detalhes.IsBFAClient) then
- return false
- else
- SetMapToCurrentZone()
- local mapFileName, _, _, _, microDungeonMapName = GetMapInfo()
+ if (SetMapToCurrentZone and SetMapToCurrentZone()) then
+ local mapID = C_Map.GetBestMapForUnit ("player")
+ if (not mapID) then
+ --print ("Details! exeption handled: zone has no map")
+ return
+ end
+ local mapFileName, _, _, _, microDungeonMapName = C_Map.GetMapInfo (mapID)
if (city_zones [mapFileName]) then
return true
elseif (microDungeonMapName and type (microDungeonMapName) == "string" and sub_zones [microDungeonMapName]) then
return true
end
-
end
end
diff --git a/core/parser.lua b/core/parser.lua
index 9af8ffb7..6f337c2c 100644
--- a/core/parser.lua
+++ b/core/parser.lua
@@ -38,12 +38,16 @@
local escudo = _detalhes.escudos --details local
local parser = _detalhes.parser --details local
local absorb_spell_list = _detalhes.AbsorbSpells --details local
- local defensive_cooldown_spell_list = _detalhes.DefensiveCooldownSpells --details local
- local defensive_cooldown_spell_list_no_buff = _detalhes.DefensiveCooldownSpellsNoBuff --details local
- local cc_spell_list = _detalhes.CrowdControlSpells --details local
+
+ --local cc_spell_list = _detalhes.CrowdControlSpells --details local
+ local cc_spell_list = DetailsFramework.CrowdControlSpells
+
local container_combatentes = _detalhes.container_combatentes --details local
local container_habilidades = _detalhes.container_habilidades --details local
+ --> localize the cooldown table from the framework
+ local defensive_cooldowns = DetailsFramework.CooldownsAllDeffensive
+
local spell_damage_func = _detalhes.habilidade_dano.Add --details local
local spell_damageMiss_func = _detalhes.habilidade_dano.AddMiss --details local
local spell_damageFF_func = _detalhes.habilidade_dano.AddFF --details local
@@ -157,6 +161,8 @@
[233499] = 233490, --Unstable Affliction
}
+ _detalhes.OverridedSpellIds = override_spellId
+
--> stormlash and greater blessing of the might
local SPELLID_SHAMAN_SLASH_AURA = 195222
local SPELLID_SHAMAN_SLASH_DAMAGE = 195256
@@ -339,6 +345,9 @@
who_serial = ""
end
+ --fix for MOTHER Uldir Raid
+
+
--> Fix for mage prismatic crystal
--local npcId = _detalhes:GetNpcIdFromGuid (alvo_serial)
--if (npcId == 76933) then
@@ -1211,6 +1220,13 @@
return
end
+ if (spellid == 268871 or spellid == 267833) then
+ --print ("IGNORING summon of a Corrupted Blood Clone for player", who_name)
+ --5/17 18:16:48.886 SPELL_SUMMON,Creature-0-4028-1861-987-136949-00007DF137,"Corrupted Blood Clone",0xa18,0x0,Creature-0-4028-1861-987-136315-00007DF140,"Remnant of Corruption",0xa28,0x0,267833,"Defense Grid",0x1
+ --5/17 18:16:49.601 SPELL_SUMMON,Player-970-000BDB1F,"Fhqwhgads-Anduin",0x514,0x2,Creature-0-4028-1861-987-136949-00007DF141,"Corrupted Blood Clone",0xa28,0x0,268871,"Corrupted Blood Clone",0x1
+ return
+ end
+
--4/22 18:07:54.369 SPELL_SUMMON,Player-3296-009371B2,"Façade-Anasterian(US)",0x514,0x0,Creature-0-3198-1448-2131-90477-0000380DAA,"Blood Globule",0xa28,0x0,180410,"Heart Seeker",0x1
--5/4 15:45:24.222 SPELL_SUMMON,Player-3296-009576DD,"Àlëx-Brill(EU)",0x40514,0x0,Creature-0-2083-1448-25606-90513-000047BE44,"Fel Blood Globule",0xa28,0x0,180413,"Heart Seeker",0x1
@@ -1786,13 +1802,6 @@ ameHealer: Bombad
else
escudo [alvo_name] [spellid] [who_name] = amount
end
-
- ------------------------------------------------------------------------------------------------
- --> defensive cooldowns
- elseif (defensive_cooldown_spell_list [spellid]) then
- --> usou cooldown
- return parser:add_defensive_cooldown (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname)
-
end
------------------------------------------------------------------------------------------------
@@ -2021,12 +2030,6 @@ ameHealer: Bombad
else
-- escudo não encontrado :(
end
-
- ------------------------------------------------------------------------------------------------
- --> defensive cooldowns
- elseif (defensive_cooldown_spell_list [spellid]) then
- --> usou cooldown
- return parser:add_defensive_cooldown (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname)
------------------------------------------------------------------------------------------------
--> recording buffs
@@ -2349,7 +2352,7 @@ ameHealer: Bombad
--death log
- --local name, rank, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId = UnitAura (alvo_name, spellname, nil, "HARMFUL")
+ --local name, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId = UnitAura (alvo_name, spellname, nil, "HARMFUL")
--UnitAura ("Kastfall", "Gulp Frog Toxin", nil, "HARMFUL")
--print ("Hello World", spellname, name)
@@ -2586,22 +2589,10 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
AlternatePowerEnableFrame:SetScript ("OnEvent", function (self, event)
if (event == "UNIT_POWER_BAR_SHOW") then
-
- if (_detalhes.IsBFAClient) then
- AlternatePowerMonitorFrame:RegisterEvent ("UNIT_POWER_UPDATE")
- else
- AlternatePowerMonitorFrame:RegisterEvent ("UNIT_POWER")
- end
-
+ AlternatePowerMonitorFrame:RegisterEvent ("UNIT_POWER_UPDATE") --> 8.0
AlternatePowerEnableFrame.IsRunning = true
elseif (AlternatePowerEnableFrame.IsRunning and (event == "ENCOUNTER_END" or event == "PLAYER_REGEN_ENABLED")) then -- and not InCombatLockdown()
-
- if (_detalhes.IsBFAClient) then
- AlternatePowerMonitorFrame:UnregisterEvent ("UNIT_POWER_UPDATE")
- else
- AlternatePowerMonitorFrame:UnregisterEvent ("UNIT_POWER")
- end
-
+ AlternatePowerMonitorFrame:UnregisterEvent ("UNIT_POWER_UPDATE")
AlternatePowerEnableFrame.IsRunning = false
end
end)
@@ -3013,13 +3004,17 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
--> foi um jogador que castou
if (raid_members_cache [who_serial]) then
--> check if is a cooldown :D
- if (defensive_cooldown_spell_list_no_buff [spellid]) then
+ if (defensive_cooldowns [spellid]) then
--> usou cooldown
if (not alvo_name) then
- if (defensive_cooldown_spell_list_no_buff [spellid][3] == 1) then
+ if (DetailsFramework.CooldownsDeffense [spellid]) then
alvo_name = who_name
- else
+
+ elseif (DetailsFramework.CooldownsRaid [spellid]) then
alvo_name = Loc ["STRING_RAID_WIDE"]
+
+ else
+ alvo_name = "--x--x--"
end
end
return parser:add_defensive_cooldown (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname)
@@ -3236,7 +3231,8 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
------------------------------------------------------------------------------------------------
--> early checks and fixes
if (not cc_spell_list [spellid]) then
- --return print ("nao ta na lista")
+ return
+ --print ("NO CC:", spellid, spellname, extraSpellID, extraSpellName)
end
if (_bit_band (who_flags, AFFILIATION_GROUP) == 0) then
@@ -3523,15 +3519,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
for i = 1, (_GetNumGroupMembers() + (unit_type == "party" and -1 or 0)) do
for auraIndex = 1, 40 do
--gbom
-
- local name, rank, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId
-
- if (_detalhes.IsBFAClient) then
- name, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId = UnitAura (unit_type .. i, auraIndex, "HELPFUL")
- else
- name, rank, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId = UnitAura (unit_type .. i, auraIndex, "HELPFUL")
- end
-
+ local name, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId = UnitAura (unit_type .. i, auraIndex, "HELPFUL")
if (name and caster and (UnitInRaid (caster) or UnitInParty (caster))) then
if (spellId == SPELLID_SHAMAN_SLASH_AURA) then
local source_serial = UnitGUID (caster)
@@ -3552,15 +3540,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
if (unit_type == "party") then
for auraIndex = 1, 40 do
--gbom
-
- local name, rank, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId
-
- if (_detalhes.IsBFAClient) then
- name, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId = UnitAura ("player", auraIndex, "HELPFUL")
- else
- name, rank, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId = UnitAura ("player", auraIndex, "HELPFUL")
- end
-
+ local name, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId = UnitAura ("player", auraIndex, "HELPFUL")
if (name and caster and (UnitInParty (caster))) then
if (spellId == SPELLID_SHAMAN_SLASH_AURA) then
local source_serial = UnitGUID (caster)
@@ -3589,15 +3569,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
return unpack (real_source)
else
--query the player buffs if not found on cache
-
- local name, rank, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId
-
- if (_detalhes.IsBFAClient) then
- name, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId = UnitAura (actor_name, spellname)
- else
- name, rank, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId = UnitAura (actor_name, spellname)
- end
-
+ local name, texture, count, debuffType, duration, expirationTime, caster, canStealOrPurge, nameplateShowPersonal, spellId = UnitAura (actor_name, spellname)
if (name) then
local source_serial = UnitGUID (caster)
if (source_serial) then
@@ -4154,6 +4126,8 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
--end
end
+ _detalhes:DispatchAutoRunCode ("on_zonechanged")
+
_detalhes:SchedulePetUpdate (7)
_detalhes:CheckForPerformanceProfile()
end
@@ -4336,6 +4310,8 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
instancia:SetCombatAlpha (nil, nil, true)
end
end
+
+ _detalhes:DispatchAutoRunCode ("on_entercombat")
end
function _detalhes.parser_functions:PLAYER_REGEN_ENABLED (...)
@@ -4454,6 +4430,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
_detalhes:CaptureSet (false, "spellcast", false, 10)
end
+ _detalhes:DispatchAutoRunCode ("on_leavecombat")
end
function _detalhes.parser_functions:ROLE_CHANGED_INFORM (...)
@@ -4713,44 +4690,24 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1
tinsert (_detalhes_global.exit_log, "8 - Saving nicktag cache.")
_detalhes_database.nick_tag_cache = table_deepcopy (_detalhes_database.nick_tag_cache)
end)
-
+
--> end
-- ~parserstart ~startparser
- function _detalhes:OnParserEvent (evento, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, ...)
-
-
+ function _detalhes.OnParserEvent()
-- 8.0 changed
- if (_detalhes.IsBFAClient) then
- local time, token, hidding, who_serial, who_name, who_flags, who_flags2, target_serial, target_name, target_flags, target_flags2, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12 = CombatLogGetCurrentEventInfo()
-
- local funcao = token_list [token]
- if (funcao) then
- return funcao (nil, token, time, who_serial, who_name, who_flags, target_serial, target_name, target_flags, target_flags2, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)
- end
-
- return
- end
-
-
- local funcao = token_list [token]
-
--- if (token == "COMBATANT_INFO") then
--- print ("COMBATANT_INFO", evento, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2)
--- end
+ local time, token, hidding, who_serial, who_name, who_flags, who_flags2, target_serial, target_name, target_flags, target_flags2, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12 = CombatLogGetCurrentEventInfo()
+
+ local funcao = token_list [token]
--- if (who_name == "Ditador") then
--- print (token, alvo_name, ...)
--- end
-
if (funcao) then
--if (token ~= "SPELL_AURA_REFRESH" and token ~= "SPELL_AURA_REMOVED" and token ~= "SPELL_AURA_APPLIED") then
-- print ("running func:", token)
--end
- return funcao (nil, token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, ...)
+ return funcao (nil, token, time, who_serial, who_name, who_flags, target_serial, target_name, target_flags, target_flags2, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)
else
return
end
diff --git a/core/plugins_toolbar.lua b/core/plugins_toolbar.lua
index 08b30b1f..cd582b5f 100644
--- a/core/plugins_toolbar.lua
+++ b/core/plugins_toolbar.lua
@@ -13,7 +13,7 @@
--> details api functions
--> create a button which will be displayed on tooltip
- function _detalhes.ToolBar:NewPluginToolbarButton (func, icon, pluginname, tooltip, w, h, framename)
+ function _detalhes.ToolBar:NewPluginToolbarButton (func, icon, pluginname, tooltip, w, h, framename, menu_function)
--> random name if nameless
if (not framename) then
@@ -36,6 +36,7 @@
--> tooltip and function on click
button.tooltip = tooltip
+ button.menu = menu_function
button:SetScript ("OnClick", func)
--> textures
@@ -164,6 +165,33 @@ end
end
if (button.tooltip) then
+ if (button.menu) then
+ _detalhes.gump:QuickDispatch (button.menu)
+
+ local next_check = 0.8
+
+ --check if the mouse is still interacting with the menu or with the button
+ button:SetScript ("OnUpdate", function (self, elapsed)
+ next_check = next_check - elapsed
+
+ if (next_check < 0) then
+ if (not GameCooltipFrame1:IsMouseOver() and not button:IsMouseOver()) then
+ GameCooltip2:Hide()
+ button:SetScript ("OnUpdate", nil)
+ return
+ end
+ next_check = 0.8
+ end
+ end)
+
+ --disable the hider menu if the cooltip is required in another place
+ hooksecurefunc (GameCooltip2, "ShowCooltip", function()
+ button:SetScript ("OnUpdate", nil)
+ end)
+
+ return
+ end
+
GameCooltip:Hide()
local plugin_object = _detalhes:GetPlugin (button.__name)
@@ -174,10 +202,10 @@ end
_detalhes:SetFontSize (f.desc, _detalhes.font_sizes.menus)
_detalhes:SetFontFace (f.desc, _detalhes.font_faces.menus)
- f.background:SetTexture (_detalhes.tooltip.menus_bg_texture)
+ --f.background:SetTexture (_detalhes.tooltip.menus_bg_texture)
f.background:SetTexCoord (unpack (_detalhes.tooltip.menus_bg_coords))
f.background:SetVertexColor (unpack (_detalhes.tooltip.menus_bg_color))
- f.background:SetDesaturated (true)
+ --f.background:SetDesaturated (true)
f.BackdropTable.bgFile = _detalhes.tooltip_backdrop.bgFile
f.BackdropTable.edgeFile = [[Interface\Buttons\WHITE8X8]] --_detalhes.tooltip_backdrop.edgeFile
@@ -193,6 +221,8 @@ end
f:SetPoint ("bottom", button, "top", 0, 10)
f:Show()
--SharedMedia:Fetch ("font", "Friz Quadrata TT")
+
+
end
end
--[[global]] function DetailsToolbarButtonOnLeave (button)
diff --git a/core/util.lua b/core/util.lua
index fa014153..0056880d 100644
--- a/core/util.lua
+++ b/core/util.lua
@@ -279,10 +279,11 @@
return format ("%.2f", numero/1000000000) .. "B"
elseif (numero > 1000000) then
return _string_format ("%.2f", numero/1000000) .. "M"
- elseif (numero > 1000) then
+ elseif (numero > 999) then
return _string_format ("%.1f", numero/1000) .. "K"
end
- return _string_format ("%.1f", numero)
+
+ return _string_format ("%.0f", numero)
end
function _detalhes:ToK2 (numero)
@@ -295,7 +296,8 @@
elseif (numero > 999) then
return _string_format ("%.1f", (numero/1000)) .. "K"
end
- return _string_format ("%.1f", numero)
+
+ return _string_format ("%.0f", numero)
end
--> short numbers no numbers after comma
@@ -307,6 +309,7 @@
elseif (numero > 1000) then
return _string_format ("%.0f", numero/1000) .. "K"
end
+
return _string_format ("%.0f", numero)
end
@@ -316,7 +319,8 @@
elseif (numero > 1000) then
return _string_format ("%.1f", numero/1000) .. "k"
end
- return _string_format ("%.1f", numero)
+
+ return _string_format ("%.0f", numero)
end
function _detalhes:ToK2Min (numero)
@@ -327,7 +331,8 @@
elseif (numero > 999) then
return _string_format ("%.1f", (numero/1000)) .. "k"
end
- return _string_format ("%.1f", numero)
+
+ return _string_format ("%.0f", numero)
end
--> short numbers no numbers after comma
@@ -337,6 +342,7 @@
elseif (numero > 1000) then
return _string_format ("%.0f", numero/1000) .. "k"
end
+
return _string_format ("%.0f", numero)
end
@@ -347,6 +353,7 @@
elseif (numero > 1000) then
return _string_format ("%.1f", numero/1000) .. "K"
end
+
return numero
end
@@ -581,7 +588,7 @@
s = s .. space .. "[" .. key .. "] = |cFFffc1f4" .. value .. "|r\n"
elseif (tpe == "function") then
- s = s .. space .. "[" .. key .. "] = function()\n"
+ s = s .. space .. "|cFFa9a9ff[|r" .. key .. "|cFFa9a9ff]|r = |cFFa9a9fffunction()|r\n"
elseif (tpe == "boolean") then
s = s .. space .. "[" .. key .. "] = |cFF99d0ff" .. (value and "true" or "false") .. "|r\n"
diff --git a/core/windows.lua b/core/windows.lua
index 30da572a..3d0e2221 100644
--- a/core/windows.lua
+++ b/core/windows.lua
@@ -157,7 +157,6 @@
end
-
--> simple left and right animations by delta time
local animation_left_simple = function (self, deltaTime)
self.inicio = self.inicio - (animation_speed * deltaTime)
@@ -180,6 +179,8 @@
--> animation with acceleration
local animation_left_with_accel = function (self, deltaTime)
local distance = self.inicio - self.fim
+
+ -- DefaultSpeed * max of ( min of (Distance / TriggerSpeed , MaxSpeed) , LowSpeed )
local calcAnimationSpeed = animation_speed * _math_max (_math_min (distance/animation_speed_hightravel_trigger, animation_speed_hightravel_maxspeed), animation_speed_lowtravel_minspeed)
self.inicio = self.inicio - (calcAnimationSpeed * deltaTime)
@@ -384,7 +385,7 @@
self.libwindow.x = x
self.libwindow.y = y
self.libwindow.point = point
- self.libwindow.scale = scale
+ self.libwindow.scale = s
end
end
@@ -2824,10 +2825,13 @@
end)
function _detalhes:CreateWelcomePanel (name, parent, width, height, make_movable)
+
local f = CreateFrame ("frame", name, parent or UIParent)
- f:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 128, insets = {left=3, right=3, top=3, bottom=3},
- edgeFile = [[Interface\AddOns\Details\images\border_welcome]], edgeSize = 16})
+
+ --f:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 128, insets = {left=3, right=3, top=3, bottom=3}, edgeFile = [[Interface\AddOns\Details\images\border_welcome]], edgeSize = 16})
+ f:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 128, insets = {left=0, right=0, top=0, bottom=0}, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
f:SetBackdropColor (1, 1, 1, 0.75)
+ f:SetBackdropBorderColor (0, 0, 0, 1)
f:SetSize (width or 1, height or 1)
if (make_movable) then
@@ -3662,7 +3666,7 @@
_detalhes.test_bar_update = nil
end
- function _detalhes:CreateTestBars()
+ function _detalhes:CreateTestBars (alphabet)
local current_combat = _detalhes:GetCombat ("current")
local pclass = select (2, UnitClass ("player"))
@@ -3717,6 +3721,87 @@
{"Archmage Trelane", "MAGE", },
{"Lilian Voss", "ROGUE", },
}
+
+ local russian_actors_name = { --arial narrow
+ {"ÐкÑпортировать", "MAGE", 63},
+ {"Готово", "DEATHKNIGHT", },
+ {"Создать", "SHAMAN", },
+ {"Текущий", "MONK", },
+ {"ÑпиÑок команд", "HUNTER", },
+ {"центр", "SHAMAN", },
+ {"Разное", "WARRIOR", },
+ }
+
+ local tw_actor_name = { --GBK
+ {"é€ æˆå‚·å®³ç›®æ¨™", "ROGUE", },
+ {"怒氣生æˆ", "DEATHKNIGHT", },
+ {"æ‰¿å—æ²»ç™‚", "WARLOCK", },
+ {"æ ¼æª”", "PRIEST", },
+ {"ä¸å¤®", "MAGE", },
+ {"傷害", "SHAMAN", },
+ {"建立", "MONK", },
+ {"編輯", "WARRIOR", },
+ {"儲å˜è®Šæ›´", "ROGUE", },
+ {"刪除", "DEATHKNIGHT", },
+ {"從", "WARLOCK", },
+ {"叿”¶", "PRIEST", },
+ {"åŠ åˆ°æ›¸ç±¤", "MAGE", },
+ {"最大化", "SHAMAN", },
+ {"未命ä¸", "MONK", },
+ {"進階", "WARRIOR", },
+ }
+
+ local cn_actor_name = { --GBK
+ {"打æ–", "PRIEST"},
+ {"æ¢å¤", "PRIEST", 257},
+ {"自动射击", "WARLOCK", 267},
+ {"å¹³å‡", "PALADIN", },
+ {"团队", "WARRIOR", },
+ {"当å‰", "WARRIOR", },
+ {"完毕", "DEATHKNIGHT", },
+ {"å˜å‚¨å˜æ›´", "MAGE", },
+ {"é—ªé¿", "MAGE", },
+ {"空的片段", "ROGUE", },
+ {"åˆ é™¤", "ROGUE", },
+ {"治疗暴击", "ROGUE", },
+ }
+
+ local korean_actor_name = { --2002
+ {"ì ì´ ë°›ì€ í”¼í•´", "ROGUE", },
+ {"초과 ì¹˜ìœ ", "DEATHKNIGHT", },
+ {"ìžë™ 사격", "WARLOCK", },
+ {"ì‹œì „", "PRIEST", },
+ {"현재", "MAGE", },
+ {"취소", "SHAMAN", },
+ {"내보내기", "MONK", },
+ {"(ì‚¬ìš©ìž ì„¤ì •)", "WARRIOR", },
+ {"ë°©ì–´", "ROGUE", },
+ {"ì˜ˆì œ", "DEATHKNIGHT", },
+ {"특화", "WARLOCK", },
+ {"최소", "PRIEST", },
+ {"미러 ì´ë¯¸ì§€", "MAGE", },
+ {"가장ìžë¦¬", "SHAMAN", },
+ {"외형", "MONK", },
+ {"아바타 ì„ íƒ", "WARRIOR", },
+ }
+
+ if (not alphabet or alphabet == "en") then
+ actors_name = actors_name
+
+ elseif (alphabet == "ru") then
+ actors_name = russian_actors_name
+
+ elseif (alphabet == "cn") then
+ actors_name = cn_actor_name
+
+ elseif (alphabet == "ko") then
+ actors_name = korean_actor_name
+
+ elseif (alphabet == "tw") then
+ actors_name = tw_actor_name
+
+ end
+
local actors_classes = CLASS_SORT_ORDER
local total_damage = 0
@@ -3858,8 +3943,633 @@
current_combat.enemy = "Illidan Stormrage"
end
+
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- ~plater
+
+ function _detalhes:InitializePlaterIntegrationWindow()
+ local DetailsPlaterIntegrationPanel = gump:CreateSimplePanel (UIParent, 700, 480, "Details! Plater Nameplates Integration", "DetailsPlaterIntegrationPanel")
+ DetailsPlaterIntegrationPanel.Frame = DetailsPlaterIntegrationPanel
+ DetailsPlaterIntegrationPanel.__name = "Plater Nameplates"
+ DetailsPlaterIntegrationPanel.real_name = "DETAILS_PLATERWINDOW"
+ DetailsPlaterIntegrationPanel.__icon = [[Interface\AddOns\Details\images\plater_icon]]
+ --DetailsPlaterIntegrationPanel.__iconcoords = {0, 30/32, 0, 25/32}
+ DetailsPlaterIntegrationPanel.__iconcoords = {0, 1, 0, 1}
+ DetailsPlaterIntegrationPanel.__iconcolor = "white"
+ DetailsPluginContainerWindow.EmbedPlugin (DetailsPlaterIntegrationPanel, DetailsPlaterIntegrationPanel, true)
+
+ function DetailsPlaterIntegrationPanel.RefreshWindow()
+ _detalhes.OpenPlaterIntegrationWindow()
+ end
+
+ DetailsPlaterIntegrationPanel:Hide()
+ end
- -- ~API
+ function _detalhes.OpenPlaterIntegrationWindow()
+ if (not DetailsPlaterIntegrationPanel or not DetailsPlaterIntegrationPanel.Initialized) then
+
+ DetailsPlaterIntegrationPanel.Initialized = true
+
+ local f = DetailsPlaterIntegrationPanel or gump:CreateSimplePanel (UIParent, 700, 480, "Details! Plater Nameplates Integration", "DetailsPlaterIntegrationPanel")
+
+ --background
+ f.bg1 = f:CreateTexture (nil, "background")
+ f.bg1:SetTexture ([[Interface\AddOns\Details\images\background]], true)
+ f.bg1:SetAlpha (0.8)
+ f.bg1:SetVertexColor (0.27, 0.27, 0.27)
+ f.bg1:SetVertTile (true)
+ f.bg1:SetHorizTile (true)
+ f.bg1:SetSize (790, 454)
+ f.bg1:SetAllPoints()
+ f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
+ f:SetBackdropColor (.5, .5, .5, .7)
+ f:SetBackdropBorderColor (0, 0, 0, 1)
+
+ --> anchor text function
+ local anchor_names = {"Top Left", "Left", "Bottom Left", "Bottom", "Bottom Right", "Right", "Top Right", "Top", "Center", "Inner Left", "Inner Right", "Inner Top", "Inner Bottom"}
+ local build_anchor_side_table = function (member)
+ local t = {}
+ for i = 1, 13 do
+ tinsert (t, {
+ label = anchor_names[i],
+ value = i,
+ onclick = function (_, _, value)
+ Details.plater [member].side = value
+ if (Plater) then
+ Plater.UpdateAllPlates()
+ end
+ end
+ })
+ end
+ return t
+ end
+
+ local menu_table = {
+
+ {type = "label", get = function() return "Add Real Time DPS Info in the Nameplate:" end, text_template = Details.gump:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")},
+
+ --> real time dps from all sources
+ {
+ type = "toggle",
+ get = function() return Details.plater.realtime_dps_enabled end,
+ set = function (self, fixedparam, value)
+ Details.plater.realtime_dps_enabled = value
+
+ Details:RefreshPlaterIntegration()
+
+ if (not value) then
+ Details:Msg ("a /reload might be needed to disable this setting.")
+ end
+ end,
+ name = "Show Real Time Dps",
+ desc = "Show Real Time DPS on the nameplate.\n\nReal time DPS is how much damage has been inflicted to the unit in the last 5 seconds.",
+ },
+ --> text size
+ {
+ type = "range",
+ get = function() return Details.plater.realtime_dps_size end,
+ set = function (self, fixedparam, value)
+ Details.plater.realtime_dps_size = value
+ if (Plater) then
+ Plater.UpdateAllPlates()
+ end
+ end,
+ min = 6,
+ max = 32,
+ step = 1,
+ name = "Text Size",
+ desc = "Text Size",
+ },
+ --> text color
+ {
+ type = "color",
+ get = function()
+ local color = Details.plater.realtime_dps_color
+ return {color [1], color [2], color [3], color [4]}
+ end,
+ set = function (self, r, g, b, a)
+ local color = Details.plater.realtime_dps_color
+ color[1], color[2], color[3], color[4] = r, g, b, a
+ if (Plater) then
+ Plater.UpdateAllPlates()
+ end
+ end,
+ desc = "Text Color",
+ name = "Text Color",
+ text_template = options_text_template,
+ },
+ --> text shadow
+ {
+ type = "toggle",
+ get = function() return Details.plater.realtime_dps_shadow end,
+ set = function (self, fixedparam, value)
+ Details.plater.realtime_dps_shadow = value
+ if (Plater) then
+ Plater.UpdateAllPlates()
+ end
+ end,
+ name = "Text Shadow",
+ desc = "Text Shadow",
+ },
+ --> text anchor
+ --anchor location
+ {
+ type = "select",
+ get = function() return Details.plater.realtime_dps_anchor.side end,
+ values = function() return build_anchor_side_table ("realtime_dps_anchor") end,
+ name = "Anchor Point",
+ desc = "Which side of the nameplate the text is attach to.",
+ },
+ --anchor x offset
+ {
+ type = "range",
+ get = function() return Details.plater.realtime_dps_anchor.x end,
+ set = function (self, fixedparam, value)
+ Details.plater.realtime_dps_anchor.x = value
+ if (Plater) then
+ Plater.UpdateAllPlates()
+ end
+ end,
+ min = -20,
+ max = 20,
+ step = 1,
+ name = "Anchor X Offset",
+ desc = "Slightly move the text horizontally.",
+ },
+ --anchor x offset
+ {
+ type = "range",
+ get = function() return Details.plater.realtime_dps_anchor.y end,
+ set = function (self, fixedparam, value)
+ Details.plater.realtime_dps_anchor.y = value
+ if (Plater) then
+ Plater.UpdateAllPlates()
+ end
+ end,
+ min = -20,
+ max = 20,
+ step = 1,
+ name = "Anchor Y Offset",
+ desc = "Slightly move the text vertically.",
+ },
+
+ {type = "breakline"},
+ {type = "label", get = function() return "Add Real Time DPS Info Only From You in the Nameplate:" end, text_template = Details.gump:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")},
+
+ --> real time dps from the player only
+ {
+ type = "toggle",
+ get = function() return Details.plater.realtime_dps_player_enabled end,
+ set = function (self, fixedparam, value)
+ Details.plater.realtime_dps_player_enabled = value
+
+ Details:RefreshPlaterIntegration()
+
+ if (not value) then
+ Details:Msg ("a /reload might be needed to disable this setting.")
+ end
+ end,
+ name = "Show Real Time Dps (From You)",
+ desc = "Show Real Time DPS you are currently applying in the unit.\n\nReal time DPS is how much damage has been inflicted to the unit in the last 5 seconds.",
+ },
+ --> text size
+ {
+ type = "range",
+ get = function() return Details.plater.realtime_dps_player_size end,
+ set = function (self, fixedparam, value)
+ Details.plater.realtime_dps_player_size = value
+ if (Plater) then
+ Plater.UpdateAllPlates()
+ end
+ end,
+ min = 6,
+ max = 32,
+ step = 1,
+ name = "Text Size",
+ desc = "Text Size",
+ },
+ --> text color
+ {
+ type = "color",
+ get = function()
+ local color = Details.plater.realtime_dps_player_color
+ return {color [1], color [2], color [3], color [4]}
+ end,
+ set = function (self, r, g, b, a)
+ local color = Details.plater.realtime_dps_player_color
+ color[1], color[2], color[3], color[4] = r, g, b, a
+ if (Plater) then
+ Plater.UpdateAllPlates()
+ end
+ end,
+ desc = "Text Color",
+ name = "Text Color",
+ text_template = options_text_template,
+ },
+ --> text shadow
+ {
+ type = "toggle",
+ get = function() return Details.plater.realtime_dps_player_shadow end,
+ set = function (self, fixedparam, value)
+ Details.plater.realtime_dps_player_shadow = value
+ if (Plater) then
+ Plater.UpdateAllPlates()
+ end
+ end,
+ name = "Text Shadow",
+ desc = "Text Shadow",
+ },
+ --> text anchor
+ --anchor location
+ {
+ type = "select",
+ get = function() return Details.plater.realtime_dps_player_anchor.side end,
+ values = function() return build_anchor_side_table ("realtime_dps_player_anchor") end,
+ name = "Anchor Point",
+ desc = "Which side of the nameplate the text is attach to.",
+ },
+ --anchor x offset
+ {
+ type = "range",
+ get = function() return Details.plater.realtime_dps_player_anchor.x end,
+ set = function (self, fixedparam, value)
+ Details.plater.realtime_dps_player_anchor.x = value
+ if (Plater) then
+ Plater.UpdateAllPlates()
+ end
+ end,
+ min = -20,
+ max = 20,
+ step = 1,
+ name = "Anchor X Offset",
+ desc = "Slightly move the text horizontally.",
+ },
+ --anchor x offset
+ {
+ type = "range",
+ get = function() return Details.plater.realtime_dps_player_anchor.y end,
+ set = function (self, fixedparam, value)
+ Details.plater.realtime_dps_player_anchor.y = value
+ if (Plater) then
+ Plater.UpdateAllPlates()
+ end
+ end,
+ min = -20,
+ max = 20,
+ step = 1,
+ name = "Anchor Y Offset",
+ desc = "Slightly move the text vertically.",
+ },
+
+ {type = "breakline"},
+ {type = "label", get = function() return "Add Total Damage Taken in the Nameplate:" end, text_template = Details.gump:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")},
+
+ --> total damage taken from all sources
+ {
+ type = "toggle",
+ get = function() return Details.plater.damage_taken_enabled end,
+ set = function (self, fixedparam, value)
+ Details.plater.damage_taken_enabled = value
+
+ Details:RefreshPlaterIntegration()
+
+ if (not value) then
+ Details:Msg ("a /reload might be needed to disable this setting.")
+ end
+ end,
+ name = "Show Total Damage Taken",
+ desc = "Show the total damage taken by the unit",
+ },
+ --> text size
+ {
+ type = "range",
+ get = function() return Details.plater.damage_taken_size end,
+ set = function (self, fixedparam, value)
+ Details.plater.damage_taken_size = value
+ if (Plater) then
+ Plater.UpdateAllPlates()
+ end
+ end,
+ min = 6,
+ max = 32,
+ step = 1,
+ name = "Text Size",
+ desc = "Text Size",
+ },
+ --> text color
+ {
+ type = "color",
+ get = function()
+ local color = Details.plater.damage_taken_color
+ return {color [1], color [2], color [3], color [4]}
+ end,
+ set = function (self, r, g, b, a)
+ local color = Details.plater.damage_taken_color
+ color[1], color[2], color[3], color[4] = r, g, b, a
+ if (Plater) then
+ Plater.UpdateAllPlates()
+ end
+ end,
+ desc = "Text Color",
+ name = "Text Color",
+ text_template = options_text_template,
+ },
+ --> text shadow
+ {
+ type = "toggle",
+ get = function() return Details.plater.damage_taken_shadow end,
+ set = function (self, fixedparam, value)
+ Details.plater.damage_taken_shadow = value
+ if (Plater) then
+ Plater.UpdateAllPlates()
+ end
+ end,
+ name = "Text Shadow",
+ desc = "Text Shadow",
+ },
+ --> text anchor
+ --anchor location
+ {
+ type = "select",
+ get = function() return Details.plater.damage_taken_anchor.side end,
+ values = function() return build_anchor_side_table ("damage_taken_anchor") end,
+ name = "Anchor Point",
+ desc = "Which side of the nameplate the text is attach to.",
+ },
+ --anchor x offset
+ {
+ type = "range",
+ get = function() return Details.plater.damage_taken_anchor.x end,
+ set = function (self, fixedparam, value)
+ Details.plater.damage_taken_anchor.x = value
+ if (Plater) then
+ Plater.UpdateAllPlates()
+ end
+ end,
+ min = -20,
+ max = 20,
+ step = 1,
+ name = "Anchor X Offset",
+ desc = "Slightly move the text horizontally.",
+ },
+ --anchor x offset
+ {
+ type = "range",
+ get = function() return Details.plater.damage_taken_anchor.y end,
+ set = function (self, fixedparam, value)
+ Details.plater.damage_taken_anchor.y = value
+ if (Plater) then
+ Plater.UpdateAllPlates()
+ end
+ end,
+ min = -20,
+ max = 20,
+ step = 1,
+ name = "Anchor Y Offset",
+ desc = "Slightly move the text vertically.",
+ },
+ }
+
+ local options_text_template = Details.gump:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")
+ local options_dropdown_template = Details.gump:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
+ local options_switch_template = Details.gump:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")
+ local options_slider_template = Details.gump:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")
+ local options_button_template = Details.gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
+
+ local titleBackground = CreateFrame ("frame", nil, f)
+ titleBackground:SetPoint ("topleft", f, "topleft", 10, -30)
+ titleBackground:SetPoint ("topright", f, "topright", -10, -30)
+ titleBackground:SetHeight (80)
+
+ --background
+ titleBackground.bg1 = titleBackground:CreateTexture (nil, "background")
+ titleBackground.bg1:SetTexture ([[Interface\AddOns\Details\images\background]])
+ titleBackground.bg1:SetAlpha (0.8)
+ titleBackground.bg1:SetVertexColor (0.27, 0.27, 0.27)
+ titleBackground.bg1:SetVertTile (true)
+ titleBackground.bg1:SetHorizTile (true)
+ titleBackground.bg1:SetSize (790, 454)
+ titleBackground.bg1:SetAllPoints()
+ titleBackground:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
+ titleBackground:SetBackdropColor (.5, .5, .5, .7)
+ titleBackground:SetBackdropBorderColor (0, 0, 0, 1)
+
+ local platerTitle = Details.gump:CreateLabel (titleBackground, "Plater Nameplates Integration", 16, "white")
+ local platerDesc1 = Details.gump:CreateLabel (titleBackground, "Add DPS and Damage information directly into the nameplate", 11, "silver")
+ local platerDesc2 = Details.gump:CreateLabel (titleBackground, "See how much damage the enemy is taking in real time!", 11, "silver")
+ local platerImage = Details.gump:CreateImage (titleBackground, "Interface\\AddOns\\Details\\images\\plater_image")
+ platerImage:SetSize (256, 64)
+
+ platerImage:SetPoint ("topright", f, "topright", -150, -35)
+ platerTitle:SetPoint (10, -15)
+ platerDesc1:SetPoint (10, -35)
+ platerDesc2:SetPoint (10, -47)
+
+ Details.gump:BuildMenu (f, menu_table, 10, -140, 460, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
+
+ if (not Plater) then
+ for _, widget in ipairs (f.widget_list) do
+ if (widget.Disable) then
+ widget:Disable()
+ end
+ end
+
+ local PlaterDisabled1 = Details.gump:CreateLabel (f, "Plater isn't installed! you may download it from the Twitch app.", 16, "red")
+ PlaterDisabled1:SetPoint (10, -330)
+ end
+
+ end
+
+ DetailsPluginContainerWindow.OpenPlugin (DetailsPlaterIntegrationPanel)
+ end
+
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- ~run ~runcode
+
+ function _detalhes:InitializeRunCodeWindow()
+ local DetailsRunCodePanel = gump:CreateSimplePanel (UIParent, 700, 480, "Details! Run Code", "DetailsRunCodePanel")
+ DetailsRunCodePanel.Frame = DetailsRunCodePanel
+ DetailsRunCodePanel.__name = "Auto Run Code"
+ DetailsRunCodePanel.real_name = "DETAILS_RUNCODEWINDOW"
+ --DetailsRunCodePanel.__icon = [[Interface\AddOns\Details\images\lua_logo]]
+ DetailsRunCodePanel.__icon = [[Interface\AddOns\Details\images\run_code]]
+ --DetailsRunCodePanel.__iconcoords = {0, 1, 0, 1}
+ DetailsRunCodePanel.__iconcoords = {0, 30/32, 0, 25/32}
+ DetailsRunCodePanel.__iconcoords = {0, 1, 0, 1}
+ DetailsRunCodePanel.__iconcolor = "white"
+ DetailsPluginContainerWindow.EmbedPlugin (DetailsRunCodePanel, DetailsRunCodePanel, true)
+
+ function DetailsRunCodePanel.RefreshWindow()
+ _detalhes.OpenRunCodeWindow()
+ end
+
+ DetailsRunCodePanel:Hide()
+ end
+
+ function _detalhes.OpenRunCodeWindow()
+ if (not DetailsRunCodePanel or not DetailsRunCodePanel.Initialized) then
+
+ DetailsRunCodePanel.Initialized = true
+
+ local f = DetailsRunCodePanel or gump:CreateSimplePanel (UIParent, 700, 480, "Details! Run Code", "DetailsRunCodePanel")
+
+ --> lua editor
+ local code_editor = gump:NewSpecialLuaEditorEntry (f, 885, 510, "text", "$parentCodeEditorWindow")
+ f.CodeEditor = code_editor
+ code_editor:SetPoint ("topleft", f, "topleft", 20, -56)
+
+ --> code editor appearance
+ code_editor.scroll:SetBackdrop (nil)
+ code_editor.editbox:SetBackdrop (nil)
+ code_editor:SetBackdrop (nil)
+
+ gump:ReskinSlider (code_editor.scroll)
+
+ if (not code_editor.__background) then
+ code_editor.__background = code_editor:CreateTexture (nil, "background")
+ end
+
+ code_editor:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
+ code_editor:SetBackdropBorderColor (0, 0, 0, 1)
+
+ code_editor.__background:SetColorTexture (0.2317647, 0.2317647, 0.2317647)
+ code_editor.__background:SetVertexColor (0.27, 0.27, 0.27)
+ code_editor.__background:SetAlpha (0.8)
+ code_editor.__background:SetVertTile (true)
+ code_editor.__background:SetHorizTile (true)
+ code_editor.__background:SetAllPoints()
+
+ --> code compile error warning
+ local errortext_frame = CreateFrame ("frame", nil, code_editor)
+ errortext_frame:SetPoint ("bottomleft", code_editor, "bottomleft", 1, 1)
+ errortext_frame:SetPoint ("bottomright", code_editor, "bottomright", -1, 1)
+ errortext_frame:SetHeight (20)
+ errortext_frame:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
+ errortext_frame:SetBackdropBorderColor (0, 0, 0, 1)
+ errortext_frame:SetBackdropColor (0, 0, 0)
+
+ gump:CreateFlashAnimation (errortext_frame)
+
+ local errortext_label = gump:CreateLabel (errortext_frame, "", gump:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
+ errortext_label.textcolor = "red"
+ errortext_label:SetPoint ("left", errortext_frame, "left", 3, 0)
+ code_editor.NextCodeCheck = 0.33
+
+ code_editor:HookScript ("OnUpdate", function (self, deltaTime)
+ code_editor.NextCodeCheck = code_editor.NextCodeCheck - deltaTime
+
+ if (code_editor.NextCodeCheck < 0) then
+ local script = code_editor:GetText()
+ local func, errortext = loadstring (script, "Q")
+ if (not func) then
+ local firstLine = strsplit ("\n", script, 2)
+ errortext = errortext:gsub (firstLine, "")
+ errortext = errortext:gsub ("%[string \"", "")
+ errortext = errortext:gsub ("...\"]:", "")
+ errortext = errortext:gsub ("Q\"]:", "")
+ errortext = "Line " .. errortext
+ errortext_label.text = errortext
+ else
+ errortext_label.text = ""
+ end
+
+ code_editor.NextCodeCheck = 0.33
+ end
+ end)
+
+ --> script selector
+ local on_select_CodeType_option = function (self, fixedParameter, value)
+ --> set the current editing code type
+ f.EditingCode = _detalhes.RunCodeTypes [value].Value
+ f.EditingCodeKey = _detalhes.RunCodeTypes [value].ProfileKey
+
+ --> load the code for the event
+ local code = _detalhes.run_code [f.EditingCodeKey]
+ code_editor:SetText (code)
+ end
+
+ local build_CodeType_dropdown_options = function()
+ local t = {}
+
+ for i = 1, #_detalhes.RunCodeTypes do
+ local option = _detalhes.RunCodeTypes [i]
+ t [#t + 1] = {label = option.Name, value = option.Value, onclick = on_select_CodeType_option, desc = option.Desc}
+ end
+
+ return t
+ end
+
+ local code_type_label = gump:CreateLabel (f, "Event:", gump:GetTemplate ("font", "ORANGE_FONT_TEMPLATE"))
+ local code_type_dropdown = gump:CreateDropDown (f, build_CodeType_dropdown_options, 1, 160, 20, "CodeTypeDropdown", _, gump:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
+ code_type_dropdown:SetPoint ("left", code_type_label, "right", 2, 0)
+ code_type_dropdown:SetFrameLevel (code_editor:GetFrameLevel() + 10)
+ code_type_label:SetPoint ("bottomleft", code_editor, "topleft", 0, 8)
+
+ --> create save button
+ local save_script = function()
+ local code = code_editor:GetText()
+ local func, errortext = loadstring (code, "Q")
+
+ if (func) then
+ _detalhes.run_code [f.EditingCodeKey] = code
+ _detalhes:RecompileAutoRunCode()
+ _detalhes:Msg ("Code saved!")
+ code_editor:ClearFocus()
+ else
+ errortext_frame:Flash (0.2, 0.2, 0.4, true, nil, nil, "NONE")
+ _detalhes:Msg ("Can't save the code: it has errors.")
+ end
+ end
+
+ local button_y = -6
+
+ local save_script_button = gump:CreateButton (f, save_script, 120, 20, "Save", -1, nil, nil, nil, nil, nil, gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), gump:GetTemplate ("font", "PLATER_BUTTON"))
+ save_script_button:SetIcon ([[Interface\BUTTONS\UI-Panel-ExpandButton-Up]], 20, 20, "overlay", {0.1, .9, 0.1, .9})
+ save_script_button:SetPoint ("topright", code_editor, "bottomright", 0, button_y)
+
+ --> create cancel button
+ local cancel_script = function()
+ code_editor:SetText (_detalhes.run_code [f.EditingCodeKey])
+ _detalhes:Msg ("Code cancelled!")
+ code_editor:ClearFocus()
+ end
+
+ local cancel_script_button = gump:CreateButton (f, cancel_script, 120, 20, "Cancel", -1, nil, nil, nil, nil, nil, gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), gump:GetTemplate ("font", "PLATER_BUTTON"))
+ cancel_script_button:SetIcon ([[Interface\BUTTONS\UI-Panel-MinimizeButton-Up]], 20, 20, "overlay", {0.1, .9, 0.1, .9})
+ cancel_script_button:SetPoint ("topleft", code_editor, "bottomleft", 0, button_y)
+
+ --> create run now button
+ local execute_script = function()
+ local script = code_editor:GetText()
+ local func, errortext = loadstring (script, "Q")
+
+ if (func) then
+ gump:QuickDispatch (func)
+ else
+ errortext_frame:Flash (0.2, 0.2, 0.4, true, nil, nil, "NONE")
+ end
+ end
+
+ local run_script_button = gump:CreateButton (f, execute_script, 120, 20, "Test Code", -1, nil, nil, nil, nil, nil, gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE"), gump:GetTemplate ("font", "PLATER_BUTTON"))
+ run_script_button:SetIcon ([[Interface\BUTTONS\UI-SpellbookIcon-NextPage-Up]], 20, 20, "overlay", {0.05, 0.95, 0.05, 0.95})
+ run_script_button:SetPoint ("bottomright", code_editor, "topright", 0, 3)
+
+ end
+
+ DetailsPluginContainerWindow.OpenPlugin (DetailsRunCodePanel)
+ DetailsRunCodePanel.CodeTypeDropdown:Select (1, true)
+
+ --> show the initialization code when showing up this window
+ DetailsRunCodePanel.EditingCode = _detalhes.RunCodeTypes [1].Value
+ DetailsRunCodePanel.EditingCodeKey = _detalhes.RunCodeTypes [1].ProfileKey
+
+ local code = _detalhes.run_code [DetailsRunCodePanel.EditingCodeKey]
+ DetailsRunCodePanel.CodeEditor:SetText (code)
+ end
+
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- ~API
+
function _detalhes:InitializeAPIWindow()
local DetailsAPIPanel = gump:CreateSimplePanel (UIParent, 700, 480, "Details! API", "DetailsAPIPanel")
DetailsAPIPanel.Frame = DetailsAPIPanel
@@ -3871,7 +4581,7 @@
DetailsPluginContainerWindow.EmbedPlugin (DetailsAPIPanel, DetailsAPIPanel, true)
function DetailsAPIPanel.RefreshWindow()
- _detalhes.OpenAPI()
+ _detalhes.OpenAPI()
end
end
@@ -3931,6 +4641,9 @@
end
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+
function Details.OpenDpsBenchmark()
--main frame
@@ -5301,8 +6014,11 @@ local CreateEventTrackerFrame = function (parent, name)
--> crowd control
elseif (token == "SPELL_AURA_APPLIED" and (crowdControlList1 [spellid])) then
- tinsert (CurrentShowing, 1, {SPELLTYPE_CROWDCONTROL, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial})
- added = true
+ --check if isnt a pet
+ if (target_flags and is_player (target_flags)) then
+ tinsert (CurrentShowing, 1, {SPELLTYPE_CROWDCONTROL, spellid, caster_name, target_name, time, false, GetTime(), caster_serial, is_enemy (caster_flags), target_serial})
+ added = true
+ end
--> spell interrupt
elseif (token == "SPELL_INTERRUPT") then
diff --git a/functions/boss.lua b/functions/boss.lua
index eb6bea3b..be5f720b 100644
--- a/functions/boss.lua
+++ b/functions/boss.lua
@@ -332,22 +332,17 @@ do
end
function _detalhes:GetCurrentDungeonBossListFromEJ()
-
- local EJ_CInstance
-
- if (_detalhes.IsBFAClient) then
- local mapID = C_Map.GetBestMapForUnit ("player")
-
- if (not mapID) then
- --print ("Details! exeption handled: zone has no map")
- return
- end
-
- EJ_CInstance = EJ_GetInstanceForMap (mapID)
- else
- EJ_CInstance = EJ_GetCurrentInstance()
+ --local EJ_CInstance = EJ_GetCurrentInstance()
+
+ local mapID = C_Map.GetBestMapForUnit ("player")
+
+ if (not mapID) then
+ --print ("Details! exeption handled: zone has no map")
+ return
end
+ local EJ_CInstance = EJ_GetInstanceForMap(mapID)
+
if (EJ_CInstance and EJ_CInstance ~= 0) then
if (_detalhes.encounter_dungeons [EJ_CInstance]) then
return _detalhes.encounter_dungeons [EJ_CInstance]
diff --git a/functions/link.lua b/functions/link.lua
index adee1d73..b938c670 100644
--- a/functions/link.lua
+++ b/functions/link.lua
@@ -993,7 +993,7 @@
["timerColor"] = {1, 1, 1, 1},
["regionType"] = "aurabar",
["stacks"] = true,
- ["texture"] = "Blizzard",
+ ["texture"] = "Skyline",
["textFont"] = "Friz Quadrata TT",
["zoom"] = 0,
["spark"] = false,
@@ -1504,6 +1504,10 @@
add.trigger.spellIds[1] = spellid
add.trigger.names[1] = spellname
add.trigger.unit = "target"
+
+ --set as own only to avoid being active by other players
+ add.trigger.ownOnly = true
+
_detalhes.table.overwrite (new_aura, add)
elseif (target == 3) then --Debuff on Focus
@@ -2265,11 +2269,67 @@
return t
end
- local weakauras_folder_label = fw:CreateLabel (f, "Weak Auras Group: ", nil, nil, "GameFontNormal")
+ local weakauras_folder_label = fw:CreateLabel (f, "WeakAuras Group: ", nil, nil, "GameFontNormal")
local weakauras_folder = fw:CreateDropDown (f, weakauras_folder_options, 1, 150, 20, "WeakaurasFolderDropdown", "$parentWeakaurasFolder")
weakauras_folder:SetTemplate (slider_template)
weakauras_folder:SetPoint ("left", weakauras_folder_label, "right", 2, 0)
+ --make new group
+ local create_wa_group = function()
+
+ local weakauras_newgroup_textentry = f.NewWeakaurasGroupTextEntry
+
+ if (not WeakAurasSaved or not WeakAurasSaved.displays) then
+ print ("nop, weakauras not found")
+ return
+ end
+
+ local groupName = weakauras_newgroup_textentry.text
+
+ if (string.len (groupName) == 0) then
+ print ("nop, group name is too small")
+ return
+ end
+
+ if (WeakAurasSaved.displays [groupName]) then
+ print ("nop, group already exists")
+ return
+ end
+
+ --make a copy of the prototype
+ local newGroup = _detalhes.table.copy ({}, group_prototype)
+
+ --set group settings
+ newGroup.id = groupName
+ newGroup.animate = false
+ newGroup.grow = "DOWN"
+
+ --add the gorup
+ WeakAuras.Add (newGroup)
+
+ --clear the text box
+ weakauras_newgroup_textentry.text = ""
+ weakauras_newgroup_textentry:ClearFocus()
+
+ --select the new group in the dropdown
+ weakauras_folder:Refresh()
+ weakauras_folder:Select (groupName)
+ end
+
+ local weakauras_newgroup_label = fw:CreateLabel (f, "New WeakAuras Group: ", nil, nil, "GameFontNormal")
+ local weakauras_newgroup_textentry = fw:CreateTextEntry (f, create_wa_group, 150, 20, "NewWeakaurasGroupTextEntry", "$parentNewWeakaurasGroup")
+ weakauras_newgroup_textentry:SetTemplate (slider_template)
+ weakauras_newgroup_textentry:SetPoint ("left", weakauras_newgroup_label, "right", 2, 0)
+ f.weakauras_newgroup = weakauras_newgroup_textentry
+ weakauras_newgroup_textentry.tooltip = "Enter the name of the new group"
+
+ local weakauras_newgroup_button = fw:CreateButton (f, create_wa_group, 106, 20, "Create Group")
+ weakauras_newgroup_button:SetTemplate (slider_template)
+ weakauras_newgroup_button:SetTemplate (_detalhes.gump:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
+ weakauras_newgroup_button:SetWidth (100)
+ weakauras_newgroup_button:SetPoint ("left", weakauras_newgroup_textentry, "right", 2, 0)
+
+
--create
local create_func = function()
@@ -2347,10 +2407,12 @@
iscooldown_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*11) + (47)) * -1)
icon_size_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*12) + (47)) * -1)
- aura_addon_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*20) + (60)) * -1)
- weakauras_folder_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*21) + (60)) * -1)
+ aura_addon_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*17) + (60)) * -1)
+ weakauras_folder_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*18) + (60)) * -1)
+ weakauras_newgroup_label:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*19) + (60)) * -1)
- create_button:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*23) + (60)) * -1)
+
+ create_button:SetPoint ("topleft", f, "topleft", x2_start, ((y_start*21) + (60)) * -1)
cancel_button:SetPoint ("left", create_button, "right", 20, 0)
function f:UpdateLabels()
@@ -2406,6 +2468,7 @@
stack_label:SetText ("Trigger Remaining Time:")
f.StackSlider:SetValue (4)
f.StackSlider.tooltip = "Will trigger when the bar remaining time reach this value."
+ f.IconSizeSlider:SetValue (64)
f.SpellName:Disable()
f.UseSpellId:Disable()
@@ -4397,4 +4460,173 @@ end)
-
\ No newline at end of file
+
+
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+--> plater integration
+
+local plater_integration_frame = CreateFrame ("frame", "DetailsPlaterFrame", UIParent)
+plater_integration_frame.DamageTaken = {}
+
+--> aprox. 6 updates per second
+local CONST_REALTIME_UPDATE_TIME = 0.166
+--> how many samples to store, 30 x .166 aprox 5 seconds buffer
+local CONST_BUFFER_SIZE = 30
+--> Dps division factor
+PLATER_DPS_SAMPLE_SIZE = CONST_BUFFER_SIZE * CONST_REALTIME_UPDATE_TIME
+
+--> separate CLEU events from the Tick event for performance
+plater_integration_frame.OnTickFrame = CreateFrame ("frame", "DetailsPlaterFrameOnTicker", UIParent)
+
+--> on tick function
+plater_integration_frame.OnTickFrameFunc = function (self, deltaTime)
+ if (self.NextUpdate < 0) then
+ for targetGUID, damageTable in pairs (plater_integration_frame.DamageTaken) do
+
+ --> total damage
+ local totalDamage = damageTable.TotalDamageTaken
+ local totalDamageFromPlayer = damageTable.TotalDamageTakenFromPlayer
+
+ --> damage on this update
+ local damageOnThisUpdate = totalDamage - damageTable.LastTotalDamageTaken
+ local damageOnThisUpdateFromPlayer = totalDamageFromPlayer - damageTable.LastTotalDamageTakenFromPlayer
+
+ --> update the last damage taken
+ damageTable.LastTotalDamageTaken = totalDamage
+ damageTable.LastTotalDamageTakenFromPlayer = totalDamageFromPlayer
+
+ --> sum the current damage
+ damageTable.CurrentDamage = damageTable.CurrentDamage + damageOnThisUpdate
+ damageTable.CurrentDamageFromPlayer = damageTable.CurrentDamageFromPlayer + damageOnThisUpdateFromPlayer
+
+ --> add to the buffer the damage added
+ tinsert (damageTable.RealTimeBuffer, 1, damageOnThisUpdate)
+ tinsert (damageTable.RealTimeBufferFromPlayer, 1, damageOnThisUpdateFromPlayer)
+
+ --> remove the damage from the buffer
+ local damageRemoved = tremove (damageTable.RealTimeBuffer, CONST_BUFFER_SIZE + 1)
+ if (damageRemoved) then
+ damageTable.CurrentDamage = max (damageTable.CurrentDamage - damageRemoved, 0)
+ end
+
+ local damageRemovedFromPlayer = tremove (damageTable.RealTimeBufferFromPlayer, CONST_BUFFER_SIZE + 1)
+ if (damageRemovedFromPlayer) then
+ damageTable.CurrentDamageFromPlayer = max (damageTable.CurrentDamageFromPlayer - damageRemovedFromPlayer, 0)
+ end
+ end
+
+ --update time
+ self.NextUpdate = CONST_REALTIME_UPDATE_TIME
+ else
+ self.NextUpdate = self.NextUpdate - deltaTime
+ end
+end
+
+
+--> parse the damage taken by unit
+function plater_integration_frame.AddDamageToGUID (sourceGUID, targetGUID, time, amount)
+ local damageTable = plater_integration_frame.DamageTaken [targetGUID]
+
+ if (not damageTable) then
+ plater_integration_frame.DamageTaken [targetGUID] = {
+ LastEvent = time,
+
+ TotalDamageTaken = amount,
+ TotalDamageTakenFromPlayer = 0,
+
+ --for real time
+ RealTimeBuffer = {},
+ RealTimeBufferFromPlayer = {},
+ LastTotalDamageTaken = 0,
+ LastTotalDamageTakenFromPlayer = 0,
+ CurrentDamage = 0,
+ CurrentDamageFromPlayer = 0,
+ }
+
+ --> is the damage from the player it self?
+ if (sourceGUID == plater_integration_frame.PlayerGUID) then
+ plater_integration_frame.DamageTaken [targetGUID].TotalDamageTakenFromPlayer = amount
+ end
+ else
+ damageTable.LastEvent = time
+ damageTable.TotalDamageTaken = damageTable.TotalDamageTaken + amount
+
+ if (sourceGUID == plater_integration_frame.PlayerGUID) then
+ damageTable.TotalDamageTakenFromPlayer = damageTable.TotalDamageTakenFromPlayer + amount
+ end
+ end
+end
+
+plater_integration_frame:SetScript ("OnEvent", function (self)
+ local time, token, hidding, sourceGUID, sourceName, sourceFlag, sourceFlag2, targetGUID, targetName, targetFlag, targetFlag2, spellID, spellName, spellType, amount, overKill, school, resisted, blocked, absorbed, isCritical = CombatLogGetCurrentEventInfo()
+
+ --> tamage taken by the GUID unit
+ if (token == "SPELL_DAMAGE" or token == "SPELL_PERIODIC_DAMAGE" or token == "RANGE_DAMAGE" or token == "DAMAGE_SHIELD") then
+ plater_integration_frame.AddDamageToGUID (sourceGUID, targetGUID, time, amount)
+
+ elseif (token == "SWING_DAMAGE") then
+ --the damage is passed in the spellID argument position
+ plater_integration_frame.AddDamageToGUID (sourceGUID, targetGUID, time, spellID)
+ end
+end)
+
+function Details:RefreshPlaterIntegration()
+
+ if (Plater and Details.plater.realtime_dps_enabled or Details.plater.realtime_dps_player_enabled or Details.plater.damage_taken_enabled) then
+
+ --> wipe the cache
+ wipe (plater_integration_frame.DamageTaken)
+
+ --> read cleu events
+ plater_integration_frame:RegisterEvent ("COMBAT_LOG_EVENT_UNFILTERED")
+
+ --> start the real time dps updater
+ plater_integration_frame.OnTickFrame.NextUpdate = CONST_REALTIME_UPDATE_TIME
+ plater_integration_frame.OnTickFrame:SetScript ("OnUpdate", plater_integration_frame.OnTickFrameFunc)
+
+ --> cache the player serial
+ plater_integration_frame.PlayerGUID = UnitGUID ("player")
+
+ --> cancel the timer if already have one
+ if (plater_integration_frame.CleanUpTimer and not plater_integration_frame.CleanUpTimer._cancelled) then
+ plater_integration_frame.CleanUpTimer:Cancel()
+ end
+
+ --> cleanup the old tables
+ plater_integration_frame.CleanUpTimer = C_Timer.NewTicker (10, function()
+ local now = time()
+ for GUID, damageTable in pairs (plater_integration_frame.DamageTaken) do
+ if (damageTable.LastEvent + 9.9 < now) then
+ plater_integration_frame.DamageTaken [GUID] = nil
+ end
+ end
+ end)
+
+ else
+ --> unregister the cleu
+ plater_integration_frame:UnregisterEvent ("COMBAT_LOG_EVENT_UNFILTERED")
+
+ --> stop the real time updater
+ plater_integration_frame.OnTickFrame:SetScript ("OnUpdate", nil)
+
+ --> stop the cleanup process
+ if (plater_integration_frame.CleanUpTimer and not plater_integration_frame.CleanUpTimer._cancelled) then
+ plater_integration_frame.CleanUpTimer:Cancel()
+ end
+ end
+
+
+
+end
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/functions/profiles.lua b/functions/profiles.lua
index 1e94c15e..bdaa54c0 100644
--- a/functions/profiles.lua
+++ b/functions/profiles.lua
@@ -893,7 +893,7 @@ local default_profile = {
1, -- [2]
0, -- [3]
},
- },
+ },
--> minimap
minimap = {hide = false, radius = 160, minimapPos = 220, onclick_what_todo = 1, text_type = 1, text_format = 3},
@@ -905,11 +905,11 @@ local default_profile = {
--> PvP
only_pvp_frags = false,
color_by_arena_team = true,
- show_arena_role_icon = true,
+ show_arena_role_icon = false,
--> window settings
max_window_size = {width = 480, height = 450},
- new_window_size = {width = 320, height = 130},
+ new_window_size = {width = 310, height = 158},
window_clamp = {-8, 0, 21, -14},
disable_window_groups = false,
disable_reset_button = false,
@@ -927,8 +927,8 @@ local default_profile = {
},
--> segments
- segments_amount = 12,
- segments_amount_to_save = 5,
+ segments_amount = 18,
+ segments_amount_to_save = 18,
segments_panic_mode = false,
segments_auto_erase = 1,
@@ -958,15 +958,20 @@ local default_profile = {
numerical_system_symbols = "auto",
--> performance
- use_row_animations = false,
+ use_row_animations = true,
+ --default animation speed - % per second
animation_speed = 33,
+ --percent to trigger fast speed - if the percent is hiogher than this it will increase the speed
animation_speed_triggertravel = 5,
+ --minumim speed multiplication value
animation_speed_mintravel = 0.45,
+ --max speed multiplication value
animation_speed_maxtravel = 3,
+
animate_scroll = false,
use_scroll = false,
scroll_speed = 2,
- update_speed = 1,
+ update_speed = 0.20,
time_type = 2,
time_type_original = 2,
memory_threshold = 3,
@@ -1019,7 +1024,7 @@ local default_profile = {
data_cleanup_logout = false,
close_shields = false,
pvp_as_group = true,
- use_battleground_server_parser = true,
+ use_battleground_server_parser = false,
force_activity_time_pvp = true,
death_tooltip_width = 350,
override_spellids = true,
@@ -1079,7 +1084,7 @@ local default_profile = {
font_color = {1, 1, 1, 1},
font_shadow = "NONE",
font_face = "Friz Quadrata TT",
- update_interval = 0.10,
+ update_interval = 0.30,
sample_size = 5, --in seconds
},
@@ -1250,6 +1255,7 @@ local default_global_data = {
realm_sync = true,
spell_school_cache = {},
global_plugin_database = {},
+
--> switch tables
switchSaved = {slots = 4, table = {
{["atributo"] = 1, ["sub_atributo"] = 1}, --damage done
@@ -1258,6 +1264,7 @@ local default_global_data = {
{["atributo"] = 4, ["sub_atributo"] = 5}, --deaths
}},
report_pos = {1, 1},
+
--> tutorial
tutorial = {
logons = 0,
@@ -1268,6 +1275,7 @@ local default_global_data = {
bookmark_tutorial = false,
ctrl_click_close_tutorial = false,
},
+
performance_profiles = {
["RaidFinder"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true},
["Raid15"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true},
@@ -1278,12 +1286,16 @@ local default_global_data = {
["Arena"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true},
["Dungeon"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true},
},
- --> auras
+
+ --> auras (wa auras created from the aura panel)
details_auras = {},
+
--> ilvl
item_level_pool = {},
+
--> latest report
latest_report_table = {},
+
--> death recap
death_recap = {
enabled = true,
@@ -1297,8 +1309,10 @@ local default_global_data = {
},
spell_pool = {},
encounter_spell_pool = {},
+
--> aura creation frame libwindow
createauraframe = {},
+
--> min health done on the death report
deathlog_healingdone_min = 1,
@@ -1320,7 +1334,37 @@ local default_global_data = {
--> plugin window positions
plugin_window_pos = {},
-
+
+ --> run code
+ run_code = {
+ ["on_specchanged"] = "\n-- run when the player changes its spec",
+ ["on_zonechanged"] = "\n-- when the player changes zone, this code will run",
+ ["on_init"] = "\n-- code to run when Details! initializes, put here code which only will run once\n-- this also will run then the profile is changed\n\n--size of the death log tooltip in the Deaths display (default 350)\nDetails.death_tooltip_width = 350;\n\n--when in arena or battleground, details! silently switch to activity time (goes back to the old setting on leaving, default true)\nDetails.force_activity_time_pvp = true;\n\n--speed of the bar animations (default 33)\nDetails.animation_speed = 33;\n\n--threshold to trigger slow or fast speed (default 0.45)\nDetails.animation_speed_mintravel = 0.45;\n\n--call to update animations\nDetails:RefreshAnimationFunctions();\n\n--max window size, does require a /reload to work (default 480 x 450)\nDetails.max_window_size.width = 480;\nDetails.max_window_size.height = 450;\n\n--use the arena team color as the class color (default true)\nDetails.color_by_arena_team = true;\n\n--use the role icon in the player bar when inside an arena (default false)\nDetails.show_arena_role_icon = false;\n\n--how much time the update warning is shown (default 10)\nDetails.update_warning_timeout = 10;",
+ ["on_leavecombat"] = "\n-- this code runs when the player leave combat",
+ ["on_entercombat"] = "\n-- this code runs when the player enters in combat",
+ },
+
+ --> plater integration
+ plater = {
+ realtime_dps_enabled = false,
+ realtime_dps_size = 12,
+ realtime_dps_color = {1, 1, 0, 1},
+ realtime_dps_shadow = true,
+ realtime_dps_anchor = {side = 7, x = 0, y = 0},
+ --
+ realtime_dps_player_enabled = false,
+ realtime_dps_player_size = 12,
+ realtime_dps_player_color = {1, 1, 0, 1},
+ realtime_dps_player_shadow = true,
+ realtime_dps_player_anchor = {side = 7, x = 0, y = 0},
+ --
+ damage_taken_enabled = false,
+ damage_taken_size = 12,
+ damage_taken_color = {1, 1, 0, 1},
+ damage_taken_shadow = true,
+ damage_taken_anchor = {side = 7, x = 0, y = 0},
+
+ }
}
_detalhes.default_global_data = default_global_data
@@ -1411,20 +1455,18 @@ function _detalhes:RestoreState_CurrentMythicDungeonRun()
local mythicLevel = C_ChallengeMode.GetActiveKeystoneInfo()
local zoneName, _, _, _, _, _, _, currentZoneID = GetInstanceInfo()
+ --local ejID = EJ_GetCurrentInstance() --removed on 8.0
+
+ local mapID = C_Map.GetBestMapForUnit ("player")
+
+ if (not mapID) then
+ return
+ end
+
local ejID = 0
- if (_detalhes.IsBFAClient) then
- local mapID = C_Map.GetBestMapForUnit ("player")
-
- if (not mapID) then
- return
- end
-
- if (mapID) then
- ejID = EJ_GetInstanceForMap (mapID) or 0
- end
- else
- ejID = EJ_GetCurrentInstance() or 0
+ if (mapID) then
+ ejID = EJ_GetInstanceForMap (mapID) or 0
end
--> is there a saved state for the dungeon?
diff --git a/functions/report.lua b/functions/report.lua
index e69de29b..9ce0a72e 100644
--- a/functions/report.lua
+++ b/functions/report.lua
@@ -0,0 +1 @@
+local _
\ No newline at end of file
diff --git a/functions/skins.lua b/functions/skins.lua
index 8654fc59..f7205f3f 100644
--- a/functions/skins.lua
+++ b/functions/skins.lua
@@ -119,7 +119,7 @@ local _
true, -- [4]
true, -- [5]
false, -- [6]
- ["space"] = -2,
+ ["space"] = -1,
["shadow"] = true,
},
["show_sidebars"] = true,
@@ -165,8 +165,8 @@ local _
["start_after_icon"] = true,
["font_face_file"] = "Fonts\\ARIALN.TTF",
["textL_custom_text"] = "{data1}. {data3}{data2}",
- ["font_size"] = 10,
- ["height"] = 14,
+ ["font_size"] = 14,
+ ["height"] = 18,
["texture_file"] = "Interface\\AddOns\\Details\\images\\bar4",
["icon_file"] = "Interface\\AddOns\\Details\\images\\classes_small",
["textR_bracket"] = "(",
@@ -310,10 +310,10 @@ local _
instance_cprops = {
["menu_icons_size"] = 0.850000023841858,
["color"] = {
- 0.333333333333333, -- [1]
- 0.333333333333333, -- [2]
- 0.333333333333333, -- [3]
- 0.3777777777777, -- [4]
+ 0.0705882352941177, -- [1]
+ 0.0705882352941177, -- [2]
+ 0.0705882352941177, -- [3]
+ 0.639196664094925, -- [4]
},
["menu_anchor"] = {
16, -- [1]
@@ -350,7 +350,7 @@ local _
},
["enable_custom_text"] = false,
},
- ["bg_alpha"] = 0.0984569266438484,
+ ["bg_alpha"] = 0.183960914611816,
["plugins_grow_direction"] = 1,
["menu_icons"] = {
true, -- [1]
@@ -359,7 +359,7 @@ local _
true, -- [4]
true, -- [5]
false, -- [6]
- ["space"] = -2,
+ ["space"] = -1,
["shadow"] = true,
},
["desaturated_menu"] = false,
@@ -407,11 +407,13 @@ local _
["textR_outline"] = false,
["spec_file"] = "Interface\\AddOns\\Details\\images\\spec_icons_normal",
["textL_outline"] = false,
+ ["textR_outline_small"] = true,
+ ["textL_outline_small"] = true,
["texture_highlight"] = "Interface\\FriendsFrame\\UI-FriendsList-Highlight",
["textR_show_data"] = {
true, -- [1]
true, -- [2]
- true, -- [3]
+ false, -- [3]
},
["textL_enable_custom_text"] = false,
["fixed_text_color"] = {
@@ -422,16 +424,16 @@ local _
["space"] = {
["right"] = 0,
["left"] = 0,
- ["between"] = 0,
+ ["between"] = 1,
},
["texture_background_class_color"] = false,
["start_after_icon"] = true,
["font_face_file"] = "Interface\\Addons\\Details\\fonts\\Accidental Presidency.ttf",
["textL_custom_text"] = "{data1}. {data3}{data2}",
- ["font_size"] = 10,
- ["height"] = 14,
+ ["font_size"] = 14,
+ ["height"] = 17,
["texture_file"] = "Interface\\AddOns\\Details\\images\\BantoBar",
- ["icon_file"] = "Interface\\AddOns\\Details\\images\\classes_small_alpha",
+ ["icon_file"] = "Interface\\AddOns\\Details\\images\\classes_small",
["textR_bracket"] = "(",
["textR_enable_custom_text"] = false,
["fixed_texture_color"] = {
@@ -467,7 +469,7 @@ local _
["upper_enabled"] = false,
},
["fast_ps_update"] = false,
- ["textR_separator"] = ",",
+ ["textR_separator"] = "NONE",
["backdrop"] = {
["enabled"] = false,
["size"] = 12,
@@ -574,10 +576,10 @@ local _
["start_after_icon"] = true,
["font_face_file"] = "Fonts\\ARIALN.TTF",
["textL_custom_text"] = "{data1}. {data3}{data2}",
- ["font_size"] = 10,
- ["height"] = 14,
+ ["font_size"] = 12,
+ ["height"] = 18,
["texture_file"] = "Interface\\AddOns\\Details\\images\\bar_serenity",
- ["icon_file"] = "Interface\\AddOns\\Details\\images\\classes_small_alpha",
+ ["icon_file"] = "Interface\\AddOns\\Details\\images\\classes_small",
["textR_bracket"] = "(",
["textR_enable_custom_text"] = false,
["fixed_texture_color"] = {
@@ -628,7 +630,7 @@ local _
},
["micro_displays_side"] = 2,
["strata"] = "LOW",
- ["bg_alpha"] = 0.3181,
+ ["bg_alpha"] = 0.4181,
["plugins_grow_direction"] = 1,
["menu_icons"] = {
true, -- [1]
@@ -637,7 +639,7 @@ local _
true, -- [4]
true, -- [5]
false, -- [6]
- ["space"] = -2,
+ ["space"] = -1,
["shadow"] = false,
},
["desaturated_menu"] = false,
@@ -776,20 +778,25 @@ local _
["enabled"] = true,
["shadow"] = false,
["side"] = 1,
- ["text_color"] = {
- 1, -- [1]
- 1, -- [2]
- 1, -- [3]
- 0.7, -- [4]
- },
+ ["text_size"] = 13,
["custom_text"] = "{name}",
["text_face"] = "Accidental Presidency",
["anchor"] = {
-17, -- [1]
- 2, -- [2]
+ 1, -- [2]
+ },
+ ["text_color"] = {
+ 0.976470588235294, -- [1]
+ 1, -- [2]
+ 0.988235294117647, -- [3]
+ 1, -- [4]
},
- ["text_size"] = 12,
["enable_custom_text"] = false,
+ ["show_timer"] = {
+ true, -- [1]
+ true, -- [2]
+ true, -- [3]
+ },
},
["micro_displays_side"] = 2,
["auto_hide_menu"] = {
@@ -805,7 +812,7 @@ local _
true, -- [4]
true, -- [5]
false, -- [6]
- ["space"] = -2,
+ ["space"] = -1,
["shadow"] = false,
},
["show_sidebars"] = false,
@@ -830,64 +837,40 @@ local _
["textR_outline"] = false,
["spec_file"] = "Interface\\AddOns\\Details\\images\\spec_icons_normal",
["textL_outline"] = false,
- ["texture_highlight"] = "Interface\\FriendsFrame\\UI-FriendsList-Highlight",
- ["textR_show_data"] = {
- true, -- [1]
- true, -- [2]
- true, -- [3]
- },
- ["textL_enable_custom_text"] = false,
+ ["textR_outline_small"] = true,
+ ["textL_outline_small"] = true,
+ ["textL_enable_custom_text"] = true,
["fixed_text_color"] = {
- 1, -- [1]
- 1, -- [2]
+ 0.956862745098039, -- [1]
+ 0.980392156862745, -- [2]
1, -- [3]
+ 1, -- [4]
},
["space"] = {
["right"] = 0,
["left"] = 0,
- ["between"] = 0,
+ ["between"] = 1,
},
["texture_background_class_color"] = false,
["start_after_icon"] = true,
["font_face_file"] = "Interface\\Addons\\Details\\fonts\\Accidental Presidency.ttf",
- ["textL_custom_text"] = "{data1}. {data3}{data2}",
- ["font_size"] = 10,
- ["height"] = 14,
- ["texture_file"] = "Interface\\AddOns\\Details\\images\\BantoBar",
- ["icon_file"] = "Interface\\AddOns\\Details\\images\\classes_small",
- ["textR_bracket"] = "(",
- ["textR_enable_custom_text"] = false,
- ["fixed_texture_color"] = {
- 0, -- [1]
- 0, -- [2]
- 0, -- [3]
- },
- ["textL_show_number"] = true,
- ["textR_custom_text"] = "{data1} ({data2}, {data3}%)",
- ["texture"] = "BantoBar",
+ ["textL_custom_text"] = "{data1} - {data3}{data2}",
["models"] = {
["upper_model"] = "Spells\\AcidBreath_SuperGreen.M2",
["lower_model"] = "World\\EXPANSION02\\DOODADS\\Coldarra\\COLDARRALOCUS.m2",
- ["upper_alpha"] = 0.5,
+ ["upper_alpha"] = 0.501719892024994,
["lower_enabled"] = false,
["lower_alpha"] = 0.1,
["upper_enabled"] = false,
},
- ["texture_background"] = "DGround",
- ["textL_class_colors"] = false,
+ ["height"] = 20,
+ ["texture_file"] = "Interface\\AddOns\\Details\\images\\bar_background",
+ ["textR_bracket"] = "[",
+ ["icon_file"] = "Interface\\AddOns\\Details\\images\\classes_small",
+ ["icon_grayscale"] = false,
+ ["font_size"] = 16,
["use_spec_icons"] = true,
- ["textR_class_colors"] = false,
- ["alpha"] = 1,
- ["no_icon"] = false,
- ["percent_type"] = 1,
- ["fixed_texture_background_color"] = {
- 0, -- [1]
- 0, -- [2]
- 0, -- [3]
- 0.440652102231979, -- [4]
- },
- ["font_face"] = "Accidental Presidency",
- ["texture_class_colors"] = true,
+ ["texture_custom"] = "",
["backdrop"] = {
["enabled"] = false,
["texture"] = "Details BarBorder 2",
@@ -899,11 +882,54 @@ local _
},
["size"] = 1,
},
+ ["fixed_texture_color"] = {
+ 0, -- [1]
+ 0, -- [2]
+ 0, -- [3]
+ 1, -- [4]
+ },
+ ["textL_show_number"] = true,
+ ["fixed_texture_background_color"] = {
+ 0, -- [1]
+ 0.0862745098039216, -- [2]
+ 0.180392156862745, -- [3]
+ 0.350894033908844, -- [4]
+ },
+ ["textL_outline_small_color"] = {
+ 0, -- [1]
+ 0, -- [2]
+ 0, -- [3]
+ 1, -- [4]
+ },
+ ["textR_custom_text"] = "{data1} ({data2}, {data3}%)",
+ ["texture"] = "DGround",
+ ["texture_highlight"] = "Interface\\FriendsFrame\\UI-FriendsList-Highlight",
+ ["textR_show_data"] = {
+ true, -- [1]
+ true, -- [2]
+ false, -- [3]
+ },
+ ["textL_class_colors"] = false,
+ ["textR_class_colors"] = false,
+ ["textR_outline_small_color"] = {
+ 0, -- [1]
+ 0, -- [2]
+ 0, -- [3]
+ 1, -- [4]
+ },
+ ["texture_background"] = "Details D'ictum",
+ ["alpha"] = 1,
+ ["no_icon"] = false,
+ ["textR_enable_custom_text"] = false,
+ ["percent_type"] = 1,
+ ["font_face"] = "Accidental Presidency",
+ ["texture_class_colors"] = true,
+ ["texture_background_file"] = "Interface\\AddOns\\Details\\images\\bar4",
["fast_ps_update"] = false,
- ["textR_separator"] = ",",
- ["texture_background_file"] = "Interface\\AddOns\\Details\\images\\bar_background",
+ ["textR_separator"] = "NONE",
+ ["texture_custom_file"] = "Interface\\",
},
- ["bg_alpha"] = 0.123711690306664,
+ ["bg_alpha"] = 0.0216164588928223,
["wallpaper"] = {
["enabled"] = false,
["width"] = 266.000061035156,
@@ -1144,7 +1170,7 @@ local _
true,
true, -- [5]
false, -- [6]
- ["space"] = -2,
+ ["space"] = -1,
["shadow"] = true,
},
["desaturated_menu"] = false,
@@ -1222,11 +1248,11 @@ local _
["textR_class_colors"] = false,
["alpha"] = 1,
["no_icon"] = false,
- ["font_size"] = 10,
+ ["font_size"] = 14,
["texture_background"] = "Details Serenity",
["font_face"] = "FORCED SQUARE",
["texture_class_colors"] = true,
- ["height"] = 14,
+ ["height"] = 18,
["texture_file"] = "Interface\\AddOns\\Details\\images\\bar4",
["texture_highlight"] = "Interface\\FriendsFrame\\UI-FriendsList-Highlight",
["percent_type"] = 1,
@@ -1520,11 +1546,11 @@ local _
["start_after_icon"] = true,
["font_face_file"] = "Interface\\Addons\\Details\\fonts\\FORCED SQUARE.ttf",
["textL_custom_text"] = "{data1}. {data3}{data2}",
- ["font_size"] = 10,
- ["height"] = 14,
+ ["font_size"] = 14,
+ ["height"] = 18,
["texture_file"] = "Interface\\AddOns\\Details\\images\\bar4",
- ["icon_file"] = "Interface\\AddOns\\Details\\images\\classes_small_alpha",
- ["textR_bracket"] = "(",
+ ["icon_file"] = "Interface\\AddOns\\Details\\images\\classes_small",
+ ["textR_bracket"] = "[",
["textR_enable_custom_text"] = false,
["fixed_texture_color"] = {
0, -- [1]
@@ -1559,7 +1585,7 @@ local _
["upper_enabled"] = false,
},
["fast_ps_update"] = false,
- ["textR_separator"] = ",",
+ ["textR_separator"] = "|",
["backdrop"] = {
["enabled"] = false,
["size"] = 4,
@@ -1588,7 +1614,7 @@ local _
true, -- [4]
true, -- [5]
false, -- [6]
- ["space"] = -2,
+ ["space"] = -1,
["shadow"] = true,
},
["show_sidebars"] = true,
@@ -1719,7 +1745,7 @@ local _
["left_noborder"] = 1,
["between"] = 1,
},
- ["texture"] = "Skyline",
+ ["texture"] = "DGround",
["texture_background_class_color"] = false,
["fixed_texture_background_color"] = {0,0,0,0.295484036207199},
["font_face_file"] = "Fonts\\ARIALN.TTF",
@@ -1742,12 +1768,12 @@ local _
["texture_background"] = "BantoBar",
["textL_custom_text"] = "{data1}. {data3}{data2}",
["no_icon"] = false,
- ["font_size"] = 10,
+ ["font_size"] = 14,
["textL_class_colors"] = false,
["font_face"] = "FORCED SQUARE",
["texture_class_colors"] = true,
- ["height"] = 14,
- ["texture_file"] = "Interface\\AddOns\\Details\\images\\bar_skyline",
+ ["height"] = 18,
+ ["texture_file"] = "Interface\\AddOns\\Details\\images\\bar_background",
["textL_show_number"] = true,
["fixed_texture_color"] = {0.862745098039216,0.862745098039216,0.862745098039216,1},
},
@@ -1770,7 +1796,7 @@ local _
["show_sidebars"] = true,
["show_sidebars_need_resize_by"] = 1,
["hide_in_combat_alpha"] = 0,
- ["menu_icons"] = {true, true, true, true, true, false, ["space"] = -2, ["shadow"] = true},
+ ["menu_icons"] = {true, true, true, true, true, false, ["space"] = -1, ["shadow"] = true},
["desaturated_menu"] = false,
["auto_hide_menu"] = {
["left"] = false,
@@ -1992,14 +2018,16 @@ local _
["stretch_button_side"] = 1,
["micro_displays_locked"] = true,
["row_info"] = {
- ["textR_outline"] = false,
- ["spec_file"] = "Interface\\AddOns\\Details\\images\\spec_icons_normal_alpha",
["textL_outline"] = true,
+ ["textR_outline"] = true,
+ ["textL_outline_small"] = false,
+ ["textR_outline_small"] = false,
+ ["spec_file"] = "Interface\\AddOns\\Details\\images\\spec_icons_normal_alpha",
["texture_highlight"] = "Interface\\FriendsFrame\\UI-FriendsList-Highlight",
["textR_show_data"] = {
true, -- [1]
true, -- [2]
- true, -- [3]
+ false, -- [3]
},
["textL_enable_custom_text"] = false,
["fixed_text_color"] = {
@@ -2016,8 +2044,8 @@ local _
["start_after_icon"] = false,
["font_face_file"] = "Interface\\Addons\\Details\\fonts\\Accidental Presidency.ttf",
["textL_custom_text"] = "{data1}. {data3}{data2}",
- ["font_size"] = 10,
- ["height"] = 14,
+ ["font_size"] = 14,
+ ["height"] = 18,
["texture_file"] = "Interface\\AddOns\\Details\\images\\bar_background",
["icon_file"] = "Interface\\AddOns\\Details\\images\\classes_small_alpha",
["textR_bracket"] = "(",
@@ -2044,21 +2072,21 @@ local _
["percent_type"] = 1,
["textR_enable_custom_text"] = false,
["fixed_texture_background_color"] = {
- 0, -- [1]
- 0, -- [2]
- 0, -- [3]
- 0.150228589773178, -- [4]
+ 0.188235294117647, -- [1]
+ 0.188235294117647, -- [2]
+ 0.188235294117647, -- [3]
+ 0.3492591381073, -- [4]
},
["textR_class_colors"] = false,
["alpha"] = 0.439999997615814,
["no_icon"] = false,
- ["texture_background_file"] = "Interface\\AddOns\\Details\\images\\bar4_reverse",
- ["texture_background"] = "Details D'ictum (reverse)",
+ ["texture_background_file"] = "Interface\\AddOns\\Details\\images\\bar_background",
+ ["texture_background"] = "DGround",
["font_face"] = "Accidental Presidency",
["texture_class_colors"] = false,
["textL_class_colors"] = false,
["fast_ps_update"] = false,
- ["textR_separator"] = ",",
+ ["textR_separator"] = "NONE",
["backdrop"] = {
["enabled"] = false,
["texture"] = "Details BarBorder 2",
@@ -2085,290 +2113,5 @@ local _
}
})
-
- _detalhes:InstallSkin ("Safe Skin Legion Beta", {
- file = [[Interface\AddOns\Details\images\skins\classic_skin_v1.blp]],
- author = "Details!",
- version = "1.0",
- site = "unknown",
- desc = "Simple skin with soft gray color and half transparent frames.", --\n
-
- --micro frames
- micro_frames = {
- color = {1, 1, 1, 1},
- font = "Accidental Presidency",
- size = 10,
- textymod = 1,
- },
-
- can_change_alpha_head = true,
- icon_anchor_main = {-1, -5},
- icon_anchor_plugins = {-7, -13},
- icon_plugins_size = {19, 18},
-
- --anchors:
- icon_point_anchor = {-37, 0},
- left_corner_anchor = {-107, 0},
- right_corner_anchor = {96, 0},
- icon_point_anchor_bottom = {-37, 12},
- left_corner_anchor_bottom = {-107, 0},
- right_corner_anchor_bottom = {96, 0},
-
- icon_on_top = true,
- icon_ignore_alpha = true,
- icon_titletext_position = {3, 3},
-
- --overwrites
- instance_cprops = {
- ["show_statusbar"] = false,
- ["menu_icons_size"] = 0.850000023841858,
- ["color"] = {
- 0.333333333333333, -- [1]
- 0.333333333333333, -- [2]
- 0.333333333333333, -- [3]
- 0, -- [4]
- },
- ["menu_anchor"] = {
- 16, -- [1]
- 0, -- [2]
- ["side"] = 2,
- },
- ["bg_r"] = 0.0941176470588235,
- ["hide_out_of_combat"] = false,
- ["following"] = {
- ["bar_color"] = {
- 1, -- [1]
- 1, -- [2]
- 1, -- [3]
- },
- ["enabled"] = false,
- ["text_color"] = {
- 1, -- [1]
- 1, -- [2]
- 1, -- [3]
- },
- },
- ["color_buttons"] = {
- 1, -- [1]
- 1, -- [2]
- 1, -- [3]
- 1, -- [4]
- },
- ["skin_custom"] = "",
- ["menu_anchor_down"] = {
- 16, -- [1]
- -3, -- [2]
- },
- ["micro_displays_locked"] = true,
- ["row_show_animation"] = {
- ["anim"] = "Fade",
- ["options"] = {
- },
- },
- ["tooltip"] = {
- ["n_abilities"] = 3,
- ["n_enemies"] = 3,
- },
- ["total_bar"] = {
- ["enabled"] = false,
- ["only_in_group"] = true,
- ["icon"] = "Interface\\ICONS\\INV_Sigil_Thorim",
- ["color"] = {
- 1, -- [1]
- 1, -- [2]
- 1, -- [3]
- },
- },
- ["show_sidebars"] = false,
- ["instance_button_anchor"] = {
- -27, -- [1]
- 1, -- [2]
- },
- ["row_info"] = {
- ["textR_outline"] = false,
- ["spec_file"] = "Interface\\AddOns\\Details\\images\\spec_icons_normal",
- ["textL_outline"] = false,
- ["texture_highlight"] = "Interface\\FriendsFrame\\UI-FriendsList-Highlight",
- ["textR_show_data"] = {
- true, -- [1]
- true, -- [2]
- true, -- [3]
- },
- ["textL_enable_custom_text"] = false,
- ["fixed_text_color"] = {
- 1, -- [1]
- 1, -- [2]
- 1, -- [3]
- },
- ["space"] = {
- ["right"] = 0,
- ["left"] = 0,
- ["between"] = 0,
- },
- ["texture_background_class_color"] = false,
- ["start_after_icon"] = true,
- ["font_face_file"] = "Interface\\Addons\\Details\\fonts\\Accidental Presidency.ttf",
- ["backdrop"] = {
- ["enabled"] = false,
- ["size"] = 12,
- ["color"] = {
- 1, -- [1]
- 1, -- [2]
- 1, -- [3]
- 1, -- [4]
- },
- ["texture"] = "Details BarBorder 2",
- },
- ["font_size"] = 10,
- ["height"] = 14,
- ["texture_file"] = "Interface\\RaidFrame\\Raid-Bar-Hp-Fill",
- ["icon_file"] = "Interface\\AddOns\\Details\\images\\classes_small",
- ["textR_bracket"] = "(",
- ["textR_enable_custom_text"] = false,
- ["fixed_texture_color"] = {
- 0, -- [1]
- 0, -- [2]
- 0, -- [3]
- },
- ["textL_show_number"] = true,
- ["textL_custom_text"] = "{data1}. {data3}{data2}",
- ["textR_custom_text"] = "{data1} ({data2}, {data3}%)",
- ["fixed_texture_background_color"] = {
- 0, -- [1]
- 0, -- [2]
- 0, -- [3]
- 0.150228589773178, -- [4]
- },
- ["models"] = {
- ["upper_model"] = "Spells\\AcidBreath_SuperGreen.M2",
- ["lower_model"] = "World\\EXPANSION02\\DOODADS\\Coldarra\\COLDARRALOCUS.m2",
- ["upper_alpha"] = 0.5,
- ["lower_enabled"] = false,
- ["lower_alpha"] = 0.1,
- ["upper_enabled"] = false,
- },
- ["texture_custom_file"] = "Interface\\",
- ["textR_class_colors"] = false,
- ["texture_custom"] = "",
- ["texture"] = "Blizzard Raid Bar",
- ["textL_class_colors"] = false,
- ["alpha"] = 1,
- ["no_icon"] = false,
- ["texture_background"] = "Details D'ictum (reverse)",
- ["texture_background_file"] = "Interface\\AddOns\\Details\\images\\bar4_reverse",
- ["font_face"] = "Accidental Presidency",
- ["texture_class_colors"] = true,
- ["percent_type"] = 1,
- ["fast_ps_update"] = false,
- ["textR_separator"] = ",",
- ["use_spec_icons"] = true,
- },
- ["plugins_grow_direction"] = 1,
- ["menu_alpha"] = {
- ["enabled"] = false,
- ["onleave"] = 1,
- ["ignorebars"] = false,
- ["iconstoo"] = true,
- ["onenter"] = 1,
- },
- ["micro_displays_side"] = 2,
- ["grab_on_top"] = false,
- ["strata"] = "LOW",
- ["bars_grow_direction"] = 1,
- ["bg_alpha"] = 0.045324444770813,
- ["ignore_mass_showhide"] = false,
- ["hide_in_combat_alpha"] = 0,
- ["menu_icons"] = {
- true, -- [1]
- true, -- [2]
- true, -- [3]
- true, -- [4]
- true, -- [5]
- false, -- [6]
- ["space"] = -2,
- ["shadow"] = false,
- },
- ["auto_hide_menu"] = {
- ["left"] = false,
- ["right"] = false,
- },
- ["statusbar_info"] = {
- ["alpha"] = 0,
- ["overlay"] = {
- 0.333333333333333, -- [1]
- 0.333333333333333, -- [2]
- 0.333333333333333, -- [3]
- },
- },
- ["window_scale"] = 1,
- ["libwindow"] = {
- ["y"] = 90.9987335205078,
- ["x"] = -80.0020751953125,
- ["point"] = "BOTTOMRIGHT",
- },
- ["backdrop_texture"] = "Details Ground",
- ["hide_icon"] = true,
- ["bg_b"] = 0.0941176470588235,
- ["toolbar_side"] = 1,
- ["bg_g"] = 0.0941176470588235,
- ["desaturated_menu"] = false,
- ["wallpaper"] = {
- ["enabled"] = false,
- ["texcoord"] = {
- 0, -- [1]
- 1, -- [2]
- 0, -- [3]
- 0.7, -- [4]
- },
- ["overlay"] = {
- 1, -- [1]
- 1, -- [2]
- 1, -- [3]
- 1, -- [4]
- },
- ["anchor"] = "all",
- ["height"] = 114.042518615723,
- ["alpha"] = 0.5,
- ["width"] = 283.000183105469,
- },
- ["stretch_button_side"] = 1,
- ["attribute_text"] = {
- ["enabled"] = true,
- ["shadow"] = false,
- ["side"] = 1,
- ["text_size"] = 12,
- ["custom_text"] = "{name}",
- ["text_face"] = "Accidental Presidency",
- ["anchor"] = {
- -18, -- [1]
- 3, -- [2]
- },
- ["text_color"] = {
- 1, -- [1]
- 1, -- [2]
- 1, -- [3]
- 1, -- [4]
- },
- ["enable_custom_text"] = false,
- ["show_timer"] = {
- true, -- [1]
- true, -- [2]
- true, -- [3]
- },
- },
- ["bars_sort_direction"] = 1,
- },
-
- callback = function (skin, instance, just_updating)
- --none
- end,
-
- skin_options = {
- {spacement = true, type = "button", name = "Shadowy Title Bar", func = Minimalistic_Shadow, desc = "Adds shadow on title bar components."},
- {type = "button", name = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP"], func = reset_tooltip, desc = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP_DESC"]},
- {type = "button", name = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON3"], func = set_tooltip_elvui2, desc = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON3_DESC"]},
- }
-
- })
\ No newline at end of file
diff --git a/functions/slash.lua b/functions/slash.lua
index f1cd25ab..1499e695 100644
--- a/functions/slash.lua
+++ b/functions/slash.lua
@@ -1536,8 +1536,10 @@ Damage Update Status: @INSTANCEDAMAGESTATUS
end
-
-
+
+ --BFA BETA
+ elseif (msg == "update") then
+ _detalhes:CopyPaste ([[https://www.wowinterface.com/downloads/info23056-DetailsDamageMeter8.07.3.5.html]])
else
@@ -1545,6 +1547,58 @@ Damage Update Status: @INSTANCEDAMAGESTATUS
-- _detalhes:CriarInstancia()
--end
+ if (command) then
+ --> check if the line passed is a parameters in the default profile
+ if (_detalhes.default_profile [command]) then
+ if (rest and (rest ~= "" and rest ~= " ")) then
+ local whichType = type (_detalhes.default_profile [command])
+
+ --> attempt to cast the passed value to the same value as the type in the profile
+ if (whichType == "number") then
+ rest = tonumber (rest)
+ if (rest) then
+ _detalhes [command] = rest
+ print (Loc ["STRING_DETAILS1"] .. "config '" .. command .. "' set to " .. rest)
+ else
+ print (Loc ["STRING_DETAILS1"] .. "config '" .. command .. "' expects a number")
+ end
+
+ elseif (whichType == "string") then
+ rest = tostring (rest)
+ if (rest) then
+ _detalhes [command] = rest
+ print (Loc ["STRING_DETAILS1"] .. "config '" .. command .. "' set to " .. rest)
+ else
+ print (Loc ["STRING_DETAILS1"] .. "config '" .. command .. "' expects a string")
+ end
+
+ elseif (whichType == "boolean") then
+ if (rest == "true") then
+ _detalhes [command] = true
+ print (Loc ["STRING_DETAILS1"] .. "config '" .. command .. "' set to true")
+
+ elseif (rest == "false") then
+ _detalhes [command] = false
+ print (Loc ["STRING_DETAILS1"] .. "config '" .. command .. "' set to false")
+
+ else
+ print (Loc ["STRING_DETAILS1"] .. "config '" .. command .. "' expects true or false")
+ end
+ end
+
+ else
+ local value = _detalhes [command]
+ if (type (value) == "boolean") then
+ value = value and "true" or "false"
+ end
+ print (Loc ["STRING_DETAILS1"] .. "config '" .. command .. "' current value is: " .. value)
+ end
+
+ return
+ end
+
+ end
+
print (" ")
print (Loc ["STRING_DETAILS1"] .. "" .. _detalhes.userversion .. " [|cFFFFFF00CORE: " .. _detalhes.realversion .. "|r] " .. Loc ["STRING_COMMAND_LIST"] .. ":")
diff --git a/functions/spells.lua b/functions/spells.lua
index 25374532..a3f132df 100644
--- a/functions/spells.lua
+++ b/functions/spells.lua
@@ -150,8 +150,6 @@ do
[82692] = 253, -- Focus Fire
[53257] = 253, -- Cobra Strikes
[19574] = 253, -- Bestial Wrath
- --[34026] = 253, -- Kill Command
- --[83381] = 253, -- Kill Command
-- Marksmanship Hunter:
[53209] = 254, -- Chimaera Shot
@@ -162,15 +160,18 @@ do
[3674] = 255, -- Black Arrow
[53301] = 255, -- Explosive Shot
[87935] = 255, -- Serpent Sting
+ [259491] = 255, -- Serpent Sting
-- Arcane Mage:
[153626] = 62, -- Arcane Orb
+ [153640] = 62, -- Arcane Orb
[114923] = 62, -- Nether Tempest
[157980] = 62, -- Supernova
[12042] = 62, -- Arcane Power
[12051] = 62, -- Evocation
[31589] = 62, -- Slow
[5143] = 62, -- Arcane Missiles
+ [7268] = 62, -- Arcane Missiles
[1449] = 62, -- Arcane Explosion
[44425] = 62, -- Arcane Barrage
[30451] = 62, -- Arcane Blast
@@ -192,9 +193,17 @@ do
[112948] = 64, -- Frost Bomb
[157997] = 64, -- Ice Nova
[84714] = 64, -- Frozen Orb
+ [84721] = 64, -- Frozen Orb
[10] = 64, -- Blizzard
+ [190357] = 64, -- Blizzard
[30455] = 64, -- Ice Lance
+ [148022] = 64, -- Icicle
+ [228598] = 64, -- Ice Lance
+ [228597] = 64, -- Frostbolt
[116] = 64, -- Frostbolt
+ [228600] = 64, -- glacial spike
+ [228354] = 64, -- flurry
+ [257338] = 64, -- ebonbolt
-- Brewmaster Monk:
[157676] = 268, -- Chi Explosion
@@ -362,9 +371,12 @@ do
[166221] = 263, -- Enhanced Weapons
[33757] = 263, -- Windfury
[17364] = 263, -- Stormstrike
+ [32175] = 263, -- Stormstrike
+ [32176] = 263, -- Stormstrike off hand
[16282] = 263, -- Flurry
[86629] = 263, -- Dual Wield
[10400] = 263, -- Flametongue
+ [10444] = 263, -- Flametongue attack
[60103] = 263, -- Lava Lash
[30814] = 263, -- Mental Quickness
[51522] = 263, -- Primal Wisdom
@@ -392,7 +404,7 @@ do
[61295] = 264, -- Riptide
[112858] = 264, -- Spiritual Insight
- -- Affliction Warlock:
+ -- Affliction :
[152109] = 265, -- Soulburn: Haunt
[165367] = 265, -- Eradication
[113860] = 265, -- Dark Soul: Misery
@@ -406,9 +418,11 @@ do
[74434] = 265, -- Soulburn
[108558] = 265, -- Nightfall
[30108] = 265, -- Unstable Affliction
+ [233490] = 265, -- Unstable Affliction
-- Demonology Warlock:
[157695] = 266, -- Demonbolt
+ [264178] = 266, -- Demonbolt
[165392] = 266, -- Demonic Tactics
[113861] = 266, -- Dark Soul: Knowledge
[77219] = 266, -- Mastery: Master Demonologist
@@ -417,6 +431,7 @@ do
[114592] = 266, -- Wild Imps
[1949] = 266, -- Hellfire
[105174] = 266, -- Hand of Gul'dan
+ [86040] = 266, -- Hand of Gul'dan
[6353] = 266, -- Soul Fire
[109151] = 266, -- Demonic Leap
[108869] = 266, -- Decimation
@@ -628,8 +643,46 @@ do
[49998] = "DEATHKNIGHT", --death strike
[55090] = "DEATHKNIGHT",--scourge strike
[47632] = "DEATHKNIGHT",--death coil
-
+
+ --demmon hunter
+ [185123] = "DEMONHUNTER", -- "Throw Glaive"
+ [196718] = "DEMONHUNTER", -- "Darkness"
+ [183752] = "DEMONHUNTER", -- "Consume Magic"
+ [131347] = "DEMONHUNTER", -- "Glide"
+ [200166] = "DEMONHUNTER", -- "Metamorphosis"
+ [198793] = "DEMONHUNTER", -- "Vengeful Retreat"
+ [162243] = "DEMONHUNTER", -- "Demon's Bite"
+ [213241] = "DEMONHUNTER", -- "Felblade"
+ [213243] = "DEMONHUNTER", -- "Felblade"
+ [179057] = "DEMONHUNTER", -- "Chaos Nova"
+ [188499] = "DEMONHUNTER", -- "Blade Dance"
+ [198013] = "DEMONHUNTER", -- "Eye Beam"
+ [201467] = "DEMONHUNTER", -- "Fury of the Illidari"
+ [178963] = "DEMONHUNTER", -- "Consume Soul"
+ [162794] = "DEMONHUNTER", -- "Chaos Strike"
+ [211881] = "DEMONHUNTER", -- "Fel Eruption"
+ [201427] = "DEMONHUNTER", -- "Annihilation"
+ [210152] = "DEMONHUNTER", -- "Death Sweep"
+ [203782] = "DEMONHUNTER", -- "Shear"
+ [203720] = "DEMONHUNTER", -- "Demon Spikes"
+ [218256] = "DEMONHUNTER", -- "Empower Wards"
+ [203798] = "DEMONHUNTER", -- "Soul Cleave"
+ [202137] = "DEMONHUNTER", -- "Sigil of Silence"
+ [204490] = "DEMONHUNTER", -- "Sigil of Silence"
+ [204596] = "DEMONHUNTER", -- "Sigil of Flame"
+ [204598] = "DEMONHUNTER", -- "Sigil of Flame"
+ [204021] = "DEMONHUNTER", -- "Fiery Brand"
+ [202138] = "DEMONHUNTER", -- "Sigil of Chains"
+ [207407] = "DEMONHUNTER", -- "Soul Carver"
+ [178741] = "DEMONHUNTER", -- immolation aura
+ [247455] = "DEMONHUNTER", -- spirit bomb
+ [225921] = "DEMONHUNTER", -- fracture
+ [225919] = "DEMONHUNTER", -- fracture
+
--druid
+ [155722] = "DRUID", -- rake
+ [192090] = "DRUID", -- thrash
+
[145110] = "DRUID", -- "Ysera's Gift"
[155777] = "DRUID", -- "Rejuvenation (Germination)"
[101024] = "DRUID", -- "Glyph of Ferocious Bite"
@@ -759,6 +812,16 @@ do
--[50464] = "DRUID", --nourish
--hunter
+ [257284] = "HUNTER", -- hunter's mark
+ [259398] = "HUNTER", -- Chakrams
+ [267666] = "HUNTER", -- Chakrams
+ [269747] = "HUNTER", -- Scorching Wildfire
+ [217200] = "HUNTER", -- Barbed Shot
+ [193455] = "HUNTER", -- Cobra Shot
+ [185358] = "HUNTER", -- Arcane Shot
+ [259491] = "HUNTER", -- Serpent Sting
+ [186270] = "HUNTER", -- Raptor Strike
+ [212436] = "HUNTER", -- Butchery
[53353] = "HUNTER", -- "Chimaera Shot"
[164851] = "HUNTER", -- "Kill Shot"
[164857] = "HUNTER", -- "Survivalist"
@@ -795,6 +858,7 @@ do
[120679] = "HUNTER",-- Dire Beast
[82726] = "HUNTER",-- Fervor
[3045] = "HUNTER",-- Rapid Fire
+ [257045] = "HUNTER",-- Rapid Fire
[883] = "HUNTER",-- Call Pet 1
[19574] = "HUNTER",-- Bestial Wrath
[148467] = "HUNTER",-- Deterrence
@@ -1377,6 +1441,14 @@ do
[8004] = "SHAMAN", --healing surge
--warlock
+ [104318] = "WARLOCK", -- fel firebolt
+ [270481] = "WARLOCK", -- demonfire
+ [271971] = "WARLOCK", -- dreadbite
+ [264178] = "WARLOCK", -- demonbolt
+
+ [233490] = "WARLOCK", -- unstable affliction
+ [232670] = "WARLOCK", -- shadow bolt
+
[108447] = "WARLOCK", -- "Soul Link"
[108508] = "WARLOCK", -- "Mannoroth's Fury"
[108482] = "WARLOCK", -- "Unbound Will"
@@ -1802,6 +1874,430 @@ do
}
+ --cooldowns by spec
+ _detalhes.BFA_Cooldowns = {
+
+ -- 1 attack cooldown
+ -- 2 personal defensive cooldown
+ -- 3 targetted defensive cooldown
+ -- 4 raid defensive cooldown
+ -- 5 personal utility cooldown
+
+ --MAGE
+ --arcane
+ [62] = {
+ [12042] = 1, --Arcane Power
+ [55342] = 1, --Mirror Image
+ [45438] = 2, --Ice Block
+ [12051] = 5, --Evocation
+ [110960] = 5, --Greater Invisibility
+ },
+ --fire
+ [63] = {
+ [190319] = 1, --Combustion
+ [55342] = 1, --Mirror Image
+ [45438] = 2, --Ice Block
+ [66] = 5, --Invisibility
+ },
+ --frost
+ [64] = {
+ [12472] = 1, --Icy Veins
+ [205021] = 1, --Ray of Frost
+ [55342] = 1, --Mirror Image
+ [45438] = 2, --Ice Block
+ [66] = 5, --Invisibility
+ [235219] = 5, --Cold Snap
+ },
+
+ --PRIEST
+ --discipline
+ [256] = {
+ [34433] = 1, --Shadowfiend
+ [123040] = 1, --Mindbender
+ [33206] = 3, --Pain Suppression
+ [62618] = 4, --Power Word: Barrier
+ [271466] = 4, --Luminous Barrier (talent)
+ [47536] = 5, --Rapture
+ [19236] = 5, --Desperate Prayer
+ [8122] = 5, --Psychic Scream
+ },
+ --holy
+ [257] = {
+ [200183] = 2, --Apotheosis
+ [47788] = 3, --Guardian Spirit
+ [64844] = 4, --Divine Hymn
+ [64901] = 4, --Symbol of Hope
+ [265202] = 4, --Holy Word: Salvation
+ [88625] = 5, --Holy Word: Chastise
+ [34861] = 5, --Holy Word: Sanctify
+ [2050] = 5, --Holy Word: Serenity
+ [19236] = 5, --Desperate Prayer
+ [8122] = 5, --Psychic Scream
+ },
+ --shadow priest
+ [258] = {
+ [34433] = 1, --Shadowfiend
+ [200174] = 1, --Mindbender
+ [193223] = 1, --Surrender to Madness
+ [47585] = 2, --Dispersion
+ [15286] = 4, --Vampiric Embrace
+ [64044] = 5, --Psychic Horror
+ [8122] = 5, --Psychic Scream
+ },
+
+ --ROGUE
+ --assassination
+ [259] = {
+ [79140] = 1, --Vendetta
+ [1856] = 2, --Vanish
+ [5277] = 2, --Evasion
+ [31224] = 2, --Cloak of Shadows
+ [2094] = 5, --Blind
+ [114018] = 5, --Shroud of Concealment
+ },
+ --outlaw
+ [260] = {
+ [13750] = 1, --Adrenaline Rush
+ [51690] = 1, --Killing Spree (talent)
+ [199754] = 2, --Riposte
+ [31224] = 2, --Cloak of Shadows
+ [1856] = 2, --Vanish
+ [2094] = 5, --Blind
+ [114018] = 5, --Shroud of Concealment
+ },
+ --subtlety
+ [261] = {
+ [121471] = 1, --Shadow Blades
+ [31224] = 2, --Cloak of Shadows
+ [1856] = 2, --Vanish
+ [5277] = 2, --Evasion
+ [2094] = 5, --Blind
+ [114018] = 5, --Shroud of Concealment
+ },
+
+ --WARLOCK
+ --affliction
+ [265] = {
+ [205180] = 1, --Summon Darkglare
+ [113860] = 1, --Dark Soul: Misery
+ [104773] = 2, --Unending Resolve
+
+ [108416] = 2, --Dark Pact
+
+ [30283] = 5, --Shadowfury
+ [6789] = 5, --Mortal Coil
+ },
+ --demo
+ [266] = {
+ [265187] = 1, --Summon Demonic Tyrant
+ [111898] = 1, --Grimoire: Felguard
+ [267217] = 1, --Nether Portal
+
+ [104773] = 2, --Unending Resolve
+ [108416] = 2, --Dark Pact
+
+ [30283] = 5, --Shadowfury
+ [6789] = 5, --Mortal Coil
+ },
+ --destro
+ [267] = {
+ [1122] = 1, --Summon Infernal
+ [113858] = 1, --Dark Soul: Instability
+
+ [104773] = 2, --Unending Resolve
+ [108416] = 2, --Dark Pact
+
+ [6789] = 5, --Mortal Coil
+ [30283] = 5, --Shadowfury
+ },
+
+ --WARRIOR
+ --Arms
+ [71] = {
+ [107574] = 1, --Avatar
+ [227847] = 1, --Bladestorm
+ [152277] = 1, --Ravager (talent)
+
+ [118038] = 2, --Die by the Sword
+
+ [97462] = 4, --Rallying Cry
+
+ [18499] = 5, --Berserker Rage
+ [5246] = 5, --Intimidating Shout
+ },
+ --Fury
+ [72] = {
+ [1719] = 1, --Recklessness
+ [46924] = 1, --Bladestorm (talent)
+
+ [184364] = 2, --Enraged Regeneration
+
+ [97462] = 4, --Rallying Cry
+
+ [18499] = 5, --Berserker Rage
+ [5246] = 5, --Intimidating Shout
+ },
+ --Protection
+ [73] = {
+ [228920] = 1, --Ravager (talent)
+ [107574] = 1, --Avatar
+
+ [12975] = 2, --Last Stand
+ [871] = 2, --Shield Wall
+
+ [97462] = 4, --Rallying Cry
+
+ [18499] = 5, --Berserker Rage
+ [5246] = 5, --Intimidating Shout
+ },
+
+ --PALADIN
+ --holy
+ [65] = {
+ [31884] = 1, --Avenging Wrath
+ [216331] = 1, --Avenging Crusader (talent)
+
+ [498] = 2, --Divine Protection
+ [642] = 2, --Divine Shield
+ [105809] = 2, --Holy Avenger (talent)
+
+ [1022] = 3, --Blessing of Protection
+ [633] = 3, --Lay on Hands
+
+ [31821] = 4, --Aura Mastery
+
+ [1044] = 5, --Blessing of Freedom
+ [853] = 5, --Hammer of Justice
+ [115750] = 5, --Blinding Light (talent)
+ },
+
+ --protection
+ [66] = {
+ [31884] = 1, --Avenging Wrath
+
+ [31850] = 2, --Ardent Defender
+ [86659] = 2, --Guardian of Ancient Kings
+
+ [1022] = 3, --Blessing of Protection
+ [204018] = 3, --Blessing of Spellwarding (talent)
+ [6940] = 3, --Blessing of Sacrifice
+
+ [204150] = 4, --Aegis of Light (talent)
+
+ [1044] = 5, --Blessing of Freedom
+ [853] = 5, --Hammer of Justice
+ [115750] = 5, --Blinding Light (talent)
+ },
+
+ --retribution
+ [70] = {
+ [31884] = 1, --Avenging Wrath
+ [231895] = 1, --Crusade (talent)
+
+ [184662] = 2, --Shield of Vengeance
+ [642] = 2, --Divine Shield
+
+ [1022] = 3, --Blessing of Protection
+ [633] = 3, --Lay on Hands
+
+ [1044] = 5, --Blessing of Freedom
+ [853] = 5, --Hammer of Justice
+ [115750] = 5, --Blinding Light (talent)
+ },
+
+ --DEMON HUNTER
+ --havoc
+ [577] = {
+ [200166] = 1, --Metamorphosis
+ [206491] = 1, --Nemesis (talent)
+
+ [196555] = 2, --Netherwalk (talent)
+
+ [196718] = 4, --Darkness
+ },
+ --vengeance
+ [581] = {
+ [187827] = 2, --Metamorphosis
+
+ [207684] = 5, --Sigil of Misery
+ [202137] = 5, --Sigil of Silence
+ [202138] = 5, --Sigil of Chains (talent)
+ },
+
+ --DEATH KNIGHT
+ --unholy
+ [252] = {
+ [275699] = 1, --Apocalypse
+ [42650] = 1, --Army of the Dead
+ [49206] = 1, --Summon Gargoyle (talent)
+
+ [48792] = 2, --Icebound Fortitude
+ [48743] = 2, --Death Pact (talent)
+
+ },
+ --frost
+ [251] = {
+ [152279] = 1, --Breath of Sindragosa (talent)
+ [47568] = 1, --Empower Rune Weapon
+ [279302] = 1, --Frostwyrm's Fury (talent)
+
+ [48792] = 2, --Icebound Fortitude
+ [48743] = 2, --Death Pact (talent)
+
+ [207167] = 5, --Blinding Sleet (talent)
+ },
+ --blood
+ [250] = {
+ [49028] = 1, --Dancing Rune Weapon
+
+ [55233] = 2, --Vampiric Blood
+ [48792] = 2, --Icebound Fortitude
+
+ [108199] = 5, --Gorefiend's Grasp
+ },
+
+ --DRUID
+ --balance
+ [102] = {
+ [194223] = 1, --Celestial Alignment
+ [102560] = 1, --Incarnation: Chosen of Elune (talent)
+
+ [22812] = 2, --Barkskin
+ [108238] = 2, --Renewal (talent)
+
+ [29166] = 3, --Innervate
+
+ [78675] = 5, --Solar Beam
+ },
+ --feral
+ [103] = {
+ [106951] = 1, --Berserk
+ [102543] = 1, --Incarnation: King of the Jungle (talent)
+
+ [61336] = 2, --Survival Instincts
+ [108238] = 2, --Renewal (talent)
+
+ [77764] = 4, --Stampeding Roar
+ },
+ --guardian
+ [104] = {
+ [22812] = 2, --Barkskin
+ [61336] = 2, --Survival Instincts
+ [102558] = 2, --Incarnation: Guardian of Ursoc (talent)
+
+ [77761] = 4, --Stampeding Roar
+
+ [99] = 5, --Incapacitating Roar
+ },
+ --restoration
+ [105] = {
+
+ [22812] = 2, --Barkskin
+ [108238] = 2, --Renewal (talent)
+ [33891] = 2, --Incarnation: Tree of Life (talent)
+
+ [102342] = 3, --Ironbark
+ [29166] = 3, --Innervate
+
+ [740] = 4, --Tranquility
+ [197721] = 4, --Flourish (talent)
+
+ [102793] = 5, --Ursol's Vortex
+ },
+
+ --HUNTER
+ --beast mastery
+ [253] = {
+ [193530] = 1, --Aspect of the Wild
+ [19574] = 1, --Bestial Wrath
+ [201430] = 1, --Stampede (talent)
+ [194407] = 1, --Spitting Cobra (talent)
+
+ [186265] = 2, --Aspect of the Turtle
+
+ [19577] = 5, --Intimidation
+ },
+ --marksmanship
+ [254] = {
+ [193526] = 1, --Trueshot
+
+ [186265] = 2, --Aspect of the Turtle
+ [109304] = 2, --Exhilaration
+ [281195] = 2, --Survival of the Fittest
+
+ [187650] = 5, --Freezing Trap
+ },
+ --survival
+ [255] = {
+ [266779] = 1, --Coordinated Assault
+
+ [186265] = 2, --Aspect of the Turtle
+ [109304] = 2, --Exhilaration
+
+ [19577] = 5, --Intimidation
+ },
+
+ --MONK
+ --brewmaster
+ [268] = {
+ [115203] = 2, --Fortifying Brew
+ [115176] = 2, --Zen Meditation
+ [122278] = 2, --Dampen Harm (talent)
+ },
+ --windwalker
+ [269] = {
+ [137639] = 1, --Storm, Earth, and Fire
+ [123904] = 1, --Invoke Xuen, the White Tiger (talent)
+ [152173] = 1, --Serenity (talent)
+
+ [122470] = 2, --Touch of Karma
+ [122278] = 2, --Dampen Harm (talent)
+ [122783] = 2, --Diffuse Magic (talent)
+
+ [119381] = 5, --Leg Sweep
+ },
+ --mistweaver
+ [270] = {
+ [122278] = 2, --Dampen Harm (talent)
+ [198664] = 2, --Invoke Chi-Ji, the Red Crane (talent)
+ [243435] = 2, --Fortifying Brew
+ [122783] = 2, --Diffuse Magic (talent)
+
+ [116849] = 3, --Life Cocoon
+
+ [115310] = 4, --Revival
+ },
+
+ --SHAMAN
+ --elemental
+ [262] = {
+ [198067] = 1, --Fire Elemental
+ [192249] = 1, --Storm Elemental (talent)
+ [114050] = 1, --Ascendance (talent)
+
+ [108271] = 2, --Astral Shift
+
+ [108281] = 4, --Ancestral Guidance (talent)
+ },
+ --enhancement
+ [263] = {
+ [51533] = 1, --Feral Spirit
+ [114051] = 1, --Ascendance (talent)
+
+ [108271] = 2, --Astral Shift
+ },
+ --restoration
+ [263] = {
+ [108271] = 2, --Astral Shift
+ [114052] = 2, --Ascendance (talent)
+ [98008] = 4, --Spirit Link Totem
+ [108280] = 4, --Healing Tide Totem
+ [207399] = 4, --Ancestral Protection Totem (talent)
+ },
+ }
+
+
+
-- ~cooldown 1 self
_detalhes.DefensiveCooldownSpellsNoBuff = {
diff --git a/gumps/anime.lua b/gumps/anime.lua
index edff9c35..1f692c51 100644
--- a/gumps/anime.lua
+++ b/gumps/anime.lua
@@ -10,7 +10,7 @@ function _detalhes:PlayGlow (frame)
frame.shine:Show()
frame.shine.animIn:Play()
- PlaySound ("LFG_Rewards", "master")
+ --PlaySound ("LFG_Rewards", "master")
end
--> WatchFrame copy, got removed on WoD
diff --git a/gumps/fw_mods.lua b/gumps/fw_mods.lua
index 23e096c3..74097ca0 100644
--- a/gumps/fw_mods.lua
+++ b/gumps/fw_mods.lua
@@ -491,7 +491,7 @@ end
function gump:NewScrollBar (master, slave, x, y)
- local slider_gump = CreateFrame ("Slider", nil, master)
+ local slider_gump = CreateFrame ("Slider", master:GetName() and master:GetName() .. "SliderGump" or "DetailsSliderGump" .. math.random (1, 10000000), master)
slider_gump.scrollMax = 560 --default - tamanho da janela de fundo
-- ///// SLIDER /////
@@ -513,30 +513,30 @@ function gump:NewScrollBar (master, slave, x, y)
slider_gump:SetValue(0)
slider_gump.ultimo = 0
- local botao_cima = CreateFrame ("Button", nil, master)
+ local botao_cima = CreateFrame ("Button", slider_gump:GetName() .. "UpButton", master)
+ botao_cima:SetWidth (29)
+ botao_cima:SetHeight (32)
+ botao_cima:SetNormalTexture ([[Interface\Buttons\Arrow-Up-Up]])
+ botao_cima:SetPushedTexture ([[Interface\Buttons\Arrow-Up-Down]])
+ botao_cima:SetDisabledTexture ([[Interface\Buttons\Arrow-Up-Disabled]])
+ botao_cima:Show()
+ botao_cima:Disable()
+
botao_cima:SetPoint ("BOTTOM", slider_gump, "TOP", 0, -12)
botao_cima.x = 0
botao_cima.y = -12
- botao_cima:SetWidth (29)
- botao_cima:SetHeight (32)
- botao_cima:SetNormalTexture ("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Up")
- botao_cima:SetPushedTexture ("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Down")
- botao_cima:SetDisabledTexture ("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Disabled")
- botao_cima:Show()
- botao_cima:Disable()
-
- local botao_baixo = CreateFrame ("Button", nil, master)
+ local botao_baixo = CreateFrame ("Button", slider_gump:GetName() .. "DownButton", master)
botao_baixo:SetPoint ("TOP", slider_gump, "BOTTOM", 0, 12)
botao_baixo.x = 0
botao_baixo.y = 12
botao_baixo:SetWidth (29)
botao_baixo:SetHeight (32)
- botao_baixo:SetNormalTexture ("Interface\\BUTTONS\\UI-ScrollBar-ScrollDownButton-Up")
- botao_baixo:SetPushedTexture ("Interface\\BUTTONS\\UI-ScrollBar-ScrollDownButton-Down")
- botao_baixo:SetDisabledTexture ("Interface\\BUTTONS\\UI-ScrollBar-ScrollDownButton-Disabled")
+ botao_baixo:SetNormalTexture ([[Interface\Buttons\Arrow-Down-Up]])
+ botao_baixo:SetPushedTexture ([[Interface\Buttons\Arrow-Down-Down]])
+ botao_baixo:SetDisabledTexture ([[Interface\Buttons\Arrow-Down-Disabled]])
botao_baixo:Show()
botao_baixo:Disable()
diff --git a/gumps/janela_info.lua b/gumps/janela_info.lua
index 992fbdaa..27ad242f 100644
--- a/gumps/janela_info.lua
+++ b/gumps/janela_info.lua
@@ -459,6 +459,7 @@ function gump:CriaDetalheInfo (index)
info.bg = _CreateFrame ("StatusBar", "DetailsPlayerDetailsWindow_DetalheInfoBG" .. index, _detalhes.janela_info.container_detalhes)
info.bg:SetStatusBarTexture ("Interface\\AddOns\\Details\\images\\bar_detalhes2")
+ info.bg:SetStatusBarColor (1, 1, 1, .84)
info.bg:SetMinMaxValues (0, 100)
info.bg:SetValue (100)
info.bg:SetSize (320, 47)
@@ -1277,34 +1278,60 @@ local elvui_skin = function()
end
--scrollbar
- window.container_barras.cima:SetNormalTexture ([[Interface\Buttons\Arrow-Up-Up]])
- window.container_barras.cima:SetPushedTexture ([[Interface\Buttons\Arrow-Up-Down]])
- window.container_barras.cima:SetDisabledTexture ([[Interface\Buttons\Arrow-Up-Disabled]])
- window.container_barras.cima:GetNormalTexture():ClearAllPoints()
- window.container_barras.cima:GetPushedTexture():ClearAllPoints()
- window.container_barras.cima:GetDisabledTexture():ClearAllPoints()
- window.container_barras.cima:GetNormalTexture():SetPoint ("center", window.container_barras.cima, "center", 1, 1)
- window.container_barras.cima:GetPushedTexture():SetPoint ("center", window.container_barras.cima, "center", 1, 1)
- window.container_barras.cima:GetDisabledTexture():SetPoint ("center", window.container_barras.cima, "center", 1, 1)
- window.container_barras.cima:SetSize (16, 16)
- window.container_barras.cima:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]]})
- window.container_barras.cima:SetBackdropColor (0, 0, 0, 0.3)
- window.container_barras.cima:SetBackdropBorderColor (0, 0, 0, 1)
-
- window.container_barras.baixo:SetNormalTexture ([[Interface\Buttons\Arrow-Down-Up]])
- window.container_barras.baixo:SetPushedTexture ([[Interface\Buttons\Arrow-Down-Down]])
- window.container_barras.baixo:SetDisabledTexture ([[Interface\Buttons\Arrow-Down-Disabled]])
- window.container_barras.baixo:GetNormalTexture():ClearAllPoints()
- window.container_barras.baixo:GetPushedTexture():ClearAllPoints()
- window.container_barras.baixo:GetDisabledTexture():ClearAllPoints()
- window.container_barras.baixo:GetNormalTexture():SetPoint ("center", window.container_barras.baixo, "center", 1, -5)
- window.container_barras.baixo:GetPushedTexture():SetPoint ("center", window.container_barras.baixo, "center", 1, -5)
- window.container_barras.baixo:GetDisabledTexture():SetPoint ("center", window.container_barras.baixo, "center", 1, -5)
- window.container_barras.baixo:SetSize (16, 16)
- window.container_barras.baixo:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]]})
- window.container_barras.baixo:SetBackdropColor (0, 0, 0, 0.35)
- window.container_barras.baixo:SetBackdropBorderColor (0, 0, 0, 1)
+ do
+ --get textures
+ local normalTexture = window.container_barras.cima:GetNormalTexture()
+ local pushedTexture = window.container_barras.cima:GetPushedTexture()
+ local disabledTexture = window.container_barras.cima:GetDisabledTexture()
+
+ --set the new textures
+ normalTexture:SetTexture ([[Interface\Buttons\Arrow-Up-Up]])
+ pushedTexture:SetTexture ([[Interface\Buttons\Arrow-Up-Down]])
+ disabledTexture:SetTexture ([[Interface\Buttons\Arrow-Up-Disabled]])
+
+ normalTexture:SetPoint ("topleft", window.container_barras.cima, "topleft", 1, 0)
+ normalTexture:SetPoint ("bottomright", window.container_barras.cima, "bottomright", 1, 0)
+ pushedTexture:SetPoint ("topleft", window.container_barras.cima, "topleft", 1, 0)
+ pushedTexture:SetPoint ("bottomright", window.container_barras.cima, "bottomright", 1, 0)
+ disabledTexture:SetPoint ("topleft", window.container_barras.cima, "topleft", 1, 0)
+ disabledTexture:SetPoint ("bottomright", window.container_barras.cima, "bottomright", 1, 0)
+
+ disabledTexture:SetAlpha (0.5)
+
+ window.container_barras.cima:SetSize (16, 16)
+ window.container_barras.cima:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]]})
+ window.container_barras.cima:SetBackdropColor (0, 0, 0, 0.3)
+ window.container_barras.cima:SetBackdropBorderColor (0, 0, 0, 1)
+ end
+ do
+ --get textures
+ local normalTexture = window.container_barras.baixo:GetNormalTexture()
+ local pushedTexture = window.container_barras.baixo:GetPushedTexture()
+ local disabledTexture = window.container_barras.baixo:GetDisabledTexture()
+
+ --set the new textures
+ normalTexture:SetTexture ([[Interface\Buttons\Arrow-Down-Up]])
+ pushedTexture:SetTexture ([[Interface\Buttons\Arrow-Down-Down]])
+ disabledTexture:SetTexture ([[Interface\Buttons\Arrow-Down-Disabled]])
+
+ normalTexture:SetPoint ("topleft", window.container_barras.baixo, "topleft", 1, -4)
+ normalTexture:SetPoint ("bottomright", window.container_barras.baixo, "bottomright", 1, -4)
+
+ pushedTexture:SetPoint ("topleft", window.container_barras.baixo, "topleft", 1, -4)
+ pushedTexture:SetPoint ("bottomright", window.container_barras.baixo, "bottomright", 1, -4)
+
+ disabledTexture:SetPoint ("topleft", window.container_barras.baixo, "topleft", 1, -4)
+ disabledTexture:SetPoint ("bottomright", window.container_barras.baixo, "bottomright", 1, -4)
+
+ disabledTexture:SetAlpha (0.5)
+
+ window.container_barras.baixo:SetSize (16, 16)
+ window.container_barras.baixo:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]]})
+ window.container_barras.baixo:SetBackdropColor (0, 0, 0, 0.3)
+ window.container_barras.baixo:SetBackdropBorderColor (0, 0, 0, 1)
+ end
+
window.container_barras.slider:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]]})
window.container_barras.slider:SetBackdropColor (0, 0, 0, 0.35)
window.container_barras.slider:SetBackdropBorderColor (0, 0, 0, 1)
@@ -1312,40 +1339,73 @@ local elvui_skin = function()
window.container_barras.slider:Altura (164)
window.container_barras.slider:cimaPoint (0, 13)
window.container_barras.slider:baixoPoint (0, -13)
+
window.container_barras.slider.thumb:SetTexture ([[Interface\AddOns\Details\images\icons2]])
window.container_barras.slider.thumb:SetTexCoord (482/512, 492/512, 104/512, 120/512)
window.container_barras.slider.thumb:SetSize (12, 12)
window.container_barras.slider.thumb:SetVertexColor (0.6, 0.6, 0.6, 0.95)
--
- window.container_alvos.cima:SetNormalTexture ([[Interface\Buttons\Arrow-Up-Up]])
- window.container_alvos.cima:SetPushedTexture ([[Interface\Buttons\Arrow-Up-Down]])
- window.container_alvos.cima:SetDisabledTexture ([[Interface\Buttons\Arrow-Up-Disabled]])
- window.container_alvos.cima:GetNormalTexture():ClearAllPoints()
- window.container_alvos.cima:GetPushedTexture():ClearAllPoints()
- window.container_alvos.cima:GetDisabledTexture():ClearAllPoints()
- window.container_alvos.cima:GetNormalTexture():SetPoint ("center", window.container_alvos.cima, "center", 1, 1)
- window.container_alvos.cima:GetPushedTexture():SetPoint ("center", window.container_alvos.cima, "center", 1, 1)
- window.container_alvos.cima:GetDisabledTexture():SetPoint ("center", window.container_alvos.cima, "center", 1, 1)
- window.container_alvos.cima:SetSize (16, 16)
- window.container_alvos.cima:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]]})
- window.container_alvos.cima:SetBackdropColor (0, 0, 0, 0.3)
- window.container_alvos.cima:SetBackdropBorderColor (0, 0, 0, 1)
- window.container_alvos.baixo:SetNormalTexture ([[Interface\Buttons\Arrow-Down-Up]])
- window.container_alvos.baixo:SetPushedTexture ([[Interface\Buttons\Arrow-Down-Down]])
- window.container_alvos.baixo:SetDisabledTexture ([[Interface\Buttons\Arrow-Down-Disabled]])
- window.container_alvos.baixo:GetNormalTexture():ClearAllPoints()
- window.container_alvos.baixo:GetPushedTexture():ClearAllPoints()
- window.container_alvos.baixo:GetDisabledTexture():ClearAllPoints()
- window.container_alvos.baixo:GetNormalTexture():SetPoint ("center", window.container_alvos.baixo, "center", 1, -5)
- window.container_alvos.baixo:GetPushedTexture():SetPoint ("center", window.container_alvos.baixo, "center", 1, -5)
- window.container_alvos.baixo:GetDisabledTexture():SetPoint ("center", window.container_alvos.baixo, "center", 1, -5)
- window.container_alvos.baixo:SetSize (16, 16)
- window.container_alvos.baixo:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]]})
- window.container_alvos.baixo:SetBackdropColor (0, 0, 0, 0.35)
- window.container_alvos.baixo:SetBackdropBorderColor (0, 0, 0, 1)
+ do
+ local f = window.container_alvos
+
+ --get textures
+ local normalTexture = f.cima:GetNormalTexture()
+ local pushedTexture = f.cima:GetPushedTexture()
+ local disabledTexture = f.cima:GetDisabledTexture()
+
+ --set the new textures
+ normalTexture:SetTexture ([[Interface\Buttons\Arrow-Up-Up]])
+ pushedTexture:SetTexture ([[Interface\Buttons\Arrow-Up-Down]])
+ disabledTexture:SetTexture ([[Interface\Buttons\Arrow-Up-Disabled]])
+
+ normalTexture:SetPoint ("topleft", f.cima, "topleft", 1, 0)
+ normalTexture:SetPoint ("bottomright", f.cima, "bottomright", 1, 0)
+ pushedTexture:SetPoint ("topleft", f.cima, "topleft", 1, 0)
+ pushedTexture:SetPoint ("bottomright", f.cima, "bottomright", 1, 0)
+ disabledTexture:SetPoint ("topleft", f.cima, "topleft", 1, 0)
+ disabledTexture:SetPoint ("bottomright", f.cima, "bottomright", 1, 0)
+
+ disabledTexture:SetAlpha (0.5)
+
+ f.cima:SetSize (16, 16)
+ f.cima:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]]})
+ f.cima:SetBackdropColor (0, 0, 0, 0.3)
+ f.cima:SetBackdropBorderColor (0, 0, 0, 1)
+ end
+
+ do
+ local f = window.container_alvos
+
+ --get textures
+ local normalTexture = f.baixo:GetNormalTexture()
+ local pushedTexture = f.baixo:GetPushedTexture()
+ local disabledTexture = f.baixo:GetDisabledTexture()
+
+ --set the new textures
+ normalTexture:SetTexture ([[Interface\Buttons\Arrow-Down-Up]])
+ pushedTexture:SetTexture ([[Interface\Buttons\Arrow-Down-Down]])
+ disabledTexture:SetTexture ([[Interface\Buttons\Arrow-Down-Disabled]])
+
+ normalTexture:SetPoint ("topleft", f.baixo, "topleft", 1, -4)
+ normalTexture:SetPoint ("bottomright", f.baixo, "bottomright", 1, -4)
+
+ pushedTexture:SetPoint ("topleft", f.baixo, "topleft", 1, -4)
+ pushedTexture:SetPoint ("bottomright", f.baixo, "bottomright", 1, -4)
+
+ disabledTexture:SetPoint ("topleft", f.baixo, "topleft", 1, -4)
+ disabledTexture:SetPoint ("bottomright", f.baixo, "bottomright", 1, -4)
+
+ disabledTexture:SetAlpha (0.5)
+
+ f.baixo:SetSize (16, 16)
+ f.baixo:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]]})
+ f.baixo:SetBackdropColor (0, 0, 0, 0.3)
+ f.baixo:SetBackdropBorderColor (0, 0, 0, 1)
+ end
+
window.container_alvos.slider:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]]})
window.container_alvos.slider:SetBackdropColor (0, 0, 0, 0.35)
window.container_alvos.slider:SetBackdropBorderColor (0, 0, 0, 1)
@@ -1383,7 +1443,7 @@ local elvui_skin = function()
end
_detalhes:InstallPDWSkin ("ElvUI", {func = elvui_skin, author = "Details! Team", version = "v1.0", desc = "Skin compatible with ElvUI addon."})
---> search key: ~create ~inicio
+--> search key: ~create ~inicio ~start
function gump:CriaJanelaInfo()
--> cria a janela em si
@@ -1412,6 +1472,9 @@ function gump:CriaJanelaInfo()
SWW:SetAllPoints()
tinsert (SummaryWidgets, SWW)
+ local scaleBar = Details.gump:CreateScaleBar (este_gump, Details.player_details_window)
+ este_gump:SetScale (Details.player_details_window.scale)
+
--classic:
--este_gump:SetWidth (590)
--este_gump:SetHeight (354)
@@ -1542,17 +1605,27 @@ function gump:CriaJanelaInfo()
-------------------------------------------------
-
local alpha_bgs = 1
-- backgrounds das 5 boxes do lado direito
local right_background_X = 457
+ local right_background_Y = {-85, -136, -191, -246, -301}
+
+ for i = 1, 5 do
+ local right_background1 = CreateFrame ("frame", "DetailsPlayerDetailsWindow_right_background" .. i, SWW)
+ right_background1:EnableMouse (false)
+ right_background1:SetPoint ("topleft", este_gump, "topleft", right_background_X, right_background_Y [i])
+ right_background1:SetSize (220, 43)
+ Details.gump:ApplyStandardBackdrop (right_background1)
+ este_gump ["right_background" .. i] = right_background1
+ end
+
+--[=[
local right_background1 = SWW:CreateTexture ("DetailsPlayerDetailsWindow_right_background1", "background")
right_background1:SetTexture ([[Interface\DialogFrame\UI-DialogBox-Background-Dark]])
right_background1:SetPoint ("topleft", este_gump, "topleft", right_background_X, -85)
right_background1:SetSize (220, 43)
right_background1:SetAlpha (alpha_bgs)
- este_gump.right_background1 = right_background1
local right_background2 = SWW:CreateTexture ("DetailsPlayerDetailsWindow_right_background2", "background")
right_background2:SetTexture ([[Interface\DialogFrame\UI-DialogBox-Background-Dark]])
@@ -1581,7 +1654,8 @@ function gump:CriaJanelaInfo()
right_background5:SetSize (220, 48)
right_background5:SetAlpha (alpha_bgs)
este_gump.right_background5 = right_background5
-
+--]=]
+
-- fundos especiais de friendly fire e outros
este_gump.bg1_sec_texture = SWW:CreateTexture ("DetailsPlayerDetailsWindow_BG1_SEC_Texture", "BORDER")
este_gump.bg1_sec_texture:SetDrawLayer ("BORDER", 4)
@@ -1630,16 +1704,26 @@ function gump:CriaJanelaInfo()
--> cria o container onde vai abrigar os alvos do jogador
cria_container_alvos (este_gump, SWW)
- local leftbars1_backgound = SWW:CreateTexture (nil, "background")
- leftbars1_backgound:SetTexture ([[Interface\DialogFrame\UI-DialogBox-Background-Dark]])
+-- local leftbars1_backgound = SWW:CreateTexture (nil, "background")
+-- leftbars1_backgound:SetTexture ([[Interface\DialogFrame\UI-DialogBox-Background-Dark]])
+-- leftbars1_backgound:SetSize (303, 149)
+-- leftbars1_backgound:SetAlpha (alpha_bgs)
+-- este_gump.leftbars1_backgound = leftbars1_backgound
+
+ local leftbars1_backgound = CreateFrame ("frame", "DetailsPlayerDetailsWindow_Left_SpellsBackground", SWW)
+ leftbars1_backgound:EnableMouse (false)
leftbars1_backgound:SetSize (303, 149)
leftbars1_backgound:SetAlpha (alpha_bgs)
+ leftbars1_backgound:SetFrameLevel (SWW:GetFrameLevel())
+ Details.gump:ApplyStandardBackdrop (leftbars1_backgound)
este_gump.leftbars1_backgound = leftbars1_backgound
- local leftbars2_backgound = SWW:CreateTexture (nil, "background")
- leftbars2_backgound:SetTexture ([[Interface\DialogFrame\UI-DialogBox-Background-Dark]])
+ local leftbars2_backgound = CreateFrame ("frame", "DetailsPlayerDetailsWindow_Left_TargetBackground", SWW)
+ leftbars2_backgound:EnableMouse (false)
leftbars2_backgound:SetSize (303, 122)
leftbars2_backgound:SetAlpha (alpha_bgs)
+ leftbars2_backgound:SetFrameLevel (SWW:GetFrameLevel())
+ Details.gump:ApplyStandardBackdrop (leftbars2_backgound)
este_gump.leftbars2_backgound = leftbars2_backgound
leftbars1_backgound:SetPoint ("topleft", este_gump.container_barras, "topleft", -3, 3)
@@ -2408,8 +2492,8 @@ function gump:CriaJanelaInfo()
local scroll_createline = function (self, index)
local line = CreateFrame ("button", "$parentLine" .. index, self)
- line:SetPoint ("topleft", self, "topleft", 0, -((index-1)*(scroll_line_height+1)))
- line:SetSize (scroll_width, scroll_line_height)
+ line:SetPoint ("topleft", self, "topleft", 1, -((index-1)*(scroll_line_height+1)))
+ line:SetSize (scroll_width -2, scroll_line_height)
line:SetScript ("OnEnter", line_onenter)
line:SetScript ("OnLeave", line_onleave)
line:SetScript ("OnClick", line_onclick)
@@ -2418,7 +2502,7 @@ function gump:CriaJanelaInfo()
line:SetBackdropColor (0, 0, 0, 0.2)
local icon = line:CreateTexture ("$parentIcon", "overlay")
- icon:SetSize (scroll_line_height, scroll_line_height)
+ icon:SetSize (scroll_line_height -2 , scroll_line_height - 2)
local name = line:CreateFontString ("$parentName", "overlay", "GameFontNormal")
local uptime = line:CreateFontString ("$parentName", "overlay", "GameFontNormal")
local apply = line:CreateFontString ("$parentName", "overlay", "GameFontNormal")
@@ -2471,6 +2555,9 @@ function gump:CriaJanelaInfo()
local line = self:GetLine (i)
line.spellID = aura.spellID
line.Icon:SetTexture (aura [1])
+
+ line.Icon:SetTexCoord (.1, .9, .1, .9)
+
line.Name:SetText (aura [2])
line.Uptime:SetText (DF:IntegerToTimer (aura [3]) .. " (|cFFBBAAAA" .. floor (aura [6]) .. "%|r)")
line.Apply:SetText (aura [4])
@@ -2531,9 +2618,7 @@ function gump:CriaJanelaInfo()
local line = buffScroll:CreateLine (scroll_createline)
line.AuraType = "BUFF"
end
- buffScroll:SetBackdrop ({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16})
- buffScroll:SetBackdropColor (0, 0, 0, .4)
-
+ DF:ReskinSlider (buffScroll)
tab.BuffScroll = buffScroll
--debuff scroll
@@ -2556,16 +2641,14 @@ function gump:CriaJanelaInfo()
waLabel2:SetPoint (728, -10)
create_titledesc_frame (waLabel2.widget, "create weak aura")
-
local debuffScroll = DF:CreateScrollBox (frame, "$parentDebuffUptimeScroll", scroll_buff_refresh, {}, scroll_width, 340, scroll_line_amount, scroll_line_height)
debuffScroll:SetPoint ("topleft", frame, "topleft", 405, -30)
for i = 1, scroll_line_amount do
local line = debuffScroll:CreateLine (scroll_createline)
line.AuraType = "DEBUFF"
end
- debuffScroll:SetBackdrop ({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16})
- debuffScroll:SetBackdropColor (0, 0, 0, .4)
-
+ DF:ReskinSlider (debuffScroll)
+
tab.DebuffScroll = debuffScroll
end
@@ -4066,6 +4149,7 @@ function gump:CriaJanelaInfo()
bar:SetPoint ("topright", parent, "topright", -4, y)
bar:SetStatusBarTexture ([[Interface\AddOns\Details\images\bar_serenity]])
bar:SetStatusBarColor (.5, .5, .5, 1)
+ bar:SetAlpha (ALPHA_BLEND_AMOUNT)
bar:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
bar:SetBackdropColor (1, 1, 1, 0.1)
@@ -4350,6 +4434,9 @@ function gump:CriaJanelaInfo()
frame1:SetBackdropColor (unpack (frame_backdrop_color))
frame1:SetBackdropBorderColor (unpack (frame_backdrop_border_color))
+ --override backdrop settings and use the framework defaults
+ Details.gump:ApplyStandardBackdrop (frame1)
+
frame1.bars = {}
frame1.tab = tab
frame1.tooltip = create_tooltip ("DetailsPlayerComparisonBox1Tooltip")
@@ -4380,6 +4467,9 @@ function gump:CriaJanelaInfo()
target1.tooltip = create_tooltip_target ("DetailsPlayerComparisonTarget1Tooltip")
target1.tooltip:SetWidth (spell_compare_frame_width[1])
+ --override backdrop settings and use the framework defaults
+ Details.gump:ApplyStandardBackdrop (target1)
+
--criar as barras do target1
for i = 1, targetBars do
create_bar ("DetailsPlayerComparisonTarget1Bar"..i, target1, i, true, true)
@@ -4397,6 +4487,9 @@ function gump:CriaJanelaInfo()
frame2:SetBackdropColor (unpack (frame_backdrop_color))
frame2:SetBackdropBorderColor (unpack (frame_backdrop_border_color))
+ --override backdrop settings and use the framework defaults
+ Details.gump:ApplyStandardBackdrop (frame2)
+
frame2.bars = {}
frame2.tooltip = create_tooltip ("DetailsPlayerComparisonBox2Tooltip")
frame2.tooltip:SetWidth (spell_compare_frame_width[2])
@@ -4440,6 +4533,9 @@ function gump:CriaJanelaInfo()
target2.tooltip = create_tooltip_target ("DetailsPlayerComparisonTarget2Tooltip")
target2.tooltip:SetWidth (spell_compare_frame_width[2])
+ --override backdrop settings and use the framework defaults
+ Details.gump:ApplyStandardBackdrop (target2)
+
--criar as barras do target2
for i = 1, targetBars do
create_bar ("DetailsPlayerComparisonTarget2Bar"..i, target2, i, nil, true)
@@ -4453,6 +4549,9 @@ function gump:CriaJanelaInfo()
frame3:SetBackdropColor (unpack (frame_backdrop_color))
frame3:SetBackdropBorderColor (unpack (frame_backdrop_border_color))
+ --override backdrop settings and use the framework defaults
+ Details.gump:ApplyStandardBackdrop (frame3)
+
frame3.bars = {}
frame3.tooltip = create_tooltip ("DetailsPlayerComparisonBox3Tooltip")
frame3.tooltip:SetWidth (spell_compare_frame_width[3])
@@ -4495,6 +4594,9 @@ function gump:CriaJanelaInfo()
target3.tooltip = create_tooltip_target ("DetailsPlayerComparisonTarget3Tooltip")
target3.tooltip:SetWidth (spell_compare_frame_width[3])
+ --override backdrop settings and use the framework defaults
+ Details.gump:ApplyStandardBackdrop (target3)
+
--criar as barras do target1
for i = 1, targetBars do
create_bar ("DetailsPlayerComparisonTarget3Bar"..i, target3, i, nil, true)
@@ -4534,7 +4636,7 @@ function gump:CriaJanelaInfo()
end
end
- local match_percentage = same_spells / my_spells_total * 100
+ local match_percentage = same_spells / max (my_spells_total, 0.000001) * 100
if (match_percentage > 30) then
tinsert (tabOBject.players, actor)
@@ -4608,8 +4710,6 @@ function gump:CriaJanelaInfo()
end
if (amt_positive < 2) then
- --_detalhes.player_details_tabs[1]:Hide()
- --_detalhes.player_details_tabs[1]:SetPoint ("BOTTOMLEFT", info.container_barras, "TOPLEFT", 390 - (67 * (2-1)), 1)
_detalhes.player_details_tabs[1]:SetPoint ("BOTTOMLEFT", info.container_barras, "TOPLEFT", 490 - (94 * (1-0)), 1)
end
@@ -4638,7 +4738,7 @@ function _detalhes:CreatePlayerDetailsTab (tabname, localized_name, condition, f
if (not tabname) then
tabname = "unnamed"
end
-
+
local index = #_detalhes.player_details_tabs
local newtab = CreateFrame ("button", "DetailsInfoWindowTab" .. index, info, "ChatTabTemplate")
@@ -4648,11 +4748,9 @@ function _detalhes:CreatePlayerDetailsTab (tabname, localized_name, condition, f
newtab:SetWidth (100)
newtab.middleTexture:SetWidth (70)
-
-
newtab:SetText (localized_name)
_G ["DetailsInfoWindowTab" .. index .. "Text"]:SetWidth (70)
-
+
newtab:SetFrameStrata ("HIGH")
newtab:SetFrameLevel (info:GetFrameLevel()+1)
newtab:Hide()
@@ -4686,28 +4784,19 @@ function _detalhes:CreatePlayerDetailsTab (tabname, localized_name, condition, f
end
newtab.frame:SetBackdrop({
- --bgFile = [[Interface\ACHIEVEMENTFRAME\UI-GuildAchievement-Parchment-Horizontal-Desaturated]], tile = true, tileSize = 512,
- --edgeFile = [[Interface\ACHIEVEMENTFRAME\UI-Achievement-WoodBorder]], edgeSize = 32,
- edgeFile = [[Interface\Buttons\WHITE8X8]],
- edgeSize = 1,
- --bgFile = [[Interface\Tooltips\UI-Tooltip-Background]],
- bgFile = [[Interface\AddOns\Details\images\background]],
- tileSize = 64,
- tile = true,
- insets = {left = 0, right = 0, top = 0, bottom = 0}}
- )
-
- --newtab.frame:SetBackdropColor (.5, .50, .50, 1)
- newtab.frame:SetBackdropColor (0, 0, 0, 0.3)
- newtab.frame:SetBackdropBorderColor (.3, .3, .3, 0)
-
- --local f = CreateFrame ("frame", nil, newtab)
- --f:Set
-
-
+ edgeFile = [[Interface\Buttons\WHITE8X8]],
+ edgeSize = 1,
+ bgFile = [[Interface\AddOns\Details\images\background]],
+ tileSize = 64,
+ tile = true,
+ insets = {left = 0, right = 0, top = 0, bottom = 0}}
+ )
+
+ newtab.frame:SetBackdropColor (0, 0, 0, 0.3)
+ newtab.frame:SetBackdropBorderColor (.3, .3, .3, 0)
+
newtab.frame:SetPoint ("TOPLEFT", info.container_barras, "TOPLEFT", 0, 2)
newtab.frame:SetPoint ("bottomright", info, "bottomright", -3, 3)
- --newtab.frame:SetPoint ("TOPLEFT", info, "TOPLEFT", 19, -76)
newtab.frame:SetSize (569, 274)
newtab.frame:Hide()
@@ -5450,7 +5539,7 @@ function gump:CriaNovaBarraInfo2 (instancia, index)
esta_barra.icone:SetHeight (14)
esta_barra.icone:SetPoint ("RIGHT", esta_barra.textura, "LEFT", 18, 0)
- esta_barra:SetAlpha (0.9)
+ esta_barra:SetAlpha (ALPHA_BLEND_AMOUNT)
esta_barra.icone:SetAlpha (1)
esta_barra.isAlvo = true
diff --git a/gumps/janela_news.lua b/gumps/janela_news.lua
index ab32caae..97d82c16 100644
--- a/gumps/janela_news.lua
+++ b/gumps/janela_news.lua
@@ -43,7 +43,12 @@ function _detalhes:OpenNewsWindow (text_to_show, dumpvalues, keeptext)
if (keeptext) then
news_window:Text ((DetailsNewsWindowText:GetText() or "") .. "\n\n" .. s)
else
- news_window:Text (s)
+ if (dumpvalues) then
+ news_window.DumpTableFrame:SetText (s)
+ -- /run Details:DumpTable (C_NamePlate)
+ else
+ news_window:Text (s)
+ end
end
else
@@ -73,7 +78,7 @@ function _detalhes:CreateOrOpenNewsWindow()
frame:SetWidth (512)
frame:SetHeight (512)
tinsert (UISpecialFrames, "DetailsNewsWindow")
-
+
frame:SetScript ("OnMouseDown", function(self, button)
if (self.isMoving) then
return
@@ -100,6 +105,19 @@ function _detalhes:CreateOrOpenNewsWindow()
reinstall:SetPoint ("left", textura, "right", 2, -2)
reinstall.text = Loc ["STRING_NEWS_REINSTALL"]
+ local dumpFrame = g:NewSpecialLuaEditorEntry (frame, 500, 512, "DumpTable", "$parentDumpTable", false)
+ local dumpFrame = g:CreateTextEntry (frame, function()end, 500, 512, "DumpTable", "$parentDumpTable")
+ dumpFrame.editbox:SetMultiLine (true)
+
+ dumpFrame:SetPoint ("topleft", frame, "topleft", 8, -68)
+ dumpFrame:SetBackdrop (nil)
+ dumpFrame.editbox:SetBackdrop (nil)
+ dumpFrame.editbox:SetJustifyH ("left")
+ dumpFrame.editbox:SetJustifyV ("top")
+
+ --dumpFrame.editor:SetBackdrop (nil)
+ frame.DumpTableFrame = dumpFrame
+
local frame_upper = CreateFrame ("scrollframe", nil, frame)
local frame_lower = CreateFrame ("frame", "DetailsNewsWindowLower", frame_upper)
frame_lower:SetSize (450, 2000)
diff --git a/gumps/janela_options.lua b/gumps/janela_options.lua
index 74c13c92..20845ced 100644
--- a/gumps/janela_options.lua
+++ b/gumps/janela_options.lua
@@ -686,8 +686,9 @@ local menus2 = {
}
window.is_window_settings = is_window_settings
+ --~new
local newIcon = g:CreateImage (window, [[Interface\AddOns\Details\images\icons2]], 62*0.6, 40*0.6, "overlay", {443/512, 505/512, 306/512, 346/512})
- newIcon:SetPoint ("topleft", window.widget, "topleft", 135, -351)
+ --newIcon:SetPoint ("topleft", window.widget, "topleft", 135, -351)
local select_options = function (options_type, true_index)
@@ -1612,7 +1613,7 @@ function window:CreateFrame20()
window:CreateLineBackground2 (frame20, "TooltipTextColorPickAnchor", "TooltipTextColorAnchorLabel", Loc ["STRING_OPTIONS_TOOLTIPS_FONTCOLOR_DESC"])
-- text size
- g:NewLabel (frame20, _, "$parentTooltipTextSizeLabel", "TooltipTextSizeLabel", Loc ["STRING_OPTIONS_TOOLTIPS_FONTSIZE"], "GameFontHighlightLeft")
+ g:NewLabel (frame20, _, "$parentTooltipTextSizeLabel", "TooltipTextSizeLabel", Loc ["STRING_OPTIONS_TEXT_SIZE"], "GameFontHighlightLeft")
local s = g:NewSlider (frame20, _, "$parentTooltipTextSizeSlider", "TooltipTextSizeSlider", SLIDER_WIDTH, SLIDER_HEIGHT, 5, 32, 1, tonumber (_detalhes.tooltip.fontsize), nil, nil, nil, options_slider_template)
--config_slider (s)
@@ -1641,7 +1642,7 @@ function window:CreateFrame20()
return fonts
end
- g:NewLabel (frame20, _, "$parentTooltipFontLabel", "TooltipFontLabel", Loc ["STRING_OPTIONS_TOOLTIPS_FONTFACE"] , "GameFontHighlightLeft")
+ g:NewLabel (frame20, _, "$parentTooltipFontLabel", "TooltipFontLabel", Loc ["STRING_OPTIONS_TEXT_FONT"] , "GameFontHighlightLeft")
local d = g:NewDropDown (frame20, _, "$parentTooltipFontDropdown", "TooltipFontDropdown", DROPDOWN_WIDTH, dropdown_height, build_tooltip_menu, _detalhes.tooltip.fontface, options_dropdown_template)
frame20.TooltipFontDropdown:SetPoint ("left", frame20.TooltipFontLabel, "right", 2)
@@ -3894,7 +3895,7 @@ function window:CreateFrame14()
return fonts
end
- g:NewLabel (frame14, _, "$parentAttributeFontLabel", "attributeFontLabel", Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_FONT"], "GameFontHighlightLeft")
+ g:NewLabel (frame14, _, "$parentAttributeFontLabel", "attributeFontLabel", Loc ["STRING_OPTIONS_TEXT_FONT"], "GameFontHighlightLeft")
local d = g:NewDropDown (frame14, _, "$parentAttributeFontDropdown", "attributeFontDropdown", DROPDOWN_WIDTH, dropdown_height, build_font_menu, instance.attribute_text.text_face, options_dropdown_template)
frame14.attributeFontDropdown:SetPoint ("left", frame14.attributeFontLabel, "right", 2)
@@ -3902,7 +3903,7 @@ function window:CreateFrame14()
window:CreateLineBackground2 (frame14, "attributeFontDropdown", "attributeFontLabel", Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_FONT_DESC"])
--size
- g:NewLabel (frame14, _, "$parentAttributeTextSizeLabel", "attributeTextSizeLabel", Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_TEXTSIZE"], "GameFontHighlightLeft")
+ g:NewLabel (frame14, _, "$parentAttributeTextSizeLabel", "attributeTextSizeLabel", Loc ["STRING_OPTIONS_TEXT_SIZE"], "GameFontHighlightLeft")
local s = g:NewSlider (frame14, _, "$parentAttributeTextSizeSlider", "attributeTextSizeSlider", SLIDER_WIDTH, SLIDER_HEIGHT, 5, 32, 1, tonumber ( instance.attribute_text.text_size), nil, nil, nil, options_slider_template)
--config_slider (s)
@@ -4437,7 +4438,7 @@ function window:CreateFrame1()
_detalhes.gump:ColorPick (_G.DetailsOptionsWindow1SetWindowColorButton, r, g, b, a, windowcolor_callback)
end
- g:NewButton (frame1, _, "$parentSetWindowColorButton", "SetWindowColorButton", window.buttons_width, window.buttons_height, change_color, nil, nil, nil, "Change Color", 1, options_button_template)
+ g:NewButton (frame1, _, "$parentSetWindowColorButton", "SetWindowColorButton", window.buttons_width, window.buttons_height, change_color, nil, nil, nil, Loc ["STRING_OPTIONS_CHANGECOLOR"], 1, options_button_template)
--frame1.SetWindowColorButton:InstallCustomTexture (nil, nil, nil, nil, nil, true)
window:CreateLineBackground2 (frame1, "SetWindowColorButton", "SetWindowColorButton", "Shortcut to modify the window color.\nFor more options check out |cFFFFFF00Window Settings|r section.", nil, {1, 0.8, 0}, button_color_rgb)
@@ -6548,6 +6549,26 @@ function window:CreateFrame4()
titulo_bars_desc:SetPoint (x, window.title_y_pos2)
local left_side = {
+ --basic
+ {frame4.RowGeneralAnchorLabel, 1, true},
+
+ {frame4.rowHeightLabel, 1},
+ {frame4.BarSpacementLabel, 1},
+ {"DisableBarHighlightLabel", 1},
+
+ {"GrowLabel", 2, true},
+ {"OrientationLabel", 2},
+ {"SortLabel", 2},
+
+ --backdrop
+ {frame4.BackdropAnchorLabel, 3, true},
+ {frame4.BackdropColorLabel, 3},
+ {frame4.BackdropEnabledLabel, 3},
+ {frame4.BackdropSizeLabel, 3},
+ {frame4.BackdropBorderTextureLabel, 3},
+ }
+
+ local right_side = {
--textures
{frame4.rowUpperTextureLabel, 1, true},
{frame4.textureLabel, 2},
@@ -6566,23 +6587,6 @@ function window:CreateFrame4()
{frame4.barStartLabel, 13},
}
- local right_side = {
- --basic
- {frame4.RowGeneralAnchorLabel, 1, true},
- {"GrowLabel", 2},
- {"OrientationLabel", 3},
- {"SortLabel", 4},
- {frame4.rowHeightLabel, 5, true},
- {frame4.BarSpacementLabel, 6},
- {"DisableBarHighlightLabel", 7},
- --backdrop
- {frame4.BackdropAnchorLabel, 8, true},
- {frame4.BackdropColorLabel, 9},
- {frame4.BackdropEnabledLabel, 10},
- {frame4.BackdropSizeLabel, 11},
- {frame4.BackdropBorderTextureLabel, 12},
- }
-
window:arrange_menu (frame4, left_side, x, window.top_start_at)
window:arrange_menu (frame4, right_side, 360, window.top_start_at)
@@ -6590,7 +6594,7 @@ end
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Appearance - Texts 6
+-- Appearance - Texts ~5
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function window:CreateFrame5()
@@ -6752,9 +6756,7 @@ function window:CreateFrame5()
frame5.textLeftOutlineSmallSlider:SetAsCheckBox()
frame5.textLeftOutlineSmallSlider.OnSwitch = function (self, instance, value)
instance:SetBarTextSettings (nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, value)
- --(13, smalloutline_left, smalloutlinecolor_left, smalloutline_right, smalloutlinecolor_right)
- --14 15 16 17
-
+
if (_detalhes.options_group_edit and not DetailsOptionsWindow.loading_settings) then
for _, this_instance in ipairs (instance:GetInstanceGroup()) do
if (this_instance ~= instance) then
@@ -7205,7 +7207,6 @@ function window:CreateFrame5()
window:CreateLineBackground2 (frame5, "RightTextShowPSSlider", "RightTextShowPSLabel", Loc ["STRING_OPTIONS_TEXT_SHOW_PS_DESC"])
-- percent
-
g:NewSwitch (frame5, _, "$parentRightTextShowPercentSlider", "RightTextShowPercentSlider", 60, 20, _, _, instance.row_info.textR_show_data [3], nil, nil, nil, nil, options_switch_template)
g:NewLabel (frame5, _, "$parentRightTextShowPercentLabel", "RightTextShowPercentLabel", Loc ["STRING_OPTIONS_TEXT_SHOW_PERCENT"], "GameFontHighlightLeft")
@@ -7241,7 +7242,7 @@ function window:CreateFrame5()
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
end
-
+
local BracketTable = {
{value = "(", label = "(", onclick = onSelectBracket, icon = ""},
{value = "{", label = "{", onclick = onSelectBracket, icon = ""},
@@ -7254,7 +7255,6 @@ function window:CreateFrame5()
end
local d = g:NewDropDown (frame5, _, "$parentBracketDropdown", "BracketDropdown", 60, dropdown_height, buildBracketMenu, nil, options_dropdown_template)
-
g:NewLabel (frame5, _, "$parentBracketLabel", "BracketLabel", Loc ["STRING_OPTIONS_TEXT_SHOW_BRACKET"], "GameFontHighlightLeft")
frame5.BracketDropdown:SetPoint ("left", frame5.BracketLabel, "right", 2)
@@ -7292,15 +7292,15 @@ function window:CreateFrame5()
end
local d = g:NewDropDown (frame5, _, "$parentSeparatorDropdown", "SeparatorDropdown", 60, dropdown_height, buildSeparatorMenu, nil, options_dropdown_template)
-
+
g:NewLabel (frame5, _, "$parentSeparatorLabel", "SeparatorLabel", Loc ["STRING_OPTIONS_TEXT_SHOW_SEPARATOR"], "GameFontHighlightLeft")
frame5.SeparatorDropdown:SetPoint ("left", frame5.SeparatorLabel, "right", 2)
-
+
window:CreateLineBackground2 (frame5, "SeparatorDropdown", "SeparatorLabel", Loc ["STRING_OPTIONS_TEXT_SHOW_SEPARATOR_DESC"])
--> anchors
-
+
--general anchor
g:NewLabel (frame5, _, "$parentRowTextGeneralAnchor", "RowGeneralAnchorLabel", Loc ["STRING_OPTIONS_GENERAL_ANCHOR"], "GameFontNormal")
@@ -7315,6 +7315,12 @@ function window:CreateFrame5()
titulo_texts_desc:SetPoint (x, window.title_y_pos2)
local left_side = {
+ {"RowGeneralAnchorLabel", 7, true},
+ {frame5.fonsizeLabel, 8}, --text size
+ {frame5.fontLabel, 9},--text fontface
+ {frame5.fixedTextColorLabel, 10},
+ {frame5.percentLabel, 11, true},
+
{"LeftTextAnchorLabel", 1, true},
{"textLeftOutlineLabel", 2},
{"textLeftOutlineSmallLabel", 2},
@@ -7323,12 +7329,6 @@ function window:CreateFrame5()
{"PositionNumberLabel", 4},
{"cutomLeftTextLabel", 5, true},
{"cutomLeftTextEntryLabel", 6},
-
- {"RowGeneralAnchorLabel", 7, true},
- {frame5.fonsizeLabel, 8}, --text size
- {frame5.fontLabel, 9},--text fontface
- {frame5.fixedTextColorLabel, 10},
- {frame5.percentLabel, 11, true},
}
window:arrange_menu (frame5, left_side, x, window.top_start_at)
@@ -8606,7 +8606,7 @@ function window:CreateFrame7()
window:CreateLineBackground2 (frame7, "fontDropdown", "fontLabel", Loc ["STRING_OPTIONS_MENU_FONT_FACE_DESC"])
--> menu text size
- g:NewLabel (frame7, _, "$parentMenuTextSizeLabel", "MenuTextSizeLabel", Loc ["STRING_OPTIONS_MENU_FONT_SIZE"], "GameFontHighlightLeft")
+ g:NewLabel (frame7, _, "$parentMenuTextSizeLabel", "MenuTextSizeLabel", Loc ["STRING_OPTIONS_TEXT_SIZE"], "GameFontHighlightLeft")
local s = g:NewSlider (frame7, _, "$parentMenuTextSizeSlider", "MenuTextSizeSlider", SLIDER_WIDTH, SLIDER_HEIGHT, 5, 32, 1, _detalhes.font_sizes.menus, nil, nil, nil, options_slider_template)
frame7.MenuTextSizeSlider:SetPoint ("left", frame7.MenuTextSizeLabel, "right", 2)
@@ -11209,8 +11209,32 @@ function window:CreateFrame12()
end
--> create the frames
- if (UnitAffectingCombat ("player")) then
+ if (InCombatLockdown()) then
+ window.IsLoading = true
+
+ if (not _detalhes.LoadingOptionsPanelFrame) then
+ _detalhes.LoadingOptionsPanelFrame = CreateFrame ("frame", "LoadingOptionsPanelFrame", UIParent)
+ _detalhes.LoadingOptionsPanelFrame:SetSize (390, 75)
+ _detalhes.LoadingOptionsPanelFrame:SetPoint ("center")
+ _detalhes.LoadingOptionsPanelFrame:SetFrameStrata ("TOOLTIP")
+ _detalhes.gump:ApplyStandardBackdrop (_detalhes.LoadingOptionsPanelFrame)
+ _detalhes.LoadingOptionsPanelFrame:SetBackdropBorderColor (1, 0.8, 0.1)
+
+ _detalhes.LoadingOptionsPanelFrame.IsLoadingLabel1 = _detalhes.gump:CreateLabel (_detalhes.LoadingOptionsPanelFrame, "Details! is Safe Loading the Options Panel During Combat")
+ _detalhes.LoadingOptionsPanelFrame.IsLoadingLabel2 = _detalhes.gump:CreateLabel (_detalhes.LoadingOptionsPanelFrame, "This may take only a few seconds")
+ _detalhes.LoadingOptionsPanelFrame.IsLoadingImage1 = _detalhes.gump:CreateImage (_detalhes.LoadingOptionsPanelFrame, [[Interface\DialogFrame\UI-Dialog-Icon-AlertOther]], 32, 32)
+ _detalhes.LoadingOptionsPanelFrame.IsLoadingLabel1.align = "center"
+ _detalhes.LoadingOptionsPanelFrame.IsLoadingLabel2.align = "center"
+
+ _detalhes.LoadingOptionsPanelFrame.IsLoadingLabel1:SetPoint ("center", 16, 10)
+ _detalhes.LoadingOptionsPanelFrame.IsLoadingLabel2:SetPoint ("center", 16, -5)
+ _detalhes.LoadingOptionsPanelFrame.IsLoadingImage1:SetPoint ("left", 10, 0)
+
+ _detalhes.LoadingOptionsPanelFrame.ProgressBar = _detalhes.gump:CreateBar (_detalhes.LoadingOptionsPanelFrame, "Details Serenity", 300, 20, 0)
+ _detalhes.LoadingOptionsPanelFrame.ProgressBar:SetPoint ("center", 0, -25)
+ end
+
local panel_index = 1
local percent_string = g:NewLabel (window, nil, nil, "percent_string", "loading: 0%", "GameFontNormal", 12)
percent_string.textcolor = "white"
@@ -11232,10 +11256,14 @@ end
last_pressed = first_button
first_button.widget.text:SetPoint ("left", first_button.widget, "left", 3, -1)
first_button.textcolor = selected_textcolor
-
+
+ _detalhes.LoadingOptionsPanelFrame:Hide()
+ window.IsLoading = false
+ else
+ percent_string.text = "wait... " .. math.floor (step * panel_index) .. "%"
+ _detalhes.LoadingOptionsPanelFrame.ProgressBar.value = (step * panel_index)
end
-
- percent_string.text = "wait... " .. math.floor (step * panel_index) .. "%"
+
panel_index = panel_index + 1
end
@@ -12099,7 +12127,12 @@ end --> if not window
window:Show()
function DetailsOptionsWindow.OpenInPluginPanel()
- for i = 1, #window.options do
+ if (not window.options) then
+ --might be loading in combat
+ return
+ end
+
+ for i = 1, #window.options do
local frame = window.options [i][1]
if (frame) then
frame:EnableMouse (false)
diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua
index 0f1722c4..fb6e27cb 100644
--- a/gumps/janela_principal.lua
+++ b/gumps/janela_principal.lua
@@ -118,13 +118,27 @@ end
local menus_backdrop = {
edgeFile = [[Interface\Buttons\WHITE8X8]],
edgeSize=1,
- bgFile="Interface\\DialogFrame\\UI-DialogBox-Background-Dark",
+ --bgFile="Interface\\DialogFrame\\UI-DialogBox-Background-Dark",
+ --bgFile = [[Interface\Tooltips\UI-Tooltip-Background]],
+ bgFile = [[Interface\AddOns\Details\images\background]],
tileSize=16,
tile=true,
insets = {top=0, right=0, left=0, bottom=0}
}
+ local menus_backdropcolor = {.2, .2, .2, 0.85}
+ local menus_backdropcolor_sec = {.2, .2, .2, 0.90}
local menus_bordercolor = {0, 0, 0, .25}
+ --menus are ignoring the value set on the profile
+
+ _detalhes.menu_backdrop_config = {
+ menus_backdrop = menus_backdrop,
+ menus_backdropcolor = menus_backdropcolor,
+ menus_backdropcolor_sec = menus_backdropcolor_sec,
+ menus_bordercolor = menus_bordercolor,
+ }
+
+
function _detalhes:AtualizarScrollBar (x) --> x = quantas barras esta sendo mostrado
local cabe = self.rows_fit_in_window --> quantas barras cabem na janela
@@ -4417,7 +4431,8 @@ local fast_ps_func = function (self)
local new_dps = _math_floor (actor.total / combat_time)
local formated_dps = tok_functions [ps_type] (_, new_dps)
- row.texto_direita:SetText (row.texto_direita:GetText():gsub (dps_text, formated_dps))
+ --row.texto_direita:SetText (row.texto_direita:GetText():gsub (dps_text, formated_dps))
+ row.texto_direita:SetText (( row.texto_direita:GetText() or "" ):gsub (dps_text, formated_dps))
row.ps_text = formated_dps
end
end
@@ -5420,7 +5435,7 @@ function _detalhes:ToolbarMenuSetButtonsOptions (spacement, shadow)
return self:ToolbarMenuSetButtons()
end
--- search key: ~buttons
+-- search key: ~buttons ~icons
local tbuttons = {}
function _detalhes:ToolbarMenuSetButtons (_mode, _segment, _attributes, _report, _reset, _close)
@@ -5470,10 +5485,11 @@ function _detalhes:ToolbarMenuSetButtons (_mode, _segment, _attributes, _report,
local space = self.menu_icons.space
local shadow = self.menu_icons.shadow
+ local toolbar_icon_file = self.toolbar_icon_file
+
local total_buttons_shown = 0
--> normal buttons
-
if (self.menu_anchor.side == 1) then
for index, button in _ipairs (tbuttons) do
if (self.menu_icons [index]) then
@@ -5492,15 +5508,9 @@ function _detalhes:ToolbarMenuSetButtons (_mode, _segment, _attributes, _report,
button:SetSize (16*size, 16*size)
- if (shadow) then
- button:SetNormalTexture ([[Interface\AddOns\Details\images\toolbar_icons_shadow]])
- button:SetHighlightTexture ([[Interface\AddOns\Details\images\toolbar_icons_shadow]])
- button:SetPushedTexture ([[Interface\AddOns\Details\images\toolbar_icons_shadow]])
- else
- button:SetNormalTexture ([[Interface\AddOns\Details\images\toolbar_icons]])
- button:SetHighlightTexture ([[Interface\AddOns\Details\images\toolbar_icons]])
- button:SetPushedTexture ([[Interface\AddOns\Details\images\toolbar_icons]])
- end
+ button:SetNormalTexture (toolbar_icon_file)
+ button:SetHighlightTexture (toolbar_icon_file)
+ button:SetPushedTexture (toolbar_icon_file)
total_buttons_shown = total_buttons_shown + 1
else
@@ -5525,18 +5535,12 @@ function _detalhes:ToolbarMenuSetButtons (_mode, _segment, _attributes, _report,
button:SetParent (self.baseframe)
button:SetFrameLevel (self.baseframe.UPFrame:GetFrameLevel()+1)
button:Show()
-
+
button:SetSize (16*size, 16*size)
- if (shadow) then
- button:SetNormalTexture ([[Interface\AddOns\Details\images\toolbar_icons_shadow]])
- button:SetHighlightTexture ([[Interface\AddOns\Details\images\toolbar_icons_shadow]])
- button:SetPushedTexture ([[Interface\AddOns\Details\images\toolbar_icons_shadow]])
- else
- button:SetNormalTexture ([[Interface\AddOns\Details\images\toolbar_icons]])
- button:SetHighlightTexture ([[Interface\AddOns\Details\images\toolbar_icons]])
- button:SetPushedTexture ([[Interface\AddOns\Details\images\toolbar_icons]])
- end
+ button:SetNormalTexture (toolbar_icon_file)
+ button:SetHighlightTexture (toolbar_icon_file)
+ button:SetPushedTexture (toolbar_icon_file)
total_buttons_shown = total_buttons_shown + 1
else
@@ -5546,28 +5550,97 @@ function _detalhes:ToolbarMenuSetButtons (_mode, _segment, _attributes, _report,
end
--> plugins buttons
+
+ local pluginFirstIcon = true
+ if (not self.baseframe.cabecalho.PluginIconsSeparator) then
+ self.baseframe.cabecalho.PluginIconsSeparator = self.baseframe:CreateTexture (nil, "overlay")
+ self.baseframe.cabecalho.PluginIconsSeparator:SetTexture ([[Interface\FriendsFrame\StatusIcon-Offline]])
+
+ local color = 0
+ self.baseframe.cabecalho.PluginIconsSeparator:SetVertexColor (color, color, color)
+ self.baseframe.cabecalho.PluginIconsSeparator:SetAlpha (0.2)
+
+ local scale = 0.4
+ self.baseframe.cabecalho.PluginIconsSeparator:SetSize (16 * scale, 16 * scale)
+ end
+
+ self.baseframe.cabecalho.PluginIconsSeparator:Hide()
+
if (self:IsLowerInstance()) then
if (#_detalhes.ToolBar.Shown > 0) then
local last_plugin_icon
+ if (#_detalhes.ToolBar.Shown > 0) then
+ self.baseframe.cabecalho.PluginIconsSeparator:Show()
+ self.baseframe.cabecalho.PluginIconsSeparator:ClearAllPoints()
+ self.baseframe.cabecalho.PluginIconsSeparator.widget = self.baseframe.cabecalho.PluginIconsSeparator
+ end
+
for index, button in ipairs (_detalhes.ToolBar.Shown) do
button:ClearAllPoints()
if (got_anchor) then
+ if (pluginFirstIcon) then
+ -- space = space + 6 --was adding an extra padding between plugin icons
+ end
+
if (self.plugins_grow_direction == 2) then --right
if (self.menu_anchor.side == 1) then --left
- button:SetPoint ("left", self.lastIcon.widget or self.lastIcon, "right", space, 0)
+
+ local temp_space = space
+
+ if (pluginFirstIcon) then
+ temp_space = temp_space / 3
+ self.baseframe.cabecalho.PluginIconsSeparator:SetPoint ("left", last_plugin_icon or self.lastIcon.widget or self.lastIcon, "right", temp_space, 0)
+ self.lastIcon = self.baseframe.cabecalho.PluginIconsSeparator
+ end
+
+ button:SetPoint ("left", self.lastIcon.widget or self.lastIcon, "right", temp_space, 0)
+
elseif (self.menu_anchor.side == 2) then --right
- button:SetPoint ("left", last_plugin_icon or self.firstIcon.widget or self.firstIcon, "right", space, 0)
+
+ local temp_space = space
+
+ if (pluginFirstIcon) then
+ temp_space = temp_space / 3
+ self.baseframe.cabecalho.PluginIconsSeparator:SetPoint ("left", last_plugin_icon or self.firstIcon.widget or self.firstIcon, "right", temp_space, 0)
+ self.lastIcon = self.baseframe.cabecalho.PluginIconsSeparator
+ end
+
+ button:SetPoint ("left", last_plugin_icon or self.lastIcon.widget or self.firstIcon, "right", temp_space, 0)
+
end
+
elseif (self.plugins_grow_direction == 1) then --left
if (self.menu_anchor.side == 1) then --left
- button:SetPoint ("right", last_plugin_icon or self.firstIcon.widget or self.firstIcon, "left", -space, 0)
+
+ local temp_space = space
+
+ if (pluginFirstIcon) then
+ temp_space = temp_space / 3
+ self.baseframe.cabecalho.PluginIconsSeparator:SetPoint ("right", last_plugin_icon or self.firstIcon.widget or self.firstIcon, "left", -temp_space, 0)
+ self.lastIcon = self.baseframe.cabecalho.PluginIconsSeparator
+ end
+
+ button:SetPoint ("right", last_plugin_icon or self.lastIcon.widget or self.firstIcon, "left", -temp_space, 0)
+
elseif (self.menu_anchor.side == 2) then --right
- button:SetPoint ("right", self.lastIcon.widget or self.lastIcon, "left", -space, 0)
+
+ local temp_space = space
+
+ if (pluginFirstIcon) then
+ temp_space = temp_space / 3
+ self.baseframe.cabecalho.PluginIconsSeparator:SetPoint ("right", last_plugin_icon or self.lastIcon.widget or self.lastIcon, "left", -temp_space, 0)
+ self.lastIcon = self.baseframe.cabecalho.PluginIconsSeparator
+
+ end
+
+ button:SetPoint ("right", last_plugin_icon or self.lastIcon.widget or self.firstIcon, "left", -temp_space, 0)
end
end
+
+ pluginFirstIcon = false
else
button:SetPoint (point1, anchor_frame, point2)
self.firstIcon = button
@@ -5641,6 +5714,16 @@ function _detalhes:SetTooltipMinWidth()
GameCooltip:SetOption ("MinWidth", 155)
end
+function _detalhes:FormatCooltipBackdrop()
+
+ local CoolTip = GameCooltip
+
+ CoolTip:SetBackdrop (1, menus_backdrop, menus_backdropcolor, menus_bordercolor)
+ CoolTip:SetBackdrop (2, menus_backdrop, menus_backdropcolor_sec, menus_bordercolor)
+ --CoolTip:SetWallpaper (1, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
+
+end
+
local build_mode_list = function (self, elapsed)
local CoolTip = GameCooltip
@@ -5697,7 +5780,7 @@ local build_mode_list = function (self, elapsed)
end
end
- CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
+ --CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
end
CoolTip:AddLine (Loc ["STRING_MODE_SELF"])
@@ -5713,7 +5796,7 @@ local build_mode_list = function (self, elapsed)
CoolTip:AddMenu (2, _detalhes.SoloTables.EnableSoloMode, instancia, ptable [4], true, ptable [1], ptable [2], true)
end
end
- CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
+ --CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
end
--> window control
@@ -5817,7 +5900,7 @@ local build_mode_list = function (self, elapsed)
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, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
+ --CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
--> space
GameCooltip:AddLine ("$div")
@@ -5842,9 +5925,9 @@ local build_mode_list = function (self, elapsed)
--> finishes the menu
_detalhes:SetMenuOwner (self, instancia)
- CoolTip:SetBackdrop (1, menus_backdrop, nil, menus_bordercolor)
- CoolTip:SetBackdrop (2, menus_backdrop, nil, menus_bordercolor)
- CoolTip:SetWallpaper (1, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
+
+ --apply the backdrop settings to the menu
+ _detalhes:FormatCooltipBackdrop()
show_anti_overlap (instancia, self, "top")
@@ -5852,6 +5935,8 @@ local build_mode_list = function (self, elapsed)
end
end
+
+
function _detalhes:SetMenuOwner (self, instance)
local _, y = instance.baseframe:GetCenter()
@@ -6219,12 +6304,12 @@ local build_segment_list = function (self, elapsed)
end
end
else
- CoolTip:SetWallpaper (2, [[Interface\BlackMarket\HotItemBanner]], unknown_boss_tex, unknown_boss_color, true)
+ --CoolTip:SetWallpaper (2, [[Interface\BlackMarket\HotItemBanner]], unknown_boss_tex, unknown_boss_color, true)
end
end
else
--> wallpaper = main window
- CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
+ --CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
end
elseif (thisCombat.is_pvp) then
@@ -6239,7 +6324,7 @@ local build_segment_list = function (self, elapsed)
end
else
--> wallpaper = main window
- CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
+ --CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
end
elseif (thisCombat.is_arena) then
@@ -6254,7 +6339,7 @@ local build_segment_list = function (self, elapsed)
end
else
--> wallpaper = main window
- CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
+ --CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
end
else
enemy = thisCombat.enemy
@@ -6274,7 +6359,7 @@ local build_segment_list = function (self, elapsed)
CoolTip:SetWallpaper (2, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-StatsBackground]], segments_common_tex, segments_common_color, true)
else
--> wallpaper = main window
- CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
+ --CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
end
end
@@ -6298,7 +6383,7 @@ local build_segment_list = function (self, elapsed)
CoolTip:AddIcon ([[Interface\QUESTFRAME\UI-Quest-BulletPoint]], "main", "left", 16, 16, nil, nil, nil, nil, empty_segment_color)
CoolTip:AddLine (Loc ["STRING_SEGMENT_EMPTY"], _, 2)
CoolTip:AddIcon ([[Interface\CHARACTERFRAME\Disconnect-Icon]], 2, 1, 12, 12, 0.3125, 0.65625, 0.265625, 0.671875)
- CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
+ --CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
end
if (menuIndex) then
@@ -6473,7 +6558,7 @@ local build_segment_list = function (self, elapsed)
end
else
--> wallpaper = main window
- CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
+ --CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
end
elseif (_detalhes.tabela_vigente.is_pvp) then
@@ -6487,7 +6572,7 @@ local build_segment_list = function (self, elapsed)
CoolTip:SetWallpaper (2, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-StatsBackground]], segments_common_tex, {1, 1, 1, 0.5}, true)
else
--> wallpaper = main window
- CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
+ --CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
end
end
@@ -6497,7 +6582,7 @@ local build_segment_list = function (self, elapsed)
end
else
--> wallpaper = main window
- CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
+ --CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
end
if (not segment_info_added) then
@@ -6520,7 +6605,7 @@ local build_segment_list = function (self, elapsed)
CoolTip:AddLine (Loc ["STRING_SEGMENT_START"] .. ":", _detalhes.tabela_vigente.data_inicio, 2, "white", "white")
CoolTip:AddLine (Loc ["STRING_SEGMENT_END"] .. ":", _detalhes.tabela_vigente.data_fim or "in progress", 2, "white", "white")
end
-
+
--> fill é a quantidade de menu que esta sendo mostrada
if (instancia.segmento == 0) then
if (fill - 2 == menuIndex) then
@@ -6539,17 +6624,17 @@ local build_segment_list = function (self, elapsed)
CoolTip:AddLine (Loc ["STRING_SEGMENT_OVERALL"], _, 1, "white")
CoolTip:AddMenu (1, instancia.TrocaTabela, -1)
CoolTip:AddIcon ([[Interface\QUESTFRAME\UI-Quest-BulletPoint]], "main", "left", 16, 16, nil, nil, nil, nil, "orange")
-
+
local enemy_name = _detalhes.tabela_overall.overall_enemy_name
-
+
CoolTip:AddLine (Loc ["STRING_SEGMENT_ENEMY"] .. ":", enemy_name, 2, "white", "white")
local combat_time = _detalhes.tabela_overall:GetCombatTime()
local minutos, segundos = _math_floor (combat_time / 60), _math_floor (combat_time % 60)
CoolTip:AddLine (Loc ["STRING_SEGMENTS_LIST_COMBATTIME"] .. ":", minutos.."m "..segundos.."s", 2, "white", "white")
-
- CoolTip:SetWallpaper (2, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-StatsComparisonBackground]], {0.085, 166/256, 0, 1}, {.42, .4, .4, 0.9}, true)
+
+ --CoolTip:SetWallpaper (2, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-StatsComparisonBackground]], {0.085, 166/256, 0, 1}, {.42, .4, .4, 0.9}, true)
if (_detalhes.tooltip.submenu_wallpaper) then
--CoolTip:SetWallpaper (2, [[Interface\PetPaperDollFrame\PetStatsBG-Hunter]], {321/512, 0, 0, 190/512}, {1, 1, 1, 0.9}, true)
@@ -6621,19 +6706,21 @@ local build_segment_list = function (self, elapsed)
CoolTip:SetOption ("ButtonHeightMod", -4)
CoolTip:SetOption ("ButtonsYMod", -10)
- CoolTip:SetOption ("YSpacingMod", 4)
+ CoolTip:SetOption ("YSpacingMod", 1)
CoolTip:SetOption ("ButtonHeightModSub", 4)
CoolTip:SetOption ("ButtonsYModSub", 0)
CoolTip:SetOption ("YSpacingModSub", -4)
CoolTip:SetOption ("HeighMod", 12)
+
_detalhes:SetTooltipMinWidth()
- CoolTip:SetWallpaper (1, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
-
- CoolTip:SetBackdrop (1, menus_backdrop, nil, menus_bordercolor)
- CoolTip:SetBackdrop (2, menus_backdrop, nil, menus_bordercolor)
+ --CoolTip:SetWallpaper (1, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
+ --CoolTip:SetBackdrop (1, menus_backdrop, nil, menus_bordercolor)
+ --CoolTip:SetBackdrop (2, menus_backdrop, nil, menus_bordercolor)
+
+ _detalhes:FormatCooltipBackdrop()
show_anti_overlap (instancia, self, "top")
@@ -6795,6 +6882,29 @@ function _detalhes:ChangeSkin (skin_name)
self.break_snap_button:SetHighlightTexture (skin_file, "ADD")
self.break_snap_button:SetPushedTexture (skin_file)
+ --> update toolbar icons
+ do
+ local toolbar_icon_file = self.toolbar_icon_file
+ if (not toolbar_icon_file) then
+ toolbar_icon_file = [[Interface\AddOns\Details\images\toolbar_icons]]
+ end
+
+ local toolbar_buttons = {}
+ toolbar_buttons [1] = self.baseframe.cabecalho.modo_selecao
+ toolbar_buttons [2] = self.baseframe.cabecalho.segmento
+ toolbar_buttons [3] = self.baseframe.cabecalho.atributo
+ toolbar_buttons [4] = self.baseframe.cabecalho.report
+ toolbar_buttons [5] = self.baseframe.cabecalho.reset
+ toolbar_buttons [6] = self.baseframe.cabecalho.fechar
+
+ for i = 1, #toolbar_buttons do
+ local button = toolbar_buttons [i]
+ button:SetNormalTexture (toolbar_icon_file)
+ button:SetHighlightTexture (toolbar_icon_file)
+ button:SetPushedTexture (toolbar_icon_file)
+ end
+ end
+
----------> icon anchor and size
if (self.modo == 1 or self.modo == 4 or self.atributo == 5) then -- alone e raid
@@ -6884,7 +6994,6 @@ function _detalhes:ChangeSkin (skin_name)
self:SetBackdropTexture()
--> refresh all bars
-
self:InstanceRefreshRows()
--> update menu saturation
@@ -6909,7 +7018,7 @@ function _detalhes:ChangeSkin (skin_name)
_detalhes.ToolBar:ReorganizeIcons (true) --call self:SetMenuAlpha()
--> refresh options panel if opened
- if (_G.DetailsOptionsWindow and _G.DetailsOptionsWindow:IsShown()) then
+ if (_G.DetailsOptionsWindow and _G.DetailsOptionsWindow:IsShown() and not _G.DetailsOptionsWindow.IsLoading) then
_detalhes:OpenOptionsWindow (self)
end
@@ -8186,14 +8295,13 @@ end
GameCooltip:Reset()
GameCooltip:SetType ("menu")
- GameCooltip:SetOption ("ButtonsYMod", -2)
+
+ GameCooltip:SetOption ("ButtonsYMod", -6)
+ GameCooltip:SetOption ("HeighMod", 6)
GameCooltip:SetOption ("YSpacingMod", -3)
GameCooltip:SetOption ("TextHeightMod", 0)
GameCooltip:SetOption ("IgnoreButtonAutoHeight", false)
- GameCooltip:SetOption ("ButtonsYMod", -3)
- GameCooltip:SetOption ("HeighMod", 3)
-
_detalhes:SetTooltipMinWidth()
GameCooltip:AddLine (Loc ["STRING_ERASE_DATA_OVERALL"], nil, 1, "white", nil, _detalhes.font_sizes.menus, _detalhes.font_faces.menus)
@@ -8206,8 +8314,10 @@ end
GameCooltip:AddIcon ([[Interface\Buttons\UI-StopButton]], 1, 1, 14, 14, 0, 1, 0, 1, "red")
GameCooltip:AddMenu (1, _detalhes.tabela_historico.resetar)
- GameCooltip:SetWallpaper (1, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
- GameCooltip:SetBackdrop (1, menus_backdrop, nil, menus_bordercolor)
+ _detalhes:FormatCooltipBackdrop()
+
+ --GameCooltip:SetWallpaper (1, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
+ --GameCooltip:SetBackdrop (1, menus_backdrop, nil, menus_bordercolor)
show_anti_overlap (self.instance, self, "top")
@@ -8380,21 +8490,22 @@ local report_on_enter = function (self, motion, forced, from_click)
GameCooltip:Reset()
GameCooltip:SetType ("menu")
- GameCooltip:SetOption ("ButtonsYMod", -3)
- GameCooltip:SetOption ("YSpacingMod", 0)
+ GameCooltip:SetOption ("ButtonsYMod", -6)
+ GameCooltip:SetOption ("HeighMod", 6)
+ GameCooltip:SetOption ("YSpacingMod", -1)
GameCooltip:SetOption ("TextHeightMod", 0)
GameCooltip:SetOption ("IgnoreButtonAutoHeight", false)
-
- GameCooltip:SetOption ("ButtonsYMod", -3)
- GameCooltip:SetOption ("HeighMod", 3)
-
+
_detalhes:SetTooltipMinWidth()
_detalhes:CheckLastReportsIntegrity()
local last_reports = _detalhes.latest_report_table
if (#last_reports > 0) then
- for index = #last_reports, 1, -1 do
+ local amountReports = #last_reports
+ amountReports = math.min (amountReports, 10)
+
+ for index = amountReports, 1, -1 do
local report = last_reports [index]
local instance_number, attribute, subattribute, amt, report_where, custom_name = unpack (report)
@@ -8416,8 +8527,10 @@ local report_on_enter = function (self, motion, forced, from_click)
GameCooltip:AddIcon ([[Interface\Addons\Details\Images\report_button]], 1, 1, 12, 19)
GameCooltip:AddMenu (1, _detalhes.Reportar, instancia, nil, "INSTANCE" .. instancia.meu_id)
- GameCooltip:SetWallpaper (1, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
- GameCooltip:SetBackdrop (1, menus_backdrop, nil, menus_bordercolor)
+ _detalhes:FormatCooltipBackdrop()
+
+ --GameCooltip:SetWallpaper (1, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
+ --GameCooltip:SetBackdrop (1, menus_backdrop, nil, menus_bordercolor)
show_anti_overlap (instancia, self, "top")
_detalhes:SetMenuOwner (self, instancia)
@@ -8476,26 +8589,34 @@ local atributo_on_enter = function (self, motion, forced, from_click)
if (_detalhes.solo and _detalhes.solo == instancia.meu_id) then
_detalhes:MontaSoloOption (instancia)
+
elseif (instancia:IsRaidMode()) then
+
local have_plugins = _detalhes:MontaRaidOption (instancia)
if (not have_plugins) then
GameCooltip:SetType ("tooltip")
GameCooltip:SetOption ("ButtonsYMod", 0)
- GameCooltip:SetOption ("YSpacingMod", 0)
+
GameCooltip:SetOption ("TextHeightMod", 0)
GameCooltip:SetOption ("IgnoreButtonAutoHeight", false)
GameCooltip:AddLine ("All raid plugins already\nin use or disabled.", nil, 1, "white", nil, 10, SharedMedia:Fetch ("font", "Friz Quadrata TT"))
GameCooltip:AddIcon ([[Interface\GROUPFRAME\UI-GROUP-ASSISTANTICON]], 1, 1)
GameCooltip:SetWallpaper (1, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
+
end
+
else
_detalhes:MontaAtributosOption (instancia)
+ GameCooltip:SetOption ("YSpacingMod", -1)
+ GameCooltip:SetOption ("YSpacingModSub", -2)
end
- GameCooltip:SetBackdrop (1, menus_backdrop, nil, menus_bordercolor)
- GameCooltip:SetBackdrop (2, menus_backdrop, nil, menus_bordercolor)
+ --GameCooltip:SetBackdrop (1, menus_backdrop, nil, menus_bordercolor)
+ --GameCooltip:SetBackdrop (2, menus_backdrop, nil, menus_bordercolor)
GameCooltip:SetOption ("TextSize", _detalhes.font_sizes.menus)
+ _detalhes:FormatCooltipBackdrop()
+
_detalhes:SetMenuOwner (self, instancia)
if (instancia.toolbar_side == 2) then --bottom
GameCooltip:SetOption ("HeightAnchorMod", 0)
@@ -8509,7 +8630,7 @@ local atributo_on_leave = function (self, motion, forced, from_click)
local baseframe = instancia.baseframe
OnLeaveMainWindow (instancia, self, 3)
-
+
hide_anti_overlap (instancia.baseframe.anti_menu_overlap)
if (instancia.desaturated_menu) then
@@ -8645,6 +8766,9 @@ local modo_selecao_on_leave = function (self)
end
end
+
+
+-- these can
local title_bar_icons = {
{texture = [[Interface\AddOns\Details\images\toolbar_icons]], texcoord = {0/256, 32/256, 0, 1}},
{texture = [[Interface\AddOns\Details\images\toolbar_icons]], texcoord = {32/256, 64/256, 0, 1}},
@@ -8652,7 +8776,15 @@ local title_bar_icons = {
{texture = [[Interface\AddOns\Details\images\toolbar_icons]], texcoord = {96/256, 128/256, 0, 1}},
{texture = [[Interface\AddOns\Details\images\toolbar_icons]], texcoord = {128/256, 160/256, 0, 1}},
}
-function _detalhes:GetTitleBarIconsTexture (button)
+function _detalhes:GetTitleBarIconsTexture (button, instance)
+ if (instance or self.meu_id) then
+ local textureFile = self.toolbar_icon_file or instance.toolbar_icon_file
+ local t = title_bar_icons [button]
+ if (t and textureFile) then
+ t.texture = textureFile
+ end
+ return t or title_bar_icons
+ end
return title_bar_icons [button] or title_bar_icons
end
diff --git a/gumps/janela_report.lua b/gumps/janela_report.lua
index 509bdf61..1e089c87 100644
--- a/gumps/janela_report.lua
+++ b/gumps/janela_report.lua
@@ -57,7 +57,6 @@ local _UIParent = UIParent --> wow api locals
local t = _detalhes.latest_report_table [index]
if (t) then
-
if (not DetailsReportWindow) then
gump:CriaJanelaReport()
DetailsReportWindow:Hide()
@@ -75,12 +74,6 @@ local _UIParent = UIParent --> wow api locals
instance:SetDisplay (nil, cattribute, csubattribute)
- if (index > 5) then
- local t = _detalhes.latest_report_table [index]
- tremove (_detalhes.latest_report_table, index)
- tinsert (_detalhes.latest_report_table, 1, t)
- end
-
GameCooltip:Hide()
end
end
@@ -965,7 +958,7 @@ local function cria_drop_down (este_gump)
local last_reports = _detalhes.latest_report_table
if (#last_reports > 0) then
local i = 1
- for index = 1, min (#last_reports, 10) do
+ for index = 1, min (#last_reports, 8) do
local b = window.recently_report_buttons [i]
local report = last_reports [index]
local instance_number, attribute, subattribute, amt, report_where = unpack (report)
diff --git a/gumps/janela_welcome.lua b/gumps/janela_welcome.lua
index 8c045e05..773a8033 100644
--- a/gumps/janela_welcome.lua
+++ b/gumps/janela_welcome.lua
@@ -22,8 +22,8 @@ function _detalhes:OpenWelcomeWindow ()
window = _detalhes:CreateWelcomePanel ("DetailsWelcomeWindow", UIParent)
window:SetPoint ("center", UIParent, "center", -200, 0)
window:SetBackdropColor (0, 0, 0, 0.75)
- window:SetWidth (512)
- window:SetHeight (265)
+ window:SetWidth (612)
+ window:SetHeight (315)
window:SetMovable (true)
window:SetScript ("OnMouseDown", function() window:StartMoving() end)
window:SetScript ("OnMouseUp", function() window:StopMovingOrSizing() end)
@@ -31,11 +31,6 @@ function _detalhes:OpenWelcomeWindow ()
_detalhes.tabela_historico:resetar()
end)
- local background = window:CreateTexture (nil, "background")
- background:SetPoint ("topleft", window, "topleft")
- background:SetPoint ("bottomright", window, "bottomright")
- --background:SetTexture ([[Interface\AddOns\Details\images\welcome]])
-
local rodape_bg = window:CreateTexture (nil, "artwork")
rodape_bg:SetPoint ("bottomleft", window, "bottomleft", 11, 12)
rodape_bg:SetPoint ("bottomright", window, "bottomright", -11, 12)
@@ -59,6 +54,9 @@ function _detalhes:OpenWelcomeWindow ()
cancel:SetHighlightTexture ([[Interface\Buttons\UI-GROUPLOOT-PASS-HIGHLIGHT]])
cancel:SetNormalTexture ([[Interface\Buttons\UI-GroupLoot-Pass-Up]])
cancel:SetScript ("OnClick", function() window:Hide() end)
+ cancel:GetNormalTexture():SetDesaturated (true)
+ cancel:Disable()
+
local cancelText = cancel:CreateFontString (nil, "overlay", "GameFontNormal")
cancelText:SetTextColor (1, 1, 1)
cancelText:SetPoint ("left", cancel, "right", 2, 0)
@@ -125,8 +123,9 @@ function _detalhes:OpenWelcomeWindow ()
local instance = _detalhes.tabela_instancias [1]
instance.baseframe:ClearAllPoints()
instance.baseframe:SetPoint ("left", DetailsWelcomeWindow, "right", 10, 0)
+ DetailsWelcomeWindow.SetLocTimer = nil
end
- _detalhes:ScheduleTimer ("WelcomeSetLoc", 12)
+ DetailsWelcomeWindow.SetLocTimer = _detalhes:ScheduleTimer ("WelcomeSetLoc", 12)
--/script local f=CreateFrame("frame");local g=false;f:SetScript("OnUpdate",function(s,e)if not g then local r=math.random for i=1,2500000 do local a=r(1,1000000);a=a+1 end g=true else print(string.format("cpu: %.3f",e));f:SetScript("OnUpdate",nil)end end)
@@ -165,6 +164,7 @@ function _detalhes:OpenWelcomeWindow ()
--> overriting the results
_detalhes.update_speed = 0.3
+ _detalhes.use_row_animations = true
DetailsWelcomeWindowSliderUpdateSpeed.MyObject:SetValue (_detalhes.update_speed)
DetailsWelcomeWindowAnimateSlider.MyObject:SetValue (_detalhes.use_row_animations)
@@ -174,9 +174,11 @@ function _detalhes:OpenWelcomeWindow ()
end)
end
- _detalhes:ScheduleTimer ("CalcCpuPower", 10)
+ --deprecated
+ --_detalhes:ScheduleTimer ("CalcCpuPower", 10)
--detect ElvUI
+ --[=[ --deprecated
local ElvUI = _G.ElvUI
if (ElvUI) then
--active elvui skin
@@ -201,8 +203,9 @@ function _detalhes:OpenWelcomeWindow ()
_detalhes.standard_skin = savedObject
_detalhes:ApplyPDWSkin ("ElvUI")
- _detalhes:SetTooltipBackdrop ("Details BarBorder 3", 14, {0, 0, 0, 1})
+ --_detalhes:SetTooltipBackdrop ("Details BarBorder 3", 14, {0, 0, 0, 1})
end
+ --]=]
-- frame alert
@@ -233,394 +236,16 @@ local window_openned_at = time()
angel:SetAlpha (.2)
local texto1 = window:CreateFontString (nil, "overlay", "GameFontNormal")
- texto1:SetPoint ("topleft", window, "topleft", 13, -150)
+ texto1:SetPoint ("topleft", window, "topleft", 13, -220)
texto1:SetText (Loc ["STRING_WELCOME_1"])
texto1:SetJustifyH ("left")
pages [#pages+1] = {texto1, angel}
-
+
+
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---> Avatar and Nickname Page
---[=[
- local bg555 = window:CreateTexture (nil, "overlay")
- bg555:SetTexture ([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]])
- bg555:SetPoint ("bottomright", window, "bottomright", -10, 10)
- bg555:SetHeight (125*3)--125
- bg555:SetWidth (89*3)--82
- bg555:SetAlpha (.05)
- bg555:SetTexCoord (1, 0, 0, 1)
-
- local avatar_image = window:CreateTexture (nil, "overlay")
- avatar_image:SetTexture ([[Interface\EncounterJournal\UI-EJ-BOSS-Default]])
- avatar_image:SetPoint ("topright", window, "topright", -5, -21)
- avatar_image:SetWidth (128*1.2)
- avatar_image:SetHeight (64*1.2)
-
- local avatar_bg = g:NewImage (window, nil, 275, 60, nil, nil, "avatarPreview2", "$parentAvatarPreviewTexture2")
- avatar_bg:SetTexture ([[Interface\PetBattles\Weather-StaticField]])
- avatar_bg:SetPoint ("topright", window, "topright", -5, -36)
- avatar_bg:SetTexCoord (0, 1, 1, 0)
- avatar_bg:SetSize (360, 60)
- avatar_bg:SetVertexColor (.5, .5, .5, .5)
-
- local nickname = g:NewLabel (window, _, "$parentAvatarNicknameLabel", "avatarNickname", UnitName ("player"), "GameFontHighlightSmall")
- nickname:SetPoint ("center", avatar_bg, "center", 0, -15)
- _detalhes:SetFontSize (nickname.widget, 18)
-
- avatar_bg:SetDrawLayer ("overlay", 2)
- avatar_image:SetDrawLayer ("overlay", 3)
- nickname:SetDrawLayer ("overlay", 3)
-
- local onPressEnter = function (_, _, text)
- local accepted, errortext = _detalhes:SetNickname (text)
- if (not accepted) then
- _detalhes:Msg (errortext)
- end
- --> we call again here, because if not accepted the box return the previous value and if successful accepted, update the value for formated string.
- local nick = _detalhes:GetNickname (UnitGUID ("player"), UnitName ("player"), true)
- window.nicknameEntry.text = nick
- nickname:SetText (nick)
- nickname:SetPoint ("center", avatar_bg, "center", 0, -15)
- end
-
- local nicknamelabel = g:NewLabel (window, nil, "$parentNickNameLabel", "nicknameLabel", Loc ["STRING_OPTIONS_NICKNAME"] .. ":", "GameFontNormal")
- local nicknamebox = g:NewTextEntry (window, nil, "$parentNicknameEntry", "nicknameEntry", 140, 20, onPressEnter)
- nicknamebox:HighlightText()
-
- nicknamebox:SetPoint ("left", nicknamelabel, "right", 2, 0)
- nicknamelabel:SetPoint ("topleft", window, "topleft", 30, -160)
-
- function _detalhes:UpdateNicknameOnWelcomeWindow()
- nicknamebox:SetText (select (1, UnitName ("player")))
- end
- _detalhes:ScheduleTimer ("UpdateNicknameOnWelcomeWindow", 2)
-
- --
-
- local avatarcallback = function (textureAvatar, textureAvatarTexCoord, textureBackground, textureBackgroundTexCoord, textureBackgroundColor)
- _detalhes:SetNicknameBackground (textureBackground, textureBackgroundTexCoord, textureBackgroundColor, true)
- _detalhes:SetNicknameAvatar (textureAvatar, textureAvatarTexCoord)
-
- avatar_image:SetTexture (textureAvatar)
- avatar_image:SetTexCoord (1, 0, 0, 1)
-
- avatar_bg.texture = textureBackground
- local r, l, t, b = unpack (textureBackgroundTexCoord)
- avatar_bg:SetTexCoord (l, r, t, b)
- local r, g, b = unpack (textureBackgroundColor)
- avatar_bg:SetVertexColor (r, g, b, 1)
-
- _G.AvatarPickFrame.callback = nil
- end
-
- local openAtavarPickFrame = function()
- _G.AvatarPickFrame.callback = avatarcallback
- _G.AvatarPickFrame:Show()
- end
-
- local avatarbutton = g:NewButton (window, _, "$parentAvatarFrame", "chooseAvatarButton", 160, 18, openAtavarPickFrame, nil, nil, nil, "Pick Avatar", 1)
- avatarbutton:InstallCustomTexture()
- avatarbutton:SetPoint ("left", nicknamebox, "right", 10, 0)
- --
-
- local bg_avatar = window:CreateTexture (nil, "overlay")
- bg_avatar:SetPoint ("bottomright", window, "bottomright", -10, 10)
- bg_avatar:SetHeight (125*3)--125
- bg_avatar:SetWidth (89*3)--82
- bg_avatar:SetAlpha (.1)
- bg_avatar:SetTexCoord (1, 0, 0, 1)
-
- local texto_avatar1 = window:CreateFontString (nil, "overlay", "GameFontNormal")
- texto_avatar1:SetPoint ("topleft", window, "topleft", 20, -80)
- texto_avatar1:SetText (Loc ["STRING_WELCOME_60"])
-
- local texto_avatar2 = window:CreateFontString (nil, "overlay", "GameFontNormal")
- texto_avatar2:SetPoint ("topleft", window, "topleft", 30, -190)
- texto_avatar2:SetText (Loc ["STRING_WELCOME_61"])
- texto_avatar2:SetTextColor (1, 1, 1, 1)
-
- local changemind = g:NewLabel (window, _, "$parentChangeMindAvatarLabel", "ChangeMindAvatarLabel", Loc ["STRING_WELCOME_2"], "GameFontNormal", 9, "orange")
- changemind:SetPoint ("center", window, "center")
- changemind:SetPoint ("bottom", window, "bottom", 0, 19)
- changemind.align = "|"
-
- local texto_avatar3 = window:CreateFontString (nil, "overlay", "GameFontNormal")
- texto_avatar3:SetPoint ("topleft", window, "topleft", 30, -110)
- texto_avatar3:SetText (Loc ["STRING_WELCOME_62"])
- texto_avatar3:SetWidth (460)
- texto_avatar3:SetHeight (100)
- texto_avatar3:SetJustifyH ("left")
- texto_avatar3:SetJustifyV ("top")
- texto_avatar3:SetTextColor (1, 1, 1, 1)
-
- local pleasewait = window:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
- pleasewait:SetPoint ("bottomright", forward, "topright")
-
- local free_frame3 = CreateFrame ("frame", nil, window)
- function _detalhes:FreeTutorialFrame3()
- if (window_openned_at+10 > time()) then
- pleasewait:Show()
- forward:Disable()
- pleasewait:SetText ("wait... " .. window_openned_at + 10 - time())
- else
- pleasewait:Hide()
- pleasewait:SetText ("")
- forward:Enable()
- _detalhes:CancelTimer (window.free_frame3_schedule)
- window.free_frame3_schedule = nil
- end
- end
- free_frame3:SetScript ("OnShow", function()
- if (window_openned_at+10 > time()) then
- forward:Disable()
- if (window.free_frame3_schedule) then
- _detalhes:CancelTimer (window.free_frame3_schedule)
- window.free_frame3_schedule = nil
- end
- window.free_frame3_schedule = _detalhes:ScheduleRepeatingTimer ("FreeTutorialFrame3", 1)
- end
- end)
- free_frame3:SetScript ("OnHide", function()
- if (window.free_frame3_schedule) then
- _detalhes:CancelTimer (window.free_frame3_schedule)
- window.free_frame3_schedule = nil
- pleasewait:SetText ("")
- pleasewait:Hide()
- end
- end)
-
- pages [#pages+1] = {pleasewait, free_frame3, bg555, bg_avatar, texto_avatar1, texto_avatar2, texto_avatar3, changemind, avatar_image, avatar_bg, nickname, nicknamelabel, nicknamebox, avatarbutton}
-
- for _, widget in ipairs (pages[#pages]) do
- widget:Hide()
- end
---]=]
-
---> page 2
-
- -- DPS effective or active
-
- local ampulheta = window:CreateTexture (nil, "overlay")
- ampulheta:SetTexture ([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]])
- ampulheta:SetPoint ("bottomright", window, "bottomright", -10, 10)
- ampulheta:SetHeight (125*3)--125
- ampulheta:SetWidth (89*3)--82
- ampulheta:SetAlpha (.05)
- ampulheta:SetTexCoord (1, 0, 0, 1)
-
- g:NewLabel (window, _, "$parentChangeMind2Label", "changemind2Label", Loc ["STRING_WELCOME_2"], "GameFontNormal", 9, "orange")
- window.changemind2Label:SetPoint ("center", window, "center")
- window.changemind2Label:SetPoint ("bottom", window, "bottom", 0, 19)
- window.changemind2Label.align = "|"
-
- local texto2 = window:CreateFontString (nil, "overlay", "GameFontNormal")
- texto2:SetPoint ("topleft", window, "topleft", 20, -80)
- texto2:SetText (Loc ["STRING_WELCOME_3"])
-
- local chronometer = CreateFrame ("CheckButton", "WelcomeWindowChronometer", window, "ChatConfigCheckButtonTemplate")
- chronometer:SetPoint ("topleft", window, "topleft", 40, -110)
- local continuous = CreateFrame ("CheckButton", "WelcomeWindowContinuous", window, "ChatConfigCheckButtonTemplate")
- continuous:SetPoint ("topleft", window, "topleft", 40, -160)
-
- _G ["WelcomeWindowChronometerText"]:SetText (Loc ["STRING_WELCOME_4"])
- _G ["WelcomeWindowContinuousText"]:SetText (Loc ["STRING_WELCOME_5"])
-
- local sword_icon = window:CreateTexture (nil, "overlay")
- sword_icon:SetTexture ([[Interface\TUTORIALFRAME\UI-TutorialFrame-AttackCursor]])
- sword_icon:SetPoint ("topright", window, "topright", -15, -30)
- sword_icon:SetWidth (64*1.4)
- sword_icon:SetHeight (64*1.4)
- sword_icon:SetTexCoord (1, 0, 0, 1)
- sword_icon:SetDrawLayer ("overlay", 2)
- local thedude = window:CreateTexture (nil, "overlay")
- thedude:SetTexture ([[Interface\TUTORIALFRAME\UI-TutorialFrame-TheDude]])
- thedude:SetPoint ("bottomright", sword_icon, "bottomleft", 70, 19)
- thedude:SetWidth (128*1.0)
- thedude:SetHeight (128*1.0)
- thedude:SetTexCoord (0, 1, 0, 1)
- thedude:SetDrawLayer ("overlay", 3)
-
- local chronometer_text = window:CreateFontString (nil, "overlay", "GameFontNormal")
- chronometer_text:SetText (Loc ["STRING_WELCOME_6"])
- chronometer_text:SetWidth (360)
- chronometer_text:SetHeight (40)
- chronometer_text:SetJustifyH ("left")
- chronometer_text:SetJustifyV ("top")
- chronometer_text:SetTextColor (.8, .8, .8, 1)
- chronometer_text:SetPoint ("topleft", _G ["WelcomeWindowChronometerText"], "topright", 0, 0)
-
- local continuous_text = window:CreateFontString (nil, "overlay", "GameFontNormal")
- continuous_text:SetText (Loc ["STRING_WELCOME_7"])
- continuous_text:SetWidth (340)
- continuous_text:SetHeight (40)
- continuous_text:SetJustifyH ("left")
- continuous_text:SetJustifyV ("top")
- continuous_text:SetTextColor (.8, .8, .8, 1)
- continuous_text:SetPoint ("topleft", _G ["WelcomeWindowContinuousText"], "topright", 0, 0)
-
- chronometer:SetHitRectInsets (0, -70, 0, 0)
- continuous:SetHitRectInsets (0, -70, 0, 0)
-
- if (_detalhes.time_type == 1) then --> chronometer
- chronometer:SetChecked (true)
- continuous:SetChecked (false)
- elseif (_detalhes.time_type == 2) then --> continuous
- chronometer:SetChecked (false)
- continuous:SetChecked (true)
- end
-
- chronometer:SetScript ("OnClick", function()
- chronometer:SetChecked (true);
- continuous:SetChecked (false);
- _detalhes.time_type = 1
- end)
- continuous:SetScript ("OnClick", function()
- continuous:SetChecked (true);
- chronometer:SetChecked (false);
- _detalhes.time_type = 2
- end)
-
- --
-
- local pleasewait = window:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
- pleasewait:SetPoint ("bottomright", forward, "topright")
-
- local free_frame3 = CreateFrame ("frame", nil, window)
- function _detalhes:FreeTutorialFrame3()
- if (window_openned_at+10 > time()) then
- pleasewait:Show()
- forward:Disable()
- pleasewait:SetText ("wait... " .. window_openned_at + 10 - time())
- else
- pleasewait:Hide()
- pleasewait:SetText ("")
- forward:Enable()
- _detalhes:CancelTimer (window.free_frame3_schedule)
- window.free_frame3_schedule = nil
- end
- end
- free_frame3:SetScript ("OnShow", function()
- if (window_openned_at-10 > time()) then
- forward:Disable()
- if (window.free_frame3_schedule) then
- _detalhes:CancelTimer (window.free_frame3_schedule)
- window.free_frame3_schedule = nil
- end
- window.free_frame3_schedule = _detalhes:ScheduleRepeatingTimer ("FreeTutorialFrame3", 1)
- end
- end)
- free_frame3:SetScript ("OnHide", function()
- if (window.free_frame3_schedule) then
- _detalhes:CancelTimer (window.free_frame3_schedule)
- window.free_frame3_schedule = nil
- pleasewait:SetText ("")
- pleasewait:Hide()
- end
- end)
-
- pages [#pages+1] = {pleasewait, free_frame3, thedude, sword_icon, ampulheta, texto2, chronometer, continuous, chronometer_text, continuous_text, window.changemind2Label}
-
- for _, widget in ipairs (pages[#pages]) do
- widget:Hide()
- end
-
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---> numeral system
-
- local numeral_image = window:CreateTexture (nil, "overlay")
-
- numeral_image:SetTexture ([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]])
- numeral_image:SetPoint ("bottomright", window, "bottomright", -10, 10)
- numeral_image:SetHeight (125*3)--125
- numeral_image:SetWidth (89*3)--82
- numeral_image:SetAlpha (.05)
- numeral_image:SetTexCoord (1, 0, 0, 1)
-
- g:NewLabel (window, _, "$parentChangeMindNumeralLabel", "changemindNumeralLabel", Loc ["STRING_WELCOME_2"], "GameFontNormal", 9, "orange")
- window.changemindNumeralLabel:SetPoint ("center", window, "center")
- window.changemindNumeralLabel:SetPoint ("bottom", window, "bottom", 0, 19)
- window.changemindNumeralLabel.align = "|"
-
- local texto2Numeral = window:CreateFontString (nil, "overlay", "GameFontNormal")
- texto2Numeral:SetPoint ("topleft", window, "topleft", 20, -80)
- texto2Numeral:SetText (Loc ["STRING_NUMERALSYSTEM_DESC"] .. ":")
-
- local NumeralType1 = CreateFrame ("CheckButton", "WelcomeWindowNumeralType1", window, "ChatConfigCheckButtonTemplate")
- NumeralType1:SetPoint ("topleft", window, "topleft", 20, -110)
- local NumeralType2 = CreateFrame ("CheckButton", "WelcomeWindowNumeralType2", window, "ChatConfigCheckButtonTemplate")
- NumeralType2:SetPoint ("topleft", window, "topleft", 20, -170)
-
- _G ["WelcomeWindowNumeralType1Text"]:SetText (Loc ["STRING_NUMERALSYSTEM_ARABIC_WESTERN"] .. ": " .. Loc ["STRING_NUMERALSYSTEM_ARABIC_WESTERN_DESC"])
- _G ["WelcomeWindowNumeralType2Text"]:SetText (Loc ["STRING_NUMERALSYSTEM_MYRIAD_EASTASIA"] .. ": " .. Loc ["STRING_NUMERALSYSTEM_ARABIC_MYRIAD_EASTASIA"])
-
- local sword_icon2 = window:CreateTexture (nil, "overlay")
- sword_icon2:SetTexture ([[Interface\Addons\Details\images\icons2]])
- sword_icon2:SetPoint ("topright", window, "topright", -30, -10)
- sword_icon2:SetSize (128*1.4, 64*1.4)
- sword_icon2:SetTexCoord (330/512, 509/512, 437/512, 509/512)
- sword_icon2:SetDrawLayer ("overlay", 2)
-
- local thedude2 = window:CreateTexture (nil, "overlay")
- --thedude2:SetTexture ([[Interface\TUTORIALFRAME\UI-TutorialFrame-TheDude]])
- thedude2:SetPoint ("bottomright", sword_icon, "bottomleft", 70, 19)
- thedude2:SetWidth (128*1.0)
- thedude2:SetHeight (128*1.0)
- thedude2:SetTexCoord (0, 1, 0, 1)
- thedude2:SetDrawLayer ("overlay", 3)
-
- local NumeralType1_text = window:CreateFontString (nil, "overlay", "GameFontNormal")
- NumeralType1_text:SetText ("1K = 1.000 |cFFFFCC00| |r10K = 10.000 |cFFFFCC00| |r100K = 100.000 |cFFFFCC00| |r1M = 1.000.000")
- NumeralType1_text:SetWidth (500)
- NumeralType1_text:SetHeight (40)
- NumeralType1_text:SetJustifyH ("left")
- NumeralType1_text:SetJustifyV ("top")
- NumeralType1_text:SetTextColor (.8, .8, .8, 1)
- --NumeralType1_text:SetPoint ("topleft", _G ["WelcomeWindowNumeralType1Text"], "topright", 0, 0)
- NumeralType1_text:SetPoint ("topleft", window, "topleft", 40, -130)
-
- local NumeralType2_text = window:CreateFontString (nil, "overlay", "GameFontNormal")
- NumeralType2_text:SetText ("1천 = 1.000 |cFFFFCC00| |r1만 = 10.000 |cFFFFCC00| |r10만 = 100.000 |cFFFFCC00| |r100만 = 1.000.000")
- NumeralType2_text:SetWidth (500)
- NumeralType2_text:SetHeight (40)
- NumeralType2_text:SetJustifyH ("left")
- NumeralType2_text:SetJustifyV ("top")
- NumeralType2_text:SetTextColor (.8, .8, .8, 1)
- --NumeralType2_text:SetPoint ("topleft", _G ["WelcomeWindowNumeralType2Text"], "topright", 0, 0)
- NumeralType2_text:SetPoint ("topleft", window, "topleft", 40, -190)
-
- NumeralType1:SetHitRectInsets (0, -70, 0, 0)
- NumeralType2:SetHitRectInsets (0, -70, 0, 0)
-
- if (_detalhes.numerical_system == 1) then --> west
- NumeralType1:SetChecked (true)
- NumeralType2:SetChecked (false)
- elseif (_detalhes.numerical_system == 2) then --> east
- NumeralType1:SetChecked (false)
- NumeralType2:SetChecked (true)
- end
-
- NumeralType1:SetScript ("OnClick", function()
- NumeralType1:SetChecked (true);
- NumeralType2:SetChecked (false);
- _detalhes.numerical_system = 1
- _detalhes:SelectNumericalSystem()
- end)
- NumeralType2:SetScript ("OnClick", function()
- NumeralType2:SetChecked (true);
- NumeralType1:SetChecked (false);
- _detalhes.numerical_system = 2
- _detalhes:SelectNumericalSystem()
- end)
-
- pages [#pages+1] = {thedude2, sword_icon2, numeral_image, texto2Numeral, NumeralType1, NumeralType2, NumeralType1_text, NumeralType2_text, window.changemindNumeralLabel}
-
- for _, widget in ipairs (pages[#pages]) do
- widget:Hide()
- end
-
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---> Skins Page
+--> Skins Page page 2
--SKINS
@@ -660,173 +285,19 @@ local window_openned_at = time()
skins_image:SetWidth (214*0.7)
skins_image:SetHeight (133*0.7)
skins_image:SetTexCoord (0, 0.41796875, 0, 0.259765625) --0, 0, 214 133
-
- --import settings
- local import_label = g:NewLabel (window, _, "$parentImportSettingsLabel", "ImportLabel", Loc ["STRING_WELCOME_46"] .. ":", "GameFontNormal")
- import_label:SetPoint ("topleft", window, "topleft", 30, -170)
-
- local onSelectImportRct = function (_, _, cluster_name)
- for i = 1, 2 do
-
- local addon1_profile = _G.Recount.db.profile
- local instance1 = _detalhes:GetInstance (i)
-
- if (addon1_profile and instance1) then
-
- if (cluster_name == "title_bar") then
-
- local buttons = addon1_profile.MainWindow.Buttons
- instance1.menu_icons[2] = buttons.FileButton
- instance1.menu_icons[4] = buttons.ReportButton
- instance1.menu_icons[5] = buttons.ResetButton
- instance1.menu_icons[6] = false --close button
-
- elseif (cluster_name == "bars") then
-
- local row_info = instance1.row_info
- row_info.space.between = addon1_profile.RowSpacing
- row_info.height = addon1_profile.RowHeight
-
-
-
- elseif (cluster_name == "window") then
- local w, h = addon1_profile.MainWindow.Position.w, addon1_profile.MainWindow.Position.h
- instance1.posicao.normal.w = w
- instance1.posicao.normal.h = h
-
- instance1:RestoreMainWindowPosition()
-
- end
-
- end
-
- end
- end
-
- local onSelectImportSkd = function (_, _, cluster_name)
-
- for i = 1, 2 do
-
- local addon1_profile = _G.Skada.db.profile.windows [i]
- local instance1 = _detalhes:GetInstance (i)
-
- if (addon1_profile and instance1) then
-
- if (cluster_name == "title_bar") then
-
- local value = addon1_profile ["title"]
- local v = instance1.attribute_text
- v.enabled = true
- v.text_face = value.font
- v.anchor = {-17, 4}
- v.text_size = value.fontsize
- v.shadow = value.fontflags ~= ''
- instance1.color[1], instance1.color[2], instance1.color[3], instance1.color[4] = value.color.r, value.color.g, value.color.b, value.color.a
- instance1:StatusBarColor (value.color.r, value.color.g, value.color.b, value.color.a)
- instance1.attribute_text = v
-
- local buttons = addon1_profile.buttons
- instance1.menu_icons[2] = buttons.segment
- instance1.menu_icons[4] = buttons.report
- instance1.menu_icons[5] = buttons.reset
- instance1.menu_icons[6] = false --close button
-
- instance1:ChangeSkin()
-
- elseif (cluster_name == "bars") then
-
- instance1:SetBarSettings (nil, nil, nil, nil, "DGround")
-
- local row_info = instance1.row_info
- row_info.texture = addon1_profile.bartexture
-
- row_info.font_face = addon1_profile.barfont
- row_info.font_size = addon1_profile.barfontsize
- row_info.space.between = addon1_profile.barspacing
- row_info.height = addon1_profile.barheight
- row_info.textL_outline = addon1_profile.barfontflags ~= ""
- row_info.textR_outline = addon1_profile.barfontflags ~= ""
- row_info.texture_class_colors = addon1_profile.classcolorbars
-
- local bg_color = row_info.fixed_texture_background_color
- local barbgcolor = addon1_profile.barbgcolor
- bg_color[1], bg_color[2], bg_color[3], bg_color[4] = barbgcolor.r, barbgcolor.g, barbgcolor.b, barbgcolor.a
-
- local bar_color = row_info.fixed_texture_color
- local barcolor = addon1_profile.barcolor
- bar_color[1], bar_color[2], bar_color[3], bar_color[4] = barcolor.r, barcolor.g, barcolor.b, barcolor.a
-
- instance1.bars_grow_direction = addon1_profile.reversegrowth and 2 or 1
-
- instance1:ChangeSkin()
-
- elseif (cluster_name == "window") then
- local value = addon1_profile.background
-
- if (value.color.r ~= 0 or value.color.g ~= 0 or value.color.b ~= 0.5) then
- instance1.bg_alpha = value.color.a/2
- instance1.bg_r = value.color.r
- instance1.bg_g = value.color.g
- instance1.bg_b = value.color.b
- instance1.backdrop_texture = value.texture
- end
-
- instance1.libwindow.x = addon1_profile.x
- instance1.libwindow.y = addon1_profile.y
- instance1.libwindow.point = addon1_profile.point
- instance1.libwindow.scale = addon1_profile.scale
-
- local w, h = addon1_profile.barwidth, addon1_profile.background.height
- instance1.posicao.normal.w = w
- instance1.posicao.normal.h = h
-
- instance1:RestoreMainWindowPosition()
- instance1:ChangeSkin()
-
- for _, win in ipairs (_G.Skada:GetWindows()) do
- if (win:IsShown()) then
- win.db.hidden = true
- win:Hide()
- end
- end
-
- end
-
- end
-
- end
-
- end
-
- local ImportMenu = function()
- local options = {}
- if (_G.Skada) then
- tinsert (options, {value = "title_bar", label = Loc ["STRING_WELCOME_70"] .. " (Skada)", onclick = onSelectImportSkd, icon = [[Interface\FriendsFrame\StatusIcon-Online]]})
- tinsert (options, {value = "bars", label = Loc ["STRING_WELCOME_71"] .. " (Skada)", onclick = onSelectImportSkd, icon = [[Interface\FriendsFrame\StatusIcon-Online]]})
- tinsert (options, {value = "window", label = Loc ["STRING_WELCOME_72"] .. " (Skada)", onclick = onSelectImportSkd, icon = [[Interface\FriendsFrame\StatusIcon-Online]], desc = "This option will hide Skada windows to avoid overlap on the same position. Use the command '/skada toggle' to bring it back again."})
- end
-
- return options
- end
-
- local import_dropdown = g:NewDropDown (window, _, "$parentImportDropdown", "ImportDropdown", 140, 20, ImportMenu, false)
- import_dropdown:SetPoint ("left", import_label, "right", 2, 0)
- import_dropdown.tooltip = Loc ["STRING_WELCOME_57"]
-
- if (not _G.Skada) then
- import_dropdown:Disable()
- import_label:SetTextColor (1, 0.8, 0, 0.3)
- end
-
--skin
local onSelectSkin = function (_, _, skin_name)
local instance1 = _detalhes:GetInstance (1)
- if (instance1) then
+ if (instance1 and instance1:IsEnabled()) then
instance1:ChangeSkin (skin_name)
+ window.FontDropdown:Select (instance1.row_info.font_face)
+ window.BarHeightSlider:SetValue (instance1.row_info.height)
+ window.TextSizeSlider:SetValue (instance1.row_info.font_size)
+ window.ShowPercentCheckBox:SetValue (instance1.row_info.textR_show_data [3])
end
local instance2 = _detalhes:GetInstance (2)
- if (instance2) then
+ if (instance2 and instance2:IsEnabled()) then
instance2:ChangeSkin (skin_name)
end
end
@@ -840,13 +311,174 @@ local window_openned_at = time()
end
local instance1 = _detalhes:GetInstance (1)
- local skin_dropdown = g:NewDropDown (window, _, "$parentSkinDropdown", "skinDropdown", 140, 20, buildSkinMenu, instance1.skin)
+ local skin_dropdown = g:NewDropDown (window, _, "$parentSkinDropdown", "skinDropdown", 160, 20, buildSkinMenu, instance1.skin)
+ skin_dropdown:SetTemplate (g:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
skin_dropdown.tooltip = Loc ["STRING_WELCOME_58"]
local skin_label = g:NewLabel (window, _, "$parentSkinLabel", "skinLabel", Loc ["STRING_OPTIONS_INSTANCE_SKIN"] .. ":", "GameFontNormal")
skin_dropdown:SetPoint ("left", skin_label, "right", 2)
- skin_label:SetPoint ("topleft", window, "topleft", 30, -140)
+ skin_label:SetPoint ("topleft", window, "topleft", 30, -133)
+ --> alphabet selection
+
+ local texto_alphabet = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ texto_alphabet:SetPoint ("topleft", window, "topleft", 30, -110)
+ texto_alphabet:SetText (Loc ["STRING_WELCOME_73"]) --"Select the Alphabet or Region:"
+ texto_alphabet:SetJustifyH ("left")
+ texto_alphabet:SetJustifyV ("top")
+ texto_alphabet:SetTextColor (1, 1, 1)
+ texto_alphabet:SetPoint ("topleft", skin_label.widget, "bottomleft", 0, -20)
+
+ local allAlphabetCheckBoxes = {}
+ local allAlphabetLabels = {}
+
+ local onSelectAlphabet = function (self, fixedParameter, value)
+
+ if (not value) then
+ self:SetValue (true)
+ return
+ end
+
+ for index, checkBox in ipairs (allAlphabetCheckBoxes) do
+ if (checkBox ~= self) then
+ checkBox:SetValue (false)
+ end
+ end
+
+ local instance1 = Details:GetInstance (1)
+ local instance2 = Details:GetInstance (2)
+
+ _detalhes.tabela_historico:resetar()
+
+ if (fixedParameter == 1) then --latin
+ if (instance1 and instance1:IsEnabled()) then
+ instance1:SetBarTextSettings (nil, "Accidental Presidency")
+ end
+ if (instance2 and instance2:IsEnabled()) then
+ instance2:SetBarTextSettings (nil, "Accidental Presidency")
+ end
+
+ window.FontDropdown:Select ("Accidental Presidency")
+
+ _detalhes:CreateTestBars ("en")
+
+ elseif (fixedParameter == 2) then --russia
+ if (instance1 and instance1:IsEnabled()) then
+ instance1:SetBarTextSettings (nil, "Arial Narrow")
+ end
+ if (instance2 and instance2:IsEnabled()) then
+ instance2:SetBarTextSettings (nil, "Arial Narrow")
+ end
+
+ window.FontDropdown:Select ("Arial Narrow")
+
+ _detalhes:CreateTestBars ("ru")
+
+ elseif (fixedParameter == 3) then --china
+ if (instance1 and instance1:IsEnabled()) then
+ instance1:SetBarTextSettings (nil, "AR CrystalzcuheiGBK Demibold")
+ end
+ if (instance2 and instance2:IsEnabled()) then
+ instance2:SetBarTextSettings (nil, "AR CrystalzcuheiGBK Demibold")
+ end
+
+ window.FontDropdown:Select ("AR CrystalzcuheiGBK Demibold")
+
+ _detalhes:CreateTestBars ("cn")
+
+ elseif (fixedParameter == 4) then --korea
+ if (instance1 and instance1:IsEnabled()) then
+ instance1:SetBarTextSettings (nil, "2002")
+ end
+ if (instance2 and instance2:IsEnabled()) then
+ instance2:SetBarTextSettings (nil, "2002")
+ end
+
+ window.FontDropdown:Select ("2002")
+
+ _detalhes:CreateTestBars ("ko")
+
+ elseif (fixedParameter == 5) then --taiwan
+ if (instance1 and instance1:IsEnabled()) then
+ instance1:SetBarTextSettings (nil, "AR CrystalzcuheiGBK Demibold")
+ end
+ if (instance2 and instance2:IsEnabled()) then
+ instance2:SetBarTextSettings (nil, "AR CrystalzcuheiGBK Demibold")
+ end
+
+ window.FontDropdown:Select ("AR CrystalzcuheiGBK Demibold")
+
+ _detalhes:CreateTestBars ("tw")
+ end
+
+ end
+
+ --Latin Alphabet
+ g:NewLabel (window, _, "$parentLatinAlphabetLabel", "LatinAlphabetLabel", Loc["STRING_WELCOME_74"], "GameFontHighlightLeft")
+ g:NewSwitch (window, _, "$parentLatinAlphabetCheckBox", "LatinAlphabetCheckBox", 20, 20, _, _, true)
+ window.LatinAlphabetCheckBox:SetAsCheckBox()
+ window.LatinAlphabetCheckBox:SetFixedParameter (1)
+ window.LatinAlphabetCheckBox:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
+ window.LatinAlphabetCheckBox.OnSwitch = onSelectAlphabet
+ window.LatinAlphabetLabel:SetPoint ("left", window.LatinAlphabetCheckBox, "right", 2, 0)
+
+ tinsert (allAlphabetCheckBoxes, window.LatinAlphabetCheckBox)
+ tinsert (allAlphabetLabels, window.LatinAlphabetLabel)
+
+ --Russian
+ g:NewLabel (window, _, "$parentCyrillicAlphabetLabel", "CyrillicAlphabetLabel", Loc["STRING_WELCOME_75"], "GameFontHighlightLeft")
+ g:NewSwitch (window, _, "$parentCyrillicAlphabetCheckBox", "CyrillicAlphabetCheckBox", 20, 20, _, _, false)
+ window.CyrillicAlphabetCheckBox:SetAsCheckBox()
+ window.CyrillicAlphabetCheckBox:SetFixedParameter (2)
+ window.CyrillicAlphabetCheckBox:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
+ window.CyrillicAlphabetCheckBox.OnSwitch = onSelectAlphabet
+ window.CyrillicAlphabetLabel:SetPoint ("left", window.CyrillicAlphabetCheckBox, "right", 2, 0)
+ tinsert (allAlphabetCheckBoxes, window.CyrillicAlphabetCheckBox)
+ tinsert (allAlphabetLabels, window.CyrillicAlphabetLabel)
+
+ --Chinese
+ g:NewLabel (window, _, "$parentChinaAlphabetLabel", "ChinaAlphabetLabel", Loc["STRING_WELCOME_76"], "GameFontHighlightLeft")
+ g:NewSwitch (window, _, "$parentChinaCheckBox", "ChinaCheckBox", 20, 20, _, _, false)
+ window.ChinaCheckBox:SetAsCheckBox()
+ window.ChinaCheckBox:SetFixedParameter (3)
+ window.ChinaCheckBox:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
+ window.ChinaCheckBox.OnSwitch = onSelectAlphabet
+ window.ChinaAlphabetLabel:SetPoint ("left", window.ChinaCheckBox, "right", 2, 0)
+ tinsert (allAlphabetCheckBoxes, window.ChinaCheckBox)
+ tinsert (allAlphabetLabels, window.ChinaAlphabetLabel)
+
+ --Korea
+ g:NewLabel (window, _, "$parentKoreanAlphabetLabel", "KoreanAlphabetLabel", Loc["STRING_WELCOME_77"], "GameFontHighlightLeft")
+ g:NewSwitch (window, _, "$parentKoreanCheckBox", "KoreanCheckBox", 20, 20, _, _, false)
+ window.KoreanCheckBox:SetAsCheckBox()
+ window.KoreanCheckBox:SetFixedParameter (4)
+ window.KoreanCheckBox:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
+ window.KoreanCheckBox.OnSwitch = onSelectAlphabet
+ window.KoreanAlphabetLabel:SetPoint ("left", window.KoreanCheckBox, "right", 2, 0)
+ tinsert (allAlphabetCheckBoxes, window.KoreanCheckBox)
+ tinsert (allAlphabetLabels, window.KoreanAlphabetLabel)
+
+ --Taiwan
+ g:NewLabel (window, _, "$parentTaiwanAlphabetLabel", "TaiwanAlphabetLabel", Loc["STRING_WELCOME_78"], "GameFontHighlightLeft")
+ g:NewSwitch (window, _, "$parentTaiwanCheckBox", "TaiwanCheckBox", 20, 20, _, _, false)
+ window.TaiwanCheckBox:SetAsCheckBox()
+ window.TaiwanCheckBox:SetFixedParameter (5)
+ window.TaiwanCheckBox:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
+ window.TaiwanCheckBox.OnSwitch = onSelectAlphabet
+ window.TaiwanAlphabetLabel:SetPoint ("left", window.TaiwanCheckBox, "right", 2, 0)
+ tinsert (allAlphabetCheckBoxes, window.TaiwanCheckBox)
+ tinsert (allAlphabetLabels, window.TaiwanAlphabetLabel)
+
+ window.LatinAlphabetCheckBox:SetPoint ("topleft", texto_alphabet, "bottomleft", 0, -10)
+ window.CyrillicAlphabetCheckBox:SetPoint ("topleft", window.LatinAlphabetCheckBox, "bottomleft", 0, -2)
+ window.ChinaCheckBox:SetPoint ("topleft", window.CyrillicAlphabetCheckBox, "bottomleft", 0, -2)
+ window.KoreanCheckBox:SetPoint ("topleft", texto_alphabet, "bottomleft", 175, -10)
+ window.TaiwanCheckBox:SetPoint ("topleft", window.KoreanCheckBox, "bottomleft", 0, -2)
+
+ --> buttons
+ local padding = -4
+ local buttonWidth = 160
+
-- create second window button
local new_window = function (self)
if (#_detalhes.tabela_instancias == 1) then
@@ -858,10 +490,11 @@ local window_openned_at = time()
end
self.MyObject:Disable()
end
- local create_window_button = g:CreateButton (window, new_window, 150, 16, "Create 2nd Window")
- create_window_button:InstallCustomTexture()
+
+ local create_window_button = g:CreateButton (window, new_window, buttonWidth, 20, Loc["STRING_WELCOME_79"])
+ create_window_button:SetTemplate (g:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
create_window_button:SetIcon ([[Interface\FriendsFrame\UI-FriendsList-Large-Up]], nil, nil, nil, {5/32, 26/32, 6/32, 26/32}, nil, 4, 2)
- create_window_button:SetPoint ("topright", window, "topright", -70, -127)
+ create_window_button:SetPoint ("topright", window, "topright", -100, -137)
if (#_detalhes.tabela_instancias == 2) then
create_window_button:Disable()
@@ -897,7 +530,7 @@ local window_openned_at = time()
end
local instance2 = _detalhes:GetInstance (2)
- if (instance2) then
+ if (instance2 and instance2:IsEnabled()) then
instance2:InstanceColor (r, g, b, a, nil, true)
end
end
@@ -908,150 +541,385 @@ local window_openned_at = time()
_detalhes.gump:ColorPick (window, r, g, b, a, windowcolor_callback)
end
- local window_color = g:CreateButton (window, change_color, 150, 16, "Change Color")
- window_color:SetPoint ("topleft", create_window_button, "bottomleft", 0, -2)
- window_color:InstallCustomTexture()
+ local window_color = g:CreateButton (window, change_color, buttonWidth, 20, Loc ["STRING_OPTIONS_CHANGECOLOR"])
+ window_color:SetTemplate (g:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
+ window_color:SetPoint ("topleft", create_window_button, "bottomleft", 0, padding)
window_color:SetIcon ([[Interface\AddOns\Details\images\icons]], 14, 14, nil, {434/512, 466/512, 277/512, 307/512}, nil, 4, 2)
-
- -- show statusbar
- g:NewSwitch (window, _, "$parentStatusbarSlider", "statusbarSlider", 60, 20, _, _, _detalhes:GetInstance(1).show_statusbar)
- g:NewLabel (window, _, "$parentStatusbarLabel", "statusbarLabel", Loc ["STRING_OPTIONS_SHOW_STATUSBAR"] .. ":", "GameFontNormal")
- window.statusbarLabel:SetPoint ("topleft", window_color, "bottomleft", 0, -8)
- window.statusbarSlider:SetPoint ("left", window.statusbarLabel, "right", 2, -1)
- window.statusbarSlider:SetFixedParameter (_detalhes:GetInstance (1))
+ --bar height
+ g:NewLabel (window, _, "$parentBarHeightLabel", "BarHeightLabel", Loc ["STRING_OPTIONS_BAR_HEIGHT"] .. ":", "GameFontNormal")
+ window.BarHeightLabel:SetPoint ("topleft", window_color, "bottomleft", 0, -4 + padding)
+ --
+ g:NewSlider (window, _, "$parentBarHeightSpeed", "BarHeightSlider", 160, 20, 8, 24, 1, 14) --parent, container, name, member, w, h, min, max, step, defaultv
+ window.BarHeightSlider:SetPoint ("left", window.BarHeightLabel, "right", 2, 0)
+ window.BarHeightSlider:SetTemplate (g:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE"))
- window.statusbarSlider.OnSwitch = function (self, instance, value)
- instance = _detalhes:GetInstance (1)
- if (value) then
- instance:ShowStatusBar()
- else
- instance:HideStatusBar()
- end
+ window.BarHeightSlider:SetHook ("OnValueChange", function (self, _, amount)
+ local instance1 = Details:GetInstance (1)
+ local instance2 = Details:GetInstance (2)
- local instance2 = _detalhes:GetInstance (2)
- if (instance2) then
- if (value) then
- instance2:ShowStatusBar()
+ if (instance1 and instance1:IsEnabled()) then
+ instance1:SetBarSettings (amount)
+ end
+ if (instance2 and instance2:IsEnabled()) then
+ instance2:SetBarSettings (amount)
+ end
+ end)
+
+ --text size
+ g:NewLabel (window, _, "$parentTextSizeLabel", "TextSizeLabel", Loc ["STRING_OPTIONS_TEXT_SIZE"] .. ":", "GameFontNormal")
+ window.TextSizeLabel:SetPoint ("topleft", window.BarHeightLabel, "bottomleft", 0, -4 + padding)
+ --
+ g:NewSlider (window, _, "$parentTextSizeSpeed", "TextSizeSlider", 160, 20, 10, 20, 1, 14) --parent, container, name, member, w, h, min, max, step, defaultv
+ window.TextSizeSlider:SetPoint ("left", window.TextSizeLabel, "right", 2, 0)
+ window.TextSizeSlider:SetTemplate (g:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE"))
+
+ window.TextSizeSlider:SetHook ("OnValueChange", function (self, _, amount)
+ local instance1 = Details:GetInstance (1)
+ local instance2 = Details:GetInstance (2)
+
+ if (instance1 and instance1:IsEnabled()) then
+ instance1:SetBarTextSettings (amount)
+ end
+ if (instance2 and instance2:IsEnabled()) then
+ instance2:SetBarTextSettings (amount)
+ end
+ end)
+
+ --font
+ local onSelectFont = function (_, instance, fontName)
+ local instance1 = Details:GetInstance (1)
+ local instance2 = Details:GetInstance (2)
+
+ if (instance1 and instance1:IsEnabled()) then
+ instance1:SetBarTextSettings (nil, fontName)
+ end
+ if (instance2 and instance2:IsEnabled()) then
+ instance2:SetBarTextSettings (nil, fontName)
+ end
+ end
+
+ local buildFontMenu = function()
+ local fontObjects = SharedMedia:HashTable ("font")
+ local fontTable = {}
+ for name, fontPath in pairs (fontObjects) do
+ fontTable[#fontTable+1] = {value = name, label = name, icon = font_select_icon, texcoord = font_select_texcoord, onclick = onSelectFont, font = fontPath, descfont = name, desc = Loc ["STRING_MUSIC_DETAILS_ROBERTOCARLOS"]}
+ end
+ table.sort (fontTable, function (t1, t2) return t1.label < t2.label end)
+ return fontTable
+ end
+
+ local instance1 = _detalhes:GetInstance (1)
+ local font_dropdown = g:NewDropDown (window, _, "$parentFontDropdown", "FontDropdown", 160, 20, buildFontMenu, instance1.row_info.font_face)
+ font_dropdown:SetTemplate (g:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
+ font_dropdown.tooltip = Loc ["STRING_WELCOME_58"]
+
+ local font_label = g:NewLabel (window, _, "$parentFontLabel", "FontLabel", Loc ["STRING_OPTIONS_TEXT_FONT"], "GameFontNormal")
+ font_dropdown:SetPoint ("left", font_label, "right", 2)
+ font_label:SetPoint ("topleft", window.TextSizeLabel, "bottomleft", 0, -4 + padding)
+
+ --show percent
+ g:NewLabel (window, _, "$parentShowPercentLabel", "ShowPercentLabel", Loc ["STRING_OPTIONS_TEXT_SHOW_PERCENT"], "GameFontNormal")
+ g:NewSwitch (window, _, "$parentShowPercentCheckBox", "ShowPercentCheckBox", 20, 20, _, _, false)
+ window.ShowPercentCheckBox:SetAsCheckBox()
+ window.ShowPercentCheckBox:SetFixedParameter (1)
+ window.ShowPercentCheckBox:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
+
+ window.ShowPercentCheckBox.OnSwitch = function (self, fixedParameter, value)
+ local instance1 = Details:GetInstance (1)
+ local instance2 = Details:GetInstance (2)
+
+ if (instance1 and instance1:IsEnabled()) then
+ instance1:SetBarRightTextSettings (nil, nil, value)
+ if (not value) then
+ instance1:SetBarRightTextSettings (nil, nil, nil, nil, "NONE")
else
- instance2:HideStatusBar()
+ instance1:SetBarRightTextSettings (nil, nil, nil, nil, ",")
end
end
-
- instance:BaseFrameSnap()
- end
-
- -- bar texture
- local texture_icon = [[Interface\TARGETINGFRAME\UI-PhasingIcon]]
- local texture_icon = [[Interface\AddOns\Details\images\icons]]
- local texture_icon_size = {14, 14}
- local texture_texcoord = {469/512, 505/512, 249/512, 284/512}
-
- --texture
- local onSelectTexture = function (_, instance, textureName)
- instance:SetBarSettings (nil, textureName)
-
- if (_detalhes.options_group_edit) then
- for _, this_instance in ipairs (instance:GetInstanceGroup()) do
- if (this_instance ~= instance) then
- this_instance:SetBarSettings (nil, textureName)
- end
- end
- end
-
- local instance2 = _detalhes:GetInstance (2)
- if (instance2) then
- instance2:SetBarSettings (nil, textureName)
- end
- end
-
- local buildTextureMenu = function()
- local textures = SharedMedia:HashTable ("statusbar")
- local texTable = {}
- for name, texturePath in pairs (textures) do
- texTable[#texTable+1] = {value = name, label = name, iconsize = texture_icon_size, statusbar = texturePath, onclick = onSelectTexture, icon = texture_icon, texcoord = texture_texcoord}
- end
- table.sort (texTable, function (t1, t2) return t1.label < t2.label end)
- return texTable
- end
-
- g:NewLabel (window, _, "$parentTextureLabel", "textureLabel", Loc ["STRING_TEXTURE"] .. ":", "GameFontNormal")
- g:NewDropDown (window, _, "$parentTextureDropdown", "textureDropdown", 120, 18, buildTextureMenu, nil)
- window.textureDropdown:SetFixedParameter (_detalhes:GetInstance(1))
- window.textureDropdown:SetPoint ("left", window.textureLabel, "right", 2)
- window.textureLabel:SetPoint ("topleft", window.statusbarLabel, "bottomleft", 0, -8)
-
- --> icon type
- local OnSelectIconFile = function (_, _, iconpath)
- instance1:SetBarSettings (nil, nil, nil, nil, nil, nil, nil, nil, iconpath)
- if (instance1.row_info.use_spec_icons) then
- instance1:SetBarSpecIconSettings (false)
- end
-
- local instance2 = _detalhes:GetInstance (2)
- if (instance2) then
- instance2:SetBarSettings (nil, nil, nil, nil, nil, nil, nil, nil, iconpath)
- if (instance2.row_info.use_spec_icons) then
- instance2:SetBarSpecIconSettings (false)
+ if (instance2 and instance2:IsEnabled()) then
+ instance2:SetBarRightTextSettings (nil, nil, value)
+ if (not value) then
+ instance2:SetBarRightTextSettings (nil, nil, nil, nil, "NONE")
+ else
+ instance2:SetBarRightTextSettings (nil, nil, nil, nil, ",")
end
end
end
- local OnSelectIconFileSpec = function (_, _, iconpath)
- instance1:SetBarSpecIconSettings (true, iconpath, true)
- local instance2 = _detalhes:GetInstance (2)
- if (instance2) then
- instance2:SetBarSpecIconSettings (true, iconpath, true)
- end
- end
-
- local iconsize = {16, 16}
- local icontexture = [[Interface\WorldStateFrame\ICONS-CLASSES]]
- local iconcoords = {0.25, 0.50, 0, 0.25}
- local list = {
- {value = [[]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE1"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize, iconcolor = {1, 1, 1, .3}},
- {value = [[Interface\AddOns\Details\images\classes_small]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE2"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize},
- {value = [[Interface\AddOns\Details\images\spec_icons_normal]], label = "Specialization", onclick = OnSelectIconFileSpec, icon = [[Interface\AddOns\Details\images\icons]], texcoord = {2/512, 32/512, 480/512, 510/512}, iconsize = iconsize},
- {value = [[Interface\AddOns\Details\images\spec_icons_normal_alpha]], label = "Specialization Alpha", onclick = OnSelectIconFileSpec, icon = [[Interface\AddOns\Details\images\icons]], texcoord = {2/512, 32/512, 480/512, 510/512}, iconsize = iconsize},
- {value = [[Interface\AddOns\Details\images\classes_small_bw]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE3"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize},
- {value = [[Interface\AddOns\Details\images\classes_small_alpha]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE4"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize},
- {value = [[Interface\AddOns\Details\images\classes_small_alpha_bw]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE6"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize},
- {value = [[Interface\AddOns\Details\images\classes]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE5"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize},
- }
- local BuiltIconList = function()
- return list
- end
- local default
- if (instance1.row_info.use_spec_icons) then
- default = instance1.row_info.spec_file
- else
- default = instance1.row_info.icon_file
- end
-
- local d = g:NewDropDown (window, _, "$parentIconSelectDropdown", "IconSelectDropdown", 120, 18, BuiltIconList, default)
-
- g:NewLabel (window, _, "$parentIconsAnchor", "rowIconsLabel", Loc ["STRING_OPTIONS_TEXT_ROWICONS_ANCHOR"], "GameFontNormal")
-
- d:SetPoint ("left", window.rowIconsLabel, "right", 2)
-
- window.rowIconsLabel:SetPoint ("topleft", window.textureLabel, "bottomleft", 0, -8)
+ window.ShowPercentLabel:SetPoint ("topleft", font_label.widget, "bottomleft", 0, -4 + padding)
+ window.ShowPercentCheckBox:SetPoint ("left", window.ShowPercentLabel, "right", 2, 0)
local created_test_bars = 0
+
local skins_frame_alert = CreateFrame ("frame", nil, window)
+ skins_frame_alert:Hide()
skins_frame_alert:SetScript ("OnShow", function()
if (created_test_bars < 2) then
_detalhes:CreateTestBars()
created_test_bars = created_test_bars + 1
end
+
+ if (DetailsWelcomeWindow.SetLocTimer) then
+ _detalhes:CancelTimer (DetailsWelcomeWindow.SetLocTimer)
+ DetailsWelcomeWindow.SetLocTimer = nil
+ _detalhes:WelcomeSetLoc()
+ end
end)
- pages [#pages+1] = {import_label, import_dropdown, skins_frame_alert, bg55, texto55, texto555, skins_image, changemind, texto_appearance, skin_dropdown, skin_label, window.rowIconsLabel, window.IconSelectDropdown, create_window_button, window_color, window.statusbarLabel, window.statusbarSlider, window.textureLabel, window.textureDropdown}
+ pages [#pages+1] = {skins_frame_alert, bg55, texto55, texto_alphabet, texto555, skins_image, changemind, texto_appearance, font_label, font_dropdown, skin_dropdown, skin_label, create_window_button, window_color, window.BarHeightLabel, window.BarHeightSlider, window.TextSizeLabel, window.TextSizeSlider, window.ShowPercentLabel, window.ShowPercentCheckBox}
+ for i, widget in ipairs (allAlphabetCheckBoxes) do
+ tinsert (pages [#pages], widget)
+ end
+ for i, widget in ipairs (allAlphabetLabels) do
+ tinsert (pages [#pages], widget)
+ end
for _, widget in ipairs (pages[#pages]) do
widget:Hide()
end
+
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+--> numeral system page 3
+
+ local numeral_image = window:CreateTexture (nil, "overlay")
+ numeral_image:SetTexture ([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]])
+ numeral_image:SetPoint ("bottomright", window, "bottomright", -10, 10)
+ numeral_image:SetHeight (125*3)--125
+ numeral_image:SetWidth (89*3)--82
+ numeral_image:SetAlpha (.05)
+ numeral_image:SetTexCoord (1, 0, 0, 1)
+ g:NewLabel (window, _, "$parentChangeMindNumeralLabel", "changemindNumeralLabel", Loc ["STRING_WELCOME_2"], "GameFontNormal", 9, "orange")
+ window.changemindNumeralLabel:SetPoint ("center", window, "center")
+ window.changemindNumeralLabel:SetPoint ("bottom", window, "bottom", 0, 19)
+ window.changemindNumeralLabel.align = "|"
+
+ local texto2Numeral = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ texto2Numeral:SetPoint ("topleft", window, "topleft", 20, -80)
+ texto2Numeral:SetText (Loc ["STRING_NUMERALSYSTEM_DESC"] .. ":")
+
+ --numeral 1 - western
+ g:NewLabel (window, _, "$parentWesternNumbersLabel", "WesternNumbersLabel", Loc ["STRING_NUMERALSYSTEM_ARABIC_WESTERN"] .. ": " .. Loc ["STRING_NUMERALSYSTEM_ARABIC_WESTERN_DESC"], "GameFontHighlightLeft")
+ local WesternNumbersCheckbox = g:NewSwitch (window, _, "WesternNumbersCheckbox", "WesternNumbersCheckbox", 20, 20, _, _, true)
+ WesternNumbersCheckbox:SetAsCheckBox()
+ WesternNumbersCheckbox:SetFixedParameter (1)
+ WesternNumbersCheckbox:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
+ WesternNumbersCheckbox:SetPoint ("topleft", window, "topleft", 40, -130)
+ window.WesternNumbersLabel:SetPoint ("left", WesternNumbersCheckbox, "right", 2, 0)
+
+ --numeral 2 asian
+ g:NewLabel (window, _, "$parentAsianNumbersLabel", "AsianNumbersLabel", Loc ["STRING_NUMERALSYSTEM_MYRIAD_EASTASIA"] .. ": " .. Loc ["STRING_NUMERALSYSTEM_ARABIC_MYRIAD_EASTASIA"], "GameFontHighlightLeft")
+ local AsianNumbersCheckbox = g:NewSwitch (window, _, "AsianNumbersCheckbox", "AsianNumbersCheckbox", 20, 20, _, _, true)
+ AsianNumbersCheckbox:SetAsCheckBox()
+ AsianNumbersCheckbox:SetFixedParameter (2)
+ AsianNumbersCheckbox:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
+ AsianNumbersCheckbox:SetPoint ("topleft", window, "topleft", 40, -200)
+ window.AsianNumbersLabel:SetPoint ("left", AsianNumbersCheckbox, "right", 2, 0)
+
+ --western on clicks
+ WesternNumbersCheckbox.OnSwitch = function()
+ WesternNumbersCheckbox:SetValue (true)
+ AsianNumbersCheckbox:SetValue (false)
+ _detalhes.numerical_system = 1
+ _detalhes:SelectNumericalSystem()
+ end
+
+ --asian on click
+ AsianNumbersCheckbox.OnSwitch = function()
+ AsianNumbersCheckbox:SetValue (true)
+ WesternNumbersCheckbox:SetValue (false)
+ _detalhes.numerical_system = 2
+ _detalhes:SelectNumericalSystem()
+ end
+
+ local sword_icon2 = window:CreateTexture (nil, "overlay")
+ sword_icon2:SetTexture ([[Interface\Addons\Details\images\icons2]])
+ sword_icon2:SetPoint ("topright", window, "topright", -30, -10)
+ sword_icon2:SetSize (128*1.4, 64*1.4)
+ sword_icon2:SetTexCoord (330/512, 509/512, 437/512, 509/512)
+ sword_icon2:SetDrawLayer ("overlay", 2)
+
+ local thedude2 = window:CreateTexture (nil, "overlay")
+ --thedude2:SetTexture ([[Interface\TUTORIALFRAME\UI-TutorialFrame-TheDude]])
+ thedude2:SetPoint ("bottomright", sword_icon, "bottomleft", 70, 19)
+ thedude2:SetWidth (128*1.0)
+ thedude2:SetHeight (128*1.0)
+ thedude2:SetTexCoord (0, 1, 0, 1)
+ thedude2:SetDrawLayer ("overlay", 3)
+
+ local NumeralType1_text = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ NumeralType1_text:SetText ("1K = 1.000 |cFFFFCC00| |r10K = 10.000 |cFFFFCC00| |r100K = 100.000 |cFFFFCC00| |r1M = 1.000.000")
+ NumeralType1_text:SetWidth (500)
+ NumeralType1_text:SetHeight (40)
+ NumeralType1_text:SetJustifyH ("left")
+ NumeralType1_text:SetJustifyV ("top")
+ NumeralType1_text:SetTextColor (.8, .8, .8, 1)
+ NumeralType1_text:SetPoint ("topleft", window, "topleft", 40, -150)
+
+ local NumeralType2_text = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ NumeralType2_text:SetText ("1천 = 1.000 |cFFFFCC00| |r1만 = 10.000 |cFFFFCC00| |r10만 = 100.000 |cFFFFCC00| |r100만 = 1.000.000")
+ NumeralType2_text:SetWidth (500)
+ NumeralType2_text:SetHeight (40)
+ NumeralType2_text:SetJustifyH ("left")
+ NumeralType2_text:SetJustifyV ("top")
+ NumeralType2_text:SetTextColor (.8, .8, .8, 1)
+ NumeralType2_text:SetPoint ("topleft", window, "topleft", 40, -220)
+
+ if (_detalhes.numerical_system == 1) then --> west
+ WesternNumbersCheckbox:SetValue (true)
+ AsianNumbersCheckbox:SetValue (false)
+ elseif (_detalhes.numerical_system == 2) then --> east
+ WesternNumbersCheckbox:SetValue (false)
+ AsianNumbersCheckbox:SetValue (true)
+ end
+
+ pages [#pages+1] = {thedude2, sword_icon2, numeral_image, texto2Numeral, NumeralType1_text, NumeralType2_text, window.changemindNumeralLabel, window.AsianNumbersLabel, AsianNumbersCheckbox, window.WesternNumbersLabel, WesternNumbersCheckbox}
+
+ for _, widget in ipairs (pages[#pages]) do
+ widget:Hide()
+ end
+
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+--> page 4
+
+ -- DPS effective or active
+
+ local ampulheta = window:CreateTexture (nil, "overlay")
+ ampulheta:SetTexture ([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]])
+ ampulheta:SetPoint ("bottomright", window, "bottomright", -10, 10)
+ ampulheta:SetHeight (125*3)--125
+ ampulheta:SetWidth (89*3)--82
+ ampulheta:SetAlpha (.05)
+ ampulheta:SetTexCoord (1, 0, 0, 1)
+
+ g:NewLabel (window, _, "$parentChangeMind2Label", "changemind2Label", Loc ["STRING_WELCOME_2"], "GameFontNormal", 9, "orange")
+ window.changemind2Label:SetPoint ("center", window, "center")
+ window.changemind2Label:SetPoint ("bottom", window, "bottom", 0, 19)
+ window.changemind2Label.align = "|"
+
+ local texto2 = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ texto2:SetPoint ("topleft", window, "topleft", 20, -80)
+ texto2:SetText (Loc ["STRING_WELCOME_3"])
+
+ --chronometer checkbox
+ g:NewLabel (window, _, "$parentChronometerLabel", "ChronometerLabel", Loc ["STRING_WELCOME_4"], "GameFontHighlightLeft")
+ local chronometer = g:NewSwitch (window, _, "WelcomeWindowChronometer", "WelcomeWindowChronometer", 20, 20, _, _, true)
+ chronometer:SetAsCheckBox()
+ chronometer:SetFixedParameter (1)
+ chronometer:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
+ window.ChronometerLabel:SetPoint ("left", chronometer, "right", 2, 0)
+
+ --continuouses checkbox
+ g:NewLabel (window, _, "$parentContinuousLabel", "ContinuousLabel", Loc ["STRING_WELCOME_5"], "GameFontHighlightLeft")
+ local continuous = g:NewSwitch (window, _, "WelcomeWindowContinuous", "WelcomeWindowContinuous", 20, 20, _, _, true)
+ continuous:SetAsCheckBox()
+ continuous:SetFixedParameter (1)
+ continuous:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
+ window.ContinuousLabel:SetPoint ("left", continuous, "right", 2, 0)
+
+ --on clkich chronomoeter checkbox
+ chronometer.OnSwitch = function()
+ chronometer:SetValue (true)
+ continuous:SetValue (false)
+ _detalhes.time_type = 1
+ end
+
+ --on click continuous check box
+ continuous.OnSwitch = function()
+ continuous:SetValue (true)
+ chronometer:SetValue (false)
+ _detalhes.time_type = 2
+ end
+
+ chronometer:SetPoint ("topleft", window, "topleft", 40, -130)
+ continuous:SetPoint ("topleft", window, "topleft", 40, -200)
+
+ local sword_icon = window:CreateTexture (nil, "overlay")
+ sword_icon:SetTexture ([[Interface\TUTORIALFRAME\UI-TutorialFrame-AttackCursor]])
+ sword_icon:SetPoint ("topright", window, "topright", -15, -30)
+ sword_icon:SetWidth (64*1.4)
+ sword_icon:SetHeight (64*1.4)
+ sword_icon:SetTexCoord (1, 0, 0, 1)
+ sword_icon:SetDrawLayer ("overlay", 2)
+
+ local thedude = window:CreateTexture (nil, "overlay")
+ thedude:SetTexture ([[Interface\TUTORIALFRAME\UI-TutorialFrame-TheDude]])
+ thedude:SetPoint ("bottomright", sword_icon, "bottomleft", 70, 19)
+ thedude:SetWidth (128*1.0)
+ thedude:SetHeight (128*1.0)
+ thedude:SetTexCoord (0, 1, 0, 1)
+ thedude:SetDrawLayer ("overlay", 3)
+
+ local chronometer_text = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ chronometer_text:SetText (Loc ["STRING_WELCOME_6"])
+ chronometer_text:SetWidth (360)
+ chronometer_text:SetHeight (40)
+ chronometer_text:SetJustifyH ("left")
+ chronometer_text:SetJustifyV ("top")
+ chronometer_text:SetTextColor (.8, .8, .8, 1)
+ chronometer_text:SetPoint ("topleft", window.ChronometerLabel.widget, "topright", 20, 0)
+
+ local continuous_text = window:CreateFontString (nil, "overlay", "GameFontNormal")
+ continuous_text:SetText (Loc ["STRING_WELCOME_7"])
+ continuous_text:SetWidth (340)
+ continuous_text:SetHeight (40)
+ continuous_text:SetJustifyH ("left")
+ continuous_text:SetJustifyV ("top")
+ continuous_text:SetTextColor (.8, .8, .8, 1)
+ continuous_text:SetPoint ("topleft", window.ContinuousLabel.widget, "topright", 20, 0)
+
+ if (_detalhes.time_type == 1) then --> chronometer
+ chronometer:SetValue (true)
+ continuous:SetValue (false)
+ elseif (_detalhes.time_type == 2) then --> continuous
+ chronometer:SetValue (false)
+ continuous:SetValue (true)
+ end
+
+ local pleasewait = window:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
+ pleasewait:SetPoint ("bottomright", forward, "topright")
+
+ local free_frame3 = CreateFrame ("frame", nil, window)
+ function _detalhes:FreeTutorialFrame3()
+ if (window_openned_at+10 > time()) then
+ pleasewait:Show()
+ forward:Disable()
+ pleasewait:SetText ("wait... " .. window_openned_at + 10 - time())
+ else
+ pleasewait:Hide()
+ pleasewait:SetText ("")
+ forward:Enable()
+ _detalhes:CancelTimer (window.free_frame3_schedule)
+ window.free_frame3_schedule = nil
+ end
+ end
+ free_frame3:SetScript ("OnShow", function()
+ if (window_openned_at-10 > time()) then
+ forward:Disable()
+ if (window.free_frame3_schedule) then
+ _detalhes:CancelTimer (window.free_frame3_schedule)
+ window.free_frame3_schedule = nil
+ end
+ window.free_frame3_schedule = _detalhes:ScheduleRepeatingTimer ("FreeTutorialFrame3", 1)
+ end
+ end)
+ free_frame3:SetScript ("OnHide", function()
+ if (window.free_frame3_schedule) then
+ _detalhes:CancelTimer (window.free_frame3_schedule)
+ window.free_frame3_schedule = nil
+ pleasewait:SetText ("")
+ pleasewait:Hide()
+ end
+ end)
+
+ pages [#pages+1] = {pleasewait, free_frame3, thedude, sword_icon, ampulheta, texto2, chronometer, continuous, chronometer_text, continuous_text, window.changemind2Label, window.ContinuousLabel, window.ChronometerLabel}
+
+ for _, widget in ipairs (pages[#pages]) do
+ widget:Hide()
+ end
+
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> page 4
@@ -1070,7 +938,7 @@ local window_openned_at = time()
window.changemind4Label:SetPoint ("center", window, "center")
window.changemind4Label:SetPoint ("bottom", window, "bottom", 0, 19)
window.changemind4Label.align = "|"
-
+
local texto4 = window:CreateFontString (nil, "overlay", "GameFontNormal")
texto4:SetPoint ("topleft", window, "topleft", 20, -80)
texto4:SetText (Loc ["STRING_WELCOME_41"])
@@ -1085,7 +953,7 @@ local window_openned_at = time()
interval_text:SetPoint ("topleft", window, "topleft", 30, -110)
local dance_text = window:CreateFontString (nil, "overlay", "GameFontNormal")
- dance_text:SetText (Loc ["STRING_WELCOME_13"])
+ dance_text:SetText ("") --loc removed
dance_text:SetWidth (460)
dance_text:SetHeight (40)
dance_text:SetJustifyH ("left")
@@ -1094,12 +962,13 @@ local window_openned_at = time()
dance_text:SetPoint ("topleft", window, "topleft", 30, -175)
--------------- Update Speed
- g:NewLabel (window, _, "$parentUpdateSpeedLabel", "updatespeedLabel", Loc ["STRING_WELCOME_14"] .. ":", "GameFontNormal")
+ g:NewLabel (window, _, "$parentUpdateSpeedLabel", "updatespeedLabel", Loc ["STRING_OPTIONS_WINDOWSPEED"] .. ":", "GameFontNormal")
window.updatespeedLabel:SetPoint (31, -150)
--
g:NewSlider (window, _, "$parentSliderUpdateSpeed", "updatespeedSlider", 160, 20, 0.050, 3, 0.050, _detalhes.update_speed, true) --parent, container, name, member, w, h, min, max, step, defaultv
window.updatespeedSlider:SetPoint ("left", window.updatespeedLabel, "right", 2, 0)
+ window.updatespeedSlider:SetTemplate (g:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE"))
window.updatespeedSlider:SetThumbSize (50)
window.updatespeedSlider.useDecimals = true
local updateColor = function (slider, value)
@@ -1120,16 +989,16 @@ local window_openned_at = time()
updateColor (window.updatespeedSlider, _detalhes.update_speed)
window.updatespeedSlider:SetHook ("OnEnter", function()
- _detalhes:CooltipPreset (1)
- GameCooltip:AddLine (Loc ["STRING_WELCOME_15"])
- GameCooltip:ShowCooltip (window.updatespeedSlider, "tooltip")
+ -- _detalhes:CooltipPreset (1)
+ -- GameCooltip:AddLine (Loc ["STRING_WELCOME_15"]) --removed
+ -- GameCooltip:ShowCooltip (window.updatespeedSlider, "tooltip")
return true
end)
window.updatespeedSlider.tooltip = Loc ["STRING_WELCOME_15"]
--------------- Animate Rows
- g:NewLabel (window, _, "$parentAnimateLabel", "animateLabel", Loc ["STRING_WELCOME_16"] .. ":", "GameFontNormal")
+ g:NewLabel (window, _, "$parentAnimateLabel", "animateLabel", Loc ["STRING_OPTIONS_ANIMATEBARS"] .. ":", "GameFontNormal")
window.animateLabel:SetPoint (31, -170)
--
g:NewSwitch (window, _, "$parentAnimateSlider", "animateSlider", 60, 20, _, _, _detalhes.use_row_animations) -- ltext, rtext, defaultv
@@ -1137,7 +1006,10 @@ local window_openned_at = time()
window.animateSlider.OnSwitch = function (self, _, value) --> slider, fixedValue, sliderValue (false, true)
_detalhes:SetUseAnimations (value)
end
- window.animateSlider.tooltip = Loc ["STRING_WELCOME_17"]
+
+ window.animateSlider:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
+ window.animateSlider:SetAsCheckBox()
+ --window.animateSlider.tooltip = Loc ["STRING_WELCOME_17"] --removed
--------------- Fast Hps/Dps Updates
--[
@@ -1148,8 +1020,12 @@ local window_openned_at = time()
window.DpsHpsSlider:SetPoint ("left",window.DpsHpsLabel, "right", 2, 0)
window.DpsHpsSlider.OnSwitch = function (self, _, value) --> slider, fixedValue, sliderValue (false, true)
_detalhes:GetInstance(1):FastPSUpdate (value)
- end
- window.DpsHpsSlider.tooltip = Loc ["STRING_WELCOME_64"]
+ end
+
+ window.DpsHpsSlider:SetTemplate (g:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE"))
+ window.DpsHpsSlider:SetAsCheckBox()
+
+ --window.DpsHpsSlider.tooltip = Loc ["STRING_WELCOME_64"]
--]]
--------------- Max Segments
-- g:NewLabel (window, _, "$parentSliderLabel", "segmentsLabel", Loc ["STRING_WELCOME_21"] .. ":", "GameFontNormal")
@@ -1351,7 +1227,7 @@ local window_openned_at = time()
texto_shortcut:SetPoint ("topleft", window, "topleft", 25, -105)
texto_shortcut:SetText (Loc ["STRING_WELCOME_31"])
texto_shortcut:SetWidth (290)
- texto_shortcut:SetHeight (120)
+ texto_shortcut:SetHeight (160)
texto_shortcut:SetJustifyH ("left")
texto_shortcut:SetJustifyV ("top")
texto_shortcut:SetTextColor (1, 1, 1, 1)
@@ -1510,16 +1386,25 @@ local window_openned_at = time()
rawset (_detalhes.spellcache, 300001, {"Shot", 300001, [[Interface\ICONS\INV_Archaeology_Ogres_HarGunn_Eye]]})
rawset (_detalhes.spellcache, 300002, {"Mexico Travel", 300002, [[Interface\ICONS\Achievement_Dungeon_Gundrak_Normal]]})
rawset (_detalhes.spellcache, 300003, {"Rope", 300003, [[Interface\ICONS\Creatureportrait_RopeLadder01]]})
+ rawset (_detalhes.spellcache, 300004, {"A Guitar Solo", 300004, [[Interface\ICONS\INV_Staff_2h_DraenorDungeon_C_05]]})
+ rawset (_detalhes.spellcache, 300005, {"Watchtower", 300005, [[Interface\ICONS\Achievement_BG_DefendXtowers_AV]]})
+ rawset (_detalhes.spellcache, 300006, {"Oh! Hey There!", 300006, [[Interface\ICONS\Spell_Shadow_SummonSuccubus]]})
+ rawset (_detalhes.spellcache, 300007, {"I'm an Ability!", 300007, [[Interface\ICONS\Spell_Nature_Polymorph]]})
joe.targets ["My Old Lady"] = 3500000
joe.targets ["My Self"] = 2000000
joe.targets ["Another Man"] = 1000001
joe.targets ["Another Random Guy"] = 1000001
- joe.spells:PegaHabilidade (300000, true, "SPELL_DAMAGE"); joe.spells._ActorTable [300000].total = 3500000
+ joe.spells:PegaHabilidade (300000, true, "SPELL_DAMAGE"); joe.spells._ActorTable [300000].total = 4500000
joe.spells:PegaHabilidade (300001, true, "SPELL_DAMAGE"); joe.spells._ActorTable [300001].total = 1000001
joe.spells:PegaHabilidade (300002, true, "SPELL_DAMAGE"); joe.spells._ActorTable [300002].total = 1000001
joe.spells:PegaHabilidade (300003, true, "SPELL_DAMAGE"); joe.spells._ActorTable [300003].total = 2000000
+ joe.spells:PegaHabilidade (300004, true, "SPELL_DAMAGE"); joe.spells._ActorTable [300004].total = 4100000
+ joe.spells:PegaHabilidade (300005, true, "SPELL_DAMAGE"); joe.spells._ActorTable [300005].total = 1000003
+ joe.spells:PegaHabilidade (300006, true, "SPELL_DAMAGE"); joe.spells._ActorTable [300006].total = 800000
+ joe.spells:PegaHabilidade (300007, true, "SPELL_DAMAGE"); joe.spells._ActorTable [300007].total = 700000
+
--current_combat.start_time = time()-360
current_combat.start_time = GetTime() - 360
@@ -1623,8 +1508,19 @@ local window_openned_at = time()
texto:SetJustifyH ("left")
texto:SetJustifyV ("top")
texto:SetTextColor (1, 1, 1, 1)
+
+ local final_frame = CreateFrame ("frame", nil, window)
+ final_frame:SetSize (1, 1)
+ final_frame:SetPoint ("center")
+ final_frame:Hide()
+ final_frame:SetScript ("OnShow", function()
+ cancel:Enable()
+ cancel:GetNormalTexture():SetDesaturated (false)
+ end)
+
+ pages [#pages+1] = {bg8, texto8, texto, final_frame}
+
- pages [#pages+1] = {bg8, texto8, texto, report_image1}
for _, widget in ipairs (pages[#pages]) do
widget:Hide()
@@ -1632,8 +1528,8 @@ local window_openned_at = time()
------------------------------------------------------------------------------------------------------------------------------
---[[
- forward:Click()
+ --[[
+ forward:Click()
forward:Click()
forward:Click()
forward:Click()
diff --git a/gumps/switch.lua b/gumps/switch.lua
index a18232c1..d67dd420 100644
--- a/gumps/switch.lua
+++ b/gumps/switch.lua
@@ -438,19 +438,23 @@ do
all_switch.cursor_x, all_switch.cursor_y = floor (cursor_x), floor (cursor_y)
all_switch:SetScript ("OnUpdate", on_update_all_switch)
+ --[=[
all_switch.wallpaper:SetTexture (_detalhes.tooltip.menus_bg_texture)
all_switch.wallpaper:SetTexCoord (unpack (_detalhes.tooltip.menus_bg_coords))
all_switch.wallpaper:SetVertexColor (unpack (_detalhes.tooltip.menus_bg_color))
all_switch.wallpaper:SetDesaturated (true)
+ --]=]
- --the background on cooltip at the menus, are transparent
- --all_switch.background:SetTexture ("Interface\\AddOns\\Details\\Libs\\DF\\cooltip_background")
- --all_switch.background:SetTexCoord (0.10546875, 0.89453125, 0, 1)
- --all_switch.background:SetVertexColor (0.2, 0.2, 0.2, 1)
-
+ --[=[
all_switch:SetBackdrop (_detalhes.tooltip_backdrop)
all_switch:SetBackdropColor (0.09019, 0.09019, 0.18823, 1)
all_switch:SetBackdropBorderColor (unpack (_detalhes.tooltip_border_color))
+ --]=]
+
+ --updated colors (these colors are set inside the janela_principal file
+ all_switch:SetBackdrop (_detalhes.menu_backdrop_config.menus_backdrop)
+ all_switch:SetBackdropColor (unpack (_detalhes.menu_backdrop_config.menus_backdropcolor))
+ all_switch:SetBackdropBorderColor (unpack (_detalhes.menu_backdrop_config.menus_bordercolor))
end)
diff --git a/images/atributos_icones_damage.blp b/images/atributos_icones_damage.blp
index 3eead2c0..3c4c02fd 100644
Binary files a/images/atributos_icones_damage.blp and b/images/atributos_icones_damage.blp differ
diff --git a/images/atributos_icones_heal.blp b/images/atributos_icones_heal.blp
index 991c8562..413d8033 100644
Binary files a/images/atributos_icones_heal.blp and b/images/atributos_icones_heal.blp differ
diff --git a/images/icons2.blp b/images/icons2.blp
index 3e22eab0..5150e4f4 100644
Binary files a/images/icons2.blp and b/images/icons2.blp differ
diff --git a/images/plater_icon.blp b/images/plater_icon.blp
new file mode 100644
index 00000000..5bdf8e92
Binary files /dev/null and b/images/plater_icon.blp differ
diff --git a/images/plater_image.blp b/images/plater_image.blp
new file mode 100644
index 00000000..415b38c0
Binary files /dev/null and b/images/plater_image.blp differ
diff --git a/images/run_code.blp b/images/run_code.blp
new file mode 100644
index 00000000..ea44940b
Binary files /dev/null and b/images/run_code.blp differ
diff --git a/plugins/Details_3DModelsPaths/Details_3DModelsPaths.toc b/plugins/Details_3DModelsPaths/Details_3DModelsPaths.toc
index 039444d2..159fa6cc 100644
--- a/plugins/Details_3DModelsPaths/Details_3DModelsPaths.toc
+++ b/plugins/Details_3DModelsPaths/Details_3DModelsPaths.toc
@@ -1,4 +1,4 @@
-## Interface: 70300
+## Interface: 80000
## Title: Details! 3D Model Viewer
## Notes: When the 3d models option is enabled, this tool is used to select which model will be used on the window's rows.
## DefaultState: Enabled
diff --git a/plugins/Details_DataStorage/Details_DataStorage.lua b/plugins/Details_DataStorage/Details_DataStorage.lua
index b377130d..7493fe09 100644
--- a/plugins/Details_DataStorage/Details_DataStorage.lua
+++ b/plugins/Details_DataStorage/Details_DataStorage.lua
@@ -29,7 +29,9 @@ f:SetScript ("OnEvent", function (self, event, addonName)
end
end
- print ("|cFFFFFF00Details! Storage|r: loaded!")
+ if (_detalhes and _detalhes.debug) then
+ print ("|cFFFFFF00Details! Storage|r: loaded!")
+ end
DETAILS_STORAGE_LOADED = true
end
diff --git a/plugins/Details_DataStorage/Details_DataStorage.toc b/plugins/Details_DataStorage/Details_DataStorage.toc
index 854ffda0..0ef21e4f 100644
--- a/plugins/Details_DataStorage/Details_DataStorage.toc
+++ b/plugins/Details_DataStorage/Details_DataStorage.toc
@@ -1,4 +1,4 @@
-## Interface: 70300
+## Interface: 80000
## Title: Details Storage
## Notes: Stores information for Details!
## DefaultState: Enabled
diff --git a/plugins/Details_DmgRank/Details_DmgRank.lua b/plugins/Details_DmgRank/Details_DmgRank.lua
index 5a1f12a0..e69de29b 100644
--- a/plugins/Details_DmgRank/Details_DmgRank.lua
+++ b/plugins/Details_DmgRank/Details_DmgRank.lua
@@ -1,571 +0,0 @@
-local AceLocale = LibStub ("AceLocale-3.0")
-local Loc = AceLocale:GetLocale ("DetailsDmgRank")
-
---> Needed locals
-local _GetTime = GetTime --> wow api local
-local _UFC = UnitAffectingCombat --> wow api local
-local _IsInRaid = IsInRaid --> wow api local
-local _IsInGroup = IsInGroup --> wow api local
-local _UnitAura = UnitAura --> wow api local
-local _math_floor = math.floor --> lua library local
-local _cstr = string.format --> lua library local
-
-local _
-
---> Create the plugin Object
-local DmgRank = _detalhes:NewPluginObject ("Details_DmgRank")
---> Main Frame
-local DmgRankFrame = DmgRank.Frame
-
-DmgRank:SetPluginDescription ("A plugin for you have fun with a training dummy testing your damage skill and gear, leveling through many challenges.")
-
-
---> this function will run when the plugin receives the Addon_Loaded event, ["data"] = previus saved player rank
-local function CreatePluginFrames (data)
-
- --> catch Details! main object
- local _detalhes = _G._detalhes
- local DetailsFrameWork = _detalhes.gump
- --local
-
- --> default rank table
- DmgRank.rank = DmgRank.db
- --DmgRank.rank.level = 20
-
- --> OnEvent Table
- function DmgRank:OnDetailsEvent (event, ...)
- if (event == "HIDE") then --> plugin hidded, disabled
- DmgRankFrame:SetScript ("OnUpdate", nil)
- DmgRank:Cancel()
-
- elseif (event == "SHOW") then
-
- elseif (event == "REFRESH") then --> requested a refresh window
- DmgRank:Refresh()
-
- elseif (event == "COMBAT_PLAYER_ENTER") then --> combat started
- --print ("recebeu event start")
- local combat = select (1, ...)
- DmgRank:Start()
-
- elseif (event == "PLUGIN_DISABLED") then
- DmgRankFrame:SetScript ("OnUpdate", nil)
- DmgRank:Cancel()
-
- elseif (event == "PLUGIN_ENABLED") then
-
-
- end
- end
-
- local close_button = DmgRank:CreateSoloCloseButton()
- close_button:SetPoint ("TOPRIGHT", DmgRankFrame, "TOPRIGHT", 3, 5)
- close_button:SetSize (24, 24)
-
-------------- Build Ranking ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
-
- --> damage goal table
- DmgRank.TimeGoal = {
-
- --> The 30 seconds Trial
- {time = 30, damage = 3500000, name = Loc ["CHALLENGENAME_1"]}, -- Ready to Raid -- rank 2 --> -- Patrulha --> ~11K DPS required
- {time = 30, damage = 4200000, name = Loc ["CHALLENGENAME_2"]}, -- Damage Practice --rank 3 --> -- Soldier --> ~14K DPS required
- {time = 30, damage = 5000000, name = Loc ["CHALLENGENAME_3"]}, -- The Training Continue... -- rank 4 --> -- Corporal --> ~16K DPS required
-
- --> 90 seconds bracket
- {time = 90, damage = 16010100, name = Loc ["CHALLENGENAME_4"]}, -- You Just Need a Little More Time -- rank 5 --> -- Sergeant --> ~17K DPS required
- {time = 90, damage = 16666600, name = Loc ["CHALLENGENAME_5"]}, -- Became a Knight -- rank 6 --> -- Sergeant --> ~18K DPS required
-
- --> middle bracket
- {time = 120, damage = 22541200, name = Loc ["CHALLENGENAME_6"]}, -- Two Minutes -- rank 7 --> Iron Knight --> ~18K DPS required
- {time = 120, damage = 24095000, name = Loc ["CHALLENGENAME_7"]}, --rank 8 --> Steel Knight --> ~20K DPS required
- {time = 180, damage = 33900000, name = Loc ["CHALLENGENAME_8"]}, --rank 9 --> --> The High Knight --> ~18K DPS required
- {time = 180, damage = 34990000, name = Loc ["CHALLENGENAME_9"]}, --rank 10 --> Yes Sir! -- Thorium Knight --> ~19K DPS required
- {time = 180, damage = 37840510, name = Loc ["CHALLENGENAME_10"]}, --rank 11 --> Salute -- Silver Lieutenant --> ~21K DPS required
-
- --> burst bracket
- {time = 40, damage = 13511440, name = Loc ["CHALLENGENAME_11"]}, --rank 12 --> In Burst We Trust -- Gold Lieutenant --> ~33K DPS required
- {time = 40, damage = 14944040, name = Loc ["CHALLENGENAME_12"]}, --rank 13 --> Watch me Explode -- Stone Guardian --> ~37K DPS required
- {time = 40, damage = 15699000, name = Loc ["CHALLENGENAME_13"]}, --rank 14 --> T.N.T-- Fel Guardian --> ~39K DPS required
-
- --> long run bracket
- {time = 300, damage = 62112010, name = Loc ["CHALLENGENAME_14"]}, --rank 15 --> Time is Damage My Friend -- Titan Guardian --> ~20K DPS required
- {time = 300, damage = 68424590, name = Loc ["CHALLENGENAME_15"]}, --rank 16 - Just a Little Patience --> Bronze Centurion --> ~22K DPS required
- {time = 300, damage = 75119830, name = Loc ["CHALLENGENAME_16"]}, --rank 17 --> Silver Centurion --> ~25K DPS required
-
- {time = 120, damage = 40111000, name = Loc ["CHALLENGENAME_17"]}, --rank 18 --> Flame Centurion --> ~33K DPS required
- {time = 120, damage = 43000000, name = Loc ["CHALLENGENAME_18"]}, --rank 19 --> Lower Vanquisher --> 35K DPS required
- {time = 60, damage = 26500000, name = Loc ["CHALLENGENAME_19"]}, --rank 20 --> Middle Vanquisher --> 44K DPS required
-
- --> end
- {time = nil, damage = nil, name = ""}, --rank 21 --> none
- }
-
- --> tiles and badges
- DmgRank.Titles = {
-
- Loc ["RANKNAME_1"], --> rank 1 --> -- recruit -- Recruta -- Farmer
- Loc ["RANKNAME_2"], --> rank 2 --> soldier
- Loc ["RANKNAME_3"], --> rank 3 --> corporal
-
- Loc ["RANKNAME_4"], --> rank 4 --> -- Gold Sergeant
- Loc ["RANKNAME_5"], --> rank 5 --> -- Star Sergeant
-
- Loc ["RANKNAME_6"], --> rank 6 - Iron Knight
- Loc ["RANKNAME_7"], --> rank 7 - Steel Knight
- Loc ["RANKNAME_8"], --> rank 8 - Mithril Knight
- Loc ["RANKNAME_9"], --> rank 9 - Thorium Knight
-
- Loc ["RANKNAME_10"], --> rank 10 - Silver Lieutenant
- Loc ["RANKNAME_11"], --> rank 11 - Gold Lieutenant
-
- Loc ["RANKNAME_12"], --> rank 12 - Stone Guardian
- Loc ["RANKNAME_13"], --> rank 13 - Fel Guardian
- Loc ["RANKNAME_14"], --> rank 14 - Titan Guardian
-
- Loc ["RANKNAME_15"], --> rank 15 - Bronze Centurion
- Loc ["RANKNAME_16"], --> rank 16 - Silver Centurion
- Loc ["RANKNAME_17"], --> rank 17 - Flame Centurion
-
- Loc ["RANKNAME_18"], --> rank 18 - "Lower Vanquisher"
- Loc ["RANKNAME_19"], --> rank 19 - "Middle Vanquisher"
- Loc ["RANKNAME_20"], --> rank 20 - "High Vanquisher"
-
- --[[
- legionary
- Commander
- General
- marshal
- Champion -- campeoao
- Conqueror -- conquistador
- --]]
-
- }
- DmgRank.Badges = {}
- DmgRank.Badges.TexCoords = {
- {0.7734375, 0.89453125, 0.060546875, 0.181640625}, --> rank 1
- {0.1640625, 0.259765625, 0.083984375, 0.185546875}, --> rank 2 - soldier
- {0.31640625, 0.412109375, 0.06640625, 0.18359375}, --> rank 3 --> Corporal
- {0.45703125, 0.55078125, 0.05859375, 0.177734375}, --> rank 4 --> Gold Sergeant
- {0.607421875, 0.701171875, 0.044921875, 0.177734375}, --> rank 5 --> star Sergeant
-
- {0.017578125, 0.169921875, 0.236328125, 0.3984375}, --> rank 6 - Iron Knight
- {0.201171875, 0.357421875, 0.234375, 0.3984375}, --> rank 7 - Steel Knight
- {0.38671875, 0.541015625, 0.234375, 0.3984375}, --> rank 8 - Mithril Knight
- {0.572265625, 0.7265625, 0.234375, 0.3984375}, --> rank 9 - Thorium Knight
-
- {0.16015625, 0.2734375, 0.44921875, 0.583984375}, --> rank 10 - Silver Lieutenant
- {0.0234375, 0.130859375, 0.44921875, 0.583984375}, --> rank 11 - Gold Lieutenant
-
- {0.30078125, 0.4375, 0.44140625, 0.5859375}, --> rank 12 - Stone Guardian
- {0.45703125, 0.59375, 0.44140625, 0.5859375}, --> rank 13 - Fel Guardian
- {0.61328125, 0.75, 0.44140625, 0.5859375}, --> rank 14 - Titan Guardian
-
- {0.017578125, 0.173828125, 0.625, 0.78125}, --> rank 15 - Bronze Centurion
- {0.212890625, 0.369140625, 0.625, 0.78125}, --> rank 16 - Silver Centurion
- {0.408203125, 0.56640625, 0.625, 0.78125}, --> rank 17 - Flame Centurion
-
- {0.00390625, 0.208984375, 0.810546875, 0.9765625}, --> rank 18 - Lower Vanquisher
- {0.21875, 0.42578125, 0.810546875, 0.9765625}, --> rank 19 - Middle Vanquisher
- {0.43359375, 0.638671875, 0.810546875, 0.9765625}, --> rank 20 - High Vanquisher
-
- }
- DmgRank.Badges.Sizes = {
- {50, 50}, --> rank 1
- {50, 52}, --> rank 2 - soldier
- {50, 60}, --> rank 3 - Corporal
- {49, 59}, --> rank 4 - Gold Sergeant
- {48, 61}, ---> rank 5 - star Sergeant
- {56, 63}, --> rank 6 - Iron Knight
- {56, 63}, -->rank 7 - Steel Knight
- {56, 63}, --> rank 8 - Mithril Knight
- {56, 63}, --> rank 9 - Thorium Knight
-
- {61, 59}, --> rank 10 - Silver Lieutenant
- {55, 67}, --> rank 11 - Gold Lieutenant
-
- {70, 74}, --> rank 12 - Stone Guardian
- {70, 74}, --> rank 13 - Fel Guardian
- {70, 74}, --> rank 14 - Titan Guardian
-
- {70, 70}, --> rank 15 - Bronze Centurion
- {70, 70}, --> rank 16 - Silver Centurion
- {70, 70}, --> rank 17 - Flame Centurion
-
- {80, 65}, --> rank 18 - Lower Vanquisher
- {80, 65}, --> rank 19 - Middle Vanquisher
- {80, 65}, --> rank 20 - High Vanquisher
- }
- DmgRank.Badges.SetPointMod = {
- {0, 6}, --> rank 1
- {0, 5}, --> rank 2 - soldier
- {0, 10}, --> rank 3 - Corporal
- {0, 10}, --> rank 4 - Gold Sergeant
- {0, 16}, --> rank 5 - star Sergeant
- {0, 12}, --> rank 6 - Iron Knight
- {0, 12}, --> rank 7 - Steel Knight
- {0, 12}, --> rank 8 - Mithril Knight
- {0, 12}, --> rank 9 - Thorium Knight
-
- {0, 12}, --> rank 10 - Silver Lieutenant
- {0, 17}, --> rank 11 - Gold Lieutenant
-
- {0, 20}, --> rank 12 - Stone Guardian
- {0, 20}, --> rank 13 - Fel Guardian
- {0, 20}, --> rank 14 - Titan Guardian
-
- {0, 20}, --> rank 15 - Bronze Centurion
- {0, 20}, --> rank 16 - Silver Centurion
- {0, 20}, --> rank 17 - Flame Centurion
-
- {-3, 16}, --> rank 18 - Lower Vanquisher
- {-3, 16}, --> rank 19 - Middle Vanquisher
- {-3, 16}, --> rank 20 - High Vanquisher
-
- }
-
- --> main frame and background texture
-
- DmgRankFrame:SetPoint ("topleft", UIParent)
- DmgRankFrame:SetResizable (false) --> cant resize, this is a fixed size
- DmgRankFrame:SetWidth (300) --> need to be 300x300 to fit details window
- DmgRankFrame:SetHeight (300) --> need to be 300x300 to fit details window
- DmgRank.Frame = DmgRankFrame
- DmgRankFrame:Hide()
-
- --> default background picture
- local background = DmgRankFrame:CreateTexture (nil, "background")
- background:SetTexture ("Interface\\ACHIEVEMENTFRAME\\UI-Achievement-StatsBackground")
- background:SetPoint ("topleft", DmgRankFrame, "topleft", 2, 0)
- background:SetPoint ("bottomright", DmgRankFrame, "bottomright", -2, 0)
- background:SetVertexColor (.7, .7, .7, 1)
- background:SetDrawLayer ("background", 1)
- DmgRank.BackgroundTex = background
-
- --> next rank at display
- local challengeName = DetailsFrameWork:NewLabel (DmgRankFrame, DmgRankFrame, nil, "challengeName", "", "QuestFont_Shadow_Huge")
- challengeName:SetPoint ("center", DmgRankFrame, "center")
- challengeName:SetPoint ("top", DmgRankFrame, "top", 0, -98)
- DmgRank.challengeName = challengeName
-
- local challengeGoal = DetailsFrameWork:NewLabel (DmgRankFrame, DmgRankFrame, nil, "challengeGoal", "", "GameFontHighlightSmall")
- challengeGoal:SetPoint ("center", DmgRankFrame, "center")
- challengeGoal:SetPoint ("top", DmgRankFrame, "top", 0, -118)
- DmgRank.challengeGoal = challengeGoal
-
- --> main time display
- local showTimeMinutes = DetailsFrameWork:NewLabel (DmgRankFrame, DmgRankFrame, nil, "showTimeMinutes", "00:", "GameFontHighlightLarge")
- showTimeMinutes:SetPoint ("center", DmgRankFrame, "center")
- showTimeMinutes:SetPoint ("top", DmgRankFrame, "top", -25, -150)
- showTimeMinutes:SetJustifyH ("RIGHT")
- DmgRank.TimeMinutes = showTimeMinutes
-
- local showTimeSeconds = DetailsFrameWork:NewLabel (DmgRankFrame, DmgRankFrame, nil, "showTimeSeconds", "00:", "GameFontHighlightLarge")
- showTimeSeconds:SetPoint ("center", DmgRankFrame, "center")
- showTimeSeconds:SetPoint ("top", DmgRankFrame, "top", 0, -150)
- DmgRank.TimeSeconds = showTimeSeconds
-
- local showTimeMiliSeconds = DetailsFrameWork:NewLabel (DmgRankFrame, DmgRankFrame, nil, "showTimeMiliSeconds", "00", "GameFontHighlightLarge")
- showTimeMiliSeconds:SetPoint ("center", DmgRankFrame, "center")
- showTimeMiliSeconds:SetPoint ("top", DmgRankFrame, "top", 23, -150)
- DmgRank.TimeMiliSeconds = showTimeMiliSeconds
-
- --> main damage display
- local damage = DetailsFrameWork:NewLabel (DmgRankFrame, DmgRankFrame, "showdamage", nil, "00.000.000", "GameFontHighlightLarge")
- damage:SetPoint ("center", DmgRankFrame, "center")
- damage:SetPoint ("top", DmgRankFrame, "top", 0, -170)
- DmgRank.MainDamageDisplay = damage
-
- --> background da badge e titulo
- local bg1 = DetailsFrameWork:NewPanel (DmgRankFrame, _, "DetailsDmgRankBadgeBackground", _, 280, 75)
- bg1:SetPoint ("topleft", DmgRankFrame, 10, -10)
-
- local GlowFrame = CreateFrame ("frame", "DetailsRankUpGlowFrame", bg1.widget, "DetailsAlertRankUpTemplate")
- GlowFrame:SetPoint ("topleft", bg1.widget)
- GlowFrame:SetWidth (280)
- GlowFrame:SetHeight (60)
- GlowFrame:Hide()
-
- --> badge icon display
- local titleIcon = bg1:CreateTexture (nil, "overlay")
- titleIcon:SetTexture ("Interface\\AddOns\\Details_DmgRank\\images\\badges")
- titleIcon:SetTexCoord (unpack (DmgRank.Badges.TexCoords [DmgRank.rank.level]))
- titleIcon:SetWidth (DmgRank.Badges.Sizes [DmgRank.rank.level] [1]*1.33)
- titleIcon:SetHeight (DmgRank.Badges.Sizes [DmgRank.rank.level] [2]*1.33)
- titleIcon:SetPoint ("topleft", DmgRankFrame, "topleft", 20, -20)
- DmgRank.TitleIcon = titleIcon
-
- --> title
- local pretitle = DetailsFrameWork:NewLabel (bg1, bg1, nil, "pretitle", Loc ["STRING_CURRENTRANK"], "GameFontHighlightSmall")
- pretitle:SetPoint ("left", titleIcon, "right", 20, 9)
- DmgRank.PreTitle = pretitle
-
- local title = DetailsFrameWork:NewLabel (bg1, bg1, nil, "title", DmgRank.Titles [DmgRank.rank.level], "GameFontHighlightLarge")
- title:SetPoint ("left", titleIcon, "right", 20, -9)
- DmgRank.Title = title
-
- --> help button
- --> after 10 logins on the character this help button will not be show any more
- if (_detalhes.tutorial.main_help_button < 10) then
- local help = DetailsFrameWork:NewHelp (DmgRankFrame, 280, 280, 0, -20, 40, 40)
- help:SetPoint ("topright", DmgRankFrame, "topright", 8, 9)
- help:AddHelp (300, 300, 0, 0, 138, -138, Loc ["STRING_HELP"])
- help:SetFrameLevel (DmgRankFrame:GetFrameLevel()+2)
- end
-
- --> announce switch
- local announce = DetailsFrameWork:NewSwitch (bg1, _, "DetailsDmgRankAnnouce", "announceSwitch", 60, 20, _, _, DmgRank.rank.annouce)
- bg1.announceSwitch:SetPoint ("topleft", DmgRankFrame, 12, -184)
- bg1.announceSwitch.OnSwitch = function (self, _, value)
- DmgRank.rank.annouce = value
- end
- DetailsFrameWork:NewLabel (bg1, _, nil, "announceLabel", Loc ["STRING_ANNOUNCE"], "GameFontHighlightSmall")
- bg1.announceLabel:SetPoint ("bottom", bg1.announceSwitch, "top", -5, -2)
-
- --> background dos tempos das ultimas tries
- local lasttrylabel = DetailsFrameWork:NewLabel (bg1, bg1, nil, "lasttrylabel", Loc ["STRING_LASTTRIES"], "GameFontHighlightSmall") -->
- lasttrylabel:SetPoint ("topleft", DmgRankFrame, 12, -204)
- local lastranklabel = DetailsFrameWork:NewLabel (bg1, bg1, nil, "lastranklabel", Loc ["STRING_LASTRANKS"], "GameFontHighlightSmall") -->
- lastranklabel:SetPoint ("topleft", DmgRankFrame, 162, -204)
-
- local bg_esq = DetailsFrameWork:NewPanel (DmgRankFrame, _, "DetailsDmgRankLeftBackground", _, 130, 85, _, {.9, .9, .9, .7})
- bg_esq:SetPoint ("topleft", DmgRankFrame, 10, -215)
- local bg_dir = DetailsFrameWork:NewPanel (DmgRankFrame, _, "DetailsDmgRankRightBackground", _, 130, 85, _, {.9, .9, .9, .7})
- bg_dir:SetPoint ("topleft", DmgRankFrame, 160, -215)
-
- --> try dps dos 5 ultimos ranks
- DmgRank.Try = {}
- for i = 1, 5 do
- DetailsFrameWork:NewLabel (bg_esq, bg_esq, nil, "try"..i, "0", "GameFontHighlightSmall")
- bg_esq ["try"..i]:SetPoint ("bottomleft", DmgRankFrame, "bottomleft", 20, math.abs (i*15-83))
- DmgRank.Try [i] = bg_esq ["try"..i]
- end
-
- --> dps dos 5 ultimos ranks
- DmgRank.Dps = {}
- for i = 1, 5 do
- DetailsFrameWork:NewLabel (bg_dir, bg_dir, nil, "dps"..i, "0", "GameFontHighlightSmall")
- bg_dir ["dps"..i]:SetPoint ("bottomleft", DmgRankFrame, "bottomleft", 170, math.abs (i*15-83))
- DmgRank.Dps [i] = bg_dir ["dps"..i]
- end
-
- --> refresh all window components
- function DmgRank:Refresh()
- --> update badge icon and text
-
- if (not self) then
- self = DmgRank
- end
-
- self.challengeName:SetText (self.TimeGoal[DmgRank.rank.level].name)
- if (self.TimeGoal[DmgRank.rank.level].damage) then
- self.challengeGoal:SetText (_detalhes:comma_value (self.TimeGoal[DmgRank.rank.level].damage) .. " ".. Loc ["STRING_DAMAGEIN"] .." " .. self.TimeGoal[DmgRank.rank.level].time .. " " ..Loc ["STRING_SECONDS"])
- else
- self.challengeGoal:SetText ("")
- end
- self.Title:SetText (self.Titles [DmgRank.rank.level])
-
- self.TitleIcon:SetTexCoord (unpack (self.Badges.TexCoords [DmgRank.rank.level]))
- self.TitleIcon:SetWidth (self.Badges.Sizes [DmgRank.rank.level] [1]*1.33)
- self.TitleIcon:SetHeight (self.Badges.Sizes [DmgRank.rank.level] [2]*1.33)
- self.TitleIcon:SetPoint ("topleft", DmgRankFrame, 20+self.Badges.SetPointMod[DmgRank.rank.level][1], -20+self.Badges.SetPointMod[DmgRank.rank.level][2])
-
- --> update last try atempts
- for i = 1, 5 do
- if (DmgRank.rank.lasttry [i]) then
- self.Try [i]:SetText ("#"..i..": ".. _detalhes:comma_value (DmgRank.rank.lasttry [i]))
- else
- self.Try [i]:SetText ("-")
- end
- end
-
- --> update last levels ups
- for i = 1, 5 do
- if (DmgRank.rank.dpshistory [i]) then
- self.Dps [i]:SetText (Loc ["STRING_RANK"] .. " ".. DmgRank.rank.dpshistory [i])
- else
- self.Dps [i]:SetText ("-")
- end
- end
- end
-
- --> Refresh on Addon Load
- DmgRank:Refresh()
-
- local update = 0
- local player --> short cut for Player Actor Object
-
- --> Cancel function
- function DmgRank:Cancel()
- if (DmgRank.Time and DmgRank.Time.Working) then
- print (Loc ["STRING_CANCELLED"])
- DmgRank.Time.Working = false
- DmgRank.Time.Done = true
- DmgRank.Frame:SetScript ("OnUpdate", nil)
- end
- end
-
- --> Exec function
- local DoDmgRank = function (self, elapsed)
-
- DmgRank.Time.Elapsed = DmgRank.Time.Elapsed + elapsed
- update = update + elapsed
-
- if (_GetTime() > DmgRank.Time.EndTime) then --> reached the end time
- if (DmgRank.Time.Working and not DmgRank.Time.Done) then
- DmgRank:Finish()
- else
- DmgRank.Time.Working = false
- DmgRank.Time.Done = true
- DmgRank.Frame:SetScript ("OnUpdate", nil)
- end
- else
-
- DmgRank.Time.Tick = DmgRank.Time.Tick + elapsed
-
- if (DmgRank.Time.Tick > 1) then
- DmgRank.Time.Tick = 0
- if (not _UFC ("player")) then --> isn't in combat
- DmgRank:Finish()
- end
- else
- if (not player) then
- player = _detalhes:GetActor()
- end
-
- if (player) then
- local minutos, segundos = _math_floor (DmgRank.Time.Elapsed/60), _math_floor (DmgRank.Time.Elapsed%60)
- if (segundos < 10) then
- segundos = "0"..segundos
- end
-
- local mili = _cstr ("%.2f", DmgRank.Time.Elapsed - _math_floor (DmgRank.Time.Elapsed))*100
- if (mili < 10) then
- mili = "0"..mili
- end
-
- DmgRank.TimeMinutes:SetText ("0".. minutos .. ":")
- DmgRank.TimeSeconds:SetText (segundos ..":")
- DmgRank.TimeMiliSeconds:SetText (mili)
-
- local DamageGoal = DmgRank.TimeGoal [DmgRank.rank.level].damage
- if (player.total > DamageGoal) then --> yeah, you didit
- DmgRank.MainDamageDisplay:SetTextColor (0.3, 1, 0.1)
- else
- DmgRank.MainDamageDisplay:SetTextColor (1, 1, 1)
- end
-
- DmgRank.MainDamageDisplay:SetText (_detalhes:comma_value (player.total))
- end
- end
- end
-
- end
-
- --> add failed attempt to falied records
- function DmgRank:FailedLevelUpRank()
- table.insert (DmgRank.rank.lasttry, 1, player.total)
- table.remove (DmgRank.rank.lasttry, 6)
- DmgRank:Refresh()
- end
-
- --> Levelup
- function DmgRank:LevelUpRank()
- _detalhes:PlayGlow (GlowFrame)
- DmgRank.rank.level = DmgRank.rank.level + 1
-
- if (DmgRank.rank.annouce) then
- SendChatMessage (UnitName ("player") .. " " .. Loc ["STRING_ANNOUNCE_STRING"] .. " " .. DmgRank.rank.level .. " (" .. self.Titles [DmgRank.rank.level] .. ") " .. Loc ["STRING_ANNOUNCE_ON"] .. " Details!: " .. Loc ["STRING_PLUGIN_NAME"] .. ".", "GUILD")
- end
-
- DmgRank.rank.dps = player.total
- table.insert (DmgRank.rank.dpshistory, 1, DmgRank.rank.level..": ".._detalhes:comma_value (player.total))
- table.remove (DmgRank.rank.dpshistory, 6)
- DmgRank:Refresh()
- end
-
- --> When the time is gone
- function DmgRank:Finish()
- DmgRank.Frame:SetScript ("OnUpdate", nil)
-
- if (player) then
- local DamageGoal = DmgRank.TimeGoal [DmgRank.rank.level].damage --> damage
- if (player.total > DamageGoal) then --> yeah, you didit
- DmgRank:LevelUpRank()
- else
- DmgRank:FailedLevelUpRank()
- end
- end
-
- DmgRank.Time.Working = false
- DmgRank.Time.Done = true
- end
-
- --> When a new combat is received by the PlugIn
- function DmgRank:Start()
-
- if (DmgRank.Time and DmgRank.Time.Working) then
- DmgRank:Msg ("Plugin already in use.")
- return
- end
-
- if (not DmgRank.TimeGoal[DmgRank.rank.level].damage) then
- DmgRank:Msg ("There is no goal for this level.")
- return
- end
-
- --> reset
- DmgRank.TimeMinutes:SetText ("00:")
- DmgRank.TimeSeconds:SetText ("00:")
- DmgRank.TimeMiliSeconds:SetText ("00")
- DmgRank.MainDamageDisplay:SetText ("00.000.000")
-
- DmgRank.Time = {}
- DmgRank.Time.StartTime = _GetTime()
- DmgRank.Time.EndTime = DmgRank.Time.StartTime + DmgRank.TimeGoal [DmgRank.rank.level].time
- DmgRank.Time.Elapsed = 3
- DmgRank.Time.Done = nil
- DmgRank.Time.Working = true
- DmgRank.Time.Tick = 0
- player = _detalhes:GetActor() --> param 1 = combat | param 2 = attribute | param 3 = player name
- update = 0
-
- DmgRank.starting = DmgRank:ScheduleTimer ("StartUpdate", 3)
- end
-
- function DmgRank:StartUpdate()
- player = _detalhes:GetActor()
- DmgRank.Frame:SetScript ("OnUpdate", DoDmgRank)
- end
-
-end
-
-function DmgRank:OnEvent (_, event, ...)
-
- if (event == "ADDON_LOADED") then
- local AddonName = select (1, ...)
- if (AddonName == "Details_DmgRank") then
-
- if (_G._detalhes) then
-
- local MINIMAL_DETAILS_VERSION_REQUIRED = 50
-
- local default_config = {level = 1, dps = 0, dpshistory = {}, lasttry = {}, annouce = true}
-
- --> Install plugin inside details
- local install, saveddata = _G._detalhes:InstallPlugin ("SOLO", Loc ["STRING_PLUGIN_NAME"], "Interface\\Icons\\ACHIEVEMENT_GUILDPERK_HONORABLEMENTION_RANK2", DmgRank, "DETAILS_PLUGIN_DAMAGE_RANK", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", "v1.2.0", default_config)
- if (type (install) == "table" and install.error) then
- print (install.error)
- end
-
- --> create widgets
- CreatePluginFrames()
-
- --> Register needed events
- _G._detalhes:RegisterEvent (DmgRank, "COMBAT_PLAYER_ENTER")
-
- end
- end
-
- end
-end
\ No newline at end of file
diff --git a/plugins/Details_DmgRank/Details_DmgRank.toc b/plugins/Details_DmgRank/Details_DmgRank.toc
index 22969e26..42b2099c 100644
--- a/plugins/Details_DmgRank/Details_DmgRank.toc
+++ b/plugins/Details_DmgRank/Details_DmgRank.toc
@@ -1,4 +1,4 @@
-## Interface: 70300
+## Interface: 80000
## Title: Details Damage, the Game! (plugin)
## Notes: Plugin for Details
## RequiredDeps: Details
diff --git a/plugins/Details_DpsTuning/Details_DpsTuning.lua b/plugins/Details_DpsTuning/Details_DpsTuning.lua
index 276a2ab0..e69de29b 100644
--- a/plugins/Details_DpsTuning/Details_DpsTuning.lua
+++ b/plugins/Details_DpsTuning/Details_DpsTuning.lua
@@ -1,1242 +0,0 @@
-local Loc = LibStub ("AceLocale-3.0"):GetLocale ("Details")
-
---> Main Plugin Object
-local DpsTuningPlugin = _detalhes:NewPluginObject ("Details_DpsTuning")
---> Main Frame
-local SDF = DpsTuningPlugin.Frame
-
---> global pointers
-local ClockTime = time --> lua library local
-local ipairs = ipairs --> lua library local
-local pairs = pairs --> lua library local
-local floor = floor --> lua library local
-local _cstr = string.format --> lua library local
-
-local GetSpellBonusDamage = GetSpellBonusDamage
-local UnitAura = UnitAura --> wow api local
-local GetTime = GetTime --> wow api local
-local _
-
-local _GetSpellInfo =_detalhes.getspellinfo --> details api local
-
-DpsTuningPlugin:SetPluginDescription ("Tool for testing your Dps showing detailed information for each spell, buffs and also graphical charts for abilities.")
-
-local function CreatePluginFrames()
-
- --> get the framework
- local fw = _detalhes:GetFramework()
-
- --> player damage done chart code
- local string_player_damage_done = [[
-
- -- the goal of this script is get the current combat then get your character and extract your damage done.
- -- the first thing to do is get the combat, so, we use here the command "_detalhes:GetCombat ( "overall" "current" or "segment number")"
-
- local current_combat = _detalhes:GetCombat ("current") --> getting the current combat
-
- -- the next step is request your character from the combat
- -- to do this, we take the combat which here we named "current_combat" and tells what we want inside parentheses.
-
- local my_self = current_combat (DETAILS_ATTRIBUTE_DAMAGE, _detalhes.playername)
-
- -- _detalhes.playername holds the name of your character.
- -- DETAILS_ATTRIBUTE_DAMAGE means we want the damage table, _HEAL _ENERGY _MISC is the other 3 tables.
-
- -- before we proceed, the result needs to be checked to make sure its a valid result.
-
- if (not my_self) then
- return 0 -- the combat doesnt have *you*, this happens when you didn't deal any damage in the combat yet.
- end
-
- -- now its time to get the total damage.
-
- local my_damage = my_self.total
-
- -- then finally return the amount to the capture.
-
- return my_damage
-
- ]]
-
- --> color for spell dps bars
- DpsTuningPlugin.BarColor = {.4, .4, .4, .7}
-
- function DpsTuningPlugin:OnDetailsEvent (event, ...)
-
- if (event == "SHOW") then --> plugin shown on screen, actived
-
- SDF:SetResizable (false) --> cant resize, this is a fixed size
- SDF:SetSize (300, 300) --> need to be 300x300 to fit details window
-
- --> create the frames on the first shown
- if (not DpsTuningPlugin.frames_created) then
- DpsTuningPlugin:BuildHeader()
- DpsTuningPlugin:BuildSpellBars()
- DpsTuningPlugin:BuildSummaryPanel()
- DpsTuningPlugin:BuildBuffBlocks()
- DpsTuningPlugin:BuildChartPanels()
-
- DpsTuningPlugin.frames_created = true
- DpsTuningPlugin.Frame:Show()
-
- --tricky, localize members inside the plugin, so it doesn't need to lookup on _detalhes object every time
- DpsTuningPlugin.playername = DpsTuningPlugin.playername
- DpsTuningPlugin.comma_value = DpsTuningPlugin.comma_value
- DpsTuningPlugin.ToK2 = DpsTuningPlugin.ToK2
- DpsTuningPlugin.Sort2 = DpsTuningPlugin.Sort2
- DpsTuningPlugin.Sort3 = DpsTuningPlugin.Sort3
- end
-
- --> we only want register the player damage done when the plugin is active
- DpsTuningPlugin:TimeDataRegister ("Player Damage Done", string_player_damage_done, nil, "Spell Details", "v1.0", "Interface\\Icons\\INV_Fabric_Spellweave", true, true)
-
- elseif (event == "HIDE") then --> plugin hidded, disabled
-
- --> plugin is gone, unregister the chart
- DpsTuningPlugin:TimeDataUnregister ("Player Damage Done")
-
- elseif (event == "DETAILS_STARTED") then
-
- --> triggered right after details finish run all ADDON_LOADED functions
- local power = {}
- for i = 1, 7 do
- power [i] = {i, GetSpellBonusDamage (i)}
- end
- table.sort (power, DpsTuningPlugin.Sort2)
- DpsTuningPlugin.PowerType = power [1][1]
-
- elseif (event == "REFRESH") then --> requested a refresh window
- --> refresh window happens when there is a invalid combat, like a combat with less then 5 seconds.
- --DpsTuningPlugin:Refresh()
-
- elseif (event == "COMBAT_PLAYER_ENTER") then
- DpsTuningPlugin:OnCombatStart (...)
-
- elseif (event == "COMBAT_INVALID") then
- --DpsTuningPlugin:Reset()
- --print ("eh invalido...")
-
- elseif (event == "COMBAT_PLAYER_LEAVE") then
- DpsTuningPlugin:OnCombatEnd (...)
-
- elseif (event == "PLUGIN_DISABLED") then
- --> plugin got disabled on details options panel
-
- elseif (event == "PLUGIN_ENABLED") then
- --> plugin got enabled on details options panel
-
- elseif (event == "DETAILS_DATA_RESET") then
- --> data on details! got reseted. need to reset the plugin as well
-
- DpsTuningPlugin:TrackBuffsAtEnd()
- DpsTuningPlugin:CancelTicker()
- SDF:UnregisterEvent ("COMBAT_LOG_EVENT_UNFILTERED")
-
- DpsTuningPlugin:OnDataReset (...)
-
- end
- end
-
- local close_button = DpsTuningPlugin:CreateSoloCloseButton()
- close_button:SetPoint ("TOPRIGHT", SDF, "TOPRIGHT", -15, 5)
- close_button:SetSize (24, 24)
-
- function DpsTuningPlugin.GetActivityTime (thisspell, time)
- if (thisspell.tempo_end) then --> o tempo do jogador esta trancado
- local t = thisspell.tempo_end - thisspell.start
- if (t < 6) then
- t = 6
- end
- return t
- elseif (thisspell.onhold) then
- local t = thisspell.delay - thisspell.start
- if (t < 6) then
- t = 6
- end
- return t
- else
- if (thisspell.start == 0) then
- return 6
- end
- local t = time - thisspell.start
- if (t < 6) then
- if (DpsTuningPlugin.in_combat) then
- local combat_time = DpsTuningPlugin.CurCombat:GetCombatTime()
- if (combat_time < 6) then
- return combat_time
- end
- end
- t = 6
- end
- return t
- end
- end
-
- local spells = {cur = 0}
- local spell_activity = {}
- local buff_activity = {}
- local buff_graphic_data = {}
- local spell_graphic_data = {}
- local power_amount_chart_table = {}
- power_amount_chart_table.max_value = 0
-
- DpsTuningPlugin.FinishedAt = 0
-
- function DpsTuningPlugin.RefreshSpells()
-
- if (DpsTuningPlugin.db.SpellBarsShowType == 1) then --> execution activity dps
-
- local now = ClockTime()
- for spellid, spelltable in pairs (DpsTuningPlugin.CurPlayer:GetActorSpells()) do
-
- local this = spell_activity [spellid]
- if (not this) then
- local t = {}
- t.total = spelltable.total
- t.time = ClockTime()
- t.start = t.time
- t.tempo_end = nil
- t.lastevent = t.time
- spell_activity [spellid] = t
- this = t
- else
- local lastdamage = this.total
- if (lastdamage ~= spelltable.total) then
- this.lastevent = now
- end
-
- if (this.lastevent+6 < now) then
- --hold
- if (not this.onhold) then
- this.delay = this.lastevent
- if (this.delay < this.start) then
- this.delay = this.start
- end
- this.onhold = true
- end
- else
- --exec
- if (this.onhold) then
- local diff = now - this.delay - 2
- if (diff > 0) then
- this.start = this.start + diff
- end
- this.onhold = nil
- end
- end
-
- this.total = spelltable.total
- end
- end
-
- local i = 0
- for spellid, spelltable in pairs (spell_activity) do
- i = i + 1
-
- if (not spells [i]) then
- spells [i] = {}
- end
-
- spells [i][1] = spellid
- spells [i][2] = spelltable.total
- spells [i][3] = DpsTuningPlugin.GetActivityTime (spelltable, now)
- spells [i][4] = spells [i][2] / spells [i][3] --adps
- end
-
- spells.cur = i
- for o = #spells, i+1, -1 do
- spells [o][1] = 0
- spells [o][2] = 0
- spells [o][3] = 0
- spells [o][4] = 0
- end
-
- table.sort (spells, DpsTuningPlugin.Sort4)
-
- DpsTuningPlugin.SpellList = spells
- DpsTuningPlugin.SpellScroll:Update()
-
- elseif (DpsTuningPlugin.db.SpellBarsShowType == 2) then --> player activity dps
-
- local player_time = DpsTuningPlugin.CurPlayer:Tempo()
- local i = 0
-
- for spellid, spelltable in pairs (DpsTuningPlugin.CurPlayer:GetActorSpells()) do
- i = i + 1
-
- if (not spells [i]) then
- spells [i] = {}
- end
-
- spells [i][1] = spellid
- spells [i][2] = spelltable.total
- spells [i][3] = spelltable.total/player_time
- end
-
- spells.cur = i
- for o = #spells, i+1, -1 do
- spells [o][1] = 0
- spells [o][2] = 0
- spells [o][3] = 0
- spells [o][4] = 0
- end
-
- table.sort (spells, DpsTuningPlugin.Sort3)
-
- DpsTuningPlugin.SpellList = spells
- DpsTuningPlugin.SpellScroll:Update()
-
- elseif (DpsTuningPlugin.db.SpellBarsShowType == 3) then --> spell damage
-
- local i = 0
- for spellid, spelltable in pairs (DpsTuningPlugin.CurPlayer:GetActorSpells()) do
- i = i + 1
-
- if (not spells [i]) then
- spells [i] = {}
- end
-
- spells [i][1] = spellid
- spells [i][2] = spelltable.total
- end
-
- spells.cur = i
- for o = #spells, i+1, -1 do
- spells [o][1] = 0
- spells [o][2] = 0
- spells [o][3] = 0
- spells [o][4] = 0
- end
-
- table.sort (spells, DpsTuningPlugin.Sort2)
-
- DpsTuningPlugin.SpellList = spells
- DpsTuningPlugin.SpellScroll:Update()
-
- end
-
- end
-
- function update_scroll (self)
-
- local spells = DpsTuningPlugin.SpellList
- if (not spells) then
- for bar_index = 1, 9 do
- local bar = DpsTuningPlugin.SpellBars [bar_index]
- bar:Hide()
- end
- return
- end
-
- local offset = FauxScrollFrame_GetOffset (self)
- local amt = 0
- for index, spell in ipairs (spells) do
- if (spell[2] > 0) then
- amt = amt + 1
- end
- end
-
- for bar_index = 1, 9 do
- local data = spells [bar_index + offset]
- local bar = DpsTuningPlugin.SpellBars [bar_index]
-
- if (DpsTuningPlugin.db.SpellBarsShowType == 1) then --> execution activity dps
-
- if (data and data[3] > 0) then
- local name, _, icon = _GetSpellInfo (data [1])
- bar.icon = icon
- bar.lefttext = name
- bar.righttext = DpsTuningPlugin:comma_value (data [2]) .. " (" .. data [3] .. ", " .. DpsTuningPlugin:ToK2 (floor (data [4])) .. ")"
- bar.spellid = data [1]
- bar:Show()
- else
- bar:Hide()
- end
-
- elseif (DpsTuningPlugin.db.SpellBarsShowType == 2) then --> player activity dps
-
- if (data and data[2] > 0) then
- local name, _, icon = _GetSpellInfo (data [1])
- bar.icon = icon
- bar.lefttext = name
- bar.righttext = DpsTuningPlugin:comma_value (data [2]) .. " (" .. DpsTuningPlugin:ToK2 (floor (data [3])) .. ")"
- bar.spellid = data [1]
- bar:Show()
- else
- bar:Hide()
- end
-
- elseif (DpsTuningPlugin.db.SpellBarsShowType == 3) then --> spell damage
-
- local total = DpsTuningPlugin.CurPlayer.total
-
- if (data and data[2] > 0) then
- local name, _, icon = _GetSpellInfo (data [1])
- bar.icon = icon
- bar.lefttext = name
- bar.righttext = DpsTuningPlugin:comma_value (data [2]) .. " (" .. floor (data[2] / total * 100) .. "%)"
- bar.spellid = data [1]
- bar:Show()
- else
- bar:Hide()
- end
-
- end
- end
-
- FauxScrollFrame_Update (self, amt, 9, 15)
-
- end
-
- function DpsTuningPlugin:BuildSummaryPanel()
-
- --total damage
- local damage1 = fw:CreateLabel (SDF, "Damage:")
- local damage2 = fw:CreateLabel (SDF, "")
- damage1:SetPoint ("topleft", SDF, "topleft", 2, -165)
- damage2:SetPoint ("left", damage1, "right", 2, 0)
- DpsTuningPlugin.total_damage = damage2
-
- --activity dps
- local a_dps1 = fw:CreateLabel (SDF, "Dps:")
- local a_dps2 = fw:CreateLabel (SDF, "")
- a_dps1:SetPoint ("topleft", SDF, "topleft", 2, -180)
- a_dps2:SetPoint ("left", a_dps1, "right", 2, 0)
- DpsTuningPlugin.activity_dps = a_dps2
-
- --timer
- local timer1 = fw:CreateLabel (SDF, "Time:")
- local timer2 = fw:CreateLabel (SDF, "")
- timer1:SetPoint ("topleft", SDF, "topleft", 2, -195)
- timer2:SetPoint ("left", timer1, "right", 2, 0)
- DpsTuningPlugin.time_elapsed = timer2
-
- --power
- local power1 = fw:CreateLabel (SDF, "Power:")
- local power2 = fw:CreateLabel (SDF, "", 15, "orange")
- power1:SetPoint ("topleft", SDF, "topleft", 2, -215)
- power2:SetPoint ("left", power1, "right", 2, 0)
- DpsTuningPlugin.power_amount = power2
- end
-
- function DpsTuningPlugin:BuildHeader()
-
- local on_select_spell_type = function (_, _, type_number)
- DpsTuningPlugin.db.SpellBarsShowType = type_number
- DpsTuningPlugin:UpdateTick()
- end
-
- local icon = [[Interface\COMMON\friendship-FistOrc]]
-
- local spell_type_options = {
- {value = 1, label = "Execution Activity Dps", desc = "Oder and show the dps following the spell individual activity time.", onclick = on_select_spell_type, icon = icon},
- {value = 2, label = "Player Activity Dps", desc = "Order the spells using your activity time to measure the dps for each spell.", onclick = on_select_spell_type, icon = icon},
- {value = 3, label = "Damage", desc = "Order the spells following the damage done by each one.", onclick = on_select_spell_type, icon = icon},
- }
-
- local select_spell_type = function()
- return spell_type_options
- end
-
- local dropdown = fw:CreateDropDown (SDF, select_spell_type, DpsTuningPlugin.db.SpellBarsShowType, 160, 18)
- local label = fw:CreateLabel (SDF, "Dps Format:")
- label:SetPoint (2, -4)
- dropdown:SetPoint ("left", label, "right", 2, -1)
- end
-
- DpsTuningPlugin.AuraBlocks = {}
-
- local aura_onenter = function (self, capsule)
- self:SetBackdropBorderColor (1, 1, 0, 1)
- capsule.icontexture.alpha = 1
- local buff = capsule.buff
- if (buff) then
- GameCooltip:Reset()
- GameCooltip:SetOwner (self)
- GameCooltip:SetType ("tooltip")
- DpsTuningPlugin:CooltipPreset (2)
-
- local name, _, icon = _GetSpellInfo (buff.spellid)
-
- GameCooltip:AddLine (name, "", 1, "orange", nil, 13, "Arrial Narrow")
- GameCooltip:AddIcon (icon)
-
- GameCooltip:AddLine ("")
-
- local minutos, segundos = floor (buff.uptime/60), floor (buff.uptime%60)
- GameCooltip:AddLine ("Uptime:", minutos .. "m " .. segundos .. "s", 1, "white", nil, 10, "Arrial Narrow")
- GameCooltip:AddLine ("Percent:", _cstr ("%.1f", buff.uptime/DpsTuningPlugin.CurPlayer:Tempo()*100) .. "%", 1, "white", nil, 10, "Arrial Narrow")
-
- GameCooltip:SetOption ("AlignAsBlizzTooltip", true)
- GameCooltip:Show()
- end
- end
- local aura_onleave = function (self, capsule)
- self:SetBackdropBorderColor (1, 1, 1, 1)
- capsule.icontexture.alpha = 0.9
- GameCooltip:Hide()
- end
-
- local aura_onenter2 = function (self, capsule)
- aura_onenter (capsule.block.widget, capsule.block)
- end
- local aura_onleave2 = function (self, capsule)
- aura_onleave (capsule.block.widget, capsule.block)
- end
-
- local AuraOnClick = function (block)
- if (block.buff) then
- block.buff.disabled = not block.buff.disabled
- if (block.buff.disabled) then
- block.X:Show()
- else
- block.X:Hide()
- end
- end
- end
-
- function DpsTuningPlugin:BuildBuffBlocks()
-
- local auras = fw:CreateLabel (SDF, "Auras (click to disable):")
- auras:SetPoint (170, -165)
-
- local coords = {0.1, 0.9, 0.1, 0.9}
- local size = 26
- local color = {.7, .7, .7}
-
- for i = 1, 3 do
- local block = fw:CreatePanel (SDF, 32, 32)
- block:SetFrameLevel (SDF:GetFrameLevel()+2)
- block:SetPoint (170 + ((i-1) * 36), -180)
- block:SetHook ("OnEnter", aura_onenter)
- block:SetHook ("OnLeave", aura_onleave)
- block.icontexture = fw:CreateImage (block, nil, size, size, "border", coords)
- block.icontexture:SetPoint ("center", block, "center")
- block.icontexture.alpha = 0.9
- block.icontexture:SetVertexColor (unpack (color))
- block.texttime = fw:CreateLabel (block, "", 16, "yellow", "GameFontNormal", nil, nil, "artwork")
- block.texttime:SetPoint ("center", block, "center")
-
- block.X = fw:CreateImage (block, [[Interface\Glues\LOGIN\Glues-CheckBox-Check]], size*1.1, size*1.1, "overlay")
- block.X:SetPoint ("center", block, "center")
- block.X:Hide()
-
- block.button = fw:CreateButton (block, AuraOnClick, 32, 32, "", block)
- block.button:SetPoint ("center", box, "center")
- block.button:SetHook ("OnEnter", aura_onenter2)
- block.button:SetHook ("OnLeave", aura_onleave2)
- block.button.block = block
-
- tinsert (DpsTuningPlugin.AuraBlocks, block)
- end
-
- for i = 1, 3 do
- local block = fw:CreatePanel (SDF, 32, 32)
- block:SetFrameLevel (SDF:GetFrameLevel()+2)
- block:SetPoint (170 + ((i-1) * 36), -220)
- block:SetHook ("OnEnter", aura_onenter)
- block:SetHook ("OnLeave", aura_onleave)
- block.icontexture = fw:CreateImage (block, nil, size, size, "border", coords)
- block.icontexture:SetPoint ("center", block, "center")
- block.icontexture.alpha = 0.9
- block.icontexture:SetVertexColor (unpack (color))
- block.texttime = fw:CreateLabel (block, "", 16, "yellow", "GameFontNormal", nil, nil, "artwork")
- block.texttime:SetPoint ("center", block, "center")
-
- block.X = fw:CreateImage (block, [[Interface\Glues\LOGIN\Glues-CheckBox-Check]], size*1.1, size*1.1, "overlay")
- block.X:SetPoint ("center", block, "center")
- block.X:Hide()
-
- block.button = fw:CreateButton (block, AuraOnClick, 32, 32, "", block)
- block.button:SetPoint ("center", box, "center")
- block.button:SetHook ("OnEnter", aura_onenter2)
- block.button:SetHook ("OnLeave", aura_onleave2)
- block.button.block = block
-
- tinsert (DpsTuningPlugin.AuraBlocks, block)
- end
-
- for i = 1, 3 do
- local block = fw:CreatePanel (SDF, 32, 32)
- block:SetFrameLevel (SDF:GetFrameLevel()+2)
- block:SetPoint (170 + ((i-1) * 36), -260)
- block:SetHook ("OnEnter", aura_onenter)
- block:SetHook ("OnLeave", aura_onleave)
- block.icontexture = fw:CreateImage (block, nil, size, size, "border", coords)
- block.icontexture:SetPoint ("center", block, "center")
- block.icontexture.alpha = 0.9
- block.icontexture:SetVertexColor (unpack (color))
- block.texttime = fw:CreateLabel (block, "", 16, "yellow", "GameFontNormal", nil, nil, "artwork")
- block.texttime:SetPoint ("center", block, "center")
-
- block.X = fw:CreateImage (block, [[Interface\Glues\LOGIN\Glues-CheckBox-Check]], size*1.1, size*1.1, "overlay")
- block.X:SetPoint ("center", block, "center")
- block.X:Hide()
-
- block.button = fw:CreateButton (block, AuraOnClick, 32, 32, "", block)
- block.button:SetPoint ("center", box, "center")
- block.button:SetHook ("OnEnter", aura_onenter2)
- block.button:SetHook ("OnLeave", aura_onleave2)
- block.button.block = block
-
- tinsert (DpsTuningPlugin.AuraBlocks, block)
- end
-
- end
-
- function DpsTuningPlugin:ClearBuffBlocks()
- for index, block in ipairs (DpsTuningPlugin.AuraBlocks) do
- block.buff = nil
- block.icontexture.texture = nil
- block.texttime.text = ""
- end
- end
-
- function DpsTuningPlugin:UpdateBuffBlocks()
- for index, block in ipairs (DpsTuningPlugin.AuraBlocks) do
- if (block.buff) then
- if (block.buff.actived) then
- block.texttime.text = block.buff.uptime + (ClockTime() - block.buff.actived_at)
- else
- block.texttime.text = block.buff.uptime
- end
- end
- end
- end
-
- function DpsTuningPlugin:EnableAuraBlock (block_number, buff_table)
- if (block_number <= 9) then
- local block = DpsTuningPlugin.AuraBlocks [block_number]
- block.icontexture.texture = select (3, _GetSpellInfo (buff_table.spellid))
- block.buff = buff_table
- end
- end
-
- function DpsTuningPlugin:TrackBuffsAtEnd()
- for buffIndex = 1, 41 do
- local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellid = UnitAura ("player", buffIndex, nil, "HELPFUL")
- local buff_table = buff_activity [spellid]
- if (buff_table) then
- if (buff_table.actived_at and buff_table.actived) then
- buff_table.uptime = buff_table.uptime + ClockTime() - buff_table.actived_at
- end
- buff_table.actived = false
- buff_table.actived_at = nil
- DpsTuningPlugin:BuffChartEnd (spellid)
- end
- end
- end
-
- function DpsTuningPlugin:BuffChartStart (spellid)
- local buff_chart = buff_graphic_data [spellid]
- if (not buff_chart) then
- buff_chart = {}
- buff_graphic_data [spellid] = buff_chart
- end
- local bufftime = {time_start = DpsTuningPlugin.CurTick, time_end = 0}
- tinsert (buff_chart, bufftime)
- end
-
- function DpsTuningPlugin:BuffChartEnd (spellid)
- local buff_chart = buff_graphic_data [spellid]
- if (buff_chart) then
- local bufftime = buff_chart [#buff_chart]
- bufftime.time_end = DpsTuningPlugin.CurTick
- end
- end
-
- function DpsTuningPlugin:TrackBuffsAtStart()
- for buffIndex = 1, 41 do
- local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellid = UnitAura ("player", buffIndex, nil, "HELPFUL")
-
- if (name and unitCaster == "player" and duration > 0 and expirationTime > 0 and not shouldConsolidate) then
- local buff_table = buff_activity [spellid]
- if (not buff_table) then
- buff_table = {uptime = 0, actived = false, activedamt = 0, block = buff_activity.next, spellid = spellid, procs = {}}
- buff_activity.next = buff_activity.next + 1
- buff_activity [spellid] = buff_table
- end
-
- buff_table.actived = true
- buff_table.activedamt = 1
- buff_table.actived_at = ClockTime()
- tinsert (buff_table.procs, DpsTuningPlugin.CurCombat:GetCombatTime())
-
- DpsTuningPlugin:BuffChartStart (spellid)
- DpsTuningPlugin:EnableAuraBlock (buff_table.block, buff_table)
- end
- end
- end
-
-
- function DpsTuningPlugin:AuraApplied (time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, tipo, amount)
- if (tipo == "BUFF") then
-
- local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellid = UnitAura ("player", spellname, nil, "HELPFUL")
-
- if (name and unitCaster == "player" and duration > 0 and expirationTime > 0 and not shouldConsolidate) then
-
- local buff_table = buff_activity [spellid]
- if (not buff_table) then
- buff_table = {uptime = 0, actived = false, activedamt = 0, block = buff_activity.next, spellid = spellid, procs = {}}
- buff_activity.next = buff_activity.next + 1
- buff_activity [spellid] = buff_table
- end
-
- buff_table.actived = true
- buff_table.activedamt = buff_table.activedamt + 1
- buff_table.actived_at = ClockTime()
- tinsert (buff_table.procs, DpsTuningPlugin.CurCombat:GetCombatTime())
-
- DpsTuningPlugin:BuffChartStart (spellid)
- DpsTuningPlugin:EnableAuraBlock (buff_table.block, buff_table)
-
- end
- end
- end
-
- function DpsTuningPlugin:AuraRefresh (time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, tipo, amount)
- if (tipo == "BUFF") then
- local buff_table = buff_activity [spellid]
- if (buff_table) then
- if (buff_table.actived_at and buff_table.actived) then
- buff_table.uptime = buff_table.uptime + ClockTime() - buff_table.actived_at
- end
- buff_table.actived_at = ClockTime()
- buff_table.actived = true
- end
- end
- end
-
- function DpsTuningPlugin:AuraRemoved (time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, tipo, amount)
- if (tipo == "BUFF") then
- local buff_table = buff_activity [spellid]
- if (buff_table) then
- if (buff_table.actived_at and buff_table.actived) then
- buff_table.uptime = buff_table.uptime + ClockTime() - buff_table.actived_at
- end
- buff_table.actived = false
- buff_table.actived_at = nil
- tinsert (buff_table.procs, DpsTuningPlugin.CurCombat:GetCombatTime())
- DpsTuningPlugin:BuffChartEnd (spellid)
- end
- end
- end
-
- local misscolor = {1, 0.3, 0.3}
-
- local bar_onenter_script = function (self, capsule)
-
- if (not DpsTuningPlugin.CurPlayer or not capsule.spellid) then
- return
- end
-
- GameCooltip:Reset()
- GameCooltip:SetOwner (self)
- GameCooltip:SetType ("tooltip")
- DpsTuningPlugin:CooltipPreset (2)
-
- local spell = DpsTuningPlugin.CurPlayer:GetSpell (capsule.spellid)
- local name, _, icon = _GetSpellInfo (capsule.spellid)
-
- GameCooltip:AddLine (name, "", 1, "orange", nil, 13, "Arrial Narrow")
- GameCooltip:AddIcon (icon)
-
- GameCooltip:AddLine ("")
-
- GameCooltip:AddLine ("Damage:", DpsTuningPlugin:comma_value (spell.total), 1, "white", nil, 10, "Arrial Narrow")
- GameCooltip:AddLine ("Hits:", spell.counter, 1, "white", nil, 10, "Arrial Narrow")
- GameCooltip:AddLine ("Dps:", DpsTuningPlugin:ToK2 (floor (spell.total / DpsTuningPlugin.CurPlayer:Tempo())), 1, "white", nil, 10, "Arrial Narrow")
- GameCooltip:AddLine ("Percent:", _cstr ("%.1f", spell.total / DpsTuningPlugin.CurPlayer.total_without_pet * 100) .. "%", 1, "white", nil, 10, "Arrial Narrow")
-
- GameCooltip:AddLine ("")
-
- GameCooltip:AddLine ("Average Damage:", DpsTuningPlugin:comma_value (floor (spell.total / spell.counter)), 1, "white", nil, 10, "Arrial Narrow")
- GameCooltip:AddLine ("Min Hit:", DpsTuningPlugin:comma_value (spell.n_min), 1, "white", nil, 10, "Arrial Narrow")
- GameCooltip:AddLine ("Max Hit:", DpsTuningPlugin:comma_value (math.max (spell.n_max, spell.c_max)), 1, "white", nil, 10, "Arrial Narrow")
-
- GameCooltip:AddLine ("")
-
- GameCooltip:AddLine ("Critical Hits:", _cstr ("%.1f", spell.c_amt / spell.counter * 100) .. "%", 1, "white", nil, 10, "Arrial Narrow")
- if (spell.c_amt > 0) then
- GameCooltip:AddLine ("Critical Average Damage:", DpsTuningPlugin:comma_value (floor (spell.c_dmg / spell.c_amt)), 1, "white", nil, 10, "Arrial Narrow")
- else
- GameCooltip:AddLine ("Critical Average Damage:", "0", 1, "white", nil, 10, "Arrial Narrow")
- end
-
- --uptime
-
- local misc = DpsTuningPlugin.CurCombat (DETAILS_ATTRIBUTE_MISC, DpsTuningPlugin.playername)
- if (misc) then
- local debuff_uptime = misc.debuff_uptime
- if (debuff_uptime) then
- local this_spell = misc.debuff_uptime_spells._ActorTable [capsule.spellid]
- if (this_spell) then
- GameCooltip:AddLine ("")
- local uptime = this_spell.uptime
- local minutos, segundos = floor (uptime/60), floor (uptime%60)
- GameCooltip:AddLine ("Uptime:", minutos .. "m " .. segundos .. "s", 1, "white", nil, 10, "Arrial Narrow")
- end
- end
- end
-
- --miss
- GameCooltip:AddLine ("")
-
- local miss = spell ["MISS"]
- local parry = spell ["PARRY"]
- local dodge = spell ["DODGE"]
-
- if (miss) then
- GameCooltip:AddLine ("Miss:", miss .. " (" .. _cstr ("%.1f", miss / spell.counter * 100) .. "%)", 1, misscolor, nil, 10, "Arrial Narrow")
- end
- if (parry) then
- GameCooltip:AddLine ("Parry:", parry .. " (" .. _cstr ("%.1f", parry / spell.counter * 100) .. "%)", 1, misscolor, nil, 10, "Arrial Narrow")
- end
- if (dodge) then
- GameCooltip:AddLine ("Dodge:", dodge .. " (" .. _cstr ("%.1f", dodge / spell.counter * 100) .. "%)", 1, misscolor, nil, 10, "Arrial Narrow")
- end
- if (spell.g_amt > 0) then
- GameCooltip:AddLine ("Glancing:", spell.g_amt .. " (" .. _cstr ("%.1f", spell.g_amt / spell.counter * 100) .. "%)", 1, misscolor, nil, 10, "Arrial Narrow")
- end
-
- GameCooltip:SetOption ("AlignAsBlizzTooltip", true)
- GameCooltip:Show()
- end
-
- local bar_onleanve_script = function (self)
- GameCooltip:Hide()
- end
-
- function DpsTuningPlugin:BuildSpellBars()
- DpsTuningPlugin.SpellBars = {}
-
- local scrollbar = CreateFrame ("scrollframe", "DpsTuningPluginSpellsFauxScroll", DpsTuningPlugin.Frame, "FauxScrollFrameTemplate")
- scrollbar:SetSize (275, 150)
- scrollbar:SetPoint ("topleft", DpsTuningPlugin.Frame, "topleft", 1, 0)
- scrollbar:SetScript ("OnVerticalScroll", function (self, offset) FauxScrollFrame_OnVerticalScroll (self, offset, 15, update_scroll) end)
- scrollbar.Update = update_scroll
- DpsTuningPlugin.SpellScroll = scrollbar
-
- for i = 1, 9 do
- local bar = fw:CreateBar (DpsTuningPlugin.Frame, "Skyline", 275, 14, 100)
- bar.color = DpsTuningPlugin.BarColor
- bar.textfont = "Arial Narrow"
- bar.textsize = 10
- bar:SetPoint ("topleft", DpsTuningPlugin.Frame, "topleft", 1, ((i-1) * -15) - 20)
-
- bar:SetHook ("OnEnter", bar_onenter_script)
- bar:SetHook ("OnLeave", bar_onleanve_script)
-
- tinsert (DpsTuningPlugin.SpellBars, bar)
- end
- end
-
- local colors = {
- {1, 1, 1}, --white
- {1, 0.8, .1}, --orange
- {.3, .3, 1}, --blue
- {1, .3, .3}, --red
- {.3, 1, .3}, --green
- {.3, 1, 1}, --cyan
- {1, 0.75, 0.79}, --pink
- {0.98, 0.50, 0.44}, --salmon
- {0.75, 0.75, 0.75}, --silver
- {0.60, 0.80, 0.19}, --yellow
- {1, .3, 1}, --magenta
- }
-
- local linetypes = {"line", "smallline", "thinline"}
-
- function DpsTuningPlugin:BuildChartPanels()
-
- local chart_panel = fw:CreateChartPanel (UIParent, GetScreenWidth()-200, 500)
- chart_panel:SetPoint ("topleft", UIParent, "topleft", 100, -100)
- chart_panel:SetTitle ("Dps Tuning")
- chart_panel:SetFrameStrata ("DIALOG")
- chart_panel:CanMove (true)
- tinsert (UISpecialFrames, chart_panel:GetName())
-
- chart_panel:Hide()
-
- local open_chart_panel = function()
- chart_panel:Reset()
-
- local player_dps = DpsTuningPlugin.CurCombat:GetTimeData ("Player Damage Done")
-
- local combat_time = DpsTuningPlugin.CurCombat:GetCombatTime()
- chart_panel:SetTime (combat_time)
- chart_panel:SetScale (player_dps.max_value)
-
- chart_panel:AddLine (player_dps, {1, 1, 1, 1}, "Your Damage", combat_time, "line")
- chart_panel:AddLine (power_amount_chart_table, {1, .4, .4, 1}, "Spell/Attack Power (x3)", combat_time)
-
- chart_panel:Show()
- end
-
- local open_chart_panel2 = function()
-
- chart_panel:Reset()
-
- local GraphicSmoothLevel = 1
-
- --> we need to copy because of the addition of spells with the same icon.
- local spell_graphic_data = table_deepcopy (spell_graphic_data)
-
- local consolidate = {}
- for spellid, data in pairs (spell_graphic_data) do
- local spellname, _, spellicon = _GetSpellInfo (spellid)
- if (consolidate [spellicon]) then
-
- local data2 = consolidate [spellicon][3]
- local new_max_value = consolidate [spellicon][4]
-
- for i = 1, #data do
- data2[i] = data2[i] + data[i] --can be the same table as the default one or it just will add and add over again.
- if (data2[i] > new_max_value) then
- new_max_value = data2[i]
- end
- end
-
- consolidate [spellicon][4] = new_max_value
-
- local spelldamage = DpsTuningPlugin.CurPlayer:GetSpell (spellid).total
- consolidate [spellicon][5] = consolidate [spellicon][5] + spelldamage
-
- if (string.len (spellname) < string.len (consolidate [spellicon][2])) then
- consolidate [spellicon][2] = spellname
- end
-
- else
- consolidate [spellicon] = {spellid, spellname, data, data.max_value, DpsTuningPlugin.CurPlayer:GetSpell (spellid).total}
- end
- end
-
- local order = {}
- for spellid, data in pairs (consolidate) do
- tinsert (order, data)
- end
-
- table.sort (order, DpsTuningPlugin.Sort1)
-
- local player_total_damage = DpsTuningPlugin.CurPlayer.total
-
- local max = 0
-
- for index, data in ipairs (order) do
- local spellid = data[1]
- local spellname = data[2]
- local chart_data = data[3]
- local max_value = data[4]
- if (max_value > max) then
- max = max_value
- end
- local spelldamage = data[5]
-
- if (spelldamage/player_total_damage*100 > 5) then
- if (colors [index]) then
- chart_panel:AddLine (chart_data, colors [index], spellname, DpsTuningPlugin.CurCombat:GetCombatTime(), nil, GraphicSmoothLevel)
- end
- end
- end
-
- chart_panel:SetTime (DpsTuningPlugin.CurCombat:GetCombatTime())
- chart_panel:SetScale (max)
-
- chart_panel:Show()
- end
-
- local open_chart_panel3 = function()
-
- chart_panel:Reset()
-
- local player_dps = DpsTuningPlugin.CurCombat:GetTimeData ("Player Damage Done")
- chart_panel:AddLine (player_dps, {1, 1, 1, 1}, "Your Damage", DpsTuningPlugin.CurCombat:GetCombatTime(), "line")
-
- chart_panel:SetTime (DpsTuningPlugin.CurCombat:GetCombatTime())
- chart_panel:SetScale (player_dps.max_value)
-
- local index = 1
- for spellid, bufftable in pairs (buff_activity) do
- if (type (bufftable) == "table") then
- if (not bufftable.disabled) then
- local proctable = bufftable.procs
-
- local spellname, _, spellicon = _GetSpellInfo (spellid)
-
- chart_panel:AddOverlay (bufftable.procs, colors [index], spellname, spellicon)
- index = index + 1
- end
- end
- end
-
- chart_panel:Show()
-
- end
-
- local button_open = fw:CreateButton (SDF, open_chart_panel, 120, 18, "Damage x Power", nil, nil, nil, "OpenGraphicButton")
- button_open:InstallCustomTexture (nil, nil, nil, nil, true)
- button_open:SetPoint ("bottomleft", SDF, "bottomleft", 2, 3)
- button_open:Disable()
-
- local button_open2 = fw:CreateButton (SDF, open_chart_panel2, 120, 18, "All Spells", nil, nil, nil, "OpenGraphicButton2")
- button_open2:InstallCustomTexture (nil, nil, nil, nil, true)
- button_open2:SetPoint ("bottom", button_open, "top", 0, 3)
- button_open2:Disable()
-
- local button_open3 = fw:CreateButton (SDF, open_chart_panel3, 120, 18, "Aura Procs", nil, nil, nil, "OpenGraphicButton3")
- button_open3:InstallCustomTexture (nil, nil, nil, nil, true)
- button_open3:SetPoint ("bottom", button_open2, "top", 0, 3)
- button_open3:Disable()
-
- end
-
-
- function DpsTuningPlugin:UpdateSummary()
- if (DpsTuningPlugin.CurPlayer) then
- DpsTuningPlugin.total_damage.text = DpsTuningPlugin:comma_value (floor (DpsTuningPlugin.CurPlayer.total))
- DpsTuningPlugin.activity_dps.text = DpsTuningPlugin:ToK2 (floor (DpsTuningPlugin.CurPlayer.total / DpsTuningPlugin.CurPlayer:Tempo()))
- DpsTuningPlugin.time_elapsed.text = _cstr ("%.1f", GetTime() - DpsTuningPlugin.StartTime)
- DpsTuningPlugin.power_amount.text = DpsTuningPlugin:comma_value (GetSpellBonusDamage (DpsTuningPlugin.PowerType))
- end
- end
-
- function DpsTuningPlugin:UpdateMiliTick()
- DpsTuningPlugin:UpdateSummary()
- end
-
- function DpsTuningPlugin:UpdateTick()
-
- --check for current player
- if (not DpsTuningPlugin.CurPlayer) then
- if (not DpsTuningPlugin.CurCombat) then
- return
- end
- DpsTuningPlugin.CurPlayer = DpsTuningPlugin.CurCombat (DETAILS_ATTRIBUTE_DAMAGE, DpsTuningPlugin.playername)
- if (not DpsTuningPlugin.CurPlayer) then
- return
- end
-
- if (DpsTuningPlugin.CurPlayer and not DpsTuningPlugin.MiliSecTick) then
- DpsTuningPlugin.MiliSecTick = DpsTuningPlugin:ScheduleRepeatingTimer ("UpdateMiliTick", 0.1)
- end
- end
-
- DpsTuningPlugin.CurTick = DpsTuningPlugin.CurTick + 1
-
- --refresh bars
- DpsTuningPlugin.RefreshSpells()
-
- --refresh buff blocks
- DpsTuningPlugin:UpdateBuffBlocks()
-
- --get spells damages
- DpsTuningPlugin:ChartDataTick()
-
- end
-
- function DpsTuningPlugin:ChartDataTick()
-
- local power = math.max (GetSpellBonusDamage (1), GetSpellBonusDamage (2)) * 3
- tinsert (power_amount_chart_table, power)
- if (power_amount_chart_table.max_value < power) then
- power_amount_chart_table.max_value = power
- end
-
- for spellid, spelltable in pairs (DpsTuningPlugin.CurPlayer:GetActorSpells()) do
- if (spelltable.total > 0) then
-
- local chart_table = spell_graphic_data [spelltable.id]
-
- if (not chart_table) then
- local new_chart_data = {}
- new_chart_data.last_value = 0
- new_chart_data.max_value = 0
-
- for i = 1, DpsTuningPlugin.CurTick-1 do
- tinsert (new_chart_data, 0)
- end
- spell_graphic_data [spelltable.id] = new_chart_data
- chart_table = new_chart_data
- end
-
- local cvalue = spelltable.total - chart_table.last_value
- if (chart_table.max_value < cvalue) then
- chart_table.max_value = cvalue
- end
- tinsert (chart_table, cvalue)
- chart_table.last_value = spelltable.total
-
- end
- end
- end
-
- function DpsTuningPlugin:OnDataReset (...)
- DpsTuningPlugin.CurCombat = nil
- DpsTuningPlugin.CurPlayer = nil
-
- table.wipe (spell_activity)
- table.wipe (buff_activity)
- table.wipe (spell_graphic_data)
- table.wipe (buff_graphic_data)
- table.wipe (power_amount_chart_table)
-
- DpsTuningPlugin:ClearBuffBlocks()
-
- SDF.OpenGraphicButton:Disable()
- SDF.OpenGraphicButton2:Disable()
- SDF.OpenGraphicButton3:Disable()
-
- if (DpsTuningPlugin.SpellBars) then
- for bar_index = 1, 9 do
- local bar = DpsTuningPlugin.SpellBars [bar_index]
- if (bar) then
- bar:Hide()
- end
- end
- end
-
- DpsTuningPlugin.FinishedAt = 0
- end
-
- function DpsTuningPlugin:OnCombatStart (...)
-
- if (DpsTuningPlugin.FinishedAt+10 > ClockTime()) then
- DpsTuningPlugin:Msg ("Ignoring combat start: a combat just finished.")
- DpsTuningPlugin.FinishedAt = ClockTime()
- return
- end
-
- DpsTuningPlugin.CurCombat = ...
- DpsTuningPlugin.CurPlayer = DpsTuningPlugin.CurCombat (DETAILS_ATTRIBUTE_DAMAGE, DpsTuningPlugin.playername)
-
- table.wipe (spell_activity)
- table.wipe (buff_activity)
- table.wipe (spell_graphic_data)
- table.wipe (buff_graphic_data)
- table.wipe (power_amount_chart_table)
-
- buff_activity.next = 1
- power_amount_chart_table.max_value = 0
-
- DpsTuningPlugin:ClearBuffBlocks()
- DpsTuningPlugin:TrackBuffsAtStart()
-
- --> enable buff parser
- SDF:RegisterEvent ("COMBAT_LOG_EVENT_UNFILTERED")
-
- DpsTuningPlugin.LastDps = 0
- DpsTuningPlugin.CurTick = 0
- DpsTuningPlugin.StartTime = GetTime()
-
- DpsTuningPlugin.TimerTick = DpsTuningPlugin:ScheduleRepeatingTimer ("UpdateTick", 1)
-
- if (DpsTuningPlugin.CurPlayer and not DpsTuningPlugin.MiliSecTick) then
- DpsTuningPlugin.MiliSecTick = DpsTuningPlugin:ScheduleRepeatingTimer ("UpdateMiliTick", 0.1)
- end
-
- SDF.OpenGraphicButton:Disable()
- SDF.OpenGraphicButton2:Disable()
- SDF.OpenGraphicButton3:Disable()
-
- end
-
- function DpsTuningPlugin:OnCombatEnd (...)
- local combat = ...
-
- if (DpsTuningPlugin.CurCombat and DpsTuningPlugin.CurCombat == combat) then
- local now = ClockTime()
-
- DpsTuningPlugin.FinishedAt = now
-
- --> close spells
- for spellid, spelltable in pairs (spell_activity) do
- if (spelltable.onhold) then
- local diff = now - spelltable.delay - 2
- if (diff > 0) then
- spelltable.start = spelltable.start + diff
- end
- spelltable.onhold = nil
- end
-
- spelltable.tempo_end = now
- end
-
- --> close buffs
- DpsTuningPlugin:TrackBuffsAtEnd()
-
- --> turn off buff parser
- SDF:UnregisterEvent ("COMBAT_LOG_EVENT_UNFILTERED")
-
- --> cancel tick
- DpsTuningPlugin:CancelTicker()
-
- SDF.OpenGraphicButton:Enable()
- SDF.OpenGraphicButton2:Enable()
- SDF.OpenGraphicButton3:Enable()
- end
- end
-
-
-
- function DpsTuningPlugin:CancelTicker()
- if (DpsTuningPlugin.TimerTick) then
- DpsTuningPlugin:CancelTimer (DpsTuningPlugin.TimerTick)
- DpsTuningPlugin.TimerTick = nil
- end
- if (DpsTuningPlugin.MiliSecTick) then
- DpsTuningPlugin:CancelTimer (DpsTuningPlugin.MiliSecTick)
- DpsTuningPlugin.MiliSecTick = nil
- end
- end
-
-end
-
-function DpsTuningPlugin:OnEvent (_, event, ...)
-
- if (event == "COMBAT_LOG_EVENT_UNFILTERED") then
-
- local time1, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spellschool, tipo, amount = select (1, ...)
-
- if (who_name == DpsTuningPlugin.playername and alvo_name == DpsTuningPlugin.playername) then
- if (token == "SPELL_AURA_APPLIED") then
- DpsTuningPlugin:AuraApplied (time1, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, tipo, amount)
- elseif (token == "SPELL_AURA_REMOVED") then
- DpsTuningPlugin:AuraRemoved (time1, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, tipo, amount)
- elseif (token == "SPELL_AURA_REFRESH") then
- DpsTuningPlugin:AuraRefresh (time1, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellname, spellschool, tipo, amount)
- end
- end
-
- elseif (event == "ADDON_LOADED") then
- local AddonName = select (1, ...)
- if (AddonName == "Details_DpsTuning") then
-
- if (_G._detalhes) then
-
- --> create main plugin object
- CreatePluginFrames()
-
- local MINIMAL_DETAILS_VERSION_REQUIRED = 28
-
- local default_settings = {
- SpellBarsShowType = 1,
- }
-
- --> Install plugin inside details
- local install = _G._detalhes:InstallPlugin ("SOLO", "Dps Tuning", "Interface\\Icons\\Ability_Racial_RocketBarrage", DpsTuningPlugin, "DETAILS_PLUGIN_DPS_TUNING", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", "v1.1", default_settings)
- if (type (install) == "table" and install.error) then
- print (install.error)
- end
-
- --> Register needed events
- _G._detalhes:RegisterEvent (DpsTuningPlugin, "COMBAT_PLAYER_ENTER")
- _G._detalhes:RegisterEvent (DpsTuningPlugin, "COMBAT_PLAYER_LEAVE")
- _G._detalhes:RegisterEvent (DpsTuningPlugin, "DETAILS_DATA_RESET")
- _G._detalhes:RegisterEvent (DpsTuningPlugin, "COMBAT_INVALID")
-
- end
- end
-
- end
-end
diff --git a/plugins/Details_DpsTuning/Details_DpsTuning.toc b/plugins/Details_DpsTuning/Details_DpsTuning.toc
index 6c5e96c0..8145b39b 100644
--- a/plugins/Details_DpsTuning/Details_DpsTuning.toc
+++ b/plugins/Details_DpsTuning/Details_DpsTuning.toc
@@ -1,4 +1,4 @@
-## Interface: 70300
+## Interface: 80000
## Title: Details Dps Tuning (plugin)
## Notes: Plugin for Details
## RequiredDeps: Details
diff --git a/plugins/Details_EncounterDetails/Details_EncounterDetails.lua b/plugins/Details_EncounterDetails/Details_EncounterDetails.lua
index 95ac686e..6231bd7e 100644
--- a/plugins/Details_EncounterDetails/Details_EncounterDetails.lua
+++ b/plugins/Details_EncounterDetails/Details_EncounterDetails.lua
@@ -517,7 +517,87 @@ local function CreatePluginFrames (data)
return true
end
- EncounterDetails.ToolbarButton = _detalhes.ToolBar:NewPluginToolbarButton (EncounterDetails.OpenWindow, "Interface\\AddOns\\Details_EncounterDetails\\images\\icon", Loc ["STRING_PLUGIN_NAME"], Loc ["STRING_TOOLTIP"], 16, 16, "ENCOUNTERDETAILS_BUTTON") --"Interface\\COMMON\\help-i"
+ local cooltip_menu = function()
+
+ local CoolTip = GameCooltip2
+
+ CoolTip:Reset()
+ CoolTip:SetType ("menu")
+
+ CoolTip:SetOption ("TextSize", Details.font_sizes.menus)
+ CoolTip:SetOption ("TextFont", Details.font_faces.menus)
+
+ CoolTip:SetOption ("ButtonHeightModSub", -2)
+ CoolTip:SetOption ("ButtonHeightMod", -5)
+
+ CoolTip:SetOption ("ButtonsYModSub", -3)
+ CoolTip:SetOption ("ButtonsYMod", -6)
+
+ CoolTip:SetOption ("YSpacingModSub", -3)
+ CoolTip:SetOption ("YSpacingMod", 1)
+
+ CoolTip:SetOption ("HeighMod", 3)
+ CoolTip:SetOption ("SubFollowButton", true)
+
+ Details:SetTooltipMinWidth()
+
+ --build the header
+
+-- CoolTip:AddLine (Loc ["STRING_PLUGIN_NAME"])
+-- CoolTip:AddIcon (ENCOUNTERDETAILS_BUTTON.__icon, 1, 1, 20, 20)
+-- CoolTip:AddMenu (1, EncounterDetails.Frame.switch, "main")
+
+-- GameCooltip:AddLine ("$div")
+
+ --build the menu options
+
+ --summary
+ CoolTip:AddLine ("Encounter Summary")
+ CoolTip:AddMenu (1, EncounterDetails.Frame.switch, "main")
+ CoolTip:AddIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 1, 1, 20, 22, 0, 0.1015625, 0, 0.505625)
+
+ --chart
+ CoolTip:AddLine ("Damage Graphic")
+ CoolTip:AddMenu (1, EncounterDetails.Frame.switch, "graph")
+ CoolTip:AddIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 1, 1, 20, 22, 0.1271875, 0.21875, 0, 0.505625)
+
+ --emotes
+ CoolTip:AddLine ("Boss Emotes")
+ CoolTip:AddMenu (1, EncounterDetails.Frame.switch, "emotes")
+ CoolTip:AddIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 1, 1, 20, 22, 91/256, 116/256, 0, 0.505625)
+
+ --weakauras
+ CoolTip:AddLine ("Create Encounter Weakauras")
+ CoolTip:AddMenu (1, EncounterDetails.Frame.switch, "spellsauras")
+
+ if (_G.WeakAuras) then
+ CoolTip:AddIcon ([[Interface\AddOns\WeakAuras\Media\Textures\icon]], 1, 1, 20, 20)
+ else
+ CoolTip:AddIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 1, 1, 20, 22, 121/256, 146/256, 0, 0.505625)
+ end
+
+ --phases
+ CoolTip:AddLine ("Damage by Boss Phase")
+ CoolTip:AddMenu (1, EncounterDetails.Frame.switch, "phases")
+ CoolTip:AddIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 1, 1, 20, 22, 151/256, 176/256, 0, 0.505625)
+
+ --
+
+ local textPoint = {"left", "left", 4, 0}
+
+ local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
+
+ --CoolTip:SetBannerImage (1, [[]], 200, 22, avatarPoint, avatarTexCoord, nil) --> overlay [2] avatar path
+ --CoolTip:SetBannerText (1, Loc ["STRING_PLUGIN_NAME"], textPoint, {1, 1, 1}, 14, SharedMedia:Fetch ("font", _detalhes.tooltip.fontface)) --> text [1] nickname
+
+ --apply the backdrop settings to the menu
+ Details:FormatCooltipBackdrop()
+ CoolTip:SetOwner (ENCOUNTERDETAILS_BUTTON, "bottom", "top", 0, 0)
+ CoolTip:ShowCooltip()
+
+ end
+
+ EncounterDetails.ToolbarButton = _detalhes.ToolBar:NewPluginToolbarButton (EncounterDetails.OpenWindow, "Interface\\AddOns\\Details_EncounterDetails\\images\\icon", Loc ["STRING_PLUGIN_NAME"], Loc ["STRING_TOOLTIP"], 16, 16, "ENCOUNTERDETAILS_BUTTON", cooltip_menu) --"Interface\\COMMON\\help-i"
EncounterDetails.ToolbarButton.shadow = true --> loads icon_shadow.tga when the instance is showing icons with shadows
--> setpoint anchors mod if needed
@@ -1987,7 +2067,10 @@ local events_to_track = {
}
local enemy_spell_pool
-local CLEvents = function (self, event, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, school, aura_type)
+local CLEvents = function (self, event)
+
+ local time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, school, aura_type = CombatLogGetCurrentEventInfo()
+
if (events_to_track [token] and _bit_band (who_flags or 0x0, 0x00000060) ~= 0) then
local t = enemy_spell_pool [spellid]
if (not t) then
diff --git a/plugins/Details_EncounterDetails/Details_EncounterDetails.toc b/plugins/Details_EncounterDetails/Details_EncounterDetails.toc
index bf54172e..72a643ce 100644
--- a/plugins/Details_EncounterDetails/Details_EncounterDetails.toc
+++ b/plugins/Details_EncounterDetails/Details_EncounterDetails.toc
@@ -1,4 +1,4 @@
-## Interface: 70300
+## Interface: 80000
## Title: Details Encounter (plugin)
## Notes: Plugin for Details
## RequiredDeps: Details
diff --git a/plugins/Details_EncounterDetails/frames.lua b/plugins/Details_EncounterDetails/frames.lua
index 61374a92..4897b4f1 100644
--- a/plugins/Details_EncounterDetails/frames.lua
+++ b/plugins/Details_EncounterDetails/frames.lua
@@ -1196,6 +1196,10 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
button:SetTemplate (DetailsFrameWork:GetTemplate ("button", "DETAILS_PLUGIN_BUTTON_TEMPLATE"))
end
+ if (not BossFrame:IsShown()) then
+ Details:OpenPlugin ("DETAILS_PLUGIN_ENCOUNTER_DETAILS")
+ end
+
BossFrame.DBMBars:Hide()
BossFrame.BigWigsBars:Hide()
BossFrame.label_dbm_bars:Hide()
@@ -2027,10 +2031,11 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
npc_id2:Hide()
--
- local label_dbm_bars = DetailsFrameWork:CreateLabel (BossFrame, "DBM Bars:", 11, nil, "GameFontHighlightSmall")
- label_dbm_bars:SetPoint ("topleft", BossFrame, "topleft", 10, -160)
- local label_bw_bars = DetailsFrameWork:CreateLabel (BossFrame, "Big Wigs Bars:", 11, nil, "GameFontHighlightSmall")
- label_bw_bars:SetPoint ("topleft", BossFrame, "topleft", 10, -205)
+ local label_dbm_bars = DetailsFrameWork:CreateLabel (BossFrame, "Create Big Timer Announcer (DBM):", 11, nil, "GameFontHighlightSmall")
+ label_dbm_bars:SetPoint ("topleft", BossFrame, "topleft", 10, -200)
+
+ local label_bw_bars = DetailsFrameWork:CreateLabel (BossFrame, "Create Big Timer Announcer (BW):", 11, nil, "GameFontHighlightSmall")
+ label_bw_bars:SetPoint ("topleft", BossFrame, "topleft", 10, -250)
BossFrame.label_dbm_bars = label_dbm_bars
BossFrame.label_bw_bars = label_bw_bars
@@ -2112,9 +2117,15 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails)
local dropdown_dbm_bars = DetailsFrameWork:NewDropDown (BossFrame, _, "$parentDBMBarsDropdown", "DBMBars", 160, 20, build_dbm_bars, 1)
dropdown_dbm_bars:SetPoint ("topleft", label_dbm_bars, "bottomleft", -1, -2)
+ dropdown_dbm_bars:SetTemplate (DetailsFrameWork:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
+ dropdown_dbm_bars:SetWidth (200)
+ dropdown_dbm_bars.tooltip = "Create a weakaura to show a big countdown when a boss ability is coming"
local dropdown_bw_bars = DetailsFrameWork:NewDropDown (BossFrame, _, "$parentBigWigsBarsDropdown", "BigWigsBars", 160, 20, build_bigwigs_bars, 1)
dropdown_bw_bars:SetPoint ("topleft", label_bw_bars, "bottomleft", -1, -2)
+ dropdown_bw_bars:SetTemplate (DetailsFrameWork:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
+ dropdown_bw_bars:SetWidth (200)
+ dropdown_bw_bars.tooltip = "Create a weakaura to show a big countdown when a boss ability is coming"
dropdown_dbm_bars:Hide()
dropdown_bw_bars:Hide()
diff --git a/plugins/Details_RaidCheck/Details_RaidCheck.lua b/plugins/Details_RaidCheck/Details_RaidCheck.lua
index bc0bbb66..cdb32a97 100644
--- a/plugins/Details_RaidCheck/Details_RaidCheck.lua
+++ b/plugins/Details_RaidCheck/Details_RaidCheck.lua
@@ -6,6 +6,17 @@ local _UnitName = UnitName
local _UnitGroupRolesAssigned = UnitGroupRolesAssigned
local CLASS_ICON_TCOORDS = CLASS_ICON_TCOORDS
+--BFA TODO LIST:
+
+--[=[
+
+flask
+food
+runes
+feats
+
+--]=]
+
local flask_list = {
[188033] = true, --Flask of the Seventh Demon
[188031] = true, --Flask of the Whispered Pact
diff --git a/plugins/Details_RaidCheck/Details_RaidCheck.toc b/plugins/Details_RaidCheck/Details_RaidCheck.toc
index 7186be1e..c25960e1 100644
--- a/plugins/Details_RaidCheck/Details_RaidCheck.toc
+++ b/plugins/Details_RaidCheck/Details_RaidCheck.toc
@@ -1,4 +1,4 @@
-## Interface: 70300
+## Interface: 80000
## Title: Details Raid Check (plugin)
## Notes: Show a icon on Details title bar showing flask, food, pre-pots.
## RequiredDeps: Details
diff --git a/plugins/Details_Streamer/Details_Streamer.lua b/plugins/Details_Streamer/Details_Streamer.lua
index 38091101..8e705904 100644
--- a/plugins/Details_Streamer/Details_Streamer.lua
+++ b/plugins/Details_Streamer/Details_Streamer.lua
@@ -145,7 +145,7 @@ local function CreatePluginFrames()
titlebar:SetBackdropColor (.1, .1, .1, .9)
titlebar.text = titlebar:CreateFontString (nil, "overlay", "GameFontNormal")
titlebar.text:SetPoint ("center", titlebar, "center")
- titlebar.text:SetText ("Details!: Streamer")
+ titlebar.text:SetText ("Details! Streamer: Action Tracker")
titlebar:SetScript ("OnEnter", function (self)
GameTooltip:SetOwner (self)
GameTooltip:SetOwner (self, "ANCHOR_TOPLEFT")
@@ -305,8 +305,8 @@ local function CreatePluginFrames()
-
-
+
+
--> scroll frame
local autoscroll = CreateFrame ("scrollframe", "Details_StreamOverlayScrollFrame", SOF, "FauxScrollFrameTemplate")
autoscroll:SetScript ("OnVerticalScroll", function (self, offset) FauxScrollFrame_OnVerticalScroll (self, offset, 20, StreamOverlay.UpdateLines) end)
@@ -461,8 +461,10 @@ local function CreatePluginFrames()
f:SetPoint ("topleft", SOF, "topleft", 0, h)
f:SetPoint ("topright", SOF, "topright", 0, h)
+ --backdrop color not editable
f:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}})
f:SetBackdropBorderColor (0, 0, 0, 0)
+ --f:SetBackdropColor (0, 0, 0, 0)
local icon1 = statusbar:CreateTexture (nil, "overlay")
local icon2 = statusbar:CreateTexture (nil, "overlay")
@@ -834,7 +836,7 @@ function StreamOverlay:CastFinished (castid)
local target = CastsTable [castid].Target
local caststart = CastsTable [castid].CastStart
local hascasttime = CastsTable [castid].HasCastTime
-
+
if (ban_spells [spellid]) then
return
end
@@ -896,7 +898,7 @@ listener.track_spell_cast = function()
elseif (castinfo.IsChanneled) then
--> casting a channeled spell
- local name, subText, text, texture, startTime, endTime, isTradeSkill, notInterruptible = UnitChannelInfo ("player")
+ local name, text, texture, startTime, endTime, isTradeSkill, notInterruptible = UnitChannelInfo ("player")
if (name) then
startTime = startTime / 1000
@@ -920,7 +922,7 @@ listener.track_spell_cast = function()
else
--> still casting
- local spell, rank, displayName, icon, startTime, endTime, isTradeSkill, castID, interrupt = UnitCastingInfo ("player")
+ local spell, displayName, icon, startTime, endTime, isTradeSkill, castID, interrupt = UnitCastingInfo ("player")
if (spell) then
startTime = startTime / 1000
endTime = endTime / 1000
@@ -1042,53 +1044,71 @@ end
--print (self, event, ...)
if (event == "UNIT_SPELLCAST_SENT") then
- local unitID, spell, rank, target, id = ...
+
+ local unitID, target, castGUID, spellID = ...
+ --local unitID, spell, rank, target, id = ...
+ spell = GetSpellInfo (spellID)
+
+ --print (spell, ...)
+
if (unitID == "player") then
- CastsTable [id] = {Target = target, Id = id, CastStart = GetTime()}
- lastChannelSpell = id
+ CastsTable [castGUID] = {Target = target or "", Id = castGUID, CastStart = GetTime()}
+ lastChannelSpell = castGUID
lastspell = spell
- lastcastid = id
+ lastspellID = spellID
+ lastcastid = castGUID
end
elseif (event == "UNIT_SPELLCAST_START") then
- local unitID, spell, rank, id, spellID = ...
- if (unitID == "player" and CastsTable [id]) then
- CastsTable [id].SpellId = spellID
- CastsTable [id].HasCastTime = true
- StreamOverlay:CastStart (id)
+ --print ("UNIT_SPELLCAST_START", ...)
+
+ --spell, rank, id,
+ local unitID, castGUID, spellID = ...
+
+ if (unitID == "player" and CastsTable [castGUID]) then
+ CastsTable [castGUID].SpellId = spellID
+ CastsTable [castGUID].HasCastTime = true
+ StreamOverlay:CastStart (castGUID)
end
elseif (event == "UNIT_SPELLCAST_INTERRUPTED") then
- local unitID, spell, rank, id, spellID = ...
+ --local unitID, spell, rank, id, spellID = ...
+ local unitID, castGUID, spellID = ...
+ --print ("UNIT_SPELLCAST_INTERRUPTED", ...)
- if (unitID == "player" and CastsTable [id]) then
- CastsTable [id].Interrupted = true
+ if (unitID == "player" and CastsTable [castGUID]) then
+ CastsTable [castGUID].Interrupted = true
end
--> channels isn't passing the CastID / cast id for channels is always Zero.
elseif (event == "UNIT_SPELLCAST_CHANNEL_STOP") then
- local unitID, spell, rank, id, spellID = ...
+ --local unitID, spell, rank, id, spellID = ...
+ local unitID, castGUID, spellID = ...
if (unitID == "player") then
- id = lastchannelid
+ castGUID = lastchannelid
- if (not CastsTable [id]) then
+ if (not CastsTable [castGUID]) then
--print ("not", " - ", id, " - ", lastChannelSpell)
- id = lastChannelSpell
- if (not id or not CastsTable [id]) then
+ castGUID = lastChannelSpell
+ if (not castGUID or not CastsTable [castGUID]) then
return
end
end
- CastsTable [id].Interrupted = true
+ CastsTable [castGUID].Interrupted = true
ischanneling = false
lastchannelid = nil
end
elseif (event == "UNIT_SPELLCAST_CHANNEL_START") then
- local unitID, spell, rank, id, spellID = ...
- if (unitID == "player" and (CastsTable [id] or spell == lastspell)) then
- if (id == 0) then
- id = lastcastid
+ --local unitID, spell, rank, id, spellID = ...
+ --print ("UNIT_SPELLCAST_CHANNEL_START", ...)
+
+ local unitID, castGUID, spellID = ...
+
+ if (unitID == "player" and (CastsTable [castGUID] or spellID == lastspellID)) then
+ if (castGUID == "" or not castGUID) then
+ castGUID = lastcastid
end
if (ischanneling) then
@@ -1096,36 +1116,41 @@ end
CastsTable [lastchannelid].Interrupted = true
end
- if (not CastsTable [id]) then
+ if (not CastsTable [castGUID]) then
--print ("not", " - ", id, " - ", lastChannelSpell)
- id = lastChannelSpell
+ castGUID = lastChannelSpell
end
- CastsTable [id].HasCastTime = true
- CastsTable [id].IsChanneled = true
- CastsTable [id].SpellId = spellID
- lastchannelid = id
+ CastsTable [castGUID].HasCastTime = true
+ CastsTable [castGUID].IsChanneled = true
+ CastsTable [castGUID].SpellId = spellID
+ lastchannelid = castGUID
ischanneling = true
+ local spell = GetSpellInfo (spellID)
channelspells [spell] = true
- StreamOverlay:CastStart (id)
+ StreamOverlay:CastStart (castGUID)
end
elseif (event == "UNIT_SPELLCAST_SUCCEEDED") then
- local unitID, spell, rank, id, spellID = ...
+ --local unitID, spell, rank, id, spellID = ...
+ local unitID, castGUID, spellID = ...
+ local spell = GetSpellInfo (spellID)
- if (unitID == "player" and CastsTable[id] and not channelspells [spell]) then
- if (CastsTable[id].HasCastTime and not CastsTable[id].IsChanneled) then
+ --print (spell, ...)
+
+ if (unitID == "player" and CastsTable[castGUID] and not channelspells [spell]) then
+ if (CastsTable[castGUID].HasCastTime and not CastsTable[castGUID].IsChanneled) then
--> a cast (non channeled) just successful finished
- CastsTable [id].Success = true
- StreamOverlay:CastFinished (id)
+ CastsTable [castGUID].Success = true
+ StreamOverlay:CastFinished (castGUID)
- elseif (not CastsTable[id].HasCastTime) then
+ elseif (not CastsTable[castGUID].HasCastTime) then
--> instant cast finished
- CastsTable [id].SpellId = spellID
- CastsTable [id].Success = true
- StreamOverlay:CastFinished (id)
+ CastsTable [castGUID].SpellId = spellID
+ CastsTable [castGUID].Success = true
+ StreamOverlay:CastFinished (castGUID)
end
end
end
@@ -1354,7 +1379,7 @@ end
----------------------------------------------------------------------------------------------------------------------------------------------------------------
-function StreamOverlay.OpenOptionsPanel()
+function StreamOverlay.OpenOptionsPanel (from_options_panel)
if (not StreamOverlayOptionsPanel) then
@@ -1366,7 +1391,7 @@ function StreamOverlay.OpenOptionsPanel()
local options_slider_template = fw:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")
local options_button_template = fw:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
- local options_frame = StreamOverlay:CreatePluginOptionsFrame ("StreamOverlayOptionsPanel", "Details!: Streamer", 1)
+ local options_frame = StreamOverlay:CreatePluginOptionsFrame ("StreamOverlayOptionsPanel", "Details! Streamer: Action Tracker", 1)
options_frame:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
options_frame:SetBackdropColor (0, 0, 0, 0.5)
options_frame:SetBackdropBorderColor (0, 0, 0, 1)
@@ -1837,10 +1862,27 @@ function StreamOverlay.OpenOptionsPanel()
end
+ options_frame:SetScript ("OnHide", function()
+ if (StreamOverlay.FromOptionsPanel) then
+ --> reopen the options panel
+ C_Timer.After (0.2, function()
+ Details:OpenOptionsWindow(Details:GetInstance(1))
+ end)
+ end
+ end)
+
end
StreamOverlayOptionsPanel:Show()
-
+ StreamOverlay.FromOptionsPanel = from_options_panel
+ if (from_options_panel) then
+ if (DetailsOptionsWindow) then
+ C_Timer.After (0.2, function()
+ DetailsOptionsWindow:Hide()
+ end)
+ end
+ end
+
end
@@ -1909,7 +1951,7 @@ function StreamOverlay:OnEvent (_, event, ...)
StreamOverlay:SetPluginDescription ("Show in real time the spells you are casting.\n\nThe viewer can now follow what you are doing, what spells you are casting, learn your rotation.\n\nAlso tells who is the target and its class/spec on raiding or role if you are in arena.\n\nWhen you die, the panel is filled with your death log.")
- if (StreamOverlay.db.is_first_run) then
+ if (StreamOverlay.db.is_first_run) then --problem with setting the plugin as disabled
if (Details:GetTutorialCVar ("STREAMER_PLUGIN_FIRSTRUN")) then
Details:DisablePlugin ("DETAILS_PLUGIN_STREAM_OVERLAY")
StreamOverlay.db.is_first_run = false
@@ -1919,10 +1961,10 @@ function StreamOverlay:OnEvent (_, event, ...)
end
if (StreamOverlay.db.is_first_run and not Details:GetTutorialCVar ("STREAMER_PLUGIN_FIRSTRUN")) then
-
+
local show_frame = function()
- if ((DetailsWelcomeWindow and DetailsWelcomeWindow:IsShown()) or not Details:GetTutorialCVar ("MEMORY_USAGE_ALERT1") or not StreamOverlay.db.is_first_run) then
+ if ((DetailsWelcomeWindow and DetailsWelcomeWindow:IsShown()) or not StreamOverlay.db.is_first_run) then
return
end
@@ -1983,6 +2025,8 @@ function StreamOverlay:OnEvent (_, event, ...)
Details_StreamerDB.profiles [ Details_StreamerDB.characters [pname] ] = ptable
+
+
end
end
diff --git a/plugins/Details_Streamer/Details_Streamer.toc b/plugins/Details_Streamer/Details_Streamer.toc
index c406afcd..e43bdc35 100644
--- a/plugins/Details_Streamer/Details_Streamer.toc
+++ b/plugins/Details_Streamer/Details_Streamer.toc
@@ -1,4 +1,4 @@
-## Interface: 70300
+## Interface: 80000
## Title: Details!: Streamer (plugin)
## Notes: Show which spells you are casting, viewers can see what are you doing and follow your steps.
## RequiredDeps: Details
diff --git a/plugins/Details_TimeAttack/Details_TimeAttack.lua b/plugins/Details_TimeAttack/Details_TimeAttack.lua
index ee302280..e69de29b 100644
--- a/plugins/Details_TimeAttack/Details_TimeAttack.lua
+++ b/plugins/Details_TimeAttack/Details_TimeAttack.lua
@@ -1,1225 +0,0 @@
-local AceLocale = LibStub ("AceLocale-3.0")
-local Loc = AceLocale:GetLocale ("Details_TimeAttack")
-
-local _GetTime = GetTime --> wow api local
-local _UFC = UnitAffectingCombat --> wow api local
-local _IsInRaid = IsInRaid --> wow api local
-local _IsInGroup = IsInGroup --> wow api local
-local _UnitAura = UnitAura --> wow api local
-
-local _math_floor = math.floor --> lua library local
-local _cstr = string.format --> lua library local
-local _
-
---> Create the plugin Object
-local TimeAttack = _detalhes:NewPluginObject ("Details_TimeAttack")
---> Main Frame
-local TimeAttackFrame = TimeAttack.Frame
-
-TimeAttack:SetPluginDescription ("Special tool for measure damage within a period of time.\n\nYou can save the attempts and try again other time when you got new gear or changed the specialization.")
-
-local function CreatePluginFrames()
-
- --> catch Details! main object
- local _detalhes = _G._detalhes
- local DetailsFrameWork = _detalhes.gump
- local instance --> shortcut for details instance wich are holding solo plugins
- local GameCooltip = GameCooltip
-
- TimeAttack.try = 1
-
- --> OnEvent Table
- function TimeAttack:OnDetailsEvent (event)
- if (event == "HIDE") then --> plugin hidded, disabled
- TimeAttackFrame:SetScript ("OnUpdate", nil)
- TimeAttack:Cancel()
-
- elseif (event == "SHOW") then
- instance = _detalhes.SoloTables.instancia --> update wich instance solo mode are running
- DetailsFrameWork:RegisterForDetailsMove (DetailsTimeAttackHistoryBackground, instance)
- TimeAttack:RequestRealmResults()
-
- elseif (event == "COMBAT_PLAYER_ENTER") then --> combat started
- TimeAttack:ScheduleTimer ("TimeAttackPluginStart", 2)
-
- elseif (event == "PLUGIN_DISABLED") then
-
- elseif (event == "PLUGIN_ENABLED") then
-
- elseif (event == "DETAILS_STARTED") then
- TimeAttack:CheckTimeAttackTutorial()
- TimeAttack.PlayerRealm = GetRealmName()
-
- end
- end
-
-------------- Build TimeAttack Object ------------------------------------------------------------------------------------------------
-
- --> main frame and background texture
- TimeAttackFrame:SetResizable (false) --> cant resize, this is a fixed size
- TimeAttackFrame:SetWidth (300) --> need to be 300x300 to fit details window
- TimeAttackFrame:SetHeight (300) --> need to be 300x300 to fit details window
-
- local close_button = TimeAttack:CreateSoloCloseButton()
- close_button:SetPoint ("TOPRIGHT", TimeAttackFrame, "TOPRIGHT", -68, 3)
- close_button:SetSize (24, 24)
-
- --> default background picture, will hold the actor spec background, like old school talent frame
- local background = TimeAttackFrame:CreateTexture (nil, "background")
-
- --> some times the current spec isn't avaliable yet, so we try to catch 5 seconds after character logon
- function _detalhes:TimeAttackStartupBackground()
- --[[
- local spec = GetSpecialization()
- if (spec) then
- local id, name, description, icon, _background, role = GetSpecializationInfo (spec)
- if (_background) then
- background:SetTexture ("Interface\\TALENTFRAME\\".._background)
- end
- end
- --]]
- background:SetTexture ("Interface\\AddOns\\Details\\images\\background")
- end
- TimeAttack:ScheduleTimer ("TimeAttackStartupBackground", 5)
-
- background:SetTexCoord (0, 1, 0, 0.705078125)
- background:SetPoint ("topleft", TimeAttackFrame, "topleft", 2, 0)
- background:SetPoint ("bottomright", TimeAttackFrame, "bottomright", -2, 0)
- background:SetVertexColor (.3, .3, .3, 1)
- background:SetDrawLayer ("background", 1)
- TimeAttack.BackgroundTex = background
-
- --> Time attack string
- local title = DetailsFrameWork:NewLabel (TimeAttackFrame, TimeAttackFrame, nil, "title", "Time Attack", "QuestFont_Super_Huge", _, {1, 1, 1, 1})
- title:SetPoint ("topleft", TimeAttackFrame, 5, -8)
-
- --> background glow bellow title string
- local texturetitle = TimeAttackFrame:CreateTexture (nil, "artwork")
- texturetitle:SetTexture ("Interface\\ACHIEVEMENTFRAME\\UI-Achievement-Borders")
- texturetitle:SetTexCoord (0.287109375, 1, 0.26, 0.5)
- texturetitle:SetVertexColor (1, 1, 1, .5)
- texturetitle:SetPoint ("topleft", TimeAttackFrame)
- texturetitle:SetWidth (300)
- texturetitle:SetHeight (128)
-
- --> help button
- --> after 10 logins on the character this help button will not be show any more
- if (_detalhes.tutorial.main_help_button < 10) then
- local help = DetailsFrameWork:NewHelp (TimeAttackFrame, 280, 280, 0, -20, 40, 40)
- help:SetPoint ("topright", TimeAttackFrame, "topright", 8, 9)
- help:AddHelp (300, 300, 0, 0, 138, -138, Loc ["STRING_HELP"])
- help:SetFrameLevel (TimeAttackFrame:GetFrameLevel()+2)
- end
-
- --> a dark blue image on bottom of window
- local texturedown = TimeAttackFrame:CreateTexture (nil, "artwork")
- texturedown:SetTexture ("Interface\\PetBattles\\Weather-Darkness")
- texturedown:SetTexCoord (.15, .85, 1, 0)
- texturedown:SetVertexColor (1, 1, 1, .25)
- texturedown:SetPoint ("bottomright", TimeAttackFrame)
- texturedown:SetWidth (300)
-
- --> slider
- --local TimeAmount = DetailsFrameWork:NewSlider (TimeAttackFrame, nil, "DetailsTimeAttackTimeSelect", "TimeSelect", 270, 20, 30, 330, 1, TimeAttack.db.time)
- --TimeAmount:SetPoint ("topleft", TimeAttackFrame, 15, -270)
- --TimeAmount.OnChangeHook = function (_, _, value) TimeAttack.db.time = value end
-
- local on_select_time = function (_, _, time)
- TimeAttack.db.time = time
- end
- local icon = [[Interface\Challenges\challenges-minimap-banner]]
- local textcoord = {0.2, 0.8, 0.2, 0.8}
- local time_table = {
- {value = 40, icon = icon, texcoord = textcoord, label = "40 seconds", onclick = on_select_time},
- {value = 90, icon = icon, texcoord = textcoord, label = "1 minute 30 seconds", onclick = on_select_time},
- {value = 120, icon = icon, texcoord = textcoord, label = "2 minutes", onclick = on_select_time},
- {value = 180, icon = icon, texcoord = textcoord, label = "3 minutes", onclick = on_select_time},
- {value = 300, icon = icon, texcoord = textcoord, label = "5 minutes", onclick = on_select_time},
- {value = 480, icon = icon, texcoord = textcoord, label = "8 minutes", onclick = on_select_time},
- }
- local build_time_menu = function()
- return time_table
- end
- local TimeAmount2 = DetailsFrameWork:NewDropDown (TimeAttackFrame, _, "$parentTimeDropdown", "TimeDropdown", 180, 20, build_time_menu, TimeAttack.db.time)
-
- --> text informing about the amount of time
- local TimeDesc = DetailsFrameWork:NewLabel (TimeAttackFrame, TimeAttackFrame, nil, "TimeDesc", "Time Amount:", "GameFontNormal")
- TimeDesc:SetPoint ("topleft", TimeAttackFrame, 10, -280)
-
- local text_size = TimeDesc:GetStringWidth()
- local TimeAmountWidth = 300 - text_size - 11 - 4 - 14
- TimeAmount2:SetWidth (TimeAmountWidth)
-
- --TimeAmount2:SetPoint ("topleft", TimeAttackFrame, 15, -270)
- TimeAmount2:SetPoint ("left", TimeDesc, "right", 4, 0)
-
- --> main time/damage/dps texts
- local clock = DetailsFrameWork:NewLabel (TimeAttackFrame, TimeAttackFrame, nil, "TIMER", "00:", "GameFontHighlightLarge")
- clock:SetPoint ("center", TimeAttackFrame, -25, -20)
- local clock2 = DetailsFrameWork:NewLabel (TimeAttackFrame, TimeAttackFrame, nil, "TIMER", "00:", "GameFontHighlightLarge")
- clock2:SetPoint ("center", TimeAttackFrame, 0, -20)
- local clock3 = DetailsFrameWork:NewLabel (TimeAttackFrame, TimeAttackFrame, nil, "TIMER", "00", "GameFontHighlightLarge")
- clock3:SetPoint ("center", TimeAttackFrame, 23, -20)
-
- local damage = DetailsFrameWork:NewLabel (TimeAttackFrame, TimeAttackFrame, nil, "DAMAGE", "00.000.000", "GameFontHighlightLarge")
- damage:SetPoint ("center", TimeAttackFrame, 0, -40)
- local persecond = DetailsFrameWork:NewLabel (TimeAttackFrame, TimeAttackFrame, nil, "DPS", "000.000", "GameFontHighlightLarge")
- persecond:SetPoint ("center", TimeAttackFrame, 0, -60)
-
- --> two yellow rows
- local barraUP = TimeAttackFrame:CreateTexture (nil, "overlay")
- barraUP:SetTexture ("Interface\\TALENTFRAME\\talent-main")
- barraUP:SetWidth (300)
- barraUP:SetHeight (3)
- barraUP:SetPoint ("topleft", TimeAttackFrame, 0, -49)
- barraUP:SetTexCoord (0, 0.7890625, 0.248046875, 0.264625)
-
- local barraDOWN = TimeAttackFrame:CreateTexture (nil, "overlay")
- barraDOWN:SetTexture ("Interface\\TALENTFRAME\\talent-main")
- barraDOWN:SetWidth (300)
- barraDOWN:SetHeight (3)
- barraDOWN:SetPoint ("topleft", TimeAttackFrame, 0, -148)
- barraDOWN:SetTexCoord (0, 0.7890625, 0.248046875, 0.264625)
-
- --> background between the two yellow rows
- local bg1 = DetailsFrameWork:NewPanel (TimeAttackFrame, _, "DetailsTimeAttackHistoryBackground", _, 295, 100)
- bg1:SetBackdrop ({tile = true, tileSize = 16, bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background"})
- bg1:SetBackdropColor ({.95, .95, .95, .6})
- bg1:SetPoint ("center", TimeAttackFrame, 0, 50)
- --> default panel options come with enabled gradiens, we want to disable this
-
- --> this is the main table wich will hold the times and labels also is a class
- local HistoryPanelObject = {
- NowShowing = 1, --> 1 for recently 2 for saved
- LabelsCreated = {},
- Recently = {},
- Hystory = TimeAttack.db.history
- }
- HistoryPanelObject.__index = HistoryPanelObject
- TimeAttack.HistoryPanelObject = HistoryPanelObject
-
- --> build the button to switch between recent times and saved times
- local displayTipes = {Loc ["STRING_RECENTLY"], Loc ["STRING_SAVED"]}
- local switchButton
- local function changedisplay (self, button, param)
- HistoryPanelObject.NowShowing = param
- HistoryPanelObject:Refresh()
- --HistoryPanelObject.NowShowing = math.abs (HistoryPanelObject.NowShowing-3)
- --switchButton.text = displayTipes [HistoryPanelObject.NowShowing]
- end
-
- switchButton = DetailsFrameWork:NewButton (TimeAttackFrame, nil, "DetailsTimeAttackSwitchButton", "switchButton", 70, 14, changedisplay, 1)
- switchButton:InstallCustomTexture (nil, nil, nil, nil, true)
- switchButton:SetPoint (227, -35)
- switchButton.text = displayTipes [HistoryPanelObject.NowShowing]
-
- local savedButton = DetailsFrameWork:NewButton (TimeAttackFrame, nil, "DetailsTimeAttackSavedButton", "SavedButton", 70, 14, changedisplay, 2)
- savedButton:InstallCustomTexture (nil, nil, nil, nil, true)
- savedButton:SetPoint (227, -19)
- savedButton.text = "Saved"
-
- local realmButton = DetailsFrameWork:NewButton (TimeAttackFrame, nil, "DetailsTimeAttackSwitchButton", "RealmButton", 70, 14, changedisplay, 3)
- realmButton:InstallCustomTexture (nil, nil, nil, nil, true)
- realmButton:SetPoint (227, -3)
- realmButton.text = "Realm"
-
- --> realm times
-
- --> select realm history type
- local on_select_historytype = function (_, _, type)
- TimeAttack.db.realm_last_shown = type
- changedisplay (_, _, 3)
- end
- local menu = {
- {value = 40, icon = icon, iconcolor = "orange", texcoord = textcoord, label = "40 seconds", onclick = on_select_historytype},
- {value = 90, icon = icon, iconcolor = "orange", texcoord = textcoord, label = "1 minute 30 seconds", onclick = on_select_historytype},
- {value = 120, icon = icon, iconcolor = "orange", texcoord = textcoord, label = "2 minutes", onclick = on_select_historytype},
- {value = 180, icon = icon, iconcolor = "orange", texcoord = textcoord, label = "3 minutes", onclick = on_select_historytype},
- {value = 300, icon = icon, iconcolor = "orange", texcoord = textcoord, label = "5 minutes", onclick = on_select_historytype},
- {value = 480, icon = icon, iconcolor = "orange", texcoord = textcoord, label = "8 minutes", onclick = on_select_historytype}
- }
- local build_historytype_menu = function()
- return menu
- end
- local RealmHistoryType = DetailsFrameWork:NewDropDown (TimeAttackFrame, _, "$parentRealmHistoryType", "RealmHistoryType", 180, 20, build_historytype_menu, TimeAttack.db.realm_last_shown)
- RealmHistoryType:SetPoint ("topleft", TimeAttackFrame, "topleft", 2, -31)
- RealmHistoryType:SetPoint ("right", switchButton, "left", -4, 1)
-
- local scrollframe_realm = CreateFrame ("scrollframe", "TimeAttackRealmDpsScroll", TimeAttackFrame, "ListScrollFrameTemplate")
- scrollframe_realm:SetPoint ("topleft", TimeAttackFrame, "topleft", 0, -50)
- scrollframe_realm:SetSize (295, 100)
-
- local sort_dps = function (t1, t2) return t1.Dps > t2.Dps end
-
- local update_scrollrealm = function (self)
-
- local sample_size = TimeAttack.db.realm_last_shown
- local container = TimeAttack.db.realm_history
-
- local samples = {}
- for i = 1, #container do
- local this_sample = TimeAttack.db.realm_history [i]
- if (this_sample.Time == sample_size) then
- tinsert (samples, this_sample)
- end
- end
-
- table.sort (samples, sort_dps)
-
- local total_samples = #samples
- local offset = FauxScrollFrame_GetOffset (self)
- --print (total_samples)
-
- for i = 1, 14 do
- local frame = self.childs [i]
- local index = (offset * 2) + i
-
- local sample = samples [index]
-
- if (index <= total_samples and sample) then
- frame:Show()
- local player_name = sample.Source
- if (player_name:find (TimeAttack.PlayerRealm)) then
- player_name = TimeAttack:GetOnlyName (player_name)
- end
- frame.lefttext.text = index .. ". " .. player_name
- frame.righttext.text = TimeAttack:comma_value (_math_floor (sample.Dps))
- frame.sample = sample
- else
- frame:Hide()
- end
- end
-
- FauxScrollFrame_Update (self, ceil (#samples / 2) , 5, 14)
- end
-
- scrollframe_realm.Update = update_scrollrealm
- scrollframe_realm:SetScript ("OnVerticalScroll", function (self, offset) FauxScrollFrame_OnVerticalScroll (scrollframe_realm, offset, 14, update_scrollrealm) end)
- scrollframe_realm.childs = {}
-
- local on_enter = function (self)
- self:SetBackdrop ({tile = true, tileSize = 16, bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background", edgeFile = [[Interface\AddOns\Details\images\border_2]], edgeSize = 8})
- self:SetBackdropColor (.1, .1, .1, .1)
-
- GameCooltip:Reset()
-
- local TimeObject = self.sample
-
- GameCooltip:AddLine (TimeAttack:comma_value (TimeObject.DamageDone))
- GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\PetBadge-Undead")
-
- GameCooltip:AddLine (TimeAttack:comma_value (_math_floor (TimeObject.Dps)))
- GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\PetBadge-Elemental")
-
- GameCooltip:AddLine (string.format ("%.1f", TimeObject.ItemLevel))
- GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\PetBadge-Humanoid")
-
- local age = _math_floor ((time() - TimeObject [1]) / 86400) --one day
- GameCooltip:AddLine (age .. " days")
- GameCooltip:AddIcon ([[Interface\FriendsFrame\StatusIcon-Away]], 1, 1, 16, 16, 0, 0.85, 0, 1)
-
- GameCooltip:ShowCooltip (self, "tooltip")
-
- end
- local on_leave = function (self)
- self:SetBackdrop ({tile = true, tileSize = 16, bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background"})
- self:SetBackdropColor (.1, .1, .1, .3)
- GameCooltip:Hide()
- end
-
- local row_index = 0
- for i = 1, 14 do
- local child = CreateFrame ("frame", "TimeAttackRealmDpsScrollChield" .. i, TimeAttackFrame)
- if (i%2 == 0) then
- child:SetPoint ("left", scrollframe_realm.childs [i-1], "right", 2, 0)
- else
- child:SetPoint ("topleft", scrollframe_realm, "topleft", 2, (row_index*14*-1) - 2)
- row_index = row_index + 1
- end
-
- child:SetFrameLevel (scrollframe_realm:GetFrameLevel()+1)
- child:SetSize (146, 13)
- child:SetBackdrop ({tile = true, tileSize = 16, bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background"})
- child:SetBackdropColor (.1, .1, .1, .3)
- scrollframe_realm.childs [i] = child
-
- local left_text = DetailsFrameWork:CreateLabel (child, "", 10, "white", nil, "lefttext")
- left_text:SetPoint ("left", child, "left", 2, 0)
- local right_text = DetailsFrameWork:CreateLabel (child, "", 10, "white", nil, "righttext")
- right_text:SetPoint ("right", child, "right", -2, 0)
-
- child:SetScript ("OnEnter", on_enter)
- child:SetScript ("OnLeave", on_leave)
- end
-
- function TimeAttack:HideRealmScroll()
- RealmHistoryType:Hide()
- scrollframe_realm:Hide()
- for i = 1, 14 do
- scrollframe_realm.childs [i]:Hide()
- end
- end
- function TimeAttack:ShowRealmScroll()
- RealmHistoryType:Show()
- scrollframe_realm:Show()
- for i = 1, 14 do
- scrollframe_realm.childs [i]:Show()
- end
- scrollframe_realm:Update()
- end
-
- --> remove a saved or recently time
- local remove = function (self, button, index)
- if (HistoryPanelObject.NowShowing == 1) then --> recently
- table.remove (HistoryPanelObject.Recently, index)
- else --> history
- table.remove (TimeAttack.db.history, index)
- end
- HistoryPanelObject:Refresh()
- end
-
- --> save a recently time
- local save = function (self, button, RecentlyIndex)
- if (RecentlyIndex) then --> click on any label
- local ToSaveTimeObject = HistoryPanelObject.Recently [RecentlyIndex]
- if (ToSaveTimeObject and not ToSaveTimeObject.FinishSaved) then
- local NewSave = {}
- NewSave.DamageDone = ToSaveTimeObject.FinishDamage
- NewSave.Dps = ToSaveTimeObject.FinishDps
- NewSave.Time = ToSaveTimeObject.FinishTime
- NewSave.ItemLevel = ToSaveTimeObject.FinishIlevel
- NewSave.Date = ToSaveTimeObject.Date
- NewSave.note = ToSaveTimeObject.note
- NewSave.ID = ToSaveTimeObject.ID or math.random (10000000, 99999999)
- NewSave.Age = ToSaveTimeObject.Age or time()
-
- table.insert (TimeAttack.db.history, 1, NewSave)
- table.remove (TimeAttack.db.history, 25)
- HistoryPanelObject:AddHistory (NewSave)
- ToSaveTimeObject.FinishSaved = true
- HistoryPanelObject:Refresh()
-
- if (TimeAttack.Time == ToSaveTimeObject) then
- TimeAttackFrame ["SaveButton"]:Disable()
- end
- end
-
- elseif (TimeAttack.Time and TimeAttack.Time.FinishOkey and not TimeAttack.Time.FinishSaved) then --> click on SAVE button
-
- local NewSave = {}
-
- NewSave.DamageDone = TimeAttack.Time.FinishDamage
- NewSave.Dps = TimeAttack.Time.FinishDps
- NewSave.Time = TimeAttack.Time.FinishTime
- NewSave.ItemLevel = TimeAttack.Time.FinishIlevel
- NewSave.Date = TimeAttack.Time.Date
- NewSave.ID = TimeAttack.Time.ID or math.random (10000000, 99999999)
- NewSave.Age = TimeAttack.Time.Age or time()
-
- TimeAttack.Time.FinishSaved = true
- table.insert (TimeAttack.db.history, 1, NewSave)
- table.remove (TimeAttack.db.history, 25)
- HistoryPanelObject:AddHistory (NewSave)
- HistoryPanelObject:Refresh()
- TimeAttackFrame ["SaveButton"]:Disable()
- end
- end
-
- --> save button
-
- local SaveButton = DetailsFrameWork:NewButton (TimeAttackFrame, nil, "DetailsTimeAttackSaveButton", "SaveButton", 70, 20, save)
- SaveButton:InstallCustomTexture()
- SaveButton.text = Loc ["STRING_SAVE"]
- SaveButton:SetPoint ("center", 0, -90)
- SaveButton:Disable()
-
- function HistoryPanelObject:AddRecently (data)
- table.insert (self.Recently, 1, data)
- table.remove (self.Recently, 24)
- if (self.NowShowing == 1) then
- HistoryPanelObject:Refresh()
- end
- end
-
- function HistoryPanelObject:AddHistory (data)
- if (self.NowShowing == 2) then
- HistoryPanelObject:Refresh()
- end
- end
-
- --> report button
- local reportFunc = function (IsCurrent, IsReverse, AmtLines) --> localize-me
- local lines = { Loc ["STRING_REPORT"]..":",
- TimeAttack:comma_value (TimeAttack.Time.FinishDamage) .. " " .. Loc ["STRING_DAMAGEOVER"] .. " " .. TimeAttack.Time.FinishTime .. " " .. Loc ["STRING_SECONDS"] .. ".",
- Loc ["STRING_AVERAGEDPS"] .. " " .. TimeAttack:comma_value (_math_floor (TimeAttack.Time.FinishDps)) .. " " .. Loc ["STRING_WITH"] .. " " .. _cstr ("%.1f", TimeAttack.Time.FinishIlevel) .. " " .. Loc ["STRING_ITEMLEVEL"] .. "."}
- TimeAttack:SendReportLines (lines)
- end
-
- --[1] fucntion wich will build report lines after click on 'Send Button' [2] enable current button [3] enable reverse button
- local ReportButton = DetailsFrameWork:NewButton (TimeAttackFrame, nil, "DetailsTimeAttackReportButton", "ReportButton", 20, 20, function() TimeAttack:SendReportWindow (reportFunc) end)
- ReportButton.texture = "Interface\\COMMON\\VOICECHAT-ON"
- ReportButton:SetPoint ("left", DetailsTimeAttackSaveButton, "right", -10, 0)
- ReportButton:Hide()
-
---------------> general functions: ----------------
-
- function HistoryPanelObject:RefreshLabel (AttemptTable, AlreadySaved, First)
-
- self.table = AttemptTable
-
- if (AlreadySaved) then --> showing historic
-
- self.remove:SetPoint ("left", self.background.frame, "left", 20, 0)
- self.note:SetPoint ("left", self.remove, "right")
-
- if (AttemptTable.note) then
- self.note:SetNormalTexture ("Interface\\Buttons\\UI-GuildButton-PublicNote-Up")
- self.note.tooltip = AttemptTable.note
- else
- self.note:SetNormalTexture ("Interface\\Buttons\\UI-GuildButton-PublicNote-Disabled")
- self.note.tooltip = Loc ["STRING_SETNOTE"]
- end
- self.save:Hide()
- local diamesano = string.gsub (AttemptTable.Date, "(.-)%s", "")
- self.text:SetText (diamesano)
-
- self.rownumber:SetText ("#" .. self.index)
-
- elseif (not AttemptTable.FinishSaved) then --> não foi salvo ainda
- self.remove:Show()
- self.save:Show()
- self.remove:SetPoint ("left", self.background.frame, "left", 16, 0)
- self.note:SetPoint ("left", self.save.button, "right")
- if (AttemptTable.note) then
- self.note:SetNormalTexture ("Interface\\Buttons\\UI-GuildButton-PublicNote-Up")
- self.note.tooltip = AttemptTable.note
- else
- self.note:SetNormalTexture ("Interface\\Buttons\\UI-GuildButton-PublicNote-Disabled")
- self.note.tooltip = Loc ["STRING_SETNOTE"]
- end
- if (First) then
- self.text:SetText ("-".. TimeAttack:ToK (First-AttemptTable.FinishDamage))
- else
- self.text:SetText (TimeAttack:ToK (AttemptTable.FinishDamage))
- end
- self.rownumber:SetText ("#" .. AttemptTable.N)
- self.rownumber:SetPoint ("left", self.background.frame)
-
- else --> ta mostrando recentes e ja foi salvo
- self.remove:Show()
- self.remove:SetPoint ("left", self.background.frame, "left", 16, 0)
- self.note:SetPoint ("left", self.remove.button, "right")
- if (AttemptTable.note) then
- self.note:SetNormalTexture ("Interface\\Buttons\\UI-GuildButton-PublicNote-Up")
- self.note.tooltip = AttemptTable.note
- else
- self.note:SetNormalTexture ("Interface\\Buttons\\UI-GuildButton-PublicNote-Disabled")
- self.note.tooltip = Loc ["STRING_SETNOTE"]
- end
- self.save:Hide()
- if (First) then
- self.text:SetText ("-".. TimeAttack:ToK (First-AttemptTable.FinishDamage))
- else
- self.text:SetText (TimeAttack:ToK (AttemptTable.FinishDamage))
- end
- self.rownumber:SetText ("#" .. AttemptTable.N)
- self.rownumber:SetPoint ("left", self.background.frame)
- end
-
- self.background:Show()
- end
-
- local OnEnterHook = function (self, arg2, arg3)
-
- self:SetBackdrop ({tile = true, tileSize = 16, bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background", edgeFile = [[Interface\AddOns\Details\images\border_2]], edgeSize = 8})
- self:SetBackdropColor (.1, .1, .1, .1)
-
- self = self.BoxObject
-
- if (HistoryPanelObject.NowShowing == 1) then --> recently
-
- GameCooltip:Reset()
-
- local TimeObject = HistoryPanelObject.Recently [self.index]
-
- GameCooltip:AddLine (TimeAttack:comma_value (TimeObject.FinishDamage))
- GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\PetBadge-Undead")
-
- GameCooltip:AddLine (TimeAttack:comma_value (math.floor (TimeObject.FinishDps)))
- GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\PetBadge-Elemental")
-
- GameCooltip:AddLine (TimeObject.FinishTime.." " .. Loc ["STRING_SECONDS"])
- GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\PetBadge-Mechanical")
-
- GameCooltip:AddLine (string.format ("%.1f", TimeObject.FinishIlevel))
- GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\PetBadge-Humanoid")
-
- GameCooltip:ShowCooltip (self.background, "tooltip")
-
- else --> history
-
- GameCooltip:Reset()
-
- local TimeObject = TimeAttack.db.history [self.index]
-
- GameCooltip:AddLine (TimeAttack:comma_value (TimeObject.DamageDone))
- GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\PetBadge-Undead")
-
- GameCooltip:AddLine (TimeAttack:comma_value (math.floor (TimeObject.Dps)))
- GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\PetBadge-Elemental")
-
- GameCooltip:AddLine (TimeObject.Time.." " .. Loc ["STRING_SECONDS"])
- GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\PetBadge-Mechanical")
-
- GameCooltip:AddLine (string.format ("%.1f", TimeObject.ItemLevel))
- GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\PetBadge-Humanoid")
-
- GameCooltip:ShowCooltip (self.background, "tooltip")
- end
-
- return true
- end
-
- local OnLeaveHook= function (self)
- GameCooltip:ShowMe (false)
- self:SetBackdrop ({tile = true, tileSize = 16, bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background"})
- self:SetBackdropColor (.1, .1, .1, .3)
-
- return true
- end
-
- TimeAttack.HistoryX = 4
- TimeAttack.HistoryY = -52
-
- local WriteNoteStop = function()
-
- local editbox = TimeAttackFrame ["NoteEntry"]
-
- local texto = editbox:GetText()
- if (string.len (texto) > 0) then
- if (HistoryPanelObject.NowShowing == 1) then --> recently
- HistoryPanelObject.Recently [editbox.editing].note = texto
- else
- TimeAttack.db.history [editbox.editing].note = texto
- end
- end
- editbox:SetText ("")
- editbox.editing = nil
- editbox:Hide()
- switchButton:Enable()
-
- if (TimeAttack.Time and TimeAttack.Time.FinishOkey and not TimeAttack.Time.FinishSaved) then
- SaveButton:Enable()
- ReportButton:Show()
- end
-
- HistoryPanelObject:Refresh()
- end
-
- --local NoteInsertField = DetailsFrameWork:NewTextBox (TimeAttackFrame, TimeAttackFrame, "NoteEntry", WriteNoteStop, _, _, 296, 15)
- local NoteInsertField = DetailsFrameWork:NewTextEntry (TimeAttackFrame, nil, "DetailsTimeAttackNoteEntry", "NoteEntry", 296, 15, WriteNoteStop)
- NoteInsertField:SetBackdropColor (0, 0, 0, 1)
- NoteInsertField:SetPoint ("bottom", barraDOWN, "top", 0, 0)
- NoteInsertField:SetFrameLevel (TimeAttackFrame:GetFrameLevel()+3)
- NoteInsertField:Hide()
-
- NoteInsertField.OnEscapePressedHook = function()
- NoteInsertField.editing = nil
- NoteInsertField:SetText ("")
- switchButton:Enable()
- NoteInsertField:Hide()
-
- if (TimeAttack.Time and TimeAttack.Time.FinishOkey and not TimeAttack.Time.FinishSaved) then
- SaveButton:Enable()
- ReportButton:Show()
- end
-
- end
-
- local WriteNoteStart = function (self, button, index)
-
- if (HistoryPanelObject.NowShowing == 1 and HistoryPanelObject.Recently [index].note) then --> recently
- NoteInsertField:SetText (HistoryPanelObject.Recently [index].note)
- elseif (HistoryPanelObject.NowShowing == 2 and TimeAttack.db.history [index].note) then
- NoteInsertField:SetText (TimeAttack.db.history [index].note)
- else
- NoteInsertField:SetText ("")
- end
-
- NoteInsertField.editing = index
- NoteInsertField:Show()
- NoteInsertField:SetFocus()
- switchButton:Disable()
- SaveButton:Disable()
- ReportButton:Hide()
- end
-
- function HistoryPanelObject:CreateNewLabel (index)
-
- local LabelBoxObject = {}
- self.LabelsCreated [#self.LabelsCreated+1] = LabelBoxObject
- setmetatable (LabelBoxObject, HistoryPanelObject)
- LabelBoxObject.index = index
-
- local LabelBackground = DetailsFrameWork:NewPanel (bg1.frame, bg1.frame, "DetailsTimeAttackPanel"..index, "label"..index, 95, 12,
- {tile = true, tileSize = 16, bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background"}, {.1, .1, .1, .3})
-
- LabelBackground:SetPoint ("topleft", TimeAttackFrame, TimeAttack.HistoryX, TimeAttack.HistoryY)
- LabelBackground.frame:SetFrameLevel (bg1.frame:GetFrameLevel()+1)
-
- LabelBackground:SetHook ("OnEnter", OnEnterHook)
- LabelBackground:SetHook ("OnLeave", OnLeaveHook)
-
- LabelBackground.frame.BoxObject = LabelBoxObject
-
- TimeAttack.HistoryY = TimeAttack.HistoryY - 12
- if (TimeAttack.HistoryY <= -148) then
- TimeAttack.HistoryY = -52
- TimeAttack.HistoryX = TimeAttack.HistoryX + 99
- end
-
- local LabelText = DetailsFrameWork:NewLabel (LabelBackground.frame, LabelBackground.frame, nil, "text", "000.000", "GameFontHighlightSmall")
- LabelText:SetPoint ("right", LabelBackground.frame, 0, 0)
- LabelText:SetJustifyH ("right")
-
- local RowNumber = DetailsFrameWork:NewLabel (LabelBackground.frame, LabelBackground.frame, nil, "rownumber", "#1", "GameFontHighlightSmall")
- RowNumber:SetPoint ("left", LabelBackground.frame)
- RowNumber:SetJustifyH ("left")
-
- --local LabelRemoveButton = DetailsFrameWork:NewDetailsButton (LabelBackground.frame, LabelBackground.frame, _, remove, index, index, 10, 10, "Interface\\PetBattles\\DeadPetIcon")
- local LabelRemoveButton = DetailsFrameWork:NewButton (LabelBackground.frame, nil, "DetailsTimeAttackRemoveButton"..index, "RemoveButton"..index, 12, 12, remove, index, index, "Interface\\PetBattles\\DeadPetIcon")
- LabelRemoveButton:SetPoint ("left", LabelBackground.frame, "left", 16, 0)
- LabelRemoveButton.tooltip = Loc ["STRING_REMOVERECORD"]
-
- --local LabelSaveButton = DetailsFrameWork:NewDetailsButton (LabelBackground.frame, LabelBackground.frame, _, save, index, index, 10, 10, "Interface\\Scenarios\\ScenarioIcon-Check")
- local LabelSaveButton = DetailsFrameWork:NewButton (LabelBackground.frame, nil, "DetailsTimeAttackSaveButton"..index, "SaveButton"..index, 12, 12, save, index, index, "Interface\\Scenarios\\ScenarioIcon-Check")
- LabelSaveButton:SetPoint ("left", LabelRemoveButton.button, "right", -1, 0)
- LabelSaveButton.tooltip = Loc ["STRING_SAVERECORD"]
-
- --local LabelSetnoteButton = DetailsFrameWork:NewDetailsButton (LabelBackground.frame, LabelBackground.frame, _, WriteNoteStart, index, index, 10, 10, "Interface\\Buttons\\UI-GuildButton-PublicNote-Disabled")
- local LabelSetnoteButton = DetailsFrameWork:NewButton (LabelBackground.frame, nil, "DetailsTimeAttackSetNoteButton"..index, "SetNoteButton"..index, 12, 12, WriteNoteStart, index, index, "Interface\\Buttons\\UI-GuildButton-PublicNote-Disabled")
- LabelSetnoteButton:SetPoint ("left", LabelSaveButton.button, "right", -2, 0)
- LabelSetnoteButton.tooltip = Loc ["STRING_SETNOTE"]
-
- LabelBoxObject.rownumber = RowNumber
- LabelBoxObject.text = LabelText
- LabelBoxObject.background = LabelBackground
- LabelBoxObject.remove = LabelRemoveButton
- LabelBoxObject.save = LabelSaveButton
- LabelBoxObject.note = LabelSetnoteButton
- LabelBoxObject.HaveNote = false
-
- return LabelBoxObject
- end
-
- function HistoryPanelObject:Refresh()
-
- if (self.NowShowing == 1) then --> recent
-
- TimeAttackFrame.switchButton:SetTextColor (1, 1, 1, 1)
- TimeAttackFrame.SavedButton:SetTextColor (1, 0.8, 0, 1)
- TimeAttackFrame.RealmButton:SetTextColor (1, 0.8, 0, 1)
- TimeAttack:HideRealmScroll()
-
- --> sort by damage done
- table.sort (self.Recently, function (a,b) return a.FinishDamage > b.FinishDamage end)
- local first = self.Recently [1]
- if (first) then
- first = first.FinishDamage
- end
- for index, AttemptTable in ipairs (self.Recently) do
-
- local thisLabel = self.LabelsCreated [index]
- if (not thisLabel) then
- thisLabel = self:CreateNewLabel (index)
- end
- if (index == 1) then
- thisLabel:RefreshLabel (AttemptTable, false)
- else
- thisLabel:RefreshLabel (AttemptTable, false, first)
- end
- end
-
- for amt = #self.Recently+1, #self.LabelsCreated do
- local thisLabel = self.LabelsCreated [amt]
- thisLabel.background:Hide()
- end
-
- elseif (self.NowShowing == 2) then --> saved
-
- TimeAttackFrame.switchButton:SetTextColor (1, 0.8, 0, 1)
- TimeAttackFrame.SavedButton:SetTextColor (1, 1, 1, 1)
- TimeAttackFrame.RealmButton:SetTextColor (1, 0.8, 0, 1)
- TimeAttack:HideRealmScroll()
-
- for index, AttemptTable in ipairs (TimeAttack.db.history) do
- local thisLabel = self.LabelsCreated [index]
- if (not thisLabel) then
- thisLabel = self:CreateNewLabel (index)
- end
- thisLabel:RefreshLabel (AttemptTable, true)
- end
-
- for amt = #TimeAttack.db.history+1, #self.LabelsCreated do
- local thisLabel = self.LabelsCreated [amt]
- thisLabel.background:Hide()
- end
-
- elseif (self.NowShowing == 3) then --> realm
-
- for amt = 1, #self.LabelsCreated do
- local thisLabel = self.LabelsCreated [amt]
- thisLabel.background:Hide()
- end
-
- TimeAttackFrame.switchButton:SetTextColor (1, 0.8, 0, 1)
- TimeAttackFrame.SavedButton:SetTextColor (1, 0.8, 0, 1)
- TimeAttackFrame.RealmButton:SetTextColor (1, 1, 1, 1)
-
- TimeAttack:ShowRealmScroll()
- end
- end
-
- HistoryPanelObject:Refresh()
-
- local update = 0
- local player --> short cut for Player Actor Object
-
- --> Cancel function
- function TimeAttack:Cancel()
- if (TimeAttack.Time) then
- TimeAttack.Time.Working = false
- TimeAttack.Time.Done = true
- end
- TimeAttack.Frame:SetScript ("OnUpdate", nil)
- end
-
- --> Exec function
- local DoTimeAttack = function (self, elapsed)
-
- TimeAttack.Time.Elapsed = TimeAttack.Time.Elapsed + elapsed
- update = update + elapsed
- if (_GetTime() > TimeAttack.Time.EndTime) then --> reached the end time
- if (TimeAttack.Time.Working and not TimeAttack.Time.Done) then
- TimeAttack:Cancel()
- TimeAttack:Finish()
- else
- TimeAttack:Cancel()
- end
- else
- --> aqui vem as funções que verificam se o jogador esta em grupo ou se tem algum buff proibido
- TimeAttack.Time.Tick = TimeAttack.Time.Tick + elapsed
- if (TimeAttack.Time.Tick > 1) then
- TimeAttack.Time.Tick = 0
- if (not _UFC ("player")) then --> isn't in combat
- TimeAttack:Cancel()
- end
- else
- local minutos, segundos = _math_floor (TimeAttack.Time.Elapsed/60), _math_floor (TimeAttack.Time.Elapsed%60)
-
- if (segundos < 10) then
- segundos = "0"..segundos
- end
-
- local mili = _cstr ("%.2f", TimeAttack.Time.Elapsed-_math_floor (TimeAttack.Time.Elapsed))*100
- if (mili < 10) then
- mili = "0"..mili
- end
-
- clock:SetText ("0".. minutos .. ":")
- clock2:SetText (segundos ..":")
- clock3:SetText (mili)
- damage:SetText (TimeAttack:comma_value (player.total))
-
- if (TimeAttack.Time.Elapsed > 3) then
- persecond:SetText (TimeAttack:comma_value (_math_floor (player.total/TimeAttack.Time.Elapsed)))
- end
- end
- end
-
- end
-
-
- --> When the time is gone
- function TimeAttack:Finish()
- TimeAttack.Time.FinishOkey = true
- TimeAttack.Time.FinishSaved = false
- TimeAttack.Time.FinishDamage = player.total
- TimeAttack.Time.FinishDps = player.total/TimeAttack.Time.Elapsed
- local _, equipped = GetAverageItemLevel()
- TimeAttack.Time.FinishIlevel = equipped
- TimeAttack.Time.Date = date ("%H:%M %d/%m/%y")
- TimeAttack.Time.N = TimeAttack.try
- TimeAttack.Time.ID = math.random (10000000, 99999999)
- TimeAttack.Time.Age = time()
- HistoryPanelObject:AddRecently (TimeAttack.Time)
- TimeAttack.try = TimeAttack.try + 1
- SaveButton:Enable()
- ReportButton:Show()
-
- TimeAttack:ShareRecently (TimeAttack.Time)
- end
-
- function _detalhes:TimeAttackPluginStart()
- TimeAttack:Start()
- end
-
- --> When a new combat is received by the PlugIn
- function TimeAttack:Start()
-
- if (TimeAttack.Time and TimeAttack.Time.Working) then
- TimeAttack:Cancel()
- end
-
- TimeAttack.Time = {}
- TimeAttack.Time.StartTime = _GetTime()
- TimeAttack.Time.EndTime = TimeAttack.Time.StartTime + TimeAttack.db.time - 2
- TimeAttack.Time.Elapsed = 2
- TimeAttack.Time.Done = nil
- TimeAttack.Time.Working = true
- TimeAttack.Time.Tick = 0
-
- TimeAttack.Time.FinishOkey = false
- TimeAttack.Time.FinishSaved = false
- TimeAttack.Time.FinishDamage = nil
- TimeAttack.Time.FinishTime = TimeAttack.db.time
- TimeAttack.Time.FinishDps = nil
- TimeAttack.Time.FinishIlevel = nil
- TimeAttack.Time.Date = nil
-
- SaveButton:Disable()
- ReportButton:Hide()
-
- player = TimeAttack:GetActor ("current", 1, UnitName ("player")) --> param 1 = combat | param 2 = attribute | param 3 = player name | all none = current, damage, player
-
- if (not player) then
- print (Loc ["STRING_COMBATFAIL"])
- return
- end
-
- update = 0
- TimeAttack.Frame:SetScript ("OnUpdate", DoTimeAttack)
-
- end
-
- local options = DetailsFrameWork:NewButton (TimeAttackFrame, nil, "$parentOptionsButton", "OptionsButton", 86, 16, TimeAttack.OpenOptionsPanel, nil, nil, nil, "Options")
- options:SetPoint ("bottomleft", TimeAttackFrame, "bottomleft", 5, 22)
- --options:SetPoint ("bottomright", TimeAttackFrame, "bottomright", -10, 30)
- --options:SetPoint ("bottomright", TimeAmount2, "topright", 0, 1)
- --options:InstallCustomTexture()
- options:SetTextColor (1, 0.93, 0.74)
- options:SetIcon ([[Interface\Buttons\UI-OptionsButton]], 14, 14, nil, {0, 1, 0, 1}, nil, 3)
-end
-
-function TimeAttack:CheckTimeAttackTutorial()
- --TimeAttack:SetTutorialCVar ("TIME_ATTACK_TUTORIAL1", nil)
- if (not TimeAttack:GetTutorialCVar ("TIME_ATTACK_TUTORIAL1")) then
- --tutorial disabled
- --TimeAttackFrame:RegisterEvent ("PLAYER_TARGET_CHANGED")
- end
-end
-
-function TimeAttack:CheckTargetForTutorial()
- local guid = UnitGUID ("target")
- if (guid) then
- local mobid = TimeAttack:GetNpcIdFromGuid (guid)
- if (mobid == 31144 or mobid == 32666 or mobid == 31146 or mobid == 32667 or mobid == 67127 or mobid == 46647 or mobid == 87762 or mobid == 87761) then
- TimeAttack:SetTutorialCVar ("TIME_ATTACK_TUTORIAL1", true)
- TimeAttackFrame:UnregisterEvent ("PLAYER_TARGET_CHANGED")
- TimeAttack:ShowTargetTutorial()
- end
- end
-end
-
-function TimeAttack:ShowTargetTutorial()
- if (TimeAttack:GetFreeInstancesAmount() > 0) then
- local func = function()
- local newinstance = TimeAttack:CreateInstance (true) --> force create a new one
- if (newinstance) then
- newinstance:SetMode (DETAILS_MODE_SOLO)
- TimeAttack.SoloTables:switch (nil, "DETAILS_PLUGIN_TIME_ATTACK")
- end
- end
- TimeAttack:GetFramework():ShowTutorialAlertFrame ("Open Time Attack", "plugin for measure dps", func)
- end
-end
-
-
-
-function TimeAttack:AddRealmData (damage, time, ilevel, age, id, class, source)
- local t = {
- age,
- DamageDone = damage[1],
- Dps = damage[2],
- Time = time,
- ItemLevel = ilevel,
- ID = id,
- Source = source
- }
-
- tinsert (TimeAttack.db.realm_history, t)
- table.sort (TimeAttack.db.realm_history, TimeAttack.Sort1)
-
- if (#TimeAttack.db.realm_history > 60) then
- table.remove (TimeAttack.db.realm_history, 61)
- end
-end
-
-
-
---request data
- function TimeAttack:RequestRealmResults()
- if (TimeAttack.last_channel_request+600 < time()) then
- TimeAttack.last_channel_request = time()
- TimeAttack:SendPluginCommMessage ("TARE", nil, select (2, UnitClass ("player")))
- end
- end
-
- function TimeAttack:OnReceiveRequest (class)
- if (class == select (2, UnitClass ("player")) and TimeAttack.last_forced_share+20 < time()) then
- TimeAttack.last_forced_share = time()
- TimeAttack:ShareResults() --share saved
- TimeAttack:ShareAllRecently() --share recently
- end
- end
-
---saved
- function TimeAttack:ShareResults()
- for i = TimeAttack.db.history_lastindex+1, TimeAttack.db.history_lastindex+3 do
- local this_saved = TimeAttack.db.history [i]
- if (not this_saved) then
- TimeAttack.db.history_lastindex = 0
- break
- end
-
- TimeAttack:ShareSaved (this_saved)
- TimeAttack.db.history_lastindex = i
- end
- end
-
- function TimeAttack:ShareSaved (saved)
- local data = TimeAttack:PrepareToShare (saved)
-
- if (TimeAttack.db.saved_as_anonymous) then
- data [7] = "Unidentified"
- else
- data [7] = UnitName ("player") .. "-" .. GetRealmName()
- end
-
- TimeAttack:ScheduleTimer ("SendQueuedData", math.random (1, 5), data)
- end
-
---recentrly
- function TimeAttack:ShareAllRecently()
- local amt = 0
- for index, recent in ipairs (TimeAttack.HistoryPanelObject.Recently) do
- TimeAttack:ShareRecently (recent)
- amt = amt + 1
- if (amt == 3) then
- break
- end
- end
- end
-
- function TimeAttack:ShareRecently (recent)
- local data = TimeAttack:PrepareToShare (recent)
-
- if (TimeAttack.db.recently_as_anonymous) then
- data [7] = "Unidentified"
- else
- data [7] = UnitName ("player") .. "-" .. GetRealmName()
- end
-
- TimeAttack:ScheduleTimer ("SendQueuedData", math.random (1, 5), data)
- end
-
---send and receive data functions
-
- function TimeAttack:OnReceiveShared (damage, time, ilevel, age, id, class, source)
- --print ("TA:", damage[1], damage[2], time, ilevel, age, id, class, source) --debug
-
- if (not TimeAttack:IsPluginEnabled()) then
- return
- end
-
- --same class
- if (class ~= select (2, UnitClass ("player"))) then
- return
- end
- --already exists
- for index, data in ipairs (TimeAttack.db.realm_history) do
- if (data.ID == id) then
- return
- end
- end
- for index, data in ipairs (TimeAttack.HistoryPanelObject.Recently) do
- if (data.ID == id) then
- return
- end
- end
- for index, data in ipairs (TimeAttack.db.history) do
- if (data.ID == id) then
- return
- end
- end
- --add
- TimeAttack:AddRealmData (damage, time, ilevel, age, id, class, source)
- end
-
- function TimeAttack:SendQueuedData (data)
- TimeAttack:SendPluginCommMessage ("TASH", nil, data[1], data[2], data[3], data[4], data[5], data[6], data [7])
- end
-
- function TimeAttack:PrepareToShare (sample)
- local send_table = {}
- send_table [1] = {_math_floor (sample.FinishDamage or sample.DamageDone), _math_floor (sample.FinishDps or sample.Dps)} --damage and dps
- send_table [2] = sample.FinishTime or sample.Time --time
- send_table [3] = _math_floor (sample.FinishIlevel or sample.ItemLevel) --ilevel
- send_table [4] = sample.Age --age
- send_table [5] = sample.ID --id
- send_table [6] = select (2, UnitClass ("player"))
- return send_table
- end
-
-
-
-
-
-
---options
-local build_options_panel = function()
-
- local options_frame = TimeAttack:CreatePluginOptionsFrame ("TimeAttackOptionsWindow", "Time Attack Options", 1)
- local menu = {
- {
- type = "toggle",
- get = function() return TimeAttack.db.recently_as_anonymous end,
- set = function (self, fixedparam, value) TimeAttack.db.recently_as_anonymous = value end,
- desc = "When enabled, your recently samples are shared without telling your character name.",
- name = "Share Recently as Anonymous"
- },
- {
- type = "toggle",
- get = function() return TimeAttack.db.saved_as_anonymous end,
- set = function (self, fixedparam, value) TimeAttack.db.saved_as_anonymous = value end,
- desc = "When enabled, your saved samples are shared without telling your character name.",
- name = "Share Saved as Anonymous"
- },
- {
- type = "toggle",
- get = function() return TimeAttack.db.disable_sharing end,
- set = function (self, fixedparam, value) TimeAttack.db.disable_sharing = value end,
- desc = "When enabled, your damage samples aren't shared with other players in your realm.\n\n|cFFFFFF00Important|r: when disabled you also can't get samples from other players.",
- name = "Disable Sharing"
- },
- }
-
- _detalhes.gump:BuildMenu (options_frame, menu, 15, -65, 260)
-
-end
-TimeAttack.OpenOptionsPanel = function()
- if (not TimeAttackOptionsWindow) then
- build_options_panel()
- end
- TimeAttackOptionsWindow:Show()
-end
-
-function TimeAttack:OnEvent (_, event, ...)
-
- if (event == "PLAYER_TARGET_CHANGED") then
- TimeAttack:CheckTargetForTutorial()
-
- elseif (event == "ADDON_LOADED") then
- local AddonName = select (1, ...)
- if (AddonName == "Details_TimeAttack") then
-
- if (_G._detalhes) then
-
- local MINIMAL_DETAILS_VERSION_REQUIRED = 1
-
- local default_settings = {
- time = 40,
- dps = 0,
- history = {},
- history_lastindex = 0,
- realm_history = {},
- realm_lastamt = 0,
- realm_last_shown = 40,
- recently_as_anonymous = true,
- saved_as_anonymous = true,
- disable_sharing = false,
- }
-
- if (_detalhes_databaseTimeAttack) then
- default_settings.history = _detalhes_databaseTimeAttack.history
- _detalhes_databaseTimeAttack = nil
- end
-
- --> Install
- local install, saveddata = _G._detalhes:InstallPlugin ("SOLO", Loc ["STRING_PLUGIN_NAME"], "Interface\\Icons\\SPELL_HOLY_BORROWEDTIME", TimeAttack, "DETAILS_PLUGIN_TIME_ATTACK", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", "v1.05", default_settings)
- if (type (install) == "table" and install.error) then
- print (install.errortext)
- return
- end
-
- --> fix for old versions
- local ta = TimeAttack.db.time
- if (ta ~= 40 and ta ~= 90 and ta ~= 120 and ta ~= 180 and ta ~= 300 and ta ~= 480) then
- TimeAttack.db.time = 40
- end
- for index, saved in ipairs (TimeAttack.db.history) do
- if (not saved.ID) then
- saved.ID = math.random (10000000, 99999999)
- end
- if (not saved.Age) then
- saved.Age = time()
- end
- end
- --
-
- --> Register needed events
- _G._detalhes:RegisterEvent (TimeAttack, "COMBAT_PLAYER_ENTER")
- _G._detalhes:RegisterEvent (TimeAttack, "REALM_CHANNEL_ENTER")
- _G._detalhes:RegisterEvent (TimeAttack, "REALM_CHANNEL_LEAVE")
-
- --> create widgets
- CreatePluginFrames()
-
- --> register comm
- TimeAttack:RegisterPluginComm ("TASH", "OnReceiveShared")
- TimeAttack:RegisterPluginComm ("TARE", "OnReceiveRequest")
- TimeAttack.last_forced_share = 0
- TimeAttack.last_channel_request = 0
-
- --/run DETAILS_PLUGIN_TIME_ATTACK:ShareResults()
-
- --> register background task
- TimeAttack:RegisterBackgroundTask ("TimeAttackSharer", "ShareResults", "LOW")
-
- --> Register slash commands
- SLASH_DETAILS_TIMEATTACK1, SLASH_DETAILS_TIMEATTACK2 = "/timeattack", "/ta"
- function SlashCmdList.DETAILS_TIMEATTACK (msg, editbox)
- if (not TimeAttackFrame:IsShown()) then
- --> check if there is a instance closed with time attack
- for index, instance in TimeAttack:ListInstances() do
- if (instance:IsSoloMode (true)) then
- instance:EnableInstance()
- TimeAttack.SoloTables:switch (nil, "DETAILS_PLUGIN_TIME_ATTACK")
- return
- end
- end
- --> open a new instance
- if (TimeAttack:GetFreeInstancesAmount() > 0) then
- local newinstance = TimeAttack:CreateInstance (true) --> force create a new one
- if (newinstance) then
- newinstance:SetMode (DETAILS_MODE_SOLO)
- TimeAttack.SoloTables:switch (nil, "DETAILS_PLUGIN_TIME_ATTACK")
- end
- end
- end
- end
-
- end
- end
- end
-end
diff --git a/plugins/Details_TimeAttack/Details_TimeAttack.toc b/plugins/Details_TimeAttack/Details_TimeAttack.toc
index 8f5654f9..45d5be77 100644
--- a/plugins/Details_TimeAttack/Details_TimeAttack.toc
+++ b/plugins/Details_TimeAttack/Details_TimeAttack.toc
@@ -1,4 +1,4 @@
-## Interface: 70300
+## Interface: 80000
## Title: Details TimeAttack (plugin)
## Notes: Plugin for Details
## SavedVariablesPerCharacter: _detalhes_databaseTimeAttack
diff --git a/plugins/Details_TinyThreat/Details_TinyThreat.lua b/plugins/Details_TinyThreat/Details_TinyThreat.lua
index f22e92ad..f33f1a83 100644
--- a/plugins/Details_TinyThreat/Details_TinyThreat.lua
+++ b/plugins/Details_TinyThreat/Details_TinyThreat.lua
@@ -376,7 +376,7 @@ local function CreatePluginFrames (data)
local aggro = topThreat [6] * (CheckInteractDistance ("target", 3) and 1.1 or 1.3)
pullRow:SetLeftText ("Pull Aggro At")
- local realPercent = _math_floor (aggro / topThreat [6] * 100)
+ local realPercent = _math_floor (aggro / max (topThreat [6], 0.01) * 100)
pullRow:SetRightText ("+" .. ThreatMeter:ToK2 (aggro - myThreat) .. " (" .. _math_floor (_math_abs ((myThreat / aggro * 100) - realPercent)) .. "%)") --
pullRow:SetValue (100)
diff --git a/plugins/Details_TinyThreat/Details_TinyThreat.toc b/plugins/Details_TinyThreat/Details_TinyThreat.toc
index dcef0bc0..af20b7d6 100644
--- a/plugins/Details_TinyThreat/Details_TinyThreat.toc
+++ b/plugins/Details_TinyThreat/Details_TinyThreat.toc
@@ -1,4 +1,4 @@
-## Interface: 70300
+## Interface: 80000
## Title: Details Tiny Threat (plugin)
## Notes: Plugin for Details
## RequiredDeps: Details
diff --git a/plugins/Details_Vanguard/Details_Vanguard.toc b/plugins/Details_Vanguard/Details_Vanguard.toc
index 47ea88ca..594c0520 100644
--- a/plugins/Details_Vanguard/Details_Vanguard.toc
+++ b/plugins/Details_Vanguard/Details_Vanguard.toc
@@ -1,4 +1,4 @@
-## Interface: 70300
+## Interface: 80000
## Title: Details Vanguard (plugin)
## Notes: Plugin for Details
## SavedVariablesPerCharacter: _detalhes_databaseVanguard
diff --git a/startup.lua b/startup.lua
index 1c31e619..390d0fa9 100644
--- a/startup.lua
+++ b/startup.lua
@@ -84,6 +84,8 @@ function _G._detalhes:Start()
self:InitializeAuraCreationWindow()
self:InitializeCustomDisplayWindow()
self:InitializeAPIWindow()
+ self:InitializeRunCodeWindow()
+ self:InitializePlaterIntegrationWindow()
--> bookmarks
if (self.switch.InitSwitch) then
@@ -180,7 +182,7 @@ function _G._detalhes:Start()
end
--> refresh lower instance plugin icons and skin
- _detalhes.ToolBar:ReorganizeIcons()
+ _detalhes.ToolBar:ReorganizeIcons()
--> refresh skin for other windows
if (lower_instance) then
for i = lower_instance+1, #self.tabela_instancias do
@@ -245,17 +247,16 @@ function _G._detalhes:Start()
--> load parser capture options
self:CaptureRefresh()
--> register parser events
- if (not _detalhes.IsBFAClient) then
- self.listener:RegisterEvent ("SPELL_SUMMON")
- self.listener:RegisterEvent ("PARTY_MEMBERS_CHANGED")
- self.listener:RegisterEvent ("PARTY_CONVERTED_TO_RAID")
- end
self.listener:RegisterEvent ("PLAYER_REGEN_DISABLED")
self.listener:RegisterEvent ("PLAYER_REGEN_ENABLED")
+ --self.listener:RegisterEvent ("SPELL_SUMMON") --triggering error on 8.0
self.listener:RegisterEvent ("UNIT_PET")
-
+
+ --self.listener:RegisterEvent ("PARTY_MEMBERS_CHANGED") --triggering error on 8.0
self.listener:RegisterEvent ("GROUP_ROSTER_UPDATE")
+ --self.listener:RegisterEvent ("PARTY_CONVERTED_TO_RAID") --triggering error on 8.0
+
self.listener:RegisterEvent ("INSTANCE_ENCOUNTER_ENGAGE_UNIT")
self.listener:RegisterEvent ("ZONE_CHANGED_NEW_AREA")
@@ -286,22 +287,23 @@ function _G._detalhes:Start()
function immersionFrame.CheckIfCanEnableImmersion()
- if (_detalhes.IsBFAClient) then
- return
- end
-
- local mapFileName = GetMapInfo()
- if (mapFileName and mapFileName:find ("InvasionPoint")) then
- self.immersion_enabled = true
- if (immersionFrame.DevelopmentDebug) then
- print ("Details!", "CheckIfCanEnableImmersion() > immersion enabled.")
- end
- else
- if (self.immersion_enabled) then
+ local mapID = C_Map.GetBestMapForUnit ("player")
+ if (mapID) then
+ local mapFileName = C_Map.GetMapInfo (mapID)
+ mapFileName = mapFileName and mapFileName.name
+
+ if (mapFileName and mapFileName:find ("InvasionPoint")) then
+ self.immersion_enabled = true
if (immersionFrame.DevelopmentDebug) then
- print ("Details!", "CheckIfCanEnableImmersion() > immersion disabled.")
+ print ("Details!", "CheckIfCanEnableImmersion() > immersion enabled.")
+ end
+ else
+ if (self.immersion_enabled) then
+ if (immersionFrame.DevelopmentDebug) then
+ print ("Details!", "CheckIfCanEnableImmersion() > immersion disabled.")
+ end
+ self.immersion_enabled = nil
end
- self.immersion_enabled = nil
end
end
end
@@ -452,7 +454,7 @@ function _G._detalhes:Start()
local instance = self:GetInstance (lower_instance)
if (instance) then
local func = {function() end}
- instance:InstanceAlert ("Showing Mythic+ Overall Segment", {[[Interface\AddOns\Details\images\icons]], 16, 16, false, 434/512, 466/512, 243/512, 273/512}, 6, func, true)
+ instance:InstanceAlert ("Showing Mythic+ Run Segment", {[[Interface\AddOns\Details\images\icons]], 16, 16, false, 434/512, 466/512, 243/512, 273/512}, 6, func, true)
end
end
end
@@ -987,21 +989,17 @@ function _G._detalhes:Start()
local mythicLevel = C_ChallengeMode.GetActiveKeystoneInfo()
local zoneName, _, _, _, _, _, _, currentZoneID = GetInstanceInfo()
- local ejID
- if (_detalhes.IsBFAClient) then
- local mapID = C_Map.GetBestMapForUnit ("player")
-
- if (not mapID) then
- --print ("Details! exeption handled: zone has no map")
- return
- end
-
- ejID = EJ_GetInstanceForMap (mapID) or 0
- else
- ejID = EJ_GetCurrentInstance()
+ local mapID = C_Map.GetBestMapForUnit ("player")
+
+ if (not mapID) then
+ --print ("Details! exeption handled: zone has no map")
+ return
end
-
+
+ local ejID = EJ_GetInstanceForMap (mapID)
+ --local ejID = EJ_GetCurrentInstance()
+
--> setup the mythic run info
self.MythicPlus.Started = true
self.MythicPlus.DungeonName = zoneName
@@ -1275,7 +1273,7 @@ function _G._detalhes:Start()
end
--> send feedback panel if the user got 100 or more logons with details
- if (self.tutorial.logons > 100) then -- and self.tutorial.logons < 104
+ if (self.tutorial.logons == 100) then -- and self.tutorial.logons < 104
if (not self.tutorial.feedback_window1 and not _detalhes.streamer_config.no_alerts) then
--> check if isn't inside an instance
if (_detalhes:IsInCity()) then
@@ -1287,7 +1285,6 @@ function _G._detalhes:Start()
--> check is this is the first run of this version
if (self.is_version_first_run) then
-
local enable_reset_warning = true
local lower_instance = _detalhes:GetLowerInstanceNumber()
@@ -1303,6 +1300,58 @@ function _G._detalhes:Start()
--> show streamer update panel
--[
+ if (_detalhes_database.last_realversion and _detalhes_database.last_realversion < _detalhes.BFACORE and enable_reset_warning) then
+
+ --> BFA launch
+
+ C_Timer.After (5, function()
+
+ _detalhes:Msg ("Some settings has been reseted for 8.0.1 patch.")
+
+ --> check and reset minimalistic skin to the new minimalistic
+ local oldColor = {
+ 0.333333333333333, -- [1]
+ 0.333333333333333, -- [2]
+ 0.333333333333333, -- [3]
+ 0.3777777777777, -- [4]
+ }
+
+ for ID, instance in _detalhes:ListInstances() do
+ if (instance:IsEnabled()) then
+ local instanceColor = instance.color
+ if (_detalhes.gump:IsNearlyEqual (instanceColor[1], oldColor[1])) then
+ if (_detalhes.gump:IsNearlyEqual (instanceColor[2], oldColor[2])) then
+ if (_detalhes.gump:IsNearlyEqual (instanceColor[3], oldColor[3])) then
+ if (_detalhes.gump:IsNearlyEqual (instanceColor[4], oldColor[4])) then
+
+ _detalhes:Msg ("Updating the Minimalistic skin.")
+
+ instance:ChangeSkin ("Minimalistic v2")
+ instance:ChangeSkin ("Minimalistic")
+ end
+ end
+ end
+ end
+ end
+ end
+
+ --> apply some new settings:
+ _detalhes.show_arena_role_icon = false --don't show the arena icon by default
+ _detalhes.segments_amount = 18
+ _detalhes.segments_amount_to_save = 18
+ _detalhes.use_row_animations = true
+ _detalhes.update_speed = math.min (0.33, _detalhes.update_speed)
+ _detalhes.death_tooltip_width = math.max (_detalhes.death_tooltip_width, 350)
+ _detalhes.use_battleground_server_parser = false
+
+ --> wipe item level cache
+ wipe (_detalhes.item_level_pool)
+
+ end)
+
+ end
+
+
if (_detalhes_database.last_realversion and _detalhes_database.last_realversion < 127 and enable_reset_warning) then
if (not _detalhes:GetTutorialCVar ("STREAMER_FEATURES_POPUP1")) then
_detalhes:SetTutorialCVar ("STREAMER_FEATURES_POPUP1", true)
@@ -1700,6 +1749,85 @@ function _G._detalhes:Start()
_detalhes.streamer_config.use_animation_accel = true
end
+ --> auto run scripts
+ local codeTable = _detalhes.run_code
+ _detalhes.AutoRunCode = {}
+
+ --> compile and store code
+ function _detalhes:RecompileAutoRunCode()
+ for codeKey, code in pairs (codeTable) do
+ local func, errorText = loadstring (code)
+ if (func) then
+ _detalhes.AutoRunCode [codeKey] = func
+ else
+ --> if the code didn't pass, create a dummy function for it without triggering errors
+ _detalhes.AutoRunCode [codeKey] = function() end
+ end
+ end
+ end
+
+ _detalhes:RecompileAutoRunCode()
+
+ --> function to dispatch events
+ function _detalhes:DispatchAutoRunCode (codeKey)
+ local func = _detalhes.AutoRunCode [codeKey]
+ _detalhes.gump:QuickDispatch (func)
+ end
+
+ --> auto run frame to dispatch scrtips for some events that details! doesn't handle
+ local auto_run_code_dispatch = CreateFrame ("frame")
+ auto_run_code_dispatch:RegisterEvent ("PLAYER_SPECIALIZATION_CHANGED")
+
+ auto_run_code_dispatch.OnEventFunc = function (self, event)
+ --> ignore events triggered more than once in a small time window
+ if (auto_run_code_dispatch [event] and not auto_run_code_dispatch [event]._cancelled) then
+ return
+ end
+
+ if (event == "PLAYER_SPECIALIZATION_CHANGED") then
+ --> create a trigger for the event, many times it is triggered more than once
+ --> so if the event is triggered a second time, it will be ignored
+ local newTimer = C_Timer.NewTimer (1, function()
+ _detalhes:DispatchAutoRunCode ("on_specchanged")
+
+ --> clear and invalidate the timer
+ auto_run_code_dispatch [event]:Cancel()
+ auto_run_code_dispatch [event] = nil
+ end)
+
+ --> store the trigger
+ auto_run_code_dispatch [event] = newTimer
+ end
+ end
+
+ auto_run_code_dispatch:SetScript ("OnEvent", auto_run_code_dispatch.OnEventFunc)
+
+ --> dispatch scripts at startup
+ C_Timer.After (2, function()
+ _detalhes:DispatchAutoRunCode ("on_init")
+ _detalhes:DispatchAutoRunCode ("on_specchanged")
+ _detalhes:DispatchAutoRunCode ("on_zonechanged")
+
+ if (InCombatLockdown()) then
+ _detalhes:DispatchAutoRunCode ("on_entercombat")
+ else
+ _detalhes:DispatchAutoRunCode ("on_leavecombat")
+ end
+ end)
+
+ --> Plater integration
+ C_Timer.After (2, function()
+ _detalhes:RefreshPlaterIntegration()
+ end)
+
+
+ --BFA BETA
+ C_Timer.After (1, function()
+ if (ScriptErrorsFrame and ScriptErrorsFrame:IsShown()) then
+ --ScriptErrorsFrame:Hide()
+ end
+ end)
+
end
_detalhes.AddOnLoadFilesTime = GetTime()