mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-23 05:07:46 +00:00
:/
This commit is contained in:
parent
9cc2cd633f
commit
d6118e9d80
2 changed files with 10 additions and 16 deletions
|
@ -2746,7 +2746,7 @@ Core::Data::HousingLandSet::HousingLandSet( uint32_t row_id, Core::Data::ExdData
|
||||||
for ( int i = 0; i < 60; i++ )
|
for ( int i = 0; i < 60; i++ )
|
||||||
sizes.push_back( exdData->getField< uint8_t >( row, i ) );
|
sizes.push_back( exdData->getField< uint8_t >( row, i ) );
|
||||||
for ( int i = 60; i < 60 + 60; i++ )
|
for ( int i = 60; i < 60 + 60; i++ )
|
||||||
minPrices.push_back( exdData->getField< uint8_t >( row, i ) );
|
minPrices.push_back( exdData->getField< uint32_t >( row, i ) );
|
||||||
for ( int i = 300; i < 300 + 60; i++ )
|
for ( int i = 300; i < 300 + 60; i++ )
|
||||||
prices.push_back( exdData->getField< uint32_t >( row, i ) );
|
prices.push_back( exdData->getField< uint32_t >( row, i ) );
|
||||||
|
|
||||||
|
|
|
@ -275,23 +275,17 @@ void Core::Land::Update( uint32_t currTime )
|
||||||
{
|
{
|
||||||
if( getState() == HouseState::forSale )
|
if( getState() == HouseState::forSale )
|
||||||
{
|
{
|
||||||
if( m_nextDrop < currTime )
|
if( m_nextDrop < currTime && m_minPrice < m_currentPrice )
|
||||||
{
|
{
|
||||||
m_nextDrop = currTime + 21600; // +6 hours
|
m_nextDrop = currTime + 21600;
|
||||||
if( m_currentPrice == 0 )
|
m_currentPrice = ( m_currentPrice / 100 ) * 99.58;
|
||||||
|
}
|
||||||
|
else if( m_currentPrice == 0 )
|
||||||
{
|
{
|
||||||
|
m_nextDrop = currTime + 21600;
|
||||||
m_currentPrice = m_initPrice;
|
m_currentPrice = m_initPrice;
|
||||||
}
|
}
|
||||||
else if( m_minPrice < m_currentPrice )
|
|
||||||
{
|
|
||||||
m_currentPrice = ( m_currentPrice / 100 ) * 99.58;
|
|
||||||
m_devaluationTime = m_nextDrop - currTime;
|
m_devaluationTime = m_nextDrop - currTime;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_devaluationTime = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
UpdateDatabase();
|
UpdateDatabase();
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue