Jump to content

[Patch] Timed Achievements, Fail-Support and Opcodes


Schmoozerd

Recommended Posts

Description of the feature?

* Implement DoFailTimedAchievementCriteria function

* Improve the Opcodes

For which repository revision was the patch created?

10399, 10637

Is there a thread in the bug report section or at lighthouse?

no

Who has been writing this patch?

me

Patch:

http://paste2.org/p/1049075 for Rev 10637

- fixed a bug in the DoFailedTimedAchievementCriterias for-loop (please take extra care on review), improved comments, fixed bugs of last version

Please test, and report issues if you find any

I added a new list, and a new bool to process, and it might be possible I missed some initialization or similar.

Also retail _does_ send different timers in the opcodes for _some_ criterias, situations.

But I couldn't get a pattern there, and so it might (though unlikely) be possible, that this patch has impact on other Achievements, but I tested it, and didn't found any problems.

And ofc any ideas for improving the opcodes are very welcome ;)

History:

http://paste2.org/p/961639 for Rev 10399

l. 60: data << uint32(progress->timedCriteriaFailed); <-- data << uint32(progress->timedCriteriaFailed ? 1 : 0);

l. 191: *data << uint32(iter->second.date); <-- *data << uint32(iter->second.timedCriteriaFailed ? 1 : 0); (..... dammn copy and paste)

* iter improvements, suggested by DasBlub

Link to comment
Share on other sites

  • 1 month later...

bump for rev 10637 - I fixed the long time mentioned bugs and also some bug in the for loop, please take extra care there:

-- the for-loop part as in version for rev 10637

   for (AchievementCriteriaFailTime::iterator iter = m_criteriaFailTimes.begin(); iter != m_criteriaFailTimes.end()
   {
       if (iter->second > now)
       {
           ++iter;
           continue;
       }
...
       // Send Fail for failed criterias
       if (!IsCompletedCriteria(criteria, achievement))
       {
... < no break/continue here
       }
       iter = m_criteriaFailTimes.erase(iter);

Link to comment
Share on other sites

  • 2 weeks later...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use