Make gear appear unstackable in inventories while other items remain stackable. Each individual piece of gear can now have its own stats.
This commit is contained in:
@@ -185,8 +185,8 @@ void Merchant::PurchaseItem(IT item,uint32_t amt){
|
||||
Inventory::AddItem(item,amt);
|
||||
game->GetPlayer()->SetMoney(game->GetPlayer()->GetMoney()-totalCost);
|
||||
};
|
||||
void Merchant::SellItem(IT item,uint32_t amt){
|
||||
sellFunctionPrimed.Validate(item,amt);
|
||||
void Merchant::SellItem(std::weak_ptr<Item>item,uint32_t amt){
|
||||
sellFunctionPrimed.Validate(item.lock()->ActualName(),amt);
|
||||
|
||||
uint32_t totalCost=0U;
|
||||
bool itemFound=false;
|
||||
@@ -199,10 +199,10 @@ void Merchant::SellItem(IT item,uint32_t amt){
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!itemFound&&ITEM_DATA[item].CanBePurchased()){
|
||||
AddItem(item,amt); //This may not be a feature we include in future versions of the game. For now let's allow it.
|
||||
if(!itemFound&&item.lock()->CanBePurchased()){
|
||||
AddItem(item.lock()->ActualName(),amt); //This may not be a feature we include in future versions of the game. For now let's allow it.
|
||||
}
|
||||
totalCost=ITEM_DATA[item].GetSellValue()*amt;
|
||||
totalCost=item.lock()->SellValue()*amt;
|
||||
|
||||
Inventory::RemoveItem(item,amt);
|
||||
game->GetPlayer()->SetMoney(game->GetPlayer()->GetMoney()+totalCost);
|
||||
|
||||
Reference in New Issue
Block a user