Mercurial > mm7
comparison mm7_5.cpp @ 377:243418228760
GetIdentifiedName
author | Gloval |
---|---|
date | Fri, 22 Feb 2013 22:27:45 +0400 |
parents | edd2d8b7e3c4 |
children | 84f53d7fc96d d95a91011d57 |
comparison
equal
deleted
inserted
replaced
376:615e6b6f55c2 | 377:243418228760 |
---|---|
5172 a2 = 4; | 5172 a2 = 4; |
5173 v17 = player->CalculateRangedDamageTo(v50); | 5173 v17 = player->CalculateRangedDamageTo(v50); |
5174 v19 = v4->stru_24.uItemID == 0; | 5174 v19 = v4->stru_24.uItemID == 0; |
5175 uDamageAmount = v17; | 5175 uDamageAmount = v17; |
5176 v57 = 0; | 5176 v57 = 0; |
5177 if ( !v19 && v4->stru_24.uAdditionalValue == 3 ) | 5177 if ( !v19 && v4->stru_24.uSpecEnchantmentType == 3 ) |
5178 { | 5178 { |
5179 a2 = 0; | 5179 a2 = 0; |
5180 v57 = (PlayerEquipment *)1; | 5180 v57 = (PlayerEquipment *)1; |
5181 } | 5181 } |
5182 if ( SHIDWORD(pMonster->pActorBuffs[15].uExpireTime) >= 0 | 5182 if ( SHIDWORD(pMonster->pActorBuffs[15].uExpireTime) >= 0 |
15271 pItemGen.uMaxCharges = LOBYTE(pItemGen.uNumCharges); | 15271 pItemGen.uMaxCharges = LOBYTE(pItemGen.uNumCharges); |
15272 } | 15272 } |
15273 else | 15273 else |
15274 { | 15274 { |
15275 if ( v26 >= 221 && v26 < 271 ) | 15275 if ( v26 >= 221 && v26 < 271 ) |
15276 pItemGen._bonus_type = rand() % 10 + 1; | 15276 pItemGen.uEncantmentType = rand() % 10 + 1; |
15277 } | 15277 } |
15278 pItemsTable->SetSpecialBonus(&pItemGen); | 15278 pItemsTable->SetSpecialBonus(&pItemGen); |
15279 pParty->SetHoldingItem(&pItemGen); | 15279 pParty->SetHoldingItem(&pItemGen); |
15280 } | 15280 } |
15281 } | 15281 } |
15740 && pParty->pPickedItem.uItemID != 233 ) | 15740 && pParty->pPickedItem.uItemID != 233 ) |
15741 goto LABEL_116; | 15741 goto LABEL_116; |
15742 v27 = &v0->pInventoryItems[pOut.z]; | 15742 v27 = &v0->pInventoryItems[pOut.z]; |
15743 v28 = v27->uItemID; | 15743 v28 = v27->uItemID; |
15744 v51 = pItemsTable->pItems[v27->uItemID].uEquipType; | 15744 v51 = pItemsTable->pItems[v27->uItemID].uEquipType; |
15745 v29 = (ItemGen *)(1800 * pParty->pPickedItem._bonus_type); | 15745 v29 = (ItemGen *)(1800 * pParty->pPickedItem.uEncantmentType); |
15746 if ( pParty->pPickedItem.uItemID != 233 ) | 15746 if ( pParty->pPickedItem.uItemID != 233 ) |
15747 { | 15747 { |
15748 if ( pParty->pPickedItem.uItemID == 236 ) | 15748 if ( pParty->pPickedItem.uItemID == 236 ) |
15749 { | 15749 { |
15750 v35 = v27->uAttributes; | 15750 v35 = v27->uAttributes; |
15761 { | 15761 { |
15762 v27->UpdateTempBonus(pParty->uTimePlayed); | 15762 v27->UpdateTempBonus(pParty->uTimePlayed); |
15763 v33 = v27->uItemID; | 15763 v33 = v27->uItemID; |
15764 if ( (signed int)v27->uItemID >= 64 && (signed int)v33 <= 65 | 15764 if ( (signed int)v27->uItemID >= 64 && (signed int)v33 <= 65 |
15765 || (pOut.y = v27->uAttributes, pOut.y & 2) | 15765 || (pOut.y = v27->uAttributes, pOut.y & 2) |
15766 || v27->uAdditionalValue | 15766 || v27->uSpecEnchantmentType |
15767 || v27->_bonus_type | 15767 || v27->uEncantmentType |
15768 || v51 && v51 != 1 && v51 != 2 | 15768 || v51 && v51 != 1 && v51 != 2 |
15769 || (signed int)v33 >= 500 ) | 15769 || (signed int)v33 >= 500 ) |
15770 goto LABEL_92; | 15770 goto LABEL_92; |
15771 v34 = *(int *)&aSbwb00[4 * pParty->pPickedItem.uItemID + 4]; | 15771 v34 = *(int *)&aSbwb00[4 * pParty->pPickedItem.uItemID + 4]; |
15772 a2.y = (int)v29 << 7; | 15772 a2.y = (int)v29 << 7; |
15773 v31 = (double)(signed int)((int)v29 << 7); | 15773 v31 = (double)(signed int)((int)v29 << 7); |
15774 v27->uAdditionalValue = v34; | 15774 v27->uSpecEnchantmentType = v34; |
15775 } | 15775 } |
15776 else | 15776 else |
15777 { | 15777 { |
15778 if ( pParty->pPickedItem.uItemID != 263 | 15778 if ( pParty->pPickedItem.uItemID != 263 |
15779 || (v27->UpdateTempBonus(pParty->uTimePlayed), v30 = v27->uItemID, (signed int)v27->uItemID >= 64) | 15779 || (v27->UpdateTempBonus(pParty->uTimePlayed), v30 = v27->uItemID, (signed int)v27->uItemID >= 64) |
15780 && (signed int)v30 <= 65 | 15780 && (signed int)v30 <= 65 |
15781 || (pOut.y = v27->uAttributes, pOut.y & 2) | 15781 || (pOut.y = v27->uAttributes, pOut.y & 2) |
15782 || v27->uAdditionalValue | 15782 || v27->uSpecEnchantmentType |
15783 || v27->_bonus_type | 15783 || v27->uEncantmentType |
15784 || v51 && v51 != 1 && v51 != 2 | 15784 || v51 && v51 != 1 && v51 != 2 |
15785 || (signed int)v30 >= 500 ) | 15785 || (signed int)v30 >= 500 ) |
15786 goto LABEL_92; | 15786 goto LABEL_92; |
15787 a2.y = (int)v29 << 7; | 15787 a2.y = (int)v29 << 7; |
15788 v27->uAdditionalValue = 40; | 15788 v27->uSpecEnchantmentType = 40; |
15789 v31 = (double)a2.y; | 15789 v31 = (double)a2.y; |
15790 } | 15790 } |
15791 v32 = pParty->uTimePlayed + (signed int)(signed __int64)(v31 * 0.033333335); | 15791 v32 = pParty->uTimePlayed + (signed int)(signed __int64)(v31 * 0.033333335); |
15792 LODWORD(v27->uExpireTime) = v32; | 15792 LODWORD(v27->uExpireTime) = v32; |
15793 LODWORD(v32) = pOut.y; | 15793 LODWORD(v32) = pOut.y; |
15796 v27->uAttributes = v32; | 15796 v27->uAttributes = v32; |
15797 } | 15797 } |
15798 dword_50C9A8 = 256; | 15798 dword_50C9A8 = 256; |
15799 goto LABEL_92; | 15799 goto LABEL_92; |
15800 } | 15800 } |
15801 v36 = (70.0 - (double)pParty->pPickedItem._bonus_type) * 0.01; | 15801 v36 = (70.0 - (double)pParty->pPickedItem.uEncantmentType) * 0.01; |
15802 if ( v36 < 0.0 ) | 15802 if ( v36 < 0.0 ) |
15803 v36 = 0.0; | 15803 v36 = 0.0; |
15804 if ( v51 != 12 ) | 15804 if ( v51 != 12 ) |
15805 { | 15805 { |
15806 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); | 15806 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); |
15943 v19 = v0->AddItem(0xFFFFFFFFu, 0xDCu); | 15943 v19 = v0->AddItem(0xFFFFFFFFu, 0xDCu); |
15944 if ( v19 ) | 15944 if ( v19 ) |
15945 *(int *)&v0->field_1F5[36 * v19 + 15] = 1; | 15945 *(int *)&v0->field_1F5[36 * v19 + 15] = 1; |
15946 v20 = v47 + 50 * v15; | 15946 v20 = v47 + 50 * v15; |
15947 v0->pInventoryItems[pOut.z].uItemID = v51; | 15947 v0->pInventoryItems[pOut.z].uItemID = v51; |
15948 v0->pInventoryItems[pOut.z]._bonus_type = (pParty->pPickedItem._bonus_type | 15948 v0->pInventoryItems[pOut.z].uEncantmentType = (pParty->pPickedItem.uEncantmentType |
15949 + v0->pInventoryItems[pOut.z]._bonus_type) | 15949 + v0->pInventoryItems[pOut.z].uEncantmentType) |
15950 / 2; | 15950 / 2; |
15951 v0->SetVariable(VAR_AutoNotes, *(short *)&pItemsTable->potion_note[2 * v20 ]);//field_10168 + 388 | 15951 v0->SetVariable(VAR_AutoNotes, *(short *)&pItemsTable->potion_note[2 * v20 ]);//field_10168 + 388 |
15952 LABEL_74: | 15952 LABEL_74: |
15953 v22 = (int)((char *)v0 + 36 * pOut.z); | 15953 v22 = (int)((char *)v0 + 36 * pOut.z); |
15954 if ( !(pItemsTable->pItems[*(int *)(v22 + 532) ].uItemID_Rep_St) ) | 15954 if ( !(pItemsTable->pItems[*(int *)(v22 + 532) ].uItemID_Rep_St) ) |
15961 if ( v45 ) | 15961 if ( v45 ) |
15962 { | 15962 { |
15963 if ( *(int *)(a2.y + 532) == 221 ) | 15963 if ( *(int *)(a2.y + 532) == 221 ) |
15964 *(int *)(a2.y + 532) = pParty->pPickedItem.uItemID; | 15964 *(int *)(a2.y + 532) = pParty->pPickedItem.uItemID; |
15965 else | 15965 else |
15966 *(int *)(a2.y + 536) = pParty->pPickedItem._bonus_type; | 15966 *(int *)(a2.y + 536) = pParty->pPickedItem.uEncantmentType; |
15967 v21 = v0->AddItem(0xFFFFFFFFu, 0xDCu); | 15967 v21 = v0->AddItem(0xFFFFFFFFu, 0xDCu); |
15968 if ( v21 ) | 15968 if ( v21 ) |
15969 *(int *)&v0->field_1F5[36 * v21 + 15] = 1; | 15969 *(int *)&v0->field_1F5[36 * v21 + 15] = 1; |
15970 goto LABEL_74; | 15970 goto LABEL_74; |
15971 } | 15971 } |