lgkickcharacter.h
来自「天之炼狱1服务器端源文件游戏服务端不完整」· C头文件 代码 · 共 123 行
H
123 行
//----------------------------------------------------------------------// // Filename : LGKickCharacter.h // Written By : Reiot// Description : // //----------------------------------------------------------------------#ifndef __LG_KICK_CHARACTER_H__#define __LG_KICK_CHARACTER_H__// include files#include "DatagramPacket.h"#include "PacketFactory.h"//----------------------------------------------------------------------//// class LGKickCharacter;//// '捞固 立加吝' 巩力 秦搬阑 困秦辑// 捞固 立加吝牢 某腐磐甫 力芭窍妨绊 窍绰 菩哦捞促.//// 捞 packet狼 搬苞绰 LGKickVerify捞促.////----------------------------------------------------------------------class LGKickCharacter : public DatagramPacket {public: // Datagram 按眉俊辑何磐 单捞鸥甫 佬绢辑 菩哦阑 檬扁拳茄促. void read(Datagram & iDatagram) throw(ProtocolException, Error); // Datagram 按眉肺 菩哦狼 官捞呈府 捞固瘤甫 焊辰促. void write(Datagram & oDatagram) const throw(ProtocolException, Error); // execute packet's handler void execute(Player* pPlayer) throw(ProtocolException, Error); // get packet id PacketID_t getPacketID() const throw() { return PACKET_LG_KICK_CHARACTER; } // get packet's body size PacketSize_t getPacketSize() const throw() { return szBYTE + m_PCName.size() // PC name + szuint; } // get packet name string getPacketName() const throw() { return "LGKickCharacter"; } // get packet's debug string string toString() const throw();public: // get/set pcName string getPCName() const throw() { return m_PCName; } void setPCName(const string& pcName) throw() { m_PCName = pcName; } uint getID() const throw() { return m_ID; } void setID(uint id) throw() { m_ID = id; }private : // PC name string m_PCName; uint m_ID; };////////////////////////////////////////////////////////////////////////// class LGKickCharacterFactory;//// Factory for LGKickCharacter////////////////////////////////////////////////////////////////////////class LGKickCharacterFactory : public PacketFactory {public: // create packet Packet* createPacket() throw() { return new LGKickCharacter(); } // get packet name string getPacketName() const throw() { return "LGKickCharacter"; } // get packet id PacketID_t getPacketID() const throw() { return Packet::PACKET_LG_KICK_CHARACTER; } // get packet's max body size // *OPTIMIZATION HINT* // const static LGKickCharacterPacketMaxSize 甫 沥狼, 府畔窍扼. PacketSize_t getPacketMaxSize() const throw() { return szBYTE + 20 // PC name + szuint; }};////////////////////////////////////////////////////////////////////////// class LGKickCharacterHandler;////////////////////////////////////////////////////////////////////////class LGKickCharacterHandler { public: // execute packet's handler static void execute(LGKickCharacter* pPacket) throw(ProtocolException, Error);};#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?