- Patch 8.0.1

This commit is contained in:
Tercio
2018-07-17 12:07:40 -03:00
parent 6ef270ac6f
commit df9ce12b82
83 changed files with 7973 additions and 5234 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
## Interface: 70300
## Interface: 80000
## Title: Details
## Notes: Computes detailed infos about combats.
## SavedVariables: _detalhes_global
+3 -3
View File
@@ -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)
@@ -1,4 +1,4 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Script file="CallbackHandler-1.0.lua"/>
</Ui>
</Ui>
+1 -1
View File
@@ -1,4 +1,4 @@
## Interface: 70300
## Interface: 80000
## Title: Lib: LibDFramework-1.0
## Notes: Base Framework for many Addons
+568 -155
View File
@@ -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()
+6
View File
@@ -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")
+16 -4
View File
@@ -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
----------------------------------------------------------------------
+4
View File
@@ -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")
+658 -42
View File
@@ -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)
--<Anchor point="TOP" relativePoint="BOTTOM"/>
--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
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 "<no context>") .. " |cFFFF9900error|r: " .. (errortext or "<no error given>"))
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
+1
View File
@@ -8,6 +8,7 @@
<Script file="picture.lua"/>
<Script file="slider.lua"/>
<Script file="scrollbar.lua"/>
<Script file="spells.lua"/>
<Script file="math.lua"/>
<Include file="tutorial_alert.xml"/>
+47 -5
View File
@@ -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
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
+21
View File
@@ -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
+1000 -18
View File
File diff suppressed because it is too large Load Diff
+5 -7
View File
@@ -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")
+595
View File
@@ -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
+1477 -89
View File
File diff suppressed because it is too large Load Diff
+81 -84
View File
@@ -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
end
+3 -3
View File
@@ -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
lib.xml
+1 -1
View File
@@ -1,4 +1,4 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Script file="LibCompress.lua" />
</Ui>
</Ui>
+8 -7
View File
@@ -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
@@ -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
+4 -1
View File
@@ -1,3 +1,6 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\..\FrameXML\UI.xsd">
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Script file="LibGroupInSpecT-1.1.lua"/>
</Ui>
+10 -25
View File
@@ -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
@@ -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
@@ -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
@@ -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)
@@ -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
@@ -38,4 +38,4 @@ loadfile("../LibStub.lua")()
assert(LibStub.IterateLibraries == 123)
print("OK")
print("OK")
+1 -1
View File
@@ -15,6 +15,6 @@
<Script file="LibWindow-1.1\LibWindow-1.1.lua"/>
<Include file="LibCompress\lib.xml"/>
<Include file="LibItemUpgradeInfo-1.0\LibItemUpgradeInfo-1.0.xml"/>
<Include file="LibGroupInSpecT-1.1\lib.xml"/>
<!-- <Include file="LibGroupInSpecT-1.1\lib.xml"/> -->
<Include file="DF\load.xml"/>
</Ui>
+15 -10
View File
@@ -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]],
+10 -3
View File
@@ -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)
+42 -20
View File
@@ -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
+3
View File
@@ -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
+39 -76
View File
@@ -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
+27 -33
View File
@@ -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 = {
+2 -7
View File
@@ -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
+7 -6
View File
@@ -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
+45 -88
View File
@@ -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
+33 -3
View File
@@ -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)
+13 -6
View File
@@ -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"
+725 -9
View File
@@ -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
+9 -14
View File
@@ -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]
+238 -6
View File
@@ -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)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> 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
+65 -23
View File
@@ -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?
+1
View File
@@ -0,0 +1 @@
local _
+126 -383
View File
@@ -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"]},
}
})
+56 -2
View File
@@ -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"] .. ":")
+500 -4
View File
@@ -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 = {
+1 -1
View File
@@ -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
+14 -14
View File
@@ -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()
+188 -99
View File
@@ -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
+20 -2
View File
@@ -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)
+78 -45
View File
@@ -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)
+206 -74
View File
@@ -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
+1 -8
View File
@@ -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)
+586 -690
View File
File diff suppressed because it is too large Load Diff
+9 -5
View File
@@ -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)
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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
@@ -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
@@ -1,4 +1,4 @@
## Interface: 70300
## Interface: 80000
## Title: Details Storage
## Notes: Stores information for Details!
## DefaultState: Enabled
-571
View File
@@ -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
+1 -1
View File
@@ -1,4 +1,4 @@
## Interface: 70300
## Interface: 80000
## Title: Details Damage, the Game! (plugin)
## Notes: Plugin for Details
## RequiredDeps: Details
File diff suppressed because it is too large Load Diff
@@ -1,4 +1,4 @@
## Interface: 70300
## Interface: 80000
## Title: Details Dps Tuning (plugin)
## Notes: Plugin for Details
## RequiredDeps: Details
@@ -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
@@ -1,4 +1,4 @@
## Interface: 70300
## Interface: 80000
## Title: Details Encounter (plugin)
## Notes: Plugin for Details
## RequiredDeps: Details
+15 -4
View File
@@ -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()
@@ -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
@@ -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
+94 -50
View File
@@ -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
@@ -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
File diff suppressed because it is too large Load Diff
@@ -1,4 +1,4 @@
## Interface: 70300
## Interface: 80000
## Title: Details TimeAttack (plugin)
## Notes: Plugin for Details
## SavedVariablesPerCharacter: _detalhes_databaseTimeAttack
@@ -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)
@@ -1,4 +1,4 @@
## Interface: 70300
## Interface: 80000
## Title: Details Tiny Threat (plugin)
## Notes: Plugin for Details
## RequiredDeps: Details
@@ -1,4 +1,4 @@
## Interface: 70300
## Interface: 80000
## Title: Details Vanguard (plugin)
## Notes: Plugin for Details
## SavedVariablesPerCharacter: _detalhes_databaseVanguard
+165 -37
View File
@@ -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()