diff Player.cpp @ 248:37dcbe8f3cca

Dialogue stuff
author Nomad
date Mon, 18 Feb 2013 07:11:43 +0200
parents a6a8fa73b4ec
children 0a37a56e9f02
line wrap: on
line diff
--- a/Player.cpp	Mon Feb 18 03:59:31 2013 +0200
+++ b/Player.cpp	Mon Feb 18 07:11:43 2013 +0200
@@ -586,7 +586,7 @@
   signed int v13; // esi@12
   int v14; // eax@12
   //int v15; // eax@17
-  int pExpression; // ebx@17
+  CHARACTER_EXPRESSION_ID expression; // ebx@17
   signed int v17; // ecx@19
   char *pSoundID; // edi@20
   int v20[5]; // [sp+Ch] [bp-1Ch]@7
@@ -647,8 +647,8 @@
   if ( v13 )
   {
     pPlayerNum = 0;
-    pExpression = v20[rand() % v13];
-    if ( pExpression == 21 && pSoundId )
+    expression = (CHARACTER_EXPRESSION_ID)v20[rand() % v13];
+    if (expression == CHARACTER_EXPRESSION_21 && pSoundId )
     {
       v17 = 0;
       if ( (signed int)pSoundList->uNumSounds <= 0 )
@@ -670,7 +670,7 @@
       if ( pSoundList->pSounds[v17].pSoundData[0] )
         pPlayerNum = (sLastTrackLengthMS << 7) / 1000;
     }
-    /*LOWORD(v14) = */PlayEmotion((CHARACTER_EXPRESSION_ID)pExpression, pPlayerNum);
+    /*LOWORD(v14) = */PlayEmotion(expression, pPlayerNum);
   }
   //return v14;
 }
@@ -5758,7 +5758,7 @@
         }
         if ( CheckHiredNPCSpeciality(v5) )
           v2 += 4;
-        if ( v9->classType == PLAYER_CLASS_31 && sub_476387() )
+        if ( v9->classType == PLAYER_CLASS_31 && PartyHasDragon() )
           v2 += 3;
 LABEL_86:
         if ( uSkillType <= PLAYER_SKILL_DARK )
@@ -7892,7 +7892,7 @@
         LOBYTE(v6) = CheckHiredNPCSpeciality(a1);
         return v6;
       case VAR_NPCs2:
-        return pNPCStats->pNewNPCData[a1].uFlags & 0x80;
+        return pNPCStats->pNewNPCData[a1].Hired();
       case VAR_MonthEquals|VAR_CurrentSP:
         v13 = 0x80u >> ((signed __int16)a1 - 1) % 8;
         v14 = this->field_1A50[((signed __int16)a1 - 1) >> 3];