diff mm7_1.cpp @ 263:8cf4fe6b4941

Слияние
author Ritor1
date Mon, 18 Feb 2013 12:38:38 +0600
parents 2d6dda2e0405 0a37a56e9f02
children fb890fb66cad
line wrap: on
line diff
--- a/mm7_1.cpp	Mon Feb 18 12:38:07 2013 +0600
+++ b/mm7_1.cpp	Mon Feb 18 12:38:38 2013 +0600
@@ -611,7 +611,7 @@
 //----- (0041A000) --------------------------------------------------------
 unsigned int __fastcall CharacterUI_AwardsTab_Draw(unsigned int uPlayerID)
 {
-  unsigned int v1; // esi@1
+  //unsigned int v1; // esi@1
   unsigned int v2; // ebx@1
   unsigned int v3; // eax@1
   unsigned int result; // eax@1
@@ -634,12 +634,13 @@
   int v21; // [sp+C8h] [bp-8h]@14
   int v22; // [sp+CCh] [bp-4h]@40
 
-  v1 = uPlayerID;
+  auto player = pParty->pPlayers + uPlayerID - 1;
+  //v1 = uPlayerID;
   v2 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
   v3 = pIcons_LOD->LoadTexture("fr_award", TEXTURE_16BIT_PALETTE);
-  pRenderer->DrawTextureIndexed(8u, 8u, (Texture *)(v3 != -1 ? (int)&pIcons_LOD->pTextures[v3] : 0));
-  sprintf(pTmpBuf, "%s \f%05d", pGlobalTXT_LocalizationStrings[23], v2);// TODO check args
-  sprintf(Source, pGlobalTXT_LocalizationStrings[429], &pParty->pPlayers[v1-1].pName, pClassNames[pParty->pPlayers[v1-1].classType]);
+  pRenderer->DrawTextureIndexed(8u, 8u, (Texture *)(v3 != -1 ? &pIcons_LOD->pTextures[v3] : 0));
+  sprintfex(pTmpBuf, "%s\xC" "%05d", pGlobalTXT_LocalizationStrings[23], v2);
+  sprintfex(Source, pGlobalTXT_LocalizationStrings[429], player->pName, pClassNames[player->classType]);
   strcat(pTmpBuf, Source);
   strcat(pTmpBuf, "\xC" "00000");
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 24, 18, 0, pTmpBuf, 0, 0, 0);
@@ -1054,7 +1055,7 @@
   v49 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0, 0);
   v46 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0);
   v1 = pIcons_LOD->LoadTexture("quikref", TEXTURE_16BIT_PALETTE);
-  pRenderer->DrawTextureIndexed(8u, 8u, (Texture *)(v1 != -1 ? (int)&pIcons_LOD->pTextures[v1] : 0));
+  pRenderer->DrawTextureIndexed(8u, 8u, (Texture *)(v1 != -1 ? &pIcons_LOD->pTextures[v1] : 0));
   v43 = 0;
   v45 = LOBYTE(pFontArrus->uFontHeight) + 1;
   do
@@ -3153,7 +3154,7 @@
     v37 = v112[6];
     if ( v37 )
     {
-      sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[429], *v112, aNPCProfessionNames[(signed int)v37]);
+      sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[429], *v112, aNPCProfessionNames[(signed int)v37]);
     }
 	else
 	{
@@ -3467,10 +3468,21 @@
     a4 = &a4[LOBYTE(v56->uFontHeight) - 3];
     v57 = v121->pMonsterInfo.uAttack1DamageBonus;
     if ( v57 )
-      sprintf(pTmpBuf, "%s\f%05u\t080%dd%d+%d\n", pGlobalTXT_LocalizationStrings[53], 0, v121->pMonsterInfo.uAttack1DamageDiceRolls,
-        v121->pMonsterInfo.uAttack1DamageDiceSides, v57);
+      sprintf(
+        pTmpBuf,
+        "%s\f%05u\t080%dd%d+%d\n",
+        pGlobalTXT_LocalizationStrings[53],
+        0,
+        v121->pMonsterInfo.uAttack1DamageDiceRolls,
+        v121->pMonsterInfo.uAttack1DamageDiceSides,
+        v57);
     else
-      sprintf(pTmpBuf, "%s\f%05u\t080%dd%d\n", pGlobalTXT_LocalizationStrings[53], 0, v121->pMonsterInfo.uAttack1DamageDiceRolls,
+      sprintf(
+        pTmpBuf,
+        "%s\f%05u\t080%dd%d\n",
+        pGlobalTXT_LocalizationStrings[53],
+        0,
+        v121->pMonsterInfo.uAttack1DamageDiceRolls,
         v121->pMonsterInfo.uAttack1DamageDiceSides);
   }
   else
@@ -3696,7 +3708,7 @@
       if ( v0 > &pParty->pPlayers[3] )
         break;
     }
-	if(v0->classType == PLAYER_CLASS_31)
+	if(v0->classType == PLAYER_CLASS_WARLOCK)
 		++uRestUI_FoodRequiredToRest;
   }
   if ( CheckHiredNPCSpeciality(0x1Du) )