Mercurial > mm7
comparison mm7_2.cpp @ 898:10fa7dad1391
DrawPaperdoll clean
author | Ritor1 |
---|---|
date | Mon, 15 Apr 2013 16:36:56 +0600 |
parents | df0ffbb70cc6 |
children | 4dc2252e0b03 |
comparison
equal
deleted
inserted
replaced
897:d3228f46ef68 | 898:10fa7dad1391 |
---|---|
9546 | 9546 |
9547 v51 = 0; | 9547 v51 = 0; |
9548 _this.Reset(); | 9548 _this.Reset(); |
9549 v0 = pPlayers[uActiveCharacter]; | 9549 v0 = pPlayers[uActiveCharacter]; |
9550 v1 = v0->pEquipment.uMainHand; | 9550 v1 = v0->pEquipment.uMainHand; |
9551 v2 = v0->pEquipment.uOffHand; | 9551 v2 = v0->pEquipment.uShield; |
9552 v54 = v0->pEquipment.uOffHand; | 9552 v54 = v0->pEquipment.uShield; |
9553 v53 = v1; | 9553 v53 = v1; |
9554 if ( v1 && pItemsTable->pItems[*(int *)&v0->pInventoryItems[v1-1]].uEquipType == 1 ) | 9554 if ( v1 && pItemsTable->pItems[*(int *)&v0->pInventoryItems[v1-1]].uEquipType == 1 ) |
9555 v51 = v1; | 9555 v51 = v1; |
9556 v3 = pParty->pPickedItem.uItemID; | 9556 v3 = pParty->pPickedItem.uItemID; |
9557 if ( pParty->pPickedItem.uItemID ) | 9557 if ( pParty->pPickedItem.uItemID ) |
9652 if ( (v8 & 0x80000000u) == 0 ) | 9652 if ( (v8 & 0x80000000u) == 0 ) |
9653 { | 9653 { |
9654 v9 = v52; | 9654 v9 = v52; |
9655 pParty->pPickedItem.uBodyAnchor = v52 + 1; | 9655 pParty->pPickedItem.uBodyAnchor = v52 + 1; |
9656 memcpy(&v0->pInventoryItems[v8], &pParty->pPickedItem, sizeof(v0->pInventoryItems[v8])); | 9656 memcpy(&v0->pInventoryItems[v8], &pParty->pPickedItem, sizeof(v0->pInventoryItems[v8])); |
9657 *(&v0->pEquipment.uOffHand + v9) = v8 + 1; | 9657 *(&v0->pEquipment.uShield + v9) = v8 + 1; |
9658 pMouse->RemoveHoldingItem(); | 9658 pMouse->RemoveHoldingItem(); |
9659 break; | 9659 break; |
9660 } | 9660 } |
9661 } | 9661 } |
9662 ++v52; | 9662 ++v52; |
9706 pParty->SetHoldingItem((ItemGen *)(v12 + 532)); | 9706 pParty->SetHoldingItem((ItemGen *)(v12 + 532)); |
9707 _this.uBodyAnchor = 1; | 9707 _this.uBodyAnchor = 1; |
9708 v13 = v54 + 1; | 9708 v13 = v54 + 1; |
9709 v14 = v51 == 0; | 9709 v14 = v51 == 0; |
9710 memcpy((void *)(v12 + 532), &_this, 0x24u); | 9710 memcpy((void *)(v12 + 532), &_this, 0x24u); |
9711 v0->pEquipment.uOffHand = v13; | 9711 v0->pEquipment.uShield = v13; |
9712 if ( v14 ) | 9712 if ( v14 ) |
9713 return; | 9713 return; |
9714 } | 9714 } |
9715 else | 9715 else |
9716 { | 9716 { |
9720 if ( !v51 ) | 9720 if ( !v51 ) |
9721 { | 9721 { |
9722 pParty->pPickedItem.uBodyAnchor = 1; | 9722 pParty->pPickedItem.uBodyAnchor = 1; |
9723 v17 = v52 + 1; | 9723 v17 = v52 + 1; |
9724 memcpy(&v0->pInventoryItems[v52], &pParty->pPickedItem, sizeof(v0->pInventoryItems[v52])); | 9724 memcpy(&v0->pInventoryItems[v52], &pParty->pPickedItem, sizeof(v0->pInventoryItems[v52])); |
9725 v0->pEquipment.uOffHand = v17; | 9725 v0->pEquipment.uShield = v17; |
9726 pMouse->RemoveHoldingItem(); | 9726 pMouse->RemoveHoldingItem(); |
9727 return; | 9727 return; |
9728 } | 9728 } |
9729 memcpy(&_this, &pParty->pPickedItem, sizeof(_this)); | 9729 memcpy(&_this, &pParty->pPickedItem, sizeof(_this)); |
9730 v15 = (int)((char *)v0 + 36 * (v53 - 1)); | 9730 v15 = (int)((char *)v0 + 36 * (v53 - 1)); |
9732 pParty->pPickedItem.Reset(); | 9732 pParty->pPickedItem.Reset(); |
9733 pParty->SetHoldingItem((ItemGen *)(v15 + 532)); | 9733 pParty->SetHoldingItem((ItemGen *)(v15 + 532)); |
9734 _this.uBodyAnchor = 1; | 9734 _this.uBodyAnchor = 1; |
9735 v16 = v52 + 1; | 9735 v16 = v52 + 1; |
9736 memcpy(&v0->pInventoryItems[v52], &_this, sizeof(v0->pInventoryItems[v52])); | 9736 memcpy(&v0->pInventoryItems[v52], &_this, sizeof(v0->pInventoryItems[v52])); |
9737 v0->pEquipment.uOffHand = v16; | 9737 v0->pEquipment.uShield = v16; |
9738 } | 9738 } |
9739 v0->pEquipment.uMainHand = 0; | 9739 v0->pEquipment.uMainHand = 0; |
9740 return; | 9740 return; |
9741 case 0u: | 9741 case 0u: |
9742 case 0xCu: | 9742 case 0xCu: |
9788 pParty->SetHoldingItem((ItemGen *)(v20 + 532)); | 9788 pParty->SetHoldingItem((ItemGen *)(v20 + 532)); |
9789 _this.uBodyAnchor = 1; | 9789 _this.uBodyAnchor = 1; |
9790 v21 = v54 + 1; | 9790 v21 = v54 + 1; |
9791 v14 = v52 == 12; | 9791 v14 = v52 == 12; |
9792 memcpy((void *)(v20 + 532), &_this, 0x24u); | 9792 memcpy((void *)(v20 + 532), &_this, 0x24u); |
9793 v0->pEquipment.uOffHand = v21; | 9793 v0->pEquipment.uShield = v21; |
9794 if ( !v14 ) | 9794 if ( !v14 ) |
9795 return; | 9795 return; |
9796 v22 = _this.uItemID; | 9796 v22 = _this.uItemID; |
9797 v50 = v22; | 9797 v50 = v22; |
9798 if ( v50 ) | 9798 if ( v50 ) |
9808 if ( (v23 & 0x80000000u) != 0 ) | 9808 if ( (v23 & 0x80000000u) != 0 ) |
9809 return; | 9809 return; |
9810 pParty->pPickedItem.uBodyAnchor = 1; | 9810 pParty->pPickedItem.uBodyAnchor = 1; |
9811 v50 = (unsigned int)&v0->pInventoryItems[v23]; | 9811 v50 = (unsigned int)&v0->pInventoryItems[v23]; |
9812 memcpy(&v0->pInventoryItems[v23], &pParty->pPickedItem, sizeof(v0->pInventoryItems[v23])); | 9812 memcpy(&v0->pInventoryItems[v23], &pParty->pPickedItem, sizeof(v0->pInventoryItems[v23])); |
9813 v0->pEquipment.uOffHand = v23 + 1; | 9813 v0->pEquipment.uShield = v23 + 1; |
9814 pMouse->RemoveHoldingItem(); | 9814 pMouse->RemoveHoldingItem(); |
9815 if ( v52 != 12 ) | 9815 if ( v52 != 12 ) |
9816 return; | 9816 return; |
9817 v22 = *(int *)v50; | 9817 v22 = *(int *)v50; |
9818 v50 = v22; | 9818 v50 = v22; |
9861 memcpy((void *)(v24 + 532), &_this, 0x24u); | 9861 memcpy((void *)(v24 + 532), &_this, 0x24u); |
9862 v0->pEquipment.uMainHand = v25; | 9862 v0->pEquipment.uMainHand = v25; |
9863 if ( v14 ) | 9863 if ( v14 ) |
9864 v50 = _this.uItemID; | 9864 v50 = _this.uItemID; |
9865 if ( v51 ) | 9865 if ( v51 ) |
9866 v0->pEquipment.uOffHand = 0; | 9866 v0->pEquipment.uShield = 0; |
9867 if ( v50 ) | 9867 if ( v50 ) |
9868 { | 9868 { |
9869 __debugbreak(); // looks like offset in player's inventory and wand_lut much like case in 0042ECB5 | 9869 __debugbreak(); // looks like offset in player's inventory and wand_lut much like case in 0042ECB5 |
9870 stru_A750F8[uActiveCharacter - 1]._494836( | 9870 stru_A750F8[uActiveCharacter - 1]._494836( |
9871 *((int *)&pSpellDatas[66].uNormalLevelRecovery + v50), | 9871 *((int *)&pSpellDatas[66].uNormalLevelRecovery + v50), |
9928 pParty->pPickedItem.Reset(); | 9928 pParty->pPickedItem.Reset(); |
9929 pParty->SetHoldingItem((ItemGen *)(v29 + 532)); | 9929 pParty->SetHoldingItem((ItemGen *)(v29 + 532)); |
9930 _this.uBodyAnchor = 2; | 9930 _this.uBodyAnchor = 2; |
9931 v30 = v52 + 1; | 9931 v30 = v52 + 1; |
9932 memcpy(&v0->pInventoryItems[v52], &_this, sizeof(v0->pInventoryItems[v52])); | 9932 memcpy(&v0->pInventoryItems[v52], &_this, sizeof(v0->pInventoryItems[v52])); |
9933 v0->pEquipment.uOffHand = 0; | 9933 v0->pEquipment.uShield = 0; |
9934 v0->pEquipment.uMainHand = v30; | 9934 v0->pEquipment.uMainHand = v30; |
9935 } | 9935 } |
9936 else | 9936 else |
9937 { | 9937 { |
9938 pParty->pPickedItem.uBodyAnchor = 2; | 9938 pParty->pPickedItem.uBodyAnchor = 2; |