diff Party.cpp @ 1071:a7e63532b9a8

pointer cleaning
author zipi
date Fri, 24 May 2013 20:57:11 +0100
parents b79139c3b5c8
children 29a8defbad9e
line wrap: on
line diff
--- a/Party.cpp	Fri May 24 20:33:37 2013 +0100
+++ b/Party.cpp	Fri May 24 20:57:11 2013 +0100
@@ -332,7 +332,7 @@
   //unsigned __int8 v9; // zf@37
   //char v10; // sf@37
   //unsigned __int8 v11; // of@37
-  char *pAttributes; // eax@38
+  ItemGen *pItems; // eax@38
   signed int v13; // ecx@38
   int uMaxSP; // eax@42
   unsigned int v15; // [sp-4h] [bp-44h]@14
@@ -556,13 +556,13 @@
         //v10 = uSkillIdx - 35 < 0;
       }
       //while (uSkillIdx < 36);
-      pAttributes = (char *)&pCharacter->pInventoryItems[0].uAttributes;
+      pItems = pCharacter->pInventoryItems;
       //v13 = 138;
-      for (v13 = 138; v13 > 0; --v13)
+      for (int i = 0; i < 138; i++)
       {
-        if ( *((int *)pAttributes - 5) )
-          *(int *)pAttributes |= 1;
-        pAttributes += 36;
+		if ( pItems->uItemID )
+          pItems->uAttributes |= 1;
+        ++pItems;
         //--v13;
       }
       //while ( v13 );