cllogin.h
来自「天之炼狱1服务器端源文件游戏服务端不完整」· C头文件 代码 · 共 147 行
H
147 行
//--------------------------------------------------------------------------------// // Filename : CLLogin.h // Written By : reiot@ewestsoft.com// Description : // //--------------------------------------------------------------------------------#ifndef __CL_LOGIN_H__#define __CL_LOGIN_H__// include files#include "Packet.h"#include "PacketFactory.h"//--------------------------------------------------------------------------------//// class CLLogin;//// 努扼捞攫飘啊 肺弊牢 辑滚俊霸 弥檬俊 傈价窍绰 菩哦捞促.// 酒捞叼客 菩胶况靛啊 鞠龋拳登绢 乐促.////--------------------------------------------------------------------------------// 弥措 MAC ADDRESS 辨捞#define MAX_LENGTH_MAC 6 class CLLogin : public Packet {public: // 涝仿胶飘覆(滚欺)栏肺何磐 单捞鸥甫 佬绢辑 菩哦阑 檬扁拳茄促. void read(SocketInputStream & iStream) throw(ProtocolException, Error); // 免仿胶飘覆(滚欺)栏肺 菩哦狼 官捞呈府 捞固瘤甫 焊辰促. void write(SocketOutputStream & oStream) 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_CL_LOGIN; } // get packet's body size PacketSize_t getPacketSize() const throw(); // get packet name string getPacketName() const throw() { return "CLLogin"; } // get packet's debug string string toString() const throw();public: // get/set player's id string getID() const throw() { return m_ID; } void setID(string id) throw() { m_ID = id; } // get/set player's password string getPassword() const throw() { return m_Password; } void setPassword(string password) throw() { m_Password = password; } string getCpsso() const throw() { return m_Cpsso; } void setCpsso(string cpsso) throw() { m_Cpsso = cpsso; } // get/set Cpsso imformation bool isNetmarble() const throw() { return m_bNetmarble; } void setNetmarble(bool netmarble) throw() { m_bNetmarble = netmarble; } bool isAdult() const throw() { return m_bAdult; } void setAdult(bool adult) throw() { m_bAdult = adult; } // add - inthesky bool checkMacAddress(string currentMac) const throw(); string getMacAddress() const throw() { return m_strMacAddress; } const BYTE* getRareMacAddress() const { return m_cMacAddress; }private : // 敲饭捞绢 酒捞叼 string m_ID; // 敲饭捞绢 菩胶况靛 string m_Password; // 齿付喉俊辑 焊郴绰 捞惑茄 String string m_Cpsso; // 焊郴绊 罐绰 扒 酒聪瘤父 沥焊甫 啊瘤绊 乐阑 鞘夸啊 乐绢辑 糕滚 函荐 眠啊 // Size 拌魂篮 窍瘤 臼绰促. (齿付喉狼 Cpsso 规侥狼 牢刘 沥焊俊 甸绢 乐绰 郴侩 焊包) bool m_bNetmarble; bool m_bAdult; BYTE m_cMacAddress[6]; string m_strMacAddress;};//--------------------------------------------------------------------------------//// class CLLoginFactory;//// Factory for CLLogin////--------------------------------------------------------------------------------class CLLoginFactory : public PacketFactory {public: // create packet Packet* createPacket() throw() { return new CLLogin(); } // get packet name string getPacketName() const throw() { return "CLLogin"; } // get packet id PacketID_t getPacketID() const throw() { return Packet::PACKET_CL_LOGIN; } // get packet's max body size PacketSize_t getPacketMaxSize() const throw() { return szint + 2048 + szBYTE + 30 + 6; }};//--------------------------------------------------------------------------------//// class CLLoginHandler;////--------------------------------------------------------------------------------class CLLoginHandler {public: // execute packet's handler static void execute(CLLogin* pPacket, Player* pPlayer) throw(ProtocolException, Error);private : static bool checkFreePass(CLLogin* pPacket, Player* pPlayer) throw (ProtocolException, Error); static bool checkNetMarbleClient (CLLogin* pPacket , Player* pPlayer) throw (ProtocolException , Error);};#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?