Enlightenment on how achievement work

Hello everybody,

I wanna start apologizing for my bad english, i’ll try to be as precise as I can. I’m trying to improve my C++ skills on Trinitycore and I got much better thanks to it. I tried a little time ago to debug the achievement: “Supreme defender” and was immediately blocked. Is there anybody who can take a little time to explain how does the “achievement process” work.

I mean, how does the core and the database (and the dbc) interract in order to get the criterias to fulfill an achievement, where are those criterias tested and how is the achievement updated. The supreme defender is a tricky one I think because you cannot just add the achievement on the down of a boss or something like that, there is a counter that is incrementing on every player getting the kill credit of the warsong flag.

I hope i made myself understandable, I’ll answer your questions if I wasn’t and I hope somebody with more experience on Trinitycore will find the time to explain me this /emoticons/default_wink.png

Thanks !