Thread Tools Display Modes
04/20/24, 12:44 PM   #1
Kyzeragon
 
Kyzeragon's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2018
Posts: 4
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?
  Reply With Quote
04/22/24, 11:34 AM   #2
ZOS_DanBatson
ZOS Staff!
 
ZOS_DanBatson's Avatar
Yes this person is from ZeniMax!
Join Date: Jul 2015
Posts: 187
I think there's a bug here. Thank you for reporting this, we're looking into it.
  Reply With Quote
Yesterday, 09:13 AM   #3
ZOS_DanBatson
ZOS Staff!
 
ZOS_DanBatson's Avatar
Yes this person is from ZeniMax!
Join Date: Jul 2015
Posts: 187
This should now be fixed on PTS
  Reply With Quote
Today, 03:47 AM   #4
Kyzeragon
 
Kyzeragon's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2018
Posts: 4
Originally Posted by ZOS_DanBatson View Post
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
  Reply With Quote
Today, 06:28 AM   #5
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,116
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 )
  Reply With Quote
Today, 10:07 AM   #6
Kyzeragon
 
Kyzeragon's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2018
Posts: 4
Originally Posted by Baertram View Post
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.
  Reply With Quote
Today, 10:14 AM   #7
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,116
Yep, I missed that. Thanks for the info.
Answered you there.

Last edited by Baertram : Today at 10:21 AM.
  Reply With Quote
Today, 11:14 AM   #8
ZOS_DanBatson
ZOS Staff!
 
ZOS_DanBatson's Avatar
Yes this person is from ZeniMax!
Join Date: Jul 2015
Posts: 187
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.
  Reply With Quote
Today, 11:19 AM   #9
Kyzeragon
 
Kyzeragon's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2018
Posts: 4
Ah, thanks for the info, that makes sense. I guess Dack's cache is simply better than ours 😏
  Reply With Quote

ESOUI » Developer Discussions » Bug Reports » Functions for detecting CP-disabled campaigns don't work?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off