changeset 154:d1ea5dda614d

Слияние
author Ritor1
date Tue, 27 Nov 2012 23:07:10 +0600
parents 38a1c8ef6874 (current diff) dac041fc74e8 (diff)
children 2cc68f234b29
files Party.cpp
diffstat 1 files changed, 21 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/Party.cpp	Sun Nov 25 00:09:29 2012 +0600
+++ b/Party.cpp	Tue Nov 27 23:07:10 2012 +0600
@@ -287,10 +287,10 @@
   signed int uSpellBookPageCount; // edx@5
   int v7; // eax@5
   int uSkillIdx; // eax@11
-  //unsigned __int8 v9; // zf@37
-  //char v10; // sf@37
-  //unsigned __int8 v11; // of@37
-  char *pAttributes; // eax@38
+  unsigned __int8 v9; // zf@37
+  char v10; // sf@37
+  unsigned __int8 v11; // of@37
+  char *v12; // eax@38
   signed int v13; // ecx@38
   int uMaxSP; // eax@42
   unsigned int v15; // [sp-4h] [bp-44h]@14
@@ -372,11 +372,10 @@
   while ( 1 )
   {
     if ( !pCharacter->uClass )
-      *(short *)pResMagicBase = v3; //player[i].pResMagicBase
+      *(short *)pResMagicBase = v3;
     uSpellBookPageCount = 0;
-    v7 = pResMagicBase - 5726;// Skills
-    while ( !*(short *)v7 )         //player[i].skillFire  or
-                                    //player[i].pActiveSkills[12]
+    v7 = pResMagicBase - 5726;// pSpellBookPageFlags
+    while ( !*(short *)v7 )
     {
       ++uSpellBookPageCount;
       v7 += 2;
@@ -403,7 +402,7 @@
               v15 = ITEM_STAFF_1;
               goto wear_item;
             case PLAYER_SKILL_SWORD:
-              v15 = ITEM_LONGSWORD_1;
+              v15 = 1;
               goto wear_item;
             case PLAYER_SKILL_DAGGER:
               v15 = ITEM_DAGGER_1;
@@ -463,7 +462,7 @@
             case PLAYER_SKILL_TRAP_DISARM:
             case PLAYER_SKILL_LEARNING:
               pCharacter->AddItem(-1, ITEM_POTION_BOTTLE);
-              v16 = 5 * (rand() % 3 + 40);      // simple reagent
+              v16 = 5 * ((rand() % 3) + 40);      // simple reagent
               goto add_item;
             case PLAYER_SKILL_DODGE:
               v16 = ITEM_BOOTS_1;
@@ -478,18 +477,19 @@
           }
         }
         uSkillIdx = v18 + 1;
-        //v11 = uSkillIdx > 36;
-        //v9 = v18 == 35;
-        //v10 = uSkillIdx - 35 < 0;
+        v11 = uSkillIdx > 36;
+        v9 = v18 == 35;
+        v10 = uSkillIdx - 35 < 0;
       }
-      while (uSkillIdx < 36);
-      pAttributes = (char *)&pCharacter->pInventoryItems[0].uAttributes;
+      while ( (unsigned __int8)(v10 ^ v11) | v9 );
+      v12 = (char *)&pCharacter->pInventoryItems[0].uAttributes;
       //v13 = 138;
-      for (v13 = 138; v13 > 0; --v13)
+	  for (v13 = 138; v13 > 0; --v13)
+      //do
       {
-        if ( *((int *)pAttributes - 5) )
-          *(int *)pAttributes |= 1;
-        pAttributes += 36;
+        if ( *((int *)v12 - 5) )
+          *(int *)v12 |= 1u;
+        v12 += 36;
         //--v13;
       }
       //while ( v13 );
@@ -497,8 +497,8 @@
     pCharacter->sHealth = pCharacter->GetMaxHealth();
     pCharacter->sMana = pCharacter->GetMaxMana();
     pCharacter++;
-    uNumPlayers--;
-    if (!uNumPlayers)
+    v9 = uNumPlayers-- == 1;
+    if ( v9 )
       break;
     pResMagicBase = (int)pCharacter;
     v3 = 10;