mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Fixed a bug in the "sell all" strategic inventory screen options. Money now gets sold without modification and unreachable items can't accidentally be sold.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2039 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -2309,6 +2309,15 @@ INT32 SellItem( OBJECTTYPE& object, BOOLEAN useModifier )
|
||||
iPrice += (INT32)( itemPrice * (float) object[bLoop]->data.ubShotsLeft / magSize );
|
||||
}
|
||||
}
|
||||
//CHRISL: If we're dealing with money, we want to use the money's amount and just return that value with no modification
|
||||
else if(Item[usItemType].usItemClass == IC_MONEY)
|
||||
{
|
||||
for (INT8 bLoop = 0; bLoop < object.ubNumberOfObjects; bLoop++)
|
||||
{
|
||||
iPrice += (INT32)(object[bLoop]->data.money.uiMoneyAmount);
|
||||
}
|
||||
return iPrice;
|
||||
}
|
||||
else if(Item[usItemType].usItemClass == IC_LBEGEAR && UsingNewInventorySystem() == true)
|
||||
{
|
||||
//CHRISL: If we're selling an LBE Item, we need to verify if it's an LBENODE, first. If it is, we need to sell
|
||||
|
||||
Reference in New Issue
Block a user