From 3b38f5dac563d4a58856429ed54bc9f0f3858427 Mon Sep 17 00:00:00 2001 From: MaddMugsy Date: Mon, 26 Jun 2006 17:55:11 +0000 Subject: [PATCH] -removed some hard coded item indexes from ArmsDealerInvInit.cpp & items.cpp -fixed canteen merging w/ctrl+click git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@306 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- GameVersion.cpp | 2 +- Tactical/ArmsDealerInvInit.cpp | 26 +++++++++++++------------- Tactical/Items.cpp | 19 +++++++++++-------- 3 files changed, 25 insertions(+), 22 deletions(-) diff --git a/GameVersion.cpp b/GameVersion.cpp index f738ecc6..8eb1b5df 100644 --- a/GameVersion.cpp +++ b/GameVersion.cpp @@ -23,7 +23,7 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" }; #else //RELEASE BUILD VERSION - INT16 zVersionLabel[256] = { L"Release v1.13.304" }; + INT16 zVersionLabel[256] = { L"Release v1.13.305" }; #endif diff --git a/Tactical/ArmsDealerInvInit.cpp b/Tactical/ArmsDealerInvInit.cpp index a522a4f0..531e3804 100644 --- a/Tactical/ArmsDealerInvInit.cpp +++ b/Tactical/ArmsDealerInvInit.cpp @@ -900,21 +900,21 @@ UINT8 GetCurrentSuitabilityForItem( INT8 bArmsDealer, UINT16 usItemIndex, BOOLEA } // the following staple items are always deemed highly suitable regardless of player's progress: - switch (usItemIndex) - { - case FIRSTAIDKIT: - case MEDICKIT: - case TOOLKIT: - case LOCKSMITHKIT: - - case CANTEEN: - case CROWBAR: - case JAR: - case JAR_ELIXIR: - case JAR_CREATURE_BLOOD: + //switch (usItemIndex) + //{ + // case FIRSTAIDKIT: + // case MEDICKIT: + // case TOOLKIT: + // case LOCKSMITHKIT: + // case CANTEEN: + // case CROWBAR: + // case JAR: + // case JAR_ELIXIR: + // case JAR_CREATURE_BLOOD: + if ( Item[usItemIndex].medical || Item[usItemIndex].canteen || Item[usItemIndex].medicalkit || Item[usItemIndex].locksmithkit || Item[usItemIndex].toolkit || Item[usItemIndex].crowbar || Item[usItemIndex].jar ) return(ITEM_SUITABILITY_ALWAYS); - } + //} // If it's not BobbyRay, Tony, or Devin diff --git a/Tactical/Items.cpp b/Tactical/Items.cpp index 50556cc9..a06cda6d 100644 --- a/Tactical/Items.cpp +++ b/Tactical/Items.cpp @@ -2396,7 +2396,7 @@ void CleanUpStack( OBJECTTYPE * pObj, OBJECTTYPE * pCursorObj ) INT8 bLoop, bLoop2; INT8 bMaxPoints, bPointsToMove; - if ( !(Item[ pObj->usItem ].usItemClass & IC_AMMO || Item[ pObj->usItem ].usItemClass & IC_KIT || Item[ pObj->usItem ].usItemClass & IC_MEDKIT ) ) + if ( !(Item[ pObj->usItem ].usItemClass & IC_AMMO || Item[ pObj->usItem ].usItemClass & IC_KIT || Item[ pObj->usItem ].usItemClass & IC_MEDKIT || Item[pObj->usItem].canteen ) ) { return; } @@ -5423,13 +5423,16 @@ BOOLEAN DamageItemOnGround( OBJECTTYPE * pObject, INT16 sGridNo, INT8 bLevel, IN INT8 IsMedicalKitItem( OBJECTTYPE *pObject ) { // check item id against current medical kits - switch( pObject->usItem ) - { - case( MEDICKIT ): - // medical bag, return 1 - return ( 1 ); - break; - } + if ( Item[pObject->usItem].medicalkit ) + return 1; + + //switch( pObject->usItem ) + //{ + // case( MEDICKIT ): + // // medical bag, return 1 + // return ( 1 ); + // break; + //} return( 0 ); }