comparison UI/UICharacter.cpp @ 1817:0f1543750bf8

Changing itemlist accesses to helper functions + getting rid of some pPlayers array accesses
author Grumpy7
date Mon, 07 Oct 2013 06:37:49 +0200
parents 421c29d4ab3e
children 5f9eeb7bf8e6
comparison
equal deleted inserted replaced
1794:3f1e09a71726 1817:0f1543750bf8
774 { 774 {
775 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1])); 775 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]));
776 if ( !bRingsShownInCharScreen ) 776 if ( !bRingsShownInCharScreen )
777 pRenderer->DrawMaskToZBuffer(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]), player->pEquipment.uArmor); 777 pRenderer->DrawMaskToZBuffer(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]), player->pEquipment.uArmor);
778 //Рука не занята или ... 778 //Рука не занята или ...
779 if ( !player->pEquipment.uMainHand 779 if ( !player->GetItem(&PlayerEquipment::uMainHand)
780 || ( pPlayers[uPlayerID]->pInventoryItemList[player->pEquipment.uMainHand - 1].GetItemEquipType() != EQUIP_MAIN_HAND) 780 || ( player->GetMainHandItem()->GetItemEquipType() != EQUIP_MAIN_HAND)
781 && (pPlayers[uPlayerID]->pInventoryItemList[player->pEquipment.uMainHand - 1].GetItemEquipType() != PLAYER_SKILL_SPEAR 781 && (player->GetMainHandItem()->GetItemEquipType() != PLAYER_SKILL_SPEAR
782 || pPlayers[uPlayerID]->pEquipment.uShield) ) 782 || player->GetItem(&PlayerEquipment::uShield)) )
783 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1], 783 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1],
784 pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1])); 784 pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1]));
785 //-----------------------------------------------------(Hand/Рука)--------------------------------------------------------------- 785 //-----------------------------------------------------(Hand/Рука)---------------------------------------------------------------
786 if ( pPlayers[uPlayerID]->pEquipment.uMainHand ) 786 if ( player->GetItem(&PlayerEquipment::uMainHand) )
787 { 787 {
788 item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uMainHand - 1]; 788 item = player->GetMainHandItem();
789 item_X = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[item->uItemID].uEquipX; 789 item_X = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[item->uItemID].uEquipX;
790 item_Y = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][1][1] - pItemsTable->pItems[item->uItemID].uEquipY; 790 item_Y = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][1][1] - pItemsTable->pItems[item->uItemID].uEquipY;
791 if ( item->uItemID == 64 ) //blaster 791 if ( item->uItemID == 64 ) //blaster
792 v166 = "item64v1"; 792 v166 = "item64v1";
793 else 793 else
823 } 823 }
824 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE)), 824 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE)),
825 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255); 825 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255);
826 } 826 }
827 if ( !bRingsShownInCharScreen ) 827 if ( !bRingsShownInCharScreen )
828 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE)), pPlayers[uPlayerID]->pEquipment.uMainHand); 828 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE)), player->pEquipment.uMainHand);
829 } 829 }
830 } 830 }
831 else// без акваланга 831 else// без акваланга
832 { 832 {
833 //----------------(Bow/ Лук)------------------------------------------------- 833 //----------------(Bow/ Лук)-------------------------------------------------
834 if ( pPlayers[uPlayerID]->pEquipment.uBow ) 834 if ( player->GetItem(&PlayerEquipment::uBow) )
835 { 835 {
836 item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uBow - 1]; 836 item = player->GetBowItem();
837 item_X = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][2][0] - pItemsTable->pItems[item->uItemID].uEquipX; 837 item_X = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][2][0] - pItemsTable->pItems[item->uItemID].uEquipX;
838 item_Y = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][2][1] - pItemsTable->pItems[item->uItemID].uEquipY; 838 item_Y = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][2][1] - pItemsTable->pItems[item->uItemID].uEquipY;
839 if ( !(item->uAttributes & 0xF0) )// если не применён закл 839 if ( !(item->uAttributes & 0xF0) )// если не применён закл
840 { 840 {
841 if ( item->uAttributes & 2 ) 841 if ( item->uAttributes & 2 )
869 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), 869 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE),
870 GetTickCount() * 0.1, 0, 255); 870 GetTickCount() * 0.1, 0, 255);
871 } 871 }
872 if ( !bRingsShownInCharScreen ) 872 if ( !bRingsShownInCharScreen )
873 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(item->GetIconName(), TEXTURE_16BIT_PALETTE)), 873 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(item->GetIconName(), TEXTURE_16BIT_PALETTE)),
874 pPlayers[uPlayerID]->pEquipment.uBow); 874 player->pEquipment.uBow);
875 } 875 }
876 //-----------------------------(Cloak/Плащ)--------------------------------------------------------- 876 //-----------------------------(Cloak/Плащ)---------------------------------------------------------
877 if ( pPlayers[uPlayerID]->pEquipment.uCloak ) 877 if ( player->GetItem(&PlayerEquipment::uCloak) )
878 { 878 {
879 item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uCloak - 1]; 879 item = player->GetCloakItem();
880 switch ( item->uItemID ) 880 switch ( item->uItemID )
881 { 881 {
882 case ITEM_RELIC_TWILIGHT: 882 case ITEM_RELIC_TWILIGHT:
883 index = 5; 883 index = 5;
884 break; 884 break;
929 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_texture[pBodyComplection][index]), 929 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_texture[pBodyComplection][index]),
930 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255); 930 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255);
931 } 931 }
932 if ( !bRingsShownInCharScreen ) 932 if ( !bRingsShownInCharScreen )
933 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_texture[pBodyComplection][index]), 933 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_texture[pBodyComplection][index]),
934 pPlayers[uPlayerID]->pEquipment.uCloak); 934 player->pEquipment.uCloak);
935 } 935 }
936 } 936 }
937 //-------------------------------(Paperdoll/Кукла)------------------------------------------- 937 //-------------------------------(Paperdoll/Кукла)-------------------------------------------
938 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1])); 938 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]));
939 //-------------------------------(Armor/Броня)----------------------------------------------- 939 //-------------------------------(Armor/Броня)-----------------------------------------------
940 if ( pPlayers[uPlayerID]->pEquipment.uArmor ) 940 if ( player->GetItem(&PlayerEquipment::uArmor) )
941 { 941 {
942 item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uArmor - 1]; 942 item = player->GetArmorItem();
943 switch ( item->uItemID ) 943 switch ( item->uItemID )
944 { 944 {
945 case ITEM_ARTIFACT_GOVERNORS_ARMOR: 945 case ITEM_ARTIFACT_GOVERNORS_ARMOR:
946 index = 15; 946 index = 15;
947 break; 947 break;
995 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255); 995 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255);
996 } 996 }
997 997
998 if ( !bRingsShownInCharScreen ) 998 if ( !bRingsShownInCharScreen )
999 pRenderer->DrawMaskToZBuffer(item_X, item_Y, &pIcons_LOD->pTextures[paperdoll_armor_texture[pBodyComplection][index][0]], 999 pRenderer->DrawMaskToZBuffer(item_X, item_Y, &pIcons_LOD->pTextures[paperdoll_armor_texture[pBodyComplection][index][0]],
1000 pPlayers[uPlayerID]->pEquipment.uArmor); 1000 player->pEquipment.uArmor);
1001 } 1001 }
1002 } 1002 }
1003 //----------------------------------(End of Armor/Конец Брони)------------------------------------------ 1003 //----------------------------------(End of Armor/Конец Брони)------------------------------------------
1004 //----------------------------------(Boot/Обувь)-------------------------------------------------------- 1004 //----------------------------------(Boot/Обувь)--------------------------------------------------------
1005 if ( pPlayers[uPlayerID]->pEquipment.uBoot ) 1005 if ( player->GetItem(&PlayerEquipment::uBoot) )
1006 { 1006 {
1007 item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uBoot - 1]; 1007 item = player->GetBootItem();
1008 switch ( item->uItemID ) 1008 switch ( item->uItemID )
1009 { 1009 {
1010 case ITEM_ARTIFACT_HERMES_SANDALS: 1010 case ITEM_ARTIFACT_HERMES_SANDALS:
1011 index = 5; 1011 index = 5;
1012 v59 = papredoll_flying_feet[pPlayers[uPlayerID]->uCurrentFace]; 1012 v59 = papredoll_flying_feet[player->uCurrentFace];
1013 break; 1013 break;
1014 case ITEM_ARTIFACT_LEAGUE_BOOTS: 1014 case ITEM_ARTIFACT_LEAGUE_BOOTS:
1015 index = 6; 1015 index = 6;
1016 v59 = paperdoll_boots_texture[pBodyComplection][5]; 1016 v59 = paperdoll_boots_texture[pBodyComplection][5];
1017 break; 1017 break;
1055 } 1055 }
1056 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v59), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), 1056 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v59), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE),
1057 GetTickCount() * 0.1, 0, 255); 1057 GetTickCount() * 0.1, 0, 255);
1058 } 1058 }
1059 if ( !bRingsShownInCharScreen ) 1059 if ( !bRingsShownInCharScreen )
1060 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v59), pPlayers[uPlayerID]->pEquipment.uBoot); 1060 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v59), player->pEquipment.uBoot);
1061 } 1061 }
1062 } 1062 }
1063 //--------------------------------------------(Hand/Рука)------------------------------------------------------ 1063 //--------------------------------------------(Hand/Рука)------------------------------------------------------
1064 if ( !pPlayers[uPlayerID]->pEquipment.uMainHand 1064 if ( !player->GetItem(&PlayerEquipment::uMainHand)
1065 || ( pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uMainHand -1].GetItemEquipType() != EQUIP_MAIN_HAND) 1065 || ( player->GetMainHandItem()->GetItemEquipType() != EQUIP_MAIN_HAND)
1066 && (pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uMainHand -1].GetPlayerSkillType() != PLAYER_SKILL_SPEAR 1066 && (player->GetMainHandItem()->GetPlayerSkillType() != PLAYER_SKILL_SPEAR
1067 || pPlayers[uPlayerID]->pEquipment.uShield) ) 1067 || player->GetItem(&PlayerEquipment::uShield)) )
1068 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], 1068 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0],
1069 pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1])); 1069 pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1]));
1070 //--------------------------------------------(Belt/Пояс)------------------------------------------------------- 1070 //--------------------------------------------(Belt/Пояс)-------------------------------------------------------
1071 if ( pPlayers[uPlayerID]->pEquipment.uBelt ) 1071 if ( player->GetItem(&PlayerEquipment::uBelt))
1072 { 1072 {
1073 item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uBelt - 1]; 1073 item = player->GetBeltItem();
1074 switch ( item->uItemID ) 1074 switch ( item->uItemID )
1075 { 1075 {
1076 case ITEM_RILIC_TITANS_BELT: 1076 case ITEM_RILIC_TITANS_BELT:
1077 index = 5; 1077 index = 5;
1078 break; 1078 break;
1101 pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(v75)); 1101 pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(v75));
1102 else 1102 else
1103 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v75)); 1103 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v75));
1104 } 1104 }
1105 if ( !bRingsShownInCharScreen ) 1105 if ( !bRingsShownInCharScreen )
1106 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v75), pPlayers[uPlayerID]->pEquipment.uBelt); 1106 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v75), player->pEquipment.uBelt);
1107 } 1107 }
1108 else 1108 else
1109 { 1109 {
1110 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED ) 1110 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED )
1111 container = "sptext01"; 1111 container = "sptext01";
1126 GetTickCount() * 0.1, 0, 255); 1126 GetTickCount() * 0.1, 0, 255);
1127 } 1127 }
1128 } 1128 }
1129 } 1129 }
1130 //---------------------------------------------(Hand2/Рука2)-------------------------------------------------- 1130 //---------------------------------------------(Hand2/Рука2)--------------------------------------------------
1131 if ( pPlayers[uPlayerID]->pEquipment.uMainHand ) 1131 if ( player->GetItem(&PlayerEquipment::uMainHand) )
1132 { 1132 {
1133 if ( pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uMainHand - 1].GetItemEquipType() == EQUIP_MAIN_HAND 1133 if ( player->GetMainHandItem()->GetItemEquipType() == EQUIP_MAIN_HAND
1134 || pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uMainHand - 1].GetPlayerSkillType() == PLAYER_SKILL_SPEAR 1134 || player->GetMainHandItem()->GetPlayerSkillType() == PLAYER_SKILL_SPEAR
1135 && !pPlayers[uPlayerID]->pEquipment.uShield ) 1135 && !player->GetItem(&PlayerEquipment::uShield) )
1136 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0], 1136 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0],
1137 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlaus[uPlayerID - 1])); 1137 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlaus[uPlayerID - 1]));
1138 } 1138 }
1139 //--------------------------------(Shoulder/Плечи)--------------------------------------------- 1139 //--------------------------------(Shoulder/Плечи)---------------------------------------------
1140 item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uArmor - 1]; 1140 item = player->GetArmorItem();
1141 switch ( item->uItemID ) 1141 switch ( item->uItemID )
1142 { 1142 {
1143 case ITEM_ARTIFACT_GOVERNORS_ARMOR: 1143 case ITEM_ARTIFACT_GOVERNORS_ARMOR:
1144 index = 15; 1144 index = 15;
1145 break; 1145 break;
1156 index = item->uItemID - 66; 1156 index = item->uItemID - 66;
1157 break; 1157 break;
1158 } 1158 }
1159 if ( index >= 0 && index < 17 ) 1159 if ( index >= 0 && index < 17 )
1160 { 1160 {
1161 if ( pPlayers[uPlayerID]->pEquipment.uMainHand 1161 if ( player->GetItem(&PlayerEquipment::uMainHand)
1162 && (pPlayers[uPlayerID]->GetEquippedItemEquipType(EQUIP_MAIN_HAND) == EQUIP_MAIN_HAND 1162 && (player->GetMainHandItem()->GetItemEquipType() == EQUIP_MAIN_HAND
1163 || pPlayers[uPlayerID]->GetEquippedItemSkillType(EQUIP_MAIN_HAND) == EQUIP_SHIELD 1163 || player->GetMainHandItem()->GetPlayerSkillType() == PLAYER_SKILL_SPEAR
1164 && !pPlayers[uPlayerID]->pEquipment.uShield) )//без щита 1164 && !player->GetItem(&PlayerEquipment::uShield) ))//без щита
1165 { 1165 {
1166 v94 = paperdoll_armor_texture[pBodyComplection][index][2]; 1166 v94 = paperdoll_armor_texture[pBodyComplection][index][2];
1167 if ( paperdoll_armor_texture[pBodyComplection][index][2] == pIcons_LOD->FindTextureByName("pending") ) 1167 if ( paperdoll_armor_texture[pBodyComplection][index][2] == pIcons_LOD->FindTextureByName("pending") )
1168 { 1168 {
1169 v94 = paperdoll_armor_texture[pBodyComplection][index][1]; 1169 v94 = paperdoll_armor_texture[pBodyComplection][index][1];
1258 } 1258 }
1259 } 1259 }
1260 } 1260 }
1261 } 1261 }
1262 //----------------------------------------------(Cloak collar/воротник плаща)------------------------------------- 1262 //----------------------------------------------(Cloak collar/воротник плаща)-------------------------------------
1263 if ( pPlayers[uPlayerID]->pEquipment.uCloak ) 1263 if ( player->GetItem(&PlayerEquipment::uCloak) )
1264 { 1264 {
1265 item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uCloak - 1]; 1265 item = player->GetCloakItem();
1266 switch ( item->uItemID ) 1266 switch ( item->uItemID )
1267 { 1267 {
1268 case ITEM_RELIC_TWILIGHT: 1268 case ITEM_RELIC_TWILIGHT:
1269 index = 5; 1269 index = 5;
1270 break; 1270 break;
1295 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_collar_texture[pBodyComplection][index])); 1295 pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_collar_texture[pBodyComplection][index]));
1296 else 1296 else
1297 pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_collar_texture[pBodyComplection][index])); 1297 pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_collar_texture[pBodyComplection][index]));
1298 if ( !bRingsShownInCharScreen ) 1298 if ( !bRingsShownInCharScreen )
1299 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_collar_texture[pBodyComplection][index]), 1299 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_collar_texture[pBodyComplection][index]),
1300 pPlayers[uPlayerID]->pEquipment.uCloak); 1300 player->pEquipment.uCloak);
1301 } 1301 }
1302 else 1302 else
1303 { 1303 {
1304 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED ) 1304 if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED )
1305 container = "sptext01"; 1305 container = "sptext01";
1321 } 1321 }
1322 } 1322 }
1323 } 1323 }
1324 } 1324 }
1325 //--------------------------------------------(Beards/Борода)------------------------------------------------------- 1325 //--------------------------------------------(Beards/Борода)-------------------------------------------------------
1326 if ( pPlayers[uPlayerID]->uCurrentFace == 12 || pPlayers[uPlayerID]->uCurrentFace == 13 ) 1326 if ( player->uCurrentFace == 12 || player->uCurrentFace == 13 )
1327 { 1327 {
1328 if ( papredoll_dbrds[pPlayers[uPlayerID]->uCurrentFace] != pIcons_LOD->FindTextureByName("Pending") ) 1328 if ( papredoll_dbrds[player->uCurrentFace] != pIcons_LOD->FindTextureByName("Pending") )
1329 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_Beards[2 * pPlayers[uPlayerID]->uCurrentFace - 24], 1329 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_Beards[2 * player->uCurrentFace - 24],
1330 pPaperdoll_BodyY + pPaperdoll_Beards[2 * pPlayers[uPlayerID]->uCurrentFace - 23], 1330 pPaperdoll_BodyY + pPaperdoll_Beards[2 * player->uCurrentFace - 23],
1331 pIcons_LOD->GetTexture(papredoll_dbrds[pPlayers[uPlayerID]->uCurrentFace])); 1331 pIcons_LOD->GetTexture(papredoll_dbrds[player->uCurrentFace]));
1332 } 1332 }
1333 //--------------------------------------------(Helm/Шлем)------------------------------------------------------------ 1333 //--------------------------------------------(Helm/Шлем)------------------------------------------------------------
1334 if ( pPlayers[uPlayerID]->pEquipment.uHelm ) 1334 if ( player->GetItem(&PlayerEquipment::uHelm) )
1335 { 1335 {
1336 item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uHelm - 1]; 1336 item = player->GetHelmItem();
1337 switch ( item->uItemID ) 1337 switch ( item->uItemID )
1338 { 1338 {
1339 case ITEM_RELIC_TALEDONS_HELM: 1339 case ITEM_RELIC_TALEDONS_HELM:
1340 index = 11; 1340 index = 11;
1341 break; 1341 break;
1393 else 1393 else
1394 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v127)); 1394 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v127));
1395 } 1395 }
1396 } 1396 }
1397 if ( !bRingsShownInCharScreen ) 1397 if ( !bRingsShownInCharScreen )
1398 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v127), pPlayers[uPlayerID]->pEquipment.uHelm); 1398 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v127), player->pEquipment.uHelm);
1399 } 1399 }
1400 } 1400 }
1401 //------------------------------------------------(Hand3/Рука3)------------------------------------------- 1401 //------------------------------------------------(Hand3/Рука3)-------------------------------------------
1402 if ( pPlayers[uPlayerID]->pEquipment.uMainHand ) 1402 if ( player->GetItem(&PlayerEquipment::uMainHand) )
1403 { 1403 {
1404 item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uMainHand - 1]; 1404 item = player->GetMainHandItem();
1405 item_X = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[item->uItemID].uEquipX; 1405 item_X = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[item->uItemID].uEquipX;
1406 item_Y = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][1][1] - pItemsTable->pItems[item->uItemID].uEquipY; 1406 item_Y = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][1][1] - pItemsTable->pItems[item->uItemID].uEquipY;
1407 if ( item->uItemID == 64 ) 1407 if ( item->uItemID == 64 )
1408 v181 = "item64v1"; 1408 v181 = "item64v1";
1409 else 1409 else
1440 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE)), 1440 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE)),
1441 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255); 1441 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255);
1442 } 1442 }
1443 if ( !bRingsShownInCharScreen ) 1443 if ( !bRingsShownInCharScreen )
1444 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE)), 1444 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE)),
1445 pPlayers[uPlayerID]->pEquipment.uMainHand); 1445 player->pEquipment.uMainHand);
1446 } 1446 }
1447 //--------------------------------------------------(Shield/Щит)--------------------------------------------- 1447 //--------------------------------------------------(Shield/Щит)---------------------------------------------
1448 if ( pPlayers[uPlayerID]->pEquipment.uShield ) 1448 if ( player->GetItem(&PlayerEquipment::uShield) )
1449 { 1449 {
1450 item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uShield - 1]; 1450 item = player->GetOffHandItem();
1451 if ( item->GetPlayerSkillType() == PLAYER_SKILL_DAGGER 1451 if ( item->GetPlayerSkillType() == PLAYER_SKILL_DAGGER
1452 || item->GetPlayerSkillType() == PLAYER_SKILL_SWORD ) 1452 || item->GetPlayerSkillType() == PLAYER_SKILL_SWORD )
1453 { 1453 {
1454 //v151 = item->uItemID - 400; 1454 //v151 = item->uItemID - 400;
1455 item_X = 596; 1455 item_X = 596;
1514 if ( v245 ) 1514 if ( v245 )
1515 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdollLeftEmptyHand[pBodyComplection][0], 1515 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdollLeftEmptyHand[pBodyComplection][0],
1516 pPaperdoll_BodyY + pPaperdollLeftEmptyHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlhs[uPlayerID - 1])); 1516 pPaperdoll_BodyY + pPaperdollLeftEmptyHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlhs[uPlayerID - 1]));
1517 } 1517 }
1518 if ( !bRingsShownInCharScreen ) 1518 if ( !bRingsShownInCharScreen )
1519 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v153), pPlayers[uPlayerID]->pEquipment.uShield); 1519 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v153), player->pEquipment.uShield);
1520 } 1520 }
1521 } 1521 }
1522 //--------------------------------------------------------(RightHand/Правая рука)-------------------------------------------------- 1522 //--------------------------------------------------------(RightHand/Правая рука)--------------------------------------------------
1523 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_RightHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_RightHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_drhs[uPlayerID - 1])); 1523 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_RightHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_RightHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_drhs[uPlayerID - 1]));
1524 //--------------------------------------------------------(LeftHand/Левая рука)---------------------------------------------------- 1524 //--------------------------------------------------------(LeftHand/Левая рука)----------------------------------------------------
1525 if ( pPlayers[uPlayerID]->pEquipment.uMainHand ) 1525 if ( player->GetItem(&PlayerEquipment::uMainHand))
1526 { 1526 {
1527 item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uMainHand - 1]; 1527 item = player->GetMainHandItem();
1528 if ( item->GetItemEquipType() == EQUIP_MAIN_HAND 1528 if ( item->GetItemEquipType() == EQUIP_MAIN_HAND
1529 || item->GetPlayerSkillType() == PLAYER_SKILL_SPEAR 1529 || item->GetPlayerSkillType() == PLAYER_SKILL_SPEAR
1530 && !pPlayers[uPlayerID]->pEquipment.uShield ) 1530 && !player->GetItem(&PlayerEquipment::uShield) )
1531 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0], 1531 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0],
1532 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], 1532 pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1],
1533 pIcons_LOD->GetTexture(papredoll_dlhus[uPlayerID - 1])); 1533 pIcons_LOD->GetTexture(papredoll_dlhus[uPlayerID - 1]));
1534 } 1534 }
1535 if ( !bRingsShownInCharScreen )//рисование лупы 1535 if ( !bRingsShownInCharScreen )//рисование лупы
1659 static int pPaperdollRingsY[6] = {0x0CA, 0x0CA, 0x0CA, 0x0FA, 0x0FA, 0x0FA}; 1659 static int pPaperdollRingsY[6] = {0x0CA, 0x0CA, 0x0CA, 0x0FA, 0x0FA, 0x0FA};
1660 CharacterUI_DrawItem(pPaperdollRingsX[i], pPaperdollRingsY[i], &player->pInventoryItemList[player->pEquipment.uRings[i] - 1], 1660 CharacterUI_DrawItem(pPaperdollRingsX[i], pPaperdollRingsY[i], &player->pInventoryItemList[player->pEquipment.uRings[i] - 1],
1661 player->pEquipment.uRings[i]); 1661 player->pEquipment.uRings[i]);
1662 } 1662 }
1663 if (player->pEquipment.uAmulet) 1663 if (player->pEquipment.uAmulet)
1664 CharacterUI_DrawItem(493, 91, &player->pInventoryItemList[player->pEquipment.uAmulet - 1], player->pEquipment.uAmulet); 1664 CharacterUI_DrawItem(493, 91, player->GetAmuletItem(), player->pEquipment.uAmulet);
1665 if (player->pEquipment.uGlove) 1665 if (player->pEquipment.uGlove)
1666 CharacterUI_DrawItem(586, 88, &player->pInventoryItemList[player->pEquipment.uGlove - 1], player->pEquipment.uGlove); 1666 CharacterUI_DrawItem(586, 88, player->GetGloveItem(), player->pEquipment.uGlove);
1667 } 1667 }
1668 1668
1669 //----- (0043BCA7) -------------------------------------------------------- 1669 //----- (0043BCA7) --------------------------------------------------------
1670 void CharacterUI_LoadPaperdollTextures() 1670 void CharacterUI_LoadPaperdollTextures()
1671 { 1671 {