mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-29 23:57:46 +00:00
store aetheryte status in house object
This commit is contained in:
parent
d4f431b37a
commit
b5b49f4d8c
6 changed files with 18 additions and 9 deletions
|
@ -193,6 +193,7 @@ void Sapphire::World::Manager::HousingMgr::initLandCache()
|
|||
entry.m_estateName = res->getString( "HouseName" );
|
||||
entry.m_buildTime = res->getUInt64( "BuildTime" );
|
||||
entry.m_endorsements = res->getUInt64( "Endorsements" );
|
||||
entry.m_hasAetheryte = res->getBoolean( "Aetheryte" );
|
||||
|
||||
m_landCache[ entry.m_landSetId ].push_back( entry );
|
||||
|
||||
|
|
|
@ -46,6 +46,8 @@ namespace Sapphire::World::Manager
|
|||
std::string m_estateComment;
|
||||
std::string m_estateName;
|
||||
|
||||
bool m_hasAetheryte;
|
||||
|
||||
uint64_t m_buildTime;
|
||||
uint64_t m_endorsements;
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ void Sapphire::House::updateHouseDb()
|
|||
stmt->setUInt( 6, m_houseId );
|
||||
|
||||
stmt->setInt64( 1, m_buildTime );
|
||||
stmt->setInt( 2, 0 );
|
||||
stmt->setBool( 2, m_hasAetheryte );
|
||||
|
||||
stmt->setString( 3, m_estateComment );
|
||||
stmt->setString( 4, m_estateName );
|
||||
|
@ -104,4 +104,14 @@ void Sapphire::House::setInteriorModel( Sapphire::Common::HousingInteriorSlot sl
|
|||
uint32_t Sapphire::House::getInteriorModel( Sapphire::Common::HousingInteriorSlot slot )
|
||||
{
|
||||
return m_interiorModelCache[ slot ];
|
||||
}
|
||||
|
||||
bool Sapphire::House::getHasAetheryte() const
|
||||
{
|
||||
return m_hasAetheryte;
|
||||
}
|
||||
|
||||
void Sapphire::House::setHasAetheryte( bool hasAetheryte )
|
||||
{
|
||||
m_hasAetheryte = hasAetheryte;
|
||||
}
|
|
@ -41,12 +41,16 @@ namespace Sapphire
|
|||
|
||||
void updateHouseDb();
|
||||
|
||||
void setHasAetheryte( bool hasAetheryte );
|
||||
bool getHasAetheryte() const;
|
||||
|
||||
private:
|
||||
uint32_t m_landSetId;
|
||||
Common::LandIdent m_landIdent;
|
||||
uint32_t m_houseId;
|
||||
|
||||
uint64_t m_buildTime;
|
||||
bool m_hasAetheryte;
|
||||
|
||||
HouseModelsArray m_exteriorModelCache;
|
||||
uint32_t m_interiorModelCache[10];
|
||||
|
|
|
@ -73,13 +73,6 @@ void Sapphire::Land::init( Common::LandType type, uint8_t size, uint8_t state, u
|
|||
}
|
||||
}
|
||||
|
||||
uint32_t Sapphire::Land::convertItemIdToHousingItemId( uint32_t itemId )
|
||||
{
|
||||
auto pExdData = m_pFw->get< Data::ExdDataGenerated >();
|
||||
auto info = pExdData->get< Sapphire::Data::Item >( itemId );
|
||||
return info->additionalData;
|
||||
}
|
||||
|
||||
uint32_t Sapphire::Land::getCurrentPrice() const
|
||||
{
|
||||
return m_currentPrice;
|
||||
|
|
|
@ -66,7 +66,6 @@ namespace Sapphire
|
|||
InvMaxItemsPair getInventoryItemMax() const;
|
||||
|
||||
private:
|
||||
uint32_t convertItemIdToHousingItemId( uint32_t itemId );
|
||||
uint32_t getNextHouseId();
|
||||
|
||||
Common::LandIdent m_landIdent;
|
||||
|
|
Loading…
Add table
Reference in a new issue