00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00023 #if !defined(AFX_CMONSTERSERVER_H__84170BF9_CB4B_4559_B900_790678A46F28__INCLUDED_)
00024 #define AFX_CMONSTERSERVER_H__84170BF9_CB4B_4559_B900_790678A46F28__INCLUDED_
00025
00026 #if _MSC_VER > 1000
00027 #pragma once
00028 #endif // _MSC_VER > 1000
00029
00030 #include <algorithm>
00031 #include "math.h"
00032 #include "Shared.h"
00033 #include "Object.h"
00034
00035 class cMonsterServer
00036 {
00037 friend class cMasterServer;
00038
00039 public:
00040 static void Initialize( )
00041 {
00042 UpdateConsole(" Starting Monster Server ... " );
00043
00044 time(&NextActionTime + ACTION_DELAY);
00045
00046 UpdateConsole("success.\r\n\r\n");
00047 }
00048
00049 static void Halt( )
00050 {
00051 UpdateConsole(" Monster Server: shutting down ...\r\n");
00052 }
00053
00054 static void ProcessAction ( DWORD dwMonGUID, DWORD dwEvent, DWORD dwEngaged, DWORD dwTarget = 0x0L );
00055 static void ProcessPetAction ( DWORD dwMonGUID, DWORD dwEvent, DWORD dwEngaged, DWORD dwTarget = 0x0L, DWORD dwOwner = 0x0L );
00056 static void ActionCheck ( );
00057 static bool AddMonster ( DWORD dwGUID );
00058 static bool RemoveMonster ( DWORD dwGUID );
00059 static void Underattack ( DWORD dwGUID );
00060
00061
00062 static sMonsters Monster[MAX_MONSTERS];
00063 static time_t longtime;
00064 static time_t NextActionTime;
00065
00066 protected:
00067 static DWORD m_dwStatus;
00068
00069 };
00070
00071 #endif // !defined(AFX_CMONSTERSERVER_H__84170BF9_CB4B_4559_B900_790678A46F28__INCLUDED_)