From 36be370bca7b5a0405dfb339aaa7b0ae3d082c79 Mon Sep 17 00:00:00 2001 From: Wanne Date: Wed, 14 May 2008 05:37:33 +0000 Subject: [PATCH] - bugfix: Only one M.E.R.C merc was available in single player mode. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2165 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Laptop/mercs Account.cpp | 12 ++++++------ Laptop/mercs.cpp | 4 ++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Laptop/mercs Account.cpp b/Laptop/mercs Account.cpp index a59338fe..dc3c22fb 100644 --- a/Laptop/mercs Account.cpp +++ b/Laptop/mercs Account.cpp @@ -66,7 +66,7 @@ #define MERC_AC_ROW_SIZE 16 // The maximum number of mercs -#define TOTAL_NUMBER_OF_MERCS 14 +//#define TOTAL_NUMBER_OF_MERCS 14 #define MAX_NUMBER_MERCS_ON_PAGE 12 UINT32 guiMercOrderGrid; @@ -187,7 +187,7 @@ INT32 GetNumberOfHiredMercs() giMercTotalContractCharge = 0; - for (i = 0; i<=TOTAL_NUMBER_OF_MERCS; i++) + for (i = 0; i<=(NUMBER_OF_MERCS - 1); i++) { if( i == MERC_LARRY_ROACHBURN ) continue; @@ -480,9 +480,9 @@ void DisplayHiredMercs() usMercIDStart = iCurrentAccountPage * MAX_NUMBER_MERCS_ON_PAGE; // End - if ((usMercIDStart + MAX_NUMBER_MERCS_ON_PAGE) > TOTAL_NUMBER_OF_MERCS) + if ((usMercIDStart + MAX_NUMBER_MERCS_ON_PAGE) > (NUMBER_OF_MERCS - 1)) { - usMercIDEnd = TOTAL_NUMBER_OF_MERCS; + usMercIDEnd = (NUMBER_OF_MERCS - 1); } else { @@ -497,7 +497,7 @@ void DisplayHiredMercs() } // Loop through all the mercs - for(i=usMercIDStart; i <= TOTAL_NUMBER_OF_MERCS ; i++) + for(i=usMercIDStart; i <= (NUMBER_OF_MERCS - 1) ; i++) { // We have no more free rows on the current page if (usCurrentRow == usMercIDEnd - 1) @@ -739,7 +739,7 @@ UINT32 CalculateHowMuchPlayerOwesSpeck() UINT32 uiContractCharge=0; UINT16 usMercID; - for(i=0; i