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>
|
|
|
|
|
2018-11-29 16:55:48 +01:00
|
|
|
namespace Sapphire
|
2018-11-19 09:40:44 +01:00
|
|
|
{
|
|
|
|
|
|
|
|
class House
|
|
|
|
{
|
|
|
|
public:
|
2018-12-21 22:08:05 +11:00
|
|
|
House( uint32_t houseId, uint32_t landSetId, Common::LandIdent ident );
|
2018-11-19 09:40:44 +01:00
|
|
|
virtual ~House();
|
|
|
|
|
2018-11-26 23:32:22 +11:00
|
|
|
using HousePart = std::pair< uint32_t, uint8_t >;
|
2018-11-26 17:56:29 +11:00
|
|
|
using HousePartsArray = std::array< HousePart, 8 >;
|
|
|
|
|
2018-11-19 09:40:44 +01:00
|
|
|
//gerneral
|
2018-11-19 10:32:58 +01:00
|
|
|
uint32_t getLandSetId() const;
|
2018-12-21 22:08:05 +11:00
|
|
|
Common::LandIdent getLandIdent() const;
|
2018-11-19 10:32:58 +01:00
|
|
|
uint32_t getHouseId() 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 setHousePart( Common::HousePartSlot slot, uint32_t id );
|
|
|
|
void setHousePartColor( Common::HousePartSlot slot, uint32_t id );
|
2018-12-01 21:40:30 +01:00
|
|
|
void setHouseInteriorPart( Common::HousingInteriorSlot slot, uint32_t id );
|
2018-11-19 10:32:58 +01:00
|
|
|
uint32_t getHousePart( Common::HousePartSlot slot ) const;
|
|
|
|
uint8_t getHousePartColor( Common::HousePartSlot slot ) const;
|
2018-12-01 21:40:30 +01:00
|
|
|
uint32_t getHouseInteriorPart( Common::HousingInteriorSlot slot ) const;
|
2018-11-19 09:40:44 +01:00
|
|
|
|
2018-11-26 17:56:29 +11:00
|
|
|
HousePartsArray const& getHouseParts() const;
|
|
|
|
|
2018-11-26 23:32:22 +11:00
|
|
|
void updateHouseDb();
|
|
|
|
|
2018-11-19 09:40:44 +01:00
|
|
|
private:
|
|
|
|
uint32_t m_landSetId;
|
2018-12-21 22:08:05 +11:00
|
|
|
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-11-26 17:56:29 +11:00
|
|
|
HousePartsArray m_houseParts;
|
2018-12-01 21:40:30 +01:00
|
|
|
uint32_t m_houseInteriorParts[10];
|
2018-11-19 09:40:44 +01:00
|
|
|
|
2018-11-26 23:32:22 +11:00
|
|
|
std::string m_estateMessage;
|
|
|
|
std::string m_houseName;
|
2018-11-19 09:40:44 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // SAPPHIRE_HOUSE_H
|