diff UI/UICharacter.cpp @ 1682:3c451fd02fcf

OnInventoryLeftClick cleanup
author Grumpy7
date Fri, 20 Sep 2013 10:23:54 +0200
parents b0a2b8525483
children f84b8b2a875c
line wrap: on
line diff
--- a/UI/UICharacter.cpp	Thu Sep 19 08:26:28 2013 +0200
+++ b/UI/UICharacter.cpp	Fri Sep 20 10:23:54 2013 +0200
@@ -819,7 +819,7 @@
         {
           _50C9A8_item_enchantment_timer = 0;
           item->uAttributes &= 0xFFFFFF0Fu;
-          ptr_50C9A4 = 0;
+          ptr_50C9A4_ItemToEnchant = 0;
         }
         pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v166, TEXTURE_16BIT_PALETTE)),
                            pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255);
@@ -863,7 +863,7 @@
         {
           _50C9A8_item_enchantment_timer = 0;
           item->uAttributes &= 0xFFFFFF0Fu;
-          ptr_50C9A4 = 0;
+          ptr_50C9A4_ItemToEnchant = 0;
         }
         pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(pItemsTable->pItems[item->uItemID].pIconName, TEXTURE_16BIT_PALETTE)),
                   pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE),
@@ -924,7 +924,7 @@
           {
             _50C9A8_item_enchantment_timer = 0;
             item->uAttributes &= 0xFFFFFF0Fu;
-            ptr_50C9A4 = 0;
+            ptr_50C9A4_ItemToEnchant = 0;
           }
           pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_texture[pBodyComplection][index]),
                            pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255);
@@ -989,7 +989,7 @@
           {
             _50C9A8_item_enchantment_timer = 0;
             item->uAttributes &= 0xFFFFFF0Fu;
-            ptr_50C9A4 = 0;
+            ptr_50C9A4_ItemToEnchant = 0;
           }
           pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][0]),
                           pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255);
@@ -1051,7 +1051,7 @@
           {
             _50C9A8_item_enchantment_timer = 0;
             item->uAttributes &= 0xFFFFFF0Fu;
-            ptr_50C9A4 = 0;
+            ptr_50C9A4_ItemToEnchant = 0;
           }
           pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v59), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE),
                   GetTickCount() * 0.1, 0, 255);
@@ -1120,7 +1120,7 @@
             {
               _50C9A8_item_enchantment_timer = 0;
               item->uAttributes &= 0xFFFFFF0Fu;
-              ptr_50C9A4 = 0;
+              ptr_50C9A4_ItemToEnchant = 0;
             }
             pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v75), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE),
                         GetTickCount() * 0.1, 0, 255);
@@ -1208,7 +1208,7 @@
                   {
                     _50C9A8_item_enchantment_timer = 0;
                     item->uAttributes &= 0xFFFFFF0Fu;
-                    ptr_50C9A4 = 0;
+                    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);
@@ -1251,7 +1251,7 @@
               {
                 _50C9A8_item_enchantment_timer = 0;
                 item->uAttributes &= 0xFFFFFF0Fu;
-                ptr_50C9A4 = 0;
+                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);
@@ -1314,7 +1314,7 @@
               {
                 _50C9A8_item_enchantment_timer = 0;
                 item->uAttributes &= 0xFFFFFF0Fu;
-                ptr_50C9A4 = 0;
+                ptr_50C9A4_ItemToEnchant = 0;
               }
               pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_collar_texture[pBodyComplection][index]),
                             pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255);
@@ -1377,7 +1377,7 @@
           {
             _50C9A8_item_enchantment_timer = 0;
             item->uAttributes &= 0xFFFFFF0Fu;
-            ptr_50C9A4 = 0;
+            ptr_50C9A4_ItemToEnchant = 0;
           }
           pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v127), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE),
                         GetTickCount() * 0.1, 0, 255);
@@ -1435,7 +1435,7 @@
         {
           _50C9A8_item_enchantment_timer = 0;
           item->uAttributes &= 0xFFFFFF0Fu;
-          ptr_50C9A4 = 0;
+          ptr_50C9A4_ItemToEnchant = 0;
         }
         pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(v181, TEXTURE_16BIT_PALETTE)),
                    pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255);
@@ -1507,7 +1507,7 @@
         {
           _50C9A8_item_enchantment_timer = 0;
           item->uAttributes &= 0xFFFFFF0Fu;
-          ptr_50C9A4 = 0;
+          ptr_50C9A4_ItemToEnchant = 0;
         }
         pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v153), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE),
                      GetTickCount() * 0.1, 0, 255);
@@ -1584,7 +1584,7 @@
       {
         _50C9A8_item_enchantment_timer = 0;
         LOBYTE(player->pInventoryItemList[player->pInventoryMatrix[i] - 1].uAttributes) &= 0xF;
-        ptr_50C9A4 = 0;
+        ptr_50C9A4_ItemToEnchant = 0;
       }
       pRenderer->DrawAura(uCellX, uCellY, pTexture, pTexture, GetTickCount() * 0.1, 0, 255);
       ZBuffer_Fill(&pRenderer->pActiveZBuffer[v17], item_texture_id, player->pInventoryMatrix[i]);
@@ -1626,7 +1626,7 @@
     {
       _50C9A8_item_enchantment_timer = 0;
       item->uAttributes &= 0xFFFFFF0F;
-      ptr_50C9A4 = 0;
+      ptr_50C9A4_ItemToEnchant = 0;
     }
     pRenderer->DrawAura(x, y, item_texture, enchantment_texture, GetTickCount() * 0.1, 0, 255);
   }
@@ -2682,27 +2682,27 @@
       }
       WetsuitOff(uActiveCharacter);
     }
-    if ( unk_50C9A0 )//наложить закл на экипировку
+    if ( _50C9A0_IsEnchantingInProgress )//наложить закл на экипировку
     {
       *((char *)pGUIWindow_Settings->ptr_1C + 8) &= 0x7Fu;//CastSpellInfo
       *((short *)pGUIWindow_Settings->ptr_1C + 2) = uActiveCharacter - 1;
       *((int *)pGUIWindow_Settings->ptr_1C + 3) = v36;
       *((short *)pGUIWindow_Settings->ptr_1C + 3) = pEquipType;
-      ptr_50C9A4 = v38;
-      unk_50C9A0 = 0;
+      ptr_50C9A4_ItemToEnchant = v38;
+      _50C9A0_IsEnchantingInProgress = 0;
       if ( pMessageQueue_50CBD0->uNumMessages )
         pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
       pMouse->SetCursorBitmap("MICON1");
-      dword_50C9D4 = 0;
-      dword_50C9D0 = 113;
-      dword_50C9D8 = 256;
+      _50C9D4_AfterEnchClickEventSecondParam = 0;
+      _50C9D0_AfterEnchClickEventId = 113;
+      _50C9D8_AfterEnchClickEventTimeout = 256;
     }
     else
     {
-      if ( !ptr_50C9A4 )//снять вещь
+      if ( !ptr_50C9A4_ItemToEnchant )//снять вещь
       {
         pParty->SetHoldingItem(v38);
-        *(&pPlayers[uActiveCharacter]->uBirthYear + pPlayers[uActiveCharacter]->pInventoryItemList[v36].uBodyAnchor) = 0;// это pPlayers[uActiveCharacter]->pEquipment[pPlayers[uActiveCharacter]->pInventoryItemList[v36].uBodyAnchor]
+        pPlayers[uActiveCharacter]->pEquipment.pIndices[pPlayers[uActiveCharacter]->pInventoryItemList[v36].uBodyAnchor] = 0;
         v38->Reset();
       }
     }