diff --git a/Bar.lua b/Bar.lua index d403144..52a5927 100644 --- a/Bar.lua +++ b/Bar.lua @@ -71,7 +71,6 @@ function Bar.New(BarSave) ButtonFrame:SetAttribute("_onshow", [[local B, Key; for i = 1, #Buttons do B = Buttons[i]; - B:Enable(); Key = B:GetAttribute("KeyBindValue"); if (Key) then B:SetBindingClick(false, Key, B); @@ -81,7 +80,6 @@ function Bar.New(BarSave) ButtonFrame:SetAttribute("_onshow", [[local B, Key; for i = 1, #Buttons do B = Buttons[i]; - B:Enable(); Key = B:GetAttribute("KeyBindValue"); if (Key) then B:SetBindingClick(false, Key, B, "KeyBind"); @@ -91,7 +89,6 @@ function Bar.New(BarSave) ButtonFrame:SetAttribute("_onhide", [[local B, Key; for i = 1, #Buttons do B = Buttons[i]; - B:Disable(); Key = B:GetAttribute("KeyBindValue"); if (Key) then B:ClearBindings(); diff --git a/ButtonForge.toc b/ButtonForge.toc index f4de25b..da912c2 100644 --- a/ButtonForge.toc +++ b/ButtonForge.toc @@ -1,7 +1,7 @@ -## Interface: 90002 +## Interface: 90005 ## Title: Button Forge ## Notes: Add as many or few extra Action Bars and Buttons to your user interface to complement the standard (or other) Action Bars -## Version: 1.0.3 +## Version: 1.0.4 ## Author: Massiner of Nathrezim ## SavedVariables: ButtonForgeGlobalSettings, ButtonForgeGlobalProfiles, ButtonForgeGlobalBackup ## SavedVariablesPerCharacter: ButtonForgeSave, BFSave diff --git a/Const.lua b/Const.lua index c093c11..83c1c5b 100644 --- a/Const.lua +++ b/Const.lua @@ -12,7 +12,7 @@ Const.SUMMON_RANDOM_FAVORITE_MOUNT_ID = 268435455; Const.SUMMON_RANDOM_FAVORITE_BATTLE_PET_ID = "BattlePet-0-FFFFFFFFFFFFFF"; Const.SUMMON_RANDOM_FAVORITE_BATTLE_PET_TEXTURE = "Interface/Icons/INV_Pet_Achievement_CaptureAPetFromEachFamily_Battle"; Const.Version = 1.0; -Const.VersionMinor = 0.2; +Const.VersionMinor = 0.4; Const.MAX_ACCOUNT_MACROS = 120; Const.ButtonNaming = "ButtonForge" Const.ButtonSeq = 1; --This value will increment (so not technically a const...) diff --git a/Locale-enUS.lua b/Locale-enUS.lua index 961ee10..6f6be20 100644 --- a/Locale-enUS.lua +++ b/Locale-enUS.lua @@ -95,23 +95,23 @@ Locale["SlashHelpFormatted"] = "|c"..Const.LightBlue.."-scale |r (1 is normal scale)\n".. "|c"..Const.LightBlue.."-gap |r (6 is normal gap)\n".. "|c"..Const.LightBlue.."-coords |r\n".. - "|c"..Const.LightBlue.."-tooltips |r\n".. - "|c"..Const.LightBlue.."-emptybuttons |r\n".. - "|c"..Const.LightBlue.."-lockbuttons |r\n".. + "|c"..Const.LightBlue.."-tooltips |r\n".. + "|c"..Const.LightBlue.."-emptybuttons |r\n".. + "|c"..Const.LightBlue.."-lockbuttons |r\n".. "|c"..Const.LightBlue.."-flyout |r\n".. - "|c"..Const.LightBlue.."-macrotext |r\n".. - "|c"..Const.LightBlue.."-keybindtext |r\n".. - "|c"..Const.LightBlue.."-hidespec1 |r\n".. - "|c"..Const.LightBlue.."-hidespec2 |r\n".. - "|c"..Const.LightBlue.."-hidespec3 |r\n".. - "|c"..Const.LightBlue.."-hidespec4 |r\n".. - "|c"..Const.LightBlue.."-hidevehicle |r\n".. - "|c"..Const.LightBlue.."-hideoverridebar |r\n".. - "|c"..Const.LightBlue.."-hidepetbattle |r\n".. + "|c"..Const.LightBlue.."-macrotext |r\n".. + "|c"..Const.LightBlue.."-keybindtext |r\n".. + "|c"..Const.LightBlue.."-hidespec1 |r\n".. + "|c"..Const.LightBlue.."-hidespec2 |r\n".. + "|c"..Const.LightBlue.."-hidespec3 |r\n".. + "|c"..Const.LightBlue.."-hidespec4 |r\n".. + "|c"..Const.LightBlue.."-hidevehicle |r\n".. + "|c"..Const.LightBlue.."-hideoverridebar |r\n".. + "|c"..Const.LightBlue.."-hidepetbattle |r\n".. "|c"..Const.LightBlue.."-vismacro |r\n".. - "|c"..Const.LightBlue.."-gui |r (off = hides bar without disabling keybinds)\n".. + "|c"..Const.LightBlue.."-gui |r (off = hides bar without disabling keybinds)\n".. "|c"..Const.LightBlue.."-alpha |r (0 - 1, 1 is completely opaque)\n".. - "|c"..Const.LightBlue.."-enabled |r\n".. + "|c"..Const.LightBlue.."-enabled |r\n".. "|c"..Const.LightBlue.."-info|r\n".. "|c"..Const.LightBlue.."-technicalinfo|r\n".. "|c"..Const.LightBlue.."-createbar |r\n".. @@ -123,9 +123,9 @@ Locale["SlashHelpFormatted"] = "|c"..Const.LightBlue.."-deleteprofile |r\n".. "|c"..Const.LightBlue.."-listprofiles|r\n".. "|c"..Const.LightBlue.."-macrocheckdelay |r (5 seconds is default) \n".. - "|c"..Const.LightBlue.."-removemissingmacros |r\n".. - "|c"..Const.LightBlue.."-forceoffcastonkeydown |r (will apply at next login)\n".. - "|c"..Const.LightBlue.."-usecollectionsfavoritemountbutton |r\n".. + "|c"..Const.LightBlue.."-removemissingmacros |r\n".. + "|c"..Const.LightBlue.."-forceoffcastonkeydown |r (will apply at next login)\n".. + "|c"..Const.LightBlue.."-usecollectionsfavoritemountbutton |r\n".. "|c"..Const.LightBlue.."-globalsettings|r\n".. "Examples:\n".. "|c"..Const.LightBlue.."/bufo -bar Mounts -tooltips off -emptybuttons off -scale 0.75|r\n".. diff --git a/ReadMe.txt b/ReadMe.txt index 61ecb81..729cbe3 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -5,7 +5,7 @@ Author: Massiner of Nathrezim Contributor: xfsbill Past Contributors: DT85, DandierSphinx -Version: 1.0.3 +Version: 1.0.4 Description: Graphically create as many Action Bars and Buttons in the game as you choose @@ -23,8 +23,12 @@ Restrictions: History: +09-March-2021 v1.0.4 - Updated for Wow v9.0.5 + - Updated help (/bufo) + - Fixed an issue disabling/enabling button frames + 28-Jan-2021 v1.0.3 - Replaced Stealth and Prowl with their proper stealth icon - - Experimental: Configurable flyout direction through slash commands + - Experimental: Configurable flyout direction through slash commands 02-Dec-2020 v1.0.2 - Removed Zone Ability frame when placed into a bar - Added slash commands to list bars and allow to interact with bars without a label diff --git a/Util.lua b/Util.lua index 43b0325..2fe45ee 100644 --- a/Util.lua +++ b/Util.lua @@ -1578,7 +1578,34 @@ function Util.SetCursor(Command, Data, Subvalue, Subsubvalue) if ( Util.PetSpellIndex[name] ) then PickupSpellBookItem(Util.PetSpellIndex[name], BOOKTYPE_PET); else - PickupSpell(Subsubvalue); + -- Shadowlands Covenants spells seem to be different from standard spell + -- attempt to detect them because PickupSpell won't work with those + skillType, contextualID = GetSpellBookItemInfo(name); + if contextualID ~= nil then + PickupSpell(Subsubvalue); + else + -- scan spellbook and pickupspell by slot id + function findSpell(spellName, bookType) + local i, s; + local found = false; + for i = 1, MAX_SKILLLINE_TABS do + local name, texture, offset, numSpells = GetSpellTabInfo(i); + if (not name) then break; end + for s = offset + 1, offset + numSpells do + local spell, rank = GetSpellBookItemName(s, bookType); + if (spell == spellName) then found = true; end + if (found and spell ~=spellName) then return s-1; end + end + end + if (found) then return s; end + return nil; + end + local bookType = BOOKTYPE_SPELL; + local id = findSpell(name, bookType); + if id ~= nil then + PickupSpellBookItem(id,bookType); + end + end end; elseif (Command == "item") then PickupItem(Data);