📄 gcshopbought.cpp
字号:
//////////////////////////////////////////////////////////////////////////////// Filename : GCShopBought.cpp // Written By : 辫己刮// Description : // 惑痢 NPC啊 敲饭捞绢肺何磐 拱扒阑 荤甸看阑 锭, 鞍篮 NPC客// 捞具扁窍绊 乐绰 敲饭捞绢俊霸 拱扒阑 荤甸看促绰 荤角阑// 舅妨林扁 困秦 捞 菩哦阑 焊辰促.// 努扼捞攫飘绰 捞 菩哦阑 罐栏搁 秦寸窍绰 酒捞袍阑 秦寸窍绰 // NPC狼 惑前 格废俊 眠啊秦具 茄促. 惑痢 滚傈档 诀单捞飘~//////////////////////////////////////////////////////////////////////////////#include "GCShopBought.h"#include "Assert.h"//////////////////////////////////////////////////////////////////////////////// constructor//////////////////////////////////////////////////////////////////////////////GCShopBought::GCShopBought() throw (){ __BEGIN_TRY m_ObjectID = 0; m_Version = 0; m_ShopType = 0; m_ShopIndex = 0; m_ItemObjectID = 0; m_ItemClass = 0; m_Durability = 0; m_Silver = 0; m_Grade = 0; m_EnchantLevel = 0; __END_CATCH;}//////////////////////////////////////////////////////////////////////////////// destructor//////////////////////////////////////////////////////////////////////////////GCShopBought::~GCShopBought() throw (){ __BEGIN_TRY __END_CATCH;}//////////////////////////////////////////////////////////////////////////////// 涝仿胶飘覆(滚欺)栏肺何磐 单捞鸥甫 佬绢辑 菩哦阑 檬扁拳茄促.//////////////////////////////////////////////////////////////////////////////void GCShopBought::read ( SocketInputStream & iStream ) throw ( ProtocolException , Error ){ __BEGIN_TRY iStream.read( m_ObjectID ); iStream.read( m_Version ); iStream.read( m_ShopType ); iStream.read( m_ShopIndex ); 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_Silver ); iStream.read( m_Grade ); iStream.read( m_EnchantLevel ); __END_CATCH} //////////////////////////////////////////////////////////////////////////////// 免仿胶飘覆(滚欺)栏肺 菩哦狼 官捞呈府 捞固瘤甫 焊辰促.//////////////////////////////////////////////////////////////////////////////void GCShopBought::write ( SocketOutputStream & oStream ) const throw ( ProtocolException , Error ){ __BEGIN_TRY oStream.write( m_ObjectID ); oStream.write( m_Version ); oStream.write( m_ShopType ); oStream.write( m_ShopIndex ); 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_Silver ); oStream.write( m_Grade ); oStream.write( m_EnchantLevel ); __END_CATCH}//////////////////////////////////////////////////////////////////////////////// execute packet's handler//////////////////////////////////////////////////////////////////////////////void GCShopBought::execute ( Player * pPlayer ) throw ( ProtocolException , Error ){ __BEGIN_TRY GCShopBoughtHandler::execute( this , pPlayer ); __END_CATCH}//////////////////////////////////////////////////////////////////////////////// get packet's debug string//////////////////////////////////////////////////////////////////////////////string GCShopBought::toString () const throw (){ __BEGIN_TRY StringStream msg; msg << "GCShopBought(" << "ObjectID:" << (int)m_ObjectID << "," << "ShopVersion: " << (int)m_Version << "," << "ShopRackType: " << (int)m_ShopType << "," << "ShopRackIndex: " << (int)m_ShopIndex << "," << "ItemObjectID: " << (int)m_ItemObjectID << "," << "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; msg << ")"; return msg.toString(); __END_CATCH}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -