mirror of
https://github.com/SWG-Source/src.git
synced 2026-09-11 23:45:01 -04:00
get better warning/error output on character creation failures
This commit is contained in:
+6
-2
@@ -46,10 +46,14 @@ bool CreateCharacterCustomPersistStep::beforePersist(DB::Session *session)
|
||||
|
||||
bool CreateCharacterCustomPersistStep::afterPersist(DB::Session *session)
|
||||
{
|
||||
// std::string characterName = Unicode::wideToNarrow(DatabaseProcess::getInstance().getNameByStationId(m_stationId));
|
||||
DBQuery::AddCharacter qry(m_stationId,m_characterObject, m_characterName, m_normalizedName);
|
||||
if (! (session->exec(&qry)))
|
||||
|
||||
if (! (session->exec(&qry))) {
|
||||
std::string characterName(Unicode::wideToNarrow(m_characterName));
|
||||
WARNING(true, ("CreateCharacterCustomPersistStep: Failed saving character and character object for %s", characterName.c_str()));
|
||||
return false;
|
||||
}
|
||||
|
||||
qry.done();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -993,9 +993,10 @@ void Persister::addCharacter(uint32 stationId, const NetworkId &characterObject,
|
||||
m_pendingCharacters[characterObject]=temp;
|
||||
|
||||
//TODO: remove this hack: match up create and end messages because we can't count on having all the data at a frame bounday
|
||||
auto i=m_newCharacterLock.find(creationGameServer);
|
||||
UNREF(i);
|
||||
DEBUG_FATAL(i!=m_newCharacterLock.end(),("Programmer bug: got an addCharacter from server %i before we received EndBaselines from the previous addCharacter. Indicates we're getting network messages out of order.\n",creationGameServer));
|
||||
if (m_newCharacterLock.find(creationGameServer) != m_newCharacterLock.end()) {
|
||||
WARNING(true,("Programmer bug: got an addCharacter from server %i before we received EndBaselines from the previous addCharacter. Indicates we're getting network messages out of order.\n",creationGameServer));
|
||||
}
|
||||
|
||||
m_newCharacterLock.insert(creationGameServer);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user