comparison mm7_1.cpp @ 1014:a704435d3285

comtinue player cleaning
author Gloval
date Sun, 19 May 2013 20:38:49 +0400
parents e865f349aa41
children 9ac94d00012e
comparison
equal deleted inserted replaced
1012:9e823ad5eaa6 1014:a704435d3285
695 pItemsTable->pItems[pParty->pPickedItem.uItemID].pIconName, 695 pItemsTable->pItems[pParty->pPickedItem.uItemID].pIconName,
696 TEXTURE_16BIT_PALETTE); 696 TEXTURE_16BIT_PALETTE);
697 v1 = pIcons_LOD->GetTexture(v0); 697 v1 = pIcons_LOD->GetTexture(v0);
698 v11 = areWeLoadingTexture; 698 v11 = areWeLoadingTexture;
699 if ( uActiveCharacter 699 if ( uActiveCharacter
700 && (v2 = pPlayers[uActiveCharacter]->AddItem(0xFFFFFFFFu, pParty->pPickedItem.uItemID)) != 0 ) 700 && (v2 = pPlayers[uActiveCharacter]->AddItem(-1, pParty->pPickedItem.uItemID)) != 0 )
701 { 701 {
702 memcpy(&pPlayers[uActiveCharacter]->pInventoryItems[v2-1], &pParty->pPickedItem, 0x24u); 702 memcpy(&pPlayers[uActiveCharacter]->pInventoryItems[v2-1], &pParty->pPickedItem, 0x24u);
703 pMouse->RemoveHoldingItem(); 703 pMouse->RemoveHoldingItem();
704 } 704 }
705 else 705 else
706 { 706 {
707 v12 = 0; 707 v12 = 0;
708 v3 = pParty->pPlayers; 708 v3 = pParty->pPlayers;
709 while ( v3 <= &pParty->pPlayers[3] ) 709 while ( v3 <= &pParty->pPlayers[3] )
710 { 710 {
711 v4 = v3->AddItem(0xFFFFFFFFu, pParty->pPickedItem.uItemID); 711 v4 = v3->AddItem(-1, pParty->pPickedItem.uItemID);
712 if ( v4 ) 712 if ( v4 )
713 { 713 {
714 memcpy(&pParty->pPlayers[v12].pInventoryItems[v4], &pParty->pPickedItem, 0x24u); 714 memcpy(&pParty->pPlayers[v12].pInventoryItems[v4], &pParty->pPickedItem, 0x24u);
715 pMouse->RemoveHoldingItem(); 715 pMouse->RemoveHoldingItem();
716 break; 716 break;
780 //v1 = uPlayerID; 780 //v1 = uPlayerID;
781 auto player = &pParty->pPlayers[uPlayerID - 1]; 781 auto player = &pParty->pPlayers[uPlayerID - 1];
782 if (pParty->pPickedItem.uItemID) 782 if (pParty->pPickedItem.uItemID)
783 { 783 {
784 //v3 = player; 784 //v3 = player;
785 if (auto slot = player->AddItem(0xFFFFFFFFu, pParty->pPickedItem.uItemID)) 785 if (auto slot = player->AddItem(-1, pParty->pPickedItem.uItemID))
786 { 786 {
787 memcpy(&player->pInventoryItems[slot-1], &pParty->pPickedItem, 0x24u); 787 memcpy(&player->pInventoryItems[slot-1], &pParty->pPickedItem, 0x24u);
788 viewparams->bRedrawGameUI = true; 788 viewparams->bRedrawGameUI = true;
789 pMouse->RemoveHoldingItem(); 789 pMouse->RemoveHoldingItem();
790 return; 790 return;
972 if ( !pX ) 972 if ( !pX )
973 { 973 {
974 pX = v0->AddItem2(0xFFFFFFFFu, &pParty->pPickedItem); 974 pX = v0->AddItem2(0xFFFFFFFFu, &pParty->pPickedItem);
975 if ( !pX ) 975 if ( !pX )
976 { 976 {
977 v0->_49298B(&this_, v13 - 1, a4); 977 v0->PutItemArInventoryIndex(&this_, v13 - 1, a4);
978 memcpy((void *)a2.y, &this_, sizeof(ItemGen)); 978 memcpy((void *)a2.y, &this_, sizeof(ItemGen));
979 return; 979 return;
980 } 980 }
981 } 981 }
982 v9 = this_.uItemID; 982 v9 = this_.uItemID;
984 pMouse->SetCursorBitmap(pItemsTable->pItems[v9].pIconName); 984 pMouse->SetCursorBitmap(pItemsTable->pItems[v9].pIconName);
985 return; 985 return;
986 } 986 }
987 v10 = v0->AddItem(a4, v7); 987 v10 = v0->AddItem(a4, v7);
988 pX = v10; 988 pX = v10;
989 if ( v10 || (v10 = v0->AddItem(0xFFFFFFFFu, pParty->pPickedItem.uItemID), (pX = v10) != 0) ) 989 if ( v10 || (v10 = v0->AddItem(-1, pParty->pPickedItem.uItemID), (pX = v10) != 0) )
990 { 990 {
991 memcpy(&v0->pInventoryItems[v10-1], &pParty->pPickedItem, 0x24u); 991 memcpy(&v0->pInventoryItems[v10-1], &pParty->pPickedItem, 0x24u);
992 pMouse->RemoveHoldingItem(); 992 pMouse->RemoveHoldingItem();
993 } 993 }
994 } 994 }