Solve crash that occurs when selling items not in your loadout item slots. Release Build 7872.

This commit is contained in:
2024-03-02 16:30:09 -06:00
parent f8408dc530
commit 686fa7916c
7 changed files with 9 additions and 7 deletions
+1 -1
View File
@@ -225,7 +225,7 @@ void Merchant::SellItem(std::weak_ptr<Item>item,uint32_t amt){
game->GetPlayer()->SetMoney(game->GetPlayer()->GetMoney()+totalCost);
//If we still have some in our inventory, we'll add them back in.
if(Inventory::GetItemCount(itemName)>0){
if(foundLoadoutSlot!=-1&&Inventory::GetItemCount(itemName)>0){
game->SetLoadoutItem(foundLoadoutSlot,itemName);
}