creaturemanager.h
来自「天之炼狱1服务器端源文件游戏服务端不完整」· C头文件 代码 · 共 52 行
H
52 行
//////////////////////////////////////////////////////////////////////////////// Filename : CreatureManager.h // Written By : Reiot// Description ://////////////////////////////////////////////////////////////////////////////#ifndef __CREATURE_MANANGER_H__#define __CREATURE_MANANGER_H__#include "Creature.h"#include "Mutex.h"#include <hash_map>class Packet;//////////////////////////////////////////////////////////////////////////////// class CreatureManager//////////////////////////////////////////////////////////////////////////////class CreatureManager {public: CreatureManager() throw(); virtual ~CreatureManager() throw(); public: virtual void addCreature(Creature* pCreature) throw(DuplicatedException, Error); virtual void deleteCreature(ObjectID_t objectID) throw();//NoSuchElementException, Error); Creature* getCreature(ObjectID_t objectID) const throw();//NoSuchElementException, Error); Creature* getCreature(const string& Name) const throw();//NoSuchElementException, Error); virtual void processCreatures() throw(Error); virtual void killCreature(Creature* pDeadCreature) throw(Error); void broadcastPacket(Packet* pPacket, Creature* owner) throw(Error); void broadcastDarkLightPacket(Packet* pPacket1, Packet* pPacket2, Creature* owner) throw(Error); void broadcastLevelWarBonusPacket(Packet* pPacket, Creature* owner) throw(Error); WORD getSize() const throw() { return m_Creatures.size(); } hash_map< ObjectID_t, Creature* > & getCreatures() throw() { return m_Creatures; } const hash_map< ObjectID_t, Creature* > & getCreatures() const throw() { return m_Creatures; } string toString() const throw();protected: hash_map< ObjectID_t, Creature* > m_Creatures; mutable Mutex m_Mutex;};#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?