Mercurial > mm7
comparison Party.cpp @ 155:76bc8ee82948
Слияние
author | Ritor1 |
---|---|
date | Mon, 11 Feb 2013 23:31:13 +0600 |
parents | 541f3df0aa55 |
children | cca78efb377e |
comparison
equal
deleted
inserted
replaced
154:c49af6426e37 | 155:76bc8ee82948 |
---|---|
278 //----- (0049137D) -------------------------------------------------------- | 278 //----- (0049137D) -------------------------------------------------------- |
279 void Party::CreateDefaultParty(char bGiveItems) | 279 void Party::CreateDefaultParty(char bGiveItems) |
280 { | 280 { |
281 Party *pParty; // esi@1 | 281 Party *pParty; // esi@1 |
282 signed __int16 v3; // ax@1 | 282 signed __int16 v3; // ax@1 |
283 int pResMagicBase; // ecx@1 | 283 //int pResMagicBase; // ecx@1 |
284 Player *pCharacter; // esi@3 | 284 Player *pCharacter; // esi@3 |
285 signed int uSpellBookPageCount; // edx@5 | 285 signed int uSpellBookPageCount; // edx@5 |
286 int pMagicSkills; // eax@5 | 286 int pMagicSkills; // eax@5 |
287 int uSkillIdx; // eax@11 | 287 int uSkillIdx; // eax@11 |
288 //unsigned __int8 v9; // zf@37 | 288 //unsigned __int8 v9; // zf@37 |
316 pParty->pPlayers[0].uWillpower = 5; | 316 pParty->pPlayers[0].uWillpower = 5; |
317 pParty->pPlayers[0].uEndurance = 13; | 317 pParty->pPlayers[0].uEndurance = 13; |
318 pParty->pPlayers[0].uAccuracy = 13; | 318 pParty->pPlayers[0].uAccuracy = 13; |
319 pParty->pPlayers[0].uSpeed = 14; | 319 pParty->pPlayers[0].uSpeed = 14; |
320 pParty->pPlayers[0].uLuck = 7; | 320 pParty->pPlayers[0].uLuck = 7; |
321 pParty->pPlayers[0].pActiveSkills[9] = 1; // leather | 321 pParty->pPlayers[0].pActiveSkills[PLAYER_SKILL_LEATHER] = 1; // leather |
322 pParty->pPlayers[0].pActiveSkills[33] = 1; // armsmaster | 322 pParty->pPlayers[0].pActiveSkills[PLAYER_SKILL_ARMSMASTER] = 1; // armsmaster |
323 pParty->pPlayers[0].pActiveSkills[5] = 1; // bow | 323 pParty->pPlayers[0].pActiveSkills[PLAYER_SKILL_BOW] = 1; // bow |
324 pParty->pPlayers[0].pActiveSkills[1] = 1; // sword | 324 pParty->pPlayers[0].pActiveSkills[PLAYER_SKILL_SWORD] = 1; // sword |
325 pParty->pPlayers[1].field_1928 = 3; | 325 pParty->pPlayers[1].field_1928 = 3; |
326 pParty->pPlayers[1].uFace = 3; | 326 pParty->pPlayers[1].uFace = 3; |
327 pParty->pPlayers[1].field_1924 = 3; | 327 pParty->pPlayers[1].field_1924 = 3; |
328 pParty->pPlayers[1].uVoiceID = 3; | 328 pParty->pPlayers[1].uVoiceID = 3; |
329 strcpy(pParty->pPlayers[1].pName, pGlobalTXT_LocalizationStrings[506]); //Roderic | 329 strcpy(pParty->pPlayers[1].pName, pGlobalTXT_LocalizationStrings[506]); //Roderic |
332 pParty->pPlayers[1].uWillpower = 9; | 332 pParty->pPlayers[1].uWillpower = 9; |
333 pParty->pPlayers[1].uEndurance = 13; | 333 pParty->pPlayers[1].uEndurance = 13; |
334 pParty->pPlayers[1].uAccuracy = 13; | 334 pParty->pPlayers[1].uAccuracy = 13; |
335 pParty->pPlayers[1].uSpeed = 13; | 335 pParty->pPlayers[1].uSpeed = 13; |
336 pParty->pPlayers[1].uLuck = 13; | 336 pParty->pPlayers[1].uLuck = 13; |
337 pParty->pPlayers[1].pActiveSkills[9] = 1; // leather | 337 pParty->pPlayers[1].pActiveSkills[PLAYER_SKILL_LEATHER] = 1; // leather |
338 pParty->pPlayers[1].pActiveSkills[34] = 1; // stealing | 338 pParty->pPlayers[1].pActiveSkills[PLAYER_SKILL_STEALING] = 1; // stealing |
339 pParty->pPlayers[1].pActiveSkills[2] = 1; // dagger | 339 pParty->pPlayers[1].pActiveSkills[PLAYER_SKILL_DAGGER] = 1; // dagger |
340 pParty->pPlayers[1].pActiveSkills[29] = 1; // disarm trap | 340 pParty->pPlayers[1].pActiveSkills[PLAYER_SKILL_TRAP_DISARM] = 1; // disarm trap |
341 pParty->pPlayers[2].field_1928 = 14; | 341 pParty->pPlayers[2].field_1928 = 14; |
342 pParty->pPlayers[2].uFace = 14; | 342 pParty->pPlayers[2].uFace = 14; |
343 pParty->pPlayers[2].field_1924 = 14; | 343 pParty->pPlayers[2].field_1924 = 14; |
344 pParty->pPlayers[2].uVoiceID = 14; | 344 pParty->pPlayers[2].uVoiceID = 14; |
345 strcpy(pParty->pPlayers[2].pName, pGlobalTXT_LocalizationStrings[508]); // Serena | 345 strcpy(pParty->pPlayers[2].pName, pGlobalTXT_LocalizationStrings[508]); // Serena |
348 pParty->pPlayers[2].uWillpower = 20; | 348 pParty->pPlayers[2].uWillpower = 20; |
349 pParty->pPlayers[2].uEndurance = 22; | 349 pParty->pPlayers[2].uEndurance = 22; |
350 pParty->pPlayers[2].uAccuracy = 7; | 350 pParty->pPlayers[2].uAccuracy = 7; |
351 pParty->pPlayers[2].uSpeed = 13; | 351 pParty->pPlayers[2].uSpeed = 13; |
352 pParty->pPlayers[2].uLuck = 7; | 352 pParty->pPlayers[2].uLuck = 7; |
353 pParty->pPlayers[2].pActiveSkills[35] = 1; // alchemy | 353 pParty->pPlayers[2].pActiveSkills[PLAYER_SKILL_ALCHEMY] = 1; // alchemy |
354 pParty->pPlayers[2].pActiveSkills[9] = 1; // leather | 354 pParty->pPlayers[2].pActiveSkills[PLAYER_SKILL_LEATHER] = 1; // leather |
355 pParty->pPlayers[2].pActiveSkills[18] = 1; // body | 355 pParty->pPlayers[2].pActiveSkills[PLAYER_SKILL_BODY] = 1; // body |
356 pParty->pPlayers[2].pActiveSkills[6] = 1; // mace | 356 pParty->pPlayers[2].pActiveSkills[PLAYER_SKILL_MACE] = 1; // mace |
357 strcpy(pParty->pPlayers[3].pName, pGlobalTXT_LocalizationStrings[507]); // Alexis | 357 strcpy(pParty->pPlayers[3].pName, pGlobalTXT_LocalizationStrings[507]); // Alexis |
358 v3 = 10; | 358 v3 = 10; |
359 pParty->pPlayers[3].field_1928 = 10; | 359 pParty->pPlayers[3].field_1928 = 10; |
360 pParty->pPlayers[3].uFace = 10; | 360 pParty->pPlayers[3].uFace = 10; |
361 pResMagicBase = (int)&pParty->pPlayers[0].sResMagicBase; | 361 //pResMagicBase = (int)&pParty->pPlayers[0].sResMagicBase; |
362 pParty->pPlayers[3].uEndurance = 13; | 362 pParty->pPlayers[3].uEndurance = 13; |
363 pParty->pPlayers[3].uAccuracy = 13; | 363 pParty->pPlayers[3].uAccuracy = 13; |
364 pParty->pPlayers[3].uSpeed = 13; | 364 pParty->pPlayers[3].uSpeed = 13; |
365 pParty->pPlayers[3].field_1924 = 10; | 365 pParty->pPlayers[3].field_1924 = 10; |
366 pParty->pPlayers[3].uVoiceID = 10; | 366 pParty->pPlayers[3].uVoiceID = 10; |
367 pParty->pPlayers[3].uMight = 5; | 367 pParty->pPlayers[3].uMight = 5; |
368 pParty->pPlayers[3].uIntelligence = 30; | 368 pParty->pPlayers[3].uIntelligence = 30; |
369 pParty->pPlayers[3].uWillpower = 9; | 369 pParty->pPlayers[3].uWillpower = 9; |
370 pParty->pPlayers[3].uLuck = 7; | 370 pParty->pPlayers[3].uLuck = 7; |
371 pParty->pPlayers[3].pActiveSkills[9] = 1; // leather | 371 pParty->pPlayers[3].pActiveSkills[PLAYER_SKILL_LEATHER] = 1; // leather |
372 pParty->pPlayers[3].pActiveSkills[13] = 1; // air | 372 pParty->pPlayers[3].pActiveSkills[PLAYER_SKILL_AIR] = 1; // air |
373 pParty->pPlayers[3].pActiveSkills[12] = 1; // fire | 373 pParty->pPlayers[3].pActiveSkills[PLAYER_SKILL_FIRE] = 1; // fire |
374 pParty->pPlayers[3].pActiveSkills[0] = 1; // staff | 374 pParty->pPlayers[3].pActiveSkills[PLAYER_SKILL_STAFF] = 1; // staff |
375 pCharacter = &pParty->pPlayers[0]; | |
376 //uNumPlayers = 4; | 375 //uNumPlayers = 4; |
377 //while ( 1 ) | 376 //while ( 1 ) |
378 for (uNumPlayers = 0; uNumPlayers < 4; uNumPlayers++) | 377 for (uNumPlayers = 0; uNumPlayers < 4; uNumPlayers++) |
379 { | 378 { |
380 if ( !pCharacter->uClass ) | 379 pCharacter = &pParty->pPlayers[uNumPlayers]; |
381 *(short *)pResMagicBase = v3; //player[i].pResMagicBase | 380 if (pCharacter->classType == PLAYER_CLASS_KNIGHT) |
381 pCharacter->sResMagicBase = v3; //player[i].pResMagicBase | |
382 uSpellBookPageCount = 0; | 382 uSpellBookPageCount = 0; |
383 //pMagicSkills = pPlayers[uNumPlayers].pActiveSkills[12];// Skills | 383 //pMagicSkills = pPlayers[uNumPlayers].pActiveSkills[12];// Skills |
384 //while ( !*(short *)pMagicSkills ) //player[i].skillFire | 384 //while ( !*(short *)pMagicSkills ) //player[i].skillFire |
385 for (int i = 0; i < 9; i++)//for Magic Book | 385 for (int i = 0; i < 9; i++)//for Magic Book |
386 { | 386 { |
520 } | 520 } |
521 //while ( v13 ); | 521 //while ( v13 ); |
522 } | 522 } |
523 pCharacter->sHealth = pCharacter->GetMaxHealth(); | 523 pCharacter->sHealth = pCharacter->GetMaxHealth(); |
524 pCharacter->sMana = pCharacter->GetMaxMana(); | 524 pCharacter->sMana = pCharacter->GetMaxMana(); |
525 pCharacter++; | 525 //pCharacter++; |
526 //uNumPlayers--; | 526 //uNumPlayers--; |
527 //if (!uNumPlayers) | 527 //if (!uNumPlayers) |
528 //break; | 528 //break; |
529 pResMagicBase = (int)pCharacter; | 529 //pResMagicBase = (int)pCharacter; |
530 v3 = 10; | 530 v3 = 10; |
531 } | 531 } |
532 } | 532 } |
533 | 533 |
534 //----- (004917CE) -------------------------------------------------------- | 534 //----- (004917CE) -------------------------------------------------------- |
566 uActiveCharacter = 1; | 566 uActiveCharacter = 1; |
567 ::pPlayers[0] = pPlayers; | 567 ::pPlayers[0] = pPlayers; |
568 for (uint i = 0; i < 4; ++i) | 568 for (uint i = 0; i < 4; ++i) |
569 ::pPlayers[i + 1] = &pPlayers[i]; | 569 ::pPlayers[i + 1] = &pPlayers[i]; |
570 | 570 |
571 pPlayers[0].Reset(0); | 571 pPlayers[0].Reset(PLAYER_CLASS_KNIGHT); |
572 pPlayers[1].Reset(4); | 572 pPlayers[1].Reset(PLAYER_CLASS_THEIF); |
573 pPlayers[2].Reset(24); | 573 pPlayers[2].Reset(PLAYER_CLASS_CLERIC); |
574 pPlayers[3].Reset(32); | 574 pPlayers[3].Reset(PLAYER_CLASS_SORCERER); |
575 pPlayers[0].uFace = 17; | 575 pPlayers[0].uFace = 17; |
576 pPlayers[0].field_1924 = 17; | 576 pPlayers[0].field_1924 = 17; |
577 pPlayers[0].uVoiceID = 17; | 577 pPlayers[0].uVoiceID = 17; |
578 pPlayers[0].SetInitialStats(); | 578 pPlayers[0].SetInitialStats(); |
579 | 579 |
1050 LODWORD(v2->pConditions[1]) = 0; | 1050 LODWORD(v2->pConditions[1]) = 0; |
1051 HIDWORD(v2->pConditions[1]) = 0; | 1051 HIDWORD(v2->pConditions[1]) = 0; |
1052 v2->uTimeToRecovery = 0; | 1052 v2->uTimeToRecovery = 0; |
1053 v2->sHealth = v2->GetMaxHealth(); | 1053 v2->sHealth = v2->GetMaxHealth(); |
1054 v5 = v2->GetMaxMana(); | 1054 v5 = v2->GetMaxMana(); |
1055 v6 = v2->uClass == 35; | 1055 v6 = v2->classType == PLAYER_CLASS_LICH; |
1056 v2->sMana = v5; | 1056 v2->sMana = v5; |
1057 if ( v6 ) | 1057 if ( v6 ) |
1058 { | 1058 { |
1059 v14 = 0; | 1059 v14 = 0; |
1060 v7 = v2->pInventoryItems;//[0].field_1A; | 1060 v7 = v2->pInventoryItems;//[0].field_1A; |