Thread: CP 2.0 Error
View Single Post
03/21/21, 11:25 AM   #8
Irniben
 
Irniben's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2021
Posts: 6
Hey, I had the same problem with CSPS. I used the following code before sending the purchase request to prevent the game from trying to play a confirm animation while not in the perks scene and do the needed preparation for it if the scene is shown:

Code:
	
if CHAMPION_PERKS_SCENE:GetState() == "shown" then 
	CHAMPION_PERKS:PrepareStarConfirmAnimation()
	cancelAnimation = false
else
	cancelAnimation = true
end
ZO_PreHook(CHAMPION_PERKS, "StartStarConfirmAnimation", 
	function()
		if cancelAnimation then
			cancelAnimation = false
			return true 
		end 
	end)
  Reply With Quote