Mercurial > mm7
comparison UI/UICharacter.cpp @ 1682:3c451fd02fcf
OnInventoryLeftClick cleanup
author | Grumpy7 |
---|---|
date | Fri, 20 Sep 2013 10:23:54 +0200 |
parents | b0a2b8525483 |
children | f84b8b2a875c |
comparison
equal
deleted
inserted
replaced
1681:406872881eb6 | 1682:3c451fd02fcf |
---|---|
817 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | 817 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; |
818 if ( _50C9A8_item_enchantment_timer <= 0 ) | 818 if ( _50C9A8_item_enchantment_timer <= 0 ) |
819 { | 819 { |
820 _50C9A8_item_enchantment_timer = 0; | 820 _50C9A8_item_enchantment_timer = 0; |
821 item->uAttributes &= 0xFFFFFF0Fu; | 821 item->uAttributes &= 0xFFFFFF0Fu; |
822 ptr_50C9A4 = 0; | 822 ptr_50C9A4_ItemToEnchant = 0; |
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 ) |
861 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | 861 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; |
862 if ( _50C9A8_item_enchantment_timer <= 0 ) | 862 if ( _50C9A8_item_enchantment_timer <= 0 ) |
863 { | 863 { |
864 _50C9A8_item_enchantment_timer = 0; | 864 _50C9A8_item_enchantment_timer = 0; |
865 item->uAttributes &= 0xFFFFFF0Fu; | 865 item->uAttributes &= 0xFFFFFF0Fu; |
866 ptr_50C9A4 = 0; | 866 ptr_50C9A4_ItemToEnchant = 0; |
867 } | 867 } |
868 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(pItemsTable->pItems[item->uItemID].pIconName, TEXTURE_16BIT_PALETTE)), | 868 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(pIcons_LOD->LoadTexture(pItemsTable->pItems[item->uItemID].pIconName, TEXTURE_16BIT_PALETTE)), |
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 } |
922 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | 922 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; |
923 if ( _50C9A8_item_enchantment_timer <= 0 ) | 923 if ( _50C9A8_item_enchantment_timer <= 0 ) |
924 { | 924 { |
925 _50C9A8_item_enchantment_timer = 0; | 925 _50C9A8_item_enchantment_timer = 0; |
926 item->uAttributes &= 0xFFFFFF0Fu; | 926 item->uAttributes &= 0xFFFFFF0Fu; |
927 ptr_50C9A4 = 0; | 927 ptr_50C9A4_ItemToEnchant = 0; |
928 } | 928 } |
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 ) |
987 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | 987 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; |
988 if ( _50C9A8_item_enchantment_timer <= 0 ) | 988 if ( _50C9A8_item_enchantment_timer <= 0 ) |
989 { | 989 { |
990 _50C9A8_item_enchantment_timer = 0; | 990 _50C9A8_item_enchantment_timer = 0; |
991 item->uAttributes &= 0xFFFFFF0Fu; | 991 item->uAttributes &= 0xFFFFFF0Fu; |
992 ptr_50C9A4 = 0; | 992 ptr_50C9A4_ItemToEnchant = 0; |
993 } | 993 } |
994 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][0]), | 994 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][0]), |
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 |
1049 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | 1049 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; |
1050 if ( _50C9A8_item_enchantment_timer <= 0 ) | 1050 if ( _50C9A8_item_enchantment_timer <= 0 ) |
1051 { | 1051 { |
1052 _50C9A8_item_enchantment_timer = 0; | 1052 _50C9A8_item_enchantment_timer = 0; |
1053 item->uAttributes &= 0xFFFFFF0Fu; | 1053 item->uAttributes &= 0xFFFFFF0Fu; |
1054 ptr_50C9A4 = 0; | 1054 ptr_50C9A4_ItemToEnchant = 0; |
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 ) |
1118 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | 1118 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; |
1119 if ( _50C9A8_item_enchantment_timer <= 0 ) | 1119 if ( _50C9A8_item_enchantment_timer <= 0 ) |
1120 { | 1120 { |
1121 _50C9A8_item_enchantment_timer = 0; | 1121 _50C9A8_item_enchantment_timer = 0; |
1122 item->uAttributes &= 0xFFFFFF0Fu; | 1122 item->uAttributes &= 0xFFFFFF0Fu; |
1123 ptr_50C9A4 = 0; | 1123 ptr_50C9A4_ItemToEnchant = 0; |
1124 } | 1124 } |
1125 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v75), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), | 1125 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v75), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), |
1126 GetTickCount() * 0.1, 0, 255); | 1126 GetTickCount() * 0.1, 0, 255); |
1127 } | 1127 } |
1128 } | 1128 } |
1206 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | 1206 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; |
1207 if ( _50C9A8_item_enchantment_timer <= 0 ) | 1207 if ( _50C9A8_item_enchantment_timer <= 0 ) |
1208 { | 1208 { |
1209 _50C9A8_item_enchantment_timer = 0; | 1209 _50C9A8_item_enchantment_timer = 0; |
1210 item->uAttributes &= 0xFFFFFF0Fu; | 1210 item->uAttributes &= 0xFFFFFF0Fu; |
1211 ptr_50C9A4 = 0; | 1211 ptr_50C9A4_ItemToEnchant = 0; |
1212 } | 1212 } |
1213 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v94), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), | 1213 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v94), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), |
1214 GetTickCount() * 0.1, 0, 255); | 1214 GetTickCount() * 0.1, 0, 255); |
1215 } | 1215 } |
1216 } | 1216 } |
1249 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | 1249 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; |
1250 if ( _50C9A8_item_enchantment_timer <= 0 ) | 1250 if ( _50C9A8_item_enchantment_timer <= 0 ) |
1251 { | 1251 { |
1252 _50C9A8_item_enchantment_timer = 0; | 1252 _50C9A8_item_enchantment_timer = 0; |
1253 item->uAttributes &= 0xFFFFFF0Fu; | 1253 item->uAttributes &= 0xFFFFFF0Fu; |
1254 ptr_50C9A4 = 0; | 1254 ptr_50C9A4_ItemToEnchant = 0; |
1255 } | 1255 } |
1256 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]), | 1256 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_armor_texture[pBodyComplection][index][1]), |
1257 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255); | 1257 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255); |
1258 } | 1258 } |
1259 } | 1259 } |
1312 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | 1312 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; |
1313 if ( _50C9A8_item_enchantment_timer <= 0 ) | 1313 if ( _50C9A8_item_enchantment_timer <= 0 ) |
1314 { | 1314 { |
1315 _50C9A8_item_enchantment_timer = 0; | 1315 _50C9A8_item_enchantment_timer = 0; |
1316 item->uAttributes &= 0xFFFFFF0Fu; | 1316 item->uAttributes &= 0xFFFFFF0Fu; |
1317 ptr_50C9A4 = 0; | 1317 ptr_50C9A4_ItemToEnchant = 0; |
1318 } | 1318 } |
1319 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_collar_texture[pBodyComplection][index]), | 1319 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(paperdoll_cloak_collar_texture[pBodyComplection][index]), |
1320 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255); | 1320 pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), GetTickCount() * 0.1, 0, 255); |
1321 } | 1321 } |
1322 } | 1322 } |
1375 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | 1375 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; |
1376 if ( _50C9A8_item_enchantment_timer <= 0 ) | 1376 if ( _50C9A8_item_enchantment_timer <= 0 ) |
1377 { | 1377 { |
1378 _50C9A8_item_enchantment_timer = 0; | 1378 _50C9A8_item_enchantment_timer = 0; |
1379 item->uAttributes &= 0xFFFFFF0Fu; | 1379 item->uAttributes &= 0xFFFFFF0Fu; |
1380 ptr_50C9A4 = 0; | 1380 ptr_50C9A4_ItemToEnchant = 0; |
1381 } | 1381 } |
1382 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v127), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), | 1382 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v127), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), |
1383 GetTickCount() * 0.1, 0, 255); | 1383 GetTickCount() * 0.1, 0, 255); |
1384 } | 1384 } |
1385 else | 1385 else |
1433 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | 1433 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; |
1434 if ( _50C9A8_item_enchantment_timer <= 0 ) | 1434 if ( _50C9A8_item_enchantment_timer <= 0 ) |
1435 { | 1435 { |
1436 _50C9A8_item_enchantment_timer = 0; | 1436 _50C9A8_item_enchantment_timer = 0; |
1437 item->uAttributes &= 0xFFFFFF0Fu; | 1437 item->uAttributes &= 0xFFFFFF0Fu; |
1438 ptr_50C9A4 = 0; | 1438 ptr_50C9A4_ItemToEnchant = 0; |
1439 } | 1439 } |
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 ) |
1505 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | 1505 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; |
1506 if ( _50C9A8_item_enchantment_timer <= 0 ) | 1506 if ( _50C9A8_item_enchantment_timer <= 0 ) |
1507 { | 1507 { |
1508 _50C9A8_item_enchantment_timer = 0; | 1508 _50C9A8_item_enchantment_timer = 0; |
1509 item->uAttributes &= 0xFFFFFF0Fu; | 1509 item->uAttributes &= 0xFFFFFF0Fu; |
1510 ptr_50C9A4 = 0; | 1510 ptr_50C9A4_ItemToEnchant = 0; |
1511 } | 1511 } |
1512 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v153), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), | 1512 pRenderer->DrawAura(item_X, item_Y, pIcons_LOD->GetTexture(v153), pIcons_LOD->LoadTexturePtr(container, TEXTURE_16BIT_PALETTE), |
1513 GetTickCount() * 0.1, 0, 255); | 1513 GetTickCount() * 0.1, 0, 255); |
1514 if ( v245 ) | 1514 if ( v245 ) |
1515 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdollLeftEmptyHand[pBodyComplection][0], | 1515 pRenderer->DrawTextureTransparent(pPaperdoll_BodyX + pPaperdollLeftEmptyHand[pBodyComplection][0], |
1582 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | 1582 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; |
1583 if (_50C9A8_item_enchantment_timer <= 0) | 1583 if (_50C9A8_item_enchantment_timer <= 0) |
1584 { | 1584 { |
1585 _50C9A8_item_enchantment_timer = 0; | 1585 _50C9A8_item_enchantment_timer = 0; |
1586 LOBYTE(player->pInventoryItemList[player->pInventoryMatrix[i] - 1].uAttributes) &= 0xF; | 1586 LOBYTE(player->pInventoryItemList[player->pInventoryMatrix[i] - 1].uAttributes) &= 0xF; |
1587 ptr_50C9A4 = 0; | 1587 ptr_50C9A4_ItemToEnchant = 0; |
1588 } | 1588 } |
1589 pRenderer->DrawAura(uCellX, uCellY, pTexture, pTexture, GetTickCount() * 0.1, 0, 255); | 1589 pRenderer->DrawAura(uCellX, uCellY, pTexture, pTexture, GetTickCount() * 0.1, 0, 255); |
1590 ZBuffer_Fill(&pRenderer->pActiveZBuffer[v17], item_texture_id, player->pInventoryMatrix[i]); | 1590 ZBuffer_Fill(&pRenderer->pActiveZBuffer[v17], item_texture_id, player->pInventoryMatrix[i]); |
1591 } | 1591 } |
1592 else | 1592 else |
1624 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; | 1624 _50C9A8_item_enchantment_timer -= pEventTimer->uTimeElapsed; |
1625 if (_50C9A8_item_enchantment_timer <= 0) | 1625 if (_50C9A8_item_enchantment_timer <= 0) |
1626 { | 1626 { |
1627 _50C9A8_item_enchantment_timer = 0; | 1627 _50C9A8_item_enchantment_timer = 0; |
1628 item->uAttributes &= 0xFFFFFF0F; | 1628 item->uAttributes &= 0xFFFFFF0F; |
1629 ptr_50C9A4 = 0; | 1629 ptr_50C9A4_ItemToEnchant = 0; |
1630 } | 1630 } |
1631 pRenderer->DrawAura(x, y, item_texture, enchantment_texture, GetTickCount() * 0.1, 0, 255); | 1631 pRenderer->DrawAura(x, y, item_texture, enchantment_texture, GetTickCount() * 0.1, 0, 255); |
1632 } | 1632 } |
1633 else | 1633 else |
1634 { | 1634 { |
2680 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); | 2680 pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); |
2681 return; | 2681 return; |
2682 } | 2682 } |
2683 WetsuitOff(uActiveCharacter); | 2683 WetsuitOff(uActiveCharacter); |
2684 } | 2684 } |
2685 if ( unk_50C9A0 )//наложить закл на экипировку | 2685 if ( _50C9A0_IsEnchantingInProgress )//наложить закл на экипировку |
2686 { | 2686 { |
2687 *((char *)pGUIWindow_Settings->ptr_1C + 8) &= 0x7Fu;//CastSpellInfo | 2687 *((char *)pGUIWindow_Settings->ptr_1C + 8) &= 0x7Fu;//CastSpellInfo |
2688 *((short *)pGUIWindow_Settings->ptr_1C + 2) = uActiveCharacter - 1; | 2688 *((short *)pGUIWindow_Settings->ptr_1C + 2) = uActiveCharacter - 1; |
2689 *((int *)pGUIWindow_Settings->ptr_1C + 3) = v36; | 2689 *((int *)pGUIWindow_Settings->ptr_1C + 3) = v36; |
2690 *((short *)pGUIWindow_Settings->ptr_1C + 3) = pEquipType; | 2690 *((short *)pGUIWindow_Settings->ptr_1C + 3) = pEquipType; |
2691 ptr_50C9A4 = v38; | 2691 ptr_50C9A4_ItemToEnchant = v38; |
2692 unk_50C9A0 = 0; | 2692 _50C9A0_IsEnchantingInProgress = 0; |
2693 if ( pMessageQueue_50CBD0->uNumMessages ) | 2693 if ( pMessageQueue_50CBD0->uNumMessages ) |
2694 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 2694 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
2695 pMouse->SetCursorBitmap("MICON1"); | 2695 pMouse->SetCursorBitmap("MICON1"); |
2696 dword_50C9D4 = 0; | 2696 _50C9D4_AfterEnchClickEventSecondParam = 0; |
2697 dword_50C9D0 = 113; | 2697 _50C9D0_AfterEnchClickEventId = 113; |
2698 dword_50C9D8 = 256; | 2698 _50C9D8_AfterEnchClickEventTimeout = 256; |
2699 } | 2699 } |
2700 else | 2700 else |
2701 { | 2701 { |
2702 if ( !ptr_50C9A4 )//снять вещь | 2702 if ( !ptr_50C9A4_ItemToEnchant )//снять вещь |
2703 { | 2703 { |
2704 pParty->SetHoldingItem(v38); | 2704 pParty->SetHoldingItem(v38); |
2705 *(&pPlayers[uActiveCharacter]->uBirthYear + pPlayers[uActiveCharacter]->pInventoryItemList[v36].uBodyAnchor) = 0;// это pPlayers[uActiveCharacter]->pEquipment[pPlayers[uActiveCharacter]->pInventoryItemList[v36].uBodyAnchor] | 2705 pPlayers[uActiveCharacter]->pEquipment.pIndices[pPlayers[uActiveCharacter]->pInventoryItemList[v36].uBodyAnchor] = 0; |
2706 v38->Reset(); | 2706 v38->Reset(); |
2707 } | 2707 } |
2708 } | 2708 } |
2709 } | 2709 } |
2710 else//снять лук | 2710 else//снять лук |