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

📄 gccreateitem.cpp

📁 天之炼狱1服务器端源文件游戏服务端不完整
💻 CPP
字号:
//////////////////////////////////////////////////////////////////////////////// Filename    : GCCreateItem.cpp// Written By  : elca// Description ://////////////////////////////////////////////////////////////////////////////#include "GCCreateItem.h"////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////GCCreateItem::GCCreateItem()	throw(){	__BEGIN_TRY	m_ObjectID     = 0;	m_ItemClass    = 0;	m_ItemType     = 0;	m_Durability   = 0;	m_Silver       = 0;	m_Grade       = 0;	m_EnchantLevel = 0;	m_ItemNum      = 0;	m_InvenX       = 0;	m_InvenY       = 0;	__END_CATCH}//////////////////////////////////////////////////////////////////////////////// 涝仿胶飘覆(滚欺)栏肺何磐 单捞鸥甫 佬绢辑 菩哦阑 檬扁拳茄促.//////////////////////////////////////////////////////////////////////////////void GCCreateItem::read ( SocketInputStream & iStream ) 	 throw ( ProtocolException , Error ){	__BEGIN_TRY	iStream.read( m_ObjectID );	iStream.read( m_ItemClass );	iStream.read( m_ItemType );	BYTE optionSize;	iStream.read( optionSize );	for (int i=0; i<optionSize; i++)	{		OptionType_t optionType;		iStream.read( optionType );		addOptionType( optionType );	}	iStream.read( m_Durability );	iStream.read( m_Silver );	iStream.read( m_Grade );	iStream.read( m_EnchantLevel );	iStream.read( m_ItemNum );	iStream.read( m_InvenX );	iStream.read( m_InvenY );			__END_CATCH}		    //////////////////////////////////////////////////////////////////////////////// 免仿胶飘覆(滚欺)栏肺 菩哦狼 官捞呈府 捞固瘤甫 焊辰促.//////////////////////////////////////////////////////////////////////////////void GCCreateItem::write ( SocketOutputStream & oStream ) const      throw ( ProtocolException , Error ){	__BEGIN_TRY	oStream.write( m_ObjectID );	oStream.write( m_ItemClass );	oStream.write( m_ItemType );		BYTE optionSize = m_OptionType.size();	oStream.write( optionSize );	list<OptionType_t>::const_iterator itr = m_OptionType.begin();	for (; itr!=m_OptionType.end(); itr++)	{		OptionType_t optionType = *itr;		oStream.write( optionType );	}	oStream.write( m_Durability );	oStream.write( m_Silver );	oStream.write( m_Grade );	oStream.write( m_EnchantLevel );	oStream.write( m_ItemNum );	oStream.write( m_InvenX );	oStream.write( m_InvenY );			__END_CATCH}//////////////////////////////////////////////////////////////////////////////// execute packet's handler//////////////////////////////////////////////////////////////////////////////void GCCreateItem::execute ( Player * pPlayer ) 	 throw ( ProtocolException , Error ){	__BEGIN_TRY			GCCreateItemHandler::execute( this , pPlayer );			__END_CATCH}//////////////////////////////////////////////////////////////////////////////// get packet's debug string//////////////////////////////////////////////////////////////////////////////string GCCreateItem::toString () const       throw (){	__BEGIN_TRY	StringStream msg;	msg << "GCCreateItem("		<< "ObjectID:"      << (int)m_ObjectID		<< ",ItemClass:"    << (int)m_ItemClass		<< ",ItemType:"     << (int)m_ItemType		<< ",OptionTypeSize:"   << (int)m_OptionType.size()		<< ",Durability:"   << (int)m_Durability		<< ",Silver:"       << (int)m_Silver		<< ",Grade:"       << (int)m_Grade		<< ",EnchantLEvel:" << (int)m_EnchantLevel		<< ",ItemNum:"      << (int)m_ItemNum		<< ",InvenX:"       << (int)m_InvenX		<< ",InvenY:"       << (int)m_InvenY		<< ")";	return msg.toString();	__END_CATCH}

⌨️ 快捷键说明

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