Mercurial > mm7
comparison Party.cpp @ 2024:bb0da61e4a7e
substract item and AddItem for Alexis fix
author | Ritor1 |
---|---|
date | Sat, 16 Nov 2013 00:02:24 +0600 |
parents | 84fa3c83d63f |
children | 28cb79ae2f6f |
comparison
equal
deleted
inserted
replaced
2023:beb97b20c3ed | 2024:bb0da61e4a7e |
---|---|
1118 if ( v5 ) | 1118 if ( v5 ) |
1119 { | 1119 { |
1120 v7 = pIcons_LOD->LoadTexturePtr(v5, TEXTURE_16BIT_PALETTE); | 1120 v7 = pIcons_LOD->LoadTexturePtr(v5, TEXTURE_16BIT_PALETTE); |
1121 v21 = areWeLoadingTexture; | 1121 v21 = areWeLoadingTexture; |
1122 v8 = 0; | 1122 v8 = 0; |
1123 uint current_player = uActiveCharacter; | |
1123 for (int i = 0; i < 4; i++) | 1124 for (int i = 0; i < 4; i++) |
1124 { | 1125 { |
1125 v9 = ::pPlayers[(uActiveCharacter + i) % 4]; //start with current active player, then cycle right if item won't fit | 1126 current_player = current_player + i; |
1127 if ( current_player > 4 ) | |
1128 current_player = current_player - 4; | |
1129 v9 = ::pPlayers[current_player]; | |
1126 v10 = v9->AddItem(-1, pItem->uItemID); | 1130 v10 = v9->AddItem(-1, pItem->uItemID); |
1127 if ( v10 ) | 1131 if ( v10 ) |
1128 { | 1132 { |
1129 memcpy(&v9->pInventoryItemList[v10-1], pItem, 0x24u); | 1133 memcpy(&v9->pInventoryItemList[v10-1], pItem, 0x24u); |
1130 pItem->Reset(); | 1134 pItem->Reset(); |