2018-11-10 19:00:13 +01:00
|
|
|
#ifndef SAPPHIRE_HOUSINGMGR_H
|
|
|
|
#define SAPPHIRE_HOUSINGMGR_H
|
|
|
|
|
|
|
|
#include "Forwards.h"
|
|
|
|
#include "HousingZone.h"
|
|
|
|
#include <set>
|
|
|
|
#include <unordered_map>
|
|
|
|
|
|
|
|
namespace Core
|
|
|
|
{
|
|
|
|
namespace Data
|
|
|
|
{
|
|
|
|
using HousingZonePtr = std::shared_ptr< HousingZone >;
|
|
|
|
}
|
|
|
|
|
|
|
|
class HousingMgr
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
HousingMgr();
|
|
|
|
virtual ~HousingMgr();
|
|
|
|
|
|
|
|
bool init();
|
|
|
|
|
|
|
|
uint16_t getNexLandId();
|
|
|
|
void insertHousingZone( Core::Data::HousingZonePtr hZone );
|
|
|
|
Core::Data::HousingZonePtr getHousingZone( uint16_t id );
|
2018-11-11 14:27:39 +01:00
|
|
|
Core::Data::HousingZonePtr getHousingZoneByLandSetId( uint32_t id );
|
2018-11-10 19:00:13 +01:00
|
|
|
Core::LandPtr getLandByOwnerId( uint32_t id );
|
|
|
|
|
|
|
|
private:
|
|
|
|
using HousingZonePtrMap = std::unordered_map< uint16_t, Core::Data::HousingZonePtr >;
|
|
|
|
uint16_t m_lastLandId;
|
|
|
|
HousingZonePtrMap m_housingZonePtrMap;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // SAPPHIRE_HOUSINGMGR_H
|