Core/DBLayer: Use prepared statements in Player::SaveToDB. Also split the function up between an INSERT part (new character creation) and UPDATE part (existing character).

This commit is contained in:
Machiavelli
2011-11-25 15:14:00 +01:00
parent 4f738fe75a
commit 72675d55d8
5 changed files with 237 additions and 144 deletions
@@ -658,7 +658,7 @@ void WorldSession::HandleCharCreateCallback(PreparedQueryResult result, Characte
newChar.SetAtLoginFlag(AT_LOGIN_FIRST); // First login
// Player created, save it now
newChar.SaveToDB();
newChar.SaveToDB(true);
createInfo->CharCount += 1;
SQLTransaction trans = LoginDatabase.BeginTransaction();