comparison mm7_5.cpp @ 1172:d5dae0b4b98a

Слияние
author Ritor1
date Fri, 24 May 2013 10:53:46 +0600
parents b79139c3b5c8
children 9c7eb4037567
comparison
equal deleted inserted replaced
1171:28ee6610a3d2 1172:d5dae0b4b98a
1636 sub_44987B(dword_591164_teleport_map_name, MapStartPoint_Party); 1636 sub_44987B(dword_591164_teleport_map_name, MapStartPoint_Party);
1637 } 1637 }
1638 } 1638 }
1639 else 1639 else
1640 { 1640 {
1641 start_event_seq_number = dword_5C341C; 1641 EventProcessor(dword_5C3418, 0, 1, dword_5C341C);
1642 EventProcessor(dword_5C3418, 0, 1); 1642 }
1643 }
1644 start_event_seq_number = 0;
1645 if ( !_strcmpi(byte_6BE3B0, "d05.blv") ) 1643 if ( !_strcmpi(byte_6BE3B0, "d05.blv") )
1646 pParty->uTimePlayed += 1474560i64; 1644 pParty->uTimePlayed += 1474560i64;
1647 continue; 1645 continue;
1648 case UIMSG_TransitionWindowCloseBtn: 1646 case UIMSG_TransitionWindowCloseBtn:
1649 CloseWindowBackground(); 1647 CloseWindowBackground();
1650 pVideoPlayer->Unload(); 1648 pVideoPlayer->Unload();
1651 DialogueEnding(); 1649 DialogueEnding();
1652 start_event_seq_number = 0;
1653 viewparams->bRedrawGameUI = true; 1650 viewparams->bRedrawGameUI = true;
1654 continue; 1651 continue;
1655 case UIMSG_CycleCharacters: 1652 case UIMSG_CycleCharacters:
1656 v39 = GetAsyncKeyState(VK_SHIFT); 1653 v39 = GetAsyncKeyState(VK_SHIFT);
1657 uActiveCharacter = CycleCharacter(v39); 1654 uActiveCharacter = CycleCharacter(v39);
4673 player->PlaySound(SPEECH_52, 0); 4670 player->PlaySound(SPEECH_52, 0);
4674 return; 4671 return;
4675 } 4672 }
4676 if ( pMonster->sCurrentHP > 0 ) 4673 if ( pMonster->sCurrentHP > 0 )
4677 { 4674 {
4678 Actor::Stun(uActorID_Monster_, a1, 0); 4675 Actor::AI_Stun(uActorID_Monster_, a1, 0);
4679 Actor::AggroSurroundingPeasants(uActorID_Monster_, 1); 4676 Actor::AggroSurroundingPeasants(uActorID_Monster_, 1);
4680 if ( bShowDamage ) 4677 if ( bShowDamage )
4681 { 4678 {
4682 v50 = uDamageAmount; 4679 v50 = uDamageAmount;
4683 pMonsterName = (char *)pMonster; 4680 pMonsterName = (char *)pMonster;
5008 v7->sCurrentHP -= v26; 5005 v7->sCurrentHP -= v26;
5009 if ( v26 ) 5006 if ( v26 )
5010 { 5007 {
5011 if ( v7->sCurrentHP >= 1 ) 5008 if ( v7->sCurrentHP >= 1 )
5012 { 5009 {
5013 Actor::Stun(uActorID, PID(OBJECT_Player,a4), 0); 5010 Actor::AI_Stun(uActorID, PID(OBJECT_Player,a4), 0);
5014 Actor::AggroSurroundingPeasants(uActorID, 1); 5011 Actor::AggroSurroundingPeasants(uActorID, 1);
5015 } 5012 }
5016 else 5013 else
5017 { 5014 {
5018 if ( pMonsterStats->pInfos[v7->pMonsterInfo.uID].bQuestMonster & 1 ) 5015 if ( pMonsterStats->pInfos[v7->pMonsterInfo.uID].bQuestMonster & 1 )
5194 v44->sCurrentHP -= v56; 5191 v44->sCurrentHP -= v56;
5195 if ( v56 ) 5192 if ( v56 )
5196 { 5193 {
5197 if ( v44->sCurrentHP >= 1 ) 5194 if ( v44->sCurrentHP >= 1 )
5198 { 5195 {
5199 Actor::Stun(uActorID, PID(OBJECT_Player,a4), 0); 5196 Actor::AI_Stun(uActorID, PID(OBJECT_Player,a4), 0);
5200 Actor::AggroSurroundingPeasants(uActorID, 1); 5197 Actor::AggroSurroundingPeasants(uActorID, 1);
5201 } 5198 }
5202 else 5199 else
5203 { 5200 {
5204 if ( pMonsterStats->pInfos[v44->pMonsterInfo.uID].bQuestMonster & 1 ) 5201 if ( pMonsterStats->pInfos[v44->pMonsterInfo.uID].bQuestMonster & 1 )
5460 v7 = stru_50C198.CalcMagicalDamageToActor(pActor, 0, v6); 5457 v7 = stru_50C198.CalcMagicalDamageToActor(pActor, 0, v6);
5461 pActor->sCurrentHP -= v7; 5458 pActor->sCurrentHP -= v7;
5462 if ( v7 ) 5459 if ( v7 )
5463 { 5460 {
5464 if ( pActor->sCurrentHP > 0 ) 5461 if ( pActor->sCurrentHP > 0 )
5465 Actor::Stun(uActorIDa, a2, 0); 5462 Actor::AI_Stun(uActorIDa, a2, 0);
5466 else 5463 else
5467 Actor::Die(uActorIDa); 5464 Actor::Die(uActorIDa);
5468 a2a = 20 * v7 / (signed int)pActor->pMonsterInfo.uHP; 5465 a2a = 20 * v7 / (signed int)pActor->pMonsterInfo.uHP;
5469 if ( 20 * v7 / (signed int)pActor->pMonsterInfo.uHP > 10 ) 5466 if ( 20 * v7 / (signed int)pActor->pMonsterInfo.uHP > 10 )
5470 a2a = 10; 5467 a2a = 10;
5479 } 5476 }
5480 Actor::AddBloodsplatOnDamageOverlay(uActorIDa, 1, v7); 5477 Actor::AddBloodsplatOnDamageOverlay(uActorIDa, 1, v7);
5481 } 5478 }
5482 else 5479 else
5483 { 5480 {
5484 Actor::Stun(uActorIDa, a2, 0); 5481 Actor::AI_Stun(uActorIDa, a2, 0);
5485 } 5482 }
5486 } 5483 }
5487 } 5484 }
5488 } 5485 }
5489 } 5486 }
5568 v14 = stru_50C198.CalcMagicalDamageToActor(v7, v12, v10); 5565 v14 = stru_50C198.CalcMagicalDamageToActor(v7, v12, v10);
5569 v7->sCurrentHP -= v14; 5566 v7->sCurrentHP -= v14;
5570 if ( v14 ) 5567 if ( v14 )
5571 { 5568 {
5572 if ( v7->sCurrentHP > 0 ) 5569 if ( v7->sCurrentHP > 0 )
5573 Actor::Stun(uActorID, v17, 0); 5570 Actor::AI_Stun(uActorID, v17, 0);
5574 else 5571 else
5575 Actor::Die(uActorID); 5572 Actor::Die(uActorID);
5576 Actor::AggroSurroundingPeasants(uActorID, 0); 5573 Actor::AggroSurroundingPeasants(uActorID, 0);
5577 v18 = 20 * v14 / (signed int)v7->pMonsterInfo.uHP; 5574 v18 = 20 * v14 / (signed int)v7->pMonsterInfo.uHP;
5578 if ( 20 * v14 / (signed int)v7->pMonsterInfo.uHP > 10 ) 5575 if ( 20 * v14 / (signed int)v7->pMonsterInfo.uHP > 10 )
5588 } 5585 }
5589 Actor::AddBloodsplatOnDamageOverlay(uActorID, 1, v14); 5586 Actor::AddBloodsplatOnDamageOverlay(uActorID, 1, v14);
5590 } 5587 }
5591 else 5588 else
5592 { 5589 {
5593 Actor::Stun(uActorID, v17, 0); 5590 Actor::AI_Stun(uActorID, v17, 0);
5594 } 5591 }
5595 return; 5592 return;
5596 } 5593 }
5597 v13 = v7->pMonsterInfo.uSpell2ID; 5594 v13 = v7->pMonsterInfo.uSpell2ID;
5598 } 5595 }
6885 { 6882 {
6886 v24 = v5->pMonsterInfo.uSpellSkillAndMastery1; 6883 v24 = v5->pMonsterInfo.uSpellSkillAndMastery1;
6887 v22 = 2; 6884 v22 = 2;
6888 v17 = v5->pMonsterInfo.uSpell1ID; 6885 v17 = v5->pMonsterInfo.uSpell1ID;
6889 } 6886 }
6890 Actor::SpellAttack(v4, &a4, v17, v22, v24); 6887 Actor::AI_SpellAttack(v4, &a4, v17, v22, v24);
6891 LABEL_25: 6888 LABEL_25:
6892 v16 = a2a; 6889 v16 = a2a;
6893 v23 = &a4; 6890 v23 = &a4;
6894 v21 = 0; 6891 v21 = 0;
6895 v15 = v4; 6892 v15 = v4;
6901 else 6898 else
6902 { 6899 {
6903 v18 = v5->pMonsterInfo.uMissleAttack1Type; 6900 v18 = v5->pMonsterInfo.uMissleAttack1Type;
6904 v25 = 0; 6901 v25 = 0;
6905 } 6902 }
6906 Actor::RangedAttack(v4, &a4, v18, v25); 6903 Actor::AI_RangedAttack(v4, &a4, v18, v25);
6907 goto LABEL_25; 6904 goto LABEL_25;
6908 } 6905 }
6909 } 6906 }
6910 } 6907 }
6911 } 6908 }
7016 v14 = stru_50C198.special_ability_use_check(v5, a2a); 7013 v14 = stru_50C198.special_ability_use_check(v5, a2a);
7017 if ( v14 == 1 ) 7014 if ( v14 == 1 )
7018 { 7015 {
7019 if ( v5->pMonsterInfo.uMissleAttack2Type ) 7016 if ( v5->pMonsterInfo.uMissleAttack2Type )
7020 { 7017 {
7021 Actor::MissileAttack2(v13, v22, &v18); 7018 Actor::AI_MissileAttack2(v13, v22, &v18);
7022 goto LABEL_43; 7019 goto LABEL_43;
7023 } 7020 }
7024 } 7021 }
7025 else 7022 else
7026 { 7023 {
7031 else 7028 else
7032 v15 = v5->pMonsterInfo.uSpell2ID; 7029 v15 = v5->pMonsterInfo.uSpell2ID;
7033 if ( v15 ) 7030 if ( v15 )
7034 { 7031 {
7035 if ( v14 == 2 ) 7032 if ( v14 == 2 )
7036 Actor::SpellAttack1(v13, v22, &v18); 7033 Actor::AI_SpellAttack1(v13, v22, &v18);
7037 else 7034 else
7038 Actor::SpellAttack2(v13, v22, &v18); 7035 Actor::AI_SpellAttack2(v13, v22, &v18);
7039 goto LABEL_43; 7036 goto LABEL_43;
7040 } 7037 }
7041 goto LABEL_44; 7038 goto LABEL_44;
7042 } 7039 }
7043 if ( v5->pMonsterInfo.uMissleAttack1Type ) 7040 if ( v5->pMonsterInfo.uMissleAttack1Type )
7044 { 7041 {
7045 Actor::MissileAttack1(v13, v22, &v18); 7042 Actor::AI_MissileAttack1(v13, v22, &v18);
7046 LABEL_43: 7043 LABEL_43:
7047 //v3 = v21; 7044 //v3 = v21;
7048 v21->field_C = 1; 7045 v21->field_C = 1;
7049 LABEL_48: 7046 LABEL_48:
7050 v21->uActionLength = v5->uCurrentActionLength; 7047 v21->uActionLength = v5->uCurrentActionLength;
7053 } 7050 }
7054 } 7051 }
7055 LABEL_44: 7052 LABEL_44:
7056 if ( (double)(signed int)v20 < 307.2 ) 7053 if ( (double)(signed int)v20 < 307.2 )
7057 { 7054 {
7058 Actor::MeleeAttack(v13, v22, &v18); 7055 Actor::AI_MeleeAttack(v13, v22, &v18);
7059 //v3 = v21; 7056 //v3 = v21;
7060 v21->field_C = 3; 7057 v21->field_C = 3;
7061 goto LABEL_48; 7058 goto LABEL_48;
7062 } 7059 }
7063 LABEL_47: 7060 LABEL_47:
7332 LABEL_21: 7329 LABEL_21:
7333 if ( (signed __int64)actor->pActorBuffs[4].uExpireTime > 0 ) 7330 if ( (signed __int64)actor->pActorBuffs[4].uExpireTime > 0 )
7334 { 7331 {
7335 if ( (signed int)v11 < 10240 ) 7332 if ( (signed int)v11 < 10240 )
7336 { 7333 {
7337 Actor::Flee(uActorID, a2a, 0, &pDir); 7334 Actor::AI_Flee(uActorID, a2a, 0, &pDir);
7338 v29->field_C = 4; 7335 v29->field_C = 4;
7339 v29->uActionLength = actor->uCurrentActionLength; 7336 v29->uActionLength = actor->uCurrentActionLength;
7340 return 1; 7337 return 1;
7341 } 7338 }
7342 Actor::_4032B2(uActorID, a2a, 1024, 0); 7339 Actor::AI_4032B2(uActorID, a2a, 1024, 0);
7343 v29->field_C = 2; 7340 v29->field_C = 2;
7344 v29->uActionLength = actor->uCurrentActionLength; 7341 v29->uActionLength = actor->uCurrentActionLength;
7345 return 1; 7342 return 1;
7346 } 7343 }
7347 if ( actor->pMonsterInfo.uHostilityType != 4 ) 7344 if ( actor->pMonsterInfo.uHostilityType != 4 )
7355 Actor::AI_Stand(uActorID, a2a, 32, 0); 7352 Actor::AI_Stand(uActorID, a2a, 32, 0);
7356 v29->field_C = 4; 7353 v29->field_C = 4;
7357 v29->uActionLength = actor->uCurrentActionLength; 7354 v29->uActionLength = actor->uCurrentActionLength;
7358 return 1; 7355 return 1;
7359 } 7356 }
7360 Actor::Flee(uActorID, a2a, 32, 0); 7357 Actor::AI_Flee(uActorID, a2a, 32, 0);
7361 v29->field_C = 4; 7358 v29->field_C = 4;
7362 v29->uActionLength = actor->uCurrentActionLength; 7359 v29->uActionLength = actor->uCurrentActionLength;
7363 return 1; 7360 return 1;
7364 } 7361 }
7365 if ( actor->pMonsterInfo.uAIType == 2 ) 7362 if ( actor->pMonsterInfo.uAIType == 2 )
7374 Actor::AI_Stand(uActorID, a2a, 32, 0); 7371 Actor::AI_Stand(uActorID, a2a, 32, 0);
7375 v29->field_C = 4; 7372 v29->field_C = 4;
7376 v29->uActionLength = actor->uCurrentActionLength; 7373 v29->uActionLength = actor->uCurrentActionLength;
7377 return 1; 7374 return 1;
7378 } 7375 }
7379 Actor::Flee(uActorID, a2a, 32, 0); 7376 Actor::AI_Flee(uActorID, a2a, 32, 0);
7380 v29->field_C = 4; 7377 v29->field_C = 4;
7381 v29->uActionLength = actor->uCurrentActionLength; 7378 v29->uActionLength = actor->uCurrentActionLength;
7382 return 1; 7379 return 1;
7383 } 7380 }
7384 goto LABEL_39; 7381 goto LABEL_39;
7395 Actor::AI_Stand(uActorID, a2a, 32, 0); 7392 Actor::AI_Stand(uActorID, a2a, 32, 0);
7396 v29->field_C = 4; 7393 v29->field_C = 4;
7397 v29->uActionLength = actor->uCurrentActionLength; 7394 v29->uActionLength = actor->uCurrentActionLength;
7398 return 1; 7395 return 1;
7399 } 7396 }
7400 Actor::Flee(uActorID, a2a, 32, 0); 7397 Actor::AI_Flee(uActorID, a2a, 32, 0);
7401 v29->field_C = 4; 7398 v29->field_C = 4;
7402 v29->uActionLength = actor->uCurrentActionLength; 7399 v29->uActionLength = actor->uCurrentActionLength;
7403 return 1; 7400 return 1;
7404 } 7401 }
7405 goto LABEL_39; 7402 goto LABEL_39;
7409 if ( (double)(signed int)v28 < 307.2 ) 7406 if ( (double)(signed int)v28 < 307.2 )
7410 return 0; 7407 return 0;
7411 if ( (signed int)v11 < 5120 ) 7408 if ( (signed int)v11 < 5120 )
7412 { 7409 {
7413 if ( actor->pMonsterInfo.uMissleAttack1Type && (signed int)v11 < 1024 ) 7410 if ( actor->pMonsterInfo.uMissleAttack1Type && (signed int)v11 < 1024 )
7414 Actor::Pursue1(uActorID, a2a, uActorID, 32, &pDir); 7411 Actor::AI_Pursue1(uActorID, a2a, uActorID, 32, &pDir);
7415 else 7412 else
7416 Actor::Pursue2(uActorID, a2a, 32, &pDir, 307); 7413 Actor::AI_Pursue2(uActorID, a2a, 32, &pDir, 307);
7417 v29->field_C = 2; 7414 v29->field_C = 2;
7418 v29->uActionLength = actor->uCurrentActionLength; 7415 v29->uActionLength = actor->uCurrentActionLength;
7419 return 1; 7416 return 1;
7420 } 7417 }
7421 LABEL_46: 7418 LABEL_46:
7422 if ( !actor->pMonsterInfo.uMovementType ) 7419 if ( !actor->pMonsterInfo.uMovementType )
7423 { 7420 {
7424 Actor::_4032B2(uActorID, a2a, 1024, 32); 7421 Actor::AI_4032B2(uActorID, a2a, 1024, 32);
7425 v29->field_C = 2; 7422 v29->field_C = 2;
7426 v29->uActionLength = actor->uCurrentActionLength; 7423 v29->uActionLength = actor->uCurrentActionLength;
7427 return 1; 7424 return 1;
7428 } 7425 }
7429 if ( actor->pMonsterInfo.uMovementType == 1 ) 7426 if ( actor->pMonsterInfo.uMovementType == 1 )
7430 { 7427 {
7431 Actor::_4032B2(uActorID, a2a, 2560, 32); 7428 Actor::AI_4032B2(uActorID, a2a, 2560, 32);
7432 v29->field_C = 2; 7429 v29->field_C = 2;
7433 v29->uActionLength = actor->uCurrentActionLength; 7430 v29->uActionLength = actor->uCurrentActionLength;
7434 return 1; 7431 return 1;
7435 } 7432 }
7436 if ( actor->pMonsterInfo.uMovementType == 2 ) 7433 if ( actor->pMonsterInfo.uMovementType == 2 )
7437 { 7434 {
7438 Actor::_4032B2(uActorID, a2a, 5120, 32); 7435 Actor::AI_4032B2(uActorID, a2a, 5120, 32);
7439 v29->field_C = 2; 7436 v29->field_C = 2;
7440 v29->uActionLength = actor->uCurrentActionLength; 7437 v29->uActionLength = actor->uCurrentActionLength;
7441 return 1; 7438 return 1;
7442 } 7439 }
7443 if ( actor->pMonsterInfo.uMovementType == 4 ) 7440 if ( actor->pMonsterInfo.uMovementType == 4 )
7444 { 7441 {
7445 Actor::_4032B2(uActorID, a2a, 10240, 32); 7442 Actor::AI_4032B2(uActorID, a2a, 10240, 32);
7446 v29->field_C = 2; 7443 v29->field_C = 2;
7447 v29->uActionLength = actor->uCurrentActionLength; 7444 v29->uActionLength = actor->uCurrentActionLength;
7448 return 1; 7445 return 1;
7449 } 7446 }
7450 if ( actor->pMonsterInfo.uMovementType == 5 ) 7447 if ( actor->pMonsterInfo.uMovementType == 5 )