diff UI/UiGame.cpp @ 2115:90cc547a7927

Fixing hireling prices
author Grumpy7
date Mon, 23 Dec 2013 15:17:50 +0100
parents 0db53678ff48
children 92511cd8fcdb
line wrap: on
line diff
--- a/UI/UiGame.cpp	Fri Dec 20 01:46:23 2013 +0100
+++ b/UI/UiGame.cpp	Mon Dec 23 15:17:50 2013 +0100
@@ -310,20 +310,24 @@
   }
   if (sDialogue_SpeakingActorNPC_ID < 0)
     v9 = 4;
-  pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_Dialogue, v9, 0);//pNumberContacts = 1, v9 = 0; pNumberContacts = 2, v9 = 3;
-  if (pNPCInfo->Hired())
+  pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_Dialogue, 3, 0);//pNumberContacts = 1, v9 = 0; pNumberContacts = 2, v9 = 3;
+  if (pNPCInfo->Hired() && !pNPCInfo->bHasUsedTheAbility)
   {
-    if ( !pNPCInfo->bHasUsedTheAbility )
+    if (pNPCInfo->uProfession == 10 ||    //Healer
+        pNPCInfo->uProfession == 11 ||    //Expert Healer
+        pNPCInfo->uProfession == 12 ||    //Master Healer
+        pNPCInfo->uProfession == 33 ||    //Cook
+        pNPCInfo->uProfession == 34 ||    //Chef
+        pNPCInfo->uProfession == 39 ||    //Wind Master
+        pNPCInfo->uProfession == 40 ||    //Water Master
+        pNPCInfo->uProfession == 41 ||    //Gate Master
+        pNPCInfo->uProfession == 42 ||    //Chaplain
+        pNPCInfo->uProfession == 43 ||    //Piper
+        pNPCInfo->uProfession == 52       //Fallen Wizard
+      )
     {
-      if ( pNPCInfo->uProfession >= 10 )
-      {
-        if ( pNPCInfo->uProfession <= 12 || pNPCInfo->uProfession > 32 && (pNPCInfo->uProfession <= 34 
-             || pNPCInfo->uProfession > 38 && (pNPCInfo->uProfession <= 43 || pNPCInfo->uProfession == 52)) )
-        {
-          pDialogueWindow->CreateButton(480, 250, 140, LOBYTE(pFontArrus->uFontHeight) - 3, 1, 0, UIMSG_SelectNPCDialogueOption, 9, 0, "", 0);
-          pDialogueWindow->_41D08F_set_keyboard_control_group(4, 1, 0, 1);
-        }
-      }
+      pDialogueWindow->CreateButton(480, 250, 140, LOBYTE(pFontArrus->uFontHeight) - 3, 1, 0, UIMSG_SelectNPCDialogueOption, 9, 0, "", 0);
+      pDialogueWindow->_41D08F_set_keyboard_control_group(4, 1, 0, 1);
     }
   }