WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Retrieved guild achievement criteria status? (https://www.wowinterface.com/forums/showthread.php?t=37956)

Tomate 12-28-10 06:01 AM

Retrieved guild achievement criteria status?
 
Hi,

I am currently maintaining Urban Achiever (http://www.wowinterface.com/download...nAchiever.html) and I am recently encounter an issue that I can't avoid.

Guild achievements are not working like other achievements. The API function that retrieved the criteria information are not working like I intended.
Code:

criteriaString, criteriaType, completed, quantity, reqQuantity, charName, flags, assetID, quantityString = GetAchievementCriteriaInfo(achievementID, criteriaID);
The value of "completed" is right one when it is a classical achievement. But when it is on a guild achievement it always return false. It only return true (on guild achievement) when the achievement itself is completed.

The value of "quantity" have the same issue.

I have look threw the entire code of the default achievement frame but I haven't found any pieces of information on how they retrieve the right value.

I have done some tests and I have seen that when you click on an guild achievement on the default UI frame, I will correctly see criteria advancement of this achievement on my addon.

I doubt someone can help me (because I know more thing on achievement API function than you can easily found on wowwiki or google) but if someone have an idea, please tell me.

Thanks,

Tomate

Alternator 01-16-11 04:36 AM

I can't directly answer your question - but I have seen in some cases the api will return out of date info.

It's possible that when clicking the achieve in the default ui, a particular function is run that has a side effect of telling the client to refresh/retrieve data, which is then exposed by another function which itself is perhaps lazy in retrieving this info (perhaps for perf reasons)... But really it's only a hunch based on what you've wrote.

Dridzt 01-16-11 11:14 AM

Code:

local criteriaString, criteriaType, criteriaCompleted, quantity, totalQuantity, name, flags, assetID, quantityString, criteriaID, eligible = GetAchievementCriteriaInfo(achID, critID);
is the full function prototype.

Perharps the answer is in the 2 returns you are missing.

Tomate 01-17-11 06:48 AM

Quote:

Originally Posted by Alternator (Post 226843)
I can't directly answer your question - but I have seen in some cases the api will return out of date info.

It's possible that when clicking the achieve in the default ui, a particular function is run that has a side effect of telling the client to refresh/retrieve data, which is then exposed by another function which itself is perhaps lazy in retrieving this info (perhaps for perf reasons)... But really it's only a hunch based on what you've wrote.

Thanks for your answer, maybe you right and it is an old version of the function who is called, but I can not see how I can force it to retrieved the good value.

Quote:

Originally Posted by Dridzt (Post 226860)
Code:

local criteriaString, criteriaType, criteriaCompleted, quantity, totalQuantity, name, flags, assetID, quantityString, criteriaID, eligible = GetAchievementCriteriaInfo(achID, critID);
is the full function prototype.

Perharps the answer is in the 2 returns you are missing.

Thanks, I hardly doubt but maybe. I will try to see what is in those two returns values.
[EDIT]: I have try to add those two values and look what is in it and It does "nothing". (they can't help me).


All times are GMT -6. The time now is 08:47 PM.

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