cgsay.h

来自「dk1游戏的原代码文件,完整.编译系统redhat7.3,mysql 3.23 」· C头文件 代码 · 共 221 行

H
221
字号
//////////////////////////////////////////////////////////////////////// // Filename    : CGSay.h // Written By  : reiot@ewestsoft.com// Description : // //////////////////////////////////////////////////////////////////////#ifndef __CG_SAY_H__#define __CG_SAY_H__// include files//#ifdef __GAME_SERVER__//#include "GamePlayer.h"//#endif#include "Packet.h"#include "PacketFactory.h"////////////////////////////////////////////////////////////////////////// class CGSay;//// 努扼捞攫飘啊 辑滚俊霸 焊郴绰 Say 菩哦捞促.// 郴何俊 Say String 父阑 单捞鸥 鞘靛肺 啊柳促.////////////////////////////////////////////////////////////////////////class Player;class Creature;class GamePlayer;class CGSay : 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_CG_SAY; }		// get packet's body size	PacketSize_t getPacketSize() const throw() { return szuint + szBYTE + m_Message.size(); }	// get packet name	string getPacketName() const throw() { return "CGSay"; }		// get packet's debug string	string toString() const throw();	// get/set text color	uint getColor() const throw() { return m_Color; }	void setColor( uint color ) throw() { m_Color = color; }	// get/set chatting message	const string& getMessage() const throw() { return m_Message; }	void setMessage(const string & msg) throw() { m_Message = msg; }	private :		// text color	uint m_Color;	// chatting message	string m_Message;	};////////////////////////////////////////////////////////////////////////// class CGSayFactory;//// Factory for CGSay////////////////////////////////////////////////////////////////////////class CGSayFactory : public PacketFactory {public:		// create packet	Packet* createPacket() throw() { return new CGSay(); }	// get packet name	string getPacketName() const throw() { return "CGSay"; }		// get packet id	PacketID_t getPacketID() const throw() { return Packet::PACKET_CG_SAY; }	// get packet's max body size	// message 狼 弥措 农扁俊 措茄 汲沥捞 鞘夸窍促.	PacketSize_t getPacketMaxSize() const throw() { return szuint + szBYTE + 128; }};////////////////////////////////////////////////////////////////////////// class CGSayHandler;////////////////////////////////////////////////////////////////////////class CGSayHandler {public:	// execute packet's handler	static void execute(CGSay* pPacket, Player* pPlayer) throw(ProtocolException, Error);#ifdef __GAME_SERVER__	static void opExecute( Creature* pCreature, GamePlayer* pPlayer, string msg, int i ) throw(ProtocolException, Error);	// for guild test	static void opzone( string msg, int i ) throw( ProtocolException, Error );	static void opguild( string msg, int i, Creature* pCreature ) throw(ProtocolException, Error);	// 傈里 矫胶袍 包访 	static void opcombat( GamePlayer* pPlayer, string msg, int i ) throw(ProtocolException, Error);	// set 捞亥飘 酒捞袍 犬伏	static void opset( GamePlayer* pPlayer, string msg, int i ) throw(ProtocolException, Error);	static void opview( GamePlayer* pPlayer, string msg, int i ) throw(ProtocolException, Error);	// save	static void opsave(GamePlayer* pPlayer, string msg, int i) throw(ProtocolException, Error);	// wall	static void opwall(GamePlayer* pPlayer, string msg, int i) throw(ProtocolException, Error);	// Shutdown	static void opshutdown(GamePlayer* pPlayer, string msg, int i) throw(ProtocolException, Error);	// kick	static void opkick(GamePlayer* pPlayer, string msg, int i) throw(ProtocolException, Error);	// mute	static void opmute(GamePlayer* pPlayer, string msg, int i) throw(ProtocolException, Error);	// freezing	static void opfreezing(GamePlayer* pPlayer, string msg, int i) throw(ProtocolException, Error);	// deny	static void opdeny(GamePlayer* pPlayer, string msg, int i) throw(ProtocolException, Error);	// info	static void opinfo(GamePlayer* pPlayer, string msg, int i) throw(ProtocolException, Error);	// trace	static void optrace(GamePlayer* pPlayer, string msg, int i) throw(ProtocolException, Error);	// warp	static void opwarp(GamePlayer* pPlayer, string msg, int i) throw(ProtocolException, Error);	// create	static void opcreate(GamePlayer* pPlayer, string msg, int i) throw(ProtocolException, Error);	// grant	static void opgrant(GamePlayer* pPlayer, string msg, int i) throw(ProtocolException, Error);	// recall	static void oprecall(GamePlayer* pPlayer, string msg, int i) throw(ProtocolException, Error);	// mrecall	static void opmrecall(GamePlayer* pPlayer, string msg, int i) throw(ProtocolException, Error);	// user	static void opuser(GamePlayer* pPlayer, string msg, int i) throw(ProtocolException, Error);	// summon	static void opsummon(GamePlayer* pPlayer, string msg, int i) throw(ProtocolException, Error);	// notice 	static void opnotice(GamePlayer* pPlayer, string msg, int i) throw(ProtocolException, Error);	// pay 	static void oppay(GamePlayer* pPlayer, string msg, int i) throw(ProtocolException, Error);	// world 	static void opworld(GamePlayer* pPlayer, string msg, int i, bool bSameWorldOnly) throw(ProtocolException, Error);	// command 	static void opcommand(GamePlayer* pPlayer, string msg, int i) throw(ProtocolException, Error);	// find	static void opfind(GamePlayer* pPlayer, string msg, int i) throw(ProtocolException, Error);	// refresh info	static void opload(GamePlayer* pPlayer, string msg, int i) throw(ProtocolException, Error);	// 烙矫	static void opsoulchain(GamePlayer* pPlayer, string msg, int i) throw(ProtocolException, Error);	// credit	static void opcredit(GamePlayer* pPlayer, string msg, int i) throw(ProtocolException, Error);	// fun	static void opfun(GamePlayer* pPlayer, string msg, int i) throw(ProtocolException, Error);	// log	static void oplog(GamePlayer* pPlayer, string msg, int i) throw(ProtocolException, Error);		// denychat	static void opdenychat(GamePlayer* pPlayer, string msg, int i) throw(ProtocolException, Error);#endif};#endif

⌨️ 快捷键说明

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