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

Disabling Blizzard's Floating Combat Text breaks Rarity #530

Closed
thematrixincendies opened this issue Feb 6, 2023 · 2 comments · Fixed by #531
Closed

Disabling Blizzard's Floating Combat Text breaks Rarity #530

thematrixincendies opened this issue Feb 6, 2023 · 2 comments · Fixed by #531

Comments

@thematrixincendies
Copy link

thematrixincendies commented Feb 6, 2023

Might be a LibSink issue, but having blizzards floating combat text disabled currently breaks the addon for me.
Hovering over the minimap button causes Rarity to try to call a function from Blizzard's combat text, which is not available once it is disabled causing Rarity to not show the tooltip.
I use XCT+ and have set enableFloatingCombatText (CVar) to 0. The problem is, that even if I set the output channel to Default, XCT or anything else than Blizzards Combat Text, the issue remains.
I had the same issue with Kaliel's Tracker (quest tracker addon), but it can be fixed there by setting the output channel to XCT.
Will post the LUA error.

35x ...eBlizzard_CombatText/Blizzard_CombatText.lua:448: attempt to compare two nil values
[string "@Blizzard_CombatText/Blizzard_CombatText.lua"]:448: in function <...eBlizzard_CombatText/Blizzard_CombatText.lua:429>
[string "=[C]"]: in function `CombatText_AddMessage'
[string "@Rarity/Core/GUI/MainWindow.lua"]:1163: in function `AddItem'
[string "@Rarity/Core/GUI/MainWindow.lua"]:1307: in function <Rarity/Core/GUI/MainWindow.lua:817>
[string "@Rarity/Core/GUI/MainWindow.lua"]:1544: in function `ShowTooltip'
[string "@Rarity/Core/GUI/DataBrokerDisplay.lua"]:45: in function `ShowDelayedTooltip'
[string "@Rarity/Core/GUI/DataBrokerDisplay.lua"]:34: in function <Rarity/Core/GUI/DataBrokerDisplay.lua:33>

Locals:
message = "A world event is currently available for |cffa335ee|Hitem:174842::::::::70:62:::::::::|h[Slightly Damp Pile of Fur]|h|r! Go get it!"
scrollFunction = <function> defined @Blizzard_CombatText/Blizzard_CombatText.lua:644
r = 1
g = 1
b = 1
displayType = true
isStaggered = false
string = CombatText1 {
 scrollTime = 0
 scrollFunction = <function> defined @Blizzard_CombatText/Blizzard_CombatText.lua:644
 0 = <userdata>
}
noStringsAvailable = nil
yDir = nil
lowestMessage = nil
useXadjustment = 0
(*temporary) = nil
(*temporary) = nil
(*temporary) = 1
(*temporary) = <userdata>
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to compare two nil values"

edit: I just diff'ed the LibSink files of Kalil's Tracker and Rarity, and they are identical. Commenting out these lines:

										if tostring(SHOW_COMBAT_TEXT) ~= "0" then
											--if type(CombatText_AddMessage) == "nil" then
											--	UIParentLoadAddOn("Blizzard_CombatText")
											--	CombatText_AddMessage(text, CombatText_StandardScroll, 1, 1, 1, true, false)
											--end											
										else
											UIErrorsFrame:AddMessage(text, 1, 1, 1, 1.0)
										end

(MainWindow.lua:1159) fixes the exception. Though probably the output isn't working for me now.

@rdw-software
Copy link
Member

A brief investigation yielded the following result:

I'd assume replacing that one line resolves the problem. Maybe you could test the change locally and let me know if it works?

@thematrixincendies
Copy link
Author

Replaced

-										if tostring(SHOW_COMBAT_TEXT) ~= "0" then
+										if CVarCallbackRegistry:GetCVarValueBool("enableFloatingCombatText")  then
											if type(CombatText_AddMessage) == "nil" then
												UIParentLoadAddOn("Blizzard_CombatText")												
											end
											CombatText_AddMessage(text, CombatText_StandardScroll, 1, 1, 1, true, false)											
										else
											UIErrorsFrame:AddMessage(text, 1, 1, 1, 1.0)
										end

does indeed seem to work. No lua errors and I am also getting output in XCT now.

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

Successfully merging a pull request may close this issue.

2 participants