comparison Actor.cpp @ 1851:80e897fc2438

Actor::AI_SpellAttack getting rid of labels, constant vars(used in playsound)
author Grumpy7
date Sun, 13 Oct 2013 11:17:09 +0200
parents 521ffedabe19
children 979380004db2
comparison
equal deleted inserted replaced
1850:521ffedabe19 1851:80e897fc2438
242 int v42; // ecx@91 242 int v42; // ecx@91
243 int v43; // eax@95 243 int v43; // eax@95
244 int v44; // ecx@100 244 int v44; // ecx@100
245 int v45; // ecx@101 245 int v45; // ecx@101
246 int v46; // eax@105 246 int v46; // eax@105
247 unsigned int v47; // ebx@106
248 int v48; // ecx@110 247 int v48; // ecx@110
249 char v49; // zf@123 248 char v49; // zf@123
250 int v50; // eax@127 249 int v50; // eax@127
251 int v51; // ecx@130 250 int v51; // ecx@130
252 int v52; // eax@132 251 int v52; // eax@132
295 int v95; // eax@212 294 int v95; // eax@212
296 int v96; // ecx@217 295 int v96; // ecx@217
297 int v97; // eax@221 296 int v97; // eax@221
298 SoundID v98; // [sp-18h] [bp-E8h]@79 297 SoundID v98; // [sp-18h] [bp-E8h]@79
299 signed int v99; // [sp-14h] [bp-E4h]@39 298 signed int v99; // [sp-14h] [bp-E4h]@39
300 unsigned int v100; // [sp-10h] [bp-E0h]@39
301 signed int v101; // [sp-Ch] [bp-DCh]@39
302 signed int v102; // [sp-8h] [bp-D8h]@39
303 int v103; // [sp-4h] [bp-D4h]@39
304 unsigned int v104; // [sp+0h] [bp-D0h]@39
305 signed int v105; // [sp+4h] [bp-CCh]@23 299 signed int v105; // [sp+4h] [bp-CCh]@23
306 int v106; // [sp+4h] [bp-CCh]@39
307 signed int v107; // [sp+4h] [bp-CCh]@42 300 signed int v107; // [sp+4h] [bp-CCh]@42
308 signed int v108; // [sp+4h] [bp-CCh]@173 301 signed int v108; // [sp+4h] [bp-CCh]@173
309 int pitch; // [sp+2Ch] [bp-A4h]@51 302 int pitch; // [sp+2Ch] [bp-A4h]@51
310 float v110; // [sp+30h] [bp-A0h]@50 303 float v110; // [sp+30h] [bp-A0h]@50
311 int v111; // [sp+38h] [bp-98h]@41 304 int v111; // [sp+38h] [bp-98h]@41
351 if ( uSpellID != 15 ) 344 if ( uSpellID != 15 )
352 { 345 {
353 if ( uSpellID != 17 ) 346 if ( uSpellID != 17 )
354 return; 347 return;
355 if ( (signed int)v7 <= 0 ) 348 if ( (signed int)v7 <= 0 )
356 goto LABEL_20; 349 {
350 v8 = 0;
351 v5->pActorBuffs[15].Apply(
352 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v8 << 7) * 0.033333335),
353 v7,
354 0,
355 0,
356 0);
357 return;
358 }
357 if ( (signed int)v7 <= 2 ) 359 if ( (signed int)v7 <= 2 )
358 { 360 {
359 v9 = 300 * v6; 361 v9 = 300 * v6;
360 } 362 }
361 else 363 else
363 if ( v7 != 3 ) 365 if ( v7 != 3 )
364 { 366 {
365 if ( v7 == 4 ) 367 if ( v7 == 4 )
366 { 368 {
367 v8 = 3600 * (v6 + 64); 369 v8 = 3600 * (v6 + 64);
368 LABEL_21:
369 v5->pActorBuffs[15].Apply( 370 v5->pActorBuffs[15].Apply(
370 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v8 << 7) * 0.033333335), 371 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v8 << 7) * 0.033333335),
371 v7, 372 v7,
372 0, 373 0,
373 0, 374 0,
374 0); 375 0);
375 return; 376 return;
376 } 377 }
377 LABEL_20:
378 v8 = 0; 378 v8 = 0;
379 goto LABEL_21; 379 v5->pActorBuffs[15].Apply(
380 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v8 << 7) * 0.033333335),
381 v7,
382 0,
383 0,
384 0);
385 return;
380 } 386 }
381 v9 = 900 * v6; 387 v9 = 900 * v6;
382 } 388 }
383 v8 = v9 + 3840; 389 v8 = v9 + 3840;
384 goto LABEL_21; 390 v5->pActorBuffs[15].Apply(
391 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v8 << 7) * 0.033333335),
392 v7,
393 0,
394 0,
395 0);
396 return;
385 } 397 }
386 v10 = 3; 398 v10 = 3;
387 if ( uSkillLevel & 0x0100 ) 399 if ( uSkillLevel & 0x0100 )
388 { 400 {
389 v105 = 9; 401 v105 = 9;
464 } 476 }
465 while ( v19 <= a1a ); 477 while ( v19 <= a1a );
466 } 478 }
467 if ( v20 != -1 ) 479 if ( v20 != -1 )
468 { 480 {
469 v106 = 0;
470 v104 = 0;
471 v103 = 0;
472 v102 = 0;
473 v21 = 8 * v20; 481 v21 = 8 * v20;
474 v101 = -1;
475 LOBYTE(v21) = v21 | 2; 482 LOBYTE(v21) = v21 | 2;
476 v100 = 0;
477 v99 = v21; 483 v99 = v21;
478 v22 = (SoundID)word_4EE088_sound_ids[15]; 484 v22 = (SoundID)word_4EE088_sound_ids[15];
479 LABEL_202:
480 v98 = v22; 485 v98 = v22;
481 goto LABEL_222; 486 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
487 return;
482 } 488 }
483 return; 489 return;
484 } 490 }
485 LABEL_159: 491 LABEL_159:
486 a1.uType = stru_4E3ACC[uSpellID].uType; 492 a1.uType = stru_4E3ACC[uSpellID].uType;
555 v86->uPitchAngle, 561 v86->uPitchAngle,
556 pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed, 562 pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed,
557 0); 563 0);
558 if ( v91 != -1 ) 564 if ( v91 != -1 )
559 { 565 {
560 v106 = 0;
561 v104 = 0;
562 v103 = 0;
563 v102 = 0;
564 v92 = 8 * v91; 566 v92 = 8 * v91;
565 v101 = -1;
566 LOBYTE(v92) = v92 | 2; 567 LOBYTE(v92) = v92 | 2;
567 v100 = 0;
568 v99 = v92; 568 v99 = v92;
569 v22 = (SoundID)word_4EE088_sound_ids[uSpellID]; 569 v22 = (SoundID)word_4EE088_sound_ids[uSpellID];
570 goto LABEL_202; 570 v98 = v22;
571 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
572 return;
571 } 573 }
572 return; 574 return;
573 } 575 }
574 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor ) 576 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor )
575 return; 577 return;
712 if ( (signed int)v7 > 0 ) 714 if ( (signed int)v7 > 0 )
713 { 715 {
714 if ( (signed int)v7 <= 2 ) 716 if ( (signed int)v7 <= 2 )
715 { 717 {
716 v39 = 60 * (v6 + 60); 718 v39 = 60 * (v6 + 60);
717 goto LABEL_79;
718 }
719 if ( v7 == 3 )
720 {
721 v39 = 180 * (v6 + 20);
722 goto LABEL_79;
723 }
724 if ( v7 == 4 )
725 {
726 v39 = 240 * (v6 + 15);
727 LABEL_79:
728 v5->pActorBuffs[19].Apply( 719 v5->pActorBuffs[19].Apply(
729 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v39 << 7) * 0.033333335), 720 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v39 << 7) * 0.033333335),
730 v7, 721 v7,
731 0, 722 0,
732 0, 723 0,
733 0); 724 0);
734 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5, 0xFF3C1Eu); 725 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5, 0xFF3C1Eu);
735 v106 = 0;
736 v104 = 0;
737 v103 = 0;
738 v102 = 0;
739 v40 = 8 * LODWORD(v120); 726 v40 = 8 * LODWORD(v120);
740 v101 = -1;
741 LOBYTE(v40) = PID(OBJECT_Actor,LOBYTE(v120)); 727 LOBYTE(v40) = PID(OBJECT_Actor,LOBYTE(v120));
742 v100 = 0;
743 v99 = v40; 728 v99 = v40;
744 v98 = (SoundID)10040; 729 v98 = (SoundID)10040;
745 LABEL_222: 730 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
746 pAudioPlayer->PlaySound(v98, v99, v100, v101, v102, v103, v104, v106); 731 return;
732 }
733 if ( v7 == 3 )
734 {
735 v39 = 180 * (v6 + 20);
736 v5->pActorBuffs[19].Apply(
737 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v39 << 7) * 0.033333335),
738 v7,
739 0,
740 0,
741 0);
742 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5, 0xFF3C1Eu);
743 v40 = 8 * LODWORD(v120);
744 LOBYTE(v40) = PID(OBJECT_Actor,LOBYTE(v120));
745 v99 = v40;
746 v98 = (SoundID)10040;
747 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
748 return;
749 }
750 if ( v7 == 4 )
751 {
752 v39 = 240 * (v6 + 15);
753 v5->pActorBuffs[19].Apply(
754 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v39 << 7) * 0.033333335),
755 v7,
756 0,
757 0,
758 0);
759 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5, 0xFF3C1Eu);
760 v40 = 8 * LODWORD(v120);
761 LOBYTE(v40) = PID(OBJECT_Actor,LOBYTE(v120));
762 v99 = v40;
763 v98 = (SoundID)10040;
764 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
747 return; 765 return;
748 } 766 }
749 } 767 }
750 v39 = 0; 768 v39 = 0;
751 goto LABEL_79; 769 v5->pActorBuffs[19].Apply(
770 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v39 << 7) * 0.033333335),
771 v7,
772 0,
773 0,
774 0);
775 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5, 0xFF3C1Eu);
776 v40 = 8 * LODWORD(v120);
777 LOBYTE(v40) = PID(OBJECT_Actor,LOBYTE(v120));
778 v99 = v40;
779 v98 = (SoundID)10040;
780 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
781 return;
752 } 782 }
753 if ( uSpellID == 26 || uSpellID == 29 ) 783 if ( uSpellID == 26 || uSpellID == 29 )
754 goto LABEL_159; 784 goto LABEL_159;
755 if ( uSpellID != 38 ) 785 if ( uSpellID != 38 )
756 { 786 {
761 if ( (signed int)v7 > 0 ) 791 if ( (signed int)v7 > 0 )
762 { 792 {
763 if ( (signed int)v7 <= 2 ) 793 if ( (signed int)v7 <= 2 )
764 { 794 {
765 v41 = 300 * v6; 795 v41 = 300 * v6;
766 goto LABEL_91;
767 }
768 if ( v7 == 3 )
769 {
770 v41 = 900 * v6;
771 goto LABEL_91;
772 }
773 if ( v7 == 4 )
774 {
775 v41 = 1200 * v6;
776 LABEL_91:
777 v42 = v41 + 3840; 796 v42 = v41 + 3840;
778 LABEL_95:
779 v5->pActorBuffs[17].Apply( 797 v5->pActorBuffs[17].Apply(
780 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v42 << 7) * 0.033333335), 798 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v42 << 7) * 0.033333335),
781 v7, 799 v7,
782 v6 + 5, 800 v6 + 5,
783 0, 801 0,
784 0); 802 0);
785 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5,0xC8C805u); 803 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5,0xC8C805u);
786 v106 = 0;
787 v104 = 0;
788 v103 = 0;
789 v102 = 0;
790 v43 = 8 * LODWORD(v120); 804 v43 = 8 * LODWORD(v120);
791 v101 = -1;
792 LOBYTE(v43) = PID(OBJECT_Actor,LOBYTE(v120)); 805 LOBYTE(v43) = PID(OBJECT_Actor,LOBYTE(v120));
793 v100 = 0;
794 v99 = v43; 806 v99 = v43;
795 v98 = (SoundID)14010; 807 v98 = (SoundID)14010;
796 goto LABEL_222; 808 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
809 return;
810 }
811 if ( v7 == 3 )
812 {
813 v41 = 900 * v6;
814 v42 = v41 + 3840;
815 v5->pActorBuffs[17].Apply(
816 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v42 << 7) * 0.033333335),
817 v7,
818 v6 + 5,
819 0,
820 0);
821 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5,0xC8C805u);
822 v43 = 8 * LODWORD(v120);
823 LOBYTE(v43) = PID(OBJECT_Actor,LOBYTE(v120));
824 v99 = v43;
825 v98 = (SoundID)14010;
826 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
827 return;
828 }
829 if ( v7 == 4 )
830 {
831 v41 = 1200 * v6;
832 v42 = v41 + 3840;
833 v5->pActorBuffs[17].Apply(
834 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v42 << 7) * 0.033333335),
835 v7,
836 v6 + 5,
837 0,
838 0);
839 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5,0xC8C805u);
840 v43 = 8 * LODWORD(v120);
841 LOBYTE(v43) = PID(OBJECT_Actor,LOBYTE(v120));
842 v99 = v43;
843 v98 = (SoundID)14010;
844 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
845 return;
797 } 846 }
798 } 847 }
799 v42 = 0; 848 v42 = 0;
800 goto LABEL_95; 849 v5->pActorBuffs[17].Apply(
850 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v42 << 7) * 0.033333335),
851 v7,
852 v6 + 5,
853 0,
854 0);
855 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5,0xC8C805u);
856 v43 = 8 * LODWORD(v120);
857 LOBYTE(v43) = PID(OBJECT_Actor,LOBYTE(v120));
858 v99 = v43;
859 v98 = (SoundID)14010;
860 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
861 return;
801 } 862 }
802 if ( (signed int)v7 <= 0 ) 863 if ( (signed int)v7 <= 0 )
803 goto LABEL_104; 864 {
865 v44 = 0;
866 v5->pActorBuffs[16].Apply(
867 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v44 << 7) * 0.033333335),
868 v7,
869 v6 + 5,
870 0,
871 0);
872 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5,0x5C310Eu);
873 v46 = 8 * LODWORD(v120);
874 LOBYTE(v46) = PID(OBJECT_Actor,LOBYTE(v120));
875 v99 = v46;
876 v98 = (SoundID)13040;
877 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
878 return;
879 }
804 if ( (signed int)v7 <= 2 ) 880 if ( (signed int)v7 <= 2 )
805 { 881 {
806 v45 = 300 * v6; 882 v45 = 300 * v6;
807 } 883 }
808 else 884 else
810 if ( v7 != 3 ) 886 if ( v7 != 3 )
811 { 887 {
812 if ( v7 == 4 ) 888 if ( v7 == 4 )
813 { 889 {
814 v44 = 3600 * (v6 + 64); 890 v44 = 3600 * (v6 + 64);
815 LABEL_105:
816 v5->pActorBuffs[16].Apply( 891 v5->pActorBuffs[16].Apply(
817 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v44 << 7) * 0.033333335), 892 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v44 << 7) * 0.033333335),
818 v7, 893 v7,
819 v6 + 5, 894 v6 + 5,
820 0, 895 0,
821 0); 896 0);
822 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5,0x5C310Eu); 897 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5,0x5C310Eu);
823 v106 = 0;
824 v104 = 0;
825 v103 = 0;
826 v102 = 0;
827 v46 = 8 * LODWORD(v120); 898 v46 = 8 * LODWORD(v120);
828 v101 = -1;
829 LOBYTE(v46) = PID(OBJECT_Actor,LOBYTE(v120)); 899 LOBYTE(v46) = PID(OBJECT_Actor,LOBYTE(v120));
830 v100 = 0;
831 v99 = v46; 900 v99 = v46;
832 v98 = (SoundID)13040; 901 v98 = (SoundID)13040;
833 goto LABEL_222; 902 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
903 return;
834 } 904 }
835 LABEL_104:
836 v44 = 0; 905 v44 = 0;
837 goto LABEL_105; 906 v5->pActorBuffs[16].Apply(
907 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v44 << 7) * 0.033333335),
908 v7,
909 v6 + 5,
910 0,
911 0);
912 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5,0x5C310Eu);
913 v46 = 8 * LODWORD(v120);
914 LOBYTE(v46) = PID(OBJECT_Actor,LOBYTE(v120));
915 v99 = v46;
916 v98 = (SoundID)13040;
917 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
918 return;
838 } 919 }
839 v45 = 900 * v6; 920 v45 = 900 * v6;
840 } 921 }
841 v44 = v45 + 3840; 922 v44 = v45 + 3840;
842 goto LABEL_105; 923 v5->pActorBuffs[16].Apply(
843 } 924 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v44 << 7) * 0.033333335),
844 v47 = 0; 925 v7,
926 v6 + 5,
927 0,
928 0);
929 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5,0x5C310Eu);
930 v46 = 8 * LODWORD(v120);
931 LOBYTE(v46) = PID(OBJECT_Actor,LOBYTE(v120));
932 v99 = v46;
933 v98 = (SoundID)13040;
934 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
935 return;
936 }
845 if ( (signed int)v7 > 0 ) 937 if ( (signed int)v7 > 0 )
846 { 938 {
847 if ( (signed int)v7 <= 2 ) 939 if ( (signed int)v7 <= 2 )
848 { 940 {
849 v48 = 2 * v6 + 40; 941 v48 = 2 * v6 + 40;
850 goto LABEL_114;
851 }
852 if ( v7 == 3 )
853 {
854 v48 = 3 * v6 + 60;
855 goto LABEL_114;
856 }
857 if ( v7 == 4 )
858 {
859 LOWORD(v48) = 2 * (3 * v6 + 60);
860 LABEL_114:
861 v5->pActorBuffs[11].Apply(pParty->uTimePlayed + 1280, v7, v48, 0, 0); 942 v5->pActorBuffs[11].Apply(pParty->uTimePlayed + 1280, v7, v48, 0, 0);
862 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5,0xC8C805u); 943 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5,0xC8C805u);
863 LABEL_127:
864 v106 = v47;
865 v104 = v47;
866 v103 = v47;
867 v50 = 8 * LODWORD(v120); 944 v50 = 8 * LODWORD(v120);
868 v102 = v47;
869 v101 = -1;
870 LOBYTE(v50) = PID(OBJECT_Actor,LOBYTE(v120)); 945 LOBYTE(v50) = PID(OBJECT_Actor,LOBYTE(v120));
871 v100 = v47;
872 v99 = v50; 946 v99 = v50;
873 v98 = (SoundID)14020; 947 v98 = (SoundID)14020;
874 goto LABEL_222; 948 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
949 return;
950 }
951 if ( v7 == 3 )
952 {
953 v48 = 3 * v6 + 60;
954 v5->pActorBuffs[11].Apply(pParty->uTimePlayed + 1280, v7, v48, 0, 0);
955 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5,0xC8C805u);
956 v50 = 8 * LODWORD(v120);
957 LOBYTE(v50) = PID(OBJECT_Actor,LOBYTE(v120));
958 v99 = v50;
959 v98 = (SoundID)14020;
960 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
961 return;
962 }
963 if ( v7 == 4 )
964 {
965 LOWORD(v48) = 2 * (3 * v6 + 60);
966 v5->pActorBuffs[11].Apply(pParty->uTimePlayed + 1280, v7, v48, 0, 0);
967 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5,0xC8C805u);
968 v50 = 8 * LODWORD(v120);
969 LOBYTE(v50) = PID(OBJECT_Actor,LOBYTE(v120));
970 v99 = v50;
971 v98 = (SoundID)14020;
972 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
973 return;
875 } 974 }
876 } 975 }
877 LOWORD(v48) = 0; 976 LOWORD(v48) = 0;
878 goto LABEL_114; 977 v5->pActorBuffs[11].Apply(pParty->uTimePlayed + 1280, v7, v48, 0, 0);
978 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5,0xC8C805u);
979 v50 = 8 * LODWORD(v120);
980 LOBYTE(v50) = PID(OBJECT_Actor,LOBYTE(v120));
981 v99 = v50;
982 v98 = (SoundID)14020;
983 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
984 return;
879 } 985 }
880 if ( uSpellID <= 80 ) 986 if ( uSpellID <= 80 )
881 { 987 {
882 if ( uSpellID == 80 ) 988 if ( uSpellID == 80 )
883 { 989 {
911 } 1017 }
912 ++a1b; 1018 ++a1b;
913 ++v57; 1019 ++v57;
914 } 1020 }
915 while ( (signed int)v57 <= (signed int)&pPlayers[4] ); 1021 while ( (signed int)v57 <= (signed int)&pPlayers[4] );
916 v106 = 0;
917 v104 = 0;
918 v103 = 0;
919 v65 = 8 * LODWORD(v120); 1022 v65 = 8 * LODWORD(v120);
920 v102 = 0;
921 v101 = -1;
922 LOBYTE(v65) = PID(OBJECT_Actor,LOBYTE(v120)); 1023 LOBYTE(v65) = PID(OBJECT_Actor,LOBYTE(v120));
923 v100 = 0;
924 v99 = v65; 1024 v99 = v65;
925 v22 = (SoundID)word_4EE088_sound_ids[80]; 1025 v22 = (SoundID)word_4EE088_sound_ids[80];
926 goto LABEL_202; 1026 v98 = v22;
1027 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
1028 return;
927 } 1029 }
928 if ( uSpellID != 51 ) 1030 if ( uSpellID != 51 )
929 { 1031 {
930 if ( uSpellID == 57 || uSpellID == 65 || uSpellID == 70 ) 1032 if ( uSpellID == 57 || uSpellID == 65 || uSpellID == 70 )
931 goto LABEL_159; 1033 goto LABEL_159;
940 v7, 1042 v7,
941 v6, 1043 v6,
942 0, 1044 0,
943 0); 1045 0);
944 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5, 0xA81376u); 1046 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5, 0xA81376u);
945 v106 = 0;
946 v104 = 0;
947 v103 = 0;
948 v102 = 0;
949 v52 = 8 * LODWORD(v120); 1047 v52 = 8 * LODWORD(v120);
950 v101 = -1;
951 LOBYTE(v52) = PID(OBJECT_Actor,LOBYTE(v120)); 1048 LOBYTE(v52) = PID(OBJECT_Actor,LOBYTE(v120));
952 v100 = 0;
953 v99 = v52; 1049 v99 = v52;
954 v98 = (SoundID)16060; 1050 v98 = (SoundID)16060;
955 goto LABEL_222; 1051 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
1052 return;
956 } 1053 }
957 if ( uSpellID == 77 ) 1054 if ( uSpellID == 77 )
958 { 1055 {
959 v5->sCurrentHP += 5 * v6 + 10; 1056 v5->sCurrentHP += 5 * v6 + 10;
960 if ( v5->sCurrentHP >= (signed int)v5->pMonsterInfo.uHP ) 1057 if ( v5->sCurrentHP >= (signed int)v5->pMonsterInfo.uHP )
961 v5->sCurrentHP = LOWORD(v5->pMonsterInfo.uHP); 1058 v5->sCurrentHP = LOWORD(v5->pMonsterInfo.uHP);
962 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5, 0xA81376u); 1059 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5, 0xA81376u);
963 v47 = 0; 1060 v50 = 8 * LODWORD(v120);
964 goto LABEL_127; 1061 LOBYTE(v50) = PID(OBJECT_Actor,LOBYTE(v120));
1062 v99 = v50;
1063 v98 = (SoundID)14020;
1064 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
1065 return;
965 } 1066 }
966 v49 = uSpellID == 78; 1067 v49 = uSpellID == 78;
967 LABEL_158: 1068 LABEL_158:
968 if ( !v49 ) 1069 if ( !v49 )
969 return; 1070 return;
972 if ( (signed int)v7 > 0 ) 1073 if ( (signed int)v7 > 0 )
973 { 1074 {
974 if ( (signed int)v7 <= 2 ) 1075 if ( (signed int)v7 <= 2 )
975 { 1076 {
976 v53 = 300 * v6; 1077 v53 = 300 * v6;
977 goto LABEL_138;
978 }
979 if ( v7 == 3 )
980 {
981 v53 = 900 * v6;
982 goto LABEL_138;
983 }
984 if ( v7 == 4 )
985 {
986 v53 = 1200 * v6;
987 LABEL_138:
988 v54 = v53 + 3840; 1078 v54 = v53 + 3840;
989 LABEL_142:
990 v5->pActorBuffs[18].Apply( 1079 v5->pActorBuffs[18].Apply(
991 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v54 << 7) * 0.033333335), 1080 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v54 << 7) * 0.033333335),
992 v7, 1081 v7,
993 v6 + 5, 1082 v6 + 5,
994 0, 1083 0,
995 0); 1084 0);
996 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5,0xC8C805u); 1085 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5,0xC8C805u);
997 v106 = 0;
998 v104 = 0;
999 v103 = 0;
1000 v102 = 0;
1001 v55 = 8 * LODWORD(v120); 1086 v55 = 8 * LODWORD(v120);
1002 v101 = -1;
1003 LOBYTE(v55) = PID(OBJECT_Actor,LOBYTE(v120)); 1087 LOBYTE(v55) = PID(OBJECT_Actor,LOBYTE(v120));
1004 v100 = 0;
1005 v99 = v55; 1088 v99 = v55;
1006 v98 = (SoundID)14060; 1089 v98 = (SoundID)14060;
1007 goto LABEL_222; 1090 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
1091 return;
1092 }
1093 if ( v7 == 3 )
1094 {
1095 v53 = 900 * v6;
1096 v54 = v53 + 3840;
1097 v5->pActorBuffs[18].Apply(
1098 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v54 << 7) * 0.033333335),
1099 v7,
1100 v6 + 5,
1101 0,
1102 0);
1103 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5,0xC8C805u);
1104 v55 = 8 * LODWORD(v120);
1105 LOBYTE(v55) = PID(OBJECT_Actor,LOBYTE(v120));
1106 v99 = v55;
1107 v98 = (SoundID)14060;
1108 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
1109 return;
1110 }
1111 if ( v7 == 4 )
1112 {
1113 v53 = 1200 * v6;
1114 v54 = v53 + 3840;
1115 v5->pActorBuffs[18].Apply(
1116 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v54 << 7) * 0.033333335),
1117 v7,
1118 v6 + 5,
1119 0,
1120 0);
1121 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5,0xC8C805u);
1122 v55 = 8 * LODWORD(v120);
1123 LOBYTE(v55) = PID(OBJECT_Actor,LOBYTE(v120));
1124 v99 = v55;
1125 v98 = (SoundID)14060;
1126 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
1127 return;
1008 } 1128 }
1009 } 1129 }
1010 v54 = 0; 1130 v54 = 0;
1011 goto LABEL_142; 1131 v5->pActorBuffs[18].Apply(
1132 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v54 << 7) * 0.033333335),
1133 v7,
1134 v6 + 5,
1135 0,
1136 0);
1137 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5,0xC8C805u);
1138 v55 = 8 * LODWORD(v120);
1139 LOBYTE(v55) = PID(OBJECT_Actor,LOBYTE(v120));
1140 v99 = v55;
1141 v98 = (SoundID)14060;
1142 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
1143 return;
1012 } 1144 }
1013 if ( uSpellID == 85 ) 1145 if ( uSpellID == 85 )
1014 { 1146 {
1015 if ( (signed int)v7 > 0 ) 1147 if ( (signed int)v7 > 0 )
1016 { 1148 {
1017 if ( (signed int)v7 <= 2 ) 1149 if ( (signed int)v7 <= 2 )
1018 { 1150 {
1019 v96 = 300 * v6 + 3840; 1151 v96 = 300 * v6 + 3840;
1020 goto LABEL_221;
1021 }
1022 if ( v7 == 3 )
1023 {
1024 LOWORD(v6) = 3 * v6;
1025 v96 = 900 * (uSkillLevel & 0x3F) + 3840;
1026 goto LABEL_221;
1027 }
1028 if ( v7 == 4 )
1029 {
1030 v96 = 1200 * v6 + 3840;
1031 LOWORD(v6) = 4 * v6;
1032 LABEL_221:
1033 v5->pActorBuffs[13].Apply( 1152 v5->pActorBuffs[13].Apply(
1034 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v96 << 7) * 0.033333335), 1153 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v96 << 7) * 0.033333335),
1035 v7, 1154 v7,
1036 v6, 1155 v6,
1037 0, 1156 0,
1038 0); 1157 0);
1039 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5, 0xFFFFFFu); 1158 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5, 0xFFFFFFu);
1040 v106 = 0;
1041 v104 = 0;
1042 v103 = 0;
1043 v102 = 0;
1044 v97 = 8 * LODWORD(v120); 1159 v97 = 8 * LODWORD(v120);
1045 v101 = -1;
1046 LOBYTE(v97) = PID(OBJECT_Actor,LOBYTE(v120)); 1160 LOBYTE(v97) = PID(OBJECT_Actor,LOBYTE(v120));
1047 v100 = 0;
1048 v99 = v97; 1161 v99 = v97;
1049 v98 = (SoundID)17070; 1162 v98 = (SoundID)17070;
1050 goto LABEL_222; 1163 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
1164 return;
1165 }
1166 if ( v7 == 3 )
1167 {
1168 LOWORD(v6) = 3 * v6;
1169 v96 = 900 * (uSkillLevel & 0x3F) + 3840;
1170 v5->pActorBuffs[13].Apply(
1171 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v96 << 7) * 0.033333335),
1172 v7,
1173 v6,
1174 0,
1175 0);
1176 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5, 0xFFFFFFu);
1177 v97 = 8 * LODWORD(v120);
1178 LOBYTE(v97) = PID(OBJECT_Actor,LOBYTE(v120));
1179 v99 = v97;
1180 v98 = (SoundID)17070;
1181 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
1182 return;
1183 }
1184 if ( v7 == 4 )
1185 {
1186 v96 = 1200 * v6 + 3840;
1187 LOWORD(v6) = 4 * v6;
1188 v5->pActorBuffs[13].Apply(
1189 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v96 << 7) * 0.033333335),
1190 v7,
1191 v6,
1192 0,
1193 0);
1194 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5, 0xFFFFFFu);
1195 v97 = 8 * LODWORD(v120);
1196 LOBYTE(v97) = PID(OBJECT_Actor,LOBYTE(v120));
1197 v99 = v97;
1198 v98 = (SoundID)17070;
1199 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
1200 return;
1051 } 1201 }
1052 } 1202 }
1053 LOWORD(v6) = uSkillLevel; 1203 LOWORD(v6) = uSkillLevel;
1054 v96 = 0; 1204 v96 = 0;
1055 goto LABEL_221; 1205 v5->pActorBuffs[13].Apply(
1206 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v96 << 7) * 0.033333335),
1207 v7,
1208 v6,
1209 0,
1210 0);
1211 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5, 0xFFFFFFu);
1212 v97 = 8 * LODWORD(v120);
1213 LOBYTE(v97) = PID(OBJECT_Actor,LOBYTE(v120));
1214 v99 = v97;
1215 v98 = (SoundID)17070;
1216 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
1217 return;
1056 } 1218 }
1057 if ( uSpellID == 86 ) 1219 if ( uSpellID == 86 )
1058 { 1220 {
1059 if ( (signed int)v7 > 0 ) 1221 if ( (signed int)v7 > 0 )
1060 { 1222 {
1061 if ( (signed int)v7 <= 2 ) 1223 if ( (signed int)v7 <= 2 )
1062 { 1224 {
1063 v93 = 300 * v6; 1225 v93 = 300 * v6;
1064 goto LABEL_208;
1065 }
1066 if ( v7 == 3 )
1067 {
1068 v93 = 900 * v6;
1069 goto LABEL_208;
1070 }
1071 if ( v7 == 4 )
1072 {
1073 v93 = 1200 * v6;
1074 LABEL_208:
1075 v94 = v93 + 3840; 1226 v94 = v93 + 3840;
1076 LABEL_212:
1077 v5->pActorBuffs[14].Apply( 1227 v5->pActorBuffs[14].Apply(
1078 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v94 << 7) * 0.033333335), 1228 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v94 << 7) * 0.033333335),
1079 v7, 1229 v7,
1080 v6 + 5, 1230 v6 + 5,
1081 0, 1231 0,
1082 0); 1232 0);
1083 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5, 0xFFFFFFu); 1233 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5, 0xFFFFFFu);
1084 v106 = 0;
1085 v104 = 0;
1086 v103 = 0;
1087 v102 = 0;
1088 v95 = 8 * LODWORD(v120); 1234 v95 = 8 * LODWORD(v120);
1089 v101 = -1;
1090 LOBYTE(v95) = PID(OBJECT_Actor,LOBYTE(v120)); 1235 LOBYTE(v95) = PID(OBJECT_Actor,LOBYTE(v120));
1091 v100 = 0;
1092 v99 = v95; 1236 v99 = v95;
1093 v98 = (SoundID)17080; 1237 v98 = (SoundID)17080;
1094 goto LABEL_222; 1238 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
1239 return;
1240 }
1241 if ( v7 == 3 )
1242 {
1243 v93 = 900 * v6;
1244 v94 = v93 + 3840;
1245 v5->pActorBuffs[14].Apply(
1246 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v94 << 7) * 0.033333335),
1247 v7,
1248 v6 + 5,
1249 0,
1250 0);
1251 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5, 0xFFFFFFu);
1252 v95 = 8 * LODWORD(v120);
1253 LOBYTE(v95) = PID(OBJECT_Actor,LOBYTE(v120));
1254 v99 = v95;
1255 v98 = (SoundID)17080;
1256 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
1257 return;
1258 }
1259 if ( v7 == 4 )
1260 {
1261 v93 = 1200 * v6;
1262 v94 = v93 + 3840;
1263 v5->pActorBuffs[14].Apply(
1264 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v94 << 7) * 0.033333335),
1265 v7,
1266 v6 + 5,
1267 0,
1268 0);
1269 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5, 0xFFFFFFu);
1270 v95 = 8 * LODWORD(v120);
1271 LOBYTE(v95) = PID(OBJECT_Actor,LOBYTE(v120));
1272 v99 = v95;
1273 v98 = (SoundID)17080;
1274 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
1275 return;
1095 } 1276 }
1096 } 1277 }
1097 v94 = 0; 1278 v94 = 0;
1098 goto LABEL_212; 1279 v5->pActorBuffs[14].Apply(
1280 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v94 << 7) * 0.033333335),
1281 v7,
1282 v6 + 5,
1283 0,
1284 0);
1285 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5, 0xFFFFFFu);
1286 v95 = 8 * LODWORD(v120);
1287 LOBYTE(v95) = PID(OBJECT_Actor,LOBYTE(v120));
1288 v99 = v95;
1289 v98 = (SoundID)17080;
1290 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
1291 return;
1099 } 1292 }
1100 if ( uSpellID == 90 ) 1293 if ( uSpellID == 90 )
1101 goto LABEL_159; 1294 goto LABEL_159;
1102 if ( uSpellID != 93 ) 1295 if ( uSpellID != 93 )
1103 { 1296 {
1109 if ( (signed int)v7 > 0 ) 1302 if ( (signed int)v7 > 0 )
1110 { 1303 {
1111 if ( (signed int)v7 <= 3 ) 1304 if ( (signed int)v7 <= 3 )
1112 { 1305 {
1113 v67 = 300 * v6; 1306 v67 = 300 * v6;
1114 goto LABEL_168;
1115 }
1116 if ( v7 == 4 )
1117 {
1118 v67 = 900 * v6;
1119 LABEL_168:
1120 v68 = v67 + 3840; 1307 v68 = v67 + 3840;
1121 LABEL_171:
1122 v5->pActorBuffs[20].Apply( 1308 v5->pActorBuffs[20].Apply(
1123 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v68 << 7) * 0.033333335), 1309 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v68 << 7) * 0.033333335),
1124 v7, 1310 v7,
1125 0, 1311 0,
1126 0, 1312 0,
1127 0); 1313 0);
1128 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5,0x7E7E7Eu); 1314 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5,0x7E7E7Eu);
1129 v106 = 0;
1130 v104 = 0;
1131 v103 = 0;
1132 v102 = 0;
1133 v69 = 8 * LODWORD(v120); 1315 v69 = 8 * LODWORD(v120);
1134 v101 = -1;
1135 LOBYTE(v69) = PID(OBJECT_Actor,LOBYTE(v120)); 1316 LOBYTE(v69) = PID(OBJECT_Actor,LOBYTE(v120));
1136 v100 = 0;
1137 v99 = v69; 1317 v99 = v69;
1138 v98 = (SoundID)18060; 1318 v98 = (SoundID)18060;
1139 goto LABEL_222; 1319 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
1320 return;
1321 }
1322 if ( v7 == 4 )
1323 {
1324 v67 = 900 * v6;
1325 v68 = v67 + 3840;
1326 v5->pActorBuffs[20].Apply(
1327 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v68 << 7) * 0.033333335),
1328 v7,
1329 0,
1330 0,
1331 0);
1332 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5,0x7E7E7Eu);
1333 v69 = 8 * LODWORD(v120);
1334 LOBYTE(v69) = PID(OBJECT_Actor,LOBYTE(v120));
1335 v99 = v69;
1336 v98 = (SoundID)18060;
1337 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
1338 return;
1140 } 1339 }
1141 } 1340 }
1142 v68 = 0; 1341 v68 = 0;
1143 goto LABEL_171; 1342 v5->pActorBuffs[20].Apply(
1343 pParty->uTimePlayed + (signed int)(signed __int64)((double)(v68 << 7) * 0.033333335),
1344 v7,
1345 0,
1346 0,
1347 0);
1348 pGame->pStru6Instance->_4A7E89_sparkles_on_actor_after_it_casts_buff(v5,0x7E7E7Eu);
1349 v69 = 8 * LODWORD(v120);
1350 LOBYTE(v69) = PID(OBJECT_Actor,LOBYTE(v120));
1351 v99 = v69;
1352 v98 = (SoundID)18060;
1353 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
1354 return;
1144 } 1355 }
1145 v70 = 3; 1356 v70 = 3;
1146 if ( uSkillLevel & 0x100 ) 1357 if ( uSkillLevel & 0x100 )
1147 { 1358 {
1148 v108 = 9; 1359 v108 = 9;
1223 } 1434 }
1224 while ( a1c <= spellnume / 2 ); 1435 while ( a1c <= spellnume / 2 );
1225 } 1436 }
1226 if ( v80 != -1 ) 1437 if ( v80 != -1 )
1227 { 1438 {
1228 v106 = 0;
1229 v104 = 0;
1230 v103 = 0;
1231 v102 = 0;
1232 v81 = 8 * v80; 1439 v81 = 8 * v80;
1233 v101 = -1;
1234 LOBYTE(v81) = v81 | 2; 1440 LOBYTE(v81) = v81 | 2;
1235 v100 = 0;
1236 v99 = v81; 1441 v99 = v81;
1237 v22 = (SoundID)word_4EE088_sound_ids[93]; 1442 v22 = (SoundID)word_4EE088_sound_ids[93];
1238 goto LABEL_202; 1443 v98 = v22;
1444 pAudioPlayer->PlaySound(v98, v99, 0, -1, 0, 0, 0, 0);
1445 return;
1239 } 1446 }
1240 } 1447 }
1241 1448
1242 //----- (0043ABB0) -------------------------------------------------------- 1449 //----- (0043ABB0) --------------------------------------------------------
1243 bool Actor::ArePeasantsOfSameFaction(Actor *a1, Actor *a2) 1450 bool Actor::ArePeasantsOfSameFaction(Actor *a1, Actor *a2)