ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Bug Reports (https://www.esoui.com/forums/forumdisplay.php?f=187)
-   -   [open] Dragon Bones achievements (https://www.esoui.com/forums/showthread.php?t=8424)

Aaxc 03/22/19 10:06 AM

[open] Dragon Bones achievements
 
Hello,
I can't seem to get Dragon Bones General achievements through the API.

In-game you can see, that there are two categories:


But when requesting them through API, I get only one:
Quote:

Request: GetAchievementCategoryInfo(16)
Response: [Dragon Bones, 1, 8, 355, 675, false]
And requesting the subcategoies, also only the first one is returned:
Quote:

Request: GetAchievementSubCategoryInfo(16, 1)
Response: [Veteran, 30, 320, 730, false]
And nothing for 2nd category

Is this a bug or am I requesting something wrong?

votan 03/22/19 10:15 AM

Quote:

Originally Posted by Aaxc (Post 37525)
Hello,
I can't seem to get Dragon Bones General achievements through the API.

In-game you can see, that there are two categories:


But when requesting them through API, I get only one:


And requesting the subcategoies, also only the first one is returned:


And nothing for 2nd category

Is this a bug or am I requesting something wrong?

The "General" sub-category is "nil" as the second parameter.

Rhyono 03/22/19 10:27 AM

It's just like grade school math: nil, 1, 2, 3! Right?

Aaxc 03/23/19 08:10 AM

Quote:

Originally Posted by votan (Post 37526)
The "General" sub-category is "nil" as the second parameter.

No, it does not seem like that, here:

Quote:

Request: GetAchievementCategoryInfo(16)
Response: [Dragon Bones, 1, 8, 355, 875, false]
Quote:

Request: GetAchievementSubCategoryInfo(16, nil)
Response: [Veteran, 30, 320, 730, false]
Quote:

Request: GetAchievementCategoryInfo(16, 1)
Response: [Veteran, 30, 320, 730, false]
In comparison Wolfhunter also has the same two subcategories (General and Veteran):

Quote:

Request: GetAchievementCategoryInfo(15)
Response: [Wolfhunter, 2, 0, 220, 840, false]
And you can get 1 and 2 there:

Quote:

Request: GetAchievementSubCategoryInfo(15, nil)
Response: [General, 9, 30, 150, false]
Quote:

Request: GetAchievementSubCategoryInfo(15, 1)
Response: [General, 9, 30, 150, false]
Quote:

Request: GetAchievementSubCategoryInfo(15, 2)
Response: [Veteran, 29, 190, 690, false]

Aaxc 03/25/19 06:23 AM

Still trying to understand this issue. Any idea where else I could ask about it?

Kyoma 03/25/19 07:46 AM

Not sure why there is this inconsistancy with the newer achievements, in the past it all worked like votan said. You'd access the "General" achievements by passing "nil" as the second parameter for GetAchievementId and the rest of the achievements were in subcategory 1 to x. All of this comes directly from the client so I guess ZOS decided to mix things up for a change. :p

None of this would really matter because, per your posted snippet, the numAchievements return value (the third) from GetAchievementCategoryInfo is 0. So you don't end up with duplicate "General" entries as long as you check that I guess.

Edit: Oh wait, so I guess the misunderstanding is with using nil for GetAchievementSubCategoryInfo to get the "General" achievements. Which isn't the case, you pass "nil" as subcategory to GetAchievementId. See the vanilla code for a better understanding on how it all works: https://github.com/esoui/esoui/blob/...ents.lua#L1802


All times are GMT -6. The time now is 06:39 PM.

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