⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gcminigamescores.cpp

📁 天之炼狱1服务器端源文件游戏服务端不完整
💻 CPP
字号:
//////////////////////////////////////////////////////////////////////// // Filename    : GCMiniGameScores.cpp // Written By  : elca@ewestsoft.com// Description : 磊脚俊霸 静绰 扁贱狼 己傍阑 舅府扁 困茄 菩哦 努贰胶狼//               糕滚 沥狼.// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// include files//////////////////////////////////////////////////////////////////////#include "GCMiniGameScores.h"//////////////////////////////////////////////////////////////////////// constructor//////////////////////////////////////////////////////////////////////GCMiniGameScores::GCMiniGameScores ()      throw (){	__BEGIN_TRY	__END_CATCH}	//////////////////////////////////////////////////////////////////////// destructor//////////////////////////////////////////////////////////////////////GCMiniGameScores::~GCMiniGameScores ()     throw (){	__BEGIN_TRY	__END_CATCH}//////////////////////////////////////////////////////////////////////// 涝仿胶飘覆(滚欺)栏肺何磐 单捞鸥甫 佬绢辑 菩哦阑 檬扁拳茄促.//////////////////////////////////////////////////////////////////////void GCMiniGameScores::read ( SocketInputStream & iStream ) 	 throw ( ProtocolException , Error ){	__BEGIN_TRY	iStream.read(m_GameType);	iStream.read(m_Level);	BYTE count;	iStream.read(count);	for ( BYTE i=0; i<count; ++i )	{		BYTE len;		iStream.read(len);		string name;		iStream.read(name, len);		WORD score;		iStream.read(score);		addScore(name,score);	}			__END_CATCH}		    //////////////////////////////////////////////////////////////////////// 免仿胶飘覆(滚欺)栏肺 菩哦狼 官捞呈府 捞固瘤甫 焊辰促.//////////////////////////////////////////////////////////////////////void GCMiniGameScores::write ( SocketOutputStream & oStream )      const throw ( ProtocolException , Error ){	__BEGIN_TRY	oStream.write(m_GameType);	oStream.write(m_Level);	BYTE count = m_Scores.size();	if ( count > 10 ) count = 10;	oStream.write( count );	list<pair<string,WORD> >::const_iterator itr = m_Scores.begin();	for ( uint i=0; i<count; ++i )	{		oStream.write( (BYTE)(*itr).first.size() );		oStream.write( (*itr).first );		oStream.write( (*itr).second );		itr++;	}			__END_CATCH}PacketSize_t GCMiniGameScores::getPacketSize() const throw(){	PacketSize_t ret = szBYTE + szBYTE + szBYTE;	BYTE count = m_Scores.size();	if ( count > 10 ) count = 10;	list<pair<string,WORD> >::const_iterator itr = m_Scores.begin();	for ( uint i=0; i<count; ++i )	{		ret += szBYTE + (*itr).first.size() + szWORD;	}	return ret;}////////////////////////////////////////////////////////////////////////// execute packet's handler////////////////////////////////////////////////////////////////////////void GCMiniGameScores::execute ( Player * pPlayer ) 	 throw ( ProtocolException , Error ){	__BEGIN_TRY			GCMiniGameScoresHandler::execute( this , pPlayer );			__END_CATCH}////////////////////////////////////////////////////////////////////////// get packet's debug string////////////////////////////////////////////////////////////////////////string GCMiniGameScores::toString () 	const throw (){	__BEGIN_TRY	StringStream msg;	msg << "GCMiniGameScores("		<< ")";	return msg.toString();	__END_CATCH}

⌨️ 快捷键说明

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