gcnpcaskvariable.h

来自「天之炼狱1服务器端源文件游戏服务端不完整」· C头文件 代码 · 共 87 行

H
87
字号
//////////////////////////////////////////////////////////////////////////////// Filename    : GCNPCAskVariable.h // Written By  : excel96// Description : //////////////////////////////////////////////////////////////////////////////#ifndef __GC_NPC_ASK_VARIABLE_H__#define __GC_NPC_ASK_VARIABLE_H__#include <hash_map>#include "Packet.h"#include "PacketFactory.h"#include "ScriptParameter.h"//////////////////////////////////////////////////////////////////////////////// class GCNPCAskVariable;// NPC 狼 措荤甫 林函狼 PC 甸俊霸 傈价茄促.//////////////////////////////////////////////////////////////////////////////typedef hash_map<string,ScriptParameter*>		HashMapScriptParameter;typedef HashMapScriptParameter::iterator		HashMapScriptParameterItor;typedef HashMapScriptParameter::const_iterator	HashMapScriptParameterConstItor;class GCNPCAskVariable : public Packet{public:	GCNPCAskVariable() throw();	virtual ~GCNPCAskVariable() throw();public:	void read(SocketInputStream & iStream) throw(ProtocolException, Error);	void write(SocketOutputStream & oStream) const throw(ProtocolException, Error);	void execute(Player* pPlayer) throw(ProtocolException, Error);	PacketID_t getPacketID() const throw() { return PACKET_GC_NPC_ASK_VARIABLE; }	PacketSize_t getPacketSize() const throw();	string getPacketName() const throw() { return "GCNPCAskVariable"; }	string toString() const throw();public:	ObjectID_t getObjectID(void) const throw() { return m_ObjectID; }	void setObjectID(ObjectID_t creatureID) throw() { m_ObjectID = creatureID; }	ScriptID_t getScriptID(void) const throw() { return m_ScriptID; }	void setScriptID(ScriptID_t id) throw() { m_ScriptID = id; }	void addScriptParameter( ScriptParameter* pParam ) throw(DuplicatedException);	void clearScriptParameters() throw();	HashMapScriptParameter& getScriptParameters() { return m_ScriptParameters; }	string getValue( const string& name ) const throw(NoSuchElementException);private:	ObjectID_t m_ObjectID; // NPC's object id	ScriptID_t m_ScriptID; // script id	HashMapScriptParameter m_ScriptParameters; // 胶农赋飘狼 函荐 颇扼固磐甸};//////////////////////////////////////////////////////////////////////////////// class GCNPCAskVariableFactory;//////////////////////////////////////////////////////////////////////////////class GCNPCAskVariableFactory : public PacketFactory {public:	Packet* createPacket() throw() { return new GCNPCAskVariable(); }	string getPacketName() const throw() { return "GCNPCAskVariable"; }	PacketID_t getPacketID() const throw() { return Packet::PACKET_GC_NPC_ASK_VARIABLE; }	PacketSize_t getPacketMaxSize() const throw()	{		return szObjectID			 + szScriptID			 + szBYTE			 + ScriptParameter::getMaxSize() * 255;	}};//////////////////////////////////////////////////////////////////////////////// class GCNPCAskVariableHandler;//////////////////////////////////////////////////////////////////////////////class GCNPCAskVariableHandler {public:	static void execute(GCNPCAskVariable* pPacket, Player* pPlayer) throw(ProtocolException, Error);};#endif

⌨️ 快捷键说明

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