View Single Post
04/24/14, 09:26 AM   #7
Asto
 
Asto's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 18
2
Oh i forgot about the thing that initially confused me...
see the following:



Solution
  • Now I could track down the following rules with your help and a few more tests:
    1. You get a category if the achievement is not a member of an achievement line
    2. If the achievement is member of a line
      1. but you did not complete any achievement of this line, the first achievement returns the correct category
      2. if you completed an achievement of the line, only the last completed achievement returns the correct category

Please tell me if that makes any sense...
They should change it in the future...

1
With the given "stepping behavior" (previous and next) i still can't decide between a first achievement and another later incomplete one in the line. I have to ignore the events for later achievements of a line.

Idea (dirty)
  • Maybe the only thing i could do to solve it: i could use achievementId, substract 1 (very dirty...) to get possibly the previous achievementId, test with a getNext if it is a previous achievement of the initial achievmentId i got (matching Ids).
    • If it matches the initial achievementId: Yaay! I found a previous one.
    • If it is not the previous achievement: Okay the event send me an achievement that is a first one of a line or a solo achievement.


Edit: Better Idea / Maybe the solution
  • 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

I definitely have to test that

Edit: Works

Last edited by Asto : 04/24/14 at 03:31 PM.
  Reply With Quote