Fix crash introduced in 8199 (5a30b77777b7)

--HG--
branch : trunk
This commit is contained in:
Machiavelli
2010-05-16 14:14:54 +02:00
parent 437a5d90b2
commit cef21f6e39

View File

@@ -470,14 +470,14 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
LoginDatabase.PExecute("INSERT INTO realmcharacters (numchars, acctid, realmid) VALUES (%u, %u, %u)", charcount, GetAccountId(), realmID);
pNewChar->CleanupsBeforeDelete();
delete pNewChar; // created only to call SaveToDB()
data << (uint8)CHAR_CREATE_SUCCESS;
SendPacket(&data);
std::string IP_str = GetRemoteAddress();
sLog.outBasic("Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), pNewChar->GetGUIDLow());
sLog.outChar("Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), pNewChar->GetGUIDLow());
delete pNewChar; // created only to call SaveToDB()
}