1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-06 02:37:47 +00:00
sapphire/src/world/Territory/House.h

68 lines
1.7 KiB
C
Raw Normal View History

2018-11-19 09:40:44 +01:00
#ifndef SAPPHIRE_HOUSE_H
#define SAPPHIRE_HOUSE_H
#include "Forwards.h"
#include <Common.h>
#include <set>
#include <unordered_map>
#include <array>
2018-11-19 09:40:44 +01:00
namespace Sapphire
2018-11-19 09:40:44 +01:00
{
class House
{
public:
House( uint32_t houseId, uint32_t landSetId, Common::LandIdent ident, const std::string& estateName,
const std::string& estateComment, FrameworkPtr pFw );
2018-11-19 09:40:44 +01:00
virtual ~House();
using HousePart = std::pair< uint32_t, uint16_t >;
using ExteriorModelsArray = std::array< HousePart, 8 >;
using InteriorModelsArray = std::array< uint32_t, 10 >;
2018-11-19 09:40:44 +01:00
//gerneral
2018-11-19 10:32:58 +01:00
uint32_t getLandSetId() const;
Common::LandIdent getLandIdent() const;
2018-12-23 20:54:21 +11:00
uint32_t getId() const;
2018-11-19 09:40:44 +01:00
2018-11-27 21:11:02 +11:00
const std::string& getHouseName() const;
2018-11-28 00:05:57 +11:00
void setHouseName( const std::string& name );
2018-11-27 21:11:02 +11:00
const std::string& getHouseGreeting() const;
2018-11-28 00:05:57 +11:00
void setHouseGreeting( const std::string& greeting );
2018-11-27 21:11:02 +11:00
2018-11-19 09:40:44 +01:00
//functions
void setExteriorModel( Common::HouseExteriorSlot slot, uint32_t modelId, uint16_t stain );
HousePart getExteriorModel( Common::HouseExteriorSlot slot );
2018-12-30 17:44:03 +11:00
void setInteriorModel( Common::HouseInteriorSlot slot, uint32_t modelId );
uint32_t getInteriorModel( Common::HouseInteriorSlot slot );
2018-11-19 09:40:44 +01:00
ExteriorModelsArray const& getHouseModels() const;
2018-11-26 23:32:22 +11:00
void updateHouseDb();
2018-12-29 19:38:29 +11:00
void setHasAetheryte( bool hasAetheryte );
bool getHasAetheryte() const;
2018-11-19 09:40:44 +01:00
private:
uint32_t m_landSetId;
Common::LandIdent m_landIdent;
2018-11-19 09:40:44 +01:00
uint32_t m_houseId;
2018-11-26 23:32:22 +11:00
uint64_t m_buildTime;
2018-12-29 19:38:29 +11:00
bool m_hasAetheryte;
2018-11-26 23:32:22 +11:00
ExteriorModelsArray m_exteriorModelCache;
InteriorModelsArray m_interiorModelCache;
2018-11-19 09:40:44 +01:00
std::string m_estateComment;
std::string m_estateName;
FrameworkPtr m_pFw;
2018-11-19 09:40:44 +01:00
};
}
#endif // SAPPHIRE_HOUSE_H