Mercurial > mm7
comparison mm7_6.cpp @ 377:243418228760
GetIdentifiedName
author | Gloval |
---|---|
date | Fri, 22 Feb 2013 22:27:45 +0400 |
parents | 7f817679b60e |
children | d95a91011d57 |
comparison
equal
deleted
inserted
replaced
376:615e6b6f55c2 | 377:243418228760 |
---|---|
1400 } | 1400 } |
1401 else | 1401 else |
1402 { | 1402 { |
1403 if ( pItemsTable->pItems[pActor->array_000234[3].uItemID].uEquipType != 18 ) | 1403 if ( pItemsTable->pItems[pActor->array_000234[3].uItemID].uEquipType != 18 ) |
1404 goto LABEL_9; | 1404 goto LABEL_9; |
1405 v14 = pActor->array_000234[3].uAdditionalValue; | 1405 v14 = pActor->array_000234[3].uSpecEnchantmentType; |
1406 pActor->array_000234[3].Reset(); | 1406 pActor->array_000234[3].Reset(); |
1407 } | 1407 } |
1408 if ( v14 ) | 1408 if ( v14 ) |
1409 { | 1409 { |
1410 party_finds_gold(v14, 0); | 1410 party_finds_gold(v14, 0); |
1430 Dst.uNumCharges = v6; | 1430 Dst.uNumCharges = v6; |
1431 Dst.uMaxCharges = v6; | 1431 Dst.uMaxCharges = v6; |
1432 v4 = Dst.uItemID; | 1432 v4 = Dst.uItemID; |
1433 } | 1433 } |
1434 if ( pItemsTable->pItems[v5].uEquipType == 14 && v4 != 220 ) | 1434 if ( pItemsTable->pItems[v5].uEquipType == 14 && v4 != 220 ) |
1435 Dst._bonus_type = 2 * rand() % 4 + 2; | 1435 Dst.uEncantmentType = 2 * rand() % 4 + 2; |
1436 pItemsTable->SetSpecialBonus(&Dst); | 1436 pItemsTable->SetSpecialBonus(&Dst); |
1437 if ( !pParty->AddItem(&Dst) ) | 1437 if ( !pParty->AddItem(&Dst) ) |
1438 pParty->SetHoldingItem(&Dst); | 1438 pParty->SetHoldingItem(&Dst); |
1439 pActor->uCarriedItemID = 0; | 1439 pActor->uCarriedItemID = 0; |
1440 if ( pActor->array_000234[0].uItemID ) | 1440 if ( pActor->array_000234[0].uItemID ) |
4010 v730c->UpdateTempBonus(pParty->uTimePlayed); | 4010 v730c->UpdateTempBonus(pParty->uTimePlayed); |
4011 if ( v730c->uItemID < 64 || v730c->uItemID > 65 ) | 4011 if ( v730c->uItemID < 64 || v730c->uItemID > 65 ) |
4012 { | 4012 { |
4013 if (!v730c->Broken()) | 4013 if (!v730c->Broken()) |
4014 { | 4014 { |
4015 if ( v730c->uAdditionalValue == v1 ) | 4015 if ( v730c->uSpecEnchantmentType == v1 ) |
4016 { | 4016 { |
4017 if ( v730c->_bonus_type == v1 ) | 4017 if ( v730c->uEncantmentType == v1 ) |
4018 { | 4018 { |
4019 v68 = BYTE4(v726->pConditions[3]); | 4019 v68 = BYTE4(v726->pConditions[3]); |
4020 if ( !v68 || v68 == 1 || v68 == 2 ) | 4020 if ( !v68 || v68 == 1 || v68 == 2 ) |
4021 { | 4021 { |
4022 if ( !pItemsTable->_456D5E_is_some_material(v730c) ) | 4022 if ( !pItemsTable->IsMaterialNonCommon(v730c) ) |
4023 { | 4023 { |
4024 v69 = v730c; | 4024 v69 = v730c; |
4025 v14 = v731 == 4; | 4025 v14 = v731 == 4; |
4026 *(int *)(v730 + 12) = amount; | 4026 *(int *)(v730 + 12) = amount; |
4027 if ( !v14 ) | 4027 if ( !v14 ) |
5419 } | 5419 } |
5420 else | 5420 else |
5421 { | 5421 { |
5422 if ( v731 != 4 | 5422 if ( v731 != 4 |
5423 || (v245 = (int)&v726->pInventoryItems[a2], v246 = *(int *)v245, *(int *)v245 > 134) | 5423 || (v245 = (int)&v726->pInventoryItems[a2], v246 = *(int *)v245, *(int *)v245 > 134) |
5424 || v726->pInventoryItems[a2].uAdditionalValue != v1 | 5424 || v726->pInventoryItems[a2].uSpecEnchantmentType != v1 |
5425 || v726->pInventoryItems[a2]._bonus_type != v1 | 5425 || v726->pInventoryItems[a2].uEncantmentType != v1 |
5426 || v726->pInventoryItems[a2]._bonus_strength != v1 | 5426 || v726->pInventoryItems[a2]._bonus_strength != v1 |
5427 || (_this = (ItemGen *)((char *)&v726->pInventoryItems[a2] + 20), v726->pInventoryItems[a2].Broken()) ) | 5427 || (_this = (ItemGen *)((char *)&v726->pInventoryItems[a2] + 20), v726->pInventoryItems[a2].Broken()) ) |
5428 goto LABEL_616; | 5428 goto LABEL_616; |
5429 v247 = (char *)&pItemsTable->pItems[v246].pIconName; | 5429 v247 = (char *)&pItemsTable->pItems[v246].pIconName; |
5430 LODWORD(v725) = (int)v247; | 5430 LODWORD(v725) = (int)v247; |
5524 v289 = (ItemGen *)&v244[36 * a2 + 532]; | 5524 v289 = (ItemGen *)&v244[36 * a2 + 532]; |
5525 _this = v289; | 5525 _this = v289; |
5526 v290 = v289->uItemID; | 5526 v290 = v289->uItemID; |
5527 LODWORD(v725) = (int)(char *)&pItemsTable + 48 * v290 + 4; | 5527 LODWORD(v725) = (int)(char *)&pItemsTable + 48 * v290 + 4; |
5528 if ( v290 > 134 | 5528 if ( v290 > 134 |
5529 || _this->uAdditionalValue != v1 | 5529 || _this->uSpecEnchantmentType != v1 |
5530 || _this->_bonus_type != v1 | 5530 || _this->uEncantmentType != v1 |
5531 || _this->_bonus_strength != v1 | 5531 || _this->_bonus_strength != v1 |
5532 || (v291 = pItemsTable->pItems[v290].uEquipType) == 0 | 5532 || (v291 = pItemsTable->pItems[v290].uEquipType) == 0 |
5533 || v291 == 1 | 5533 || v291 == 1 |
5534 || v291 == 2 | 5534 || v291 == 2 |
5535 || _this->Broken()) | 5535 || _this->Broken()) |
5577 } | 5577 } |
5578 while ( SHIDWORD(v733) < v297 ); | 5578 while ( SHIDWORD(v733) < v297 ); |
5579 } | 5579 } |
5580 v302 = rand() % SLODWORD(v725); | 5580 v302 = rand() % SLODWORD(v725); |
5581 v303 = v679; | 5581 v303 = v679; |
5582 v294->uAdditionalValue = v679; | 5582 v294->uSpecEnchantmentType = v679; |
5583 v304 = pItemsTable->pSpecialEnchantments[v303].to_item_apply[pItemsTable->pItems[v294->uItemID].uEquipType + 4]; | 5583 v304 = pItemsTable->pSpecialEnchantments[v303].to_item_apply[pItemsTable->pItems[v294->uItemID].uEquipType + 4]; |
5584 v305 = v302 + 1; | 5584 v305 = v302 + 1; |
5585 if ( v304 < v305 ) | 5585 if ( v304 < v305 ) |
5586 { | 5586 { |
5587 for ( jj = &v679; ; jj = (int *)v732 ) | 5587 for ( jj = &v679; ; jj = (int *)v732 ) |
5588 { | 5588 { |
5589 v307 = (int)(jj + 1); | 5589 v307 = (int)(jj + 1); |
5590 v732 = v307; | 5590 v732 = v307; |
5591 v308 = *(int *)v307; | 5591 v308 = *(int *)v307; |
5592 v294->uAdditionalValue = v308; | 5592 v294->uSpecEnchantmentType = v308; |
5593 v304 += pItemsTable->pSpecialEnchantments[v308].to_item_apply[pItemsTable->pItems[v294->uItemID].uEquipType + 4]; | 5593 v304 += pItemsTable->pSpecialEnchantments[v308].to_item_apply[pItemsTable->pItems[v294->uItemID].uEquipType + 4]; |
5594 if ( v304 >= v305 ) | 5594 if ( v304 >= v305 ) |
5595 break; | 5595 break; |
5596 } | 5596 } |
5597 } | 5597 } |
5598 ++v294->uAdditionalValue; | 5598 ++v294->uSpecEnchantmentType; |
5599 } | 5599 } |
5600 else | 5600 else |
5601 { | 5601 { |
5602 v293 = rand(); | 5602 v293 = rand(); |
5603 v294 = _this; | 5603 v294 = _this; |
5604 v295 = v293 % 10;// pItemsTable->field_116D8[pItemsTable->pItems[_this->uItemID].uEquipType]; | 5604 v295 = v293 % 10;// pItemsTable->field_116D8[pItemsTable->pItems[_this->uItemID].uEquipType]; |
5605 _this->_bonus_type = 0; | 5605 _this->uEncantmentType = 0; |
5606 for ( kk = pItemsTable->pEnchantments[0].to_item[pItemsTable->pItems[v294->uItemID].uEquipType + 1]; | 5606 for ( kk = pItemsTable->pEnchantments[0].to_item[pItemsTable->pItems[v294->uItemID].uEquipType + 1]; |
5607 ; | 5607 ; |
5608 kk += pItemsTable->pEnchantments[v294->_bonus_type].to_item[pItemsTable->pItems[v294->uItemID].uEquipType | 5608 kk += pItemsTable->pEnchantments[v294->uEncantmentType].to_item[pItemsTable->pItems[v294->uItemID].uEquipType |
5609 + 1] ) | 5609 + 1] ) |
5610 { | 5610 { |
5611 ++v294->_bonus_type; | 5611 ++v294->uEncantmentType; |
5612 if ( kk >= v295 ) | 5612 if ( kk >= v295 ) |
5613 break; | 5613 break; |
5614 } | 5614 } |
5615 v294->_bonus_strength = 10//pItemsTable->field_116D8[18] | 5615 v294->_bonus_strength = 10//pItemsTable->field_116D8[18] |
5616 + rand() % 10;//(pItemsTable->field_116D8[19] - pItemsTable->field_116D8[18] + 1); | 5616 + rand() % 10;//(pItemsTable->field_116D8[19] - pItemsTable->field_116D8[18] + 1); |
7333 if ( *(int *)HIDWORD(v733) >= 64 && *(int *)HIDWORD(v733) <= 65 | 7333 if ( *(int *)HIDWORD(v733) >= 64 && *(int *)HIDWORD(v733) <= 65 |
7334 || *(char *)(HIDWORD(v733) + 20) & 2 | 7334 || *(char *)(HIDWORD(v733) + 20) & 2 |
7335 || *(int *)(HIDWORD(v733) + 12) != v1 | 7335 || *(int *)(HIDWORD(v733) + 12) != v1 |
7336 || *(int *)(HIDWORD(v733) + 4) != v1 | 7336 || *(int *)(HIDWORD(v733) + 4) != v1 |
7337 || (v591 = *(char *)(v732 + 28)) != 0 && v591 != 1 && v591 != 2 | 7337 || (v591 = *(char *)(v732 + 28)) != 0 && v591 != 1 && v591 != 2 |
7338 || pItemsTable->_456D5E_is_some_material((ItemGen *)HIDWORD(v733)) ) | 7338 || pItemsTable->IsMaterialNonCommon((ItemGen *)HIDWORD(v733)) ) |
7339 goto LABEL_199; | 7339 goto LABEL_199; |
7340 v592 = HIDWORD(v733); | 7340 v592 = HIDWORD(v733); |
7341 v14 = v731 == 4; | 7341 v14 = v731 == 4; |
7342 *(int *)(HIDWORD(v733) + 12) = 16; | 7342 *(int *)(HIDWORD(v733) + 12) = 16; |
7343 if ( !v14 ) | 7343 if ( !v14 ) |