Mercurial > mm7
comparison Player.cpp @ 2025:4000f8184c29
EVENT_Substract fix
author | Ritor1 |
---|---|
date | Sun, 17 Nov 2013 01:14:58 +0600 |
parents | 30c2b575d25c |
children | da35dc35d635 |
comparison
equal
deleted
inserted
replaced
2024:bb0da61e4a7e | 2025:4000f8184c29 |
---|---|
6600 case VAR_QBits_QuestsDone: | 6600 case VAR_QBits_QuestsDone: |
6601 _449B7E_toggle_bit(pParty->_quest_bits, (__int16)pValue, 0); | 6601 _449B7E_toggle_bit(pParty->_quest_bits, (__int16)pValue, 0); |
6602 this->PlaySound(SPEECH_96, 0); | 6602 this->PlaySound(SPEECH_96, 0); |
6603 return; | 6603 return; |
6604 case VAR_PlayerItemInHands: | 6604 case VAR_PlayerItemInHands: |
6605 for ( uint i = 0; i < 16; ++i ) | |
6606 { | |
6607 int id_ = this->pEquipment.pIndices[i]; | |
6608 if ( id_ > 0 ) | |
6609 { | |
6610 if ( this->pInventoryItemList[this->pEquipment.pIndices[i] - 1].uItemID == pValue ) | |
6611 { | |
6612 this->pEquipment.pIndices[i] = 0; | |
6613 } | |
6614 } | |
6615 } | |
6605 for (int i = 0; i < 126; i++) | 6616 for (int i = 0; i < 126; i++) |
6606 { | 6617 { |
6607 if ( this->pInventoryItemList[pInventoryMatrix[i]].uItemID == pValue ) | 6618 int id_ = this->pInventoryMatrix[i]; |
6619 if ( id_ > 0 ) | |
6608 { | 6620 { |
6609 RemoveItemAtInventoryIndex(i); | 6621 if ( this->pInventoryItemList[id_ - 1].uItemID == pValue ) |
6610 return; | 6622 { |
6623 RemoveItemAtInventoryIndex(i); | |
6624 return; | |
6625 } | |
6611 } | 6626 } |
6612 } | 6627 } |
6613 if ( pParty->pPickedItem.uItemID == pValue ) | 6628 if ( pParty->pPickedItem.uItemID == pValue ) |
6614 { | 6629 { |
6615 pMouse->RemoveHoldingItem(); | 6630 pMouse->RemoveHoldingItem(); |