From 5ea8d277f7adfb646d2947322320a08af1a3c865 Mon Sep 17 00:00:00 2001 From: Wanne Date: Sun, 25 Mar 2012 22:22:34 +0000 Subject: [PATCH] - Bugfix: Bobby Ray shop shown wrong values under 'size' (by DepressivesBrot) o Both guns and magazines use DisplayMagazine (Laptop\BobbyRGuns.cpp ll. 1989) to display capacity and both try to get their capacity from the Magazine array whereas guns should get it from the Weapon array. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5117 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Laptop/BobbyRGuns.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Laptop/BobbyRGuns.cpp b/Laptop/BobbyRGuns.cpp index 67969958..bec84828 100644 --- a/Laptop/BobbyRGuns.cpp +++ b/Laptop/BobbyRGuns.cpp @@ -1991,7 +1991,11 @@ UINT16 DisplayMagazine(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight) CHAR16 sTemp[20]; DrawTextToScreen(BobbyRText[BOBBYR_GUNS_MAGAZINE], BOBBYR_ITEM_WEIGHT_TEXT_X, (UINT16)usPosY, 0, BOBBYR_ITEM_DESC_TEXT_FONT, BOBBYR_STATIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED); - swprintf(sTemp, L"%3d %s", Magazine[Item[usIndex].ubClassIndex].ubMagSize, pMessageStrings[ MSG_ROUNDS_ABBREVIATION ] ); + if(Item[usIndex].usItemClass & IC_BOBBY_GUN){ + swprintf(sTemp, L"%3d %s", Weapon[Item[usIndex].ubClassIndex].ubMagSize, pMessageStrings[ MSG_ROUNDS_ABBREVIATION ] ); + }else{ + swprintf(sTemp, L"%3d %s", Magazine[Item[usIndex].ubClassIndex].ubMagSize, pMessageStrings[ MSG_ROUNDS_ABBREVIATION ] ); + } DrawTextToScreen(sTemp, BOBBYR_ITEM_WEIGHT_NUM_X, (UINT16)usPosY, BOBBYR_ITEM_WEIGHT_NUM_WIDTH, BOBBYR_ITEM_DESC_TEXT_FONT, BOBBYR_ITEM_DESC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED); usPosY += usFontHeight + 2; return(usPosY);