mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-24 18:47:45 +00:00
removed hardcoding and fixed debug console spam
This commit is contained in:
parent
bcb6c2b404
commit
b9aee98a7c
2 changed files with 2 additions and 5 deletions
|
@ -301,7 +301,7 @@ void Sapphire::Entity::Player::addCurrency( CurrencyType type, uint32_t amount )
|
|||
|
||||
uint32_t currentAmount = currItem->getStackSize();
|
||||
currItem->setStackSize( currentAmount + amount );
|
||||
writeMoney( CurrencyType::Gil );
|
||||
writeMoney( type );
|
||||
|
||||
updateContainer( Currency, slot, currItem );
|
||||
|
||||
|
@ -563,7 +563,7 @@ void Sapphire::Entity::Player::writeMoney(CurrencyType type)
|
|||
std::string query = "UPDATE charaitemcurrency SET ";
|
||||
auto money = m_storageMap[Currency]->getItem(static_cast<uint16_t>(type) - 1)->getStackSize();
|
||||
|
||||
query += "container_0 = " + 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()) + ";";
|
||||
|
||||
db.execute(query);
|
||||
|
|
|
@ -680,7 +680,6 @@ bool Sapphire::Entity::Player::loadInventory()
|
|||
|
||||
while( bagRes->next() )
|
||||
{
|
||||
Logger::info("Loaded items");
|
||||
uint16_t storageId = bagRes->getUInt16( 1 );
|
||||
for( uint32_t i = 1; i <= m_storageMap[ storageId ]->getMaxSize(); i++ )
|
||||
{
|
||||
|
@ -697,8 +696,6 @@ bool Sapphire::Entity::Player::loadInventory()
|
|||
}
|
||||
}
|
||||
|
||||
Logger::info(std::to_string(m_characterId));
|
||||
|
||||
auto moneyRes = db.query("SELECT storageId, "
|
||||
"container_0, container_1, container_2, container_3, container_4, "
|
||||
"container_5, container_6, container_7, container_8, container_9, "
|
||||
|
|
Loading…
Add table
Reference in a new issue