Mercurial > mm7
comparison mm7_6.cpp @ 822:c232f160e6f3
Named SpriteObject spell-related fields.
author | Nomad |
---|---|
date | Tue, 26 Mar 2013 17:56:24 +0200 |
parents | 9359c114f98c |
children | c1da83d8223f |
comparison
equal
deleted
inserted
replaced
820:522591080ac5 | 822:c232f160e6f3 |
---|---|
2464 //__int16 v7; // ax@23 | 2464 //__int16 v7; // ax@23 |
2465 //__int16 v8; // ax@24 | 2465 //__int16 v8; // ax@24 |
2466 //char v9; // al@44 | 2466 //char v9; // al@44 |
2467 //int v10; // eax@45 | 2467 //int v10; // eax@45 |
2468 unsigned __int16 v11; // cx@45 | 2468 unsigned __int16 v11; // cx@45 |
2469 signed int v12; // ecx@48 | 2469 //signed int v12; // ecx@48 |
2470 //int v13; // eax@53 | 2470 //int v13; // eax@53 |
2471 unsigned __int8 v14; // zf@53 | 2471 unsigned __int8 v14; // zf@53 |
2472 //unsigned int v15; // edx@53 | 2472 //unsigned int v15; // edx@53 |
2473 //signed int v16; // eax@53 | 2473 //signed int v16; // eax@53 |
2474 Player *v17; // esi@70 | 2474 Player *v17; // esi@70 |
2475 int v18; // eax@72 | 2475 //int v18; // eax@72 |
2476 int v19; // eax@74 | 2476 int v19; // eax@74 |
2477 char *v20; // eax@74 | 2477 char *v20; // eax@74 |
2478 signed int i; // esi@76 | 2478 signed int i; // esi@76 |
2479 int v22; // eax@88 | 2479 int v22; // eax@88 |
2480 __int16 v23; // ax@88 | 2480 __int16 v23; // ax@88 |
2502 int v45; // ecx@132 | 2502 int v45; // ecx@132 |
2503 int v46; // eax@132 | 2503 int v46; // eax@132 |
2504 unsigned int v47; // edx@133 | 2504 unsigned int v47; // edx@133 |
2505 int v48; // eax@137 | 2505 int v48; // eax@137 |
2506 int v49; // eax@137 | 2506 int v49; // eax@137 |
2507 int v50; // eax@141 | 2507 //int v50; // eax@141 |
2508 int v51; // eax@146 | 2508 int v51; // eax@146 |
2509 __int16 v52; // ax@153 | 2509 __int16 v52; // ax@153 |
2510 int v53; // eax@153 | 2510 int v53; // eax@153 |
2511 signed __int64 v54; // qax@164 | 2511 signed __int64 v54; // qax@164 |
2512 int v55; // edi@164 | 2512 int v55; // edi@164 |
3297 v11 = pPlayer->pActiveSkills[LODWORD(v725)]; | 3297 v11 = pPlayer->pActiveSkills[LODWORD(v725)]; |
3298 } | 3298 } |
3299 | 3299 |
3300 if ( HIBYTE(v11) & 1 ) | 3300 if ( HIBYTE(v11) & 1 ) |
3301 { | 3301 { |
3302 v12 = 4; | |
3303 v731 = 4; | 3302 v731 = 4; |
3304 } | 3303 } |
3305 else | 3304 else |
3306 { | 3305 { |
3307 if ( (v11 & 0x80u) == 0 ) | 3306 if ( (v11 & 0x80u) == 0 ) |
3310 } | 3309 } |
3311 else | 3310 else |
3312 { | 3311 { |
3313 v731 = 3; | 3312 v731 = 3; |
3314 } | 3313 } |
3315 v12 = v731; | |
3316 } | 3314 } |
3317 | 3315 |
3318 v730 = v3->spellnum; | 3316 v730 = v3->spellnum; |
3319 if (v3->forced_spell_skill_level) | 3317 if (v3->forced_spell_skill_level) |
3320 uRequiredMana = 0; | 3318 uRequiredMana = 0; |
3321 else | 3319 else |
3322 uRequiredMana = pSpellDatas[v3->spellnum].mana_per_skill[v12 - 1]; | 3320 uRequiredMana = pSpellDatas[v3->spellnum].mana_per_skill[v731 - 1]; |
3323 sRecoveryTime = pSpellDatas[v3->spellnum].recovery_per_skill[v12 - 1]; | 3321 sRecoveryTime = pSpellDatas[v3->spellnum].recovery_per_skill[v731 - 1]; |
3324 | 3322 |
3325 if (LODWORD(v725) == PLAYER_SKILL_DARK && pParty->uCurrentHour == 0 && pParty->uCurrentMinute == 0 || | 3323 if (LODWORD(v725) == PLAYER_SKILL_DARK && pParty->uCurrentHour == 0 && pParty->uCurrentMinute == 0 || |
3326 LODWORD(v725) == PLAYER_SKILL_LIGHT && pParty->uCurrentHour == 12 && pParty->uCurrentMinute == 0) | 3324 LODWORD(v725) == PLAYER_SKILL_LIGHT && pParty->uCurrentHour == 12 && pParty->uCurrentMinute == 0) |
3327 uRequiredMana = 0; | 3325 uRequiredMana = 0; |
3328 | 3326 |
3374 _this = (ItemGen *)1; | 3372 _this = (ItemGen *)1; |
3375 if ( (signed int)SkillToMastery(pPlayer->pActiveSkills[PLAYER_SKILL_BOW]) >= 3 ) | 3373 if ( (signed int)SkillToMastery(pPlayer->pActiveSkills[PLAYER_SKILL_BOW]) >= 3 ) |
3376 _this = (ItemGen *)2; | 3374 _this = (ItemGen *)2; |
3377 sRecoveryTime = v17->GetAttackRecoveryTime(true); | 3375 sRecoveryTime = v17->GetAttackRecoveryTime(true); |
3378 a1.stru_24.Reset(); | 3376 a1.stru_24.Reset(); |
3379 v18 = v3->spellnum; | 3377 a1.spell_level = v2; |
3380 a1.field_4C = v2; | 3378 a1.spell_id = v3->spellnum; |
3381 a1.field_48 = v18; | 3379 a1.spell_skill = v731; |
3382 a1.field_50 = v731; | |
3383 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); | 3380 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); |
3384 if ( v17->WearsItem(510, 2) ) | 3381 if ( v17->WearsItem(510, 2) ) |
3385 a1.uObjectDescID = pObjectList->ObjectIDByItemID(0xBD6u); | 3382 a1.uObjectDescID = pObjectList->ObjectIDByItemID(0xBD6u); |
3386 a1.vPosition.x = pParty->vPosition.x; | 3383 a1.vPosition.x = pParty->vPosition.x; |
3387 a1.vPosition.y = pParty->vPosition.y; | 3384 a1.vPosition.y = pParty->vPosition.y; |
3388 a1.uAttributes = 0; | 3385 a1.uAttributes = 0; |
3389 a1.uSpriteFrameID = 0; | 3386 a1.uSpriteFrameID = 0; |
3390 a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; | 3387 a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; |
3391 v19 = 8 * v3->uPlayerID; | 3388 v19 = 8 * v3->uPlayerID; |
3392 LOBYTE(v19) = v19 | OBJECT_Player; | 3389 LOBYTE(v19) = v19 | OBJECT_Player; |
3393 a1.field_58_pid = v19; | 3390 a1.spell_caster_pid = v19; |
3394 a1.field_5C = a2; | 3391 a1.field_5C = a2; |
3395 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance); | 3392 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance); |
3396 a1.uFacing = LOWORD(v715.uYawAngle); | 3393 a1.uFacing = LOWORD(v715.uYawAngle); |
3397 a1.uSoundID = LOWORD(v3->field_10); | 3394 a1.uSoundID = LOWORD(v3->field_10); |
3398 v20 = (char *)&pParty->pPlayers[v3->uPlayerID]; | 3395 v20 = (char *)&pParty->pPlayers[v3->uPlayerID]; |
3416 goto play_sound_and_continue; | 3413 goto play_sound_and_continue; |
3417 | 3414 |
3418 case SPELL_LASER_PROJECTILE: | 3415 case SPELL_LASER_PROJECTILE: |
3419 sRecoveryTime = pPlayer->GetAttackRecoveryTime(0); | 3416 sRecoveryTime = pPlayer->GetAttackRecoveryTime(0); |
3420 a1.stru_24.Reset(); | 3417 a1.stru_24.Reset(); |
3421 a1.field_48 = v3->spellnum; | 3418 a1.spell_id = v3->spellnum; |
3422 a1.field_4C = v723; | 3419 a1.spell_level = v723; |
3423 a1.field_50 = v731; | 3420 a1.spell_skill = v731; |
3424 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); | 3421 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); |
3425 a1.vPosition.x = pParty->vPosition.x; | 3422 a1.vPosition.x = pParty->vPosition.x; |
3426 a1.vPosition.y = pParty->vPosition.y; | 3423 a1.vPosition.y = pParty->vPosition.y; |
3427 a1.uAttributes = 0; | 3424 a1.uAttributes = 0; |
3428 a1.uSpriteFrameID = 0; | 3425 a1.uSpriteFrameID = 0; |
3429 a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 2; | 3426 a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 2; |
3430 v22 = 8 * v3->uPlayerID; | 3427 v22 = 8 * v3->uPlayerID; |
3431 LOBYTE(v22) = v22 | OBJECT_Player; | 3428 LOBYTE(v22) = v22 | OBJECT_Player; |
3432 a1.field_58_pid = v22; | 3429 a1.spell_caster_pid = v22; |
3433 a1.field_5C = a2; | 3430 a1.field_5C = a2; |
3434 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance); | 3431 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance); |
3435 a1.uFacing = LOWORD(v715.uYawAngle); | 3432 a1.uFacing = LOWORD(v715.uYawAngle); |
3436 a1.uSoundID = LOWORD(v3->field_10); | 3433 a1.uSoundID = LOWORD(v3->field_10); |
3437 memcpy( | 3434 memcpy( |
3455 goto play_sound_and_continue; | 3452 goto play_sound_and_continue; |
3456 | 3453 |
3457 case SPELL_FIRE_TORCH_LIGHT: | 3454 case SPELL_FIRE_TORCH_LIGHT: |
3458 LODWORD(v733) = 3600 * v2; | 3455 LODWORD(v733) = 3600 * v2; |
3459 | 3456 |
3460 switch (v12) | 3457 switch (v731) |
3461 { | 3458 { |
3462 case 1: amount = 2; break; | 3459 case 1: amount = 2; break; |
3463 case 2: amount = 3; break; | 3460 case 2: amount = 3; break; |
3464 case 3: | 3461 case 3: |
3465 case 4: amount = 4; break; | 3462 case 4: amount = 4; break; |
3472 | 3469 |
3473 pParty->pPartyBuffs[PARTY_BUFF_TORCHLIGHT].Apply(pParty->uTimePlayed + (signed __int64)((double)(signed int)3600 * v2 * 4.2666669), v731, amount, 0, 0); | 3470 pParty->pPartyBuffs[PARTY_BUFF_TORCHLIGHT].Apply(pParty->uTimePlayed + (signed __int64)((double)(signed int)3600 * v2 * 4.2666669), v731, amount, 0, 0); |
3474 goto LABEL_1056; | 3471 goto LABEL_1056; |
3475 | 3472 |
3476 case SPELL_FIRE_FIRE_SPIKE: | 3473 case SPELL_FIRE_FIRE_SPIKE: |
3477 v29 = v12 - 2; | 3474 v29 = v731 - 2; |
3478 if ( v29 ) | 3475 if ( v29 ) |
3479 { | 3476 { |
3480 v30 = v29 - 1; | 3477 v30 = v29 - 1; |
3481 if ( v30 ) | 3478 if ( v30 ) |
3482 { | 3479 { |
3501 //if ( (signed int)uNumSpriteObjects > 0 ) | 3498 //if ( (signed int)uNumSpriteObjects > 0 ) |
3502 HIDWORD(v733) = 0; | 3499 HIDWORD(v733) = 0; |
3503 for (uint i = 0; i < uNumSpriteObjects; ++i) | 3500 for (uint i = 0; i < uNumSpriteObjects; ++i) |
3504 { | 3501 { |
3505 auto object = pSpriteObjects + i; | 3502 auto object = pSpriteObjects + i; |
3506 if (object->uType && object->field_48 == 7 && object->field_58_pid == 8 * (int)v3->uPlayerID | OBJECT_Player) | 3503 if (object->uType && object->spell_id == SPELL_FIRE_FIRE_SPIKE && object->spell_caster_pid == (8 * (int)v3->uPlayerID) | OBJECT_Player) |
3507 ++HIDWORD(v733); | 3504 ++HIDWORD(v733); |
3508 /*v33 = (char *)&pSpriteObjects[0].field_48; | 3505 /*v33 = (char *)&pSpriteObjects[0].field_48; |
3509 v730 = uNumSpriteObjects; | 3506 v730 = uNumSpriteObjects; |
3510 do | 3507 do |
3511 { | 3508 { |
3524 } | 3521 } |
3525 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 3522 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
3526 goto play_sound_and_continue; | 3523 goto play_sound_and_continue; |
3527 | 3524 |
3528 a1.stru_24.Reset(); | 3525 a1.stru_24.Reset(); |
3529 a1.field_48 = v3->spellnum; | 3526 a1.spell_id = v3->spellnum; |
3530 a1.field_4C = v2; | 3527 a1.spell_level = v2; |
3531 a1.field_50 = v731; | 3528 a1.spell_skill = v731; |
3532 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); | 3529 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); |
3533 a1.vPosition.y = pParty->vPosition.y; | 3530 a1.vPosition.y = pParty->vPosition.y; |
3534 a1.vPosition.x = pParty->vPosition.x; | 3531 a1.vPosition.x = pParty->vPosition.x; |
3535 a1.uAttributes = 0; | 3532 a1.uAttributes = 0; |
3536 a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; | 3533 a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; |
3539 pParty->vPosition.y, | 3536 pParty->vPosition.y, |
3540 pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3); | 3537 pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3); |
3541 a1.uSpriteFrameID = 0; | 3538 a1.uSpriteFrameID = 0; |
3542 v34 = 8 * v3->uPlayerID; | 3539 v34 = 8 * v3->uPlayerID; |
3543 LOBYTE(v34) = v34 | OBJECT_Player; | 3540 LOBYTE(v34) = v34 | OBJECT_Player; |
3544 a1.field_58_pid = v34; | 3541 a1.spell_caster_pid = v34; |
3545 a1.field_5C = a2; | 3542 a1.field_5C = a2; |
3546 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance); | 3543 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance); |
3547 a1.uFacing = LOWORD(v715.uYawAngle); | 3544 a1.uFacing = LOWORD(v715.uYawAngle); |
3548 a1.uSoundID = LOWORD(v3->field_10); | 3545 a1.uSoundID = LOWORD(v3->field_10); |
3549 if ( pParty->bTurnBasedModeOn == 1 ) | 3546 if ( pParty->bTurnBasedModeOn == 1 ) |
3566 goto LABEL_1056; | 3563 goto LABEL_1056; |
3567 v699 = 0; | 3564 v699 = 0; |
3568 v698 = 0; | 3565 v698 = 0; |
3569 v697 = 0; | 3566 v697 = 0; |
3570 a1.stru_24.Reset(); | 3567 a1.stru_24.Reset(); |
3571 a1.field_48 = v3->spellnum; | 3568 a1.spell_id = v3->spellnum; |
3572 a1.field_4C = v2; | 3569 a1.spell_level = v2; |
3573 a1.field_50 = v731; | 3570 a1.spell_skill = v731; |
3574 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); | 3571 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); |
3575 a1.uAttributes = 0; | 3572 a1.uAttributes = 0; |
3576 a1.uSectorID = 0; | 3573 a1.uSectorID = 0; |
3577 a1.uSpriteFrameID = 0; | 3574 a1.uSpriteFrameID = 0; |
3578 v37 = v3->uPlayerID; | 3575 v37 = v3->uPlayerID; |
3579 a1.field_60_distance_related_prolly_lod = 0; | 3576 a1.field_60_distance_related_prolly_lod = 0; |
3580 v37 *= 8; | 3577 v37 *= 8; |
3581 LOBYTE(v37) = v37 | OBJECT_Player; | 3578 LOBYTE(v37) = v37 | OBJECT_Player; |
3582 a1.uFacing = 0; | 3579 a1.uFacing = 0; |
3583 a1.field_58_pid = v37; | 3580 a1.spell_caster_pid = v37; |
3584 v38 = a2 >> 3; | 3581 v38 = a2 >> 3; |
3585 a1.uSoundID = LOWORD(v3->field_10); | 3582 a1.uSoundID = LOWORD(v3->field_10); |
3586 v39 = a2 >> 3; | 3583 v39 = a2 >> 3; |
3587 a1.vPosition.x = pActors[v39].vPosition.x; | 3584 a1.vPosition.x = pActors[v39].vPosition.x; |
3588 v40 = pActors[v39].vPosition.y; | 3585 v40 = pActors[v39].vPosition.y; |
3605 pMiscTimer->uTotalGameTimeElapsed + 128, 0, 0, 0, 0); | 3602 pMiscTimer->uTotalGameTimeElapsed + 128, 0, 0, 0, 0); |
3606 v706 = 0; | 3603 v706 = 0; |
3607 v705 = 0; | 3604 v705 = 0; |
3608 v704 = 0; | 3605 v704 = 0; |
3609 a1.stru_24.Reset(); | 3606 a1.stru_24.Reset(); |
3610 a1.field_48 = v3->spellnum; | 3607 a1.spell_id = v3->spellnum; |
3611 a1.field_4C = v2; | 3608 a1.spell_level = v2; |
3612 a1.field_50 = v731; | 3609 a1.spell_skill = v731; |
3613 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); | 3610 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); |
3614 a1.uAttributes = 0; | 3611 a1.uAttributes = 0; |
3615 a1.uSectorID = 0; | 3612 a1.uSectorID = 0; |
3616 a1.uSpriteFrameID = 0; | 3613 a1.uSpriteFrameID = 0; |
3617 v44 = v3->uPlayerID; | 3614 v44 = v3->uPlayerID; |
3618 a1.field_60_distance_related_prolly_lod = 0; | 3615 a1.field_60_distance_related_prolly_lod = 0; |
3619 a1.uFacing = 0; | 3616 a1.uFacing = 0; |
3620 v44 *= 8; | 3617 v44 *= 8; |
3621 LOBYTE(v44) = v44 | OBJECT_Player; | 3618 LOBYTE(v44) = v44 | OBJECT_Player; |
3622 v38 = (signed int)v726; | 3619 v38 = (signed int)v726; |
3623 a1.field_58_pid = v44; | 3620 a1.spell_caster_pid = v44; |
3624 a1.uSoundID = LOWORD(v3->field_10); | 3621 a1.uSoundID = LOWORD(v3->field_10); |
3625 a1.vPosition.x = *(__int16 *)((char *)&pActors[0].vPosition.x + HIDWORD(v733)); | 3622 a1.vPosition.x = *(__int16 *)((char *)&pActors[0].vPosition.x + HIDWORD(v733)); |
3626 v45 = *(__int16 *)((char *)&pActors[0].vPosition.y + HIDWORD(v733)); | 3623 v45 = *(__int16 *)((char *)&pActors[0].vPosition.y + HIDWORD(v733)); |
3627 a1.vPosition.z = *(__int16 *)((char *)&pActors[0].vPosition.z + HIDWORD(v733)); | 3624 a1.vPosition.z = *(__int16 *)((char *)&pActors[0].vPosition.z + HIDWORD(v733)); |
3628 v46 = 8 * (int)v726; | 3625 v46 = 8 * (int)v726; |
3642 v693 = 0; | 3639 v693 = 0; |
3643 HIDWORD(v733) = (int)&pActors[a2 >> 3]; | 3640 HIDWORD(v733) = (int)&pActors[a2 >> 3]; |
3644 v692 = 0; | 3641 v692 = 0; |
3645 v691 = 0; | 3642 v691 = 0; |
3646 a1.stru_24.Reset(); | 3643 a1.stru_24.Reset(); |
3647 a1.field_48 = v3->spellnum; | 3644 a1.spell_id = v3->spellnum; |
3648 a1.field_4C = v2; | 3645 a1.spell_level = v2; |
3649 a1.field_50 = v731; | 3646 a1.spell_skill = v731; |
3650 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); | 3647 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); |
3651 a1.vPosition.x = *(short *)(HIDWORD(v733) + 142); | 3648 a1.vPosition.x = *(short *)(HIDWORD(v733) + 142); |
3652 a1.vPosition.y = *(short *)(HIDWORD(v733) + 144); | 3649 a1.vPosition.y = *(short *)(HIDWORD(v733) + 144); |
3653 v48 = *(short *)(HIDWORD(v733) + 138); | 3650 v48 = *(short *)(HIDWORD(v733) + 138); |
3654 a1.vPosition.z = *(short *)(HIDWORD(v733) + 138); | 3651 a1.vPosition.z = *(short *)(HIDWORD(v733) + 138); |
3655 a1.uAttributes = 0; | 3652 a1.uAttributes = 0; |
3656 a1.uSectorID = pIndoor->GetSector(a1.vPosition.x, a1.vPosition.y, v48); | 3653 a1.uSectorID = pIndoor->GetSector(a1.vPosition.x, a1.vPosition.y, v48); |
3657 a1.uSpriteFrameID = 0; | 3654 a1.uSpriteFrameID = 0; |
3658 v49 = 8 * v3->uPlayerID; | 3655 v49 = 8 * v3->uPlayerID; |
3659 LOBYTE(v49) = v49 | OBJECT_Player; | 3656 LOBYTE(v49) = v49 | OBJECT_Player; |
3660 a1.field_58_pid = v49; | 3657 a1.spell_caster_pid = v49; |
3661 a1.field_5C = a2; | 3658 a1.field_5C = a2; |
3662 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance); | 3659 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance); |
3663 a1.uFacing = LOWORD(v715.uYawAngle); | 3660 a1.uFacing = LOWORD(v715.uYawAngle); |
3664 LOWORD(v49) = LOWORD(v3->field_10); | 3661 LOWORD(v49) = LOWORD(v3->field_10); |
3665 LOBYTE(a1.uAttributes) |= 0x80u; | 3662 LOBYTE(a1.uAttributes) |= 0x80u; |
3675 v670 = (Vec3_int_ *)&v691; | 3672 v670 = (Vec3_int_ *)&v691; |
3676 v42 = (signed int)v726; | 3673 v42 = (signed int)v726; |
3677 LABEL_139: | 3674 LABEL_139: |
3678 DamageMonsterFromParty(8 * v42 | 2, v47, v670); | 3675 DamageMonsterFromParty(8 * v42 | 2, v47, v670); |
3679 goto LABEL_1056; | 3676 goto LABEL_1056; |
3677 | |
3678 | |
3680 case SPELL_FIRE_FIRE_BOLT: | 3679 case SPELL_FIRE_FIRE_BOLT: |
3681 case 6: | 3680 case SPELL_FIRE_FIREBALL: |
3682 case 11: | 3681 case SPELL_FIRE_INCINERATE: |
3683 case 18: | 3682 case SPELL_AIR_LIGHNING_BOLT: |
3684 case 26: | 3683 case SPELL_WATER_ICE_BOLT: |
3685 case 32: | 3684 case SPELL_WATER_ICE_BLAST: |
3686 case 34: | 3685 case SPELL_EARTH_STUN: |
3687 case 37: | 3686 case SPELL_EARTH_DEADLY_SWARM: |
3688 case 57: | 3687 case SPELL_MIND_MIND_BLAST: |
3689 case 65: | 3688 case SPELL_MIND_PSYCHIC_SHOCK: |
3690 case 70: | 3689 case SPELL_BODY_HARM: |
3691 case 78: | 3690 case SPELL_LIGHT_LIGHT_BOLT: |
3692 case 97: | 3691 case SPELL_DARK_DRAGON_BREATH: |
3693 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 3692 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
3694 goto play_sound_and_continue; | 3693 goto play_sound_and_continue; |
3695 a1.stru_24.Reset(); | 3694 a1.stru_24.Reset(); |
3696 a1.field_48 = v3->spellnum; | 3695 a1.spell_id = v3->spellnum; |
3697 a1.field_4C = v2; | 3696 a1.spell_level = v2; |
3698 a1.field_50 = v731; | 3697 a1.spell_skill = v731; |
3699 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); | 3698 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); |
3700 a1.vPosition.y = pParty->vPosition.y; | 3699 a1.vPosition.y = pParty->vPosition.y; |
3701 a1.vPosition.x = pParty->vPosition.x; | 3700 a1.vPosition.x = pParty->vPosition.x; |
3702 a1.uAttributes = 0; | 3701 a1.uAttributes = 0; |
3703 a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; | 3702 a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; |
3704 a1.uSectorID = pIndoor->GetSector( | 3703 if (uCurrentlyLoadedLevelType == LEVEL_Indoor) |
3705 pParty->vPosition.x, | 3704 a1.uSectorID = pIndoor->GetSector(pParty->vPosition.x, |
3706 pParty->vPosition.y, | 3705 pParty->vPosition.y, |
3707 pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3); | 3706 pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3); |
3707 else a1.uSectorID = 0; | |
3708 | |
3708 a1.uSpriteFrameID = 0; | 3709 a1.uSpriteFrameID = 0; |
3709 v50 = 8 * v3->uPlayerID; | 3710 a1.spell_caster_pid = (8 * v3->uPlayerID) | OBJECT_Player; |
3710 LOBYTE(v50) = v50 | OBJECT_Player; | |
3711 a1.field_58_pid = v50; | |
3712 a1.field_5C = a2; | 3711 a1.field_5C = a2; |
3713 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance); | 3712 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance); |
3714 a1.uFacing = LOWORD(v715.uYawAngle); | 3713 a1.uFacing = LOWORD(v715.uYawAngle); |
3715 a1.uSoundID = LOWORD(v3->field_10); | 3714 a1.uSoundID = LOWORD(v3->field_10); |
3716 if ( pParty->bTurnBasedModeOn == 1 ) | 3715 if ( pParty->bTurnBasedModeOn == 1 ) |
3717 LOBYTE(a1.uAttributes) |= 4u; | 3716 LOBYTE(a1.uAttributes) |= 4u; |
3718 if ( v3->spellnum == 18 ) | 3717 if ( v3->spellnum == 18 ) |
3719 LOBYTE(a1.uAttributes) |= 0x40u; | 3718 LOBYTE(a1.uAttributes) |= 0x40u; |
3720 goto LABEL_156; | 3719 goto LABEL_156; |
3720 | |
3721 | |
3722 | |
3721 case 29: | 3723 case 29: |
3722 case 39: | 3724 case 39: |
3723 case 76: | 3725 case 76: |
3724 case 90: | 3726 case 90: |
3725 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 3727 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
3726 goto play_sound_and_continue; | 3728 goto play_sound_and_continue; |
3727 a1.stru_24.Reset(); | 3729 a1.stru_24.Reset(); |
3728 a1.field_48 = v3->spellnum; | 3730 a1.spell_id = v3->spellnum; |
3729 a1.field_4C = v2; | 3731 a1.spell_level = v2; |
3730 a1.field_50 = v731; | 3732 a1.spell_skill = v731; |
3731 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); | 3733 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); |
3732 v51 = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 2; | 3734 v51 = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 2; |
3733 a1.vPosition.y = pParty->vPosition.y; | 3735 a1.vPosition.y = pParty->vPosition.y; |
3734 v671 = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 2; | 3736 v671 = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 2; |
3735 v660 = pParty->vPosition.y; | 3737 v660 = pParty->vPosition.y; |
3764 v672 = 0; | 3766 v672 = 0; |
3765 *(short *)(v55 + 150) = 0; | 3767 *(short *)(v55 + 150) = 0; |
3766 v661 = (Actor *)v55; | 3768 v661 = (Actor *)v55; |
3767 goto LABEL_165; | 3769 goto LABEL_165; |
3768 case 35: | 3770 case 35: |
3769 if ( v12 == 2 ) | 3771 if ( v731 == 2 ) |
3770 { | 3772 { |
3771 v57 = 300 * v2; | 3773 v57 = 300 * v2; |
3772 } | 3774 } |
3773 else | 3775 else |
3774 { | 3776 { |
3775 if ( v12 == 3 ) | 3777 if ( v731 == 3 ) |
3776 { | 3778 { |
3777 amount = 4; | 3779 amount = 4; |
3778 v57 = 300 * v2; | 3780 v57 = 300 * v2; |
3779 goto LABEL_174; | 3781 goto LABEL_174; |
3780 } | 3782 } |
3781 if ( v12 == 4 ) | 3783 if ( v731 == 4 ) |
3782 { | 3784 { |
3783 v57 = 300 * v2; | 3785 v57 = 300 * v2; |
3784 amount = 8; | 3786 amount = 8; |
3785 goto LABEL_174; | 3787 goto LABEL_174; |
3786 } | 3788 } |
3834 //((SpellBuff *)((char *)&pActors[0].pActorBuffs[1] + v730))->Apply( | 3836 //((SpellBuff *)((char *)&pActors[0].pActorBuffs[1] + v730))->Apply( |
3835 pActors[a2 >> 3].pActorBuffs[1].Apply( | 3837 pActors[a2 >> 3].pActorBuffs[1].Apply( |
3836 pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335), | 3838 pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335), |
3837 v731, 0, 0, 0); | 3839 v731, 0, 0, 0); |
3838 a1.stru_24.Reset(); | 3840 a1.stru_24.Reset(); |
3839 a1.field_48 = v3->spellnum; | 3841 a1.spell_id = v3->spellnum; |
3840 a1.field_4C = v2; | 3842 a1.spell_level = v2; |
3841 a1.field_50 = v731; | 3843 a1.spell_skill = v731; |
3842 v60 = pObjectList->ObjectIDByItemID(a1.uType); | 3844 v60 = pObjectList->ObjectIDByItemID(a1.uType); |
3843 v61 = a2 >> 3; | 3845 v61 = a2 >> 3; |
3844 goto LABEL_1086; | 3846 goto LABEL_1086; |
3845 case 92: | 3847 case 92: |
3846 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 3848 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
3856 pParty->vPosition.y, | 3858 pParty->vPosition.y, |
3857 pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3); | 3859 pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3); |
3858 a1.uSpriteFrameID = 0; | 3860 a1.uSpriteFrameID = 0; |
3859 v62 = 8 * v3->uPlayerID; | 3861 v62 = 8 * v3->uPlayerID; |
3860 LOBYTE(v62) = v62 | OBJECT_Player; | 3862 LOBYTE(v62) = v62 | OBJECT_Player; |
3861 a1.field_58_pid = v62; | 3863 a1.spell_caster_pid = v62; |
3862 a1.field_5C = a2; | 3864 a1.field_5C = a2; |
3863 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance); | 3865 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance); |
3864 a1.uFacing = LOWORD(v715.uYawAngle); | 3866 a1.uFacing = LOWORD(v715.uYawAngle); |
3865 a1.uSoundID = LOWORD(v3->field_10); | 3867 a1.uSoundID = LOWORD(v3->field_10); |
3866 a1.field_50 = v731; | 3868 a1.spell_skill = v731; |
3867 a1.field_48 = 3; | 3869 a1.spell_id = SPELL_FIRE_PROTECTION_FROM_FIRE; |
3868 a1.field_4C = 300 * v2; | 3870 a1.spell_level = 300 * v2; |
3869 goto LABEL_154; | 3871 goto LABEL_154; |
3870 case 4: | 3872 case 4: |
3871 v63 = v12 - 1; | 3873 v63 = v731 - 1; |
3872 if ( !v63 ) | 3874 if ( !v63 ) |
3873 { | 3875 { |
3874 amount = 10; | 3876 amount = 10; |
3875 goto LABEL_195; | 3877 goto LABEL_195; |
3876 } | 3878 } |
3985 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed | 3987 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed |
3986 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 3988 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); |
3987 goto LABEL_203; | 3989 goto LABEL_203; |
3988 | 3990 |
3989 case SPELL_BODY_REGENERATION: | 3991 case SPELL_BODY_REGENERATION: |
3990 v70 = v12 - 1; | 3992 v70 = v731 - 1; |
3991 LODWORD(v733) = 3600 * v2; | 3993 LODWORD(v733) = 3600 * v2; |
3992 if ( v70 && (v71 = v70 - 1) != 0 ) | 3994 if ( v70 && (v71 = v70 - 1) != 0 ) |
3993 { | 3995 { |
3994 v72 = v71 - 1; | 3996 v72 = v71 - 1; |
3995 if ( v72 ) | 3997 if ( v72 ) |
4018 case SPELL_AIR_PROTECTION_FROM_AIR: | 4020 case SPELL_AIR_PROTECTION_FROM_AIR: |
4019 case SPELL_WATER_PROTECTION_FROM_WATER: | 4021 case SPELL_WATER_PROTECTION_FROM_WATER: |
4020 case SPELL_EARTH_PROTECTION_FROM_EARTH: | 4022 case SPELL_EARTH_PROTECTION_FROM_EARTH: |
4021 case SPELL_MIND_PROTECTION_FROM_MIND: | 4023 case SPELL_MIND_PROTECTION_FROM_MIND: |
4022 case SPELL_BODY_PROTECTION_FROM_BODY: | 4024 case SPELL_BODY_PROTECTION_FROM_BODY: |
4023 v76 = v12 - 1; | 4025 v76 = v731 - 1; |
4024 LODWORD(v733) = 3600 * v2; | 4026 LODWORD(v733) = 3600 * v2; |
4025 if ( v76 ) | 4027 if ( v76 ) |
4026 { | 4028 { |
4027 v77 = v76 - 1; | 4029 v77 = v76 - 1; |
4028 if ( v77 ) | 4030 if ( v77 ) |
4088 pParty->pPartyBuffs[LODWORD(v725)].Apply(pParty->uTimePlayed + (signed int)(signed __int64)v90, v731, amount, 0, 0); | 4090 pParty->pPartyBuffs[LODWORD(v725)].Apply(pParty->uTimePlayed + (signed int)(signed __int64)v90, v731, amount, 0, 0); |
4089 LODWORD(v727) = 1; | 4091 LODWORD(v727) = 1; |
4090 goto play_sound_and_continue; | 4092 goto play_sound_and_continue; |
4091 | 4093 |
4092 case SPELL_FIRE_HASTE: | 4094 case SPELL_FIRE_HASTE: |
4093 if ( v12 <= 0 ) | 4095 if ( v731 <= 0 ) |
4094 goto LABEL_254; | 4096 goto LABEL_254; |
4095 if ( v12 <= 2 ) | 4097 if ( v731 <= 2 ) |
4096 { | 4098 { |
4097 v91 = 60 * (v2 + 60); | 4099 v91 = 60 * (v2 + 60); |
4098 } | 4100 } |
4099 else | 4101 else |
4100 { | 4102 { |
4101 if ( v12 == 3 ) | 4103 if ( v731 == 3 ) |
4102 { | 4104 { |
4103 v91 = 180 * (v2 + 20); | 4105 v91 = 180 * (v2 + 20); |
4104 } | 4106 } |
4105 else | 4107 else |
4106 { | 4108 { |
4107 if ( v12 != 4 ) | 4109 if ( v731 != 4 ) |
4108 goto LABEL_254; | 4110 goto LABEL_254; |
4109 v91 = 240 * (v2 + 15); | 4111 v91 = 240 * (v2 + 15); |
4110 } | 4112 } |
4111 } | 4113 } |
4112 LODWORD(v733) = v91; | 4114 LODWORD(v733) = v91; |
4134 } | 4136 } |
4135 } | 4137 } |
4136 goto play_sound_and_continue; | 4138 goto play_sound_and_continue; |
4137 | 4139 |
4138 case SPELL_SPIRIT_BLESS: | 4140 case SPELL_SPIRIT_BLESS: |
4139 v101 = v12 - 1; | 4141 v101 = v731 - 1; |
4140 if ( v101 && (v102 = v101 - 1) != 0 ) | 4142 if ( v101 && (v102 = v101 - 1) != 0 ) |
4141 { | 4143 { |
4142 v103 = v102 - 1; | 4144 v103 = v102 - 1; |
4143 if ( v103 ) | 4145 if ( v103 ) |
4144 { | 4146 { |
4232 v703 = 0; | 4234 v703 = 0; |
4233 v702 = 0; | 4235 v702 = 0; |
4234 v701 = 0; | 4236 v701 = 0; |
4235 a1.stru_24.Reset(); | 4237 a1.stru_24.Reset(); |
4236 v119 = HIDWORD(v733); | 4238 v119 = HIDWORD(v733); |
4237 a1.field_48 = *(int *)HIDWORD(v733); | 4239 a1.spell_id = *(int *)HIDWORD(v733); |
4238 a1.field_4C = v723; | 4240 a1.spell_level = v723; |
4239 a1.field_50 = v731; | 4241 a1.spell_skill = v731; |
4240 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); | 4242 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); |
4241 a1.uAttributes = 0; | 4243 a1.uAttributes = 0; |
4242 a1.uSectorID = 0; | 4244 a1.uSectorID = 0; |
4243 a1.uSpriteFrameID = 0; | 4245 a1.uSpriteFrameID = 0; |
4244 v120 = 8 * *(short *)(v119 + 2); | 4246 v120 = 8 * *(short *)(v119 + 2); |
4245 LOBYTE(v120) = v120 | OBJECT_Player; | 4247 LOBYTE(v120) = v120 | OBJECT_Player; |
4246 a1.field_60_distance_related_prolly_lod = 0; | 4248 a1.field_60_distance_related_prolly_lod = 0; |
4247 a1.field_58_pid = v120; | 4249 a1.spell_caster_pid = v120; |
4248 a1.uFacing = 0; | 4250 a1.uFacing = 0; |
4249 a1.uSoundID = *(short *)(v119 + 16); | 4251 a1.uSoundID = *(short *)(v119 + 16); |
4250 a1.vPosition.x = v112->vPosition.x; | 4252 a1.vPosition.x = v112->vPosition.x; |
4251 a1.vPosition.y = v112->vPosition.y; | 4253 a1.vPosition.y = v112->vPosition.y; |
4252 v726 = (Player *)v112->uActorHeight; | 4254 v726 = (Player *)v112->uActorHeight; |
4269 goto play_sound_and_continue; | 4271 goto play_sound_and_continue; |
4270 | 4272 |
4271 case SPELL_AIR_SHIELD: | 4273 case SPELL_AIR_SHIELD: |
4272 case SPELL_EARTH_STONESKIN: | 4274 case SPELL_EARTH_STONESKIN: |
4273 case SPELL_SPIRIT_HEROISM: | 4275 case SPELL_SPIRIT_HEROISM: |
4274 v123 = v12 - 1; | 4276 v123 = v731 - 1; |
4275 if ( v123 && (v124 = v123 - 1) != 0 ) | 4277 if ( v123 && (v124 = v123 - 1) != 0 ) |
4276 { | 4278 { |
4277 v125 = v124 - 1; | 4279 v125 = v124 - 1; |
4278 if ( v125 ) | 4280 if ( v125 ) |
4279 { | 4281 { |
4326 pParty->pPartyBuffs[LODWORD(v725)].Apply(pParty->uTimePlayed + (signed int)(signed __int64)v90, v731, amount, 0, 0); | 4328 pParty->pPartyBuffs[LODWORD(v725)].Apply(pParty->uTimePlayed + (signed int)(signed __int64)v90, v731, amount, 0, 0); |
4327 LODWORD(v727) = v83; | 4329 LODWORD(v727) = v83; |
4328 goto play_sound_and_continue; | 4330 goto play_sound_and_continue; |
4329 | 4331 |
4330 case SPELL_FIRE_IMMOLATION: | 4332 case SPELL_FIRE_IMMOLATION: |
4331 v138 = v12 - 2; | 4333 v138 = v731 - 2; |
4332 if ( v138 && (v139 = v138 - 1) != 0 && v139 == 1 ) | 4334 if ( v138 && (v139 = v138 - 1) != 0 && v139 == 1 ) |
4333 v140 = 600 * v2; | 4335 v140 = 600 * v2; |
4334 else | 4336 else |
4335 v140 = 60 * v2; | 4337 v140 = 60 * v2; |
4336 LODWORD(v733) = v140; | 4338 LODWORD(v733) = v140; |
4346 | 4348 |
4347 pParty->pPartyBuffs[PARTY_BUFF_IMMOLATION].Apply(pParty->uTimePlayed + (signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335), v731, v2, 0, 0); | 4349 pParty->pPartyBuffs[PARTY_BUFF_IMMOLATION].Apply(pParty->uTimePlayed + (signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335), v731, v2, 0, 0); |
4348 goto LABEL_1056; | 4350 goto LABEL_1056; |
4349 | 4351 |
4350 case 9: | 4352 case 9: |
4351 v149 = v12 - 1; | 4353 v149 = v731 - 1; |
4352 if ( v149 && (v150 = v149 - 1) != 0 && (v151 = v150 - 1) != 0 ) | 4354 if ( v149 && (v150 = v149 - 1) != 0 && (v151 = v150 - 1) != 0 ) |
4353 { | 4355 { |
4354 if ( v151 == 1 ) | 4356 if ( v151 == 1 ) |
4355 _this = (ItemGen *)20; | 4357 _this = (ItemGen *)20; |
4356 } | 4358 } |
4415 v687 = __PAIR__( | 4417 v687 = __PAIR__( |
4416 stru_5C6E00->Atan2(x, (signed __int64)*((float *)&v733 + 1)), | 4418 stru_5C6E00->Atan2(x, (signed __int64)*((float *)&v733 + 1)), |
4417 stru_5C6E00->Atan2((signed __int64)v718, (signed __int64)*(float *)&v721)); | 4419 stru_5C6E00->Atan2((signed __int64)v718, (signed __int64)*(float *)&v721)); |
4418 } | 4420 } |
4419 a1.stru_24.Reset(); | 4421 a1.stru_24.Reset(); |
4420 a1.field_48 = v3->spellnum; | 4422 a1.spell_id = v3->spellnum; |
4421 a1.field_4C = v2; | 4423 a1.spell_level = v2; |
4422 a1.field_50 = v731; | 4424 a1.spell_skill = v731; |
4423 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); | 4425 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); |
4424 a1.uAttributes = 0; | 4426 a1.uAttributes = 0; |
4425 a1.vPosition.x = uRequiredMana; | 4427 a1.vPosition.x = uRequiredMana; |
4426 a1.vPosition.y = LODWORD(v727); | 4428 a1.vPosition.y = LODWORD(v727); |
4427 a1.uSectorID = 0; | 4429 a1.uSectorID = 0; |
4428 a1.vPosition.z = a2 + v713; | 4430 a1.vPosition.z = a2 + v713; |
4429 a1.uSpriteFrameID = 0; | 4431 a1.uSpriteFrameID = 0; |
4430 a1.field_58_pid = 8 * v3->uPlayerID | OBJECT_Player; | 4432 a1.spell_caster_pid = 8 * v3->uPlayerID | OBJECT_Player; |
4431 a1.field_5C = v730; | 4433 a1.field_5C = v730; |
4432 a1.field_60_distance_related_prolly_lod = stru_50C198._427546(a2 + 2500); | 4434 a1.field_60_distance_related_prolly_lod = stru_50C198._427546(a2 + 2500); |
4433 a1.uFacing = v687; | 4435 a1.uFacing = v687; |
4434 a1.uSoundID = LOWORD(v3->field_10); | 4436 a1.uSoundID = LOWORD(v3->field_10); |
4435 if ( pParty->bTurnBasedModeOn == 1 ) | 4437 if ( pParty->bTurnBasedModeOn == 1 ) |
4463 v726 = (Player *)sub_46A6AC((int)dword_50BF30, 100, 4096); | 4465 v726 = (Player *)sub_46A6AC((int)dword_50BF30, 100, 4096); |
4464 v700.z = 0; | 4466 v700.z = 0; |
4465 v700.y = 0; | 4467 v700.y = 0; |
4466 v700.x = 0; | 4468 v700.x = 0; |
4467 a1.stru_24.Reset(); | 4469 a1.stru_24.Reset(); |
4468 a1.field_48 = v3->spellnum; | 4470 a1.spell_id = v3->spellnum; |
4469 a1.field_4C = v2; | 4471 a1.spell_level = v2; |
4470 a1.field_50 = v731; | 4472 a1.spell_skill = v731; |
4471 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); | 4473 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); |
4472 a1.uAttributes = 0; | 4474 a1.uAttributes = 0; |
4473 a1.uSectorID = 0; | 4475 a1.uSectorID = 0; |
4474 a1.uSpriteFrameID = 0; | 4476 a1.uSpriteFrameID = 0; |
4475 v161 = v3->uPlayerID; | 4477 v161 = v3->uPlayerID; |
4476 a1.field_60_distance_related_prolly_lod = 0; | 4478 a1.field_60_distance_related_prolly_lod = 0; |
4477 a1.uFacing = 0; | 4479 a1.uFacing = 0; |
4478 v161 *= 8; | 4480 v161 *= 8; |
4479 LOBYTE(v161) = v161 | OBJECT_Player; | 4481 LOBYTE(v161) = v161 | OBJECT_Player; |
4480 a1.field_58_pid = v161; | 4482 a1.spell_caster_pid = v161; |
4481 a1.uSoundID = LOWORD(v3->field_10); | 4483 a1.uSoundID = LOWORD(v3->field_10); |
4482 a2 = 0; | 4484 a2 = 0; |
4483 if ( (signed int)v726 > 0 ) | 4485 if ( (signed int)v726 > 0 ) |
4484 { | 4486 { |
4485 do | 4487 do |
4519 | 4521 |
4520 pParty->pPartyBuffs[PARTY_BUFF_WIZARD_EYE].Apply(pParty->uTimePlayed + (signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335), v731, 0, 0, 0); | 4522 pParty->pPartyBuffs[PARTY_BUFF_WIZARD_EYE].Apply(pParty->uTimePlayed + (signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335), v731, 0, 0, 0); |
4521 goto LABEL_1056; | 4523 goto LABEL_1056; |
4522 | 4524 |
4523 case SPELL_AIR_FEATHER_FALL: | 4525 case SPELL_AIR_FEATHER_FALL: |
4524 v170 = v12 - 1; | 4526 v170 = v731 - 1; |
4525 if ( !v170 ) | 4527 if ( !v170 ) |
4526 { | 4528 { |
4527 v173 = 300 * v2; | 4529 v173 = 300 * v2; |
4528 goto LABEL_353; | 4530 goto LABEL_353; |
4529 } | 4531 } |
4555 pParty->pPartyBuffs[PARTY_BUFF_FEATHER_FALL].Apply(pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335), v731, 0, 0, 0); | 4557 pParty->pPartyBuffs[PARTY_BUFF_FEATHER_FALL].Apply(pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335), v731, 0, 0, 0); |
4556 LODWORD(v727) = v83; | 4558 LODWORD(v727) = v83; |
4557 goto play_sound_and_continue; | 4559 goto play_sound_and_continue; |
4558 | 4560 |
4559 case SPELL_AIR_SPARKS: | 4561 case SPELL_AIR_SPARKS: |
4560 v184 = v12 - 1; | 4562 v184 = v731 - 1; |
4561 if ( v184 ) | 4563 if ( v184 ) |
4562 { | 4564 { |
4563 v185 = v184 - 1; | 4565 v185 = v184 - 1; |
4564 if ( v185 ) | 4566 if ( v185 ) |
4565 { | 4567 { |
4586 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 4588 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
4587 goto play_sound_and_continue; | 4589 goto play_sound_and_continue; |
4588 v726 = (Player *)((signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360); | 4590 v726 = (Player *)((signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360); |
4589 v732 = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360 / (amount - 1); | 4591 v732 = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360 / (amount - 1); |
4590 a1.stru_24.Reset(); | 4592 a1.stru_24.Reset(); |
4591 a1.field_48 = v3->spellnum; | 4593 a1.spell_id = v3->spellnum; |
4592 a1.field_4C = v2; | 4594 a1.spell_level = v2; |
4593 a1.field_50 = v731; | 4595 a1.spell_skill = v731; |
4594 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); | 4596 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); |
4595 a1.vPosition.y = pParty->vPosition.y; | 4597 a1.vPosition.y = pParty->vPosition.y; |
4596 a1.vPosition.x = pParty->vPosition.x; | 4598 a1.vPosition.x = pParty->vPosition.x; |
4597 a1.uAttributes = 0; | 4599 a1.uAttributes = 0; |
4598 a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; | 4600 a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; |
4601 pParty->vPosition.y, | 4603 pParty->vPosition.y, |
4602 pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3); | 4604 pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3); |
4603 a1.uSpriteFrameID = 0; | 4605 a1.uSpriteFrameID = 0; |
4604 v187 = 8 * v3->uPlayerID; | 4606 v187 = 8 * v3->uPlayerID; |
4605 LOBYTE(v187) = v187 | OBJECT_Player; | 4607 LOBYTE(v187) = v187 | OBJECT_Player; |
4606 a1.field_58_pid = v187; | 4608 a1.spell_caster_pid = v187; |
4607 a1.field_5C = a2; | 4609 a1.field_5C = a2; |
4608 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance); | 4610 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance); |
4609 a1.uSoundID = LOWORD(v3->field_10); | 4611 a1.uSoundID = LOWORD(v3->field_10); |
4610 if ( pParty->bTurnBasedModeOn == 1 ) | 4612 if ( pParty->bTurnBasedModeOn == 1 ) |
4611 LOBYTE(a1.uAttributes) |= 4u; | 4613 LOBYTE(a1.uAttributes) |= 4u; |
4640 BYTE1(pParty->uFlags) |= 1u; | 4642 BYTE1(pParty->uFlags) |= 1u; |
4641 pParty->uFallSpeed = 1000; | 4643 pParty->uFallSpeed = 1000; |
4642 goto LABEL_1056; | 4644 goto LABEL_1056; |
4643 | 4645 |
4644 case SPELL_AIR_INVISIBILITY: | 4646 case SPELL_AIR_INVISIBILITY: |
4645 v192 = v12 - 1; | 4647 v192 = v731 - 1; |
4646 if ( !v192 ) | 4648 if ( !v192 ) |
4647 { | 4649 { |
4648 amount = v2; | 4650 amount = v2; |
4649 goto LABEL_391; | 4651 goto LABEL_391; |
4650 } | 4652 } |
4782 v685 = __PAIR__( | 4784 v685 = __PAIR__( |
4783 stru_5C6E00->Atan2(v684, (signed __int64)*((float *)&v733 + 1)), | 4785 stru_5C6E00->Atan2(v684, (signed __int64)*((float *)&v733 + 1)), |
4784 stru_5C6E00->Atan2((signed __int64)v727, (signed __int64)*(float *)&uRequiredMana)); | 4786 stru_5C6E00->Atan2((signed __int64)v727, (signed __int64)*(float *)&uRequiredMana)); |
4785 } | 4787 } |
4786 a1.stru_24.Reset(); | 4788 a1.stru_24.Reset(); |
4787 a1.field_48 = v3->spellnum; | 4789 a1.spell_id = v3->spellnum; |
4788 a1.field_4C = v2; | 4790 a1.spell_level = v2; |
4789 a1.field_50 = v731; | 4791 a1.spell_skill = v731; |
4790 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); | 4792 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); |
4791 a1.uAttributes = 0; | 4793 a1.uAttributes = 0; |
4792 a1.vPosition.x = LODWORD(v718); | 4794 a1.vPosition.x = LODWORD(v718); |
4793 a1.vPosition.y = v713; | 4795 a1.vPosition.y = v713; |
4794 a1.uSectorID = 0; | 4796 a1.uSectorID = 0; |
4795 a1.vPosition.z = (int)((char *)_this + LODWORD(v725)); | 4797 a1.vPosition.z = (int)((char *)_this + LODWORD(v725)); |
4796 a1.uSpriteFrameID = 0; | 4798 a1.uSpriteFrameID = 0; |
4797 a1.field_58_pid = 8 * v3->uPlayerID | OBJECT_Player; | 4799 a1.spell_caster_pid = 8 * v3->uPlayerID | OBJECT_Player; |
4798 a1.field_5C = v730; | 4800 a1.field_5C = v730; |
4799 a1.field_60_distance_related_prolly_lod = stru_50C198._427546((int)&_this[69].uNumCharges); | 4801 a1.field_60_distance_related_prolly_lod = stru_50C198._427546((int)&_this[69].uNumCharges); |
4800 a1.uFacing = v685; | 4802 a1.uFacing = v685; |
4801 a1.uSoundID = LOWORD(v3->field_10); | 4803 a1.uSoundID = LOWORD(v3->field_10); |
4802 if ( pParty->bTurnBasedModeOn == 1 ) | 4804 if ( pParty->bTurnBasedModeOn == 1 ) |
4814 HIDWORD(v733) = (unsigned __int64)(v218 % 1024) - 512; | 4816 HIDWORD(v733) = (unsigned __int64)(v218 % 1024) - 512; |
4815 } | 4817 } |
4816 while ( !v14 ); | 4818 while ( !v14 ); |
4817 goto LABEL_1056; | 4819 goto LABEL_1056; |
4818 case 23: | 4820 case 23: |
4819 v219 = v12 - 2; | 4821 v219 = v731 - 2; |
4820 if ( v219 ) | 4822 if ( v219 ) |
4821 { | 4823 { |
4822 v220 = v219 - 1; | 4824 v220 = v219 - 1; |
4823 if ( v220 ) | 4825 if ( v220 ) |
4824 { | 4826 { |
4844 goto play_sound_and_continue; | 4846 goto play_sound_and_continue; |
4845 v222 = (char *)pParty->pPlayers; | 4847 v222 = (char *)pParty->pPlayers; |
4846 HIDWORD(v733) = (int)(char *)&pParty + 2508; | 4848 HIDWORD(v733) = (int)(char *)&pParty + 2508; |
4847 break; | 4849 break; |
4848 case 24: | 4850 case 24: |
4849 v224 = v12 - 2; | 4851 v224 = v731 - 2; |
4850 if ( v224 ) | 4852 if ( v224 ) |
4851 { | 4853 { |
4852 v225 = v224 - 1; | 4854 v225 = v224 - 1; |
4853 if ( v225 ) | 4855 if ( v225 ) |
4854 { | 4856 { |
4871 HIDWORD(v733) = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360; | 4873 HIDWORD(v733) = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360; |
4872 if ( amount == 1 ) | 4874 if ( amount == 1 ) |
4873 { | 4875 { |
4874 LABEL_152: | 4876 LABEL_152: |
4875 a1.stru_24.Reset(); | 4877 a1.stru_24.Reset(); |
4876 a1.field_48 = v3->spellnum; | 4878 a1.spell_id = v3->spellnum; |
4877 a1.field_50 = v731; | 4879 a1.spell_skill = v731; |
4878 a1.field_4C = v2; | 4880 a1.spell_level = v2; |
4879 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); | 4881 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); |
4880 a1.vPosition.y = pParty->vPosition.y; | 4882 a1.vPosition.y = pParty->vPosition.y; |
4881 v51 = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; | 4883 v51 = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; |
4882 v671 = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; | 4884 v671 = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; |
4883 v660 = pParty->vPosition.y; | 4885 v660 = pParty->vPosition.y; |
4888 v52 = pIndoor->GetSector(pParty->vPosition.x, v660, v671); | 4890 v52 = pIndoor->GetSector(pParty->vPosition.x, v660, v671); |
4889 a1.uSpriteFrameID = 0; | 4891 a1.uSpriteFrameID = 0; |
4890 a1.uSectorID = v52; | 4892 a1.uSectorID = v52; |
4891 v53 = 8 * v3->uPlayerID; | 4893 v53 = 8 * v3->uPlayerID; |
4892 LOBYTE(v53) = v53 | OBJECT_Player; | 4894 LOBYTE(v53) = v53 | OBJECT_Player; |
4893 a1.field_58_pid = v53; | 4895 a1.spell_caster_pid = v53; |
4894 a1.field_5C = a2; | 4896 a1.field_5C = a2; |
4895 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance); | 4897 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance); |
4896 a1.uFacing = LOWORD(v715.uYawAngle); | 4898 a1.uFacing = LOWORD(v715.uYawAngle); |
4897 a1.uSoundID = LOWORD(v3->field_10); | 4899 a1.uSoundID = LOWORD(v3->field_10); |
4898 LABEL_154: | 4900 LABEL_154: |
4909 } | 4911 } |
4910 else | 4912 else |
4911 { | 4913 { |
4912 v732 = SHIDWORD(v733) / (amount - 1); | 4914 v732 = SHIDWORD(v733) / (amount - 1); |
4913 a1.stru_24.Reset(); | 4915 a1.stru_24.Reset(); |
4914 a1.field_48 = v3->spellnum; | 4916 a1.spell_id = v3->spellnum; |
4915 a1.field_4C = v2; | 4917 a1.spell_level = v2; |
4916 a1.field_50 = v731; | 4918 a1.spell_skill = v731; |
4917 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); | 4919 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); |
4918 a1.vPosition.y = pParty->vPosition.y; | 4920 a1.vPosition.y = pParty->vPosition.y; |
4919 a1.vPosition.x = pParty->vPosition.x; | 4921 a1.vPosition.x = pParty->vPosition.x; |
4920 a1.uAttributes = 0; | 4922 a1.uAttributes = 0; |
4921 a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; | 4923 a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; |
4924 pParty->vPosition.y, | 4926 pParty->vPosition.y, |
4925 pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3); | 4927 pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3); |
4926 a1.uSpriteFrameID = 0; | 4928 a1.uSpriteFrameID = 0; |
4927 v226 = 8 * v3->uPlayerID; | 4929 v226 = 8 * v3->uPlayerID; |
4928 LOBYTE(v226) = v226 | OBJECT_Player; | 4930 LOBYTE(v226) = v226 | OBJECT_Player; |
4929 a1.field_58_pid = v226; | 4931 a1.spell_caster_pid = v226; |
4930 a1.field_5C = a2; | 4932 a1.field_5C = a2; |
4931 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance); | 4933 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance); |
4932 a1.uSoundID = LOWORD(v3->field_10); | 4934 a1.uSoundID = LOWORD(v3->field_10); |
4933 if ( pParty->bTurnBasedModeOn == 1 ) | 4935 if ( pParty->bTurnBasedModeOn == 1 ) |
4934 LOBYTE(a1.uAttributes) |= 4u; | 4936 LOBYTE(a1.uAttributes) |= 4u; |
5457 goto LABEL_1055; | 5459 goto LABEL_1055; |
5458 case SPELL_WATER_TOWN_PORTAL: | 5460 case SPELL_WATER_TOWN_PORTAL: |
5459 amount = 10 * v2; | 5461 amount = 10 * v2; |
5460 if ( pPlayer->sMana < (signed int)uRequiredMana ) | 5462 if ( pPlayer->sMana < (signed int)uRequiredMana ) |
5461 goto play_sound_and_continue; | 5463 goto play_sound_and_continue; |
5462 if ( pParty->uFlags & (PARTY_FLAGS_1_ALERT_RED | PARTY_FLAGS_1_ALERT_YELLOW) && v12 != 4 || rand() % 100 >= amount && v731 != 4 ) | 5464 if ( pParty->uFlags & (PARTY_FLAGS_1_ALERT_RED | PARTY_FLAGS_1_ALERT_YELLOW) && v731 != 4 || rand() % 100 >= amount && v731 != 4 ) |
5463 { | 5465 { |
5464 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed | 5466 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed |
5465 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 5467 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); |
5466 goto LABEL_203; | 5468 goto LABEL_203; |
5467 } | 5469 } |
5489 dword_506338 = v3->spellnum; | 5491 dword_506338 = v3->spellnum; |
5490 LOBYTE(v3->field_8) |= 0x20u; | 5492 LOBYTE(v3->field_8) |= 0x20u; |
5491 } | 5493 } |
5492 goto play_sound_and_continue; | 5494 goto play_sound_and_continue; |
5493 case 40: | 5495 case 40: |
5494 v320 = v12 - 2; | 5496 v320 = v731 - 2; |
5495 if ( !v320 ) | 5497 if ( !v320 ) |
5496 goto LABEL_632; | 5498 goto LABEL_632; |
5497 v321 = v320 - 1; | 5499 v321 = v320 - 1; |
5498 if ( v321 ) | 5500 if ( v321 ) |
5499 { | 5501 { |
5522 goto LABEL_640; | 5524 goto LABEL_640; |
5523 case 41: | 5525 case 41: |
5524 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 5526 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
5525 goto play_sound_and_continue; | 5527 goto play_sound_and_continue; |
5526 a1.stru_24.Reset(); | 5528 a1.stru_24.Reset(); |
5527 a1.field_48 = v3->spellnum; | 5529 a1.spell_id = v3->spellnum; |
5528 a1.field_4C = v2; | 5530 a1.spell_level = v2; |
5529 a1.field_50 = v731; | 5531 a1.spell_skill = v731; |
5530 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); | 5532 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); |
5531 a1.vPosition.y = pParty->vPosition.y; | 5533 a1.vPosition.y = pParty->vPosition.y; |
5532 a1.vPosition.x = pParty->vPosition.x; | 5534 a1.vPosition.x = pParty->vPosition.x; |
5533 a1.uAttributes = 0; | 5535 a1.uAttributes = 0; |
5534 a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; | 5536 a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; |
5537 pParty->vPosition.y, | 5539 pParty->vPosition.y, |
5538 pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3); | 5540 pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3); |
5539 a1.uSpriteFrameID = 0; | 5541 a1.uSpriteFrameID = 0; |
5540 v326 = 8 * v3->uPlayerID; | 5542 v326 = 8 * v3->uPlayerID; |
5541 LOBYTE(v326) = v326 | OBJECT_Player; | 5543 LOBYTE(v326) = v326 | OBJECT_Player; |
5542 a1.field_58_pid = v326; | 5544 a1.spell_caster_pid = v326; |
5543 a1.field_5C = a2; | 5545 a1.field_5C = a2; |
5544 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance); | 5546 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance); |
5545 a1.uFacing = LOWORD(pParty->sRotationY); | 5547 a1.uFacing = LOWORD(pParty->sRotationY); |
5546 a1.uSoundID = LOWORD(v3->field_10); | 5548 a1.uSoundID = LOWORD(v3->field_10); |
5547 if ( pParty->bTurnBasedModeOn == 1 ) | 5549 if ( pParty->bTurnBasedModeOn == 1 ) |
5559 } | 5561 } |
5560 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 5562 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
5561 goto play_sound_and_continue; | 5563 goto play_sound_and_continue; |
5562 a1.uType = 4090; | 5564 a1.uType = 4090; |
5563 a1.stru_24.Reset(); | 5565 a1.stru_24.Reset(); |
5564 a1.field_48 = v3->spellnum; | 5566 a1.spell_id = v3->spellnum; |
5565 a1.field_4C = v2; | 5567 a1.spell_level = v2; |
5566 a1.field_50 = v731; | 5568 a1.spell_skill = v731; |
5567 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); | 5569 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); |
5568 a1.vPosition.x = pParty->vPosition.x; | 5570 a1.vPosition.x = pParty->vPosition.x; |
5569 a1.vPosition.y = pParty->vPosition.y; | 5571 a1.vPosition.y = pParty->vPosition.y; |
5570 a1.uAttributes = 0; | 5572 a1.uAttributes = 0; |
5571 a1.uSectorID = 0; | 5573 a1.uSectorID = 0; |
5572 a1.uSpriteFrameID = 0; | 5574 a1.uSpriteFrameID = 0; |
5573 a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; | 5575 a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3; |
5574 v327 = 8 * v3->uPlayerID; | 5576 v327 = 8 * v3->uPlayerID; |
5575 LOBYTE(v327) = v327 | OBJECT_Player; | 5577 LOBYTE(v327) = v327 | OBJECT_Player; |
5576 a1.field_60_distance_related_prolly_lod = 0; | 5578 a1.field_60_distance_related_prolly_lod = 0; |
5577 a1.field_58_pid = v327; | 5579 a1.spell_caster_pid = v327; |
5578 a1.field_5C = a2; | 5580 a1.field_5C = a2; |
5579 a1.uFacing = LOWORD(pParty->sRotationY); | 5581 a1.uFacing = LOWORD(pParty->sRotationY); |
5580 a1.uSoundID = LOWORD(v3->field_10); | 5582 a1.uSoundID = LOWORD(v3->field_10); |
5581 if ( pParty->bTurnBasedModeOn == 1 ) | 5583 if ( pParty->bTurnBasedModeOn == 1 ) |
5582 a1.uAttributes = 4; | 5584 a1.uAttributes = 4; |
5588 LABEL_125: | 5590 LABEL_125: |
5589 v36 = pParty->sRotationY; | 5591 v36 = pParty->sRotationY; |
5590 goto LABEL_157; | 5592 goto LABEL_157; |
5591 | 5593 |
5592 case SPELL_SPIRIT_DETECT_LIFE: | 5594 case SPELL_SPIRIT_DETECT_LIFE: |
5593 v328 = v12 - 2; | 5595 v328 = v731 - 2; |
5594 if ( v328 ) | 5596 if ( v328 ) |
5595 { | 5597 { |
5596 v329 = v328 - 1; | 5598 v329 = v328 - 1; |
5597 if ( v329 && v329 != 1 ) | 5599 if ( v329 && v329 != 1 ) |
5598 v330 = 600 * v2; | 5600 v330 = 600 * v2; |
5619 | 5621 |
5620 goto play_sound_and_continue; | 5622 goto play_sound_and_continue; |
5621 | 5623 |
5622 case SPELL_SPIRIT_FATE: | 5624 case SPELL_SPIRIT_FATE: |
5623 LODWORD(v733) = 300; | 5625 LODWORD(v733) = 300; |
5624 v339 = v12 - 2; | 5626 v339 = v731 - 2; |
5625 if ( v339 ) | 5627 if ( v339 ) |
5626 { | 5628 { |
5627 v340 = v339 - 1; | 5629 v340 = v339 - 1; |
5628 if ( v340 ) | 5630 if ( v340 ) |
5629 { | 5631 { |
5668 pGame->GetStru6()->_4A7E89_sparkles_on_actor_after_it_casts_buff(v661, v672); | 5670 pGame->GetStru6()->_4A7E89_sparkles_on_actor_after_it_casts_buff(v661, v672); |
5669 } | 5671 } |
5670 goto LABEL_1056; | 5672 goto LABEL_1056; |
5671 | 5673 |
5672 case 49: | 5674 case 49: |
5673 v348 = v12 - 2; | 5675 v348 = v731 - 2; |
5674 if ( !v348 ) | 5676 if ( !v348 ) |
5675 goto LABEL_677; | 5677 goto LABEL_677; |
5676 v349 = v348 - 1; | 5678 v349 = v348 - 1; |
5677 if ( v349 ) | 5679 if ( v349 ) |
5678 { | 5680 { |
5708 if ( HIDWORD(pParty->pPlayers[v3->uPlayerID_2].pConditions[0]) | LODWORD(pParty->pPlayers[v3->uPlayerID_2].pConditions[0]) ) | 5710 if ( HIDWORD(pParty->pPlayers[v3->uPlayerID_2].pConditions[0]) | LODWORD(pParty->pPlayers[v3->uPlayerID_2].pConditions[0]) ) |
5709 goto LABEL_1056; | 5711 goto LABEL_1056; |
5710 v674 = v3->uPlayerID_2; | 5712 v674 = v3->uPlayerID_2; |
5711 goto LABEL_685; | 5713 goto LABEL_685; |
5712 case SPELL_SPIRIT_PRESERVATION: | 5714 case SPELL_SPIRIT_PRESERVATION: |
5713 v354 = v12 - 2; | 5715 v354 = v731 - 2; |
5714 if ( v354 && (v355 = v354 - 1) != 0 && v355 == 1 ) | 5716 if ( v354 && (v355 = v354 - 1) != 0 && v355 == 1 ) |
5715 v356 = 900 * (v2 + 4); | 5717 v356 = 900 * (v2 + 4); |
5716 else | 5718 else |
5717 v356 = 300 * (v2 + 12); | 5719 v356 = 300 * (v2 + 12); |
5718 LODWORD(v733) = v356; | 5720 LODWORD(v733) = v356; |
5739 ++v357;// = (SpellBuff *)((char *)v357 + 6972); | 5741 ++v357;// = (SpellBuff *)((char *)v357 + 6972); |
5740 } | 5742 } |
5741 while ( v357 <= &pParty->pPlayers[3] ); | 5743 while ( v357 <= &pParty->pPlayers[3] ); |
5742 goto LABEL_1056; | 5744 goto LABEL_1056; |
5743 case 48: | 5745 case 48: |
5744 v364 = v12 - 2; | 5746 v364 = v731 - 2; |
5745 if ( !v364 || (v365 = v364 - 1) != 0 && v365 != 1 ) | 5747 if ( !v364 || (v365 = v364 - 1) != 0 && v365 != 1 ) |
5746 v366 = 60 * (v2 + 3); | 5748 v366 = 60 * (v2 + 3); |
5747 else | 5749 else |
5748 v366 = 300 * v2 + 180; | 5750 v366 = 300 * v2 + 180; |
5749 LODWORD(v733) = v366; | 5751 LODWORD(v733) = v366; |
5751 goto play_sound_and_continue; | 5753 goto play_sound_and_continue; |
5752 v726 = (Player *)sub_46A6AC((int)dword_50BF30, 100, 4096); | 5754 v726 = (Player *)sub_46A6AC((int)dword_50BF30, 100, 4096); |
5753 pGame->GetStru6()->FadeScreen__like_Turn_Undead_and_mb_Armageddon(0xFFFFFFu, 0xC0u); | 5755 pGame->GetStru6()->FadeScreen__like_Turn_Undead_and_mb_Armageddon(0xFFFFFFu, 0xC0u); |
5754 ++a1.uType; | 5756 ++a1.uType; |
5755 a1.stru_24.Reset(); | 5757 a1.stru_24.Reset(); |
5756 a1.field_48 = v3->spellnum; | 5758 a1.spell_id = v3->spellnum; |
5757 a1.field_4C = v2; | 5759 a1.spell_level = v2; |
5758 a1.field_50 = v731; | 5760 a1.spell_skill = v731; |
5759 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); | 5761 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); |
5760 a1.uAttributes = 0; | 5762 a1.uAttributes = 0; |
5761 a1.uSectorID = 0; | 5763 a1.uSectorID = 0; |
5762 a1.uSpriteFrameID = 0; | 5764 a1.uSpriteFrameID = 0; |
5763 v368 = v3->uPlayerID; | 5765 v368 = v3->uPlayerID; |
5764 a1.field_60_distance_related_prolly_lod = 0; | 5766 a1.field_60_distance_related_prolly_lod = 0; |
5765 a1.uFacing = 0; | 5767 a1.uFacing = 0; |
5766 v368 *= 8; | 5768 v368 *= 8; |
5767 LOBYTE(v368) = v368 | OBJECT_Player; | 5769 LOBYTE(v368) = v368 | OBJECT_Player; |
5768 a1.field_58_pid = v368; | 5770 a1.spell_caster_pid = v368; |
5769 a1.uSoundID = LOWORD(v3->field_10); | 5771 a1.uSoundID = LOWORD(v3->field_10); |
5770 for ( a2 = 0; a2 < (signed int)v726; ++a2 ) | 5772 for ( a2 = 0; a2 < (signed int)v726; ++a2 ) |
5771 { | 5773 { |
5772 v369 = &pActors[dword_50BF30[a2]]; | 5774 v369 = &pActors[dword_50BF30[a2]]; |
5773 if ( MonsterStats::BelongsToSupertype(v369->pMonsterInfo.uID, MONSTER_SUPERTYPE_UNDEAD) ) | 5775 if ( MonsterStats::BelongsToSupertype(v369->pMonsterInfo.uID, MONSTER_SUPERTYPE_UNDEAD) ) |
5786 v731, 0, 0, 0); | 5788 v731, 0, 0, 0); |
5787 } | 5789 } |
5788 } | 5790 } |
5789 goto LABEL_1056; | 5791 goto LABEL_1056; |
5790 case 53: | 5792 case 53: |
5791 v371 = v12 - 2; | 5793 v371 = v731 - 2; |
5792 if ( v371 && (v372 = v371 - 1) != 0 && v372 == 1 ) | 5794 if ( v371 && (v372 = v371 - 1) != 0 && v372 == 1 ) |
5793 amount = 0; | 5795 amount = 0; |
5794 else | 5796 else |
5795 amount = 86400 * v2; | 5797 amount = 86400 * v2; |
5796 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 5798 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
5822 (signed __int64)((double)(signed __int64)pParty->uTimePlayed - *(float *)&a2)); | 5824 (signed __int64)((double)(signed __int64)pParty->uTimePlayed - *(float *)&a2)); |
5823 } | 5825 } |
5824 v377 = &pParty->pPlayers[v3->uPlayerID_2]; | 5826 v377 = &pParty->pPlayers[v3->uPlayerID_2]; |
5825 goto LABEL_720; | 5827 goto LABEL_720; |
5826 case 54: | 5828 case 54: |
5827 v378 = v12 - 2; | 5829 v378 = v731 - 2; |
5828 if ( v378 && (v379 = v378 - 1) != 0 && v379 == 1 ) | 5830 if ( v378 && (v379 = v378 - 1) != 0 && v379 == 1 ) |
5829 v380 = 4 * v2; | 5831 v380 = 4 * v2; |
5830 else | 5832 else |
5831 v380 = 3 * v2; | 5833 v380 = 3 * v2; |
5832 amount = v380; | 5834 amount = v380; |
5878 while ( v388 + 1 < v730 ); | 5880 while ( v388 + 1 < v730 ); |
5879 } | 5881 } |
5880 goto LABEL_1056; | 5882 goto LABEL_1056; |
5881 | 5883 |
5882 case 55: | 5884 case 55: |
5883 v392 = v12 - 1; | 5885 v392 = v731 - 1; |
5884 if ( !v392 ) | 5886 if ( !v392 ) |
5885 { | 5887 { |
5886 v395 = 180 * v2; | 5888 v395 = 180 * v2; |
5887 goto LABEL_750; | 5889 goto LABEL_750; |
5888 } | 5890 } |
5950 } | 5952 } |
5951 LODWORD(v727) = v83; | 5953 LODWORD(v727) = v83; |
5952 goto play_sound_and_continue; | 5954 goto play_sound_and_continue; |
5953 | 5955 |
5954 case 61: | 5956 case 61: |
5955 v405 = v12 - 2; | 5957 v405 = v731 - 2; |
5956 if ( !v405 ) | 5958 if ( !v405 ) |
5957 goto LABEL_766; | 5959 goto LABEL_766; |
5958 v406 = v405 - 1; | 5960 v406 = v405 - 1; |
5959 if ( v406 ) | 5961 if ( v406 ) |
5960 { | 5962 { |
5985 v732 = amount << 7; | 5987 v732 = amount << 7; |
5986 v663 = (signed __int64)((double)(signed __int64)pParty->uTimePlayed - (double)(amount << 7) * 0.033333335); | 5988 v663 = (signed __int64)((double)(signed __int64)pParty->uTimePlayed - (double)(amount << 7) * 0.033333335); |
5987 v656 = 12; | 5989 v656 = 12; |
5988 goto LABEL_640; | 5990 goto LABEL_640; |
5989 case 56: | 5991 case 56: |
5990 v411 = v12 - 2; | 5992 v411 = v731 - 2; |
5991 if ( v411 ) | 5993 if ( v411 ) |
5992 { | 5994 { |
5993 v412 = v411 - 1; | 5995 v412 = v411 - 1; |
5994 if ( v412 ) | 5996 if ( v412 ) |
5995 { | 5997 { |
6086 } | 6088 } |
6087 strcpy(pTmpBuf2, "nothing"); | 6089 strcpy(pTmpBuf2, "nothing"); |
6088 LABEL_807: | 6090 LABEL_807: |
6089 ShowStatusBarString(pTmpBuf2, 2u); | 6091 ShowStatusBarString(pTmpBuf2, 2u); |
6090 a1.stru_24.Reset(); | 6092 a1.stru_24.Reset(); |
6091 a1.field_48 = v3->spellnum; | 6093 a1.spell_id = v3->spellnum; |
6092 a1.field_4C = v2; | 6094 a1.spell_level = v2; |
6093 a1.field_50 = v731; | 6095 a1.spell_skill = v731; |
6094 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); | 6096 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); |
6095 a1.vPosition.x = *(short *)(v730 + 142); | 6097 a1.vPosition.x = *(short *)(v730 + 142); |
6096 a1.vPosition.y = *(short *)(v730 + 144); | 6098 a1.vPosition.y = *(short *)(v730 + 144); |
6097 v676 = *(short *)(v730 + 138); | 6099 v676 = *(short *)(v730 + 138); |
6098 v665 = a1.vPosition.y; | 6100 v665 = a1.vPosition.y; |
6099 a1.vPosition.z = *(short *)(v730 + 138); | 6101 a1.vPosition.z = *(short *)(v730 + 138); |
6100 v657 = a1.vPosition.x; | 6102 v657 = a1.vPosition.x; |
6101 goto LABEL_1087; | 6103 goto LABEL_1087; |
6102 case 62: | 6104 case 62: |
6103 v423 = v12 - 2; | 6105 v423 = v731 - 2; |
6104 if ( !v423 ) | 6106 if ( !v423 ) |
6105 goto LABEL_813; | 6107 goto LABEL_813; |
6106 v424 = v423 - 1; | 6108 v424 = v423 - 1; |
6107 if ( v424 ) | 6109 if ( v424 ) |
6108 { | 6110 { |
6132 pParty->uTimePlayed + (signed __int64)((double)(amount << 7) * 0.033333335), | 6134 pParty->uTimePlayed + (signed __int64)((double)(amount << 7) * 0.033333335), |
6133 v731, 0, 0, 0); | 6135 v731, 0, 0, 0); |
6134 pActors[v426].pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Long; | 6136 pActors[v426].pMonsterInfo.uHostilityType = MonsterInfo::Hostility_Long; |
6135 } | 6137 } |
6136 a1.stru_24.Reset(); | 6138 a1.stru_24.Reset(); |
6137 a1.field_48 = v3->spellnum; | 6139 a1.spell_id = v3->spellnum; |
6138 a1.field_4C = v2; | 6140 a1.spell_level = v2; |
6139 a1.field_50 = v731; | 6141 a1.spell_skill = v731; |
6140 v60 = pObjectList->ObjectIDByItemID(a1.uType); | 6142 v60 = pObjectList->ObjectIDByItemID(a1.uType); |
6141 v61 = v426; | 6143 v61 = v426; |
6142 goto LABEL_1086; | 6144 goto LABEL_1086; |
6143 case 66: | 6145 case 66: |
6144 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 6146 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
6158 pActors[v427].pActorBuffs[12].Apply( | 6160 pActors[v427].pActorBuffs[12].Apply( |
6159 pParty->uTimePlayed + (signed __int64)((double)(amount << 7) * 0.033333335), | 6161 pParty->uTimePlayed + (signed __int64)((double)(amount << 7) * 0.033333335), |
6160 v731, 0, 0, 0); | 6162 v731, 0, 0, 0); |
6161 } | 6163 } |
6162 a1.stru_24.Reset(); | 6164 a1.stru_24.Reset(); |
6163 a1.field_48 = v3->spellnum; | 6165 a1.spell_id = v3->spellnum; |
6164 a1.field_4C = v2; | 6166 a1.spell_level = v2; |
6165 a1.field_50 = v731; | 6167 a1.spell_skill = v731; |
6166 v60 = pObjectList->ObjectIDByItemID(a1.uType); | 6168 v60 = pObjectList->ObjectIDByItemID(a1.uType); |
6167 v61 = v427; | 6169 v61 = v427; |
6168 goto LABEL_1086; | 6170 goto LABEL_1086; |
6169 case 63: | 6171 case 63: |
6170 v428 = v12 - 2; | 6172 v428 = v731 - 2; |
6171 if ( v428 && (v429 = v428 - 1) != 0 && v429 == 1 ) | 6173 if ( v428 && (v429 = v428 - 1) != 0 && v429 == 1 ) |
6172 v430 = 300 * v2; | 6174 v430 = 300 * v2; |
6173 else | 6175 else |
6174 v430 = 180 * v2; | 6176 v430 = 180 * v2; |
6175 amount = v430; | 6177 amount = v430; |
6177 goto play_sound_and_continue; | 6179 goto play_sound_and_continue; |
6178 v726 = (Player *)sub_46A6AC((int)dword_50BF30, 100, 4096); | 6180 v726 = (Player *)sub_46A6AC((int)dword_50BF30, 100, 4096); |
6179 pGame->GetStru6()->FadeScreen__like_Turn_Undead_and_mb_Armageddon(0xA0A0Au, 0xC0u); | 6181 pGame->GetStru6()->FadeScreen__like_Turn_Undead_and_mb_Armageddon(0xA0A0Au, 0xC0u); |
6180 ++a1.uType; | 6182 ++a1.uType; |
6181 a1.stru_24.Reset(); | 6183 a1.stru_24.Reset(); |
6182 a1.field_48 = v3->spellnum; | 6184 a1.spell_id = v3->spellnum; |
6183 a1.field_4C = v2; | 6185 a1.spell_level = v2; |
6184 a1.field_50 = v731; | 6186 a1.spell_skill = v731; |
6185 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); | 6187 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); |
6186 a1.uAttributes = 0; | 6188 a1.uAttributes = 0; |
6187 a1.uSectorID = 0; | 6189 a1.uSectorID = 0; |
6188 a1.uSpriteFrameID = 0; | 6190 a1.uSpriteFrameID = 0; |
6189 v432 = v3->uPlayerID; | 6191 v432 = v3->uPlayerID; |
6190 a1.field_60_distance_related_prolly_lod = 0; | 6192 a1.field_60_distance_related_prolly_lod = 0; |
6191 a1.uFacing = 0; | 6193 a1.uFacing = 0; |
6192 v432 *= 8; | 6194 v432 *= 8; |
6193 LOBYTE(v432) = v432 | OBJECT_Player; | 6195 LOBYTE(v432) = v432 | OBJECT_Player; |
6194 a1.field_58_pid = v432; | 6196 a1.spell_caster_pid = v432; |
6195 a1.uSoundID = LOWORD(v3->field_10); | 6197 a1.uSoundID = LOWORD(v3->field_10); |
6196 for ( a2 = 0; a2 < (signed int)v726; ++a2 ) | 6198 for ( a2 = 0; a2 < (signed int)v726; ++a2 ) |
6197 { | 6199 { |
6198 v433 = &pActors[dword_50BF30[a2]]; | 6200 v433 = &pActors[dword_50BF30[a2]]; |
6199 if ( MonsterStats::BelongsToSupertype(v433->pMonsterInfo.uID, MONSTER_SUPERTYPE_UNDEAD) ) | 6201 if ( MonsterStats::BelongsToSupertype(v433->pMonsterInfo.uID, MONSTER_SUPERTYPE_UNDEAD) ) |
6214 v731, 0, 0, 0); | 6216 v731, 0, 0, 0); |
6215 } | 6217 } |
6216 } | 6218 } |
6217 goto LABEL_1056; | 6219 goto LABEL_1056; |
6218 case 64: | 6220 case 64: |
6219 v435 = v12 - 2; | 6221 v435 = v731 - 2; |
6220 if ( v435 && (v436 = v435 - 1) != 0 && v436 == 1 ) | 6222 if ( v435 && (v436 = v435 - 1) != 0 && v436 == 1 ) |
6221 amount = 0; | 6223 amount = 0; |
6222 else | 6224 else |
6223 amount = 86400 * v2; | 6225 amount = 86400 * v2; |
6224 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 6226 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
6247 LABEL_720: | 6249 LABEL_720: |
6248 v377->SetCondition(1, 0); | 6250 v377->SetCondition(1, 0); |
6249 } | 6251 } |
6250 goto LABEL_1056; | 6252 goto LABEL_1056; |
6251 case 42: | 6253 case 42: |
6252 v442 = v12 - 2; | 6254 v442 = v731 - 2; |
6253 if ( !v442 ) | 6255 if ( !v442 ) |
6254 goto LABEL_855; | 6256 goto LABEL_855; |
6255 v443 = v442 - 1; | 6257 v443 = v442 - 1; |
6256 if ( v443 ) | 6258 if ( v443 ) |
6257 { | 6259 { |
6326 } | 6328 } |
6327 } | 6329 } |
6328 } | 6330 } |
6329 goto LABEL_1056; | 6331 goto LABEL_1056; |
6330 case 67: | 6332 case 67: |
6331 v451 = v12 - 2; | 6333 v451 = v731 - 2; |
6332 if ( v451 ) | 6334 if ( v451 ) |
6333 { | 6335 { |
6334 v452 = v451 - 1; | 6336 v452 = v451 - 1; |
6335 if ( v452 ) | 6337 if ( v452 ) |
6336 { | 6338 { |
6372 v656 = 1; | 6374 v656 = 1; |
6373 LABEL_640: | 6375 LABEL_640: |
6374 v325 = &pParty->pPlayers[v323]; | 6376 v325 = &pParty->pPlayers[v323]; |
6375 goto LABEL_641; | 6377 goto LABEL_641; |
6376 case 68: | 6378 case 68: |
6377 v457 = v12 - 2; | 6379 v457 = v731 - 2; |
6378 if ( v457 ) | 6380 if ( v457 ) |
6379 { | 6381 { |
6380 v458 = v457 - 1; | 6382 v458 = v457 - 1; |
6381 if ( v458 ) | 6383 if ( v458 ) |
6382 { | 6384 { |
6430 } | 6432 } |
6431 } | 6433 } |
6432 } | 6434 } |
6433 goto LABEL_1056; | 6435 goto LABEL_1056; |
6434 case 72: | 6436 case 72: |
6435 v464 = v12 - 2; | 6437 v464 = v731 - 2; |
6436 if ( !v464 ) | 6438 if ( !v464 ) |
6437 goto LABEL_910; | 6439 goto LABEL_910; |
6438 v465 = v464 - 1; | 6440 v465 = v464 - 1; |
6439 if ( v465 ) | 6441 if ( v465 ) |
6440 { | 6442 { |
6528 v732 = (int)v733 << 7; | 6530 v732 = (int)v733 << 7; |
6529 | 6531 |
6530 pParty->pPlayers[v3->uPlayerID_2].pPlayerBuffs[PLAYER_BUFF_HAMMERHANDS].Apply(pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335), v731, v2, v2, 0); | 6532 pParty->pPlayers[v3->uPlayerID_2].pPlayerBuffs[PLAYER_BUFF_HAMMERHANDS].Apply(pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335), v731, v2, v2, 0); |
6531 goto LABEL_1056; | 6533 goto LABEL_1056; |
6532 case 74: | 6534 case 74: |
6533 v493 = v12 - 2; | 6535 v493 = v731 - 2; |
6534 if ( v493 && (v494 = v493 - 1) != 0 && v494 == 1 ) | 6536 if ( v493 && (v494 = v493 - 1) != 0 && v494 == 1 ) |
6535 amount = 0; | 6537 amount = 0; |
6536 else | 6538 else |
6537 amount = 86400 * v2; | 6539 amount = 86400 * v2; |
6538 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 6540 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
6601 HIDWORD(v733) = v505; | 6603 HIDWORD(v733) = v505; |
6602 v690 = 0; | 6604 v690 = 0; |
6603 v689 = 0; | 6605 v689 = 0; |
6604 v688 = 0; | 6606 v688 = 0; |
6605 a1.stru_24.Reset(); | 6607 a1.stru_24.Reset(); |
6606 a1.field_48 = v3->spellnum; | 6608 a1.spell_id = v3->spellnum; |
6607 a1.field_4C = v2; | 6609 a1.spell_level = v2; |
6608 a1.field_50 = v731; | 6610 a1.spell_skill = v731; |
6609 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); | 6611 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); |
6610 a1.uAttributes = 0; | 6612 a1.uAttributes = 0; |
6611 a1.uSectorID = 0; | 6613 a1.uSectorID = 0; |
6612 a1.uSpriteFrameID = 0; | 6614 a1.uSpriteFrameID = 0; |
6613 v506 = v3->uPlayerID; | 6615 v506 = v3->uPlayerID; |
6614 a1.field_60_distance_related_prolly_lod = 0; | 6616 a1.field_60_distance_related_prolly_lod = 0; |
6615 a1.uFacing = 0; | 6617 a1.uFacing = 0; |
6616 v506 *= 8; | 6618 v506 *= 8; |
6617 LOBYTE(v506) = v506 | OBJECT_Player; | 6619 LOBYTE(v506) = v506 | OBJECT_Player; |
6618 a1.field_58_pid = v506; | 6620 a1.spell_caster_pid = v506; |
6619 a1.uSoundID = LOWORD(v3->field_10); | 6621 a1.uSoundID = LOWORD(v3->field_10); |
6620 a2 = 0; | 6622 a2 = 0; |
6621 if ( SHIDWORD(v733) > 0 ) | 6623 if ( SHIDWORD(v733) > 0 ) |
6622 { | 6624 { |
6623 do | 6625 do |
6658 } | 6660 } |
6659 while ( *(float *)&v726 != 0.0 ); | 6661 while ( *(float *)&v726 != 0.0 ); |
6660 } | 6662 } |
6661 goto LABEL_1056; | 6663 goto LABEL_1056; |
6662 case 82: | 6664 case 82: |
6663 v514 = v12 - 2; | 6665 v514 = v731 - 2; |
6664 if ( !v514 ) | 6666 if ( !v514 ) |
6665 goto LABEL_955; | 6667 goto LABEL_955; |
6666 v515 = v514 - 1; | 6668 v515 = v514 - 1; |
6667 if ( v515 ) | 6669 if ( v515 ) |
6668 { | 6670 { |
6709 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 6711 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
6710 goto play_sound_and_continue; | 6712 goto play_sound_and_continue; |
6711 sub_44FA4C_spawn_light_elemental(v3->uPlayerID, v731, v733); | 6713 sub_44FA4C_spawn_light_elemental(v3->uPlayerID, v731, v733); |
6712 goto LABEL_1056; | 6714 goto LABEL_1056; |
6713 case 83: | 6715 case 83: |
6714 v520 = v12 - 2; | 6716 v520 = v731 - 2; |
6715 if ( !v520 ) | 6717 if ( !v520 ) |
6716 goto LABEL_973; | 6718 goto LABEL_973; |
6717 v521 = v520 - 1; | 6719 v521 = v520 - 1; |
6718 if ( v521 ) | 6720 if ( v521 ) |
6719 { | 6721 { |
6766 v726 = (Player *)v531; | 6768 v726 = (Player *)v531; |
6767 v696 = 0; | 6769 v696 = 0; |
6768 v695 = 0; | 6770 v695 = 0; |
6769 v694 = 0; | 6771 v694 = 0; |
6770 a1.stru_24.Reset(); | 6772 a1.stru_24.Reset(); |
6771 a1.field_48 = v3->spellnum; | 6773 a1.spell_id = v3->spellnum; |
6772 a1.field_4C = v2; | 6774 a1.spell_level = v2; |
6773 a1.field_50 = v731; | 6775 a1.spell_skill = v731; |
6774 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); | 6776 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); |
6775 a1.uAttributes = 0; | 6777 a1.uAttributes = 0; |
6776 a1.uSectorID = 0; | 6778 a1.uSectorID = 0; |
6777 a1.uSpriteFrameID = 0; | 6779 a1.uSpriteFrameID = 0; |
6778 v532 = v3->uPlayerID; | 6780 v532 = v3->uPlayerID; |
6779 a1.field_60_distance_related_prolly_lod = 0; | 6781 a1.field_60_distance_related_prolly_lod = 0; |
6780 a1.uFacing = 0; | 6782 a1.uFacing = 0; |
6781 v532 *= 8; | 6783 v532 *= 8; |
6782 LOBYTE(v532) = v532 | OBJECT_Player; | 6784 LOBYTE(v532) = v532 | OBJECT_Player; |
6783 a1.field_58_pid = v532; | 6785 a1.spell_caster_pid = v532; |
6784 a1.uSoundID = LOWORD(v3->field_10); | 6786 a1.uSoundID = LOWORD(v3->field_10); |
6785 a2 = 0; | 6787 a2 = 0; |
6786 if ( (signed int)v726 > 0 ) | 6788 if ( (signed int)v726 > 0 ) |
6787 { | 6789 { |
6788 do | 6790 do |
6805 v537 = pGame->GetStru6(); | 6807 v537 = pGame->GetStru6(); |
6806 pGame->GetStru6()->_4A8BFC(); | 6808 pGame->GetStru6()->_4A8BFC(); |
6807 goto LABEL_1056; | 6809 goto LABEL_1056; |
6808 | 6810 |
6809 case SPELL_LIGHT_DAY_OF_PROTECTION: | 6811 case SPELL_LIGHT_DAY_OF_PROTECTION: |
6810 v538 = v12 - 2; | 6812 v538 = v731 - 2; |
6811 if ( v538 && (v539 = v538 - 1) != 0 && v539 == 1 ) | 6813 if ( v538 && (v539 = v538 - 1) != 0 && v539 == 1 ) |
6812 { | 6814 { |
6813 amount = 5 * v2; | 6815 amount = 5 * v2; |
6814 v540 = 18000 * v2; | 6816 v540 = 18000 * v2; |
6815 } | 6817 } |
6845 v550, 0, 0); | 6847 v550, 0, 0); |
6846 | 6848 |
6847 pParty->pPartyBuffs[PARTY_BUFF_WIZARD_EYE].Apply((signed __int64)((double)(signed __int64)pParty->uTimePlayed + *((float *)&v733 + 1)), v731, v550, 0, 0); | 6849 pParty->pPartyBuffs[PARTY_BUFF_WIZARD_EYE].Apply((signed __int64)((double)(signed __int64)pParty->uTimePlayed + *((float *)&v733 + 1)), v731, v550, 0, 0); |
6848 goto LABEL_1056; | 6850 goto LABEL_1056; |
6849 case 86: | 6851 case 86: |
6850 v551 = v12 - 2; | 6852 v551 = v731 - 2; |
6851 if ( !v551 ) | 6853 if ( !v551 ) |
6852 goto LABEL_998; | 6854 goto LABEL_998; |
6853 v552 = v551 - 1; | 6855 v552 = v551 - 1; |
6854 if ( v552 ) | 6856 if ( v552 ) |
6855 { | 6857 { |
6941 *(short *)v572 = pPlayer->sAgeModifier + 10; | 6943 *(short *)v572 = pPlayer->sAgeModifier + 10; |
6942 sRecoveryTime += -5 * v2; | 6944 sRecoveryTime += -5 * v2; |
6943 ++v571->uNumDivineInterventionCastsThisDay; | 6945 ++v571->uNumDivineInterventionCastsThisDay; |
6944 goto LABEL_1056; | 6946 goto LABEL_1056; |
6945 case 89: | 6947 case 89: |
6946 v573 = v12 - 2; | 6948 v573 = v731 - 2; |
6947 if ( v573 ) | 6949 if ( v573 ) |
6948 { | 6950 { |
6949 v574 = v573 - 1; | 6951 v574 = v573 - 1; |
6950 if ( v574 ) | 6952 if ( v574 ) |
6951 { | 6953 { |
6996 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 6998 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); |
6997 goto LABEL_203; | 6999 goto LABEL_203; |
6998 } | 7000 } |
6999 ++a1.uType; | 7001 ++a1.uType; |
7000 a1.stru_24.Reset(); | 7002 a1.stru_24.Reset(); |
7001 a1.field_48 = v3->spellnum; | 7003 a1.spell_id = v3->spellnum; |
7002 a1.field_4C = v2; | 7004 a1.spell_level = v2; |
7003 a1.field_50 = v731; | 7005 a1.spell_skill = v731; |
7004 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); | 7006 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); |
7005 a1.uAttributes = 0; | 7007 a1.uAttributes = 0; |
7006 a1.uSectorID = 0; | 7008 a1.uSectorID = 0; |
7007 a1.uSpriteFrameID = 0; | 7009 a1.uSpriteFrameID = 0; |
7008 v580 = v3->uPlayerID; | 7010 v580 = v3->uPlayerID; |
7009 a1.field_60_distance_related_prolly_lod = 0; | 7011 a1.field_60_distance_related_prolly_lod = 0; |
7010 v581 = v721; | 7012 v581 = v721; |
7011 v580 *= 8; | 7013 v580 *= 8; |
7012 LOBYTE(v580) = v580 | OBJECT_Player; | 7014 LOBYTE(v580) = v580 | OBJECT_Player; |
7013 a1.uFacing = 0; | 7015 a1.uFacing = 0; |
7014 a1.field_58_pid = v580; | 7016 a1.spell_caster_pid = v580; |
7015 a1.uSoundID = LOWORD(v3->field_10); | 7017 a1.uSoundID = LOWORD(v3->field_10); |
7016 a1.vPosition.x = *(short *)(v721 + 142); | 7018 a1.vPosition.x = *(short *)(v721 + 142); |
7017 a1.vPosition.y = *(short *)(v721 + 144); | 7019 a1.vPosition.y = *(short *)(v721 + 144); |
7018 v732 = *(short *)(v721 + 138); | 7020 v732 = *(short *)(v721 + 138); |
7019 v582 = 8 * (int)v726; | 7021 v582 = 8 * (int)v726; |
7038 ((SpellBuff *)(v581 + 404))->Reset(); | 7040 ((SpellBuff *)(v581 + 404))->Reset(); |
7039 if ( *(short *)(v581 + 40) > 10 * amount ) | 7041 if ( *(short *)(v581 + 40) > 10 * amount ) |
7040 *(short *)(v581 + 40) = 10 * amount; | 7042 *(short *)(v581 + 40) = 10 * amount; |
7041 goto LABEL_1056; | 7043 goto LABEL_1056; |
7042 case 91: | 7044 case 91: |
7043 v588 = v12 - 1; | 7045 v588 = v731 - 1; |
7044 amount = 16; | 7046 amount = 16; |
7045 if ( v588 && (v589 = v588 - 1) != 0 && (v590 = v589 - 1) != 0 ) | 7047 if ( v588 && (v589 = v588 - 1) != 0 && (v590 = v589 - 1) != 0 ) |
7046 { | 7048 { |
7047 if ( v590 == 1 ) | 7049 if ( v590 == 1 ) |
7048 LODWORD(v733) = 0; | 7050 LODWORD(v733) = 0; |
7082 *(int *)(v592 + 20) |= 8u; | 7084 *(int *)(v592 + 20) |= 8u; |
7083 } | 7085 } |
7084 *(char *)(v592 + 20) |= 0x80u; | 7086 *(char *)(v592 + 20) |= 0x80u; |
7085 goto LABEL_1055; | 7087 goto LABEL_1055; |
7086 case 93: | 7088 case 93: |
7087 v593 = v12 - 2; | 7089 v593 = v731 - 2; |
7088 if ( !v593 ) | 7090 if ( !v593 ) |
7089 goto LABEL_1062; | 7091 goto LABEL_1062; |
7090 v594 = v593 - 1; | 7092 v594 = v593 - 1; |
7091 if ( v594 ) | 7093 if ( v594 ) |
7092 { | 7094 { |
7103 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 7105 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
7104 goto play_sound_and_continue; | 7106 goto play_sound_and_continue; |
7105 v726 = (Player *)((signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360); | 7107 v726 = (Player *)((signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360); |
7106 v732 = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360 / (amount - 1); | 7108 v732 = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360 / (amount - 1); |
7107 a1.stru_24.Reset(); | 7109 a1.stru_24.Reset(); |
7108 a1.field_48 = v3->spellnum; | 7110 a1.spell_id = v3->spellnum; |
7109 a1.field_4C = v2; | 7111 a1.spell_level = v2; |
7110 a1.field_50 = v731; | 7112 a1.spell_skill = v731; |
7111 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); | 7113 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); |
7112 a1.vPosition.x = pParty->vPosition.x; | 7114 a1.vPosition.x = pParty->vPosition.x; |
7113 a1.vPosition.y = pParty->vPosition.y; | 7115 a1.vPosition.y = pParty->vPosition.y; |
7114 a1.uAttributes = 0; | 7116 a1.uAttributes = 0; |
7115 a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 2; | 7117 a1.vPosition.z = pParty->vPosition.z + (signed int)pParty->uPartyHeight / 2; |
7118 pParty->vPosition.y, | 7120 pParty->vPosition.y, |
7119 pParty->vPosition.z + (signed int)pParty->uPartyHeight / 2); | 7121 pParty->vPosition.z + (signed int)pParty->uPartyHeight / 2); |
7120 a1.uSpriteFrameID = 0; | 7122 a1.uSpriteFrameID = 0; |
7121 v595 = 8 * v3->uPlayerID; | 7123 v595 = 8 * v3->uPlayerID; |
7122 LOBYTE(v595) = v595 | OBJECT_Player; | 7124 LOBYTE(v595) = v595 | OBJECT_Player; |
7123 a1.field_58_pid = v595; | 7125 a1.spell_caster_pid = v595; |
7124 a1.field_5C = a2; | 7126 a1.field_5C = a2; |
7125 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance); | 7127 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance); |
7126 a1.uSoundID = LOWORD(v3->field_10); | 7128 a1.uSoundID = LOWORD(v3->field_10); |
7127 if ( pParty->bTurnBasedModeOn == 1 ) | 7129 if ( pParty->bTurnBasedModeOn == 1 ) |
7128 LOBYTE(a1.uAttributes) |= 4u; | 7130 LOBYTE(a1.uAttributes) |= 4u; |
7181 v732 = (int)v733 << 7; | 7183 v732 = (int)v733 << 7; |
7182 pActors[v599].pActorBuffs[12].Apply( | 7184 pActors[v599].pActorBuffs[12].Apply( |
7183 pParty->uTimePlayed + (signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335), | 7185 pParty->uTimePlayed + (signed __int64)((double)(signed int)((int)v733 << 7) * 0.033333335), |
7184 v731, 0, 0, 0); | 7186 v731, 0, 0, 0); |
7185 a1.stru_24.Reset(); | 7187 a1.stru_24.Reset(); |
7186 a1.field_48 = v3->spellnum; | 7188 a1.spell_id = v3->spellnum; |
7187 a1.field_4C = v2; | 7189 a1.spell_level = v2; |
7188 a1.field_50 = v731; | 7190 a1.spell_skill = v731; |
7189 v60 = pObjectList->ObjectIDByItemID(a1.uType); | 7191 v60 = pObjectList->ObjectIDByItemID(a1.uType); |
7190 v61 = v599; | 7192 v61 = v599; |
7191 LABEL_1086: | 7193 LABEL_1086: |
7192 v600 = pActors[v61].vPosition.y; | 7194 v600 = pActors[v61].vPosition.y; |
7193 v601 = pActors[v61].vPosition.x; | 7195 v601 = pActors[v61].vPosition.x; |
7204 a1.uAttributes = 0; | 7206 a1.uAttributes = 0; |
7205 a1.uSectorID = pIndoor->GetSector(v657, v665, v676); | 7207 a1.uSectorID = pIndoor->GetSector(v657, v665, v676); |
7206 a1.uSpriteFrameID = 0; | 7208 a1.uSpriteFrameID = 0; |
7207 v604 = 8 * v3->uPlayerID; | 7209 v604 = 8 * v3->uPlayerID; |
7208 LOBYTE(v604) = v604 | OBJECT_Player; | 7210 LOBYTE(v604) = v604 | OBJECT_Player; |
7209 a1.field_58_pid = v604; | 7211 a1.spell_caster_pid = v604; |
7210 a1.field_5C = a2; | 7212 a1.field_5C = a2; |
7211 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance); | 7213 a1.field_60_distance_related_prolly_lod = LOBYTE(v715.uDistance); |
7212 a1.uFacing = LOWORD(v715.uYawAngle); | 7214 a1.uFacing = LOWORD(v715.uYawAngle); |
7213 LOWORD(v604) = LOWORD(v3->field_10); | 7215 LOWORD(v604) = LOWORD(v3->field_10); |
7214 LOBYTE(a1.uAttributes) |= 0x80u; | 7216 LOBYTE(a1.uAttributes) |= 0x80u; |
7282 if ( v613->uReputation > 10000 ) | 7284 if ( v613->uReputation > 10000 ) |
7283 v613->uReputation = 10000; | 7285 v613->uReputation = 10000; |
7284 LODWORD(v727) = 1; | 7286 LODWORD(v727) = 1; |
7285 goto play_sound_and_continue; | 7287 goto play_sound_and_continue; |
7286 case 95: | 7288 case 95: |
7287 if ( v12 <= 0 ) | 7289 if ( v731 <= 0 ) |
7288 goto LABEL_1119; | 7290 goto LABEL_1119; |
7289 if ( v12 <= 3 ) | 7291 if ( v731 <= 3 ) |
7290 { | 7292 { |
7291 v614 = 300 * (v2 + 12); | 7293 v614 = 300 * (v2 + 12); |
7292 } | 7294 } |
7293 else | 7295 else |
7294 { | 7296 { |
7295 if ( v12 != 4 ) | 7297 if ( v731 != 4 ) |
7296 goto LABEL_1119; | 7298 goto LABEL_1119; |
7297 v614 = 900 * (v2 + 4); | 7299 v614 = 900 * (v2 + 4); |
7298 } | 7300 } |
7299 LODWORD(v733) = v614; | 7301 LODWORD(v733) = v614; |
7300 LABEL_1119: | 7302 LABEL_1119: |
7333 HIDWORD(v733) = sub_46A6AC((int)dword_50BF30, 100, v623); | 7335 HIDWORD(v733) = sub_46A6AC((int)dword_50BF30, 100, v623); |
7334 v709 = 0; | 7336 v709 = 0; |
7335 v708 = 0; | 7337 v708 = 0; |
7336 v707 = 0; | 7338 v707 = 0; |
7337 a1.stru_24.Reset(); | 7339 a1.stru_24.Reset(); |
7338 a1.field_48 = v3->spellnum; | 7340 a1.spell_id = v3->spellnum; |
7339 a1.field_4C = v2; | 7341 a1.spell_level = v2; |
7340 a1.field_50 = v731; | 7342 a1.spell_skill = v731; |
7341 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); | 7343 a1.uObjectDescID = pObjectList->ObjectIDByItemID(a1.uType); |
7342 a1.uAttributes = 0; | 7344 a1.uAttributes = 0; |
7343 a1.uSectorID = 0; | 7345 a1.uSectorID = 0; |
7344 a1.uSpriteFrameID = 0; | 7346 a1.uSpriteFrameID = 0; |
7345 v624 = v3->uPlayerID; | 7347 v624 = v3->uPlayerID; |
7346 a1.field_60_distance_related_prolly_lod = 0; | 7348 a1.field_60_distance_related_prolly_lod = 0; |
7347 a1.uFacing = 0; | 7349 a1.uFacing = 0; |
7348 v624 *= 8; | 7350 v624 *= 8; |
7349 LOBYTE(v624) = v624 | OBJECT_Player; | 7351 LOBYTE(v624) = v624 | OBJECT_Player; |
7350 a1.field_58_pid = v624; | 7352 a1.spell_caster_pid = v624; |
7351 a1.uSoundID = LOWORD(v3->field_10); | 7353 a1.uSoundID = LOWORD(v3->field_10); |
7352 a2 = 0; | 7354 a2 = 0; |
7353 if ( SHIDWORD(v733) > 0 ) | 7355 if ( SHIDWORD(v733) > 0 ) |
7354 { | 7356 { |
7355 v726 = (Player *)(HIDWORD(v733) * (7 * v2 + 25)); | 7357 v726 = (Player *)(HIDWORD(v733) * (7 * v2 + 25)); |
7415 { | 7417 { |
7416 ShowStatusBarString(pGlobalTXT_LocalizationStrings[499], 2); // Can't cast Armageddon indoors! | 7418 ShowStatusBarString(pGlobalTXT_LocalizationStrings[499], 2); // Can't cast Armageddon indoors! |
7417 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 7419 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); |
7418 goto LABEL_203; | 7420 goto LABEL_203; |
7419 } | 7421 } |
7420 v640 = v12 - 2; | 7422 v640 = v731 - 2; |
7421 if ( !v640 || (v641 = v640 - 1) == 0 || (amount = 4, v641 != 1) ) | 7423 if ( !v640 || (v641 = v640 - 1) == 0 || (amount = 4, v641 != 1) ) |
7422 amount = 3; | 7424 amount = 3; |
7423 if ( pPlayer->uNumArmageddonCasts >= amount || pParty->armageddon_timer > 0 ) | 7425 if ( pPlayer->uNumArmageddonCasts >= amount || pParty->armageddon_timer > 0 ) |
7424 { | 7426 { |
7425 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed | 7427 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed |
8145 { | 8147 { |
8146 memcpy(&a1a.stru_24, a9, sizeof(a1a.stru_24)); | 8148 memcpy(&a1a.stru_24, a9, sizeof(a1a.stru_24)); |
8147 v9 = v22; | 8149 v9 = v22; |
8148 } | 8150 } |
8149 v10 = 0; | 8151 v10 = 0; |
8150 a1a.field_50 = 0; | 8152 a1a.spell_skill = 0; |
8151 a1a.field_4C = 0; | 8153 a1a.spell_level = 0; |
8152 a1a.field_48 = 0; | 8154 a1a.spell_id = 0; |
8153 a1a.field_54 = 0; | 8155 a1a.field_54 = 0; |
8154 a1a.uType = v9; | 8156 a1a.uType = v9; |
8155 if ( (signed int)pObjectList->uNumObjects <= 0 ) | 8157 if ( (signed int)pObjectList->uNumObjects <= 0 ) |
8156 { | 8158 { |
8157 LABEL_7: | 8159 LABEL_7: |
8175 a1a.vPosition.y = y; | 8177 a1a.vPosition.y = y; |
8176 a1a.uSoundID = 0; | 8178 a1a.uSoundID = 0; |
8177 a1a.uAttributes = attributes; | 8179 a1a.uAttributes = attributes; |
8178 a1a.uSectorID = pIndoor->GetSector(v21, y, z); | 8180 a1a.uSectorID = pIndoor->GetSector(v21, y, z); |
8179 a1a.uSpriteFrameID = 0; | 8181 a1a.uSpriteFrameID = 0; |
8180 a1a.field_58_pid = 0; | 8182 a1a.spell_caster_pid = 0; |
8181 a1a.field_5C = 0; | 8183 a1a.field_5C = 0; |
8182 if ( !(a1a.uAttributes & 0x10) ) | 8184 if ( !(a1a.uAttributes & 0x10) ) |
8183 { | 8185 { |
8184 v13 = 0; | 8186 v13 = 0; |
8185 if ( (signed int)pItemsTable->uAllItemsCount > 0 ) | 8187 if ( (signed int)pItemsTable->uAllItemsCount > 0 ) |
8251 SpriteObject a1; // [sp+Ch] [bp-70h]@1 | 8253 SpriteObject a1; // [sp+Ch] [bp-70h]@1 |
8252 //SpriteObject::SpriteObject(&a1); | 8254 //SpriteObject::SpriteObject(&a1); |
8253 a1.stru_24.Reset(); | 8255 a1.stru_24.Reset(); |
8254 | 8256 |
8255 v5 = 0; | 8257 v5 = 0; |
8256 a1.field_50 = 0; | 8258 a1.spell_skill = 0; |
8257 a1.field_4C = 0; | 8259 a1.spell_level = 0; |
8258 a1.field_48 = 0; | 8260 a1.spell_id = 0; |
8259 a1.field_54 = 0; | 8261 a1.field_54 = 0; |
8260 a1.uType = 800; | 8262 a1.uType = 800; |
8261 if ( (signed int)pObjectList->uNumObjects <= 0 ) | 8263 if ( (signed int)pObjectList->uNumObjects <= 0 ) |
8262 { | 8264 { |
8263 LABEL_5: | 8265 LABEL_5: |
8281 a1.vPosition.z = z; | 8283 a1.vPosition.z = z; |
8282 a1.uSoundID = 0; | 8284 a1.uSoundID = 0; |
8283 a1.uAttributes = 0; | 8285 a1.uAttributes = 0; |
8284 a1.uSectorID = pIndoor->GetSector(v3, v4, z); | 8286 a1.uSectorID = pIndoor->GetSector(v3, v4, z); |
8285 a1.uSpriteFrameID = 0; | 8287 a1.uSpriteFrameID = 0; |
8286 a1.field_58_pid = 0; | 8288 a1.spell_caster_pid = 0; |
8287 a1.field_5C = 0; | 8289 a1.field_5C = 0; |
8288 v8 = a1.Create(0, 0, 0, 0); | 8290 v8 = a1.Create(0, 0, 0, 0); |
8289 if ( v8 != -1 ) | 8291 if ( v8 != -1 ) |
8290 { | 8292 { |
8291 v9 = 8 * v8; | 8293 v9 = 8 * v8; |
8314 SpriteObject a1a; // [sp+Ch] [bp-74h]@1 | 8316 SpriteObject a1a; // [sp+Ch] [bp-74h]@1 |
8315 //SpriteObject::SpriteObject(&a1a); | 8317 //SpriteObject::SpriteObject(&a1a); |
8316 a1a.uType = 600; | 8318 a1a.uType = 600; |
8317 a1a.stru_24.Reset(); | 8319 a1a.stru_24.Reset(); |
8318 | 8320 |
8319 a1a.field_48 = 6; | 8321 a1a.spell_id = SPELL_FIRE_FIREBALL; |
8320 a1a.field_4C = 8; | 8322 a1a.spell_level = 8; |
8321 a1a.field_50 = 3; | 8323 a1a.spell_skill = 3; |
8322 v14 = 0; | 8324 v14 = 0; |
8323 if ( (signed int)pObjectList->uNumObjects <= 0 ) | 8325 if ( (signed int)pObjectList->uNumObjects <= 0 ) |
8324 { | 8326 { |
8325 LABEL_5: | 8327 LABEL_5: |
8326 v9 = 0; | 8328 v9 = 0; |
8350 a1a.uSoundID = 0; | 8352 a1a.uSoundID = 0; |
8351 if ( a6 >= 1 || a6 <= 4 ) | 8353 if ( a6 >= 1 || a6 <= 4 ) |
8352 { | 8354 { |
8353 v10 = 8 * a6 - 8; | 8355 v10 = 8 * a6 - 8; |
8354 LOBYTE(v10) = v10 | OBJECT_Player; | 8356 LOBYTE(v10) = v10 | OBJECT_Player; |
8355 a1a.field_58_pid = v10; | 8357 a1a.spell_caster_pid = v10; |
8356 } | 8358 } |
8357 else | 8359 else |
8358 { | 8360 { |
8359 a1a.field_58_pid = 0; | 8361 a1a.spell_caster_pid = 0; |
8360 } | 8362 } |
8361 result = a1a.Create(0, 0, 0, 0); | 8363 result = a1a.Create(0, 0, 0, 0); |
8362 if ( result != -1 ) | 8364 if ( result != -1 ) |
8363 { | 8365 { |
8364 v12 = 8 * result; | 8366 v12 = 8 * result; |