diff UI/UICharacter.cpp @ 1836:f017f8e79aa1

Merge
author Ritor1
date Fri, 11 Oct 2013 18:55:43 +0600
parents 5f9eeb7bf8e6
children 211dfe2d8db1
line wrap: on
line diff
--- a/UI/UICharacter.cpp	Fri Oct 11 18:55:07 2013 +0600
+++ b/UI/UICharacter.cpp	Fri Oct 11 18:55:43 2013 +0600
@@ -776,16 +776,16 @@
     if ( !bRingsShownInCharScreen )
       pRenderer->DrawMaskToZBuffer(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]), player->pEquipment.uArmor);
     //Рука не занята или ...
-    if ( !player->pEquipment.uMainHand
-         || ( pPlayers[uPlayerID]->pInventoryItemList[player->pEquipment.uMainHand - 1].GetItemEquipType() != EQUIP_MAIN_HAND)
-         && (pPlayers[uPlayerID]->pInventoryItemList[player->pEquipment.uMainHand - 1].GetItemEquipType() != PLAYER_SKILL_SPEAR
-         || pPlayers[uPlayerID]->pEquipment.uShield) )
+    if ( !player->GetItem(&PlayerEquipment::uMainHand)
+         || ( player->GetMainHandItem()->GetItemEquipType() != EQUIP_MAIN_HAND)
+         && (player->GetMainHandItem()->GetItemEquipType() != PLAYER_SKILL_SPEAR
+         || player->GetItem(&PlayerEquipment::uShield)) )
       pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1],
                                         pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1]));
     //-----------------------------------------------------(Hand/Рука)---------------------------------------------------------------
-    if ( pPlayers[uPlayerID]->pEquipment.uMainHand )
+    if ( player->GetItem(&PlayerEquipment::uMainHand) )
     {
-      item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uMainHand - 1];
+      item = player->GetMainHandItem();
       item_X = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[item->uItemID].uEquipX;
       item_Y = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][1][1] - pItemsTable->pItems[item->uItemID].uEquipY;
       if ( item->uItemID == 64 )  //blaster
@@ -825,15 +825,15 @@
                            pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255);
       }
       if ( !bRingsShownInCharScreen )
-        pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE)), pPlayers[uPlayerID]->pEquipment.uMainHand);
+        pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE)), player->pEquipment.uMainHand);
     }
   }
   else// без акваланга
   {
     //----------------(Bow/ Лук)-------------------------------------------------
-    if ( pPlayers[uPlayerID]->pEquipment.uBow )
+    if ( player->GetItem(&PlayerEquipment::uBow) )
     {
-      item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uBow - 1];
+      item = player->GetBowItem();
       item_X = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][2][0] - pItemsTable->pItems[item->uItemID].uEquipX;
       item_Y = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][2][1] - pItemsTable->pItems[item->uItemID].uEquipY;
       if ( !(item->uAttributes & 0xF0) )// если не применён закл
@@ -871,12 +871,12 @@
       }
       if ( !bRingsShownInCharScreen )
         pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(item->GetIconName(), TEXTURE_16BIT_PALETTE)),
-                pPlayers[uPlayerID]->pEquipment.uBow);
+                player->pEquipment.uBow);
     }
     //-----------------------------(Cloak/Плащ)---------------------------------------------------------
-    if ( pPlayers[uPlayerID]->pEquipment.uCloak )
+    if ( player->GetItem(&PlayerEquipment::uCloak) )
     {
-      item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uCloak - 1];
+      item = player->GetCloakItem();
       switch ( item->uItemID )
       {
         case ITEM_RELIC_TWILIGHT:
@@ -931,15 +931,15 @@
         }
         if ( !bRingsShownInCharScreen )
           pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_texture[pBodyComplection][index]),
-                                       pPlayers[uPlayerID]->pEquipment.uCloak);
+                                       player->pEquipment.uCloak);
       }
     }
     //-------------------------------(Paperdoll/Кукла)-------------------------------------------
     pRenderer->DrawTextureTransparent(pPaperdoll_BodyX, pPaperdoll_BodyY, pIcons_LOD->GetTexture(papredoll_dbods[uPlayerID - 1]));
     //-------------------------------(Armor/Броня)-----------------------------------------------
-    if ( pPlayers[uPlayerID]->pEquipment.uArmor )
+    if ( player->GetItem(&PlayerEquipment::uArmor) )
     {
-      item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uArmor - 1];
+      item = player->GetArmorItem();
       switch ( item->uItemID )
       {
         case ITEM_ARTIFACT_GOVERNORS_ARMOR:
@@ -997,19 +997,19 @@
 
         if ( !bRingsShownInCharScreen )
           pRenderer->DrawMaskToZBuffer(item_X, item_Y, &pIcons_LOD->pTextures[paperdoll_armor_texture[pBodyComplection][index][0]],
-                                       pPlayers[uPlayerID]->pEquipment.uArmor);
+                                       player->pEquipment.uArmor);
       }
     }
     //----------------------------------(End of Armor/Конец Брони)------------------------------------------
     //----------------------------------(Boot/Обувь)--------------------------------------------------------
-    if ( pPlayers[uPlayerID]->pEquipment.uBoot )
+    if ( player->GetItem(&PlayerEquipment::uBoot) )
     {
-      item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uBoot - 1];
+      item = player->GetBootItem();
       switch ( item->uItemID )
       {
         case ITEM_ARTIFACT_HERMES_SANDALS:
           index = 5;
-          v59 = papredoll_flying_feet[pPlayers[uPlayerID]->uCurrentFace];
+          v59 = papredoll_flying_feet[player->uCurrentFace];
           break;
         case ITEM_ARTIFACT_LEAGUE_BOOTS:
           index = 6;
@@ -1057,20 +1057,20 @@
                   GetTickCount() * 0.1, 0, 255);
         }
         if ( !bRingsShownInCharScreen )
-          pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v59), pPlayers[uPlayerID]->pEquipment.uBoot);
+          pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v59), player->pEquipment.uBoot);
       }
     }
     //--------------------------------------------(Hand/Рука)------------------------------------------------------
-    if ( !pPlayers[uPlayerID]->pEquipment.uMainHand
-        || ( pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uMainHand -1].GetItemEquipType() != EQUIP_MAIN_HAND)
-        && (pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uMainHand -1].GetPlayerSkillType() != PLAYER_SKILL_SPEAR
-        || pPlayers[uPlayerID]->pEquipment.uShield) )
+    if ( !player->GetItem(&PlayerEquipment::uMainHand)
+        || ( player->GetMainHandItem()->GetItemEquipType() != EQUIP_MAIN_HAND)
+        && (player->GetMainHandItem()->GetPlayerSkillType() != PLAYER_SKILL_SPEAR
+        || player->GetItem(&PlayerEquipment::uShield)) )
       pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_LeftHand[pBodyComplection][0],
                             pPaperdoll_BodyY + pPaperdoll_LeftHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlads[uPlayerID - 1]));
     //--------------------------------------------(Belt/Пояс)-------------------------------------------------------
-      if ( pPlayers[uPlayerID]->pEquipment.uBelt )
+      if ( player->GetItem(&PlayerEquipment::uBelt))
       {
-        item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uBelt - 1];
+        item = player->GetBeltItem();
         switch ( item->uItemID )
         {
           case ITEM_RILIC_TITANS_BELT:
@@ -1103,7 +1103,7 @@
                 pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v75));
             }
             if ( !bRingsShownInCharScreen )
-              pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v75), pPlayers[uPlayerID]->pEquipment.uBelt);
+              pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v75), player->pEquipment.uBelt);
           }
           else
           {
@@ -1128,18 +1128,20 @@
         }
       }
       //---------------------------------------------(Hand2/Рука2)--------------------------------------------------
-      if ( pPlayers[uPlayerID]->pEquipment.uMainHand )
+      if ( player->GetItem(&PlayerEquipment::uMainHand) )
       {
-        if ( pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uMainHand - 1].GetItemEquipType() == EQUIP_MAIN_HAND
-             || pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uMainHand - 1].GetPlayerSkillType() == PLAYER_SKILL_SPEAR
-             && !pPlayers[uPlayerID]->pEquipment.uShield )
+        if ( player->GetMainHandItem()->GetItemEquipType() == EQUIP_MAIN_HAND
+             || player->GetMainHandItem()->GetPlayerSkillType() == PLAYER_SKILL_SPEAR
+             && !player->GetItem(&PlayerEquipment::uShield) )
           pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0],
                      pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlaus[uPlayerID - 1]));
       }
       //--------------------------------(Shoulder/Плечи)---------------------------------------------
-      item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uArmor - 1];
-      switch ( item->uItemID )
+      if (player->GetItem(&PlayerEquipment::uArmor))
       {
+        item = player->GetArmorItem();
+        switch ( item->uItemID )
+        {
         case ITEM_ARTIFACT_GOVERNORS_ARMOR:
           index = 15;
           break;
@@ -1155,114 +1157,115 @@
         default:
           index = item->uItemID - 66;
           break;
-      }
-      if ( index >= 0 && index < 17 )
-      {
-        if ( pPlayers[uPlayerID]->pEquipment.uMainHand
-          && (pPlayers[uPlayerID]->GetEquippedItemEquipType(EQUIP_MAIN_HAND) == EQUIP_MAIN_HAND
-          ||  pPlayers[uPlayerID]->GetEquippedItemSkillType(EQUIP_MAIN_HAND) == EQUIP_SHIELD
-          && !pPlayers[uPlayerID]->pEquipment.uShield) )//без щита
+        }
+        if ( index >= 0 && index < 17 )
         {
-          v94 = paperdoll_armor_texture[pBodyComplection][index][2];
-          if ( paperdoll_armor_texture[pBodyComplection][index][2] == pIcons_LOD->FindTextureByName("pending") )
-          {
-            v94 = paperdoll_armor_texture[pBodyComplection][index][1];
-            item_X = pPaperdoll_BodyX + paperdoll_shoulder_coord[pBodyComplection][index][0];
-            item_Y = pPaperdoll_BodyY + paperdoll_shoulder_coord[pBodyComplection][index][1];
-          }
-          else
+          if ( player->GetItem(&PlayerEquipment::uMainHand)
+            && (player->GetMainHandItem()->GetItemEquipType() == EQUIP_MAIN_HAND
+            ||  player->GetMainHandItem()->GetPlayerSkillType() == PLAYER_SKILL_SPEAR
+            && !player->GetItem(&PlayerEquipment::uShield) ))//без щита
           {
-            item_X = pPaperdoll_BodyX + paperdoll_shoulder_second_coord[pBodyComplection][index][0];
-            item_Y = pPaperdoll_BodyY + paperdoll_shoulder_second_coord[pBodyComplection][index][1];
-          }
-          if ( v94 != pIcons_LOD->FindTextureByName("pending") )
-          {
-            if ( !(item->uAttributes & 0xF0) )
+            v94 = paperdoll_armor_texture[pBodyComplection][index][2];
+            if ( paperdoll_armor_texture[pBodyComplection][index][2] == pIcons_LOD->FindTextureByName("pending") )
             {
-              if ( item->uAttributes & 2 )
-                pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(v94));
-              else
-              {
-                if ( item->uAttributes & 1 )
-                  pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(v94));
-                else
-                  pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v94));
-              }
+              v94 = paperdoll_armor_texture[pBodyComplection][index][1];
+              item_X = pPaperdoll_BodyX + paperdoll_shoulder_coord[pBodyComplection][index][0];
+              item_Y = pPaperdoll_BodyY + paperdoll_shoulder_coord[pBodyComplection][index][1];
             }
             else
             {
-              if ( paperdoll_armor_texture[pBodyComplection][index][2] != pIcons_LOD->FindTextureByName("pending") )
+              item_X = pPaperdoll_BodyX + paperdoll_shoulder_second_coord[pBodyComplection][index][0];
+              item_Y = pPaperdoll_BodyY + paperdoll_shoulder_second_coord[pBodyComplection][index][1];
+            }
+            if ( v94 != pIcons_LOD->FindTextureByName("pending") )
+            {
+              if ( !(item->uAttributes & 0xF0) )
               {
-                if ( item->uAttributes & 0xF0 )
+                if ( item->uAttributes & 2 )
+                  pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(v94));
+                else
+                {
+                  if ( item->uAttributes & 1 )
+                    pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(v94));
+                  else
+                    pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(v94));
+                }
+              }
+              else
+              {
+                if ( paperdoll_armor_texture[pBodyComplection][index][2] != pIcons_LOD->FindTextureByName("pending") )
                 {
-                  if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED )
-                    container = "sptext01";
-                  if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE )
-                    container = "sp28a";
-                  if ( ( item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN )
-                    container = "sp30a";
-                  if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE )
-                    container = "sp91a";
-                  _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
-                  if ( _50C9A8_item_enchantment_timer <= 0 )
+                  if ( item->uAttributes & 0xF0 )
                   {
-                    _50C9A8_item_enchantment_timer = 0;
-                    item->uAttributes &= 0xFFFFFF0Fu;
-                    ptr_50C9A4_ItemToEnchant = 0;
+                    if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED )
+                      container = "sptext01";
+                    if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE )
+                      container = "sp28a";
+                    if ( ( item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN )
+                      container = "sp30a";
+                    if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE )
+                      container = "sp91a";
+                    _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
+                    if ( _50C9A8_item_enchantment_timer <= 0 )
+                    {
+                      _50C9A8_item_enchantment_timer = 0;
+                      item->uAttributes &= 0xFFFFFF0Fu;
+                      ptr_50C9A4_ItemToEnchant = 0;
+                    }
+                    pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v94), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE),
+                      GetTickCount() * 0.1, 0, 255);
                   }
-                  pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v94), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE),
-                                GetTickCount() * 0.1, 0, 255);
                 }
               }
             }
           }
-        }
-        else//без ничего или с щитом
-        {
-          //v94 = paperdoll_armor_texture[pBodyComplection][index][1];
-          if ( paperdoll_armor_texture[pBodyComplection][index][1] != pIcons_LOD->FindTextureByName("pending") )
+          else//без ничего или с щитом
           {
-            item_X = pPaperdoll_BodyX + paperdoll_shoulder_coord[pBodyComplection][index][0];
-            item_Y = pPaperdoll_BodyY + paperdoll_shoulder_coord[pBodyComplection][index][1];
-            if ( !(item->uAttributes & 0xF0) )
+            //v94 = paperdoll_armor_texture[pBodyComplection][index][1];
+            if ( paperdoll_armor_texture[pBodyComplection][index][1] != pIcons_LOD->FindTextureByName("pending") )
             {
-              if ( item->uAttributes & 2 )
-                pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]));
+              item_X = pPaperdoll_BodyX + paperdoll_shoulder_coord[pBodyComplection][index][0];
+              item_Y = pPaperdoll_BodyY + paperdoll_shoulder_coord[pBodyComplection][index][1];
+              if ( !(item->uAttributes & 0xF0) )
+              {
+                if ( item->uAttributes & 2 )
+                  pRenderer->DrawTransparentRedShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]));
+                else
+                {
+                  if ( item->uAttributes & 1 )
+                    pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]));
+                  else
+                    pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]));
+                }
+              }
               else
               {
-                if ( item->uAttributes & 1 )
-                  pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]));
-                else
-                  pRenderer->DrawTransparentGreenShade(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]));
+                if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED )
+                  container = "sptext01";
+                if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE )
+                  container = "sp28a";
+                if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN )
+                  container = "sp30a";
+                if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE )
+                  container = "sp91a";
+                _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
+                if ( _50C9A8_item_enchantment_timer <= 0 )
+                {
+                  _50C9A8_item_enchantment_timer = 0;
+                  item->uAttributes &= 0xFFFFFF0Fu;
+                  ptr_50C9A4_ItemToEnchant = 0;
+                }
+                pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]),
+                  pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255);
               }
             }
-            else
-            {
-              if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_RED )
-                container = "sptext01";
-              if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_BLUE )
-                container = "sp28a";
-              if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_GREEN )
-                container = "sp30a";
-              if ( (item->uAttributes & 0xF0) == ITEM_AURA_EFFECT_PURPLE )
-                container = "sp91a";
-              _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed;
-              if ( _50C9A8_item_enchantment_timer <= 0 )
-              {
-                _50C9A8_item_enchantment_timer = 0;
-                item->uAttributes &= 0xFFFFFF0Fu;
-                ptr_50C9A4_ItemToEnchant = 0;
-              }
-              pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]),
-                    pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255);
-            }
           }
         }
       }
       //----------------------------------------------(Cloak collar/воротник плаща)-------------------------------------
-      if ( pPlayers[uPlayerID]->pEquipment.uCloak )
+      if ( player->GetItem(&PlayerEquipment::uCloak) )
       {
-        item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uCloak - 1];
+        item = player->GetCloakItem();
         switch ( item->uItemID )
         {
           case ITEM_RELIC_TWILIGHT:
@@ -1297,7 +1300,7 @@
                 pRenderer->DrawTextureTransparent(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_collar_texture[pBodyComplection][index]));
               if ( !bRingsShownInCharScreen )
                 pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_collar_texture[pBodyComplection][index]),
-                             pPlayers[uPlayerID]->pEquipment.uCloak);
+                             player->pEquipment.uCloak);
             }
             else
             {
@@ -1323,17 +1326,17 @@
         }
       }
       //--------------------------------------------(Beards/Борода)-------------------------------------------------------
-      if ( pPlayers[uPlayerID]->uCurrentFace == 12 || pPlayers[uPlayerID]->uCurrentFace == 13 )
+      if ( player->uCurrentFace == 12 || player->uCurrentFace == 13 )
       {
-        if ( papredoll_dbrds[pPlayers[uPlayerID]->uCurrentFace] != pIcons_LOD->FindTextureByName("Pending") )
-          pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_Beards[2 * pPlayers[uPlayerID]->uCurrentFace - 24],
-                     pPaperdoll_BodyY + pPaperdoll_Beards[2 * pPlayers[uPlayerID]->uCurrentFace - 23],
-                     pIcons_LOD->GetTexture(papredoll_dbrds[pPlayers[uPlayerID]->uCurrentFace]));
+        if ( papredoll_dbrds[player->uCurrentFace] != pIcons_LOD->FindTextureByName("Pending") )
+          pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_Beards[2 * player->uCurrentFace - 24],
+                     pPaperdoll_BodyY + pPaperdoll_Beards[2 * player->uCurrentFace - 23],
+                     pIcons_LOD->GetTexture(papredoll_dbrds[player->uCurrentFace]));
       }
     //--------------------------------------------(Helm/Шлем)------------------------------------------------------------
-    if ( pPlayers[uPlayerID]->pEquipment.uHelm )
+    if ( player->GetItem(&PlayerEquipment::uHelm) )
     {
-      item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uHelm - 1];
+      item = player->GetHelmItem();
       switch ( item->uItemID )
       {
         case ITEM_RELIC_TALEDONS_HELM:
@@ -1395,13 +1398,13 @@
           }
         }
         if ( !bRingsShownInCharScreen )
-          pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v127), pPlayers[uPlayerID]->pEquipment.uHelm);
+          pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v127), player->pEquipment.uHelm);
       }
     }
     //------------------------------------------------(Hand3/Рука3)-------------------------------------------
-    if ( pPlayers[uPlayerID]->pEquipment.uMainHand )
+    if ( player->GetItem(&PlayerEquipment::uMainHand) )
     {
-      item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uMainHand - 1];
+      item = player->GetMainHandItem();
       item_X = pPaperdoll_BodyX + paperdoll_Weapon[pBodyComplection][1][0] - pItemsTable->pItems[item->uItemID].uEquipX;
       item_Y = pPaperdoll_BodyY + paperdoll_Weapon[pBodyComplection][1][1] - pItemsTable->pItems[item->uItemID].uEquipY;
       if ( item->uItemID == 64 )
@@ -1442,12 +1445,12 @@
       }
       if ( !bRingsShownInCharScreen )
         pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE)),
-                    pPlayers[uPlayerID]->pEquipment.uMainHand);
+                    player->pEquipment.uMainHand);
     }
     //--------------------------------------------------(Shield/Щит)---------------------------------------------
-    if ( pPlayers[uPlayerID]->pEquipment.uShield )
+    if ( player->GetItem(&PlayerEquipment::uShield) )
     {
-      item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uShield - 1];
+      item = player->GetOffHandItem();
       if ( item->GetPlayerSkillType() == PLAYER_SKILL_DAGGER
         || item->GetPlayerSkillType() == PLAYER_SKILL_SWORD )
       {
@@ -1516,18 +1519,18 @@
                  pPaperdoll_BodyY + pPaperdollLeftEmptyHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_dlhs[uPlayerID - 1]));
       }
       if ( !bRingsShownInCharScreen )
-        pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v153), pPlayers[uPlayerID]->pEquipment.uShield);
+        pRenderer->DrawMaskToZBuffer(item_X, item_Y, pIcons_LOD->GetTexture(v153), player->pEquipment.uShield);
     }
   }
   //--------------------------------------------------------(RightHand/Правая рука)--------------------------------------------------
   pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_RightHand[pBodyComplection][0], pPaperdoll_BodyY + pPaperdoll_RightHand[pBodyComplection][1], pIcons_LOD->GetTexture(papredoll_drhs[uPlayerID - 1]));
   //--------------------------------------------------------(LeftHand/Левая рука)----------------------------------------------------
-  if ( pPlayers[uPlayerID]->pEquipment.uMainHand )
+  if ( player->GetItem(&PlayerEquipment::uMainHand))
   {
-    item = &pPlayers[uPlayerID]->pInventoryItemList[pPlayers[uPlayerID]->pEquipment.uMainHand - 1];
+    item = player->GetMainHandItem();
     if ( item->GetItemEquipType() == EQUIP_MAIN_HAND
         || item->GetPlayerSkillType() == PLAYER_SKILL_SPEAR
-        && !pPlayers[uPlayerID]->pEquipment.uShield )
+        && !player->GetItem(&PlayerEquipment::uShield) )
       pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdoll_SecondLeftHand[pBodyComplection][0], 
                                         pPaperdoll_BodyY + pPaperdoll_SecondLeftHand[pBodyComplection][1], 
                                         pIcons_LOD->GetTexture(papredoll_dlhus[uPlayerID - 1]));
@@ -1661,9 +1664,9 @@
                          player->pEquipment.uRings[i]);
   }
   if (player->pEquipment.uAmulet)
-    CharacterUI_DrawItem(493, 91, &player->pInventoryItemList[player->pEquipment.uAmulet - 1], player->pEquipment.uAmulet);
+    CharacterUI_DrawItem(493, 91, player->GetAmuletItem(), player->pEquipment.uAmulet);
   if (player->pEquipment.uGlove)
-    CharacterUI_DrawItem(586, 88, &player->pInventoryItemList[player->pEquipment.uGlove - 1], player->pEquipment.uGlove);
+    CharacterUI_DrawItem(586, 88, player->GetGloveItem(), player->pEquipment.uGlove);
 }
 
 //----- (0043BCA7) --------------------------------------------------------