diff mm7_5.cpp @ 600:db4a23580e6c

Chest item view fixed, gold can be taken
author Gloval
date Thu, 07 Mar 2013 00:35:10 +0400
parents b5240254cbbd
children 628694cd5744
line wrap: on
line diff
--- a/mm7_5.cpp	Wed Mar 06 22:47:21 2013 +0400
+++ b/mm7_5.cpp	Thu Mar 07 00:35:10 2013 +0400
@@ -15979,9 +15979,11 @@
 			if ( pRenderer->pActiveZBuffer[v9] & 0xFFFF )
 			{
 
-              __debugbreak(); // invalid indexing will result in invalid object ptr
-				v8 = (ItemGen *)(&pOtherOverlayList->pOverlays[49].field_4 + 2662 * (unsigned int)pChestWindow->ptr_1C + 18* *((short *)&pChests[0].igChestItems[139].uExpireTime
-								+ (pRenderer->pActiveZBuffer[v9] & 0xFFFF) + 2662 * (unsigned int)pChestWindow->ptr_1C + 3));
+            //  __debugbreak(); // invalid indexing will result in invalid object ptr
+			//	v8 = (ItemGen *)(&pOtherOverlayList->pOverlays[49].field_4 + 2662 * (unsigned int)pChestWindow->ptr_1C + 18* *((short *)&pChests[0].igChestItems[139].uExpireTime
+			//					+ (pRenderer->pActiveZBuffer[v9] & 0xFFFF) + 2662 * (unsigned int)pChestWindow->ptr_1C + 3));
+                v10=pChests[pChestWindow->par1C].pInventoryIndices[(pRenderer->pActiveZBuffer[v9] & 0xFFFF)-1];
+                v8 =&pChests[pChestWindow->par1C].igChestItems[v10-1];
 				GameUI_DrawItemInfo(v8);
 			}
 		}