More bug fixes
This commit is contained in:
+17
-20
@@ -88,7 +88,6 @@ function DF:LoadAllSpells (hashMap, indexTable, allSpellsSameName)
|
||||
end
|
||||
|
||||
elseif (hashMap and indexTable) then
|
||||
--DF_CALC_PERFORMANCE()
|
||||
if (allSpellsSameName) then
|
||||
for i = 1, CONST_MAX_SPELLS do
|
||||
local spellName = GetSpellInfo(i)
|
||||
@@ -128,9 +127,6 @@ local cleanfunction = function() end
|
||||
do
|
||||
local metaPrototype = {
|
||||
WidgetType = "aura_tracker",
|
||||
SetHook = DF.SetHook,
|
||||
RunHooksForWidget = DF.RunHooksForWidget,
|
||||
|
||||
dversion = DF.dversion,
|
||||
}
|
||||
|
||||
@@ -153,6 +149,7 @@ do
|
||||
end
|
||||
|
||||
local AuraTrackerMetaFunctions = _G[DF.GlobalWidgetControlNames["aura_tracker"]]
|
||||
DF:Mixin(AuraTrackerMetaFunctions, DF.ScriptHookMixin)
|
||||
|
||||
--create panels
|
||||
local on_profile_changed = function(self, newdb)
|
||||
@@ -357,13 +354,13 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
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, textEntryWidth, 20, "AddBuffBlacklistTextBox", _, _, options_dropdown_template)
|
||||
local buff_name_blacklist_entry = self:CreateTextEntry(background_add_blacklist, function()end, textEntryWidth, 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, textEntryWidth, 20, "AddDebuffBlacklistTextBox", _, _, options_dropdown_template)
|
||||
local debuff_name_blacklist_entry = self:CreateTextEntry(background_add_blacklist, function()end, textEntryWidth, 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."
|
||||
@@ -380,9 +377,9 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
local spellWithSameName = AllSpellsSameName [spellName]
|
||||
if (spellWithSameName) then
|
||||
if (t) then
|
||||
t [spellName] = DF.table.copy ({}, spellWithSameName)
|
||||
t [spellName] = DF.table.copy({}, spellWithSameName)
|
||||
else
|
||||
db.aura_cache_by_name [spellName] = DF.table.copy ({}, spellWithSameName)
|
||||
db.aura_cache_by_name [spellName] = DF.table.copy({}, spellWithSameName)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -391,7 +388,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
|
||||
local get_spellID_from_string = function(text)
|
||||
--check if the user entered a spell ID
|
||||
local isSpellID = tonumber (text)
|
||||
local isSpellID = tonumber(text)
|
||||
if (isSpellID and isSpellID > 1 and isSpellID < 10000000) then
|
||||
local isValidSpellID = GetSpellInfo(isSpellID)
|
||||
if (isValidSpellID) then
|
||||
@@ -530,13 +527,13 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
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, textEntryWidth, 20, "AddBuffTracklistTextBox", _, _, options_dropdown_template)
|
||||
local buff_name_tracklist_entry = self:CreateTextEntry(background_add_tracklist, function()end, textEntryWidth, 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, textEntryWidth, 20, "AddDebuffTracklistTextBox", _, _, options_dropdown_template)
|
||||
local debuff_name_tracklist_entry = self:CreateTextEntry(background_add_tracklist, function()end, textEntryWidth, 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."
|
||||
@@ -771,7 +768,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
line.name:SetText(spellName .. " (" .. spellID .. ")")
|
||||
end
|
||||
line.icon:SetTexture(spellIcon)
|
||||
line.icon:SetTexCoord (.1, .9, .1, .9)
|
||||
line.icon:SetTexCoord(.1, .9, .1, .9)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1024,7 +1021,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
if (name) then
|
||||
line.name:SetText(name)
|
||||
line.icon:SetTexture(icon)
|
||||
line.icon:SetTexCoord (.1, .9, .1, .9)
|
||||
line.icon:SetTexCoord(.1, .9, .1, .9)
|
||||
else
|
||||
line.name:SetText(aura)
|
||||
line.icon:SetTexture([[Interface\InventoryItems\WoWUnknownItem01]])
|
||||
@@ -1065,8 +1062,8 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
-- 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)
|
||||
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)
|
||||
@@ -1084,7 +1081,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
|
||||
if (text ~= "") then
|
||||
--check for more than one spellname
|
||||
if (text:find (";")) then
|
||||
if (text:find(";")) then
|
||||
for _, spellName in ipairs({strsplit(";", text)}) do
|
||||
spellName = self:trim (spellName)
|
||||
local spellID = get_spellID_from_string (spellName)
|
||||
@@ -1131,7 +1128,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
new_debuff_entry:ClearFocus()
|
||||
if (text ~= "") then
|
||||
--check for more than one spellname
|
||||
if (text:find (";")) then
|
||||
if (text:find(";")) then
|
||||
for _, spellName in ipairs({strsplit(";", text)}) do
|
||||
spellName = self:trim (spellName)
|
||||
local spellID = get_spellID_from_string (spellName)
|
||||
@@ -1177,7 +1174,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
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_box = self:CreateTextEntry(f_manual, function()end, 242, 20, "ExportAuraTextBox", _, _, options_dropdown_template)
|
||||
|
||||
local export_buff_button = self:CreateButton(f_manual, function()
|
||||
local str = ""
|
||||
@@ -1188,7 +1185,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
end
|
||||
end
|
||||
export_box.text = str
|
||||
export_box:SetFocus (true)
|
||||
export_box:SetFocus(true)
|
||||
export_box:HighlightText()
|
||||
|
||||
end, 120, 20, "Export Buffs", nil, nil, nil, nil, nil, nil, DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
@@ -1203,7 +1200,7 @@ function DF:CreateAuraConfigPanel (parent, name, db, change_callback, options, t
|
||||
end
|
||||
|
||||
export_box.text = str
|
||||
export_box:SetFocus (true)
|
||||
export_box:SetFocus(true)
|
||||
export_box:HighlightText()
|
||||
|
||||
end, 120, 20, "Export Debuffs", nil, nil, nil, nil, nil, nil, DF:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
|
||||
|
||||
Reference in New Issue
Block a user