changeset 294:a672f297c163

item gen restore
author Gloval
date Tue, 19 Feb 2013 08:17:19 +0400
parents 27670273a6ff
children af7e848d6def 00452bbbac47
files Items.cpp mm7_5.cpp
diffstat 2 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/Items.cpp	Tue Feb 19 01:23:04 2013 +0400
+++ b/Items.cpp	Tue Feb 19 08:17:19 2013 +0400
@@ -1518,8 +1518,9 @@
 //----- (00456620) --------------------------------------------------------
 void ItemsTable::GenerateItem(int treasure_level, int a3, ItemGen *out_item)
 {
-  //ItemGen *v4; // esi@1
-  //ItemsTable *v5; // edi@1
+  
+ItemGen *v4; // esi@1
+  ItemsTable *v5; // edi@1
   int v6; // ebx@3
   int *v7; // ecx@33
   //int v8; // eax@34
@@ -1567,8 +1568,8 @@
   int v50; // eax@123
   int Dst[800]; // [sp+Ch] [bp-C88h]@33
   int v52; // [sp+C8Ch] [bp-8h]@33
-  //int v53; // [sp+C90h] [bp-4h]@1
-  //int v54; // [sp+C9Ch] [bp+8h]@3
+  int v53; // [sp+C90h] [bp-4h]@1
+  int v54; // [sp+C9Ch] [bp+8h]@3
   //int v55; // [sp+CA0h] [bp+Ch]@34
   signed int v56; // [sp+CA0h] [bp+Ch]@55
   int v57; // [sp+CA0h] [bp+Ch]@62
@@ -1578,14 +1579,13 @@
   int a2b; // [sp+CA4h] [bp+10h]@101
   int a2c; // [sp+CA4h] [bp+10h]@120
 
-  //v53 = -1;
-  //v4 = pItem;
-  //v5 = this;
+  v53 = -1;
+  v5 = this;
   if (!out_item)
     out_item = (ItemGen *)pAllocator->AllocNamedChunk(out_item, sizeof(*out_item), "newItemGen");
   memset(out_item, 0, sizeof(*out_item));
 
-  auto v4 = out_item;
+  v4 = out_item;
   v6 = treasure_level - 1;
   //v54 = treasure_level - 1;
   if ( a3 )
@@ -1705,7 +1705,7 @@
       return;
     }
     v57 = 0;
-    v18 = rand() % 10;// v5->field_11684[v54];
+    v18 = rand() % v5->uChanceByTreasureLvlSumm[v54];// v5->field_11684[v54];
     v4->uItemID = 0;
     if ( v18 > 0 )
     {
@@ -1746,7 +1746,7 @@
   v20 = pItems[v4->uItemID].uEquipType;
   if ( v20 <= EQUIP_BOW )
   {
-    v37 = 10;//(int)&v5->field_1169C[4 * v54 + 48];
+    v37 = v5->uBonusChanceWpSpecial[v54];
     if ( !*(unsigned int *)v37 )
       return;
     v38 = rand() % 100;
--- a/mm7_5.cpp	Tue Feb 19 01:23:04 2013 +0400
+++ b/mm7_5.cpp	Tue Feb 19 08:17:19 2013 +0400
@@ -13534,7 +13534,7 @@
     a1.uFrameX = 8;
     a1.uFrameY = 8;
     a1.uFrameHeight = 344;
-    v3 = (const char *)pStorylineText->StoreLine[v2].pText;//field_4[];
+    v3 = (const char *)pStorylineText->StoreLine[v2].pPageTitle;//field_4[];
     a1.uFrameZ = 467;
     a1.uFrameW = 351;
     if ( v3 )