Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SetBackdropBorderColor LUA error when hovering over wild pets profile in battle #16

Open
nearlysober80 opened this issue Nov 27, 2020 · 2 comments

Comments

@nearlysober80
Copy link

When in battle with a wild pet, if you hover over the pet you're fighting to get more info, the following LUA pops up.

I believe this was set by changes to backdrop commands in 9.0.1:

Message: Interface\AddOns\BetterBattlePetTooltip\Core.lua:312: attempt to call method 'SetBackdropBorderColor' (a nil value)
Time: Fri Nov 27 11:27:23 2020
Count: 7
Stack: Interface\AddOns\BetterBattlePetTooltip\Core.lua:312: attempt to call method 'SetBackdropBorderColor' (a nil value)
[string "=[C]"]: in function SetBackdropBorderColor' [string "@Interface\AddOns\BetterBattlePetTooltip\Core.lua"]:312: in function <Interface\AddOns\BetterBattlePetTooltip\Core.lua:299> [string "@Interface\AddOns\BetterBattlePetTooltip\Core.lua"]:334: in function <Interface\AddOns\BetterBattlePetTooltip\Core.lua:328> [string "=[C]"]: in function PetBattleUnitTooltip_UpdateForUnit'
[string ":OnEnter"]:2: in function <[string ":OnEnter"]:1>
[string "=[C]"]: ?

Locals:

@nearlysober80
Copy link
Author

Similar error when hovering over pets in the AH UI related to the changes in SetBackDropBorderColor:

Message: Interface\AddOns\BetterBattlePetTooltip\Core.lua:312: attempt to call method 'SetBackdropBorderColor' (a nil value)
Time: Thu Dec 3 13:20:05 2020
Count: 17
Stack: Interface\AddOns\BetterBattlePetTooltip\Core.lua:312: attempt to call method 'SetBackdropBorderColor' (a nil value)
[string "=[C]"]: in function SetBackdropBorderColor' [string "@Interface\AddOns\BetterBattlePetTooltip\Core.lua"]:312: in function <Interface\AddOns\BetterBattlePetTooltip\Core.lua:299> [string "@Interface\AddOns\BetterBattlePetTooltip\Core.lua"]:363: in function <Interface\AddOns\BetterBattlePetTooltip\Core.lua:356> [string "@Interface\AddOns\BetterBattlePetTooltip\Core.lua"]:384: in function <Interface\AddOns\BetterBattlePetTooltip\Core.lua:383> [string "=[C]"]: ? [string "=[C]"]: in function BattlePetToolTip_Show'
[string "@interface\FrameXML\BattlePetTooltip.lua"]:10: in function BattlePetToolTip_ShowLink' [string "@Interface\AddOns\Blizzard_AuctionHouseUI\Blizzard_AuctionHouseUtil.lua"]:527: in function SetAuctionHouseTooltip'
[string "@interface\AddOns\Blizzard_AuctionHouseUI\Blizzard_AuctionHouseUtil.lua"]:565: in function lineOnEnterCallback' [string "@Interface\AddOns\Blizzard_AuctionHouseUI\Blizzard_AuctionHouseItemList.lua"]:176: in function OnEnterListLine'
[string "@interface\AddOns\Blizzard_AuctionHouseUI\Blizzard_AuctionHouseItemList.lua"]:21: in function `OnLineEnter'
[string "@interface\SharedXML\TableBuilder.lua"]:42: in function <Interface\SharedXML\TableBuilder.lua:41>

Locals:

@ObiWahn86
Copy link

ObiWahn86 commented May 6, 2021

The problem is caused in 9.0 because to improve performance frames don't have backdrops anymore unless they import or inherit the backdrop template.
Following an advice on wowinterface I added the following after line 76 in Core.lua:
local f = CreateFrame("Frame", nil, self, BackdropTemplateMixin and "BackdropTemplate")
and changed self in line 312 (that is line 313 after the insert) to f:
f:SetBackdropBorderColor(r, g, b)
That fixed the problem for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants