loginplayer.h
来自「天之炼狱1服务器端源文件游戏服务端不完整」· C头文件 代码 · 共 185 行
H
185 行
//////////////////////////////////////////////////////////////////////// // Filename : LoginPlayer.h // Written by : reiot@ewestsoft.com// Description : 霸烙 辑滚侩 敲饭捞绢 努贰胶// //////////////////////////////////////////////////////////////////////#ifndef __LOGIN_PLAYER_H__#define __LOGIN_PLAYER_H__// include files#include "Player.h"#include "Mutex.h"#include "PlayerStatus.h"#include <deque>#include "Timeval.h"#include "PaySystem.h"#include "gameserver/billing/BillingPlayerInfo.h"#include "chinabilling/CBillingPlayerInfo.h"#include "Gpackets/GCReconnectLogin.h"#include "Packet.h"class LCPCList;////////////////////////////////////////////////////////////////////////// class LoginPlayer//// 霸烙 辑滚侩 敲饭捞绢 努贰胶//// Player 努贰胶甫 惑加罐酒辑, 霸烙 辑滚俊辑父 荤侩登绰 Mutex 棺 // Creature 包访 单捞磐 棺 皋筋靛, PreviousPacket 包访 单捞磐 棺// 皋家靛甸阑 眠啊沁促.//// 漂洒 processOutput() 棺 sendPacket()篮 Race Condition 捞 惯积瞪 荐// 乐栏骨肺, Mutex 肺 焊龋登绢具 茄促. ( MODE-IV狼 版快捞哥, MODE-I, II// 狼 版快俊绰 processInput(), processCommand() 葛滴 Mutex 肺 焊龋秦具// 茄促.)////////////////////////////////////////////////////////////////////////class LoginPlayer : public Player, public PaySystem, public BillingPlayerInfo, public CBillingPlayerInfo {public : // 历厘秦初阑 捞傈 菩哦狼 俺荐 static const uint nPacketHistory = 10; static const uint maxFailure = 3;public : // constructor LoginPlayer (Socket * pSocket) throw ( Error ); // destructor ~LoginPlayer () throw ( Error ); // read socket's receive buffer and fill input buffer //virtual void processInput () throw ( IOException , Error ); // parse packet and execute handler for the packet virtual void processCommand ( bool Option = true ) throw ( IOException , Error ); // flush output buffer to socket's send buffer //virtual void processOutput () throw ( IOException , Error ); // send packet to player's output buffer virtual void sendPacket ( Packet * packet ) throw ( ProtocolException , Error ); // disconnect // 沥侥 肺弊酒眶狼 版快 disconnect(LOGOUT) virtual void disconnect ( bool bDisconnected = DISCONNECTED ) throw ( Error ); // get debug string virtual string toString () const throw ( Error ); public : // return recent N-th packet // 弥辟 傈价等 N 锅掳 菩哦阑 府畔茄促. Packet * getOldPacket ( uint prev = 0 ) throw ( OutOfBoundException , NoSuchElementException ); // return recent packet which has packetID // 漂沥 ID甫 啊柳 菩哦 吝 啊厘 弥辟狼 菩哦阑 府畔茄促. Packet * getOldPacket ( PacketID_t packetID ) throw ( NoSuchElementException ); // get/set player's status PlayerStatus getPlayerStatus () const throw () { return m_PlayerStatus; } void setPlayerStatus ( PlayerStatus playerStatus ) throw () { m_PlayerStatus = playerStatus; } // 角菩茄 雀荐 uint getFailureCount () const throw () { return m_FailureCount; } void setFailureCount ( uint nFailed ) throw () { m_FailureCount = nFailed; } // get / set GoreLevel bool isAdult() const throw() { return m_isAdult; } void setAdult(bool isAdult) throw() { m_isAdult = isAdult; }public : int getKickCharacterCount() const throw() { return m_KickCharacterCount; } void setExpireTimeForKickCharacter() throw(); // 泅犁 岿靛狼 ID WorldID_t getWorldID() const throw() { return m_WorldID; } void setWorldID( WorldID_t WorldID ) throw() { m_WorldID = WorldID; } // 泅犁 辑滚狼 ID WorldID_t getGroupID() const throw() { return m_ServerGroupID; } void setGroupID( ServerGroupID_t ServerGroupID ) throw() { m_ServerGroupID = ServerGroupID; } // 泅犁 辑滚狼 ID uint getLastSlot() const throw() { return m_LastSlot; } void setLastSlot( uint lastSlot ) throw() { m_LastSlot = lastSlot; } // WorldID, GroupID啊 汲沥登菌唱? bool isSetWorldGroupID() const throw() { return m_bSetWorldGroupID; } void setWorldGroupID(bool bSet) throw() { m_bSetWorldGroupID = bSet; } // 付瘤阜栏肺 立加茄 某腐磐狼 捞抚 const string& getLastCharacterName() const throw() { return m_LastCharacterName; } void setLastCharacterName( const string& name ) throw() { m_LastCharacterName = name; } const string& getZipcode() const throw() { return m_Zipcode; } void setZipcode( const string& zipcode ) throw() { m_Zipcode = zipcode; } const string& getSSN() const throw() { return m_SSN; } void setSSN( const string& ssn ) throw() { m_SSN = ssn; } bool isFreePass() const { return m_bFreePass; } void setFreePass(bool bFreePass=true) { m_bFreePass = bFreePass; } void makePCList( LCPCList& lcPCList ) throw( DisconnectException );public : void sendLGKickCharacter() throw(); void sendLCLoginOK() throw();public : void setBillingSession() throw (Error) { BillingPlayerInfo::setBillingSession(this); } bool sendBillingLogin() throw (Error);private : // previous packet queue deque<Packet *> m_PacketHistory; // player status PlayerStatus m_PlayerStatus; // expire time Timeval m_ExpireTime; // 某腐磐 殿废(CLRegisterPlayer) 肚绰 肺弊牢(CLLogin)俊 角菩茄 雀荐 uint m_FailureCount; // mutex mutable Mutex m_Mutex; // 泅犁 岿靛 ID bool m_bSetWorldGroupID; WorldID_t m_WorldID; ServerGroupID_t m_ServerGroupID; uint m_LastSlot; string m_LastCharacterName; // LoginPlayerData锭巩俊.. T_T; string m_SSN; string m_Zipcode; bool m_isAdult; // '捞固 立加 吝'牢 版快 某腐磐 碍力 立加 秦力 措扁 矫埃 uint m_KickCharacterCount; Timeval m_ExpireTimeForKickCharacter; // 促弗 镑俊辑 八刘(齿付喉)阑 罐疽促绊 窍绊.. FreePass甫 罐绰促. - -; by sigi. 2002.10.23 bool m_bFreePass;};#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?