Mercurial > mm7
diff CastSpellInfo.cpp @ 2190:0acbf1f82c70
CastSpell fix
author | Ritor1 |
---|---|
date | Wed, 29 Jan 2014 22:08:04 +0600 |
parents | 0e2bee275f60 |
children | 48a28fe1f32f |
line wrap: on
line diff
--- a/CastSpellInfo.cpp Wed Jan 29 17:26:24 2014 +0600 +++ b/CastSpellInfo.cpp Wed Jan 29 22:08:04 2014 +0600 @@ -37,65 +37,21 @@ signed int v6; // eax@14 unsigned __int16 v11; // cx@45 signed int i; // esi@76 - __int16 v23; // ax@88 - signed __int64 v54; // qax@164 - signed __int64 v58; // qax@177 Actor *pActor; // edi@177 - unsigned __int16 v60; // ax@184 int v61; // ecx@184 - double v90; // st7@245 - Player *v92; // eax@255 - int v105; // edi@271 int v111; // eax@274 - Actor *v112; // esi@278 int dist_X; // eax@278 int new_dist_Y; int dist_Z; - int v114; // ebx@278 - unsigned int v115; // ecx@278 int v116; // edx@279 int v117; // edx@281 int v118; // edx@283 - signed int v122; // eax@286 - int v127; // eax@296 - int v153; // ecx@322 - int v154; // eax@322 - int v155; // eax@323 - int v156; // eax@323 - int v162; // edi@340 - signed int v164; // eax@340 - signed int v165; // edi@340 - signed int v168; // edi@343 int v169; // eax@344 - signed int v174; // edi@355 int v188; // esi@369 int v189; // edi@369 - signed int v191; // edi@379 - signed int v205; // edi@405 int v206; // eax@407 - __int16 v207; // cx@407 - int v208; // eax@411 - signed int v209; // ecx@412 - int v210; // edx@412 - signed int v211; // ecx@412 - int v212; // eax@413 - int v213; // eax@413 - int v214; // eax@413 - int v215; // eax@415 - double v216; // st7@415 - double v217; // st6@415 - signed __int64 v218; // qtt@423 - char v223; // al@438 - int v227; // esi@453 - unsigned int v228; // edi@454 - int v229; // edi@466 - ItemGen *v240; // ecx@472 double v241; // st7@478 ItemGen *v245; // edi@492 - int v254; // eax@513 - int v255; // esi@513 - int v256; // ecx@513 - int v257; // edx@514 int v258; // ecx@514 char v259; // al@516 int v260; // eax@518 @@ -107,8 +63,6 @@ int *ii; // eax@522 int v267; // eax@524 int v268; // eax@524 - char v271; // al@531 - int v277; // edx@548 int v278; // ecx@548 char v279; // al@550 int v280; // eax@552 @@ -118,133 +72,19 @@ int v284; // esi@555 int v285; // edx@555 int *l; // eax@556 - ItemGen *v294; // esi@575 int v295; // edx@575 - int kk; // edi@575 char v313; // al@606pGame->GetStru6() const char *v317; // ecx@617 - Player *v318; // ecx@619 - unsigned int v319; // edi@627 - int v323; // edi@635 - char *v324; // eax@635 - Player *v325; // ecx@640 - int v328; // ecx@651 - int v329; // ecx@652 - int v330; // edi@654 - signed int v342; // edi@668 - signed int v343; // edi@670 - unsigned __int64 v344; // ST08_8@670 - Player *v351; // edi@680 - Player *v357; // edi@694 - Actor *v369; // edi@705 - int v373; // eax@715 - int v374; // eax@717 - int v376; // eax@717 - Player *v377; // ecx@719 - int v381; // edi@727 - int v382; // ecx@727 - Player *v383; // eax@728 - int v384; // eax@733 - int v388; // edi@740 int v396; // eax@752 - int v397; // eax@757 - int v398; // eax@757 - int v399; // eax@757 - Actor *v417; // eax@787 - int v418; // ecx@789 - __int16 v419; // ax@791 - signed int v420; // eax@793 - ItemGen *v421; // edx@793 - const char *v422; // eax@801 - signed int v426; // eax@815 - Actor *v433; // edi@832 - int v435; // ecx@837 - int v440; // eax@843 - int v441; // eax@847 - signed int v445; // edi@857 __int16 v448; // ax@864 - char *v449; // esi@870 - int v450; // eax@870 - signed int v460; // eax@895 - Actor *v461; // eax@897 - unsigned __int16 v462; // cx@897 - signed int v463; // edx@897 - int v470; // edi@913 - int v471; // eax@917 - int v472; // eax@917 - int v498; // edi@931 - int v499; // eax@935 - int v500; // eax@935 - Player *v501; // edi@939 - int v505; // eax@943 - int v507; // edi@944 - signed int v509; // eax@944 - Actor *v518; // edx@957 - __int16 v519; // cx@958 - int v531; // eax@982 - int v533; // edi@983 - signed int v535; // eax@983 - signed int v536; // edi@983 - stru6 *v537; // eax@984 - double v549; // st7@991 - unsigned __int16 v550; // di@991 - Player *v553; // edi@1001 - unsigned __int16 v562; // di@1005 - signed int v563; // eax@1010 - unsigned int v564; // ecx@1011 - signed int v565; // eax@1012 - Player **v566; // ecx@1012 - int v567; // eax@1012 - Player *v571; // eax@1013 - char *v572; // ecx@1013 - signed int v576; // eax@1025 - Player *v577; // eax@1026 - int v578; // eax@1028 - __int16 v579; // ax@1029 - int v581; // edi@1031 - char *v585; // esi@1034 - signed int v587; // eax@1035 - char v591; // al@1048 - ItemGen *v592; // esi@1052 - int v596; // esi@1066 - unsigned int v597; // edi@1067 - NPCData *pNPCData; // eax@1089 - int v606; // edx@1091 - AwardType *v607; // ecx@1100 - __int16 v608; // ax@1102 - signed int v609; // eax@1104 - int v610; // edi@1106 - unsigned int v611; // eax@1106 - Player *v612; // edi@1106 DDM_DLV_Header *v613; // eax@1108 - int v615; // edi@1119 - Player *v619; // edi@1123 - signed __int64 v623; // qax@1127 - int v625; // edi@1129 - signed int v627; // eax@1129 - signed int v628; // edi@1129 - int v629; // ecx@1130 - Player *v630; // eax@1131 - int v631; // eax@1137 - int v635; // edi@1142 int v642; // edi@1156 int v643; // eax@1156 - int v644; // eax@1156 - signed int v645; // eax@1158 - unsigned int v656; // [sp-4h] [bp-E88h]@639 int v659; // [sp+0h] [bp-E84h]@123 - Actor *v661; // [sp+0h] [bp-E84h]@164 unsigned __int64 v663; // [sp+0h] [bp-E84h]@639 - const char *v664; // [sp+0h] [bp-E84h]@802 int v666; // [sp+4h] [bp-E80h]@12 PLAYER_SKILL_TYPE v667; // [sp+4h] [bp-E80h]@25 - int v675; // [sp+4h] [bp-E80h]@800 int v679[800]; // [sp+14h] [bp-E70h]@515 - AIDirection a3; // [sp+C94h] [bp-1F0h]@21 - int v681[4]; // [sp+CB0h] [bp-1D4h]@1137 - int v682[4]; // [sp+CC0h] [bp-1C4h]@731 - //ItemGen v683; // [sp+CD0h] [bp-1B4h]@791 - int v684; // [sp+D04h] [bp-180h]@416 unsigned __int64 v685; // [sp+D08h] [bp-17Ch]@416 unsigned __int64 v687; // [sp+D24h] [bp-160h]@327 Vec3_int_ v688; // [sp+D2Ch] [bp-158h]@943 @@ -256,27 +96,17 @@ Vec3_int_ v704; // [sp+D74h] [bp-110h]@132 Vec3_int_ v707; // [sp+D80h] [bp-104h]@1127 int v710; // [sp+D8Ch] [bp-F8h]@1156 - __int64 v712; // [sp+D94h] [bp-F0h]@991 - int v713; // [sp+D9Ch] [bp-E8h]@324 int n; // [sp+DA0h] [bp-E4h]@1 AIDirection v715; // [sp+DA4h] [bp-E0h]@21 - __int64 v717; // [sp+DC4h] [bp-C0h]@271 - float v718; // [sp+DCCh] [bp-B8h]@176 - signed int sRecoveryTime; // [sp+DD0h] [bp-B4h]@53 - char *y; // [sp+DD4h] [bp-B0h]@325 - int v721; int mon_id; int dist_Y; // [sp+DD8h] [bp-ACh]@163 int v723; // [sp+E4Ch] [bp-38h]@1 ItemGen *_this; // [sp+E50h] [bp-34h]@23 float v725; // [sp+E54h] [bp-30h]@23 int buff_resist; - Player *v726; // [sp+E58h] [bp-2Ch]@131 - float v727; // [sp+E5Ch] [bp-28h]@1 - unsigned int uRequiredMana; // [sp+E60h] [bp-24h]@53 + bool spell_sound_flag; // [sp+E5Ch] [bp-28h]@1 Player *pPlayer; // [sp+E64h] [bp-20h]@8 int v730; // [sp+E68h] [bp-1Ch]@53 - Player *v730b; ItemGen *v730c; int skill_level; // [sp+E6Ch] [bp-18h]@48 signed int v732; // [sp+E70h] [bp-14h]@325 @@ -293,7 +123,7 @@ amount = 0; LODWORD(v733) = 0; v723 = 0; - v727 = 0.0; + spell_sound_flag = false; for(n = 0; n < CastSpellInfoCount; ++n) { pCastSpell = &pCastSpellInfo[n]; @@ -507,7 +337,7 @@ if ( !pPlayer->CanCastSpell(uRequiredMana) ) break; pParty->pPartyBuffs[PARTY_BUFF_TORCHLIGHT].Apply(pParty->uTimePlayed + (signed __int64)((double)(signed int)3600 * spell_level * 4.2666669), skill_level, amount, 0, 0); - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_FIRE_FIRE_SPIKE://огненный шип @@ -558,7 +388,7 @@ v659 = pObjectList->pObjects[(signed __int16)pSpellSprite.uObjectDescID].uSpeed; if ( pSpellSprite.Create(pParty->sRotationY, pParty->sRotationX + 10, v659, pCastSpell->uPlayerID + 1) != -1 && pParty->bTurnBasedModeOn == 1 ) ++pTurnEngine->pending_actions; - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_AIR_IMPLOSION://Точный взрыв @@ -596,7 +426,7 @@ pSpellSprite.spell_target_pid = PID(OBJECT_Actor, mon_id); DamageMonsterFromParty(PID(OBJECT_Item, pSpellSprite.Create(0, 0, 0, 0)), mon_id, &v697); } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_EARTH_MASS_DISTORTION://Изменение веса @@ -628,7 +458,7 @@ pSpellSprite.spell_target_pid = PID(OBJECT_Actor, mon_id); DamageMonsterFromParty(PID(OBJECT_Item, pSpellSprite.Create(0, 0, 0, 0)), mon_id, &v704); } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_LIGHT_DESTROY_UNDEAD://Уничтожение нежити @@ -666,7 +496,7 @@ continue; } DamageMonsterFromParty(PID(OBJECT_Item, obj_id), PID_ID(a2), &v691); - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_FIRE_FIRE_BOLT://Удар огня @@ -711,7 +541,7 @@ v659 = pObjectList->pObjects[(signed __int16)pSpellSprite.uObjectDescID].uSpeed; if ( pSpellSprite.Create(v715.uYawAngle, v715.uPitchAngle, v659, pCastSpell->uPlayerID + 1) != -1 && pParty->bTurnBasedModeOn == 1 ) ++pTurnEngine->pending_actions; - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_WATER_ACID_BURST://Всплеск кислоты @@ -742,7 +572,7 @@ v659 = pObjectList->pObjects[(signed __int16)pSpellSprite.uObjectDescID].uSpeed; if ( pSpellSprite.Create(v715.uYawAngle, v715.uPitchAngle, v659, pCastSpell->uPlayerID + 1) != -1 && pParty->bTurnBasedModeOn == 1 ) ++pTurnEngine->pending_actions; - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_LIGHT_SUNRAY://Луч Солнца @@ -778,7 +608,7 @@ v659 = pObjectList->pObjects[(signed __int16)pSpellSprite.uObjectDescID].uSpeed; if ( pSpellSprite.Create(v715.uYawAngle, v715.uPitchAngle, v659, pCastSpell->uPlayerID + 1) != -1 && pParty->bTurnBasedModeOn == 1 ) ++pTurnEngine->pending_actions; - LODWORD(v727) = 1; + spell_sound_flag = true; } break; } @@ -796,7 +626,7 @@ pActors[mon_id].vVelocity.y = 0; pGame->GetStru6()->_4A7E89_sparkles_on_actor_after_it_casts_buff(&pActors[mon_id], 0); } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_EARTH_SLOW://Замедление @@ -820,7 +650,7 @@ pActors[mon_id].uAttributes |= 0x80000; pGame->GetStru6()->_4A7E89_sparkles_on_actor_after_it_casts_buff(&pActors[mon_id], 0); } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_MIND_CHARM:// Очарование @@ -858,7 +688,7 @@ pSpellSprite.uSoundID = LOWORD(pCastSpell->sound_id); pSpellSprite.Create(0, 0, 0, pCastSpell->uPlayerID + 1); } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_DARK_SHRINKING_RAY://Сжимающий луч @@ -886,7 +716,7 @@ v659 = pObjectList->pObjects[(signed __int16)pSpellSprite.uObjectDescID].uSpeed; if ( pSpellSprite.Create(v715.uYawAngle, v715.uPitchAngle, v659, pCastSpell->uPlayerID + 1) != -1 && pParty->bTurnBasedModeOn == 1 ) ++pTurnEngine->pending_actions; - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_FIRE_FIRE_AURA: //Аура огня @@ -920,7 +750,7 @@ } v730c->uAttributes |= ITEM_AURA_EFFECT_RED; _50C9A8_item_enchantment_timer = 256; - LODWORD(v727) = 1; + spell_sound_flag = true; break; } _50C9D0_AfterEnchClickEventId = 113; @@ -946,7 +776,7 @@ break; pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); pParty->pPlayers[pCastSpell->uPlayerID_2].pPlayerBuffs[PLAYER_BUFF_REGENERATION].Apply(pParty->uTimePlayed + (signed int)(signed __int64)((double)(3600 * spell_level) * 4.2666669), skill_level, amount, 0, 0); - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_FIRE_PROTECTION_FROM_FIRE://Защита от Огня @@ -997,7 +827,7 @@ pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); //v90 = (double)(signed int)(3600 * spell_level) * 4.2666669; pParty->pPartyBuffs[buff_resist].Apply(pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)(3600 * spell_level) * 4.2666669), skill_level, amount, 0, 0); - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_FIRE_HASTE://Спешка @@ -1013,13 +843,13 @@ } if ( pPlayer->CanCastSpell(uRequiredMana) ) { - LODWORD(v727) = 1; + spell_sound_flag = true; for ( uint pl_id = 0; pl_id < 4; pl_id++ ) { if ( pParty->pPlayers[pl_id].pConditions[Condition_Weak] ) - LODWORD(v727) = 0; + spell_sound_flag = false; } - if (LODWORD(v727)) + if ( spell_sound_flag ) { pParty->pPartyBuffs[PARTY_BUFF_HASTE].Apply(pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, 0, 0, 0); pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 0); @@ -1050,7 +880,7 @@ v111 = pOtherOverlayList->_4418B1(10000, pCastSpell->uPlayerID_2 + 310, 0, 65536); pParty->pPlayers[pCastSpell->uPlayerID_2].pPlayerBuffs[PLAYER_BUFF_BLESS].Apply(pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), 1, amount, v111, 0); - LODWORD(v727) = 1; + spell_sound_flag = true; break; } for ( uint pl_id = 0; pl_id < 4; pl_id++ ) @@ -1060,7 +890,7 @@ pParty->pPlayers[pl_id].pPlayerBuffs[1].Apply(pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, amount, v111, 0); } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_SPIRIT_SPIRIT_LASH://Плеть Духа @@ -1114,7 +944,7 @@ pSpellSprite.vPosition.z = pActors[mon_id].vPosition.z - (unsigned int)(signed __int64)((double)pActors[mon_id].uActorHeight * -0.8); pSpellSprite.spell_target_pid = PID(OBJECT_Actor, a2); DamageMonsterFromParty(PID(OBJECT_Item, pSpellSprite.Create(0, 0, 0, 0)), mon_id, &v701); - LODWORD(v727) = 1; + spell_sound_flag = true; } else { @@ -1164,7 +994,7 @@ pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); pParty->pPartyBuffs[buff_resist].Apply(pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, amount, 0, 0); - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_FIRE_IMMOLATION://Кольцо огня @@ -1181,7 +1011,7 @@ pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); pParty->pPartyBuffs[PARTY_BUFF_IMMOLATION].Apply(pParty->uTimePlayed + (signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, spell_level, 0, 0); - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_FIRE_METEOR_SHOWER://Поток метеоров @@ -1258,7 +1088,7 @@ k = rand() % 1024 - 512; } } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_FIRE_INFERNO://Адский огонь @@ -1298,7 +1128,7 @@ pGame->GetStru6()->_4A81CA(&pSpellSprite); pGame->GetStru6()->FadeScreen__like_Turn_Undead_and_mb_Armageddon(0xFF3C1E, 0x40); } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_AIR_WIZARD_EYE://Око чародея @@ -1309,7 +1139,7 @@ for ( uint pl_id = 0; pl_id < 4; pl_id++ ) v169 = pOtherOverlayList->_4418B1(2000, pl_id + 100, 0, 65536); pParty->pPartyBuffs[PARTY_BUFF_WIZARD_EYE].Apply(pParty->uTimePlayed + (signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, 0, v169, 0); - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_AIR_FEATHER_FALL://Падение пера(пёрышком) @@ -1334,7 +1164,7 @@ pParty->pPartyBuffs[PARTY_BUFF_FEATHER_FALL].Apply(pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, 0, 0, 0); - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_AIR_SPARKS://Искры @@ -1380,7 +1210,7 @@ ++pTurnEngine->pending_actions; v188 += _v726 / (amount - 1); } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_AIR_JUMP://Прыжок @@ -1397,7 +1227,7 @@ pOtherOverlayList->_4418B1(2040, pl_id + 100, 0, 65536); pParty->uFlags |= 0x100; pParty->uFallSpeed = 1000; - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_AIR_INVISIBILITY://Невидимость @@ -1426,7 +1256,7 @@ pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].Apply(pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, amount, 0, 0); - LODWORD(v727) = 1; + spell_sound_flag = true; } break; } @@ -1455,7 +1285,7 @@ v206 = pOtherOverlayList->_4418B1(10008, 203, 0, 65536); pParty->pPartyBuffs[PARTY_BUFF_FLY].Apply(pParty->uTimePlayed + (signed __int64)((double)(signed int)((int)(3600 * spell_level) << 7) * 0.033333335), skill_level, amount, v206, pCastSpell->uPlayerID + 1); - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_AIR_STARBURST://Звездопад @@ -1524,7 +1354,7 @@ j = rand() % 1024 - 512; k = rand() % 1024 - 512; } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_WATER_AWAKEN://Пробуждение @@ -1557,7 +1387,7 @@ pParty->pPlayers[i].PlaySound(SPEECH_103, 0); } } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_WATER_POISON_SPRAY://Распыление яда @@ -1632,8 +1462,8 @@ while ( v188 <= v189 ); } } - LODWORD(v727) = 1; - break; + spell_sound_flag = true; + break; } case SPELL_WATER_WATER_WALK://Хождение по воде { @@ -1663,7 +1493,7 @@ skill_level, amount, v169, pCastSpell->uPlayerID + 1); if ( skill_level == 4 ) pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uFlags = 1; - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_WATER_RECHARGE_ITEM://Перезарядка @@ -1708,7 +1538,7 @@ } v730c->uAttributes |= 0x40u; _50C9A8_item_enchantment_timer = 256; - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_WATER_ENCHANT_ITEM://Талисман @@ -1770,7 +1600,7 @@ v245->m_enchantmentStrength = pItemsTable->pEnchantments[v295].to_item[_v725->uEquipType - EQUIP_ARMOUR]; v245->uAttributes |= 0x20u; _50C9A8_item_enchantment_timer = 256; - LODWORD(v727) = 1; + spell_sound_flag = true; break; } else if ( skill_level == 3 || skill_level == 4)//мастер и гранд @@ -1851,14 +1681,14 @@ ++v245->uSpecEnchantmentType; v245->uAttributes |= 0x20u; _50C9A8_item_enchantment_timer = 256; - LODWORD(v727) = 1; + spell_sound_flag = true; break; } } } } } - if ( LODWORD(v727) == 0 ) + if ( spell_sound_flag == 0 ) { v317 = pGlobalTXT_LocalizationStrings[428];//Не получилось!!! if ( item_not_broken == false ) @@ -1886,7 +1716,7 @@ } town_portal_caster_id = pCastSpell->uPlayerID; pMessageQueue_50CBD0->AddMessage(UIMSG_OnCastTownPortal, 0, 0); - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_WATER_LLOYDS_BEACON://Маяк Ллойда @@ -1930,13 +1760,13 @@ if ( skill_level == 4 )//for GM { pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Pertified] = 0; - LODWORD(v727) = 1; + spell_sound_flag = true; break; } v663 = (signed __int64)((double)(signed __int64)pParty->uTimePlayed - (double)(amount << 7) * 0.033333335); pParty->pPlayers[pCastSpell->uPlayerID_2].DiscardConditionIfLastsLongerThan(Condition_Pertified, v663); } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_EARTH_ROCK_BLAST://Взрыв камня @@ -1965,7 +1795,7 @@ if ( pSpellSprite.Create(pParty->sRotationY, pParty->sRotationX, v659, pCastSpell->uPlayerID + 1) != -1 && pParty->bTurnBasedModeOn == 1 ) ++pTurnEngine->pending_actions; - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_EARTH_DEATH_BLOSSOM: //Цветок смерти @@ -2002,7 +1832,7 @@ if ( pSpellSprite.Create(pParty->sRotationY, stru_5C6E00->uIntegerHalfPi / 2, v659, 0) != -1 && pParty->bTurnBasedModeOn == 1 ) ++pTurnEngine->pending_actions; - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_SPIRIT_DETECT_LIFE: // Детектор жизни @@ -2024,7 +1854,7 @@ pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); pParty->pPartyBuffs[PARTY_BUFF_DETECT_LIFE].Apply(pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)amount << 7) * 0.033333335), skill_level, 0, 0, 0); - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_SPIRIT_FATE:// Судьба @@ -2045,7 +1875,7 @@ { pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); pParty->pPlayers[pCastSpell->uPlayerID_2].pPlayerBuffs[PLAYER_BUFF_FATE].Apply(pParty->uTimePlayed + 1280, skill_level, amount, 0, 0); - LODWORD(v727) = 1; + spell_sound_flag = true; break; } if (PID_TYPE(pCastSpell->spell_target_pid) == OBJECT_Actor) @@ -2055,7 +1885,7 @@ pActors[mon_id].uAttributes |= 0x80000; pGame->GetStru6()->_4A7E89_sparkles_on_actor_after_it_casts_buff(&pActors[mon_id], 0); } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_SPIRIT_REMOVE_CURSE:// Снятие порчи @@ -2073,7 +1903,7 @@ break; if ( !pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Cursed] ) { - LODWORD(v727) = 1; + spell_sound_flag = true; break; } if ( skill_level == 4 )//GM @@ -2084,12 +1914,12 @@ (signed __int64)((double)(signed __int64)pParty->uTimePlayed - (double)(amount << 7) * 0.033333335)); if ( pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Cursed] ) { - LODWORD(v727) = 1; + spell_sound_flag = true; break; } } pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_SPIRIT_PRESERVATION://Сохранение @@ -2105,7 +1935,7 @@ pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); pParty->pPlayers[pCastSpell->uPlayerID_2].pPlayerBuffs[PLAYER_BUFF_PRESERVATION].Apply(pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, 0, 0, 0); - LODWORD(v727) = 1; + spell_sound_flag = true; break; } for ( uint pl_id = 0; pl_id < 4; pl_id++ ) @@ -2114,7 +1944,7 @@ pParty->pPlayers[pl_id].pPlayerBuffs[PLAYER_BUFF_PRESERVATION].Apply(pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, 0, 0, 0); } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_SPIRIT_TURN_UNDEAD://Бег мертвецов @@ -2153,7 +1983,7 @@ (signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, 0, 0, 0); } } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_SPIRIT_RAISE_DEAD://Оживление @@ -2167,7 +1997,7 @@ pOtherOverlayList->_4418B1(5080, pCastSpell->uPlayerID_2 + 100, 0, 65536); if ( !pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Dead] ) { - LODWORD(v727) = 1; + spell_sound_flag = true; break; } pParty->pPlayers[pCastSpell->uPlayerID_2].sHealth = 1; @@ -2184,7 +2014,7 @@ (signed __int64)((double)(signed __int64)pParty->uTimePlayed - (double)(amount << 7) * 0.033333335)); } pParty->pPlayers[pCastSpell->uPlayerID_2].SetCondition(Condition_Weak, 0); - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_SPIRIT_SHARED_LIFE://Общая жизнь @@ -2217,7 +2047,7 @@ pPlayers[pl_array[i]]->SetUnconcious(0); pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pl_array[i] - 1); } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_SPIRIT_RESSURECTION://Воскресение @@ -2257,7 +2087,7 @@ pParty->pPlayers[pCastSpell->uPlayerID_2].sHealth = 1; pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_MIND_CURE_PARALYSIS://лечение паралича @@ -2276,18 +2106,18 @@ pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); if ( !pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Paralyzed] ) { - LODWORD(v727) = 1; + spell_sound_flag = true; break; } if ( skill_level == 4 ) { pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Paralyzed] = 0; - LODWORD(v727) = 1; + spell_sound_flag = true; break; } pParty->pPlayers[pCastSpell->uPlayerID_2].DiscardConditionIfLastsLongerThan(Condition_Paralyzed, (signed __int64)((double)(signed __int64)pParty->uTimePlayed - (double)(amount << 7) * 0.033333335)); - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_MIND_REMOVE_FEAR://Снять страх @@ -2306,18 +2136,18 @@ pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); if ( !pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Fear] ) { - LODWORD(v727) = 1; + spell_sound_flag = true; break; } if ( skill_level == 4 ) { pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Fear] = 0; - LODWORD(v727) = 1; + spell_sound_flag = true; break; } pParty->pPlayers[pCastSpell->uPlayerID_2].DiscardConditionIfLastsLongerThan(Condition_Fear, (signed __int64)((double)(signed __int64)pParty->uTimePlayed - (double)(amount << 7) * 0.033333335)); - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_MIND_TELEPATHY://Телепатия @@ -2384,7 +2214,7 @@ pSpellSprite.uSoundID = LOWORD(pCastSpell->sound_id); pSpellSprite.Create(0, 0, 0, pCastSpell->uPlayerID + 1); } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_MIND_BERSERK://Берсерк @@ -2430,7 +2260,7 @@ pSpellSprite.uSoundID = LOWORD(pCastSpell->sound_id); pSpellSprite.Create(0, 0, 0, pCastSpell->uPlayerID + 1); } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_MIND_ENSLAVE://Порабощение @@ -2470,7 +2300,7 @@ pSpellSprite.uSoundID = LOWORD(pCastSpell->sound_id); pSpellSprite.Create(0, 0, 0, pCastSpell->uPlayerID + 1); } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_MIND_MASS_FEAR://Массовый страх @@ -2511,7 +2341,7 @@ skill_level, 0, 0, 0); } } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_MIND_CURE_INSANITY://Лечение Безумия @@ -2534,7 +2364,7 @@ (signed __int64)((double)(signed __int64)pParty->uTimePlayed - (double)(amount << 7) * 0.033333335)); pParty->pPlayers[pCastSpell->uPlayerID_2].SetCondition(Condition_Weak, 0); } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_EARTH_TELEKINESIS://Телекинез @@ -2590,7 +2420,7 @@ v448 = pOutdoor->pBModels[a2 >> 9].pFaces[obj_id & 0x3F].sCogTriggeredID; EventProcessor(v448, a2, 1); } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_BODY_CURE_WEAKNESS://Лечить Слабость @@ -2612,13 +2442,13 @@ if ( skill_level == 4 ) { pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Weak] = 0; - LODWORD(v727) = 1; + spell_sound_flag = true; break; } pParty->pPlayers[pCastSpell->uPlayerID_2].DiscardConditionIfLastsLongerThan(Condition_Weak, (signed __int64)((double)(signed __int64)pParty->uTimePlayed - (double)(amount << 7) * 0.033333335)); } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_BODY_FIRST_AID://Первая помощь @@ -2650,7 +2480,7 @@ pActors[mon_id].sCurrentHP = pActors[mon_id].pMonsterInfo.uHP; } } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_BODY_CURE_POISON://Лечение Отравления(Противоядие) @@ -2676,14 +2506,14 @@ pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Poison_Weak] = 0; pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Poison_Medium] = 0; pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Poison_Severe] = 0; - LODWORD(v727) = 1; + spell_sound_flag = true; break; } pParty->pPlayers[pCastSpell->uPlayerID_2].DiscardConditionIfLastsLongerThan(Condition_Poison_Weak, (signed __int64)((double)(signed __int64)pParty->uTimePlayed - (double)(amount << 7) * 0.033333335)); pParty->pPlayers[pCastSpell->uPlayerID_2].DiscardConditionIfLastsLongerThan(Condition_Poison_Medium, (signed __int64)((double)(signed __int64)pParty->uTimePlayed - (double)(amount << 7) * 0.033333335)); pParty->pPlayers[pCastSpell->uPlayerID_2].DiscardConditionIfLastsLongerThan(Condition_Poison_Severe, (signed __int64)((double)(signed __int64)pParty->uTimePlayed - (double)(amount << 7) * 0.033333335)); } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_BODY_PROTECTION_FROM_MAGIC://Защита от магии @@ -2696,7 +2526,7 @@ pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); pParty->pPartyBuffs[PARTY_BUFF_PROTECTION_FROM_MAGIC].Apply(pParty->uTimePlayed + (signed __int64)((double)(signed int)((int)(3600 * spell_level) << 7) * 0.033333335), skill_level, spell_level, 0, 0); - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_BODY_HAMMERHANDS://Руки-Молоты @@ -2712,13 +2542,13 @@ for ( uint pl_id = 0; pl_id < 4; pl_id++) pParty->pPlayers[pl_id].pPlayerBuffs[PLAYER_BUFF_HAMMERHANDS].Apply(pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)(3600 * spell_level) << 7) * 0.033333335), 4, spell_level, spell_level, 0); - LODWORD(v727) = 1; + spell_sound_flag = true; break; } pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); pParty->pPlayers[pCastSpell->uPlayerID_2].pPlayerBuffs[PLAYER_BUFF_HAMMERHANDS].Apply(pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)(3600 * spell_level) << 7) * 0.033333335), skill_level, spell_level, spell_level, 0); - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_BODY_CURE_DISEASE://Лечить Болезнь @@ -2747,7 +2577,7 @@ pParty->pPlayers[pCastSpell->uPlayerID_2].DiscardConditionIfLastsLongerThan(Condition_Disease_Severe, (signed __int64)((double)(signed __int64)pParty->uTimePlayed - (double)(amount << 7) * 0.033333335)); } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_BODY_POWER_CURE://Исцеление @@ -2759,7 +2589,7 @@ pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pl_id); pParty->pPlayers[pl_id].Heal(5 * spell_level + 10); } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_LIGHT_DISPEL_MAGIC://Снятие чар @@ -2805,7 +2635,7 @@ for (int i = 0; i < 22; ++i) pActors[_50BF30_actors_in_viewport_ids[a2]].pActorBuffs[i].Reset(); } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_LIGHT_SUMMON_ELEMENTAL://Элементал @@ -2836,7 +2666,7 @@ if ( !pPlayer->CanCastSpell(uRequiredMana) ) break; sub_44FA4C_spawn_light_elemental(pCastSpell->uPlayerID, skill_level, v733); - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_LIGHT_DAY_OF_THE_GODS://День богов @@ -2858,7 +2688,7 @@ pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); pParty->pPartyBuffs[PARTY_BUFF_DAY_OF_GODS].Apply(pParty->uTimePlayed + (signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, amount, 0, 0); - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_LIGHT_PRISMATIC_LIGHT://Свет призмы @@ -2900,7 +2730,7 @@ } //v537 = pGame->GetStru6(); pGame->GetStru6()->_4A8BFC(); - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_LIGHT_DAY_OF_PROTECTION://День защиты @@ -2936,7 +2766,7 @@ (signed __int64)((double)(duration << 7) * 0.033333335), skill_level, spell_level + 5, 0, 0); pParty->pPartyBuffs[PARTY_BUFF_WIZARD_EYE].Apply(pParty->uTimePlayed + (signed __int64)((double)(duration << 7) * 0.033333335), skill_level, spell_level + 5, 0, 0); - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_LIGHT_HOUR_OF_POWER: //Час могущества @@ -2973,7 +2803,7 @@ if ( !player_weak ) pParty->pPartyBuffs[PARTY_BUFF_HASTE].Apply(pParty->uTimePlayed + (signed __int64)((double)((60 * (spell_level * duration + 60)) << 7) * 0.033333335), skill_level, spell_level + 5, 0, 0); - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_LIGHT_DIVINE_INTERVENTION://Божественное вмешательство @@ -3002,7 +2832,7 @@ pPlayer->sAgeModifier = pPlayer->sAgeModifier + 10; sRecoveryTime += -5 * spell_level; ++pPlayer->uNumDivineInterventionCastsThisDay; - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_DARK_REANIMATE: //Реанимация @@ -3081,7 +2911,7 @@ pActors[mon_id].pActorBuffs[ACTOR_BUFF_ENSLAVED].Reset(); if ( pActors[mon_id].sCurrentHP > 10 * amount ) pActors[mon_id].sCurrentHP = 10 * amount; - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_DARK_VAMPIRIC_WEAPON:// Оружие-вампир @@ -3120,7 +2950,7 @@ } LOBYTE(item->uAttributes) |= 0x80; _50C9A8_item_enchantment_timer = 256; - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_DARK_SHARPMETAL://Шрапнель @@ -3170,7 +3000,7 @@ } while ( v188 <= v189 ); } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_DARK_CONTROL_UNDEAD://Глава нежити @@ -3221,32 +3051,22 @@ pSpellSprite.uSoundID = LOWORD(pCastSpell->sound_id); pSpellSprite.Create(0, 0, 0, pCastSpell->uPlayerID + 1); } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_DARK_SACRIFICE://Жертва { if ( !pPlayer->CanCastSpell(uRequiredMana) ) break; - int _v733 = 0; + int hired_npc = 0; memset(&achieved_awards, 0, 4000); - //pNPCData = pParty->pHirelings.data(); - for ( uint npc_id = 0; npc_id < 2; npc_id++ ) + for ( uint npc_id = 0; npc_id < 2; npc_id++ ) //количество нанятых НПС { if ( pParty->pHirelings[npc_id].pName != 0) - { - //v606 = _v733++; - achieved_awards[_v733++] = (AwardType)(npc_id + 1); - } - //++i; - //++pNPCData; + achieved_awards[hired_npc++] = (AwardType)(npc_id + 1); } - //while ( pNPCData <= &pParty->pHirelings[1] ); - - if ( (signed int)pNPCStats->uNumNewNPCs > 0) + /*if ( (signed int)pNPCStats->uNumNewNPCs > 0) { - //pNPCData = pNPCStats->pNewNPCData; - //__debugbreak(); // data offset //AwardType *_v734 = &achieved_awards[_v733]; for ( int npc_id = 0; npc_id < pNPCStats->uNumNewNPCs; ++npc_id ) { @@ -3258,30 +3078,21 @@ { //v607 = _v734; //++_v734; - achieved_awards[_v733++] = (AwardType)(npc_id + 3); + achieved_awards[hired_npc++] = (AwardType)(npc_id + 3); } - //++pNPCData; } - //while ( ); - } - //v608 = pCastSpell->uPlayerID_2; - //v609 = (signed int)*(&pFontCChar + pCastSpell->uPlayerID_2 + pParty->hirelingScrollPosition); + }*/ if ( pCastSpell->uPlayerID_2 != 4 && pCastSpell->uPlayerID_2 != 5 - || achieved_awards[_v733 - 2] <= 0 || achieved_awards[_v733 - 2] >= 3 ) + || achieved_awards[pCastSpell->uPlayerID_2 - 4] <= 0 || achieved_awards[pCastSpell->uPlayerID_2 - 4] >= 3 ) { ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); pCastSpell->uSpellID = 0; continue; } - //v610 = 76 * achieved_awards[_v733]; - //*((int *)&pParty->pPlayers[3].pInstalledBeacons[4].uBeaconTime + 19 * v609) = 0; - pParty->pHirelings[achieved_awards[_v733 - 2]].pName = 0; - //v611 = pIconsFrameTable->FindIcon("spell96"); - //*(int *)((char *)&pParty->pPlayers[3].pInstalledBeacons[4].uBeaconTime + v610 + 4) = pIconsFrameTable->GetIconAnimLength(v611); - pParty->pHirelings[achieved_awards[_v733 - 2]].uPortraitID = pIconsFrameTable->GetIconAnimLength(pIconsFrameTable->FindIcon("spell96")); - //*(int *)((char *)&pParty->pPlayers[3].pInstalledBeacons[3].field_18 + v610) = 1; - //pParty->pHirelings[achieved_awards[_v733 - 2]].evt_A = 1; + pParty->pHirelings[achieved_awards[pCastSpell->uPlayerID_2 - 4] - 1].evt_A = 1; + pParty->pHirelings[achieved_awards[pCastSpell->uPlayerID_2 - 4] - 1].evt_B = 0; + pParty->pHirelings[achieved_awards[pCastSpell->uPlayerID_2 - 4] - 1].evt_C = pIconsFrameTable->GetIconAnimLength(pIconsFrameTable->FindIcon("spell96")); for ( uint pl_id = 0; pl_id < 4; pl_id++ ) { pParty->pPlayers[pl_id].sHealth = pParty->pPlayers[pl_id].GetMaxHealth(); @@ -3293,7 +3104,7 @@ v613->uReputation += 15; if ( v613->uReputation > 10000 ) v613->uReputation = 10000; - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_DARK_PAIN_REFLECTION://Отражение боли @@ -3315,7 +3126,7 @@ pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); pParty->pPlayers[pCastSpell->uPlayerID_2].pPlayerBuffs[PLAYER_BUFF_PAIN_REFLECTION].Apply(pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, amount, 0, 0); - LODWORD(v727) = 1; + spell_sound_flag = true; break; } for ( uint pl_id = 0; pl_id < 4; pl_id++ ) @@ -3324,7 +3135,7 @@ pParty->pPlayers[pl_id].pPlayerBuffs[PLAYER_BUFF_PAIN_REFLECTION].Apply(pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, amount, 0, 0); } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_DARK_SOULDRINKER://Испить душу @@ -3381,7 +3192,7 @@ pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pl_array[j]); } pGame->GetStru6()->FadeScreen__like_Turn_Undead_and_mb_Armageddon(0, 64); - LODWORD(v727) = 1; + spell_sound_flag = true; break; } case SPELL_DARK_ARMAGEDDON://Армагеддон @@ -3418,7 +3229,7 @@ v732 = GetTerrainHeightsAroundParty2(v642 + pParty->vPosition.x, pParty->vPosition.y + (v643 % 4096 - 2048), &v710, 0); sub_42F7EB_DropItemAt(4070, v642 + pParty->vPosition.x, pParty->vPosition.y + (v643 % 4096 - 2048), v732 + 16, rand() % 500 + 500, 1, 0, 0, 0); } - LODWORD(v727) = 1; + spell_sound_flag = true; break; } default: @@ -3426,7 +3237,7 @@ } if ( pCastSpell->uFlags & 0x20 ) { - if ( v727 != 0.0 ) + if ( spell_sound_flag ) pAudioPlayer->PlaySound((SoundID)word_4EE088_sound_ids[pCastSpell->uSpellID], 0, 0, -1, 0, pCastSpell->sound_id, 0, 0); } else @@ -3443,10 +3254,10 @@ } else pPlayer->SetRecoveryTime((signed __int64)(flt_6BE3A4_debug_recmod1 * (double)sRecoveryTime * 2.133333333333333)); - if ( v727 != 0.0 ) + if ( spell_sound_flag ) { pPlayer->PlaySound(SPEECH_49, 0); - if ( v727 != 0.0 ) + //if ( spell_sound_flag ) pAudioPlayer->PlaySound((SoundID)word_4EE088_sound_ids[pCastSpell->uSpellID], 0, 0, -1, 0, pCastSpell->sound_id, 0, 0); } }