Mercurial > mm7
diff mm7_4.cpp @ 2059:f9698295c0bd
AttackerInfo, MerchandiseTest
author | Ritor1 |
---|---|
date | Sun, 01 Dec 2013 23:43:03 +0600 |
parents | 28cb79ae2f6f |
children | 72177f3603da |
line wrap: on
line diff
--- a/mm7_4.cpp Sun Dec 01 20:14:32 2013 +0600 +++ b/mm7_4.cpp Sun Dec 01 23:43:03 2013 +0600 @@ -3411,7 +3411,7 @@ } //----- (004BDAAF) -------------------------------------------------------- -bool __fastcall MerchandiseTest(ItemGen *item, int _2da_idx) +bool MerchandiseTest(ItemGen *item, int _2da_idx) { int v6; // edx@8 int v7; // edx@9 @@ -3423,28 +3423,28 @@ 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 0; + return false; switch( p2DEvents[_2da_idx - 1].uType ) { case BuildingType_WeaponShop: { - test = item->GetItemEquipType() <= 2; + test = item->GetItemEquipType() <= EQUIP_BOW; break; } case BuildingType_ArmorShop: { - test = item->GetItemEquipType() >= 3; + test = item->GetItemEquipType() >= EQUIP_ARMOUR && item->GetItemEquipType() <= EQUIP_BOOTS; break; } case BuildingType_MagicShop: { - test = item->GetPlayerSkillType() == 38 || item->GetItemEquipType() == 16; + test = item->GetPlayerSkillType() == PLAYER_SKILL_MISC || item->GetItemEquipType() == EQIUP_ANY; break; } case BuildingType_AlchemistShop: { - test = item->GetItemEquipType() == 13 || item->GetItemEquipType() == 14 - || (item->GetItemEquipType() > 14 && !(item->GetItemEquipType() != 17 + 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; } @@ -3455,54 +3455,4 @@ } } return test; -/* - if ( p2DEvents[a2 - 1].uType == 1 ) - { - v11 = __OFSUB__(v5, 2); - v9 = v5 == 2; - v10 = v5 - 2 < 0; - goto LABEL_23; - } - if ( p2DEvents[a2 - 1].uType > 2 ) - { - if ( p2DEvents[a2 - 1].uType == 3 ) - { - if ( pItemsTable->pItems[v4].uSkillType != 38 ) - return v5 == 16; - return 1; - } - if ( p2DEvents[a2 - 1].uType != 4 || v5 < 13 ) - return 0; - if ( p2DEvents[a2 - 1].uType == 4) - { - if ( v5 < 13 ) - return 0; - if ( v5 <= 14 ) - return 1; - if ( v5 != 17 || (signed int)v3 < 740 ) - return 0; - v11 = __OFSUB__(v3, 771); - v9 = v3 == 771; - v10 = ((v3 - 771) & 0x80000000u) != 0; -LABEL_23: - if ( !((unsigned __int8)(v10 ^ v11) | v9) ) - return 0; - return 1; - } - } - if ( p2DEvents[a2 - 1].uType == 2 ) - { - if ( v5 >= 3 ) - { - v11 = __OFSUB__(v5, 9); - v9 = v5 == 9; - v10 = v5 - 9 < 0; - goto LABEL_23; - } - } - return 0; -*/ -} - - - +} \ No newline at end of file