comparison mm7_6.cpp @ 609:42d5777c2f47

Слияние
author Ritor1
date Wed, 06 Mar 2013 18:22:25 +0600
parents f90753ebabe3
children c03428cb4119
comparison
equal deleted inserted replaced
608:653724e9c234 609:42d5777c2f47
1429 Dst.uNumCharges = v6; 1429 Dst.uNumCharges = v6;
1430 Dst.uMaxCharges = v6; 1430 Dst.uMaxCharges = v6;
1431 v4 = Dst.uItemID; 1431 v4 = Dst.uItemID;
1432 } 1432 }
1433 if ( pItemsTable->pItems[v5].uEquipType == 14 && v4 != 220 ) 1433 if ( pItemsTable->pItems[v5].uEquipType == 14 && v4 != 220 )
1434 Dst.uEncantmentType = 2 * rand() % 4 + 2; 1434 Dst.uEnchantmentType = 2 * rand() % 4 + 2;
1435 pItemsTable->SetSpecialBonus(&Dst); 1435 pItemsTable->SetSpecialBonus(&Dst);
1436 if ( !pParty->AddItem(&Dst) ) 1436 if ( !pParty->AddItem(&Dst) )
1437 pParty->SetHoldingItem(&Dst); 1437 pParty->SetHoldingItem(&Dst);
1438 pActor->uCarriedItemID = 0; 1438 pActor->uCarriedItemID = 0;
1439 if ( pActor->array_000234[0].uItemID ) 1439 if ( pActor->array_000234[0].uItemID )
3754 v670 = (Vec3_int_ *)&v691; 3754 v670 = (Vec3_int_ *)&v691;
3755 v42 = (signed int)v726; 3755 v42 = (signed int)v726;
3756 LABEL_139: 3756 LABEL_139:
3757 DamageMonsterFromParty(8 * v42 | 2, v47, v670); 3757 DamageMonsterFromParty(8 * v42 | 2, v47, v670);
3758 goto LABEL_1056; 3758 goto LABEL_1056;
3759 case 2: 3759 case SPELL_FIRE_FIRE_BOLT:
3760 case 6: 3760 case 6:
3761 case 11: 3761 case 11:
3762 case 18: 3762 case 18:
3763 case 26: 3763 case 26:
3764 case 32: 3764 case 32:
3978 { 3978 {
3979 if (!v730c->Broken()) 3979 if (!v730c->Broken())
3980 { 3980 {
3981 if (!v730c->uSpecEnchantmentType) 3981 if (!v730c->uSpecEnchantmentType)
3982 { 3982 {
3983 if (!v730c->uEncantmentType) 3983 if (!v730c->uEnchantmentType)
3984 { 3984 {
3985 v68 = BYTE4(v726->pConditions[3]); 3985 v68 = BYTE4(v726->pConditions[3]);
3986 if ( !v68 || v68 == 1 || v68 == 2 ) 3986 if ( !v68 || v68 == 1 || v68 == 2 )
3987 { 3987 {
3988 if ( !pItemsTable->IsMaterialNonCommon(v730c) ) 3988 if ( !pItemsTable->IsMaterialNonCommon(v730c) )
4700 ++pTurnEngine->field_1C; 4700 ++pTurnEngine->field_1C;
4701 v188 += v732; 4701 v188 += v732;
4702 } 4702 }
4703 goto LABEL_1056; 4703 goto LABEL_1056;
4704 case 16: 4704 case 16:
4705 if ( pParty->uFlags & 8 ) 4705 if ( pParty->uFlags & PARTY_FLAGS_1_FALLING)
4706 { 4706 {
4707 v190 = pGlobalTXT_LocalizationStrings[493]; 4707 v190 = pGlobalTXT_LocalizationStrings[493]; // Can't cast Jump while airborne!
4708 goto LABEL_462; 4708 goto LABEL_462;
4709 } 4709 }
4710 if ( !pPlayer->CanCastSpell(uRequiredMana) ) 4710 if ( !pPlayer->CanCastSpell(uRequiredMana) )
4711 goto play_sound_and_continue; 4711 goto play_sound_and_continue;
4712 v191 = 0; 4712 v191 = 0;
4766 } 4766 }
4767 goto play_sound_and_continue; 4767 goto play_sound_and_continue;
4768 case 21: 4768 case 21:
4769 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) 4769 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor)
4770 { 4770 {
4771 v190 = pGlobalTXT_LocalizationStrings[494]; 4771 v190 = pGlobalTXT_LocalizationStrings[494]; // Can not cast Fly indoors!
4772 LABEL_462: 4772 LABEL_462:
4773 ShowStatusBarString(v190, 2u); 4773 ShowStatusBarString(v190, 2u);
4774 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); 4774 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0);
4775 goto play_sound_and_continue; 4775 goto play_sound_and_continue;
4776 } 4776 }
5305 else 5305 else
5306 { 5306 {
5307 if ( v731 != 4 5307 if ( v731 != 4
5308 || (v245 = (int)&v726->pInventoryItems[a2], v246 = *(int *)v245, *(int *)v245 > 134) 5308 || (v245 = (int)&v726->pInventoryItems[a2], v246 = *(int *)v245, *(int *)v245 > 134)
5309 || v726->pInventoryItems[a2].uSpecEnchantmentType != 0 5309 || v726->pInventoryItems[a2].uSpecEnchantmentType != 0
5310 || v726->pInventoryItems[a2].uEncantmentType != 0 5310 || v726->pInventoryItems[a2].uEnchantmentType != 0
5311 || v726->pInventoryItems[a2]._bonus_strength != 0 5311 || v726->pInventoryItems[a2]._bonus_strength != 0
5312 || (_this = (ItemGen *)((char *)&v726->pInventoryItems[a2] + 20), v726->pInventoryItems[a2].Broken()) ) 5312 || (_this = (ItemGen *)((char *)&v726->pInventoryItems[a2] + 20), v726->pInventoryItems[a2].Broken()) )
5313 goto LABEL_616; 5313 goto LABEL_616;
5314 v247 = (char *)&pItemsTable->pItems[v246].pIconName; 5314 v247 = (char *)&pItemsTable->pItems[v246].pIconName;
5315 LODWORD(v725) = (int)v247; 5315 LODWORD(v725) = (int)v247;
5410 _this = v289; 5410 _this = v289;
5411 v290 = v289->uItemID; 5411 v290 = v289->uItemID;
5412 LODWORD(v725) = (int)(char *)&pItemsTable + 48 * v290 + 4; 5412 LODWORD(v725) = (int)(char *)&pItemsTable + 48 * v290 + 4;
5413 if ( v290 > 134 5413 if ( v290 > 134
5414 || _this->uSpecEnchantmentType != 0 5414 || _this->uSpecEnchantmentType != 0
5415 || _this->uEncantmentType != 0 5415 || _this->uEnchantmentType != 0
5416 || _this->_bonus_strength != 0 5416 || _this->_bonus_strength != 0
5417 || (v291 = pItemsTable->pItems[v290].uEquipType) == 0 5417 || (v291 = pItemsTable->pItems[v290].uEquipType) == 0
5418 || v291 == 1 5418 || v291 == 1
5419 || v291 == 2 5419 || v291 == 2
5420 || _this->Broken()) 5420 || _this->Broken())
5485 else 5485 else
5486 { 5486 {
5487 v293 = rand(); 5487 v293 = rand();
5488 v294 = _this; 5488 v294 = _this;
5489 v295 = v293 % 10;// pItemsTable->field_116D8[pItemsTable->pItems[_this->uItemID].uEquipType]; 5489 v295 = v293 % 10;// pItemsTable->field_116D8[pItemsTable->pItems[_this->uItemID].uEquipType];
5490 _this->uEncantmentType = 0; 5490 _this->uEnchantmentType = 0;
5491 for ( kk = pItemsTable->pEnchantments[0].to_item[pItemsTable->pItems[v294->uItemID].uEquipType + 1]; 5491 for ( kk = pItemsTable->pEnchantments[0].to_item[pItemsTable->pItems[v294->uItemID].uEquipType + 1];
5492 ; 5492 ;
5493 kk += pItemsTable->pEnchantments[v294->uEncantmentType].to_item[pItemsTable->pItems[v294->uItemID].uEquipType 5493 kk += pItemsTable->pEnchantments[v294->uEnchantmentType].to_item[pItemsTable->pItems[v294->uItemID].uEquipType
5494 + 1] ) 5494 + 1] )
5495 { 5495 {
5496 ++v294->uEncantmentType; 5496 ++v294->uEnchantmentType;
5497 if ( kk >= v295 ) 5497 if ( kk >= v295 )
5498 break; 5498 break;
5499 } 5499 }
5500 v294->_bonus_strength = 10//pItemsTable->field_116D8[18] 5500 v294->_bonus_strength = 10//pItemsTable->field_116D8[18]
5501 + rand() % 10;//(pItemsTable->field_116D8[19] - pItemsTable->field_116D8[18] + 1); 5501 + rand() % 10;//(pItemsTable->field_116D8[19] - pItemsTable->field_116D8[18] + 1);