comparison Party.cpp @ 135:9b0d651821f1

Party creation screen: sorcerer class icon fixed
author Nomad
date Mon, 11 Feb 2013 20:23:55 +0200
parents 1c471f3629fb
children 541f3df0aa55
comparison
equal deleted inserted replaced
131:3ee983b8082b 135:9b0d651821f1
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
315 pParty->pPlayers[0].uWillpower = 5; 315 pParty->pPlayers[0].uWillpower = 5;
316 pParty->pPlayers[0].uEndurance = 13; 316 pParty->pPlayers[0].uEndurance = 13;
317 pParty->pPlayers[0].uAccuracy = 13; 317 pParty->pPlayers[0].uAccuracy = 13;
318 pParty->pPlayers[0].uSpeed = 14; 318 pParty->pPlayers[0].uSpeed = 14;
319 pParty->pPlayers[0].uLuck = 7; 319 pParty->pPlayers[0].uLuck = 7;
320 pParty->pPlayers[0].pActiveSkills[9] = 1; // leather 320 pParty->pPlayers[0].pActiveSkills[PLAYER_SKILL_LEATHER] = 1; // leather
321 pParty->pPlayers[0].pActiveSkills[33] = 1; // armsmaster 321 pParty->pPlayers[0].pActiveSkills[PLAYER_SKILL_ARMSMASTER] = 1; // armsmaster
322 pParty->pPlayers[0].pActiveSkills[5] = 1; // bow 322 pParty->pPlayers[0].pActiveSkills[PLAYER_SKILL_BOW] = 1; // bow
323 pParty->pPlayers[0].pActiveSkills[1] = 1; // sword 323 pParty->pPlayers[0].pActiveSkills[PLAYER_SKILL_SWORD] = 1; // sword
324 pParty->pPlayers[1].field_1928 = 3; 324 pParty->pPlayers[1].field_1928 = 3;
325 pParty->pPlayers[1].uFace = 3; 325 pParty->pPlayers[1].uFace = 3;
326 pParty->pPlayers[1].field_1924 = 3; 326 pParty->pPlayers[1].field_1924 = 3;
327 pParty->pPlayers[1].uVoiceID = 3; 327 pParty->pPlayers[1].uVoiceID = 3;
328 strcpy(pParty->pPlayers[1].pName, pGlobalTXT_LocalizationStrings[506]); //Roderic 328 strcpy(pParty->pPlayers[1].pName, pGlobalTXT_LocalizationStrings[506]); //Roderic
331 pParty->pPlayers[1].uWillpower = 9; 331 pParty->pPlayers[1].uWillpower = 9;
332 pParty->pPlayers[1].uEndurance = 13; 332 pParty->pPlayers[1].uEndurance = 13;
333 pParty->pPlayers[1].uAccuracy = 13; 333 pParty->pPlayers[1].uAccuracy = 13;
334 pParty->pPlayers[1].uSpeed = 13; 334 pParty->pPlayers[1].uSpeed = 13;
335 pParty->pPlayers[1].uLuck = 13; 335 pParty->pPlayers[1].uLuck = 13;
336 pParty->pPlayers[1].pActiveSkills[9] = 1; // leather 336 pParty->pPlayers[1].pActiveSkills[PLAYER_SKILL_LEATHER] = 1; // leather
337 pParty->pPlayers[1].pActiveSkills[34] = 1; // stealing 337 pParty->pPlayers[1].pActiveSkills[PLAYER_SKILL_STEALING] = 1; // stealing
338 pParty->pPlayers[1].pActiveSkills[2] = 1; // dagger 338 pParty->pPlayers[1].pActiveSkills[PLAYER_SKILL_DAGGER] = 1; // dagger
339 pParty->pPlayers[1].pActiveSkills[29] = 1; // disarm trap 339 pParty->pPlayers[1].pActiveSkills[PLAYER_SKILL_TRAP_DISARM] = 1; // disarm trap
340 pParty->pPlayers[2].field_1928 = 14; 340 pParty->pPlayers[2].field_1928 = 14;
341 pParty->pPlayers[2].uFace = 14; 341 pParty->pPlayers[2].uFace = 14;
342 pParty->pPlayers[2].field_1924 = 14; 342 pParty->pPlayers[2].field_1924 = 14;
343 pParty->pPlayers[2].uVoiceID = 14; 343 pParty->pPlayers[2].uVoiceID = 14;
344 strcpy(pParty->pPlayers[2].pName, pGlobalTXT_LocalizationStrings[508]); // Serena 344 strcpy(pParty->pPlayers[2].pName, pGlobalTXT_LocalizationStrings[508]); // Serena
347 pParty->pPlayers[2].uWillpower = 20; 347 pParty->pPlayers[2].uWillpower = 20;
348 pParty->pPlayers[2].uEndurance = 22; 348 pParty->pPlayers[2].uEndurance = 22;
349 pParty->pPlayers[2].uAccuracy = 7; 349 pParty->pPlayers[2].uAccuracy = 7;
350 pParty->pPlayers[2].uSpeed = 13; 350 pParty->pPlayers[2].uSpeed = 13;
351 pParty->pPlayers[2].uLuck = 7; 351 pParty->pPlayers[2].uLuck = 7;
352 pParty->pPlayers[2].pActiveSkills[35] = 1; // alchemy 352 pParty->pPlayers[2].pActiveSkills[PLAYER_SKILL_ALCHEMY] = 1; // alchemy
353 pParty->pPlayers[2].pActiveSkills[9] = 1; // leather 353 pParty->pPlayers[2].pActiveSkills[PLAYER_SKILL_LEATHER] = 1; // leather
354 pParty->pPlayers[2].pActiveSkills[18] = 1; // body 354 pParty->pPlayers[2].pActiveSkills[PLAYER_SKILL_BODY] = 1; // body
355 pParty->pPlayers[2].pActiveSkills[6] = 1; // mace 355 pParty->pPlayers[2].pActiveSkills[PLAYER_SKILL_MACE] = 1; // mace
356 strcpy(pParty->pPlayers[3].pName, pGlobalTXT_LocalizationStrings[507]); // Alexis 356 strcpy(pParty->pPlayers[3].pName, pGlobalTXT_LocalizationStrings[507]); // Alexis
357 v3 = 10; 357 v3 = 10;
358 pParty->pPlayers[3].field_1928 = 10; 358 pParty->pPlayers[3].field_1928 = 10;
359 pParty->pPlayers[3].uFace = 10; 359 pParty->pPlayers[3].uFace = 10;
360 pResMagicBase = (int)&pParty->pPlayers[0].sResMagicBase; 360 //pResMagicBase = (int)&pParty->pPlayers[0].sResMagicBase;
361 pParty->pPlayers[3].uEndurance = 13; 361 pParty->pPlayers[3].uEndurance = 13;
362 pParty->pPlayers[3].uAccuracy = 13; 362 pParty->pPlayers[3].uAccuracy = 13;
363 pParty->pPlayers[3].uSpeed = 13; 363 pParty->pPlayers[3].uSpeed = 13;
364 pParty->pPlayers[3].field_1924 = 10; 364 pParty->pPlayers[3].field_1924 = 10;
365 pParty->pPlayers[3].uVoiceID = 10; 365 pParty->pPlayers[3].uVoiceID = 10;
366 pParty->pPlayers[3].uMight = 5; 366 pParty->pPlayers[3].uMight = 5;
367 pParty->pPlayers[3].uIntelligence = 30; 367 pParty->pPlayers[3].uIntelligence = 30;
368 pParty->pPlayers[3].uWillpower = 9; 368 pParty->pPlayers[3].uWillpower = 9;
369 pParty->pPlayers[3].uLuck = 7; 369 pParty->pPlayers[3].uLuck = 7;
370 pParty->pPlayers[3].pActiveSkills[9] = 1; // leather 370 pParty->pPlayers[3].pActiveSkills[PLAYER_SKILL_LEATHER] = 1; // leather
371 pParty->pPlayers[3].pActiveSkills[13] = 1; // air 371 pParty->pPlayers[3].pActiveSkills[PLAYER_SKILL_AIR] = 1; // air
372 pParty->pPlayers[3].pActiveSkills[12] = 1; // fire 372 pParty->pPlayers[3].pActiveSkills[PLAYER_SKILL_FIRE] = 1; // fire
373 pParty->pPlayers[3].pActiveSkills[0] = 1; // staff 373 pParty->pPlayers[3].pActiveSkills[PLAYER_SKILL_STAFF] = 1; // staff
374 pCharacter = &pParty->pPlayers[0];
375 //uNumPlayers = 4; 374 //uNumPlayers = 4;
376 //while ( 1 ) 375 //while ( 1 )
377 for (uNumPlayers = 0; uNumPlayers < 4; uNumPlayers++) 376 for (uNumPlayers = 0; uNumPlayers < 4; uNumPlayers++)
378 { 377 {
379 if ( !pCharacter->uClass ) 378 pCharacter = &pParty->pPlayers[uNumPlayers];
380 *(short *)pResMagicBase = v3; //player[i].pResMagicBase 379 if (pCharacter->classType == PLAYER_CLASS_KNIGHT)
380 pCharacter->sResMagicBase = v3; //player[i].pResMagicBase
381 uSpellBookPageCount = 0; 381 uSpellBookPageCount = 0;
382 //pMagicSkills = pPlayers[uNumPlayers].pActiveSkills[12];// Skills 382 //pMagicSkills = pPlayers[uNumPlayers].pActiveSkills[12];// Skills
383 //while ( !*(short *)pMagicSkills ) //player[i].skillFire 383 //while ( !*(short *)pMagicSkills ) //player[i].skillFire
384 for (int i = 0; i < 9; i++)//for Magic Book 384 for (int i = 0; i < 9; i++)//for Magic Book
385 { 385 {
519 } 519 }
520 //while ( v13 ); 520 //while ( v13 );
521 } 521 }
522 pCharacter->sHealth = pCharacter->GetMaxHealth(); 522 pCharacter->sHealth = pCharacter->GetMaxHealth();
523 pCharacter->sMana = pCharacter->GetMaxMana(); 523 pCharacter->sMana = pCharacter->GetMaxMana();
524 pCharacter++; 524 //pCharacter++;
525 //uNumPlayers--; 525 //uNumPlayers--;
526 //if (!uNumPlayers) 526 //if (!uNumPlayers)
527 //break; 527 //break;
528 pResMagicBase = (int)pCharacter; 528 //pResMagicBase = (int)pCharacter;
529 v3 = 10; 529 v3 = 10;
530 } 530 }
531 } 531 }
532 532
533 //----- (004917CE) -------------------------------------------------------- 533 //----- (004917CE) --------------------------------------------------------
565 uActiveCharacter = 1; 565 uActiveCharacter = 1;
566 ::pPlayers[0] = pPlayers; 566 ::pPlayers[0] = pPlayers;
567 for (uint i = 0; i < 4; ++i) 567 for (uint i = 0; i < 4; ++i)
568 ::pPlayers[i + 1] = &pPlayers[i]; 568 ::pPlayers[i + 1] = &pPlayers[i];
569 569
570 pPlayers[0].Reset(0); 570 pPlayers[0].Reset(PLAYER_CLASS_KNIGHT);
571 pPlayers[1].Reset(4); 571 pPlayers[1].Reset(PLAYER_CLASS_THEIF);
572 pPlayers[2].Reset(24); 572 pPlayers[2].Reset(PLAYER_CLASS_CLERIC);
573 pPlayers[3].Reset(32); 573 pPlayers[3].Reset(PLAYER_CLASS_SORCERER);
574 pPlayers[0].uFace = 17; 574 pPlayers[0].uFace = 17;
575 pPlayers[0].field_1924 = 17; 575 pPlayers[0].field_1924 = 17;
576 pPlayers[0].uVoiceID = 17; 576 pPlayers[0].uVoiceID = 17;
577 pPlayers[0].SetInitialStats(); 577 pPlayers[0].SetInitialStats();
578 578
1049 LODWORD(v2->pConditions[1]) = 0; 1049 LODWORD(v2->pConditions[1]) = 0;
1050 HIDWORD(v2->pConditions[1]) = 0; 1050 HIDWORD(v2->pConditions[1]) = 0;
1051 v2->uTimeToRecovery = 0; 1051 v2->uTimeToRecovery = 0;
1052 v2->sHealth = v2->GetMaxHealth(); 1052 v2->sHealth = v2->GetMaxHealth();
1053 v5 = v2->GetMaxMana(); 1053 v5 = v2->GetMaxMana();
1054 v6 = v2->uClass == 35; 1054 v6 = v2->classType == PLAYER_CLASS_LICH;
1055 v2->sMana = v5; 1055 v2->sMana = v5;
1056 if ( v6 ) 1056 if ( v6 )
1057 { 1057 {
1058 v14 = 0; 1058 v14 = 0;
1059 v7 = v2->pInventoryItems;//[0].field_1A; 1059 v7 = v2->pInventoryItems;//[0].field_1A;