ChocolateBar Broker Display

ChocolateBar Broker Display

1M Downloads

Classic client, Version 3.6.12

godsyn opened this issue · 3 comments

commented
Time: Sat Apr 10 17:09:43 2021
Count: 1
Stack: ...dOns\ChocolateBar\libs\AceEvent-3.0\AceEvent-3.0.lua:33: Attempt to register unknown event "PET_BATTLE_OPENING_START"
[C]: in function `RegisterEvent'
...dOns\ChocolateBar\libs\AceEvent-3.0\AceEvent-3.0.lua:33: in function `OnUsed'
...Bar\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:142: in function `RegisterEvent'
Interface\AddOns\ChocolateBar\Core.lua:113: in function <Interface\AddOns\ChocolateBar\Core.lua:86>
[C]: ?
...dOns\ChocolateBar\libs\AceAddon-3.0\AceAddon-3.0.lua:70: in function <...dOns\ChocolateBar\libs\AceAddon-3.0\AceAddon-3.0.lua:65>
...dOns\ChocolateBar\libs\AceAddon-3.0\AceAddon-3.0.lua:498: in function `InitializeAddon'
...dOns\ChocolateBar\libs\AceAddon-3.0\AceAddon-3.0.lua:623: in function <...dOns\ChocolateBar\libs\AceAddon-3.0\AceAddon-3.0.lua:615>

Locals: <none>
Time: Sat Apr 10 17:09:44 2021
Count: 1
Stack: Interface\AddOns\ChocolateBar\Core.lua:376: attempt to index field 'ChocolateBar1' (a nil value)
Interface\AddOns\ChocolateBar\Core.lua:376: in function `EnableDataObject'
Interface\AddOns\ChocolateBar\Core.lua:323: in function `LibDataBroker_DataObjectCreated'
Interface\AddOns\ChocolateBar\Core.lua:147: in function <Interface\AddOns\ChocolateBar\Core.lua:145>
[C]: ?
...dOns\ChocolateBar\libs\AceAddon-3.0\AceAddon-3.0.lua:70: in function <...dOns\ChocolateBar\libs\AceAddon-3.0\AceAddon-3.0.lua:65>
...dOns\ChocolateBar\libs\AceAddon-3.0\AceAddon-3.0.lua:527: in function `EnableAddon'
...dOns\ChocolateBar\libs\AceAddon-3.0\AceAddon-3.0.lua:630: in function <...dOns\ChocolateBar\libs\AceAddon-3.0\AceAddon-3.0.lua:615>

Locals: <none>
Message: ...erface\AddOns\ChocolateBar\modules\CB_PlayedTime.lua:65: attempt to call global 'GetMaxLevelForPlayerExpansion' (a nil value)
Time: Sat Apr 10 17:10:40 2021
Count: 2
Stack: ...erface\AddOns\ChocolateBar\modules\CB_PlayedTime.lua:65: attempt to call global 'GetMaxLevelForPlayerExpansion' (a nil value)
...erface\AddOns\ChocolateBar\modules\CB_PlayedTime.lua:65: in function <...erface\AddOns\ChocolateBar\modules\CB_PlayedTime.lua:60>

Locals: self = <unnamed> {
 0 = <userdata>
}
event = "TIME_PLAYED_MSG"
totalTimeInSeconds = 90983
timeAtThisLevel = 2191
dbChar = <table> {
 total = 90983
}
days = 1.053044
(*temporary) = 20
(*temporary) = nil
(*temporary) = "attempt to call global 'GetMaxLevelForPlayerExpansion' (a nil value)"
db = <table> {
 Pheign-BloodsailBuccaneers = <table> {
 }
 Phobias-BloodsailBuccaneers = <table> {
 }
}
getPlayerIdentifier = <function> defined @Interface\AddOns\ChocolateBar\modules\CB_PlayedTime.lua:52
dataobj = <table> {
}
commented

Temp fix:
core.lua:
around line 110:

	self:RegisterEvent("PLAYER_REGEN_ENABLED","OnLeaveCombat")
	self:RegisterEvent("PLAYER_ENTERING_WORLD","OnEnterWorld")
	if WOW_PROJECT_ID ~= WOW_PROJECT_CLASSIC then
		self:RegisterEvent("PET_BATTLE_OPENING_START","OnPetBattleOpen")
		self:RegisterEvent("PET_BATTLE_CLOSE","OnPetBattleOver")
	end
	self:RegisterEvent("ADDON_LOADED",function(event, addonName)

	if self[addonName] then self[addonName](self) end
	end)

CB_PlayedTime.lua:
Change line 65 from:
if UnitLevel("player") == GetMaxLevelForPlayerExpansion() then
to
if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then

CB_PlayedTime_Options.lua:
comment line 49
--LibStub("AceConfigDialog-3.0"):AddToBlizOptions(addonName, addonName)

commented

Above confirmed working for both classic and retail.

commented

fixed in ChocolateBar 3.6.14