Achievement system

04/23/2013 19:00 OGs Gaming#1
Hey!

Sorry for asking about so much. (btw I fixed all my other stuff by just taking a look around the source/database/patch, but I dont know how to remove achievement system/fix it. It would be great if you guys could help me with it.
Everytime I login, the achievements I have achieved comes up aain. Its really annoying!
#Edit problem fixed.
04/26/2013 12:50 shadowman123#2
Make ushort List and add all the Achievments the player gained.. and make checker if !List.Contains(Acheviment ID) then send the packet to player with the new Acheivment ID thats it .. u should make Database Part too for saving / Loading
04/26/2013 19:24 sala7mostafa#3
Thanks for this [makontesh 3ayez t2oly @.@]
04/26/2013 21:00 pro4never#4
Quote:
Originally Posted by shadowman123 View Post
Make ushort List and add all the Achievments the player gained.. and make checker if !List.Contains(Acheviment ID) then send the packet to player with the new Acheivment ID thats it .. u should make Database Part too for saving / Loading
Wrong.

Achievements are stored as an array of bits (achieved or not). This is how they are sent to the client and therefor how you should be storing them on the server (less conversions, faster).

Use bitflags to turn the bit controlling each achievement on or off.

Function is almost exactly like the effects system.
04/27/2013 00:26 nTL3fTy#5
Quote:
Originally Posted by pro4never View Post
Wrong.

Achievements are stored as an array of bits (achieved or not). This is how they are sent to the client and therefor how you should be storing them on the server (less conversions, faster).

Use bitflags to turn the bit controlling each achievement on or off.

Function is almost exactly like the effects system.
While the set of achievements as a whole are sent as a bitarray, I believe individual achievements (when acquired) are sent as their achievement id (located in ini/achievements.dat). I implemented a crude achievement system into CSV3 a while ago, see: [Only registered and activated users can see links. Click Here To Register...].
04/27/2013 00:34 pro4never#6
Boo, stop giving people accurate information!

But yah, my argument was more based around the sillyness of trying to build a dictionary/list/etc of all gained achievements and then cringing at the needless overhead of constantly trying to write that to a packet or save/load to database.
04/27/2013 23:22 shadowman123#7
Guyz i created the system using Completely Different ways
04/27/2013 23:29 pro4never#8
Quote:
Originally Posted by shadowman123 View Post
Guyz i created the system using Completely Different ways
I've been wrong before but chances are it's a less efficient method than using a bit array like nTL3fTy describes.