From 3f4baf829ef975fb805c765d07bc2eb2ae93929e Mon Sep 17 00:00:00 2001 From: Albirew Date: Thu, 19 Sep 2019 22:46:24 +0200 Subject: [PATCH] less battle pet code gotta trash them all! --- ButtonForge-classic.toc | 2 +- Locale-enUS.lua | 2 -- Locale-zhCN.lua | 1 - Locale-zhTW.lua | 1 - Util.lua | 42 ----------------------------------------- 5 files changed, 1 insertion(+), 47 deletions(-) diff --git a/ButtonForge-classic.toc b/ButtonForge-classic.toc index eac2524..547579a 100644 --- a/ButtonForge-classic.toc +++ b/ButtonForge-classic.toc @@ -1,7 +1,7 @@ ## Interface: 11302 ## Title: Button Forge Classic ## Notes: Add as many or few extra Action Bars and Buttons to your user interface to complement the standard (or other) Action Bars -## Version: 0.1 +## Version: 0.9.50.3 ## Author: Massiner of Nathrezim ## SavedVariables: ButtonForgeGlobalSettings, ButtonForgeGlobalProfiles, ButtonForgeGlobalBackup ## SavedVariablesPerCharacter: ButtonForgeSave, BFSave diff --git a/Locale-enUS.lua b/Locale-enUS.lua index 2d39928..2fe2028 100644 --- a/Locale-enUS.lua +++ b/Locale-enUS.lua @@ -105,7 +105,6 @@ Locale["SlashHelpFormatted"] = "|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.."-alpha |r (0 - 1, 1 is completely opaque)\n".. @@ -191,7 +190,6 @@ Locale["InfoHSpec3"] = "Visibility for Spec 3"; Locale["InfoHSpec4"] = "Visibility for Spec 4"; Locale["InfoHVehicle"] = "Visibility in Vehicle"; Locale["InfoHBonusBar5"] = "Visibility when Override Bar active"; -Locale["InfoHPetBattle"] = "Visibility when in a Pet Battle"; Locale["InfoVisibilityMacro"] = "Visibility Macro"; Locale["InfoGUI"] = "GUI"; Locale["InfoAlpha"] = "Alpha"; diff --git a/Locale-zhCN.lua b/Locale-zhCN.lua index 5f4f97f..59024ee 100644 --- a/Locale-zhCN.lua +++ b/Locale-zhCN.lua @@ -98,7 +98,6 @@ Locale["SlashHelpFormatted"] = "|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.."-alpha |r (0 - 1, 1 is completely opaque)\n".. diff --git a/Locale-zhTW.lua b/Locale-zhTW.lua index 59ddeaa..c7040b9 100644 --- a/Locale-zhTW.lua +++ b/Locale-zhTW.lua @@ -100,7 +100,6 @@ Locale["SlashHelpFormatted"] = "|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.."-alpha |r (0 - 1, 1 is completely opaque)\n".. diff --git a/Util.lua b/Util.lua index 368e467..69e62f4 100644 --- a/Util.lua +++ b/Util.lua @@ -172,15 +172,6 @@ function Util.UpdateSavedData() DEFAULT_CHAT_FRAME:AddMessage(Util.GetLocaleString("UpgradedChatMsg").."v0.9.22", .5, 1, 0, 1); end - --v0.9.25 update - if (ButtonForgeSave["Version"] == 0.9 and ButtonForgeSave["VersionMinor"] < 25) then - for i = 1, #ButtonForgeSave.Bars do - ButtonForgeSave.Bars[i]["HPetBattle"] = true; - end - ButtonForgeSave["VersionMinor"] = 25; - DEFAULT_CHAT_FRAME:AddMessage(Util.GetLocaleString("UpgradedChatMsg").."v0.9.25", .5, 1, 0, 1); - end - -- v0.9.34 update if (ButtonForgeSave["Version"] == 0.9 and ButtonForgeSave["VersionMinor"] < 34) then for i = 1, #ButtonForgeSave.Bars do @@ -192,14 +183,9 @@ function Util.UpdateSavedData() -- v0.9.36 update if (ButtonForgeSave["Version"] == 0.9 and ButtonForgeSave["VersionMinor"] < 36) then - for i = 1, #ButtonForgeSave.Bars do - Util.UpdateBattlePets602(ButtonForgeSave.Bars[i].Buttons); - end - if (ButtonForgeSave.UndoProfileBars ~= nil) then for i = 1, #ButtonForgeSave.UndoProfileBars do Util.UpdateMounts602(ButtonForgeSave.UndoProfileBars[i].Buttons); - Util.UpdateBattlePets602(ButtonForgeSave.UndoProfileBars[i].Buttons); end end ButtonForgeSave["VersionMinor"] = 36; @@ -297,7 +283,6 @@ function Util.UpdateSavedData() for k,v in pairs(ButtonForgeGlobalProfiles) do for i = 1, #v.Bars do Util.UpdateMounts602(v.Bars[i].Buttons); - Util.UpdateBattlePets602(v.Bars[i].Buttons); end end ButtonForgeGlobalSettings["VersionMinor"] = 36; @@ -376,15 +361,6 @@ function Util.UpdateMounts602(Buttons) end end -function Util.UpdateBattlePets602(Buttons) - for j = 1, #Buttons do - if (Buttons[j]["Mode"] == "battlepet") then - Buttons[j]["Mode"] = nil; - Buttons[j]["BattlePetId"] = nil; - end - end -end - function Util.UpdateMounts700(Buttons) for j = 1, #Buttons do if (Buttons[j]["Mode"] == "mount") then @@ -740,7 +716,6 @@ function Util.NewBarSave() Save["HSpec3"] = false; Save["HSpec4"] = false; Save["HBonusBar"] = true; - Save["HPetBattle"] = true; Save["GridAlwaysOn"] = true; Save["ButtonsLocked"] = false; Save["TooltipsOn"] = true; @@ -1400,10 +1375,6 @@ function Util.ApplySlashCommands(Commands, Bar) if (Commands["-hideoverridebar"]) then Bar:SetHBonusBar(Commands["-hideoverridebar"][1]); end - - if (Commands["-hidepetbattle"]) then - Bar:SetHPetBattle(Commands["-hidepetbattle"][1]); - end if (Commands["-vismacro"]) then Bar:SetVD(Commands["-vismacro"][1]); @@ -1443,7 +1414,6 @@ function Util.ApplySlashCommands(Commands, Bar) Util.GetLocaleString("InfoHSpec4")..": "..select(2, Bar:GetHSpec4()).."\n".. Util.GetLocaleString("InfoHVehicle")..": "..select(2, Bar:GetHVehicle()).."\n".. Util.GetLocaleString("InfoHBonusBar5")..": "..select(2, Bar:GetHBonusBar()).."\n".. - Util.GetLocaleString("InfoHPetBattle")..": "..select(2, Bar:GetHPetBattle()).."\n".. Util.GetLocaleString("InfoVisibilityMacro")..": "..(Bar:GetVD() or "").."\n".. Util.GetLocaleString("InfoGUI")..": "..select(2, Bar:GetGUI()).."\n".. Util.GetLocaleString("InfoAlpha")..": "..Bar:GetAlpha().."\n".. @@ -1573,8 +1543,6 @@ function Util.SetCursor(Command, Data, Subvalue, Subsubvalue) end elseif (Command == "customaction") then CustomAction.SetCursor(Data); - elseif (Command == "battlepet") then - C_PetJournal.PickupPet(Data); end end @@ -1839,12 +1807,6 @@ function Util.RefreshSpells() end end -function Util.RefreshBattlePets() - for k, v in pairs(Util.ActiveButtons) do - v:RefreshBattlePet(); - end -end - function Util.AddSpell(Value) if (not Util.FindInTable(Util.ActiveSpells, Value)) then table.insert(Util.ActiveSpells, Value); @@ -2362,8 +2324,6 @@ function Util.GetButtonActionInfo(ButtonName) return "equipmentset", Button.EquipmentSetName; elseif (Button.Mode == "flyout") then return "flyout", Button.FlyoutId; - elseif (Button.Mode == "battlepet") then - return "battlepet", Button.BattlePetId; end end @@ -2403,8 +2363,6 @@ function Util.GetButtonActionInfo2(ButtonName) return "bonusaction", Button.BonusActionSlot; elseif (Button.Mode == "customaction") then return "customaction", Button.CustomActionName; - elseif (Button.Mode == "battlepet") then - return "battlepet", Button.BattlePetId; end end