Fix: merchants stack identical items

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8388 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2017-02-04 14:43:28 +00:00
parent a8ba28d90a
commit ec7f15f1d7
+3 -3
View File
@@ -1648,9 +1648,9 @@ void AddItemToArmsDealerInventory( UINT8 ubArmsDealer, OBJECTTYPE& object )
{
//we can only add items to a stack if the item has no attachments (not even default)
//and if it is either perfect or ammo (and same amount of ammo)
if (/*object[0]->attachments.empty() == true*/ object[0]->AttachmentListSize() &&
(object[0]->data.objectStatus == 100 || Item [ object.usItem ].usItemClass == IC_AMMO)) {
if ( !object[0]->AttachmentListSize() &&
(object[0]->data.objectStatus == 100 || Item [ object.usItem ].usItemClass == IC_AMMO) )
{
//first find existing items with same perfect status, if found add to that, else create new one
for (DealerItemList::iterator iter = gArmsDealersInventory[ubArmsDealer].begin();
iter != gArmsDealersInventory[ubArmsDealer].end(); ++iter) {