Mercurial > mm7
comparison mm7_5.cpp @ 232:c879446b4a22
inventory indexing fixed
author | zipi |
---|---|
date | Sun, 17 Feb 2013 15:04:56 +0100 |
parents | 1bd823f52e3a |
children | 47e06334c564 ccf14ac29caf |
comparison
equal
deleted
inserted
replaced
231:a69fc44061d5 | 232:c879446b4a22 |
---|---|
5453 v57 = &pPlayer->pEquipment; | 5453 v57 = &pPlayer->pEquipment; |
5454 do | 5454 do |
5455 { | 5455 { |
5456 if ( pPlayer->HasItemEquipped((ITEM_EQUIP_TYPE)v59) ) | 5456 if ( pPlayer->HasItemEquipped((ITEM_EQUIP_TYPE)v59) ) |
5457 { | 5457 { |
5458 auto _s = (ItemGen *)&pPlayer->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v57->uOffHand + 5]; | 5458 auto _s = (ItemGen *)&pPlayer->pInventoryItems[v57->uOffHand-1]; |
5459 a4 = _s->_439DF3_get_additional_damage(&a2, &v62); | 5459 a4 = _s->_439DF3_get_additional_damage(&a2, &v62); |
5460 if ( v62 && pMonster->sCurrentHP > 0 ) | 5460 if ( v62 && pMonster->sCurrentHP > 0 ) |
5461 { | 5461 { |
5462 pPlayer->sHealth += v61 / 5; | 5462 pPlayer->sHealth += v61 / 5; |
5463 if ( pPlayer->sHealth > pPlayer->GetMaxHealth() ) | 5463 if ( pPlayer->sHealth > pPlayer->GetMaxHealth() ) |
5931 if ( v45->HasEnchantedItemEquipped(36) ) | 5931 if ( v45->HasEnchantedItemEquipped(36) ) |
5932 v77 >>= 1; | 5932 v77 >>= 1; |
5933 if ( v45->HasEnchantedItemEquipped(69) ) | 5933 if ( v45->HasEnchantedItemEquipped(69) ) |
5934 v77 >>= 1; | 5934 v77 >>= 1; |
5935 if ( v45->HasItemEquipped(EQUIP_ARMOUR) | 5935 if ( v45->HasItemEquipped(EQUIP_ARMOUR) |
5936 && *(_DWORD *)&v45->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v45->pEquipment.uBody + 5] == 504 ) | 5936 && *(_DWORD *)&v45->pInventoryItems[v45->pEquipment.uBody-1] == 504 ) |
5937 v77 >>= 1; | 5937 v77 >>= 1; |
5938 v75 = 0; | 5938 v75 = 0; |
5939 v47 = (int)&v45->pEquipment; | 5939 v47 = (int)&v45->pEquipment; |
5940 do | 5940 do |
5941 { | 5941 { |
7287 { | 7287 { |
7288 v21 = pPlayer->pEquipment.uBow; //сначало рисуется лук | 7288 v21 = pPlayer->pEquipment.uBow; //сначало рисуется лук |
7289 if ( !v21 ) | 7289 if ( !v21 ) |
7290 goto LABEL_59; | 7290 goto LABEL_59; |
7291 v230 = pPlayer->pEquipment.uBow; | 7291 v230 = pPlayer->pEquipment.uBow; |
7292 v22 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v21 + 5]; | 7292 v22 = (int)&v217->pInventoryItems[v21-1]; |
7293 v23 = *(int *)v22; | 7293 v23 = *(int *)v22; |
7294 v24 = pPaperdoll_BodyX + array_4E4C30[pBodyComplection].equip_x - pItemsTable->pItems[v23].uEquipX; | 7294 v24 = pPaperdoll_BodyX + array_4E4C30[pBodyComplection].equip_x - pItemsTable->pItems[v23].uEquipX; |
7295 a3b = pPaperdoll_BodyY + array_4E4C30[pBodyComplection].equip_y - pItemsTable->pItems[v23].uEquipY; | 7295 a3b = pPaperdoll_BodyY + array_4E4C30[pBodyComplection].equip_y - pItemsTable->pItems[v23].uEquipY; |
7296 v241 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v23].pIconName, TEXTURE_16BIT_PALETTE); | 7296 v241 = pIcons_LOD->LoadTexture(pItemsTable->pItems[v23].pIconName, TEXTURE_16BIT_PALETTE); |
7297 v25 = *(int *)(v22 + 20); | 7297 v25 = *(int *)(v22 + 20); |
7323 LABEL_59: | 7323 LABEL_59: |
7324 v31 = v217->pEquipment.uCloak;// потом плащ | 7324 v31 = v217->pEquipment.uCloak;// потом плащ |
7325 if ( !v31 ) | 7325 if ( !v31 ) |
7326 goto LABEL_93; | 7326 goto LABEL_93; |
7327 v231 = v217->pEquipment.uCloak; | 7327 v231 = v217->pEquipment.uCloak; |
7328 v32 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v31 + 5]; | 7328 v32 = (int)&v217->pInventoryItems[v31-1]; |
7329 v219 = v32; | 7329 v219 = v32; |
7330 if ( *(int *)v32 != 525 ) | 7330 if ( *(int *)v32 != 525 ) |
7331 { | 7331 { |
7332 switch ( *(int *)v32 ) | 7332 switch ( *(int *)v32 ) |
7333 { | 7333 { |
7375 (Texture *)(*(unsigned int *)((char *)papredoll_dbods + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dbods + v240)] : 0)); | 7375 (Texture *)(*(unsigned int *)((char *)papredoll_dbods + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dbods + v240)] : 0)); |
7376 v43 = v217->pEquipment.uBody;// потом тело | 7376 v43 = v217->pEquipment.uBody;// потом тело |
7377 if ( !v43 ) | 7377 if ( !v43 ) |
7378 goto LABEL_127; | 7378 goto LABEL_127; |
7379 v232 = v217->pEquipment.uBody; | 7379 v232 = v217->pEquipment.uBody; |
7380 v44 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v43 + 5]; | 7380 v44 = (int)&v217->pInventoryItems[v43-1]; |
7381 v220 = v44; | 7381 v220 = v44; |
7382 if ( *(int *)v44 != 504 ) | 7382 if ( *(int *)v44 != 504 ) |
7383 { | 7383 { |
7384 if ( *(int *)v44 == 505 ) | 7384 if ( *(int *)v44 == 505 ) |
7385 { | 7385 { |
7434 LABEL_127: | 7434 LABEL_127: |
7435 v56 = v217->pEquipment.field_20; | 7435 v56 = v217->pEquipment.field_20; |
7436 if ( !v56 ) | 7436 if ( !v56 ) |
7437 goto LABEL_155; | 7437 goto LABEL_155; |
7438 v233 = v217->pEquipment.field_20; | 7438 v233 = v217->pEquipment.field_20; |
7439 v57 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v56 + 5]; | 7439 v57 = (int)&v217->pInventoryItems[v56-1]; |
7440 v221 = v57; | 7440 v221 = v57; |
7441 v58 = *(int *)v57; | 7441 v58 = *(int *)v57; |
7442 if ( *(int *)v57 == 529 ) | 7442 if ( *(int *)v57 == 529 ) |
7443 { | 7443 { |
7444 a3e = pPaperdoll_BodyY + paredoll_array_4E54B8[pBodyComplection][1]; | 7444 a3e = pPaperdoll_BodyY + paredoll_array_4E54B8[pBodyComplection][1]; |
7498 pRenderer->_4A612A(a2e, a3e, v67, v233); | 7498 pRenderer->_4A612A(a2e, a3e, v67, v233); |
7499 LABEL_155: | 7499 LABEL_155: |
7500 v68 = v217; | 7500 v68 = v217; |
7501 v69 = v217->pEquipment.uMainHand; | 7501 v69 = v217->pEquipment.uMainHand; |
7502 uPlayerID_a = 2 * pBodyComplection; | 7502 uPlayerID_a = 2 * pBodyComplection; |
7503 if ( !v69 || (v70 = *(int *)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v69 + 5], | 7503 if ( !v69 || (v70 = *(int *)&v217->pInventoryItems[v69-1], |
7504 pItemsTable->pItems[v70].uEquipType != 1) | 7504 pItemsTable->pItems[v70].uEquipType != 1) |
7505 && (pItemsTable->pItems[v70].uSkillType != 4 || v217->pEquipment.uOffHand) ) | 7505 && (pItemsTable->pItems[v70].uSkillType != 4 || v217->pEquipment.uOffHand) ) |
7506 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[2 * pBodyComplection], | 7506 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[2 * pBodyComplection], |
7507 pPaperdoll_BodyY + pPaperdoll_LeftHand[2 * pBodyComplection + 1], | 7507 pPaperdoll_BodyY + pPaperdoll_LeftHand[2 * pBodyComplection + 1], |
7508 (Texture *)(*(unsigned int *)((char *)papredoll_dlads + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlads + v240)] : 0)); | 7508 (Texture *)(*(unsigned int *)((char *)papredoll_dlads + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlads + v240)] : 0)); |
7509 v71 = v217->pEquipment.uBelt; | 7509 v71 = v217->pEquipment.uBelt; |
7510 if ( v71 ) | 7510 if ( v71 ) |
7511 { | 7511 { |
7512 v234 = v217->pEquipment.uBelt; | 7512 v234 = v217->pEquipment.uBelt; |
7513 v72 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v71 + 5]; | 7513 v72 = (int)&v217->pInventoryItems[v71-1]; |
7514 v222 = v72; | 7514 v222 = v72; |
7515 if ( *(int *)v72 == 524 ) | 7515 if ( *(int *)v72 == 524 ) |
7516 { | 7516 { |
7517 v73 = 5; | 7517 v73 = 5; |
7518 } | 7518 } |
7600 } | 7600 } |
7601 LABEL_192: | 7601 LABEL_192: |
7602 v82 = v68->pEquipment.uMainHand; | 7602 v82 = v68->pEquipment.uMainHand; |
7603 if ( v82 ) | 7603 if ( v82 ) |
7604 { | 7604 { |
7605 v83 = *(int *)&v68->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v82 + 5]; | 7605 v83 = *(int *)&v68->pInventoryItems[v82-1]; |
7606 if ( pItemsTable->pItems[v83].uEquipType == 1 | 7606 if ( pItemsTable->pItems[v83].uEquipType == 1 |
7607 || pItemsTable->pItems[v83].uSkillType == 4 && !v68->pEquipment.uOffHand ) | 7607 || pItemsTable->pItems[v83].uSkillType == 4 && !v68->pEquipment.uOffHand ) |
7608 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[uPlayerID_a], | 7608 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[uPlayerID_a], |
7609 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[uPlayerID_a + 1], | 7609 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[uPlayerID_a + 1], |
7610 (Texture *)(*(unsigned int *)((char *)papredoll_dlaus + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlaus + v240)] : 0)); | 7610 (Texture *)(*(unsigned int *)((char *)papredoll_dlaus + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlaus + v240)] : 0)); |
7632 LABEL_259: | 7632 LABEL_259: |
7633 v111 = v68->pEquipment.uCloak; | 7633 v111 = v68->pEquipment.uCloak; |
7634 if ( !v111 ) | 7634 if ( !v111 ) |
7635 goto LABEL_293; | 7635 goto LABEL_293; |
7636 v236 = v68->pEquipment.uCloak; | 7636 v236 = v68->pEquipment.uCloak; |
7637 v112 = (int)&v68->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v111 + 5]; | 7637 v112 = (int)&v68->pInventoryItems[v111-1]; |
7638 v225 = v112; | 7638 v225 = v112; |
7639 v113 = *(int *)v112; | 7639 v113 = *(int *)v112; |
7640 if ( v113 != 525 ) | 7640 if ( v113 != 525 ) |
7641 { | 7641 { |
7642 switch ( v113 ) | 7642 switch ( v113 ) |
7680 } | 7680 } |
7681 v123 = v68->pEquipment.uHelm; | 7681 v123 = v68->pEquipment.uHelm; |
7682 if ( !v123 ) | 7682 if ( !v123 ) |
7683 goto LABEL_335; | 7683 goto LABEL_335; |
7684 v237 = v123; | 7684 v237 = v123; |
7685 v124 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v123 + 5]; | 7685 v124 = (int)&v217->pInventoryItems[v123-1]; |
7686 v226 = v124; | 7686 v226 = v124; |
7687 if ( *(int *)v124 != 521 ) | 7687 if ( *(int *)v124 != 521 ) |
7688 { | 7688 { |
7689 switch ( *(int *)v124 ) | 7689 switch ( *(int *)v124 ) |
7690 { | 7690 { |
7785 LABEL_335: | 7785 LABEL_335: |
7786 v134 = v217->pEquipment.uMainHand; | 7786 v134 = v217->pEquipment.uMainHand; |
7787 if ( !v134 ) | 7787 if ( !v134 ) |
7788 goto LABEL_358; | 7788 goto LABEL_358; |
7789 v238 = v217->pEquipment.uMainHand; | 7789 v238 = v217->pEquipment.uMainHand; |
7790 v135 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v134 + 5]; | 7790 v135 = (int)&v217->pInventoryItems[v134-1]; |
7791 v227 = v135; | 7791 v227 = v135; |
7792 v136 = *(int *)v135; | 7792 v136 = *(int *)v135; |
7793 v137 = *(int *)v135; | 7793 v137 = *(int *)v135; |
7794 a2k = pPaperdoll_BodyX | 7794 a2k = pPaperdoll_BodyX |
7795 + array_4E4C30[pBodyComplection].field_8 | 7795 + array_4E4C30[pBodyComplection].field_8 |
7830 LABEL_358: | 7830 LABEL_358: |
7831 v145 = v217->pEquipment.uOffHand; | 7831 v145 = v217->pEquipment.uOffHand; |
7832 v249 = v217->pEquipment.uOffHand; | 7832 v249 = v217->pEquipment.uOffHand; |
7833 if ( !v145 ) | 7833 if ( !v145 ) |
7834 goto LABEL_393; | 7834 goto LABEL_393; |
7835 v146 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v145 + 5]; | 7835 v146 = (int)&v217->pInventoryItems[v145-1]; |
7836 v228 = v146; | 7836 v228 = v146; |
7837 v147 = *(int *)v146; | 7837 v147 = *(int *)v146; |
7838 v148 = *(int *)v146; | 7838 v148 = *(int *)v146; |
7839 v149 = pItemsTable->pItems[v148].uSkillType; | 7839 v149 = pItemsTable->pItems[v148].uSkillType; |
7840 if ( v149 != 2 && v149 != 1 ) | 7840 if ( v149 != 2 && v149 != 1 ) |
8457 (Texture *)(*(unsigned int *)((char *)papredoll_dbods + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dbods + v240)] : 0), | 8457 (Texture *)(*(unsigned int *)((char *)papredoll_dbods + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dbods + v240)] : 0), |
8458 pPlayer->pEquipment.uBody); | 8458 pPlayer->pEquipment.uBody); |
8459 uPlayerID_a = 2 * v5; | 8459 uPlayerID_a = 2 * v5; |
8460 v6 = pPlayer->pEquipment.uMainHand; | 8460 v6 = pPlayer->pEquipment.uMainHand; |
8461 if ( !v6 | 8461 if ( !v6 |
8462 || (v7 = *(int *)&pPlayer->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v6 + 5], pItemsTable->pItems[v7].uEquipType != 1) | 8462 || (v7 = *(int *)&pPlayer->pInventoryItems[v6-1], pItemsTable->pItems[v7].uEquipType != 1) |
8463 && (pItemsTable->pItems[v7].uSkillType != 4 || pPlayer->pEquipment.uOffHand) ) | 8463 && (pItemsTable->pItems[v7].uSkillType != 4 || pPlayer->pEquipment.uOffHand) ) |
8464 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[2 * v5], pPaperdoll_BodyY + pPaperdoll_LeftHand[2 * v5 + 1], | 8464 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[2 * v5], pPaperdoll_BodyY + pPaperdoll_LeftHand[2 * v5 + 1], |
8465 (Texture *)(*(unsigned int *)((char *)papredoll_dlads + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlads + v240)] : 0)); | 8465 (Texture *)(*(unsigned int *)((char *)papredoll_dlads + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlads + v240)] : 0)); |
8466 //(Texture *)(*(unsigned int *)((char *)papredoll_dlads + v240) != -1 ? 72 | 8466 //(Texture *)(*(unsigned int *)((char *)papredoll_dlads + v240) != -1 ? 72 |
8467 // * *(unsigned int *)((char *)papredoll_dlads | 8467 // * *(unsigned int *)((char *)papredoll_dlads |
8469 // + 7145548 : 0)); | 8469 // + 7145548 : 0)); |
8470 v8 = pPlayer->pEquipment.uMainHand; | 8470 v8 = pPlayer->pEquipment.uMainHand; |
8471 if ( v8 ) | 8471 if ( v8 ) |
8472 { | 8472 { |
8473 v229 = pPlayer->pEquipment.uMainHand; | 8473 v229 = pPlayer->pEquipment.uMainHand; |
8474 v9 = (int)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v8 + 5]; | 8474 v9 = (int)&v217->pInventoryItems[v8-1]; |
8475 v10 = v5 << 7; | 8475 v10 = v5 << 7; |
8476 v218 = v9; | 8476 v218 = v9; |
8477 v11 = *(int *)v9; | 8477 v11 = *(int *)v9; |
8478 v12 = *(int *)v9; | 8478 v12 = *(int *)v9; |
8479 v13 = pPaperdoll_BodyX + array_4E4C30[v5].field_8 - pItemsTable->pItems[v12].uEquipX; | 8479 v13 = pPaperdoll_BodyX + array_4E4C30[v5].field_8 - pItemsTable->pItems[v12].uEquipX; |
8559 // * *(unsigned int *)((char *)papredoll_drhs + v240) | 8559 // * *(unsigned int *)((char *)papredoll_drhs + v240) |
8560 // + 7145548 : 0)); | 8560 // + 7145548 : 0)); |
8561 v161 = v217->pEquipment.uMainHand; | 8561 v161 = v217->pEquipment.uMainHand; |
8562 if ( v161 ) | 8562 if ( v161 ) |
8563 { | 8563 { |
8564 v162 = *(int *)&v217->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v161 + 5]; | 8564 v162 = *(int *)&v217->pInventoryItems[v161-1]; |
8565 if ( pItemsTable->pItems[v162].uEquipType == 1 | 8565 if ( pItemsTable->pItems[v162].uEquipType == 1 |
8566 || pItemsTable->pItems[v162].uSkillType == 4 && !v217->pEquipment.uOffHand ) | 8566 || pItemsTable->pItems[v162].uSkillType == 4 && !v217->pEquipment.uOffHand ) |
8567 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[uPlayerID_a], | 8567 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[uPlayerID_a], |
8568 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[uPlayerID_a + 1], | 8568 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[uPlayerID_a + 1], |
8569 (Texture *)(*(unsigned int *)((char *)papredoll_dlhus + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlhus + v240)] : 0)); | 8569 (Texture *)(*(unsigned int *)((char *)papredoll_dlhus + v240) != -1 ? (int)&pIcons_LOD->pTextures[*(unsigned int *)((char *)papredoll_dlhus + v240)] : 0)); |
8732 while ( (unsigned __int8)(v13 ^ v14) | v11 ); | 8732 while ( (unsigned __int8)(v13 ^ v14) | v11 ); |
8733 v15 = pPlayer->pEquipment.field_24; | 8733 v15 = pPlayer->pEquipment.field_24; |
8734 if ( !v15 ) | 8734 if ( !v15 ) |
8735 goto LABEL_46; | 8735 goto LABEL_46; |
8736 v41 = pPlayer->pEquipment.field_24; | 8736 v41 = pPlayer->pEquipment.field_24; |
8737 v49 = (int)&pPlayer->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v15 + 5]; | 8737 v49 = (int)&pPlayer->pInventoryItems[v15-1]; |
8738 v16 = pIcons_LOD->LoadTexture(pItemsTable->pItems[*(int *)v49].pIconName, TEXTURE_16BIT_PALETTE); | 8738 v16 = pIcons_LOD->LoadTexture(pItemsTable->pItems[*(int *)v49].pIconName, TEXTURE_16BIT_PALETTE); |
8739 v17 = *(int *)(v49 + 20); | 8739 v17 = *(int *)(v49 + 20); |
8740 if ( !(*(int *)(v49 + 20) & 0xF0) ) | 8740 if ( !(*(int *)(v49 + 20) & 0xF0) ) |
8741 { | 8741 { |
8742 v20 = v16 + 1; | 8742 v20 = v16 + 1; |
8814 LABEL_46: | 8814 LABEL_46: |
8815 v26 = pPlayer->pEquipment.field_1C; | 8815 v26 = pPlayer->pEquipment.field_1C; |
8816 if ( !v26 ) | 8816 if ( !v26 ) |
8817 return; | 8817 return; |
8818 v43 = pPlayer->pEquipment.field_1C; | 8818 v43 = pPlayer->pEquipment.field_1C; |
8819 v27 = (int)&pPlayer->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v26 + 5]; | 8819 v27 = (int)&pPlayer->pInventoryItems[v26-1]; |
8820 v28 = pIcons_LOD->LoadTexture(pItemsTable->pItems[*(int *)v27].pIconName, TEXTURE_16BIT_PALETTE); | 8820 v28 = pIcons_LOD->LoadTexture(pItemsTable->pItems[*(int *)v27].pIconName, TEXTURE_16BIT_PALETTE); |
8821 v29 = *(int *)(v27 + 20); | 8821 v29 = *(int *)(v27 + 20); |
8822 if ( !(*(int *)(v27 + 20) & 0xF0) ) | 8822 if ( !(*(int *)(v27 + 20) & 0xF0) ) |
8823 { | 8823 { |
8824 v33 = v28 + 1; | 8824 v33 = v28 + 1; |
8986 while ( 1 ) | 8986 while ( 1 ) |
8987 { | 8987 { |
8988 if ( *v5 ) | 8988 if ( *v5 ) |
8989 { | 8989 { |
8990 result = 9 * *v5; | 8990 result = 9 * *v5; |
8991 if ( *(int *)&pPlayer->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * *v5 + 5] == uItemID ) | 8991 if ( *(int *)&pPlayer->pInventoryItems[*v5-1] == uItemID ) |
8992 break; | 8992 break; |
8993 } | 8993 } |
8994 ++v4; | 8994 ++v4; |
8995 ++v5; | 8995 ++v5; |
8996 if ( v4 >= 126 ) | 8996 if ( v4 >= 126 ) |