Mercurial > mm7
diff Player.cpp @ 1827:0c75c3e7e436
cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
author | Grumpy7 |
---|---|
date | Fri, 11 Oct 2013 05:49:39 +0200 |
parents | bdac32c645c5 |
children | 35c1e4ff6ba7 |
line wrap: on
line diff
--- a/Player.cpp Wed Oct 09 09:08:15 2013 +0200 +++ b/Player.cpp Fri Oct 11 05:49:39 2013 +0200 @@ -1184,7 +1184,7 @@ if ( SkillToMastery(v2) >= 4 ) return 10000; - v7 = GetPartyReputation(); + v7 = pParty->GetPartyReputation(); int multiplier = GetMultiplierForSkillLevel(v2, 1, 2, 3, 5); v5 = multiplier * (v2 & 0x3F); if (v5 == 0) @@ -2936,7 +2936,7 @@ v3 = (int)(dt * GetSpecialItemBonus(17) * 0.01 + dt); - Log::Warning(L"Recover(dt = %u/%u - %u", dt, (uint)v3, (uint)uTimeToRecovery); + //Log::Warning(L"Recover(dt = %u/%u - %u", dt, (uint)v3, (uint)uTimeToRecovery); if (uTimeToRecovery > v3) { @@ -4232,8 +4232,10 @@ break; case 6: statToChange = &this->uLuck; + break; default: Error("(%u)", eAttribute); + break; } if ( *statToChange < baseValue ) { @@ -7403,7 +7405,7 @@ Actor::ApplyFineForKillingPeasant(uActorID); Actor::AggroSurroundingPeasants(uActorID, 1); if ( actorPtr->pMonsterInfo.uExp ) - GivePartyExp(pMonsterStats->pInfos[actorPtr->pMonsterInfo.uID].uExp); + pParty->GivePartyExp(pMonsterStats->pInfos[actorPtr->pMonsterInfo.uID].uExp); int speechToPlay = SPEECH_51; if ( rand() % 100 < 20 ) speechToPlay = actorPtr->pMonsterInfo.uHP >= 100 ? 2 : 1; @@ -7595,7 +7597,7 @@ Actor::ApplyFineForKillingPeasant(uActorID); Actor::AggroSurroundingPeasants(uActorID, 1); if ( actorPtr->pMonsterInfo.uExp ) - GivePartyExp(pMonsterStats->pInfos[actorPtr->pMonsterInfo.uID].uExp); + pParty->GivePartyExp(pMonsterStats->pInfos[actorPtr->pMonsterInfo.uID].uExp); int speechToPlay = SPEECH_51; if ( rand() % 100 < 20 ) speechToPlay = actorPtr->pMonsterInfo.uHP >= 100 ? 2 : 1; @@ -7976,6 +7978,7 @@ uPlayerIdx = 2; else if ( this == pPlayers[4] ) uPlayerIdx = 3; - Error("Unexpected player pointer"); + else + Error("Unexpected player pointer"); return uPlayerIdx; } \ No newline at end of file