Skip to content

Commit

Permalink
Fixed inventory and gil
Browse files Browse the repository at this point in the history
  • Loading branch information
SapphireMordred committed Dec 1, 2021
1 parent da5dbfd commit 6326991
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/world/Actor/PlayerInventory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) );
Expand Down
4 changes: 3 additions & 1 deletion src/world/WorldServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6326991

Please sign in to comment.