diff mm7_5.cpp @ 955:21cc2b274220

m
author Ritor1
date Thu, 02 May 2013 11:02:48 +0600
parents 34ed2d5e7cfb
children e9292c58644a
line wrap: on
line diff
--- a/mm7_5.cpp	Mon Apr 29 09:18:19 2013 +0600
+++ b/mm7_5.cpp	Thu May 02 11:02:48 2013 +0600
@@ -4544,7 +4544,7 @@
   //bool uPlayerID; // eax@3
   //Player *pPlayer; // edi@4
   Actor *pMonster; // esi@7
-  SpriteObject *v9; // ebx@12
+  //SpriteObject *v9; // ebx@12
   int v10; // eax@12
   int v11; // ebx@12
   unsigned int v12; // ecx@12
@@ -4595,7 +4595,7 @@
   PlayerEquipment *v57; // [sp+48h] [bp-24h]@10
   //int v58; // [sp+4Ch] [bp-20h]@10
   int v59; // [sp+50h] [bp-1Ch]@1
-  unsigned int uActorID_Monster_; // [sp+54h] [bp-18h]@1
+  //unsigned int uActorID_Monster_; // [sp+54h] [bp-18h]@1
   int v61; // [sp+58h] [bp-14h]@1
   bool v62; // [sp+5Ch] [bp-10h]@1
   int uDamageAmount; // [sp+60h] [bp-Ch]@1
@@ -4604,7 +4604,7 @@
 
   //v3 = a1;
   v4 = 0;
-  uActorID_Monster_ = uActorID_Monster;
+  //uActorID_Monster_ = uActorID_Monster;
   //v54 = a1;
   uDamageAmount = 0;
   a4 = 0;
@@ -4626,7 +4626,7 @@
 
   assert(PID_ID(abs(a1)) < 4);
   auto player = &pParty->pPlayers[PID_ID(a1)];
-  pMonster = &pActors[uActorID_Monster_];
+  pMonster = &pActors[uActorID_Monster];
   //uPlayerID = pMonster->IsAlive();
   if (pMonster->IsNotAlive())
     return;
@@ -4675,10 +4675,10 @@
         break;
       }
     }
-    v50 = pMonster->pMonsterInfo.uID;
+    //v50 = pMonster->pMonsterInfo.uID;
     a2 = 4;
     //v27 = player->CalculateMeleeDamageTo(0, 0, v50);
-    uDamageAmount = player->CalculateMeleeDamageTo(0, 0, v50);
+    uDamageAmount = player->CalculateMeleeDamageTo(0, 0, pMonster->pMonsterInfo.uID);
     //if ( !v57 )
       goto LABEL_67;
     //goto LABEL_69;
@@ -4689,12 +4689,12 @@
   v61 = v4->field_60_distance_related_prolly_lod;
   if ( !v19 )
   {
-    v9 = (SpriteObject *)uDamageAmount;
-    v50 = pParty->vPosition.x - *(int *)(uDamageAmount + 4);
+    //v9 = v4;
+	v50 = pParty->vPosition.x - v4->vPosition.x;
     //v55 = abs(v50);
-    pMonsterName = (char *)(pParty->vPosition.y - v9->vPosition.y);
+    pMonsterName = (char *)(pParty->vPosition.y - v4->vPosition.y);
     //v51 = (unsigned __int64 *)abs((int)pMonsterName);
-    pPlayerName = (char *)(pParty->vPosition.z - v9->vPosition.z);
+    pPlayerName = (char *)(pParty->vPosition.z - v4->vPosition.z);
     v52 = abs((int)pPlayerName);
     v61 = abs(v50);
     v10 = abs(v50);
@@ -4729,7 +4729,7 @@
     {
       v61 = 1;
     }
-    v4 = (SpriteObject *)uDamageAmount;
+    //v4 = (SpriteObject *)uDamageAmount;
   }
 
   v15 = v4->spell_id;
@@ -4882,8 +4882,8 @@
   }
   if ( pMonster->sCurrentHP > 0 )
   {
-    Actor::Stun(uActorID_Monster_, a1, 0);
-    Actor::AggroSurroundingPeasants(uActorID_Monster_, 1);
+    Actor::Stun(uActorID_Monster, a1, 0);
+    Actor::AggroSurroundingPeasants(uActorID_Monster, 1);
     if ( bShowDamage )
     {
       v50 = uDamageAmount;
@@ -4927,9 +4927,9 @@
         }
       }
     }
-    Actor::Die(uActorID_Monster_);
-    Actor::ApplyFineForKillingPeasant(uActorID_Monster_);
-    Actor::AggroSurroundingPeasants(uActorID_Monster_, 1);
+    Actor::Die(uActorID_Monster);
+    Actor::ApplyFineForKillingPeasant(uActorID_Monster);
+    Actor::AggroSurroundingPeasants(uActorID_Monster, 1);
     if ( pMonster->pMonsterInfo.uExp )
       GivePartyExp(pMonsterStats->pInfos[pMonster->pMonsterInfo.uID].uExp);
     v40 = SPEECH_51;
@@ -5002,7 +5002,7 @@
     pMonster->vVelocity.y = 50 * LOWORD(pVelocity->y);
     pMonster->vVelocity.z = 50 * LOWORD(pVelocity->z);
   }
-  Actor::AddBloodsplatOnDamageOverlay(uActorID_Monster_, 1, v61);
+  Actor::AddBloodsplatOnDamageOverlay(uActorID_Monster, 1, v61);
 }
 // 4D864C: using guessed type char byte_4D864C;