Mercurial > mm7
comparison UI/UIShops.cpp @ 2248:8c5855b842dc
changing shopt stealing condition a bit
author | Grumpy7 |
---|---|
date | Wed, 26 Feb 2014 01:18:42 +0100 |
parents | 0be4f17b7986 |
children | 3cc3a29f073b |
comparison
equal
deleted
inserted
replaced
2247:529bf95fb0d7 | 2248:8c5855b842dc |
---|---|
1648 uNumSeconds = 0; | 1648 uNumSeconds = 0; |
1649 a3 = 0; | 1649 a3 = 0; |
1650 if ( pMapStats->GetMapInfo(pCurrentMapName) ) | 1650 if ( pMapStats->GetMapInfo(pCurrentMapName) ) |
1651 a3 = pMapStats->pInfos[pMapStats->GetMapInfo(pCurrentMapName)]._steal_perm; | 1651 a3 = pMapStats->pInfos[pMapStats->GetMapInfo(pCurrentMapName)]._steal_perm; |
1652 party_reputation = pParty->GetPartyReputation(); | 1652 party_reputation = pParty->GetPartyReputation(); |
1653 if ((!pPlayers[uActiveCharacter]->CanSteal() || !GetAsyncKeyState(VK_CONTROL)) && pParty->uNumGold < uPriceItemService) | 1653 if (pPlayers[uActiveCharacter]->CanSteal() && GetAsyncKeyState(VK_CONTROL)) |
1654 { | |
1655 uNumSeconds = pPlayers[uActiveCharacter]->StealFromShop(bought_item, a3, party_reputation, 0, &a6); | |
1656 if ( !uNumSeconds ) | |
1657 { | |
1658 sub_4B1447_party_fine((int)window_SpeakInHouse->ptr_1C, 0, a6); | |
1659 return; | |
1660 } | |
1661 } | |
1662 else if (pParty->uNumGold < uPriceItemService) | |
1654 { | 1663 { |
1655 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, (HouseSoundID)2); | 1664 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, (HouseSoundID)2); |
1656 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2);// "You don't have enough gold" | 1665 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2);// "You don't have enough gold" |
1657 return; | 1666 return; |
1658 } | |
1659 if (pPlayers[uActiveCharacter]->CanSteal() && GetAsyncKeyState(VK_CONTROL)) | |
1660 { | |
1661 uNumSeconds = pPlayers[uActiveCharacter]->StealFromShop(bought_item, a3, party_reputation, 0, &a6); | |
1662 if ( !uNumSeconds ) | |
1663 { | |
1664 sub_4B1447_party_fine((int)window_SpeakInHouse->ptr_1C, 0, a6); | |
1665 return; | |
1666 } | |
1667 } | 1667 } |
1668 v39 = pPlayers[uActiveCharacter]->AddItem(-1, bought_item->uItemID); | 1668 v39 = pPlayers[uActiveCharacter]->AddItem(-1, bought_item->uItemID); |
1669 if ( v39 ) | 1669 if ( v39 ) |
1670 { | 1670 { |
1671 bought_item->SetIdentified(); | 1671 bought_item->SetIdentified(); |