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();
|
|
|
|
|
2018-11-16 17:07:22 +01:00
|
|
|
uint32_t toLandSetId( uint16_t territoryTypeId, uint8_t wardId ) const;
|
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 );
|
|
|
|
|
2018-11-16 17:07:22 +01:00
|
|
|
void sendLandSignOwned( Entity::Player& player, uint8_t wardId, uint8_t plotId, uint16_t territoryTypeId );
|
|
|
|
void sendLandSignFree( Entity::Player& player, uint8_t wardId, uint8_t plotId, uint16_t territoryTypeId );
|
2018-11-19 09:40:44 +01:00
|
|
|
LandPurchaseResult purchaseLand( Entity::Player& player, uint8_t plot, uint8_t state );
|
2018-11-13 23:46:10 +01:00
|
|
|
|
2018-11-20 22:52:57 +11:00
|
|
|
void sendWardLandInfo( Entity::Player& player, uint8_t wardId, uint16_t territoryTypeId );
|
|
|
|
|
2018-11-17 01:16:44 +01:00
|
|
|
bool relinquishLand( Entity::Player& player, uint8_t plot );
|
|
|
|
|
2018-11-24 15:17:18 +11:00
|
|
|
void buildPresetEstate( Entity::Player& player, uint8_t plotNum, uint32_t presetItem );
|
|
|
|
|
2018-11-10 19:00:13 +01:00
|
|
|
private:
|
2018-11-19 11:55:29 +01:00
|
|
|
|
2018-11-10 19:00:13 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // SAPPHIRE_HOUSINGMGR_H
|