lcqueryresultcharactername.cpp
来自「dk1游戏的原代码文件,完整.编译系统redhat7.3,mysql 3.23 」· C++ 代码 · 共 109 行
CPP
109 行
//--------------------------------------------------------------------------------// // Filename : LCQueryResultCharacterName.cpp // Written By : Reiot// Description : // //--------------------------------------------------------------------------------// include files#include "LCQueryResultCharacterName.h"//--------------------------------------------------------------------------------// 涝仿胶飘覆(滚欺)栏肺何磐 单捞鸥甫 佬绢辑 菩哦阑 檬扁拳茄促.//--------------------------------------------------------------------------------void LCQueryResultCharacterName::read ( SocketInputStream & iStream ) throw ( ProtocolException , Error ){ __BEGIN_TRY //-------------------------------------------------- // read player id //-------------------------------------------------- BYTE szCharacterName; iStream.read( szCharacterName ); if ( szCharacterName == 0 ) throw InvalidProtocolException("szCharacterName == 0"); if ( szCharacterName > 20 ) throw InvalidProtocolException("too large CharacterName length"); iStream.read( m_CharacterName , szCharacterName ); //-------------------------------------------------- // read id existence //-------------------------------------------------- iStream.read( m_bExist ); __END_CATCH} //--------------------------------------------------------------------------------// 免仿胶飘覆(滚欺)栏肺 菩哦狼 官捞呈府 捞固瘤甫 焊辰促.//--------------------------------------------------------------------------------void LCQueryResultCharacterName::write ( SocketOutputStream & oStream ) const throw ( ProtocolException , Error ){ __BEGIN_TRY //-------------------------------------------------- // write player id //-------------------------------------------------- BYTE szCharacterName = m_CharacterName.size(); if ( szCharacterName == 0 ) throw InvalidProtocolException("empty CharacterName"); if ( szCharacterName > 20 ) throw InvalidProtocolException("too large CharacterName length"); oStream.write( szCharacterName ); oStream.write( m_CharacterName ); //-------------------------------------------------- // write id existence //-------------------------------------------------- oStream.write( m_bExist ); __END_CATCH}//--------------------------------------------------------------------------------// execute packet's handler//--------------------------------------------------------------------------------void LCQueryResultCharacterName::execute ( Player * pPlayer ) throw ( ProtocolException , Error ){ __BEGIN_TRY LCQueryResultCharacterNameHandler::execute ( this , pPlayer ); __END_CATCH}//--------------------------------------------------------------------------------// get debug string//--------------------------------------------------------------------------------string LCQueryResultCharacterName::toString () const throw (){ __BEGIN_TRY StringStream msg; msg << "LCQueryResultCharacterName(" << "CharacterName:" << m_CharacterName << ",Exist:" << m_bExist << ")"; return msg.toString(); __END_CATCH}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?