Mercurial > mm7
comparison UI/UICharacter.cpp @ 1384:b51332ab228f
changed a few member variables in Player to slightly less confusing names
author | Grumpy7 |
---|---|
date | Tue, 16 Jul 2013 20:51:29 +0200 |
parents | b691c96d8e06 |
children | 28f87f5234a1 |
comparison
equal
deleted
inserted
replaced
1383:0a4254e80036 | 1384:b51332ab228f |
---|---|
926 { | 926 { |
927 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1])); | 927 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1])); |
928 if ( !bRingsShownInCharScreen ) | 928 if ( !bRingsShownInCharScreen ) |
929 pRenderer->DrawMaskToZBuffer(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]), player->pEquipment.uArmor); | 929 pRenderer->DrawMaskToZBuffer(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]), player->pEquipment.uArmor); |
930 v6 = player->pEquipment.uMainHand; | 930 v6 = player->pEquipment.uMainHand; |
931 if ( !v6 || (v7 = *(int *)&pPlayers[uPlayerID]->pInventoryItems[v6-1], pItemsTable->pItems[v7].uEquipType != 1) | 931 if ( !v6 || (v7 = *(int *)&pPlayers[uPlayerID]->pInventoryItemList[v6-1], pItemsTable->pItems[v7].uEquipType != 1) |
932 && (pItemsTable->pItems[v7].uSkillType != 4 || pPlayers[uPlayerID]->pEquipment.uShield) ) | 932 && (pItemsTable->pItems[v7].uSkillType != 4 || pPlayers[uPlayerID]->pEquipment.uShield) ) |
933 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1], | 933 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1], |
934 pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1])); | 934 pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1])); |
935 pMainHandNum4 = pPlayers[uPlayerID]->pEquipment.uMainHand; | 935 pMainHandNum4 = pPlayers[uPlayerID]->pEquipment.uMainHand; |
936 if ( pMainHandNum4 ) | 936 if ( pMainHandNum4 ) |
937 { | 937 { |
938 item_MainHand4 = &pPlayers[uPlayerID]->pInventoryItems[pMainHandNum4 - 1]; | 938 item_MainHand4 = &pPlayers[uPlayerID]->pInventoryItemList[pMainHandNum4 - 1]; |
939 pX_MainHand4 = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[item_MainHand4->uItemID].uEquipX; | 939 pX_MainHand4 = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[item_MainHand4->uItemID].uEquipX; |
940 pY_MainHand4 = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][1][1] - pItemsTable->pItems[item_MainHand4->uItemID].uEquipY; | 940 pY_MainHand4 = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][1][1] - pItemsTable->pItems[item_MainHand4->uItemID].uEquipY; |
941 if ( item_MainHand4->uItemID == 64 ) //blaster | 941 if ( item_MainHand4->uItemID == 64 ) //blaster |
942 v166 = "item64v1"; | 942 v166 = "item64v1"; |
943 else | 943 else |
985 else// без акваланга | 985 else// без акваланга |
986 { | 986 { |
987 pBowNum = pPlayers[uPlayerID]->pEquipment.uBow; //сначала рисуется лук | 987 pBowNum = pPlayers[uPlayerID]->pEquipment.uBow; //сначала рисуется лук |
988 if ( pBowNum ) | 988 if ( pBowNum ) |
989 { | 989 { |
990 itemBow = &pPlayers[uPlayerID]->pInventoryItems[pBowNum - 1]; | 990 itemBow = &pPlayers[uPlayerID]->pInventoryItemList[pBowNum - 1]; |
991 pX_Bow = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][2][0] - pItemsTable->pItems[itemBow->uItemID].uEquipX; | 991 pX_Bow = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][2][0] - pItemsTable->pItems[itemBow->uItemID].uEquipX; |
992 pY_Bow = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][2][1] - pItemsTable->pItems[itemBow->uItemID].uEquipY; | 992 pY_Bow = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][2][1] - pItemsTable->pItems[itemBow->uItemID].uEquipY; |
993 pBowTextureNum = pIcons_LOD->LoadTexture(pItemsTable->pItems[itemBow->uItemID].pIconName, TEXTURE_16BIT_PALETTE); | 993 pBowTextureNum = pIcons_LOD->LoadTexture(pItemsTable->pItems[itemBow->uItemID].pIconName, TEXTURE_16BIT_PALETTE); |
994 if ( !(itemBow->uAttributes & 0xF0) )// если не применён закл | 994 if ( !(itemBow->uAttributes & 0xF0) )// если не применён закл |
995 { | 995 { |
1029 pRenderer->DrawMaskToZBuffer(pX_Bow, pY_Bow, pIcons_LOD->GetTexture(pBowTextureNum), pBowNum); | 1029 pRenderer->DrawMaskToZBuffer(pX_Bow, pY_Bow, pIcons_LOD->GetTexture(pBowTextureNum), pBowNum); |
1030 } | 1030 } |
1031 pCloakNum = pPlayers[uPlayerID]->pEquipment.uCloak;// потом плащ | 1031 pCloakNum = pPlayers[uPlayerID]->pEquipment.uCloak;// потом плащ |
1032 if ( pCloakNum ) | 1032 if ( pCloakNum ) |
1033 { | 1033 { |
1034 item_Cloak = &pPlayers[uPlayerID]->pInventoryItems[pCloakNum - 1]; | 1034 item_Cloak = &pPlayers[uPlayerID]->pInventoryItemList[pCloakNum - 1]; |
1035 switch ( item_Cloak->uItemID ) | 1035 switch ( item_Cloak->uItemID ) |
1036 { | 1036 { |
1037 case ITEM_RELIC_TWILIGHT: | 1037 case ITEM_RELIC_TWILIGHT: |
1038 v33 = 5; | 1038 v33 = 5; |
1039 break; | 1039 break; |
1094 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY,//рисуется кукла | 1094 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY,//рисуется кукла |
1095 pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1])); | 1095 pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1])); |
1096 pArmorNum = pPlayers[uPlayerID]->pEquipment.uArmor;// потом броня | 1096 pArmorNum = pPlayers[uPlayerID]->pEquipment.uArmor;// потом броня |
1097 if ( pArmorNum ) | 1097 if ( pArmorNum ) |
1098 { | 1098 { |
1099 item_Armor = &pPlayers[uPlayerID]->pInventoryItems[pArmorNum - 1]; | 1099 item_Armor = &pPlayers[uPlayerID]->pInventoryItemList[pArmorNum - 1]; |
1100 switch ( item_Armor->uItemID ) | 1100 switch ( item_Armor->uItemID ) |
1101 { | 1101 { |
1102 case 504: | 1102 case 504: |
1103 v45 = 15; | 1103 v45 = 15; |
1104 break; | 1104 break; |
1263 } | 1263 } |
1264 } | 1264 } |
1265 pBootNum = pPlayers[uPlayerID]->pEquipment.uBoot;//далее обувь | 1265 pBootNum = pPlayers[uPlayerID]->pEquipment.uBoot;//далее обувь |
1266 if ( pBootNum ) | 1266 if ( pBootNum ) |
1267 { | 1267 { |
1268 item_Boot = &pPlayers[uPlayerID]->pInventoryItems[pBootNum - 1]; | 1268 item_Boot = &pPlayers[uPlayerID]->pInventoryItemList[pBootNum - 1]; |
1269 switch ( item_Boot->uItemID ) | 1269 switch ( item_Boot->uItemID ) |
1270 { | 1270 { |
1271 case 529: | 1271 case 529: |
1272 v60 = 5; | 1272 v60 = 5; |
1273 v59 = papredoll_flying_feet[pPlayers[uPlayerID]->uCurrentFace]; | 1273 v59 = papredoll_flying_feet[pPlayers[uPlayerID]->uCurrentFace]; |
1323 if ( !bRingsShownInCharScreen ) | 1323 if ( !bRingsShownInCharScreen ) |
1324 pRenderer->DrawMaskToZBuffer(pX_Boot, pY_Boot, (Texture *)v66, pBootNum); | 1324 pRenderer->DrawMaskToZBuffer(pX_Boot, pY_Boot, (Texture *)v66, pBootNum); |
1325 } | 1325 } |
1326 } | 1326 } |
1327 pMainHandNum = pPlayers[uPlayerID]->pEquipment.uMainHand; | 1327 pMainHandNum = pPlayers[uPlayerID]->pEquipment.uMainHand; |
1328 if ( !pMainHandNum || (v70 = *(int *)&pPlayers[uPlayerID]->pInventoryItems[pMainHandNum -1], pItemsTable->pItems[v70].uEquipType != 1) | 1328 if ( !pMainHandNum || (v70 = *(int *)&pPlayers[uPlayerID]->pInventoryItemList[pMainHandNum -1], pItemsTable->pItems[v70].uEquipType != 1) |
1329 && (pItemsTable->pItems[v70].uSkillType != 4 || pPlayers[uPlayerID]->pEquipment.uShield) ) | 1329 && (pItemsTable->pItems[v70].uSkillType != 4 || pPlayers[uPlayerID]->pEquipment.uShield) ) |
1330 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], | 1330 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], |
1331 pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1], | 1331 pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1], |
1332 pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1])); | 1332 pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1])); |
1333 pBeltNum = pPlayers[uPlayerID]->pEquipment.uBelt;// далее пояс | 1333 pBeltNum = pPlayers[uPlayerID]->pEquipment.uBelt;// далее пояс |
1334 if ( pBeltNum ) | 1334 if ( pBeltNum ) |
1335 { | 1335 { |
1336 item_Belt = &pPlayers[uPlayerID]->pInventoryItems[pBeltNum - 1]; | 1336 item_Belt = &pPlayers[uPlayerID]->pInventoryItemList[pBeltNum - 1]; |
1337 switch ( item_Belt->uItemID ) | 1337 switch ( item_Belt->uItemID ) |
1338 { | 1338 { |
1339 case ITEM_RILIC_TITANS_BELT: | 1339 case ITEM_RILIC_TITANS_BELT: |
1340 v73 = 5; | 1340 v73 = 5; |
1341 break; | 1341 break; |
1394 } | 1394 } |
1395 } | 1395 } |
1396 pMainHandNum2 = pPlayers[uPlayerID]->pEquipment.uMainHand; | 1396 pMainHandNum2 = pPlayers[uPlayerID]->pEquipment.uMainHand; |
1397 if ( pMainHandNum2 ) | 1397 if ( pMainHandNum2 ) |
1398 { | 1398 { |
1399 v83 = pPlayers[uPlayerID]->pInventoryItems[pMainHandNum2 - 1].uItemID; | 1399 v83 = pPlayers[uPlayerID]->pInventoryItemList[pMainHandNum2 - 1].uItemID; |
1400 if ( pItemsTable->pItems[v83].uEquipType == 1 | 1400 if ( pItemsTable->pItems[v83].uEquipType == 1 |
1401 || pItemsTable->pItems[v83].uSkillType == PLAYER_SKILL_SPEAR && !pPlayers[uPlayerID]->pEquipment.uShield ) | 1401 || pItemsTable->pItems[v83].uSkillType == PLAYER_SKILL_SPEAR && !pPlayers[uPlayerID]->pEquipment.uShield ) |
1402 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0], | 1402 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0], |
1403 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], | 1403 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], |
1404 pIcons_LOD->GetTexture(papredoll_dlaus[uPlayerID - 1])); | 1404 pIcons_LOD->GetTexture(papredoll_dlaus[uPlayerID - 1])); |
1405 } | 1405 } |
1406 pCloakCollarNum = pPlayers[uPlayerID]->pEquipment.uCloak;//далее воротник плаща | 1406 pCloakCollarNum = pPlayers[uPlayerID]->pEquipment.uCloak;//далее воротник плаща |
1407 if ( pCloakCollarNum ) | 1407 if ( pCloakCollarNum ) |
1408 { | 1408 { |
1409 item_CloakCollar = &pPlayers[uPlayerID]->pInventoryItems[pCloakCollarNum - 1]; | 1409 item_CloakCollar = &pPlayers[uPlayerID]->pInventoryItemList[pCloakCollarNum - 1]; |
1410 switch ( item_CloakCollar->uItemID ) | 1410 switch ( item_CloakCollar->uItemID ) |
1411 { | 1411 { |
1412 case 525: | 1412 case 525: |
1413 v114 = 5; | 1413 v114 = 5; |
1414 break; | 1414 break; |
1478 pIcons_LOD->GetTexture(v122)); | 1478 pIcons_LOD->GetTexture(v122)); |
1479 } | 1479 } |
1480 pHelmNum = pPlayers[uPlayerID]->pEquipment.uHelm;//далее шлем | 1480 pHelmNum = pPlayers[uPlayerID]->pEquipment.uHelm;//далее шлем |
1481 if ( pHelmNum ) | 1481 if ( pHelmNum ) |
1482 { | 1482 { |
1483 item_Helm = &pPlayers[uPlayerID]->pInventoryItems[pHelmNum-1]; | 1483 item_Helm = &pPlayers[uPlayerID]->pInventoryItemList[pHelmNum-1]; |
1484 switch ( item_Helm->uItemID ) | 1484 switch ( item_Helm->uItemID ) |
1485 { | 1485 { |
1486 case 521: | 1486 case 521: |
1487 v125 = 11; | 1487 v125 = 11; |
1488 break; | 1488 break; |
1549 } | 1549 } |
1550 } | 1550 } |
1551 pMainHandNum3 = pPlayers[uPlayerID]->pEquipment.uMainHand;//weapon in right hand | 1551 pMainHandNum3 = pPlayers[uPlayerID]->pEquipment.uMainHand;//weapon in right hand |
1552 if ( pMainHandNum3 ) | 1552 if ( pMainHandNum3 ) |
1553 { | 1553 { |
1554 item_MainHand3 = &pPlayers[uPlayerID]->pInventoryItems[pMainHandNum3 - 1]; | 1554 item_MainHand3 = &pPlayers[uPlayerID]->pInventoryItemList[pMainHandNum3 - 1]; |
1555 pX_MainHand3 = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[item_MainHand3->uItemID].uEquipX; | 1555 pX_MainHand3 = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[item_MainHand3->uItemID].uEquipX; |
1556 pY_MainHand3 = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][1][1] - pItemsTable->pItems[item_MainHand3->uItemID].uEquipY; | 1556 pY_MainHand3 = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][1][1] - pItemsTable->pItems[item_MainHand3->uItemID].uEquipY; |
1557 if ( item_MainHand3->uItemID == 64 ) | 1557 if ( item_MainHand3->uItemID == 64 ) |
1558 v181 = "item64v1"; | 1558 v181 = "item64v1"; |
1559 else | 1559 else |
1598 pRenderer->DrawMaskToZBuffer(pX_MainHand3, pY_MainHand3, (Texture *)v143, pMainHandNum3); | 1598 pRenderer->DrawMaskToZBuffer(pX_MainHand3, pY_MainHand3, (Texture *)v143, pMainHandNum3); |
1599 } | 1599 } |
1600 pShieldNum = pPlayers[uPlayerID]->pEquipment.uShield;// далее щит | 1600 pShieldNum = pPlayers[uPlayerID]->pEquipment.uShield;// далее щит |
1601 if ( pShieldNum ) | 1601 if ( pShieldNum ) |
1602 { | 1602 { |
1603 item_Shield = &pPlayers[uPlayerID]->pInventoryItems[pShieldNum - 1]; | 1603 item_Shield = &pPlayers[uPlayerID]->pInventoryItemList[pShieldNum - 1]; |
1604 v149 = pItemsTable->pItems[item_Shield->uItemID].uSkillType; | 1604 v149 = pItemsTable->pItems[item_Shield->uItemID].uSkillType; |
1605 if ( v149 == 2 || v149 == 1 ) | 1605 if ( v149 == 2 || v149 == 1 ) |
1606 { | 1606 { |
1607 v151 = item_Shield->uItemID - 400; | 1607 v151 = item_Shield->uItemID - 400; |
1608 pX_Shield = 596; | 1608 pX_Shield = 596; |
1675 } | 1675 } |
1676 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_RightHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_RightHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_drhs[uPlayerID - 1])); | 1676 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_RightHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_RightHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_drhs[uPlayerID - 1])); |
1677 pMainHandNum5 = pPlayers[uPlayerID]->pEquipment.uMainHand; | 1677 pMainHandNum5 = pPlayers[uPlayerID]->pEquipment.uMainHand; |
1678 if ( pMainHandNum5 ) | 1678 if ( pMainHandNum5 ) |
1679 { | 1679 { |
1680 item_MainHand5 = &pPlayers[uPlayerID]->pInventoryItems[pMainHandNum5 - 1]; | 1680 item_MainHand5 = &pPlayers[uPlayerID]->pInventoryItemList[pMainHandNum5 - 1]; |
1681 if ( pItemsTable->pItems[item_MainHand5->uItemID].uEquipType == 1 || | 1681 if ( pItemsTable->pItems[item_MainHand5->uItemID].uEquipType == 1 || |
1682 pItemsTable->pItems[item_MainHand5->uItemID].uSkillType == PLAYER_SKILL_SPEAR && | 1682 pItemsTable->pItems[item_MainHand5->uItemID].uSkillType == PLAYER_SKILL_SPEAR && |
1683 !pPlayers[uPlayerID]->pEquipment.uShield ) | 1683 !pPlayers[uPlayerID]->pEquipment.uShield ) |
1684 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0], | 1684 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0], |
1685 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], | 1685 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], |
1714 pRenderer->DrawTextureIndexed(8, 305, pIcons_LOD->LoadTexturePtr("fr_strip", TEXTURE_16BIT_PALETTE)); | 1714 pRenderer->DrawTextureIndexed(8, 305, pIcons_LOD->LoadTexturePtr("fr_strip", TEXTURE_16BIT_PALETTE)); |
1715 | 1715 |
1716 int i = 0; | 1716 int i = 0; |
1717 for (uint i = 0; i < 126; ++i) | 1717 for (uint i = 0; i < 126; ++i) |
1718 { | 1718 { |
1719 int v26 = (int)(player->pInventoryIndices + i); | 1719 int v26 = (int)(player->pInventoryMatrix + i); |
1720 | 1720 |
1721 if (player->pInventoryIndices[i] <= 0) | 1721 if (player->pInventoryMatrix[i] <= 0) |
1722 continue; | 1722 continue; |
1723 | 1723 |
1724 int item_idx = player->pInventoryIndices[i]; | 1724 int item_idx = player->pInventoryMatrix[i]; |
1725 auto item = &player->pInventoryItems[item_idx - 1]; | 1725 auto item = &player->pInventoryItemList[item_idx - 1]; |
1726 if (!item->uItemID) | 1726 if (!item->uItemID) |
1727 continue; | 1727 continue; |
1728 | 1728 |
1729 uCellY = 32 * (i / 14) + 17; | 1729 uCellY = 32 * (i / 14) + 17; |
1730 uCellX = 32 * (i % 14) + 14; | 1730 uCellX = 32 * (i % 14) + 14; |
1843 static int pPaperdollRingsX[6] = {0x1EA, 0x21A, 0x248, 0x1EA, 0x21A, 0x248}; | 1843 static int pPaperdollRingsX[6] = {0x1EA, 0x21A, 0x248, 0x1EA, 0x21A, 0x248}; |
1844 static int pPaperdollRingsY[6] = {0x0CA, 0x0CA, 0x0CA, 0x0FA, 0x0FA, 0x0FA}; | 1844 static int pPaperdollRingsY[6] = {0x0CA, 0x0CA, 0x0CA, 0x0FA, 0x0FA, 0x0FA}; |
1845 | 1845 |
1846 CharacterUI_DrawItem(pPaperdollRingsX[i], | 1846 CharacterUI_DrawItem(pPaperdollRingsX[i], |
1847 pPaperdollRingsY[i], | 1847 pPaperdollRingsY[i], |
1848 &player->pInventoryItems[player->pEquipment.uRings[i] - 1], | 1848 &player->pInventoryItemList[player->pEquipment.uRings[i] - 1], |
1849 player->pEquipment.uRings[i]); | 1849 player->pEquipment.uRings[i]); |
1850 } | 1850 } |
1851 | 1851 |
1852 | 1852 |
1853 if (player->pEquipment.uAmulet) | 1853 if (player->pEquipment.uAmulet) |
1854 { | 1854 { |
1855 CharacterUI_DrawItem(493, 91, | 1855 CharacterUI_DrawItem(493, 91, |
1856 &player->pInventoryItems[player->pEquipment.uAmulet - 1], | 1856 &player->pInventoryItemList[player->pEquipment.uAmulet - 1], |
1857 player->pEquipment.uAmulet); | 1857 player->pEquipment.uAmulet); |
1858 } | 1858 } |
1859 | 1859 |
1860 if (player->pEquipment.uGlove) | 1860 if (player->pEquipment.uGlove) |
1861 { | 1861 { |
1862 CharacterUI_DrawItem(586, 88, | 1862 CharacterUI_DrawItem(586, 88, |
1863 &player->pInventoryItems[player->pEquipment.uGlove - 1], | 1863 &player->pInventoryItemList[player->pEquipment.uGlove - 1], |
1864 player->pEquipment.uGlove); | 1864 player->pEquipment.uGlove); |
1865 } | 1865 } |
1866 } | 1866 } |
1867 | 1867 |
1868 //----- (0043BCA7) -------------------------------------------------------- | 1868 //----- (0043BCA7) -------------------------------------------------------- |
2686 //v0 = pPlayers[uActiveCharacter]; | 2686 //v0 = pPlayers[uActiveCharacter]; |
2687 v1 = pPlayers[uActiveCharacter]->pEquipment.uMainHand; | 2687 v1 = pPlayers[uActiveCharacter]->pEquipment.uMainHand; |
2688 v2 = pPlayers[uActiveCharacter]->pEquipment.uShield; | 2688 v2 = pPlayers[uActiveCharacter]->pEquipment.uShield; |
2689 //v54 = pPlayers[uActiveCharacter]->pEquipment.uShield; | 2689 //v54 = pPlayers[uActiveCharacter]->pEquipment.uShield; |
2690 //v53 = v1; | 2690 //v53 = v1; |
2691 if ( v1 && pItemsTable->pItems[*(int *)&pPlayers[uActiveCharacter]->pInventoryItems[v1 - 1]].uEquipType == 1 ) | 2691 if ( v1 && pItemsTable->pItems[*(int *)&pPlayers[uActiveCharacter]->pInventoryItemList[v1 - 1]].uEquipType == 1 ) |
2692 v51 = v1; | 2692 v51 = v1; |
2693 v3 = pParty->pPickedItem.uItemID; | 2693 v3 = pParty->pPickedItem.uItemID; |
2694 if ( pParty->pPickedItem.uItemID ) | 2694 if ( pParty->pPickedItem.uItemID ) |
2695 { | 2695 { |
2696 v52 = pItemsTable->pItems[pParty->pPickedItem.uItemID].uEquipType; | 2696 v52 = pItemsTable->pItems[pParty->pPickedItem.uItemID].uEquipType; |
2710 } | 2710 } |
2711 else | 2711 else |
2712 { | 2712 { |
2713 if ( (pSkillType == 8 || pSkillType == 1 || pSkillType == 2) | 2713 if ( (pSkillType == 8 || pSkillType == 1 || pSkillType == 2) |
2714 && v1 | 2714 && v1 |
2715 && pItemsTable->pItems[*(int *)&pPlayers[uActiveCharacter]->pInventoryItems[v1-1]].uSkillType == 4 ) | 2715 && pItemsTable->pItems[*(int *)&pPlayers[uActiveCharacter]->pInventoryItemList[v1-1]].uSkillType == 4 ) |
2716 { | 2716 { |
2717 LOBYTE(v5) = pPlayers[uActiveCharacter]->GetActualSkillLevel(PLAYER_SKILL_SPEAR); | 2717 LOBYTE(v5) = pPlayers[uActiveCharacter]->GetActualSkillLevel(PLAYER_SKILL_SPEAR); |
2718 if ( (signed int)SkillToMastery(v5) < 3 ) | 2718 if ( (signed int)SkillToMastery(v5) < 3 ) |
2719 { | 2719 { |
2720 pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0); | 2720 pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0); |
2769 v7 = (int)&pPlayers[uActiveCharacter]->pEquipment.uRings; | 2769 v7 = (int)&pPlayers[uActiveCharacter]->pEquipment.uRings; |
2770 while ( 1 ) | 2770 while ( 1 ) |
2771 { | 2771 { |
2772 if ( !*(int *)v7 ) | 2772 if ( !*(int *)v7 ) |
2773 { | 2773 { |
2774 v8 = pPlayers[uActiveCharacter]->FindFreeInventorySlot(); | 2774 v8 = pPlayers[uActiveCharacter]->FindFreeInventoryListSlot(); |
2775 if ( v8 >= 0 ) | 2775 if ( v8 >= 0 ) |
2776 { | 2776 { |
2777 v9 = v52; | 2777 v9 = v52; |
2778 pParty->pPickedItem.uBodyAnchor = v52 + 1; | 2778 pParty->pPickedItem.uBodyAnchor = v52 + 1; |
2779 memcpy(&pPlayers[uActiveCharacter]->pInventoryItems[v8], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItems[v8])); | 2779 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v8], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v8])); |
2780 *(&pPlayers[uActiveCharacter]->pEquipment.uShield + v9) = v8 + 1; | 2780 *(&pPlayers[uActiveCharacter]->pEquipment.uShield + v9) = v8 + 1; |
2781 pMouse->RemoveHoldingItem(); | 2781 pMouse->RemoveHoldingItem(); |
2782 break; | 2782 break; |
2783 } | 2783 } |
2784 } | 2784 } |
2828 if ( v14 ) | 2828 if ( v14 ) |
2829 return; | 2829 return; |
2830 } | 2830 } |
2831 else | 2831 else |
2832 { | 2832 { |
2833 v52 = pPlayers[uActiveCharacter]->FindFreeInventorySlot(); | 2833 v52 = pPlayers[uActiveCharacter]->FindFreeInventoryListSlot(); |
2834 if ( v52 < 0 ) | 2834 if ( v52 < 0 ) |
2835 return; | 2835 return; |
2836 if ( !v51 ) | 2836 if ( !v51 ) |
2837 { | 2837 { |
2838 pParty->pPickedItem.uBodyAnchor = 1; | 2838 pParty->pPickedItem.uBodyAnchor = 1; |
2839 v17 = v52 + 1; | 2839 v17 = v52 + 1; |
2840 memcpy(&pPlayers[uActiveCharacter]->pInventoryItems[v52], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItems[v52])); | 2840 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v52], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v52])); |
2841 pPlayers[uActiveCharacter]->pEquipment.uShield = v17; | 2841 pPlayers[uActiveCharacter]->pEquipment.uShield = v17; |
2842 pMouse->RemoveHoldingItem(); | 2842 pMouse->RemoveHoldingItem(); |
2843 return; | 2843 return; |
2844 } | 2844 } |
2845 memcpy(&_this, &pParty->pPickedItem, sizeof(_this)); | 2845 memcpy(&_this, &pParty->pPickedItem, sizeof(_this)); |
2847 *(char *)(v15 + 556) = 0; | 2847 *(char *)(v15 + 556) = 0; |
2848 pParty->pPickedItem.Reset(); | 2848 pParty->pPickedItem.Reset(); |
2849 pParty->SetHoldingItem((ItemGen *)(v15 + 532)); | 2849 pParty->SetHoldingItem((ItemGen *)(v15 + 532)); |
2850 _this.uBodyAnchor = 1; | 2850 _this.uBodyAnchor = 1; |
2851 v16 = v52 + 1; | 2851 v16 = v52 + 1; |
2852 memcpy(&pPlayers[uActiveCharacter]->pInventoryItems[v52], &_this, sizeof(pPlayers[uActiveCharacter]->pInventoryItems[v52])); | 2852 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v52], &_this, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v52])); |
2853 pPlayers[uActiveCharacter]->pEquipment.uShield = v16; | 2853 pPlayers[uActiveCharacter]->pEquipment.uShield = v16; |
2854 } | 2854 } |
2855 pPlayers[uActiveCharacter]->pEquipment.uMainHand = 0; | 2855 pPlayers[uActiveCharacter]->pEquipment.uMainHand = 0; |
2856 return; | 2856 return; |
2857 case 0u: | 2857 case 0u: |
2903 __debugbreak(); // looks like offset in player's inventory and wand_lut much like case in 0042ECB5 | 2903 __debugbreak(); // looks like offset in player's inventory and wand_lut much like case in 0042ECB5 |
2904 stru_A750F8[uActiveCharacter - 1]._494836(*((int *)&pSpellDatas[66].uNormalLevelRecovery + v50), uActiveCharacter - 1 + 9); | 2904 stru_A750F8[uActiveCharacter - 1]._494836(*((int *)&pSpellDatas[66].uNormalLevelRecovery + v50), uActiveCharacter - 1 + 9); |
2905 } | 2905 } |
2906 break; | 2906 break; |
2907 } | 2907 } |
2908 v23 = pPlayers[uActiveCharacter]->FindFreeInventorySlot(); | 2908 v23 = pPlayers[uActiveCharacter]->FindFreeInventoryListSlot(); |
2909 if ( v23 < 0 ) | 2909 if ( v23 < 0 ) |
2910 return; | 2910 return; |
2911 pParty->pPickedItem.uBodyAnchor = 1; | 2911 pParty->pPickedItem.uBodyAnchor = 1; |
2912 v50 = (unsigned int)&pPlayers[uActiveCharacter]->pInventoryItems[v23]; | 2912 v50 = (unsigned int)&pPlayers[uActiveCharacter]->pInventoryItemList[v23]; |
2913 memcpy(&pPlayers[uActiveCharacter]->pInventoryItems[v23], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItems[v23])); | 2913 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v23], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v23])); |
2914 pPlayers[uActiveCharacter]->pEquipment.uShield = v23 + 1; | 2914 pPlayers[uActiveCharacter]->pEquipment.uShield = v23 + 1; |
2915 pMouse->RemoveHoldingItem(); | 2915 pMouse->RemoveHoldingItem(); |
2916 if ( v52 != 12 ) | 2916 if ( v52 != 12 ) |
2917 return; | 2917 return; |
2918 v22 = *(int *)v50; | 2918 v22 = *(int *)v50; |
2926 } | 2926 } |
2927 } | 2927 } |
2928 } | 2928 } |
2929 if ( !v1 ) | 2929 if ( !v1 ) |
2930 { | 2930 { |
2931 v26 = pPlayers[uActiveCharacter]->FindFreeInventorySlot(); | 2931 v26 = pPlayers[uActiveCharacter]->FindFreeInventoryListSlot(); |
2932 if ( v26 < 0 ) | 2932 if ( v26 < 0 ) |
2933 return; | 2933 return; |
2934 pParty->pPickedItem.uBodyAnchor = 2; | 2934 pParty->pPickedItem.uBodyAnchor = 2; |
2935 v50 = (unsigned int)&pPlayers[uActiveCharacter]->pInventoryItems[v26]; | 2935 v50 = (unsigned int)&pPlayers[uActiveCharacter]->pInventoryItemList[v26]; |
2936 memcpy(&pPlayers[uActiveCharacter]->pInventoryItems[v26], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItems[v26])); | 2936 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v26], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v26])); |
2937 pPlayers[uActiveCharacter]->pEquipment.uMainHand = v26 + 1; | 2937 pPlayers[uActiveCharacter]->pEquipment.uMainHand = v26 + 1; |
2938 pMouse->RemoveHoldingItem(); | 2938 pMouse->RemoveHoldingItem(); |
2939 if ( v52 != 12 ) | 2939 if ( v52 != 12 ) |
2940 return; | 2940 return; |
2941 v22 = *(int *)v50; | 2941 v22 = *(int *)v50; |
2997 memcpy((void *)(v27 + 532), &_this, 0x24u); | 2997 memcpy((void *)(v27 + 532), &_this, 0x24u); |
2998 pPlayers[uActiveCharacter]->pEquipment.uMainHand = v28; | 2998 pPlayers[uActiveCharacter]->pEquipment.uMainHand = v28; |
2999 } | 2999 } |
3000 else | 3000 else |
3001 { | 3001 { |
3002 v52 = pPlayers[uActiveCharacter]->FindFreeInventorySlot(); | 3002 v52 = pPlayers[uActiveCharacter]->FindFreeInventoryListSlot(); |
3003 if ( v52 >= 0 ) | 3003 if ( v52 >= 0 ) |
3004 { | 3004 { |
3005 if ( v2 ) | 3005 if ( v2 ) |
3006 { | 3006 { |
3007 memcpy(&_this, &pParty->pPickedItem, sizeof(_this)); | 3007 memcpy(&_this, &pParty->pPickedItem, sizeof(_this)); |
3009 *(char *)(v29 + 556) = 0; | 3009 *(char *)(v29 + 556) = 0; |
3010 pParty->pPickedItem.Reset(); | 3010 pParty->pPickedItem.Reset(); |
3011 pParty->SetHoldingItem((ItemGen *)(v29 + 532)); | 3011 pParty->SetHoldingItem((ItemGen *)(v29 + 532)); |
3012 _this.uBodyAnchor = 2; | 3012 _this.uBodyAnchor = 2; |
3013 v30 = v52 + 1; | 3013 v30 = v52 + 1; |
3014 memcpy(&pPlayers[uActiveCharacter]->pInventoryItems[v52], &_this, sizeof(pPlayers[uActiveCharacter]->pInventoryItems[v52])); | 3014 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v52], &_this, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v52])); |
3015 pPlayers[uActiveCharacter]->pEquipment.uShield = 0; | 3015 pPlayers[uActiveCharacter]->pEquipment.uShield = 0; |
3016 pPlayers[uActiveCharacter]->pEquipment.uMainHand = v30; | 3016 pPlayers[uActiveCharacter]->pEquipment.uMainHand = v30; |
3017 } | 3017 } |
3018 else | 3018 else |
3019 { | 3019 { |
3020 pParty->pPickedItem.uBodyAnchor = 2; | 3020 pParty->pPickedItem.uBodyAnchor = 2; |
3021 v31 = v52 + 1; | 3021 v31 = v52 + 1; |
3022 memcpy(&pPlayers[uActiveCharacter]->pInventoryItems[v52], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItems[v52])); | 3022 memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v52], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v52])); |
3023 pPlayers[uActiveCharacter]->pEquipment.uMainHand = v31; | 3023 pPlayers[uActiveCharacter]->pEquipment.uMainHand = v31; |
3024 pMouse->RemoveHoldingItem(); | 3024 pMouse->RemoveHoldingItem(); |
3025 } | 3025 } |
3026 } | 3026 } |
3027 } | 3027 } |
3083 else | 3083 else |
3084 { | 3084 { |
3085 v35 = pPlayers[uActiveCharacter]->pEquipment.uBow; | 3085 v35 = pPlayers[uActiveCharacter]->pEquipment.uBow; |
3086 if ( v35 ) | 3086 if ( v35 ) |
3087 { | 3087 { |
3088 auto _a = (ItemGen *)&pPlayers[uActiveCharacter]->pInventoryItems[v35 - 1]; | 3088 auto _a = (ItemGen *)&pPlayers[uActiveCharacter]->pInventoryItemList[v35 - 1]; |
3089 pParty->SetHoldingItem(_a); | 3089 pParty->SetHoldingItem(_a); |
3090 _a->Reset(); | 3090 _a->Reset(); |
3091 pPlayers[uActiveCharacter]->pEquipment.uBow = 0; | 3091 pPlayers[uActiveCharacter]->pEquipment.uBow = 0; |
3092 } | 3092 } |
3093 } | 3093 } |