Thread Tools Display Modes
12-28-10, 06:01 AM   #1
Tomate
A Murloc Raider
 
Tomate's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 5
Question 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
  Reply With Quote
01-16-11, 04:36 AM   #2
Alternator
A Fallenroot Satyr
 
Alternator's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 20
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.
  Reply With Quote
01-16-11, 11:14 AM   #3
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,359
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.
  Reply With Quote
01-17-11, 06:48 AM   #4
Tomate
A Murloc Raider
 
Tomate's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 5
Originally Posted by Alternator View Post
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.

Originally Posted by Dridzt View Post
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).

Last edited by Tomate : 01-17-11 at 07:21 AM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Retrieved guild achievement criteria status?

Thread Tools
Display Modes

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