frozn / TipTac

WoW AddOn TipTac Reborn
GNU General Public License v3.0
119 stars 25 forks source link

lua error with battle pet tips enabled #264

Closed Duderino84 closed 8 months ago

Duderino84 commented 10 months ago

28x SharedXML/Color.lua:61: bad argument #2 to 'format' (string expected, got nil) string "=[C]": in function `format' [string "@SharedXML/Color.lua"]:61: in function <SharedXML/Color.lua:60>

[string "@TipTac/ttStyle.lua"]:346: in function GeneratePetLines' [string "@TipTac/ttStyle.lua"]:419: in functionModifyUnitTooltip' [string "@TipTac/ttStyle.lua"]:655: in function ?' [string "@TipTac/libs/LibFroznFunctions-1.0-15/LibFroznFunctions-1.0.lua"]:889: in functionFireGroupEvent' [string "@TipTac/ttCore.lua"]:2647: in function SetUnitAppearanceToTip' [string "@TipTac/ttCore.lua"]:2750: in function?' [string "@TipTac/libs/LibFroznFunctions-1.0-15/LibFroznFunctions-1.0.lua"]:889: in function FireGroupEvent' [string "@TipTac/ttCore.lua"]:1507: in functionSetCurrentDisplayParams' [string "@TipTac/ttCore.lua"]:1382: in function <TipTac/ttCore.lua:1381> ... [string "@SharedXML/Tooltip/TooltipDataHandler.lua"]:182: in function <SharedXML/Tooltip/TooltipDataHandler.lua:178> [string "@SharedXML/Tooltip/TooltipDataHandler.lua"]:218: in function <SharedXML/Tooltip/TooltipDataHandler.lua:208> string "=[C]": in function SetAttribute' [string "@SharedXML/Tooltip/TooltipDataHandler.lua"]:243: in function <SharedXML/Tooltip/TooltipDataHandler.lua:236> [string "@SharedXML/Tooltip/TooltipDataHandler.lua"]:389: in function <SharedXML/Tooltip/TooltipDataHandler.lua:339> [string "=[C]"]: in functionsecurecallfunction' [string "@SharedXML/Tooltip/TooltipDataHandler.lua"]:336: in function ProcessInfo' [string "@FrameXML/GameTooltip.lua"]:1092: in functionSetWorldCursor' [string "@FrameXML/UIParent.lua"]:1484: in function <FrameXML/UIParent.lua:1407>

Locals: (temporary) = "|c%s%s|r" (temporary) = "ffffffff" (temporary) = nil (temporary) = "string expected, got nil"

Duderino84 commented 10 months ago

It happend everytime when i mouseover an Animaltrainer like Enok or someoneelse

Duderino84 commented 10 months ago

when i disabel "special" - enable battle pet tips then no error apear

frozn commented 10 months ago

I can't reproduce this on my side. The color which is used here is the one in options under "Colors->Race & Creature Type Color". Is there a proper color set?

Edit:

It seems that it's not a problem with the race color, instead the pet type determined by UnitBattlePetType() seems wrong. It's not a general problem but with some special pets.

I'm on it...

hollo6 commented 10 months ago

I'm getting this when mousing over an Argent Gruntling.

frozn commented 10 months ago

It seems that it's currently a blizzard bug. The return values for UnitBattlePetType() are currently off by one and returns a value range of 0 - 9 instead if the original 1 - 10.

For pet types 2 - 10 the pet type shown is wrong, for humanoid pets (pet type 1) this error occurs.

Source: https://us.forums.blizzard.com/en/wow/t/lua-error-when-clicking-on-humanoid-battle-pet/1707965

This function is actually only used on blizzards side in the target frame, where the pet type is also wrong (cats will be shown as pet type elemental instead of beast).

I think I will wait a few days for blizzard to fix this.

frozn commented 10 months ago

As of today the bug has been fixed by blizzard. Working fine now after latest update.