1
0
forked from metin2/server
server/game/src/DragonLair.h

38 lines
744 B
C
Raw Normal View History

2022-03-05 12:44:06 +02:00
#include <unordered_map>
2022-03-05 12:44:06 +02:00
2022-03-05 19:59:39 +02:00
#include <common/stl.h>
2022-03-05 12:44:06 +02:00
class CDragonLair
{
public:
CDragonLair (DWORD dwGuildID, int BaseMapID, int PrivateMapID);
2022-03-05 12:44:06 +02:00
virtual ~CDragonLair ();
DWORD GetEstimatedTime () const;
void OnDragonDead (LPCHARACTER pDragon);
private:
DWORD StartTime_;
DWORD GuildID_;
int BaseMapIndex_;
int PrivateMapIndex_;
2022-03-05 12:44:06 +02:00
};
class CDragonLairManager : public singleton<CDragonLairManager>
{
public:
CDragonLairManager ();
virtual ~CDragonLairManager ();
bool Start (int MapIndexFrom, int BaseMapIndex, DWORD GuildID);
2022-03-05 12:44:06 +02:00
void OnDragonDead (LPCHARACTER pDragon, DWORD KillerGuildID);
size_t GetLairCount () const { return LairMap_.size(); }
private:
std::unordered_map<DWORD, CDragonLair*> LairMap_;
2022-03-05 12:44:06 +02:00
};