ChocolateBar Broker Display

ChocolateBar Broker Display

1M Downloads

classic doesn't support vehicles

houlia opened this issue ยท 1 comments

commented

Classic WoW doesn't understand the new vehicle code.
version: 3.6.14

Date: 2021-04-12 20:08:07
ID: 1
Error occured in: Global
Count: 1
Message: ..\AddOns\ChocolateBar\Jostle.lua line 135:
attempt to call global 'UnitInVehicle' (a nil value)
Debug:
ChocolateBar\Jostle.lua:135:
ChocolateBar\Jostle.lua:134
ChocolateBar\Jostle.lua:161:
ChocolateBar\Jostle.lua:158
(tail call): ?
Locals:
(*temporary) = nil
(*temporary) = "Player"
(*temporary) = "attempt to call global 'UnitInVehicle' (a nil value)"
ChocolateBar =

{
OnEnterWorld = defined @interface\AddOns\ChocolateBar\Core.lua:251
SetDefaultModuleLibraries = defined @interface\AddOns\BCT\Libs\AceAddon-3.0\AceAddon-3.0.lua:367
TempDisAutohide = defined @interface\AddOns\ChocolateBar\Core.lua:408
GetChocolate = defined @interface\AddOns\ChocolateBar\Core.lua:424
OnLeaveCombat = defined @interface\AddOns\ChocolateBar\Core.lua:295
modules =
{
}
CancelTimer = defined @interface\AddOns\Broker_DurabilityInfo\Libs\AceTimer-3.0\AceTimer-3.0.lua:147
IterateEmbeds = defined @interface\AddOns\BCT\Libs\AceAddon-3.0\AceAddon-3.0.lua:442
Jostle =
{
}
OnDatabaseShutdown = defined @interface\AddOns\ChocolateBar\Core.lua:161
AnchorBars = defined @interface\AddOns\ChocolateBar\Core.lua:502
Printf = defined @interface\AddOns\Atlas\Libs\AceConsole-3.0\AceConsole-3.0.lua:69
SetDefaultModulePrototype = defined @interface\AddOns\BCT\Libs\AceAddon-3.0\AceAddon-3.0.lua:409
isClassicWoW = true
defaultModuleState = true
IsEnabled = defined @interface\AddOns\BCT\Libs\AceAddon-3.0\AceAddon-3.0.lua:451
LibDataBroker_DataObjectCreated = defined @interface\AddOns\ChocolateBar\Core.lua:316
ScheduleTimer = defined @interface\AddOns\Broker_DurabilityInfo\Libs\AceTimer-3.0\AceTimer-3.0.lua:94
DisableModule = defined @interface\AddOns\BCT\Libs\AceAddon-3.0\AceAddon-3.0.lua:350
UpdateDB = defined @interface\AddOns\ChocolateBar\Core.lua:603
RegisterMessage = defined @interface\AddOns\Ara_Broker_Guild_Friends\libs\CallbackHandler-1.0.lua:90
UnregisterMessage = defined @interface\AddOns\Ara_Broker_Guild_Friends\libs\CallbackHandler-1.0.lua:153
SetBars = defined @interface\AddOns\ChocolateBar\Core.lua:440
AddBarOptions = defined @interface\AddOns\ChocolateBar\Options.lua:1421
OnPetBattleOpen = defined @interface\AddOns\ChocolateBar\Core.lua:257
OpenOptions = defined @interface\AddOns\ChocolateBar\Options.lua:1400
SetEnabledState = defined @interface\AddOns\BCT\Libs\AceAddon-3.0\AceAddon-3.0.lua:424
enabledState = true
RegisterEvent = defined @interface\AddOns\Ara_Broker_Guild_Friends\libs\CallbackHandler-1.0.lua:90
IterateModules = defined @interface\AddOns\BCT\Libs\AceAddon-3.0\AceAddon-3.0.lua:437
GetBars = defined @interface\AddOns\ChocolateBar\Core.lua:436
UpdateJostle = defined @interface\AddOns\ChocolateBar\Core.lua:219
Bar =
{
}
InCombat = false
db =
{
}
baseName = "ChocolateBar"
OnInitialize = defined @interface\AddOns\ChocolateBar\Core.lua:86
UnregisterAllEvents = defined @interface\AddOns\Ara_Broker_Guild_Friends\libs\CallbackHandler-1.0.lua:174
AddBar = defined @interface\AddOns\ChocolateBar\Core.lua:477
UpdateBarOptions = defined @interface\AddOns\ChocolateBar\Options.lua:1791
RemoveBar = defined @interface\AddOns\ChocolateBar\Options.lua:1774
GetModule = defined @interface\AddOns\BCT\Libs\AceAddon-3.0\AceAddon-3.0.lua:210
RegisterOptions = defined @interface\AddOns\ChocolateBar\Options.lua:1380
AddCustomPluginOptions = defined @interface\AddOns\ChocolateBar\Options.lua:1765
AddDefaultModuleOptions = defined @interface\AddOns\ChocolateBar\Options.lua:1739
defaultModuleLibraries =
{
}
TimeLeft = defined @interface\AddOns\Broker_DurabilityInfo\Libs\AceTimer-3.0\AceTimer-3.0.lua:172
OnEnterCombat = defined @interface\AddOns\ChocolateBar\Core.lua:279
UnregisterChatCommand = defined @interface\AddOns\Atlas\Libs\AceConsole-3.0\AceConsole-3.0.lua:111
RemovePluginOptions = defined @interface\AddOns\ChocolateBar\Options.lua:1531
ScheduleRepeatingTimer = <func
AddOns:
Swatter, v8.2.6377 (SwimmingSeadragon)
AraBrokerGuildFriends, vr91
Atlas, vv1.47.03.11304.00
AtlasClassicWoW, vv1.47.02.11304.00
AtlasLootClassic, vv1.5.9
AtlasLootClassicData, vv1.5.9
AtlasLootClassicDungeonsAndRaids, vv1.5.9
AucAdvanced, v8.2.6430 (SwimmingSeadragon)
AucFilterBasic, v8.2.6364 (SwimmingSeadragon)
AucStatHistogram, v8.2.6366 (SwimmingSeadragon)
AucStatiLevel, v8.2.6370 (SwimmingSeadragon)
AucStatPurchased, v8.2.6367 (SwimmingSeadragon)
AucStatSimple, v8.2.6399 (SwimmingSeadragon)
AucStatStdDev, v8.2.6369 (SwimmingSeadragon)
AucUtilFixAH, v8.2.6371 (SwimmingSeadragon)
Auctionator, v100.0.9
BagBrother, v
Bagnon, v9.0.6
BCT, v1.37
BeanCounter, v8.2.6434 (SwimmingSeadragon)
BigWigs, vv22-classic
BootyBayGazette, v6.2.20210412
BrokerDurabilityInfo, vv1.29
BrokerMoneyFu, v80205-2
BrokerPortals, v1.10.4
ChocolateBar, vv3.6.14
ClassicCastbars, vv1.3.21
ClassicCastbarsOptions, vv1.3.21
Clique, vv90005-2.0.2
CommunityDKP, v3.2.3
CoordsTracking, vv2.16.11305.00
Details, v
DetailsTinyThreat, v
Dominos, v9.0.27
DominosCast, v
DominosProgress, v
DominosRoll, v
Enchantrix, v8.2.6428 (SwimmingSeadragon)
EnchantrixBarker, v8.2.6469 (SwimmingSeadragon)
ExRT, v4520
ExtendedCharacterStats, v2.7.3
FishingBuddy, v0.7.3 Beta 7
GlobalIgnoreList, v1.13.5
Grid2, v1.1.20
Grid2LDB, v1.1.20
Grid2RaidDebuffs, v1.1.20
GTFO, v4.60
InFlightLoad, v1.13.005
Informant, v8.2.6374 (SwimmingSeadragon)
ItemRack, v
LeatrixPlus, v1.13.100
NauticusClassic, v1.3.1
NovaInstanceTracker, v1.15
NovaWorldBuffs, v1.91
PostalClassic, vv3.6.2
Prat30, v3.9.1
Prat30Libraries, v
Questie, v6.2.5
RareAware, v1.0
Regen, v0.1.4
Restocker, v6.2
ShadowedUnitFrames, vv4.2.3-Classic
SkilletClassic, v1.21
StealYourCarbon, v
Stubby, v8.2.6376 (SwimmingSeadragon)
ThreatClassic2, v2.29
TinyTooltip, v8.2.1
TradeSkillWhisperLookup, v0.2.6-beta
WaterDispenser, v1.10
WeakAuras, v3.2.3
WeakAurasCompanion, v1.1.1
WIM, v3.9.0
zzInfoclock, v
BlizRuntimeLib_enUS v1.13.6.11306
(ck=83b)

commented

While I'm sure this can be done more eloquently, this will fix the error:
~Line 139 of Jostle.lua:

local function LockMainMenuBar()
	if not ChocolateBar.isClassicWoW then
		if not InCombatLockdown() and not UnitInVehicle("Player") then
			MainMenuBar:SetMovable(true)
			MainMenuBar:SetUserPlaced(true)
			ChocolateBar:Debug("LockMainMenuBar")
			MainMenuBar:SetMovable(false)
		end
	end
	if ChocolateBar.isClassicWoW then
		if not InCombatLockdown() then
			MainMenuBar:SetMovable(true)
			MainMenuBar:SetUserPlaced(true)
			ChocolateBar:Debug("LockMainMenuBar")
			MainMenuBar:SetMovable(false)
		end
	end
end