mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-25 05:57:45 +00:00
fixes
This commit is contained in:
parent
c726d7074b
commit
4babbd59b4
2 changed files with 3 additions and 5 deletions
|
@ -31,10 +31,10 @@ Core::Land::Land( uint16_t zoneId, uint8_t wardNum, uint8_t landId, uint32_t lan
|
||||||
m_wardNum( wardNum ),
|
m_wardNum( wardNum ),
|
||||||
m_landId( landId ),
|
m_landId( landId ),
|
||||||
m_currentPrice( 0 ),
|
m_currentPrice( 0 ),
|
||||||
|
m_minPrice( 0 ),
|
||||||
m_nextDrop( 0 ),
|
m_nextDrop( 0 ),
|
||||||
m_landSetId( landSetId ),
|
m_landSetId( landSetId ),
|
||||||
m_landInfo( info ),
|
m_landInfo( info )
|
||||||
m_devaluationTime( 0 )
|
|
||||||
{
|
{
|
||||||
memset( &m_land, 0x00, sizeof( LandStruct ) );
|
memset( &m_land, 0x00, sizeof( LandStruct ) );
|
||||||
load();
|
load();
|
||||||
|
@ -238,7 +238,7 @@ uint32_t Core::Land::getMaxItems()
|
||||||
|
|
||||||
uint32_t Core::Land::getDevaluationTime()
|
uint32_t Core::Land::getDevaluationTime()
|
||||||
{
|
{
|
||||||
return m_devaluationTime;
|
return m_nextDrop - Util::getTimeSeconds();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Core::Land::init()
|
void Core::Land::init()
|
||||||
|
@ -280,7 +280,6 @@ void Core::Land::Update( uint32_t currTime )
|
||||||
m_nextDrop = currTime + 21600;
|
m_nextDrop = currTime + 21600;
|
||||||
m_currentPrice = ( m_currentPrice / 100 ) * 99.58;
|
m_currentPrice = ( m_currentPrice / 100 ) * 99.58;
|
||||||
}
|
}
|
||||||
m_devaluationTime = m_nextDrop - currTime;
|
|
||||||
UpdateDatabase();
|
UpdateDatabase();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -79,7 +79,6 @@ namespace Core
|
||||||
//price
|
//price
|
||||||
uint32_t m_initPrice;
|
uint32_t m_initPrice;
|
||||||
uint32_t m_nextDrop;
|
uint32_t m_nextDrop;
|
||||||
uint32_t m_devaluationTime;
|
|
||||||
uint32_t m_currentPrice;
|
uint32_t m_currentPrice;
|
||||||
uint32_t m_minPrice;
|
uint32_t m_minPrice;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue