starting_skills class_id=255 race_id=255
Posted: Thu Nov 12, 2009 6:06 am
I hadn't updated in quite a while and I ran an update yesterday and suddenly starting_skills has stopped functioning when I set a skill (ie fishing etc to 255/255). I checked character_skills and the skills did not appear in there after creating a new character
I took at a look at the code in WorldDatabase.cpp
void WorldDatabase::UpdateStartingSkills(int32 char_id, int8 class_id, int8 race_id, bool base_class){
Query query;
query.RunQuery2(Q_INSERT, "insert into character_skills (char_id, skill_id, current_val, max_val) select %lu, skill_id, current_val, max_val from starting_skills where class_id=%i and race_id=%i", char_id, class_id, race_id);
query.RunQuery2(Q_INSERT, "insert into character_skills (char_id, skill_id, current_val, max_val) select %lu, skill_id, current_val, max_val from starting_skills where class_id=%i and race_id=255", char_id, class_id);
if(!base_class){
query.RunQuery2(Q_INSERT, "insert into character_skills (char_id, skill_id, current_val, max_val) select %lu, skill_id, current_val, max_val from starting_skills where class_id=255 and race_id=%i", char_id, race_id);
query.RunQuery2(Q_INSERT, "insert into character_skills (char_id, skill_id, current_val, max_val) select %lu, skill_id, current_val, max_val from starting_skills where class_id=255 and race_id=255", char_id);
}
}
I thought maybe it might have been base_class being true but i put the query outside the if and it still did it
Mentioning it to scat he believes it may be related to the loginserver
Just to note: I am using a version of minilogin that might be out of date, i'm not sure but will look into that now, my build is 19th december 2008 if that's of any help
Regards
Mike
I took at a look at the code in WorldDatabase.cpp
void WorldDatabase::UpdateStartingSkills(int32 char_id, int8 class_id, int8 race_id, bool base_class){
Query query;
query.RunQuery2(Q_INSERT, "insert into character_skills (char_id, skill_id, current_val, max_val) select %lu, skill_id, current_val, max_val from starting_skills where class_id=%i and race_id=%i", char_id, class_id, race_id);
query.RunQuery2(Q_INSERT, "insert into character_skills (char_id, skill_id, current_val, max_val) select %lu, skill_id, current_val, max_val from starting_skills where class_id=%i and race_id=255", char_id, class_id);
if(!base_class){
query.RunQuery2(Q_INSERT, "insert into character_skills (char_id, skill_id, current_val, max_val) select %lu, skill_id, current_val, max_val from starting_skills where class_id=255 and race_id=%i", char_id, race_id);
query.RunQuery2(Q_INSERT, "insert into character_skills (char_id, skill_id, current_val, max_val) select %lu, skill_id, current_val, max_val from starting_skills where class_id=255 and race_id=255", char_id);
}
}
I thought maybe it might have been base_class being true but i put the query outside the if and it still did it
Mentioning it to scat he believes it may be related to the loginserver
Just to note: I am using a version of minilogin that might be out of date, i'm not sure but will look into that now, my build is 19th december 2008 if that's of any help
Regards
Mike