1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-09 04:07:46 +00:00

Fixed inventory and gil

This commit is contained in:
Mordred 2021-12-02 00:08:33 +01:00
parent da5dbfd246
commit 6326991494
2 changed files with 4 additions and 2 deletions

View file

@ -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 += " WHERE CharacterId = " + std::to_string( getId() );
query += " WHERE CharacterId = " + std::to_string( getCharacterId() );
if( storage->isMultiStorage() )
query += " AND storageId = " + std::to_string( static_cast< uint16_t >( type ) );

View file

@ -611,8 +611,10 @@ Sapphire::Entity::PlayerPtr Sapphire::World::WorldServer::syncPlayer( uint64_t c
// get db last write
auto dbSync = pPlayer->getLastDBWrite();
// 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
m_playerMapById[ pPlayer->getId() ] = nullptr;