1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-24 18:47:45 +00:00

refactor: Missed some more inconsistents

This commit is contained in:
Matthe815 2023-01-06 12:53:34 -05:00
parent b811dd1197
commit cc0a04b612
No known key found for this signature in database
GPG key ID: 6B963FE816B1DC39

View file

@ -561,15 +561,15 @@ void Sapphire::Entity::Player::writeCurrencyItem( CurrencyType type )
{
auto& db = Common::Service< Db::DbWorkerPool< Db::ZoneDbConnection > >::ref();
auto money = m_storageMap[Currency]->getItem(static_cast<uint16_t>(type) - 1)->getStackSize();
auto money = m_storageMap[ Currency ]->getItem( static_cast< uint16_t >( type ) - 1 )->getStackSize();
std::string query = "UPDATE charaitemcurrency SET ";
query += "container_" + std::to_string(static_cast<int16_t>(type) - 1) + " = " + std::to_string(money);
query += "container_" + std::to_string( static_cast< int16_t >( type ) - 1 ) + " = " + std::to_string( money );
query += " WHERE CharacterId = " + std::to_string(getCharacterId()) + ";";
query += " WHERE CharacterId = " + std::to_string( getCharacterId() ) + ";";
db.execute(query);
db.execute( query );
}
void Sapphire::Entity::Player::deleteItemDb( Sapphire::ItemPtr item ) const