1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-05 18:27:47 +00:00
sapphire/src/servers/sapphire_zone/Zone/HousingZone.h

41 lines
1,019 B
C
Raw Normal View History

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:
HousingZone( uint8_t wardNum,
uint16_t territoryId,
uint32_t guId,
const std::string& internalName,
const std::string& contentName );
2018-11-01 00:18:19 +01:00
virtual ~HousingZone();
2018-11-01 00:18:19 +01:00
bool init() override;
2018-11-01 00:18:19 +01:00
void onPlayerZoneIn( Entity::Player& player ) override;
void onUpdate( uint32_t currTime ) override;
2018-11-01 00:18:19 +01:00
void sendMap( Entity::Player& player );
bool isPlayerSubInstance( Entity::Player& player );
2018-11-01 00:18:19 +01:00
/* returns current ward number for this zone */
uint8_t getWardNum() const;
Core::LandsetPtr getLandset( uint8_t id );
const uint32_t m_wardMaxNum = 18;
private:
using LandsetPtrMap = std::unordered_map< uint8_t, Core::LandsetPtr >;
LandsetPtrMap m_landsetPtrMap;
uint8_t m_wardNum;
uint32_t m_zoneId;
};
2018-07-15 23:59:15 +02:00
}
2018-11-01 00:18:19 +01:00
#endif //SAPPHIRE_HOUSINGZONE_H