I was just browsing the DB and wondering why all new characters seem to have 0 stats at all, and I think I discovered why. During the character create process, one of the calls is "InsertCharacterStats()" in WorldDatabase. However, there's a big, fat TODO in there
So since you're becoming a whiz-bang coder of Emu, I thought I'd challenge you with helping me come up with a solution to this TODO.
Code: Select all
bool WorldDatabase::InsertCharacterStats(int32 character_id){
//TODO: load defaults from another table
Query query;
string create_charstats = string("Insert into character_details (char_id) values(%i)");
query.RunQuery2(Q_INSERT, create_charstats.c_str(),character_id);
return true;
}Example 1: /level 5 sets all my stats to 25. Not sure that's right in and of itself, but that's what we'll discuss.
Example 2: /level 1 (back down) sets the stats to 17 - interesting #
Example 3: /level 0 works. WTF???
Anyway, just something else to look into in our spare time - as a diversion