View Single Post
04/24/14, 04:28 PM   #8
Iyanga
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 183
Originally Posted by Asto View Post
  • I can decide between a solo achievement and a member of an achievement line with the following trick:
    1. The achievement with a valid category (not 2, nil, 2 i guess) is a solo achievement or the first unachieved of a line -> i want to handle it
    2. The achievement with a prev and next value (none of them is 0) is the achievement of a line i am currenty at -> i want to handle it
    3. ignore everything else
You can't check for "not( 2, nil, 2)" because 2, nil, 2 is a valid combination, too.

A solo achievement or the first achievement of the line returns a 0 to GetPrev(). As far as I can tell, you need to use this instead to have it reliable for all achievements.

The last achievement of the line will have a NextValue of 0, too, but you want to handle it - if you are actually working on the last achievement. You need to check the AchievementInfo and completed value where the character actually is, to determine what you can ignore.

In other words:
If your 66 is completed, you must ignore 68, but not 67, but if you are at 67, you must NOT ignore 68.
  Reply With Quote