comparison mm7_3.cpp @ 835:72f6df90df98

EventCastSpell
author Ritor1
date Wed, 27 Mar 2013 23:20:14 +0600
parents 9c3f28b31b4a
children b66abf8b7d50
comparison
equal deleted inserted replaced
834:95d9727412c9 835:72f6df90df98
13614 } 13614 }
13615 } 13615 }
13616 } 13616 }
13617 13617
13618 //----- (00448DF8) -------------------------------------------------------- 13618 //----- (00448DF8) --------------------------------------------------------
13619 void __fastcall sub_448DF8_cast_spell(int spellnum, int rank, int level, int fromx, int fromy, int fromz, int tox, int toy, int toz) 13619 void __fastcall EventCastSpell(int spellnum, int uSkillLevel, int uSkill, int fromx, int fromy, int fromz, int tox, int toy, int toz)//sub_448DF8
13620 { 13620 {
13621 int v9; // esi@1 13621 int v9; // esi@1
13622 double v10; // st7@4 13622 double v10; // st7@4
13623 double v11; // st6@4 13623 double v11; // st6@4
13624 double v12; // st5@4 13624 double v12; // st5@4
13681 int a8b; // [sp+D0h] [bp+1Ch]@37 13681 int a8b; // [sp+D0h] [bp+1Ch]@37
13682 int a8c; // [sp+D0h] [bp+1Ch]@55 13682 int a8c; // [sp+D0h] [bp+1Ch]@55
13683 float toza; // [sp+D4h] [bp+20h]@6 13683 float toza; // [sp+D4h] [bp+20h]@6
13684 13684
13685 v9 = 0; 13685 v9 = 0;
13686 v59 = rank + 1; 13686 v59 = uSkillLevel + 1;
13687 //spellnum_ = spellnum; 13687 //spellnum_ = spellnum;
13688 v60 = 0; 13688 v60 = 0;
13689 if ( tox || toy || toz ) 13689 if ( tox || toy || toz )
13690 { 13690 {
13691 v10 = (double)tox - (double)fromx; 13691 v10 = (double)tox - (double)fromx;
13738 if ( v40 ) 13738 if ( v40 )
13739 { 13739 {
13740 v41 = v40 - 1; 13740 v41 = v40 - 1;
13741 if ( !v41 ) 13741 if ( !v41 )
13742 { 13742 {
13743 v42 = 14400 * level; 13743 v42 = 14400 * uSkill;
13744 v43 = 4 * level + 10; 13744 v43 = 4 * uSkill + 10;
13745 goto LABEL_114; 13745 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 0);
13746 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 1u);
13747 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 2u);
13748 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 3u);
13749 v39 = (signed __int64)((double)(v42 << 7) * 0.033333335);
13750 v37 = &pParty->pPartyBuffs[2];
13751 v36 = pParty->uTimePlayed + v39;
13752 v37->Apply(v36, a7b, v43, 0, 0);
13753 goto LABEL_139;
13746 } 13754 }
13747 if ( v41 == 1 ) 13755 if ( v41 == 1 )
13748 { 13756 {
13749 v42 = 18000 * level; 13757 v42 = 18000 * uSkill;
13750 v43 = 5 * level + 10; 13758 v43 = 5 * uSkill + 10;
13751 goto LABEL_114; 13759 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 0);
13752 } 13760 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 1u);
13753 } 13761 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 2u);
13754 v42 = 10800 * level; 13762 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 3u);
13755 v43 = 3 * level + 10; 13763 v39 = (signed __int64)((double)(v42 << 7) * 0.033333335);
13756 LABEL_114: 13764 v37 = &pParty->pPartyBuffs[2];
13765 v36 = pParty->uTimePlayed + v39;
13766 v37->Apply(v36, a7b, v43, 0, 0);
13767 goto LABEL_139;
13768 }
13769 }
13770 v42 = 10800 * uSkill;
13771 v43 = 3 * uSkill + 10;
13757 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 0); 13772 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 0);
13758 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 1u); 13773 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 1u);
13759 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 2u); 13774 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 2u);
13760 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 3u); 13775 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 3u);
13761 v52 = 0;
13762 v50 = 0;
13763 v48 = v43;
13764 v46 = a7b;
13765 v39 = (signed __int64)((double)(v42 << 7) * 0.033333335); 13776 v39 = (signed __int64)((double)(v42 << 7) * 0.033333335);
13766 v37 = &pParty->pPartyBuffs[2]; 13777 v37 = &pParty->pPartyBuffs[2];
13767 LABEL_115:
13768 v36 = pParty->uTimePlayed + v39; 13778 v36 = pParty->uTimePlayed + v39;
13769 LABEL_116: 13779 v37->Apply(v36, a7b, v43, 0, 0);
13770 v37->Apply(v36, v46, v48, v50, v52);
13771 goto LABEL_139; 13780 goto LABEL_139;
13772 } 13781 }
13773 if ( spellnum != 58 ) 13782 if ( spellnum != 58 )
13774 { 13783 {
13775 switch ( spellnum ) 13784 switch ( spellnum )
13783 case 39: 13792 case 39:
13784 case 41: 13793 case 41:
13785 a1.stru_24.Reset(); 13794 a1.stru_24.Reset();
13786 v16 = 0; 13795 v16 = 0;
13787 a1.spell_id = spellnum; 13796 a1.spell_id = spellnum;
13788 a1.spell_level = level; 13797 a1.spell_level = uSkill;
13789 a1.spell_skill = v15; 13798 a1.spell_skill = v15;
13790 if ( (signed int)pObjectList->uNumObjects <= 0 ) 13799 if ( (signed int)pObjectList->uNumObjects <= 0 )
13791 goto LABEL_34; 13800 {
13801 v18 = 0;
13802 a1.uObjectDescID = v18;
13803 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy);
13804 a1.vPosition.x = fromx;
13805 a1.uAttributes = 16;
13806 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz);
13807 a1.field_60_distance_related_prolly_lod = v55;
13808 v20 = yaw;
13809 a1.uSpriteFrameID = 0;
13810 a1.spell_caster_pid = 8000 | OBJECT_Item;
13811 a1.spell_target_pid = 0;
13812 a1.uFacing = yaw;
13813 a1.uSoundID = 0;
13814 v49 = pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed;
13815 a1.Create(v20, pitch, v49, 0);
13816 goto LABEL_139;
13817 }
13792 v17 = (char *)&pObjectList->pObjects->uObjectID; 13818 v17 = (char *)&pObjectList->pObjects->uObjectID;
13793 while ( (short)a1.uType != *(short *)v17 ) 13819 while ( (short)a1.uType != *(short *)v17 )
13794 { 13820 {
13795 ++v16; 13821 ++v16;
13796 v17 += 56; 13822 v17 += 56;
13797 if ( v16 >= (signed int)pObjectList->uNumObjects ) 13823 if ( v16 >= (signed int)pObjectList->uNumObjects )
13798 goto LABEL_34; 13824 {
13825 v18 = 0;
13826 a1.uObjectDescID = v18;
13827 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy);
13828 a1.vPosition.x = fromx;
13829 a1.uAttributes = 16;
13830 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz);
13831 a1.field_60_distance_related_prolly_lod = v55;
13832 v20 = yaw;
13833 a1.uSpriteFrameID = 0;
13834 a1.spell_caster_pid = 8000 | OBJECT_Item;
13835 a1.spell_target_pid = 0;
13836 a1.uFacing = yaw;
13837 a1.uSoundID = 0;
13838 v49 = pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed;
13839 a1.Create(v20, pitch, v49, 0);
13840 goto LABEL_139;
13841 }
13799 } 13842 }
13800 LABEL_20:
13801 v18 = v16; 13843 v18 = v16;
13802 goto LABEL_35; 13844 a1.uObjectDescID = v18;
13845 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy);
13846 a1.vPosition.x = fromx;
13847 a1.uAttributes = 16;
13848 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz);
13849 a1.field_60_distance_related_prolly_lod = v55;
13850 v20 = yaw;
13851 a1.uSpriteFrameID = 0;
13852 a1.spell_caster_pid = 8000 | OBJECT_Item;
13853 a1.spell_target_pid = 0;
13854 a1.uFacing = yaw;
13855 a1.uSoundID = 0;
13856 v49 = pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed;
13857 a1.Create(v20, pitch, v49, 0);
13858 goto LABEL_139;
13803 case 24: 13859 case 24:
13804 switch ( v15 ) 13860 switch ( v15 )
13805 { 13861 {
13806 case 1: 13862 case 1:
13807 v60 = 1; 13863 v60 = 1;
13821 { 13877 {
13822 a8b = a7c / (v60 - 1); 13878 a8b = a7c / (v60 - 1);
13823 a1.stru_24.Reset(); 13879 a1.stru_24.Reset();
13824 v21 = 0; 13880 v21 = 0;
13825 a1.spell_id = spellnum; 13881 a1.spell_id = spellnum;
13826 a1.spell_level = level; 13882 a1.spell_level = uSkill;
13827 a1.spell_skill = v15; 13883 a1.spell_skill = v15;
13828 if ( (signed int)pObjectList->uNumObjects <= 0 ) 13884 if ( (signed int)pObjectList->uNumObjects <= 0 )
13829 { 13885 {
13830 LABEL_41:
13831 v23 = 0; 13886 v23 = 0;
13832 } 13887 }
13833 else 13888 else
13834 { 13889 {
13835 v22 = (char *)&pObjectList->pObjects->uObjectID; 13890 v22 = (char *)&pObjectList->pObjects->uObjectID;
13836 while ( (short)a1.uType != *(short *)v22 ) 13891 while ( (short)a1.uType != *(short *)v22 )
13837 { 13892 {
13838 ++v21; 13893 ++v21;
13839 v22 += 56; 13894 v22 += 56;
13840 if ( v21 >= (signed int)pObjectList->uNumObjects ) 13895 if ( v21 >= (signed int)pObjectList->uNumObjects )
13841 goto LABEL_41; 13896 {
13897 v23 = 0;
13898 a1.uObjectDescID = v23;
13899 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy);
13900 a1.vPosition.x = fromx;
13901 a1.uAttributes = 16;
13902 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz);
13903 a1.field_60_distance_related_prolly_lod = v55;
13904 a1.uSpriteFrameID = 0;
13905 a1.spell_caster_pid = 8000 | OBJECT_Item;
13906 a1.spell_target_pid = 4;
13907 a1.uSoundID = 0;
13908 for ( i = a7c / -2; i <= a7c / 2; i += a8b )
13909 {
13910 a1.uFacing = i + yaw;
13911 a1.Create((signed __int16)(i + (short)yaw), pitch, pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed, 0);
13912 }
13913 goto LABEL_139;
13914 }
13842 } 13915 }
13843 v23 = v21; 13916 v23 = v21;
13844 } 13917 }
13845 a1.uObjectDescID = v23; 13918 a1.uObjectDescID = v23;
13846 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy); 13919 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy);
13853 a1.spell_target_pid = 4; 13926 a1.spell_target_pid = 4;
13854 a1.uSoundID = 0; 13927 a1.uSoundID = 0;
13855 for ( i = a7c / -2; i <= a7c / 2; i += a8b ) 13928 for ( i = a7c / -2; i <= a7c / 2; i += a8b )
13856 { 13929 {
13857 a1.uFacing = i + yaw; 13930 a1.uFacing = i + yaw;
13858 a1.Create( 13931 a1.Create((signed __int16)(i + (short)yaw), pitch, pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed, 0);
13859 (signed __int16)(i + (short)yaw),
13860 pitch,
13861 pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed,
13862 0);
13863 } 13932 }
13864 goto LABEL_139; 13933 goto LABEL_139;
13865 } 13934 }
13866 a1.stru_24.Reset(); 13935 a1.stru_24.Reset();
13867 v16 = 0; 13936 v16 = 0;
13868 a1.spell_id = spellnum; 13937 a1.spell_id = spellnum;
13869 a1.spell_level = level; 13938 a1.spell_level = uSkill;
13870 a1.spell_skill = v15; 13939 a1.spell_skill = v15;
13871 if ( (signed int)pObjectList->uNumObjects <= 0 ) 13940 if ( (signed int)pObjectList->uNumObjects <= 0 )
13872 goto LABEL_34; 13941 {
13942 v18 = 0;
13943 a1.uObjectDescID = v18;
13944 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy);
13945 a1.vPosition.x = fromx;
13946 a1.uAttributes = 16;
13947 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz);
13948 a1.field_60_distance_related_prolly_lod = v55;
13949 v20 = yaw;
13950 a1.uSpriteFrameID = 0;
13951 a1.spell_caster_pid = 8000 | OBJECT_Item;
13952 a1.spell_target_pid = 0;
13953 a1.uFacing = yaw;
13954 a1.uSoundID = 0;
13955 v51 = 0;
13956 v49 = pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed;
13957 v47 = pitch;
13958 a1.Create(v20, v47, v49, v51);
13959 goto LABEL_139;
13960 }
13873 v19 = (char *)&pObjectList->pObjects->uObjectID; 13961 v19 = (char *)&pObjectList->pObjects->uObjectID;
13874 do 13962 do
13875 { 13963 {
13876 if ( (short)a1.uType == *(short *)v19 ) 13964 if ( (short)a1.uType == *(short *)v19 )
13877 goto LABEL_20; 13965 {
13966 v18 = v16;
13967 a1.uObjectDescID = v18;
13968 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy);
13969 a1.vPosition.x = fromx;
13970 a1.uAttributes = 16;
13971 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz);
13972 a1.field_60_distance_related_prolly_lod = v55;
13973 v20 = yaw;
13974 a1.uSpriteFrameID = 0;
13975 a1.spell_caster_pid = 8000 | OBJECT_Item;
13976 a1.spell_target_pid = 0;
13977 a1.uFacing = yaw;
13978 a1.uSoundID = 0;
13979 v51 = 0;
13980 v49 = pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed;
13981 v47 = pitch;
13982 a1.Create(v20, v47, v49, v51);
13983 goto LABEL_139;
13984 }
13878 ++v16; 13985 ++v16;
13879 v19 += 56; 13986 v19 += 56;
13880 } 13987 }
13881 while ( v16 < (signed int)pObjectList->uNumObjects ); 13988 while ( v16 < (signed int)pObjectList->uNumObjects );
13882 LABEL_34:
13883 v18 = 0; 13989 v18 = 0;
13884 LABEL_35:
13885 a1.uObjectDescID = v18; 13990 a1.uObjectDescID = v18;
13886 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy); 13991 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy);
13887 a1.vPosition.x = fromx; 13992 a1.vPosition.x = fromx;
13888 a1.uAttributes = 16; 13993 a1.uAttributes = 16;
13889 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz); 13994 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz);
13895 a1.uFacing = yaw; 14000 a1.uFacing = yaw;
13896 a1.uSoundID = 0; 14001 a1.uSoundID = 0;
13897 v51 = 0; 14002 v51 = 0;
13898 v49 = pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed; 14003 v49 = pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed;
13899 v47 = pitch; 14004 v47 = pitch;
13900 goto LABEL_36; 14005 a1.Create(v20, v47, v49, v51);
14006 goto LABEL_139;
13901 case 15: 14007 case 15:
13902 switch ( v15 ) 14008 switch ( v15 )
13903 { 14009 {
13904 case 1: 14010 case 1:
13905 v60 = 3; 14011 v60 = 3;
13917 a7d = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360; 14023 a7d = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360;
13918 a8c = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360 / (v60 - 1); 14024 a8c = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360 / (v60 - 1);
13919 a1.stru_24.Reset(); 14025 a1.stru_24.Reset();
13920 v25 = 0; 14026 v25 = 0;
13921 a1.spell_id = spellnum; 14027 a1.spell_id = spellnum;
13922 a1.spell_level = level; 14028 a1.spell_level = uSkill;
13923 a1.spell_skill = v15; 14029 a1.spell_skill = v15;
13924 if ( (signed int)pObjectList->uNumObjects <= 0 ) 14030 if ( (signed int)pObjectList->uNumObjects <= 0 )
13925 goto LABEL_59; 14031 {
14032 v27 = 0;
14033 a1.uObjectDescID = v27;
14034 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy);
14035 a1.vPosition.x = fromx;
14036 a1.uAttributes = 16;
14037 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz);
14038 a1.field_60_distance_related_prolly_lod = v55;
14039 a1.uSpriteFrameID = 0;
14040 a1.spell_caster_pid = 8000 | OBJECT_Item;
14041 a1.spell_target_pid = 4;
14042 a1.uSoundID = 0;
14043 for ( j = a7d / -2; j <= a7d / 2; j += a8c )
14044 {
14045 a1.uFacing = j + yaw;
14046 a1.Create((signed __int16)(j + (short)yaw), pitch, pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed, 0);
14047 }
14048 goto LABEL_139;
14049 }
13926 v26 = (char *)&pObjectList->pObjects->uObjectID; 14050 v26 = (char *)&pObjectList->pObjects->uObjectID;
13927 while ( (short)a1.uType != *(short *)v26 ) 14051 while ( (short)a1.uType != *(short *)v26 )
13928 { 14052 {
13929 ++v25; 14053 ++v25;
13930 v26 += 56; 14054 v26 += 56;
13931 if ( v25 >= (signed int)pObjectList->uNumObjects ) 14055 if ( v25 >= (signed int)pObjectList->uNumObjects )
13932 { 14056 {
13933 LABEL_59:
13934 v27 = 0; 14057 v27 = 0;
13935 goto LABEL_60; 14058 a1.uObjectDescID = v27;
14059 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy);
14060 a1.vPosition.x = fromx;
14061 a1.uAttributes = 16;
14062 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz);
14063 a1.field_60_distance_related_prolly_lod = v55;
14064 a1.uSpriteFrameID = 0;
14065 a1.spell_caster_pid = 8000 | OBJECT_Item;
14066 a1.spell_target_pid = 4;
14067 a1.uSoundID = 0;
14068 for ( j = a7d / -2; j <= a7d / 2; j += a8c )
14069 {
14070 a1.uFacing = j + yaw;
14071 a1.Create((signed __int16)(j + (short)yaw), pitch, pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed, 0);
14072 }
14073 goto LABEL_139;
13936 } 14074 }
13937 } 14075 }
13938 v27 = v25; 14076 v27 = v25;
13939 LABEL_60:
13940 a1.uObjectDescID = v27; 14077 a1.uObjectDescID = v27;
13941 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy); 14078 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy);
13942 a1.vPosition.x = fromx; 14079 a1.vPosition.x = fromx;
13943 a1.uAttributes = 16; 14080 a1.uAttributes = 16;
13944 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz); 14081 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz);
13961 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor ) 14098 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor )
13962 return; 14099 return;
13963 a1.stru_24.Reset(); 14100 a1.stru_24.Reset();
13964 v29 = 0; 14101 v29 = 0;
13965 a1.spell_id = spellnum; 14102 a1.spell_id = spellnum;
13966 a1.spell_level = level; 14103 a1.spell_level = uSkill;
13967 a1.spell_skill = v15; 14104 a1.spell_skill = v15;
13968 if ( (signed int)pObjectList->uNumObjects <= 0 ) 14105 if ( (signed int)pObjectList->uNumObjects <= 0 )
13969 goto LABEL_70; 14106 {
14107 v31 = 0;
14108 a1.uObjectDescID = v31;
14109 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy);
14110 a1.vPosition.x = fromx;
14111 a1.uAttributes = 16;
14112 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz);
14113 a1.field_60_distance_related_prolly_lod = v55;
14114 a1.uSpriteFrameID = 0;
14115 a1.spell_caster_pid = 8000 | OBJECT_Item;
14116 a1.spell_target_pid = 4;
14117 a1.uSoundID = 0;
14118 v51 = 0;
14119 v49 = pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed;
14120 v20 = yaw;
14121 v47 = (signed int)stru_5C6E00->uIntegerHalfPi / 2;
14122 a1.Create(v20, v47, v49, v51);
14123 goto LABEL_139;
14124 }
13970 v30 = (char *)&pObjectList->pObjects->uObjectID; 14125 v30 = (char *)&pObjectList->pObjects->uObjectID;
13971 break; 14126 break;
13972 14127
13973 case SPELL_FIRE_HASTE: 14128 case SPELL_FIRE_HASTE:
13974 if ( v15 > 0 ) 14129 if ( v15 > 0 )
13975 { 14130 {
13976 if ( v15 <= 2 ) 14131 if ( v15 <= 2 )
13977 { 14132 {
13978 v9 = 60 * (level + 60); 14133 v9 = 60 * (uSkill + 60);
13979 } 14134 }
13980 else 14135 else
13981 { 14136 {
13982 if ( v15 == 3 ) 14137 if ( v15 == 3 )
13983 { 14138 {
13984 v9 = 180 * (level + 20); 14139 v9 = 180 * (uSkill + 20);
13985 } 14140 }
13986 else 14141 else
13987 { 14142 {
13988 if ( v15 == 4 ) 14143 if ( v15 == 4 )
13989 v9 = 240 * (level + 15); 14144 v9 = 240 * (uSkill + 15);
13990 } 14145 }
13991 } 14146 }
13992 } 14147 }
13993 //levela = 1; 14148 //levela = 1;
13994 //v32 = pParty->pPlayers;//[0].pConditions[1]; 14149 //v32 = pParty->pPlayers;//[0].pConditions[1];
14015 case 51: 14170 case 51:
14016 switch ( v15 ) 14171 switch ( v15 )
14017 { 14172 {
14018 case 1: 14173 case 1:
14019 case 2: 14174 case 2:
14020 v9 = 300 * (level + 12); 14175 v9 = 300 * (uSkill + 12);
14021 break; 14176 break;
14022 case 3: 14177 case 3:
14023 v9 = 900 * (level + 4); 14178 v9 = 900 * (uSkill + 4);
14024 break; 14179 break;
14025 case 4: 14180 case 4:
14026 v9 = 3600 * (level + 1); 14181 v9 = 3600 * (uSkill + 1);
14027 break; 14182 break;
14028 } 14183 }
14029 switch ( spellnum ) 14184 switch ( spellnum )
14030 { 14185 {
14031 case 17: 14186 case 17:
14032 v60 = 0; 14187 v60 = 0;
14033 level = 14; 14188 uSkill = 14;
14034 break; 14189 break;
14035 case 38: 14190 case 38:
14036 v35 = level + 5; 14191 v35 = uSkill + 5;
14037 level = 15; 14192 uSkill = 15;
14038 v60 = v35; 14193 v60 = v35;
14039 break; 14194 break;
14040 case 51: 14195 case 51:
14041 v34 = level + 5; 14196 v34 = uSkill + 5;
14042 level = 9; 14197 uSkill = 9;
14043 v60 = v34; 14198 v60 = v34;
14044 break; 14199 break;
14045 } 14200 }
14046 pGame->pStru6Instance->SetPlayerBuffAnim(spellnum, 0); 14201 pGame->pStru6Instance->SetPlayerBuffAnim(spellnum, 0);
14047 pGame->pStru6Instance->SetPlayerBuffAnim(spellnum, 1); 14202 pGame->pStru6Instance->SetPlayerBuffAnim(spellnum, 1);
14050 v52 = 0; 14205 v52 = 0;
14051 v50 = 0; 14206 v50 = 0;
14052 v48 = v60; 14207 v48 = v60;
14053 v46 = v15; 14208 v46 = v15;
14054 v36 = pParty->uTimePlayed + (signed int)(signed __int64)((double)(v9 << 7) * 0.033333335); 14209 v36 = pParty->uTimePlayed + (signed int)(signed __int64)((double)(v9 << 7) * 0.033333335);
14055 v37 = &pParty->pPartyBuffs[level]; 14210 v37 = &pParty->pPartyBuffs[uSkill];
14056 goto LABEL_116; 14211 v37->Apply(v36, v46, v48, v50, v52);
14212 goto LABEL_139;;
14057 case 8: 14213 case 8:
14058 if ( v15 == 2 || v15 == 3 || v15 != 4 ) 14214 if ( v15 == 2 || v15 == 3 || v15 != 4 )
14059 v38 = 60 * level; 14215 v38 = 60 * uSkill;
14060 else 14216 else
14061 v38 = 600 * level; 14217 v38 = 600 * uSkill;
14062 pGame->pStru6Instance->SetPlayerBuffAnim(spellnum, 0); 14218 pGame->pStru6Instance->SetPlayerBuffAnim(spellnum, 0);
14063 pGame->pStru6Instance->SetPlayerBuffAnim(spellnum, 1); 14219 pGame->pStru6Instance->SetPlayerBuffAnim(spellnum, 1);
14064 pGame->pStru6Instance->SetPlayerBuffAnim(spellnum, 2); 14220 pGame->pStru6Instance->SetPlayerBuffAnim(spellnum, 2);
14065 pGame->pStru6Instance->SetPlayerBuffAnim(spellnum, 3); 14221 pGame->pStru6Instance->SetPlayerBuffAnim(spellnum, 3);
14066 v52 = 0; 14222 v52 = 0;
14067 v50 = 0; 14223 v50 = 0;
14068 v48 = level; 14224 v48 = uSkill;
14069 v46 = v15; 14225 v46 = v15;
14070 v39 = (signed __int64)((double)(v38 << 7) * 0.033333335); 14226 v39 = (signed __int64)((double)(v38 << 7) * 0.033333335);
14071 v37 = &pParty->pPartyBuffs[10]; 14227 v37 = &pParty->pPartyBuffs[10];
14072 goto LABEL_115; 14228 v36 = pParty->uTimePlayed + v39;
14229 v37->Apply(v36, v46, v48, v50, v52);
14230 goto LABEL_139;
14073 case 3: 14231 case 3:
14074 case 14: 14232 case 14:
14075 case 25: 14233 case 25:
14076 case 36: 14234 case 36:
14077 goto LABEL_117; 14235 goto LABEL_117;
14082 { 14240 {
14083 ++v29; 14241 ++v29;
14084 v30 += 56; 14242 v30 += 56;
14085 if ( v29 >= (signed int)pObjectList->uNumObjects ) 14243 if ( v29 >= (signed int)pObjectList->uNumObjects )
14086 { 14244 {
14087 LABEL_70:
14088 v31 = 0; 14245 v31 = 0;
14089 goto LABEL_71; 14246 a1.uObjectDescID = v31;
14247 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy);
14248 a1.vPosition.x = fromx;
14249 a1.uAttributes = 16;
14250 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz);
14251 a1.field_60_distance_related_prolly_lod = v55;
14252 a1.uSpriteFrameID = 0;
14253 a1.spell_caster_pid = 8000 | OBJECT_Item;
14254 a1.spell_target_pid = 4;
14255 a1.uSoundID = 0;
14256 v51 = 0;
14257 v49 = pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed;
14258 v20 = yaw;
14259 v47 = (signed int)stru_5C6E00->uIntegerHalfPi / 2;
14260 a1.Create(v20, v47, v49, v51);
14261 goto LABEL_139;
14090 } 14262 }
14091 } 14263 }
14092 v31 = v29; 14264 v31 = v29;
14093 LABEL_71:
14094 a1.uObjectDescID = v31; 14265 a1.uObjectDescID = v31;
14095 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy); 14266 *(_QWORD *)&a1.vPosition.y = __PAIR__(fromz, fromy);
14096 a1.vPosition.x = fromx; 14267 a1.vPosition.x = fromx;
14097 a1.uAttributes = 16; 14268 a1.uAttributes = 16;
14098 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz); 14269 a1.uSectorID = pIndoor->GetSector(fromx, fromy, fromz);
14103 a1.uSoundID = 0; 14274 a1.uSoundID = 0;
14104 v51 = 0; 14275 v51 = 0;
14105 v49 = pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed; 14276 v49 = pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed;
14106 v20 = yaw; 14277 v20 = yaw;
14107 v47 = (signed int)stru_5C6E00->uIntegerHalfPi / 2; 14278 v47 = (signed int)stru_5C6E00->uIntegerHalfPi / 2;
14108 LABEL_36:
14109 a1.Create(v20, v47, v49, v51); 14279 a1.Create(v20, v47, v49, v51);
14110 goto LABEL_139; 14280 goto LABEL_139;
14111 } 14281 }
14112 LABEL_117: 14282 LABEL_117:
14113 v44 = level; 14283 v44 = uSkill;
14114 a6_4 = 3600 * level; 14284 a6_4 = 3600 * uSkill;
14115 if ( v15 == 1 ) 14285 if ( v15 == 1 )
14116 { 14286 {
14117 LABEL_124:
14118 v60 = v44; 14287 v60 = v44;
14119 goto LABEL_125; 14288 goto LABEL_125;
14120 } 14289 }
14121 if ( v15 == 2 ) 14290 if ( v15 == 2 )
14122 { 14291 {
14123 v44 = 2 * level; 14292 v44 = 2 * uSkill;
14124 goto LABEL_124; 14293 v60 = v44;
14294 goto LABEL_125;
14125 } 14295 }
14126 if ( v15 == 3 ) 14296 if ( v15 == 3 )
14127 { 14297 {
14128 v44 = 3 * level; 14298 v44 = 3 * uSkill;
14129 goto LABEL_124; 14299 v60 = v44;
14300 goto LABEL_125;
14130 } 14301 }
14131 if ( v15 == 4 ) 14302 if ( v15 == 4 )
14132 { 14303 {
14133 v44 = 4 * level; 14304 v44 = 4 * uSkill;
14134 goto LABEL_124; 14305 v60 = v44;
14306 goto LABEL_125;
14135 } 14307 }
14136 LABEL_125: 14308 LABEL_125:
14137 switch ( spellnum ) 14309 switch ( spellnum )
14138 { 14310 {
14139 case 3: 14311 case 3:
14140 level = 6; 14312 uSkill = 6;
14141 break; 14313 break;
14142 case 14: 14314 case 14:
14143 level = 0; 14315 uSkill = 0;
14144 break; 14316 break;
14145 case 25: 14317 case 25:
14146 level = 17; 14318 uSkill = 17;
14147 break; 14319 break;
14148 case 36: 14320 case 36:
14149 level = 4; 14321 uSkill = 4;
14150 break; 14322 break;
14151 case 58: 14323 case 58:
14152 level = 12; 14324 uSkill = 12;
14153 break; 14325 break;
14154 case 69: 14326 case 69:
14155 level = 1; 14327 uSkill = 1;
14156 break; 14328 break;
14157 } 14329 }
14158 //v45 = spellnum_; 14330 //v45 = spellnum_;
14159 pGame->pStru6Instance->SetPlayerBuffAnim(spellnum, 0); 14331 pGame->pStru6Instance->SetPlayerBuffAnim(spellnum, 0);
14160 pGame->pStru6Instance->SetPlayerBuffAnim(spellnum, 1); 14332 pGame->pStru6Instance->SetPlayerBuffAnim(spellnum, 1);
14161 pGame->pStru6Instance->SetPlayerBuffAnim(spellnum, 2); 14333 pGame->pStru6Instance->SetPlayerBuffAnim(spellnum, 2);
14162 pGame->pStru6Instance->SetPlayerBuffAnim(spellnum, 3); 14334 pGame->pStru6Instance->SetPlayerBuffAnim(spellnum, 3);
14163 pParty->pPartyBuffs[level].Apply( 14335 pParty->pPartyBuffs[uSkill].Apply(pParty->uTimePlayed + (signed int)(signed __int64)((double)a6_4 * 4.2666669), v15, v60, 0, 0);
14164 pParty->uTimePlayed + (signed int)(signed __int64)((double)a6_4 * 4.2666669),
14165 v15,
14166 v60,
14167 0,
14168 0);
14169 //levela = 1; 14336 //levela = 1;
14170 LABEL_138: 14337 LABEL_138:
14171 //if ( levela ) 14338 //if ( levela )
14172 LABEL_139: 14339 LABEL_139:
14173 pAudioPlayer->PlaySound((SoundID)word_4EE088_sound_ids[spellnum], 0, 0, fromx, fromy, 0, 0, 0); 14340 pAudioPlayer->PlaySound((SoundID)word_4EE088_sound_ids[spellnum], 0, 0, fromx, fromy, 0, 0, 0);