Mercurial > mm7
changeset 1476:92b63e3dca90
UICharacter.cpp cleaning(continue) OnPaperdollLeftClick(2)
author | Ritor1 |
---|---|
date | Wed, 28 Aug 2013 19:11:02 +0600 |
parents | d7720c1f1d3b |
children | 251111bac49f 47c89461be23 |
files | UI/UICharacter.cpp |
diffstat | 1 files changed, 31 insertions(+), 36 deletions(-) [+] |
line wrap: on
line diff
--- a/UI/UICharacter.cpp Wed Aug 28 14:39:01 2013 +0600 +++ b/UI/UICharacter.cpp Wed Aug 28 19:11:02 2013 +0600 @@ -2330,15 +2330,15 @@ int v10; // esi@34 //int v11; // eax@34 int v12; // esi@38 - int v13; // eax@38 + //int v13; // eax@38 char v14; // zf@38 int v15; // esi@42 - int v16; // eax@42 + //int v16; // eax@42 int v17; // eax@44 unsigned int v18; // ecx@55 unsigned int v19; // eax@55 int v20; // esi@60 - int v21; // eax@60 + //int v21; // eax@60 unsigned int v22; // eax@61 int v23; // eax@62 int v24; // esi@65 @@ -2502,10 +2502,9 @@ pParty->pPickedItem.Reset(); pParty->SetHoldingItem((ItemGen *)(v12 + 532)); _this.uBodyAnchor = 1; - v13 = v2 + 1; v14 = v51 == 0; memcpy((void *)(v12 + 532), &_this, 0x24u); - pPlayers[uActiveCharacter]->pEquipment.uShield = v13; + pPlayers[uActiveCharacter]->pEquipment.uShield = v2 + 1; if ( v14 ) return; } @@ -2529,9 +2528,8 @@ pParty->pPickedItem.Reset(); pParty->SetHoldingItem((ItemGen *)(v15 + 532)); _this.uBodyAnchor = 1; - v16 = v52 + 1; memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v52], &_this, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v52])); - pPlayers[uActiveCharacter]->pEquipment.uShield = v16; + pPlayers[uActiveCharacter]->pEquipment.uShield = v52 + 1; } pPlayers[uActiveCharacter]->pEquipment.uMainHand = 0; return; @@ -2540,10 +2538,10 @@ if ( sub_43EE77_ProbablyIfUnderwaterSuitIsEquipped(uActiveCharacter) && pParty->pPickedItem.uItemID != 64 && pParty->pPickedItem.uItemID != 65 ) - { - pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); - return; - } + { + pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); + return; + } if ( !pPlayers[uActiveCharacter]->HasSkill(pSkillType) ) { pPlayers[uActiveCharacter]->PlaySound(SPEECH_39, 0); @@ -2553,10 +2551,8 @@ if ( pSkillType == 2 && (unsigned __int16)(pPlayers[uActiveCharacter]->pActiveSkills[2] & 0xFFC0) || pSkillType == 1 && (signed int)SkillToMastery(pPlayers[uActiveCharacter]->pActiveSkills[1]) >= 3 ) { - - v18 = pMouse->uMouseClickX; - v19 = pMouse->uMouseClickY; - + v18 = pMouse->uMouseClickX; + v19 = pMouse->uMouseClickY; v49 = v19; if ( (signed int)v18 >= 560 ) { @@ -2571,20 +2567,19 @@ pParty->pPickedItem.Reset(); pParty->SetHoldingItem((ItemGen *)(v20 + 532)); _this.uBodyAnchor = 1; - v21 = v2 + 1; - v14 = pEquipType == 12; + v14 = pEquipType == EQUIP_WAND; memcpy((void *)(v20 + 532), &_this, 0x24u); - pPlayers[uActiveCharacter]->pEquipment.uShield = v21; + pPlayers[uActiveCharacter]->pEquipment.uShield = v2 + 1; if ( !v14 ) return; v22 = _this.uItemID; v50 = v22; - if ( v50 ) + if ( v50 ) { __debugbreak(); // looks like offset in player's inventory and wand_lut much like case in 0042ECB5 - stru_A750F8[uActiveCharacter - 1]._494836(*((int *)&pSpellDatas[66].uNormalLevelRecovery + v50), uActiveCharacter - 1 + 9); + stru_A750F8[uActiveCharacter - 1]._494836(*((int *)&pSpellDatas[66].uNormalLevelRecovery + v50), uActiveCharacter - 1 + 9); } - break; + break; } v23 = pPlayers[uActiveCharacter]->FindFreeInventoryListSlot(); if ( v23 < 0 ) @@ -2597,13 +2592,13 @@ if ( pEquipType != 12 ) return; v22 = *(int *)v50; - v50 = v22; - if ( v50 ) + v50 = v22; + if ( v50 ) { __debugbreak(); // looks like offset in player's inventory and wand_lut much like case in 0042ECB5 - stru_A750F8[uActiveCharacter - 1]._494836(*((int *)&pSpellDatas[66].uNormalLevelRecovery + v50), uActiveCharacter - 1 + 9); + stru_A750F8[uActiveCharacter - 1]._494836(*((int *)&pSpellDatas[66].uNormalLevelRecovery + v50), uActiveCharacter - 1 + 9); } - break; + break; } } } @@ -2616,17 +2611,17 @@ v50 = (unsigned int)&pPlayers[uActiveCharacter]->pInventoryItemList[v26]; memcpy(&pPlayers[uActiveCharacter]->pInventoryItemList[v26], &pParty->pPickedItem, sizeof(pPlayers[uActiveCharacter]->pInventoryItemList[v26])); pPlayers[uActiveCharacter]->pEquipment.uMainHand = v26 + 1; - pMouse->RemoveHoldingItem(); - if ( pEquipType != 12 ) - return; - v22 = *(int *)v50; - v50 = v22; - if ( v50 ) - { - __debugbreak(); // looks like offset in player's inventory and wand_lut much like case in 0042ECB5 - stru_A750F8[uActiveCharacter - 1]._494836(*((int *)&pSpellDatas[66].uNormalLevelRecovery + v50), uActiveCharacter - 1 + 9); - } - break; + pMouse->RemoveHoldingItem(); + if ( pEquipType != 12 ) + return; + v22 = *(int *)v50; + v50 = v22; + if ( v50 ) + { + __debugbreak(); // looks like offset in player's inventory and wand_lut much like case in 0042ECB5 + stru_A750F8[uActiveCharacter - 1]._494836(*((int *)&pSpellDatas[66].uNormalLevelRecovery + v50), uActiveCharacter - 1 + 9); + } + break; } --v1; memcpy(&_this, &pParty->pPickedItem, sizeof(_this));