diff --git a/engine/server/library/serverDatabase/src/shared/CreateCharacterCustomPersistStep.cpp b/engine/server/library/serverDatabase/src/shared/CreateCharacterCustomPersistStep.cpp index fb6072b9..0ff64fc7 100755 --- a/engine/server/library/serverDatabase/src/shared/CreateCharacterCustomPersistStep.cpp +++ b/engine/server/library/serverDatabase/src/shared/CreateCharacterCustomPersistStep.cpp @@ -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; } diff --git a/engine/server/library/serverDatabase/src/shared/Persister.cpp b/engine/server/library/serverDatabase/src/shared/Persister.cpp index fa57c58b..11fcd82c 100755 --- a/engine/server/library/serverDatabase/src/shared/Persister.cpp +++ b/engine/server/library/serverDatabase/src/shared/Persister.cpp @@ -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); }