changeset 2248:8c5855b842dc

changing shopt stealing condition a bit
author Grumpy7
date Wed, 26 Feb 2014 01:18:42 +0100
parents 529bf95fb0d7
children 708aa31cad56
files UI/UIShops.cpp
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/UI/UIShops.cpp	Wed Feb 26 01:15:58 2014 +0100
+++ b/UI/UIShops.cpp	Wed Feb 26 01:18:42 2014 +0100
@@ -1650,12 +1650,6 @@
       if ( pMapStats->GetMapInfo(pCurrentMapName) )
         a3 = pMapStats->pInfos[pMapStats->GetMapInfo(pCurrentMapName)]._steal_perm;
       party_reputation = pParty->GetPartyReputation();
-      if ((!pPlayers[uActiveCharacter]->CanSteal() || !GetAsyncKeyState(VK_CONTROL)) && pParty->uNumGold < uPriceItemService) 
-      {
-        PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, (HouseSoundID)2);
-        ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2);// "You don't have enough gold"
-        return;
-      }
       if (pPlayers[uActiveCharacter]->CanSteal() && GetAsyncKeyState(VK_CONTROL))
       {
           uNumSeconds = pPlayers[uActiveCharacter]->StealFromShop(bought_item, a3, party_reputation, 0, &a6);
@@ -1665,6 +1659,12 @@
             return;
           }
       }
+      else if (pParty->uNumGold < uPriceItemService)
+      {
+        PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, (HouseSoundID)2);
+        ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2);// "You don't have enough gold"
+        return;
+      }
       v39 = pPlayers[uActiveCharacter]->AddItem(-1, bought_item->uItemID);
       if ( v39 )
       {