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

📄 gcshopbuyok.cpp

📁 天之炼狱1服务器端源文件游戏服务端不完整
💻 CPP
字号:
//////////////////////////////////////////////////////////////////////////////// Filename    : GCShopBuyOK.cpp // Written By  : 辫己刮// Description : // 敲饭捞绢啊 惑痢 NPC俊霸 拱扒 备涝阑 夸没沁阑 锭, 力措肺 // 牢刘捞 登搁 捞 菩哦捞 敲饭捞绢俊霸 朝酒埃促.//////////////////////////////////////////////////////////////////////////////#include "GCShopBuyOK.h"#include "Assert.h"//////////////////////////////////////////////////////////////////////////////// constructor//////////////////////////////////////////////////////////////////////////////GCShopBuyOK::GCShopBuyOK() 	throw (){	__BEGIN_TRY 	m_ObjectID     = 0;	m_Version      = 0;	m_ItemObjectID = 0;	m_ItemClass    = 0;	m_ItemType     = 0;	m_Durability   = 0;	m_ItemNum      = 0;	m_Silver       = 0;	m_Grade       = 0;	m_EnchantLevel = 0;	m_Price        = 0;		__END_CATCH;}//////////////////////////////////////////////////////////////////////////////// destructor//////////////////////////////////////////////////////////////////////////////GCShopBuyOK::~GCShopBuyOK() 	throw (){	__BEGIN_TRY 	__END_CATCH;}//////////////////////////////////////////////////////////////////////////////// 涝仿胶飘覆(滚欺)栏肺何磐 单捞鸥甫 佬绢辑 菩哦阑 檬扁拳茄促.//////////////////////////////////////////////////////////////////////////////void GCShopBuyOK::read ( SocketInputStream & iStream ) 	 throw ( ProtocolException , Error ){	__BEGIN_TRY			iStream.read(m_ObjectID);	iStream.read(m_Version);	iStream.read(m_ItemObjectID);	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_ItemNum);	iStream.read(m_Silver);	iStream.read(m_Grade);	iStream.read(m_EnchantLevel);	iStream.read(m_Price);	__END_CATCH}		    //////////////////////////////////////////////////////////////////////////////// 免仿胶飘覆(滚欺)栏肺 菩哦狼 官捞呈府 捞固瘤甫 焊辰促.//////////////////////////////////////////////////////////////////////////////void GCShopBuyOK::write ( SocketOutputStream & oStream ) const      throw ( ProtocolException , Error ){	__BEGIN_TRY	oStream.write(m_ObjectID);	oStream.write(m_Version);	oStream.write(m_ItemObjectID);	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_ItemNum);	oStream.write(m_Silver);	oStream.write(m_Grade);	oStream.write(m_EnchantLevel);	oStream.write(m_Price);		__END_CATCH}//////////////////////////////////////////////////////////////////////////////// execute packet's handler//////////////////////////////////////////////////////////////////////////////void GCShopBuyOK::execute ( Player * pPlayer ) 	 throw ( ProtocolException , Error ){	__BEGIN_TRY			GCShopBuyOKHandler::execute( this , pPlayer );	__END_CATCH}//////////////////////////////////////////////////////////////////////////////// get packet's debug string//////////////////////////////////////////////////////////////////////////////string GCShopBuyOK::toString () const       throw (){	__BEGIN_TRY			StringStream msg;	msg << "GCShopBuyOK("		<< "ObjectID:"     << (int)m_ObjectID << ","	    << "Version:"      << (int)m_Version << ","		<< "ItemObejctID:" << (int)m_ItemObjectID << ","		<< "ItemClass:"    << (int)m_ItemClass << ","		<< "ItemType:"     << (int)m_ItemType << ","		<< "OptionTypeSize:"   << (int)m_OptionType.size() << ","		<< "Durability:"   << (int)m_Durability << ","		<< "ItemNum:"      << (int)m_ItemNum << ","		<< "Silver:"       << (int)m_Silver << ","		<< "Grade:"       << (int)m_Grade << ","		<< "EnchantLEvel:" << (int)m_EnchantLevel << ","		<< "Price:"        << (int)m_Price		<< ")";	return msg.toString();			__END_CATCH}

⌨️ 快捷键说明

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