00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _TMWSERV_SPAWNAREA
00023 #define _TMWSERV_SPAWNAREA
00024
00025 #include "point.h"
00026 #include "game-server/eventlistener.hpp"
00027 #include "game-server/thing.hpp"
00028
00029 class Being;
00030 class MonsterClass;
00031
00036 class SpawnArea : public Thing
00037 {
00038 public:
00039 SpawnArea(MapComposite *, MonsterClass *, const Rectangle &zone,
00040 int maxBeings, int spawnRate);
00041
00042 void update();
00043
00047 void decrease(Thing *);
00048
00049 private:
00050 MonsterClass *mSpecy;
00051 EventListener mSpawnedListener;
00052 Rectangle mZone;
00053 int mMaxBeings;
00054 int mSpawnRate;
00055 int mNumBeings;
00056 int mNextSpawn;
00058 friend struct SpawnAreaEventDispatch;
00059 };
00060
00061 #endif