BOMB_IF(result->getNumRows()==0,"invitedCharacterByName : can't find invited char '"<<shortName<<"' from shard "<<invitedCharHome.asInt()<<" in the characters table",invokeResult(from,charId>>4,104,"Invited char not found");return);
BOMB_IF(result->getNumRows()==0,"invitedCharacterByName : can't find invited char '"<<shortName<<"' from shard "<<invitedCharHome.asInt()<<" in the characters table",invokeResult(from,charId>>4,104,"Invited char not found");return);
result->fetchRow();
result->fetchRow();
@ -1097,7 +1097,7 @@ public:
query<<" WHERE char_id = "<<charId<<" AND session_log.id = "<<sessionId;
query<<" WHERE char_id = "<<charId<<" AND session_log.id = "<<sessionId;
BOMB_IF(!_RingDB.query(query),"getRingRatings : failed request in database",playerRatings(from,charId,false,0,0,0,0,0);return);
BOMB_IF(!_RingDB.query(query),"getRingRatings : failed request in database",playerRatings(from,charId,false,0,0,0,0,0);return);
BOMB_IF(result->getNumRows()==0,"on_getRingPoints : can't find char "<<charId<<" in the characters table",ringPoints(from,charId,"",MaxRingPoints);return);
BOMB_IF(result->getNumRows()==0,"on_getRingPoints : can't find char "<<charId<<" in the characters table",ringPoints(from,charId,"",MaxRingPoints);return);
query<<"SELECT COUNT(*) FROM sessions WHERE owner = "<<charId<<" AND state = '"<<TSessionState::toString(TSessionState::ss_open)<<"' AND session_type = '"<<session->getSessionType().toString()<<"'";
query<<"SELECT COUNT(*) FROM sessions WHERE owner = "<<charId<<" AND state = '"<<TSessionState::toString(TSessionState::ss_open)<<"' AND session_type = '"<<session->getSessionType().toString()<<"'";
BOMB_IF(!_RingDb.query(query),"Failed to count number of edit session for character "<<charId,invokeResult(from,charId>>4,5,"Database failure");return);
BOMB_IF(!_RingDb.query(query),"Failed to count number of edit session for character "<<charId,invokeResult(from,charId>>4,5,"Database failure");return);
// 1.1 : if no session so no need to hibernate (not an error)
// 1.1 : if no session so no need to hibernate (not an error)
if(result->getNumRows()>1)
if(result->getNumRows()>1)
@ -3546,7 +3546,7 @@ endOfWelcomeUserResult:
query<<"SELECT session_id FROM sessions";
query<<"SELECT session_id FROM sessions";
query<<" WHERE owner = "<<charId<<" AND session_type ='st_edit'";
query<<" WHERE owner = "<<charId<<" AND session_type ='st_edit'";
BOMB_IF(!_RingDb.query(query),"on_joinEditSession : Failed to request in database",joinSessionResult(from,charId>>4,TSessionId(0),11,"Database error",TSessionPartStatus::invalid_val);return);
BOMB_IF(!_RingDb.query(query),"on_joinEditSession : Failed to request in database",joinSessionResult(from,charId>>4,TSessionId(0),11,"Database error",TSessionPartStatus::invalid_val);return);