Mercurial > mm7
diff Player.cpp @ 2029:81a0e6819d3f
Слияние
author | Ritor1 |
---|---|
date | Mon, 18 Nov 2013 10:07:24 +0600 |
parents | 4000f8184c29 |
children | da35dc35d635 |
line wrap: on
line diff
--- a/Player.cpp Mon Nov 18 10:07:17 2013 +0600 +++ b/Player.cpp Mon Nov 18 10:07:24 2013 +0600 @@ -6602,12 +6602,27 @@ this->PlaySound(SPEECH_96, 0); return; case VAR_PlayerItemInHands: + for ( uint i = 0; i < 16; ++i ) + { + int id_ = this->pEquipment.pIndices[i]; + if ( id_ > 0 ) + { + if ( this->pInventoryItemList[this->pEquipment.pIndices[i] - 1].uItemID == pValue ) + { + this->pEquipment.pIndices[i] = 0; + } + } + } for (int i = 0; i < 126; i++) { - if ( this->pInventoryItemList[pInventoryMatrix[i]].uItemID == pValue ) + int id_ = this->pInventoryMatrix[i]; + if ( id_ > 0 ) { - RemoveItemAtInventoryIndex(i); - return; + if ( this->pInventoryItemList[id_ - 1].uItemID == pValue ) + { + RemoveItemAtInventoryIndex(i); + return; + } } } if ( pParty->pPickedItem.uItemID == pValue )