Mercurial > mm7
comparison Party.cpp @ 1296:c423f946dc99
moving files continue
author | Ritor1 |
---|---|
date | Tue, 18 Jun 2013 17:28:11 +0600 |
parents | 86a83e12d795 |
children | 5450af4f57ef |
comparison
equal
deleted
inserted
replaced
1295:86a83e12d795 | 1296:c423f946dc99 |
---|---|
1231 v1 += 5; | 1231 v1 += 5; |
1232 if ( CheckHiredNPCSpeciality(FallenWizard) ) | 1232 if ( CheckHiredNPCSpeciality(FallenWizard) ) |
1233 v1 += 5; | 1233 v1 += 5; |
1234 return v1 + v0->uReputation; | 1234 return v1 + v0->uReputation; |
1235 } | 1235 } |
1236 //----- (004269A2) -------------------------------------------------------- | |
1237 void __fastcall GivePartyExp(unsigned int pEXPNum) | |
1238 { | |
1239 signed int pActivePlayerCount; // ecx@1 | |
1240 int pLearningPercent; // eax@13 | |
1241 | |
1242 pActivePlayerCount = 0; | |
1243 for ( uint i = 0; i < 4; ++i ) | |
1244 { | |
1245 if ( !pParty->pPlayers[i].pConditions[13] && !pParty->pPlayers[i].pConditions[14] && !pParty->pPlayers[i].pConditions[15] && !pParty->pPlayers[i].pConditions[16] ) | |
1246 pActivePlayerCount ++; | |
1247 } | |
1248 if ( pActivePlayerCount ) | |
1249 { | |
1250 pEXPNum = pEXPNum / pActivePlayerCount; | |
1251 for ( uint i = 0; i < 4; ++i ) | |
1252 { | |
1253 if ( !pParty->pPlayers[i].pConditions[13] && !pParty->pPlayers[i].pConditions[14] && !pParty->pPlayers[i].pConditions[15] && !pParty->pPlayers[i].pConditions[16] ) | |
1254 { | |
1255 if ( pEXPNum ) | |
1256 { | |
1257 pLearningPercent = pParty->pPlayers[i].GetLearningPercent(); | |
1258 pEXPNum = pEXPNum + pEXPNum * pLearningPercent / 100; | |
1259 pParty->pPlayers[i].uExperience += pEXPNum; | |
1260 if ( pParty->pPlayers[i].uExperience > 4000000000i64 ) | |
1261 { | |
1262 pParty->pPlayers[i].uExperience = 0; | |
1263 } | |
1264 } | |
1265 } | |
1266 } | |
1267 } | |
1268 } |