diff mm7_4.cpp @ 2250:3cc3a29f073b

moved MerchandiseTest to ItemGen::MerchandiseTest
author Grumpy7
date Wed, 26 Feb 2014 01:26:22 +0100
parents 708aa31cad56
children aff7a7b072b7
line wrap: on
line diff
--- a/mm7_4.cpp	Wed Feb 26 01:20:07 2014 +0100
+++ b/mm7_4.cpp	Wed Feb 26 01:26:22 2014 +0100
@@ -2332,43 +2332,3 @@
   dword_7241C8 = 0;
 }
 
-//----- (004BDAAF) --------------------------------------------------------
-bool MerchandiseTest(ItemGen *item, int _2da_idx)
-{
-  bool test;
-
-  if ( (p2DEvents[_2da_idx - 1].uType != 4 || (signed int)item->uItemID < 740 || (signed int)item->uItemID > 771)
-    && ((signed int)item->uItemID >= 600 || (signed int)item->uItemID >= 529 && (signed int)item->uItemID <= 599) || item->IsStolen())
-    return false;
-  switch( p2DEvents[_2da_idx - 1].uType )
-  {
-    case BuildingType_WeaponShop:
-    {
-      test = item->GetItemEquipType() <= EQUIP_BOW;
-      break;
-    }
-    case BuildingType_ArmorShop:
-    {
-      test = item->GetItemEquipType() >= EQUIP_ARMOUR && item->GetItemEquipType() <= EQUIP_BOOTS;
-      break;
-    }
-    case BuildingType_MagicShop:
-    {
-      test = item->GetPlayerSkillType() == PLAYER_SKILL_MISC || item->GetItemEquipType() == EQIUP_ANY;
-      break;
-    }
-    case BuildingType_AlchemistShop:
-    {
-      test = item->GetItemEquipType() == EQUIP_REAGENT || item->GetItemEquipType() == EQUIP_POTION 
-            || (item->GetItemEquipType() > EQUIP_POTION && !(item->GetItemEquipType() != EQUIP_MESSAGE_SCROLL 
-            || (signed int)item->uItemID < 740) && item->uItemID != 771);
-      break;
-    }
-    default:
-    {
-      test = false;
-      break;
-    }
-  }
-  return test;
-}