ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Bug Reports (https://www.esoui.com/forums/forumdisplay.php?f=187)
-   -   [fixed]Functions for detecting CP-disabled campaigns don't work? (https://www.esoui.com/forums/showthread.php?t=10933)

Kyzeragon 04/20/24 12:44 PM

[fixed]Functions for detecting CP-disabled campaigns don't work?
 
It seems like none of the API functions I'd expect to be able to use to detect whether the player's current campaign has CP enabled are working:

1.
Code:

* DoesCurrentCampaignRulesetAllowChampionPoints()
** _Returns:_ *bool* _isNoChampionPointsCampaign_

This returns true whether I'm in CP, nonCP, Cyro, IC, or not even in PvP at all, whether my home campaign is Gray Host, Ravenwatch, Icereach, etc.
The documentation itself is doubly confusing. To me, the name DoesCurrentCampaignRulesetAllowChampionPoints would suggest that CP-enabled campaigns would return true... but _Returns:_ *bool* _isNoChampionPointsCampaign_ suggests it would return false.


2.
Code:

* GetChampionPurchaseAvailability()
** _Returns:_ *[ChampionPurchaseResult|#ChampionPurchaseResult]* _result_

* GetExpectedResultForChampionPurchaseRequest()
** _Returns:_ *[ChampionPurchaseResult|#ChampionPurchaseResult]* _result_

Both of these return 0 (for success) after I queue a simple purchase request while in a nonCP campaign. I would expect it to return nonzero, because there is a purchase result for nonCP, CHAMPION_PURCHASE_IN_NOCP_CAMPAIGN, which does get returned when the actual purchase request is sent.


The only way I've found to possibly detect nonCP is to GetCampaignRulesetId and hardcode these values into my addons, but it's hacky at best, and more would have to be added when a Cyrodiil event goes live. Am I missing something? Is this a bug with the APIs?

ZOS_DanBatson 04/22/24 11:34 AM

I think there's a bug here. Thank you for reporting this, we're looking into it.

ZOS_DanBatson 07/31/24 09:13 AM

This should now be fixed on PTS

Kyzeragon 08/01/24 03:47 AM

Quote:

Originally Posted by ZOS_DanBatson (Post 50434)
This should now be fixed on PTS

Thanks! Unfortunately PTS only seems to have Blackreach and CP Imperial City so I can't try it out... but if it's alright, may I ask what the nature of the bug was? I've been talking with another dev for whom the DoesCurrentCampaignRulesetAllowChampionPoints() function apparently works right now on NA, but it still only returns true for me, and we're very confused. I understand if it's something you can't discuss though, and I guess it'll work eventually next patch anyway :p

Baertram 08/01/24 06:28 AM

Make sure to both disable all addons if you test that, just in case (unless the fix is already done for live NA but not live EU and you tested on EU server ;) )

Kyzeragon 08/01/24 10:07 AM

Quote:

Originally Posted by Baertram (Post 50436)
Make sure to both disable all addons if you test that, just in case (unless the fix is already done for live NA but not live EU and you tested on EU server ;) )

I actually mentioned specifically that in my reply to you at https://www.esoui.com/downloads/info....html#comments which I assume you haven't seen; it was my first thought to check other addons when finding the discrepancy. And yeah we both did it on NA.

Baertram 08/01/24 10:14 AM

Yep, I missed that. Thanks for the info.
Answered you there.

ZOS_DanBatson 08/01/24 11:14 AM

We had some old logic that did some caching of the current campaign that had holes/flaws in its consistency. So you could easily wind up in situations where the cache was "wrong." But it was all superfluous logic that we just cleaned up to make more sense and be easier to manage.

Kyzeragon 08/01/24 11:19 AM

Ah, thanks for the info, that makes sense. I guess Dack's cache is simply better than ours 😏


All times are GMT -6. The time now is 09:04 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI