Mercurial > mm7
comparison mm7_2.cpp @ 234:47e06334c564
Merge
author | Gloval |
---|---|
date | Sun, 17 Feb 2013 18:50:35 +0400 |
parents | 0df4136b6aac c879446b4a22 |
children | 2799737f8a74 1bfe546561c4 |
comparison
equal
deleted
inserted
replaced
233:0df4136b6aac | 234:47e06334c564 |
---|---|
2867 || (v10 = v0->GetItemIDAtInventoryIndex((int *)&v149), v11 = 0, !v10) ) | 2867 || (v10 = v0->GetItemIDAtInventoryIndex((int *)&v149), v11 = 0, !v10) ) |
2868 return; | 2868 return; |
2869 v124 = 0; | 2869 v124 = 0; |
2870 v122 = 3; | 2870 v122 = 3; |
2871 v120 = ptr_507BC0->ptr_1C; | 2871 v120 = ptr_507BC0->ptr_1C; |
2872 v116 = (ItemGen *)&v0->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v10 + 5]; | 2872 v116 = (ItemGen *)&v0->pInventoryItems[v10-1]; |
2873 v12 = (int)ptr_507BC0->ptr_1C; | 2873 v12 = (int)ptr_507BC0->ptr_1C; |
2874 uPlayerID = uActiveCharacter - 1; | 2874 uPlayerID = uActiveCharacter - 1; |
2875 v13 = v0->_490EEE(v116, 2, v12, 3); | 2875 v13 = v0->_490EEE(v116, 2, v12, 3); |
2876 v14 = uPlayerID; | 2876 v14 = uPlayerID; |
2877 v15 = (char *)pMerchantsSellPhrases[v13]; | 2877 v15 = (char *)pMerchantsSellPhrases[v13]; |
2891 if ( pMouse->GetCursorPos(&v143)->x < 462 ) | 2891 if ( pMouse->GetCursorPos(&v143)->x < 462 ) |
2892 { | 2892 { |
2893 v2 = v0->GetItemIDAtInventoryIndex((int *)&v149); | 2893 v2 = v0->GetItemIDAtInventoryIndex((int *)&v149); |
2894 if ( v2 ) | 2894 if ( v2 ) |
2895 { | 2895 { |
2896 v3 = (ItemGen *)&v0->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v2 + 5]; | 2896 v3 = (ItemGen *)&v0->pInventoryItems[v2-1]; |
2897 if ( v3->uAttributes & 1 ) | 2897 if ( v3->uAttributes & 1 ) |
2898 { | 2898 { |
2899 v118 = ptr_507BC0->ptr_1C; | 2899 v118 = ptr_507BC0->ptr_1C; |
2900 v4 = uActiveCharacter - 1; | 2900 v4 = uActiveCharacter - 1; |
2901 v5 = "%24"; | 2901 v5 = "%24"; |
4594 v25 = v0->AddItem(0xFFFFFFFFu, v20->uItemID); | 4594 v25 = v0->AddItem(0xFFFFFFFFu, v20->uItemID); |
4595 if ( v25 ) | 4595 if ( v25 ) |
4596 { | 4596 { |
4597 v26 = 1; | 4597 v26 = 1; |
4598 v20->uAttributes |= 1u; | 4598 v20->uAttributes |= 1u; |
4599 memcpy(&v0->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v25 + 5], v20, 0x24u); | 4599 memcpy(&v0->pInventoryItems[v25-1], v20, 0x24u); |
4600 goto LABEL_42; | 4600 goto LABEL_42; |
4601 } | 4601 } |
4602 v0->PlaySound(SPEECH_NoRoom, 0); | 4602 v0->PlaySound(SPEECH_NoRoom, 0); |
4603 v54 = 5; | 4603 v54 = 5; |
4604 LABEL_70: | 4604 LABEL_70: |
4705 if ( pMouse->GetCursorPos(&v67)->x <= 13 | 4705 if ( pMouse->GetCursorPos(&v67)->x <= 13 |
4706 || pMouse->GetCursorPos(&v65)->x >= 462 | 4706 || pMouse->GetCursorPos(&v65)->x >= 462 |
4707 || (v15 = v0->GetItemIDAtInventoryIndex((int *)&v79), (v77 = (Player *)v15) == 0) ) | 4707 || (v15 = v0->GetItemIDAtInventoryIndex((int *)&v79), (v77 = (Player *)v15) == 0) ) |
4708 return; | 4708 return; |
4709 v16 = ptr_507BC0; | 4709 v16 = ptr_507BC0; |
4710 if ( sub_4BDAAF((ItemGen *)&v0->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v15 + 5], (int)ptr_507BC0->ptr_1C) ) | 4710 if ( sub_4BDAAF((ItemGen *)&v0->pInventoryItems[v15-1], (int)ptr_507BC0->ptr_1C) ) |
4711 { | 4711 { |
4712 dword_F8B1E4 = 1; | 4712 dword_F8B1E4 = 1; |
4713 v0->_4BE2DD(v79, (int)((char *)v77 - 1), (int)v16->ptr_1C); | 4713 v0->_4BE2DD(v79, (int)((char *)v77 - 1), (int)v16->ptr_1C); |
4714 viewparams->bRedrawGameUI = 1; | 4714 viewparams->bRedrawGameUI = 1; |
4715 pRenderer->ClearZBuffer(0, 479); | 4715 pRenderer->ClearZBuffer(0, 479); |
4740 v11 = v0->GetItemIDAtInventoryIndex((int *)&v79); | 4740 v11 = v0->GetItemIDAtInventoryIndex((int *)&v79); |
4741 if ( v11 ) | 4741 if ( v11 ) |
4742 { | 4742 { |
4743 //v80 = v0->_4B8179(p2DEvents_minus1__20[13 * (unsigned int)ptr_507BC0->ptr_1C]); | 4743 //v80 = v0->_4B8179(p2DEvents_minus1__20[13 * (unsigned int)ptr_507BC0->ptr_1C]); |
4744 v80 = v0->_4B8179(p2DEvents[(unsigned int)ptr_507BC0->ptr_1C - 1].fPriceMultiplier); | 4744 v80 = v0->_4B8179(p2DEvents[(unsigned int)ptr_507BC0->ptr_1C - 1].fPriceMultiplier); |
4745 v12 = (int)&v0->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v11 + 5]; | 4745 v12 = (int)&v0->pInventoryItems[v11-1]; |
4746 if ( !(*(char *)(v12 + 20) & 1) ) | 4746 if ( !(*(char *)(v12 + 20) & 1) ) |
4747 { | 4747 { |
4748 _this = (ItemGen *)ptr_507BC0->ptr_1C; | 4748 _this = (ItemGen *)ptr_507BC0->ptr_1C; |
4749 if ( sub_4BDAAF((ItemGen *)v12, (int)_this) ) | 4749 if ( sub_4BDAAF((ItemGen *)v12, (int)_this) ) |
4750 { | 4750 { |
4782 if ( pMouse->GetCursorPos(&v72)->x < 462 ) | 4782 if ( pMouse->GetCursorPos(&v72)->x < 462 ) |
4783 { | 4783 { |
4784 v2 = v0->GetItemIDAtInventoryIndex((int *)&v79); | 4784 v2 = v0->GetItemIDAtInventoryIndex((int *)&v79); |
4785 if ( v2 ) | 4785 if ( v2 ) |
4786 { | 4786 { |
4787 v3 = (int)&v0->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v2 + 5]; | 4787 v3 = (int)&v0->pInventoryItems[v2-1]; |
4788 //v4 = p2DEvents_minus1__20[13 * (unsigned int)ptr_507BC0->ptr_1C]; | 4788 //v4 = p2DEvents_minus1__20[13 * (unsigned int)ptr_507BC0->ptr_1C]; |
4789 v4 = p2DEvents[(unsigned int)ptr_507BC0->ptr_1C - 1].fPriceMultiplier; | 4789 v4 = p2DEvents[(unsigned int)ptr_507BC0->ptr_1C - 1].fPriceMultiplier; |
4790 | 4790 |
4791 auto _v = (ItemGen *)&v0->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v2 + 5]; | 4791 auto _v = (ItemGen *)&v0->pInventoryItems[v2-1]; |
4792 v5 = _v->GetValue(); | 4792 v5 = _v->GetValue(); |
4793 | 4793 |
4794 v6 = v0->_4B81C3(v5, v4); | 4794 v6 = v0->_4B81C3(v5, v4); |
4795 v7 = (*(char *)(v3 + 20) & 2) == 0; | 4795 v7 = (*(char *)(v3 + 20) & 2) == 0; |
4796 v80 = v6; | 4796 v80 = v6; |
14686 v0 = pPlayers[uActiveCharacter]; | 14686 v0 = pPlayers[uActiveCharacter]; |
14687 v1 = v0->pEquipment.uMainHand; | 14687 v1 = v0->pEquipment.uMainHand; |
14688 v2 = v0->pEquipment.uOffHand; | 14688 v2 = v0->pEquipment.uOffHand; |
14689 v54 = v0->pEquipment.uOffHand; | 14689 v54 = v0->pEquipment.uOffHand; |
14690 v53 = v1; | 14690 v53 = v1; |
14691 if ( v1 && pItemsTable->pItems[*(int *)&v0->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v1 + 5]].uEquipType == 1 ) | 14691 if ( v1 && pItemsTable->pItems[*(int *)&v0->pInventoryItems[v1-1]].uEquipType == 1 ) |
14692 v51 = v1; | 14692 v51 = v1; |
14693 v3 = pParty->pPickedItem.uItemID; | 14693 v3 = pParty->pPickedItem.uItemID; |
14694 if ( pParty->pPickedItem.uItemID ) | 14694 if ( pParty->pPickedItem.uItemID ) |
14695 { | 14695 { |
14696 v52 = pItemsTable->pItems[pParty->pPickedItem.uItemID].uEquipType; | 14696 v52 = pItemsTable->pItems[pParty->pPickedItem.uItemID].uEquipType; |
14713 } | 14713 } |
14714 else | 14714 else |
14715 { | 14715 { |
14716 if ( (v4 == 8 || v4 == 1 || v4 == 2) | 14716 if ( (v4 == 8 || v4 == 1 || v4 == 2) |
14717 && v1 | 14717 && v1 |
14718 && pItemsTable->pItems[*(int *)&v0->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v1 + 5]].uSkillType == 4 ) | 14718 && pItemsTable->pItems[*(int *)&v0->pInventoryItems[v1-1]].uSkillType == 4 ) |
14719 goto LABEL_7; | 14719 goto LABEL_7; |
14720 } | 14720 } |
14721 LABEL_16: | 14721 LABEL_16: |
14722 if ( !v0->CanEquip_RaceAndAlignmentCheck(v3) ) | 14722 if ( !v0->CanEquip_RaceAndAlignmentCheck(v3) ) |
14723 goto LABEL_8; | 14723 goto LABEL_8; |
15058 else | 15058 else |
15059 { | 15059 { |
15060 v35 = v0->pEquipment.uBow; | 15060 v35 = v0->pEquipment.uBow; |
15061 if ( v35 ) | 15061 if ( v35 ) |
15062 { | 15062 { |
15063 auto _a = (ItemGen *)&v0->spellbook.pDarkSpellbook.bIsSpellAvailable[36 * v35 + 5]; | 15063 auto _a = (ItemGen *)&v0->pInventoryItems[v35-1]; |
15064 pParty->SetHoldingItem(_a); | 15064 pParty->SetHoldingItem(_a); |
15065 _a->Reset(); | 15065 _a->Reset(); |
15066 v0->pEquipment.uBow = 0; | 15066 v0->pEquipment.uBow = 0; |
15067 } | 15067 } |
15068 } | 15068 } |