This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
I've done a quick fix to make Bazooka works in WoW Classic (1.13.2) during the stress testing. Since I don't have SVN access, I attached the patch below and hope it helps.
Index: Bazooka.lua =================================================================== --- Bazooka.lua (revision 307) +++ Bazooka.lua (working copy) @@ -10,10 +10,10 @@ local AppName, Bazooka = ... local OptionsAppName = AppName .. "_Options" -local VERSION = AppName .. "-@project-version@" ---@debug@ +local VERSION = AppName .. "-v2.8.10" +--[===[@debug@ local VERSION = AppName .. "-r" .. ("$Revision$"):match("%d+") ---@end-debug@ +--@end-debug@]===] local LDB = LibStub:GetLibrary("LibDataBroker-1.1") local LSM = LibStub:GetLibrary("LibSharedMedia-3.0", true) @@ -52,6 +52,7 @@ -- cached stuff local _G = _G +local IsClassic = (_G.WOW_PROJECT_ID == _G.WOW_PROJECT_CLASSIC) local IsAltKeyDown = _G.IsAltKeyDown local IsShiftKeyDown = _G.IsShiftKeyDown local IsModifierKeyDown = _G.IsModifierKeyDown @@ -73,7 +74,7 @@ local wipe = _G.wipe local math = _G.math local GameTooltip = _G.GameTooltip -local IsInPetBattle = _G.C_PetBattles.IsInBattle +local IsInPetBattle = _G.C_PetBattles and _G.C_PetBattles.IsInBattle or function() return false end local strtrim = _G.strtrim local strsub = _G.strsub local strlen = _G.strlen @@ -2052,7 +2053,7 @@ self.db = LibStub("AceDB-3.0"):New("BazookaDB", defaults, true) EnableOpacityWorkaround = self.db.global.enableOpacityWorkaround self:initAnchors() - if LibDualSpec then + if LibDualSpec and not LibDualSpec == nil then LibDualSpec:EnhanceDatabase(self.db, AppName) end self:setupLDB() @@ -2062,15 +2063,17 @@ self.db.RegisterCallback(self, "OnDatabaseShutdown", "OnDisable") self:profileChanged() self:setupDummyOptions() - hooksecurefunc("OrderHall_CheckCommandBar", - function() - if self.db.global.hideOrderHallCommandBar then - if OrderHallCommandBar then - OrderHallCommandBar:Hide() + if not IsClassic then + hooksecurefunc("OrderHall_CheckCommandBar", + function() + if self.db.global.hideOrderHallCommandBar then + if OrderHallCommandBar then + OrderHallCommandBar:Hide() + end end end - end - ) + ) + end end function Bazooka:OnEnable(first) @@ -2078,8 +2081,10 @@ self:init() self:RegisterEvent("PLAYER_REGEN_DISABLED", "onEnteringCombat") self:RegisterEvent("PLAYER_REGEN_ENABLED", "onLeavingCombat") - self:RegisterEvent("PET_BATTLE_OPENING_START", "onPetBattleStart") - self:RegisterEvent("PET_BATTLE_CLOSE", "onPetBattleEnd") + if not IsClassic then + self:RegisterEvent("PET_BATTLE_OPENING_START", "onPetBattleStart") + self:RegisterEvent("PET_BATTLE_CLOSE", "onPetBattleEnd") + end self:RegisterEvent("MODIFIER_STATE_CHANGED") LDB.RegisterCallback(self, "LibDataBroker_DataObjectCreated", "dataObjectCreated") end Index: Bazooka_Options/Options.lua =================================================================== --- Bazooka_Options/Options.lua (revision 307) +++ Bazooka_Options/Options.lua (working copy) @@ -11,6 +11,8 @@ local LibDualSpec = LibStub:GetLibrary("LibDualSpec-1.0", true) local Jostle = LibStub:GetLibrary("LibJostle-3.0", true) +local IsClassic = (_G.WOW_PROJECT_ID == _G.WOW_PROJECT_CLASSIC) + local MinFontSize = 5 local MaxFontSize = 30 local MinIconSize = 5 @@ -1578,7 +1580,7 @@ self:updateBarOptions() self:updatePluginOptions() local profiles = AceDBOptions:GetOptionsTable(self.db) - if LibDualSpec then + if LibDualSpec and not LibDualSpec == nil then LibDualSpec:EnhanceOptions(profiles, self.db) end profiles.disabled = function()
Hello,
Looks good, thanks! The only thing I find fishy is the "if LibDualSpec and not LibDualSpec == nil" line, that seem to be a needless change. If LibDualSpec is nil, the original condition is (or should be...) false, no?
What I think is still missing is a change in LibDualSpec to just bail out in classic, otherwise we'll get a lua error during load (as LibDualSpec gets loaded from Bazooka.toc).
I'll commit a version soon (probably disabling LibDualSpec for the time being)
Hi. I agree with you that the nil check looks redundant. But without it, WoW keep complaining value can’t be nil... I don’t know why it happened. Maybe “if x” in Lua only check “x” has the value of “true” in Boolean?
Also I already submitted an patch yesterday to LibDualSpec to prevent the library from loading in Classic.
With the current LibDualSpec and latest Bazooka it should work now. Can you test?
Thanks
Unfortunately the stress testing is finished... I won’t have access to Classic until the public launch. I’ll test by that time. Thanks.
@mitchnull, I have difficulties testing the latest SVN version. I checked out the SVN repo and placed files to Addon directory, then moved Bazooka_Option out from the repo and place it to Addon directory as well. However, I get:
1050x Bazooka\Bazooka-@[email protected]:1703: Usage: BazookaPluginText_Broker_DurabilityInfo:SetFont("font", fontHeight [, flags])[C]: in function `SetFont'Bazooka\Bazooka-@[email protected]:1703: in function `globalSettingsChanged'Bazooka\Bazooka-@[email protected]:993: in function `attachPlugin'Bazooka\Bazooka-@[email protected]:2438: in function `attachPlugin'Bazooka\Bazooka-@[email protected]:1889: in function `applySettings'Bazooka\Bazooka-@[email protected]:1513: in function `New'Bazooka\Bazooka-@[email protected]:2418: in function `createPlugin'Bazooka\Bazooka-@[email protected]:2243: in function `init'Bazooka\Bazooka-@[email protected]:2082: in function <Bazooka\Bazooka.lua:2080>[C]: ?...xternal\Wildpants\libs\AceAddon-3.0\AceAddon-3.0-12.lua:70: in function <...xternal\Wildpants\libs\AceAddon-3.0\AceAddon-3.0.lua:65>...xternal\Wildpants\libs\AceAddon-3.0\AceAddon-3.0-12.lua:527: in function `EnableAddon'...xternal\Wildpants\libs\AceAddon-3.0\AceAddon-3.0-12.lua:620: in function <...xternal\Wildpants\libs\AceAddon-3.0\AceAddon-3.0.lua:605>[C]: in function `LoadAddOn'FrameXML\UIParent.lua:353: in function `UIParentLoadAddOn'FrameXML\UIParent.lua:424: in function `TimeManager_LoadUI'FrameXML\UIParent.lua:693: in function <FrameXML\UIParent.lua:658>
Can you instruct me how shall I properly test the latest SVN version?
That error comes from one of your plugins, but the underlying issue is probably a missing library that Bazooka used to provide. When you install from SVN like you described, the dependencies are not installed automatically, you have to check them out as standalone addons or copy them under the libs folder as with a normal Bazooka install.
That said, you can test the latest build more easily by downloading the latest alpha zip from wowace or curse and just unzipping that in the addons folder. That should contain all the necessary libs.
To post a comment, please login or register a new account.