diff Engine/MapInfo.cpp @ 2569:d433439699be

Слияние
author Ritor1
date Thu, 21 May 2015 18:33:07 +0600
parents d569340b05ff
children
line wrap: on
line diff
--- a/Engine/MapInfo.cpp	Thu May 21 18:32:45 2015 +0600
+++ b/Engine/MapInfo.cpp	Thu May 21 18:33:07 2015 +0600
@@ -386,7 +386,6 @@
   signed int result; // eax@1
   signed __int64 v12; // qtt@1
   int v13; // ebx@1
-  int v14; // edx@10
   signed int v15; // ebx@20
   unsigned __int16 v16; // dx@20
 //  ObjectDesc *v17; // ecx@21
@@ -438,43 +437,37 @@
     }
     if ( a2->uIndex == 1 )
     {
-      v14 = rand() % 51 + 50;
-      a1a.stru_24.uItemID = 197;
-      v34 = v14;
+      a1a.containing_item.uItemID = ITEM_GOLD_SMALL;
+      v34 = rand() % 51 + 50;
     }
     else if ( a2->uIndex == 2 )
     {
-      v14 = rand() % 101 + 100;
-      a1a.stru_24.uItemID = 197;
-      v34 = v14;
+      a1a.containing_item.uItemID = ITEM_GOLD_SMALL;
+      v34 = rand() % 101 + 100;
     }
     else if ( a2->uIndex == 3 )
     {
-      v14 = rand() % 301 + 200;
-      a1a.stru_24.uItemID = 198;
-      v34 = v14;
+      a1a.containing_item.uItemID = ITEM_GOLD_MEDIUM;
+      v34 = rand() % 301 + 200;
     }
     else if ( a2->uIndex == 4 )
     {
-      v14 = rand() % 501 + 500;
-      a1a.stru_24.uItemID = 198;
-      v34 = v14;
+      a1a.containing_item.uItemID = ITEM_GOLD_MEDIUM;
+      v34 = rand() % 501 + 500;
     }
     else if ( a2->uIndex == 5 )
     {
-      v14 = rand() % 1001 + 1000;
-      a1a.stru_24.uItemID = 199;
-      v34 = v14;
+      a1a.containing_item.uItemID = ITEM_GOLD_LARGE;
+      v34 = rand() % 1001 + 1000;
     }
     else if ( a2->uIndex == 6 )
     {
-      v14 = rand() % 3001 + 2000;
-      a1a.stru_24.uItemID = 199;
-      v34 = v14;
+      a1a.containing_item.uItemID = ITEM_GOLD_LARGE;
+      v34 = rand() % 3001 + 2000;
     }	 
     v15 = 0;
-    v16 = pItemsTable->pItems[a1a.stru_24.uItemID].uSpriteID;
-    a1a.uType = pItemsTable->pItems[a1a.stru_24.uItemID].uSpriteID;
+    v16 = pItemsTable->pItems[a1a.containing_item.uItemID].uSpriteID;
+    a1a.uType = (SPRITE_OBJECT_TYPE)pItemsTable->pItems[a1a.containing_item.uItemID].uSpriteID;
     v18 = 0;
     for( int i = 0; i < pObjectList->uNumObjects; i++ )
     {
@@ -484,18 +477,18 @@
         break;
       }
     }
-    a1a.stru_24.SetIdentified();
+    a1a.containing_item.SetIdentified();
     a1a.uObjectDescID = v18;
-    a1a.stru_24.uSpecEnchantmentType = v34;
+    a1a.containing_item.special_enchantment = (ITEM_ENCHANTMENT)v34;
   }
   else
   {
-    result = a1a.stru_24.GenerateArtifact();
+      result = a1a.containing_item.GenerateArtifact();
     if ( !result )
       return result;
     v23 = 0;
-    v24 = pItemsTable->pItems[a1a.stru_24.uItemID].uSpriteID;
-    a1a.uType = pItemsTable->pItems[a1a.stru_24.uItemID].uSpriteID;
+    v24 = pItemsTable->pItems[a1a.containing_item.uItemID].uSpriteID;
+    a1a.uType = (SPRITE_OBJECT_TYPE)pItemsTable->pItems[a1a.containing_item.uItemID].uSpriteID;
     v26 = 0;
     for( int i = 0; i < pObjectList->uNumObjects; i++ )
     {
@@ -506,7 +499,7 @@
       }
     }
     a1a.uObjectDescID = v26;
-    a1a.stru_24.Reset();
+    a1a.containing_item.Reset();
   }
   a1a.vPosition.y = a2->vPosition.y;
   a1a.uAttributes = 0;