mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-09 12:17:45 +00:00
Fixed inventory and gil
This commit is contained in:
parent
da5dbfd246
commit
6326991494
2 changed files with 4 additions and 2 deletions
|
@ -522,7 +522,7 @@ void Sapphire::Entity::Player::writeInventory( InventoryType type )
|
||||||
query += "container_" + std::to_string( i ) + " = " + std::to_string( currItem ? currItem->getUId() : 0 );
|
query += "container_" + std::to_string( i ) + " = " + std::to_string( currItem ? currItem->getUId() : 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
query += " WHERE CharacterId = " + std::to_string( getId() );
|
query += " WHERE CharacterId = " + std::to_string( getCharacterId() );
|
||||||
|
|
||||||
if( storage->isMultiStorage() )
|
if( storage->isMultiStorage() )
|
||||||
query += " AND storageId = " + std::to_string( static_cast< uint16_t >( type ) );
|
query += " AND storageId = " + std::to_string( static_cast< uint16_t >( type ) );
|
||||||
|
|
|
@ -611,8 +611,10 @@ Sapphire::Entity::PlayerPtr Sapphire::World::WorldServer::syncPlayer( uint64_t c
|
||||||
// get db last write
|
// get db last write
|
||||||
auto dbSync = pPlayer->getLastDBWrite();
|
auto dbSync = pPlayer->getLastDBWrite();
|
||||||
|
|
||||||
|
|
||||||
// db was updated and we lost track of it - update
|
// db was updated and we lost track of it - update
|
||||||
if( dbSync != lastCacheSync )
|
// @todo for now, always reload the player on login.
|
||||||
|
//if( dbSync != lastCacheSync )
|
||||||
{
|
{
|
||||||
// clear current maps
|
// clear current maps
|
||||||
m_playerMapById[ pPlayer->getId() ] = nullptr;
|
m_playerMapById[ pPlayer->getId() ] = nullptr;
|
||||||
|
|
Loading…
Add table
Reference in a new issue