SHOW:
|
|
- or go back to the newest paste.
| 1 | #include "MonsterClass.h" ///monster class CMonster | |
| 2 | ||
| 3 | #ifndef MOB_MANAGER_H | |
| 4 | #define MOB_MANAGER_H | |
| 5 | static RwUInt32 m_uiMobId = 300; | |
| 6 | ||
| 7 | ||
| 8 | class CMobManager : public CNtlRunObject | |
| 9 | {
| |
| 10 | ||
| 11 | public: | |
| 12 | CMobManager(); | |
| 13 | ~CMobManager(); | |
| 14 | ||
| 15 | public: | |
| 16 | void Init(); | |
| 17 | void Release(); | |
| 18 | ||
| 19 | void CreateMobThread(); | |
| 20 | void Run(); | |
| 21 | ||
| 22 | void CreateMonsterList(); | |
| 23 | void CreateNpcList(); | |
| 24 | void SpawnNpcAtLogin(CNtlPacket * pPacket, CClientSession * pSession); | |
| 25 | void SpawnMonsterAtLogin(CNtlPacket * pPacket, CClientSession * pSession); | |
| 26 | ||
| 27 | RwUInt32 CreateUniqueId(void); | |
| 28 | bool RunSpawnCheck(CNtlPacket * pPacket, sVECTOR3 curPos, CClientSession * pSession); | |
| 29 | bool CreatureRangeCheck(sVECTOR3 mycurPos, CNtlVector othercurPos); | |
| 30 | float Distance(const sVECTOR3 mycurPos, const CNtlVector othercurPos); | |
| 31 | ||
| 32 | ||
| 33 | ||
| 34 | ||
| 35 | private: | |
| 36 | bool m_bRun; | |
| 37 | CNtlThread * pThread; | |
| 38 | ||
| 39 | ||
| 40 | ||
| 41 | std::map<DWORD, CMonster::MonsterData*> m_map_Monster; | |
| 42 | typedef std::map<DWORD, CMonster::MonsterData*>::const_iterator IterType; | |
| 43 | IterType i; | |
| 44 | ||
| 45 | std::map<DWORD, CMonster::MonsterData*> m_map_Npc; | |
| 46 | }; | |
| 47 | extern CMobManager * g_pMobManager; | |
| 48 | ||
| 49 | #endif //MOB_MANAGER_H |