ggcommand.cpp

来自「dk1游戏的原代码文件,完整.编译系统redhat7.3,mysql 3.23 」· C++ 代码 · 共 95 行

CPP
95
字号
//////////////////////////////////////////////////////////////////////// // Filename    : GGCommand.cpp // Written By  : reiot@ewestsoft.com// Description : // //////////////////////////////////////////////////////////////////////// include files#include "GGCommand.h"//////////////////////////////////////////////////////////////////////// Datagram 按眉肺何磐 单捞鸥甫 佬绢辑 菩哦阑 檬扁拳茄促.//////////////////////////////////////////////////////////////////////void GGCommand::read ( Datagram & iDatagram ) 	 throw ( ProtocolException , Error ){	__BEGIN_TRY	//--------------------------------------------------	// read command	//--------------------------------------------------	BYTE szCommand;	iDatagram.read( szCommand );	if ( szCommand == 0 )		throw InvalidProtocolException("szCommand == 0");	if ( szCommand > 80 )		throw InvalidProtocolException("too long Command length");	iDatagram.read( m_Command , szCommand );	__END_CATCH}		    //////////////////////////////////////////////////////////////////////// Datagram 按眉肺 菩哦狼 官捞呈府 捞固瘤甫 焊辰促.//////////////////////////////////////////////////////////////////////void GGCommand::write ( Datagram & oDatagram ) const      throw ( ProtocolException , Error ){	__BEGIN_TRY	//--------------------------------------------------	// write client IP	//--------------------------------------------------	BYTE szCommand = m_Command.size();	if ( szCommand == 0 )		throw InvalidProtocolException("szCommand == 0");	if ( szCommand > 80 )		throw InvalidProtocolException("too long Command length");	oDatagram.write( szCommand );	oDatagram.write( m_Command );	__END_CATCH}//////////////////////////////////////////////////////////////////////// execute packet's handler//////////////////////////////////////////////////////////////////////void GGCommand::execute ( Player * pPlayer ) 	 throw ( ProtocolException , Error ){	__BEGIN_TRY			GGCommandHandler::execute( this );			__END_CATCH}////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////string GGCommand::toString () const    throw (){	StringStream msg;	msg << "GGCommand("		<< m_Command 		<< ")";	return msg.toString();}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?