Mercurial > mm7
diff Player.cpp @ 493:59649750a054
Merge
author | Gloval |
---|---|
date | Thu, 28 Feb 2013 01:39:18 +0400 |
parents | 0e27362ac1d9 a3939d5067c4 |
children | 6fa3ff8ef729 |
line wrap: on
line diff
--- a/Player.cpp Thu Feb 28 01:38:46 2013 +0400 +++ b/Player.cpp Thu Feb 28 01:39:18 2013 +0400 @@ -189,21 +189,14 @@ //----- (00427730) -------------------------------------------------------- bool Player::CanCastSpell(unsigned int uRequiredMana) { - int v2; // eax@1 - bool result; // eax@2 - - v2 = this->sMana; - if ( v2 >= (signed int)uRequiredMana ) - { - this->sMana = v2 - uRequiredMana; - result = 1; - } - else - { - pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); - result = 0; - } - return result; + if (sMana >= uRequiredMana) + { + sMana -= uRequiredMana; + return true; + } + + pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); + return false; } @@ -4150,7 +4143,7 @@ v9 = *(int *)v8; v3 = (char *)&pItemsTable->pItems[v9].pIconName; if ( v3[28] == 12 ) - v10 = *(&pSpellDatas[0].field_A + 10 * *((int *)&pSpellDatas[66].field_8 + v9)); + v10 = *(&pSpellDatas[0].uExpertLevelRecovery + 10 * *((int *)&pSpellDatas[66].uNormalLevelRecovery + v9)); else v10 = (unsigned __int16)word_4EDED8[(unsigned __int8)v3[29]]; v47 = v10;