diff mm7_4.cpp @ 2115:90cc547a7927

Fixing hireling prices
author Grumpy7
date Mon, 23 Dec 2013 15:17:50 +0100
parents 2318216e5206
children 18dee3152c52
line wrap: on
line diff
--- a/mm7_4.cpp	Fri Dec 20 01:46:23 2013 +0100
+++ b/mm7_4.cpp	Mon Dec 23 15:17:50 2013 +0100
@@ -1539,7 +1539,7 @@
           break;
         case 17://òåêñò íà¸ìíîãî ÍÏÑ
         {
-          uint pay_percentage = pNPCStats->pProfessions[npc->uProfession - 1].uHirePrice / 100;
+          uint pay_percentage = pNPCStats->pProfessions[npc->uProfession].uHirePrice / 100;
           if ( !pay_percentage )
             pay_percentage = 1;
           sprintf(a1, "%lu", pay_percentage);
@@ -2781,9 +2781,9 @@
       ShowStatusBarString(pGlobalTXT_LocalizationStrings[533], 2);// ""I cannot join you, you're party is full""
     else
     {
-      if ( speakingNPC->uProfession != 51 )
+      if ( speakingNPC->uProfession != 51 ) //burglars have no hiring price
       {
-        if ( pParty->uNumGold < pNPCStats->pProfessions[speakingNPC->uProfession - 1].uHirePrice )
+        if ( pParty->uNumGold < pNPCStats->pProfessions[speakingNPC->uProfession].uHirePrice )
         {
           ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2);// "You don't have enough gold"
           dialogue_show_profession_details = false;
@@ -2795,7 +2795,7 @@
           dword_7241C8 = 0;
           return;
         }
-        Party::TakeGold(pNPCStats->pProfessions[speakingNPC->uProfession - 1].uHirePrice);
+        Party::TakeGold(pNPCStats->pProfessions[speakingNPC->uProfession].uHirePrice);
       }
       LOBYTE(speakingNPC->uFlags) |= 0x80u;
       if ( pParty->pHirelings[0].pName )