2018-07-15 23:59:15 +02:00
|
|
|
#ifndef SAPPHIRE_HOUSINGZONE_H
|
|
|
|
#define SAPPHIRE_HOUSINGZONE_H
|
|
|
|
|
|
|
|
#include "Zone.h"
|
|
|
|
#include "Forwards.h"
|
|
|
|
|
2018-11-01 00:18:19 +01:00
|
|
|
namespace Core
|
2018-07-15 23:59:15 +02:00
|
|
|
{
|
2018-11-01 00:18:19 +01:00
|
|
|
class HousingZone : public Zone
|
|
|
|
{
|
|
|
|
public:
|
2018-11-01 23:56:43 +01:00
|
|
|
HousingZone( uint8_t landSetId,
|
2018-11-01 00:18:19 +01:00
|
|
|
uint16_t territoryId,
|
|
|
|
uint32_t guId,
|
|
|
|
const std::string& internalName,
|
|
|
|
const std::string& contentName );
|
2018-08-29 21:40:59 +02:00
|
|
|
|
2018-11-01 00:18:19 +01:00
|
|
|
virtual ~HousingZone();
|
2018-08-29 21:40:59 +02:00
|
|
|
|
2018-11-01 00:18:19 +01:00
|
|
|
bool init() override;
|
2018-08-29 21:40:59 +02:00
|
|
|
|
2018-11-01 00:18:19 +01:00
|
|
|
void onPlayerZoneIn( Entity::Player& player ) override;
|
|
|
|
void onUpdate( uint32_t currTime ) override;
|
2018-08-29 21:40:59 +02:00
|
|
|
|
2018-11-04 23:47:10 +01:00
|
|
|
void sendLandSet( Entity::Player& player );
|
2018-11-01 00:18:19 +01:00
|
|
|
bool isPlayerSubInstance( Entity::Player& player );
|
2018-08-29 21:40:59 +02:00
|
|
|
|
2018-11-01 00:18:19 +01:00
|
|
|
/* returns current ward number for this zone */
|
2018-11-04 23:47:10 +01:00
|
|
|
uint8_t getWardNum() const;
|
|
|
|
|
|
|
|
uint32_t getLandSetId() const;
|
2018-11-01 23:56:43 +01:00
|
|
|
Core::LandPtr getLand( uint8_t id );
|
2018-11-01 00:18:19 +01:00
|
|
|
|
|
|
|
private:
|
2018-11-01 23:56:43 +01:00
|
|
|
using LandPtrMap = std::unordered_map< uint8_t, Core::LandPtr >;
|
2018-11-04 23:47:10 +01:00
|
|
|
const uint32_t m_landSetMax = 18;
|
2018-11-01 23:56:43 +01:00
|
|
|
LandPtrMap m_landPtrMap;
|
2018-11-04 23:47:10 +01:00
|
|
|
uint8_t m_wardNum;
|
|
|
|
uint32_t m_landSetId;
|
2018-11-01 00:18:19 +01:00
|
|
|
uint32_t m_zoneId;
|
|
|
|
};
|
2018-07-15 23:59:15 +02:00
|
|
|
|
|
|
|
}
|
2018-11-01 00:18:19 +01:00
|
|
|
#endif //SAPPHIRE_HOUSINGZONE_H
|