Mercurial > mm7
comparison Engine/Spells/CastSpellInfo.cpp @ 2534:1bcadc6dd203
enum SOUND_
author | Ritor1 |
---|---|
date | Mon, 09 Feb 2015 19:17:12 +0600 |
parents | a77c34acdbc9 |
children | a902abdfc7f2 |
comparison
equal
deleted
inserted
replaced
2533:2baaac65d5bf | 2534:1bcadc6dd203 |
---|---|
249 pParty->pTurnBasedPlayerRecoveryTimes[pCastSpellInfo[n].uPlayerID] = 100; | 249 pParty->pTurnBasedPlayerRecoveryTimes[pCastSpellInfo[n].uPlayerID] = 100; |
250 pPlayer->SetRecoveryTime(sRecoveryTime); | 250 pPlayer->SetRecoveryTime(sRecoveryTime); |
251 pTurnEngine->ApplyPlayerAction(); | 251 pTurnEngine->ApplyPlayerAction(); |
252 } | 252 } |
253 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // "Spell failed" | 253 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // "Spell failed" |
254 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 254 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
255 pCastSpellInfo[n].uSpellID = 0; | 255 pCastSpellInfo[n].uSpellID = 0; |
256 pPlayer->sMana -= uRequiredMana; | 256 pPlayer->sMana -= uRequiredMana; |
257 return; | 257 return; |
258 } | 258 } |
259 | 259 |
367 ++_v733; | 367 ++_v733; |
368 } | 368 } |
369 if ( _v733 > amount ) | 369 if ( _v733 > amount ) |
370 { | 370 { |
371 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed | 371 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed |
372 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 372 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
373 pCastSpell->uSpellID = 0; | 373 pCastSpell->uSpellID = 0; |
374 continue; | 374 continue; |
375 } | 375 } |
376 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 376 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
377 break; | 377 break; |
405 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 405 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
406 break; | 406 break; |
407 if (!a2) | 407 if (!a2) |
408 { | 408 { |
409 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed | 409 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed |
410 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 410 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
411 pCastSpell->uSpellID = 0; | 411 pCastSpell->uSpellID = 0; |
412 continue; | 412 continue; |
413 } | 413 } |
414 if (PID_TYPE(a2) == OBJECT_Actor) | 414 if (PID_TYPE(a2) == OBJECT_Actor) |
415 { | 415 { |
497 pSpellSprite.uSoundID = LOWORD(pCastSpell->sound_id); | 497 pSpellSprite.uSoundID = LOWORD(pCastSpell->sound_id); |
498 int obj_id = pSpellSprite.Create(0, 0, 0, 0); | 498 int obj_id = pSpellSprite.Create(0, 0, 0, 0); |
499 if ( !MonsterStats::BelongsToSupertype(pActors[PID_ID(a2)].pMonsterInfo.uID, MONSTER_SUPERTYPE_UNDEAD) ) | 499 if ( !MonsterStats::BelongsToSupertype(pActors[PID_ID(a2)].pMonsterInfo.uID, MONSTER_SUPERTYPE_UNDEAD) ) |
500 { | 500 { |
501 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed | 501 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed |
502 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 502 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
503 pCastSpell->uSpellID = 0; | 503 pCastSpell->uSpellID = 0; |
504 continue; | 504 continue; |
505 } | 505 } |
506 Actor::DamageMonsterFromParty(PID(OBJECT_Item, obj_id), PID_ID(a2), &v691); | 506 Actor::DamageMonsterFromParty(PID(OBJECT_Item, obj_id), PID_ID(a2), &v691); |
507 spell_sound_flag = true; | 507 spell_sound_flag = true; |
587 { | 587 { |
588 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor | 588 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor |
589 || uCurrentlyLoadedLevelType == LEVEL_Outdoor && (pParty->uCurrentHour < 5 || pParty->uCurrentHour >= 21) )//только в дневное время | 589 || uCurrentlyLoadedLevelType == LEVEL_Outdoor && (pParty->uCurrentHour < 5 || pParty->uCurrentHour >= 21) )//только в дневное время |
590 { | 590 { |
591 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed | 591 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed |
592 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 592 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
593 pCastSpell->uSpellID = 0; | 593 pCastSpell->uSpellID = 0; |
594 continue; | 594 continue; |
595 } | 595 } |
596 if ( pPlayer->CanCastSpell(uRequiredMana) ) | 596 if ( pPlayer->CanCastSpell(uRequiredMana) ) |
597 { | 597 { |
763 } | 763 } |
764 _50C9D0_AfterEnchClickEventId = 113; | 764 _50C9D0_AfterEnchClickEventId = 113; |
765 _50C9D4_AfterEnchClickEventSecondParam = 0; | 765 _50C9D4_AfterEnchClickEventSecondParam = 0; |
766 _50C9D8_AfterEnchClickEventTimeout = 1; | 766 _50C9D8_AfterEnchClickEventTimeout = 1; |
767 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed | 767 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed |
768 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 768 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
769 pCastSpell->uSpellID = 0; | 769 pCastSpell->uSpellID = 0; |
770 continue; | 770 continue; |
771 } | 771 } |
772 case SPELL_BODY_REGENERATION://Регенерация | 772 case SPELL_BODY_REGENERATION://Регенерация |
773 { | 773 { |
935 spell_sound_flag = true; | 935 spell_sound_flag = true; |
936 } | 936 } |
937 else | 937 else |
938 { | 938 { |
939 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2);//"Не получилось!!!" | 939 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2);//"Не получилось!!!" |
940 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 940 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
941 pCastSpell->uSpellID = 0; | 941 pCastSpell->uSpellID = 0; |
942 } | 942 } |
943 } | 943 } |
944 break; | 944 break; |
945 } | 945 } |
1012 else | 1012 else |
1013 meteor_num = 16; | 1013 meteor_num = 16; |
1014 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) | 1014 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) |
1015 { | 1015 { |
1016 ShowStatusBarString(pGlobalTXT_LocalizationStrings[491], 2); // Can't cast Meteor Shower indoors! | 1016 ShowStatusBarString(pGlobalTXT_LocalizationStrings[491], 2); // Can't cast Meteor Shower indoors! |
1017 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 1017 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
1018 pCastSpell->uSpellID = 0; | 1018 pCastSpell->uSpellID = 0; |
1019 continue; | 1019 continue; |
1020 } | 1020 } |
1021 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 1021 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
1022 break; | 1022 break; |
1082 case SPELL_FIRE_INFERNO://Адский огонь | 1082 case SPELL_FIRE_INFERNO://Адский огонь |
1083 { | 1083 { |
1084 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor) | 1084 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor) |
1085 { | 1085 { |
1086 ShowStatusBarString(pGlobalTXT_LocalizationStrings[492], 2); // Can't cast Inferno outdoors! | 1086 ShowStatusBarString(pGlobalTXT_LocalizationStrings[492], 2); // Can't cast Inferno outdoors! |
1087 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 1087 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
1088 pCastSpell->uSpellID = 0; | 1088 pCastSpell->uSpellID = 0; |
1089 continue; | 1089 continue; |
1090 } | 1090 } |
1091 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 1091 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
1092 break; | 1092 break; |
1204 case SPELL_AIR_JUMP://Прыжок | 1204 case SPELL_AIR_JUMP://Прыжок |
1205 { | 1205 { |
1206 if ( pParty->uFlags & PARTY_FLAGS_1_FALLING) | 1206 if ( pParty->uFlags & PARTY_FLAGS_1_FALLING) |
1207 { | 1207 { |
1208 ShowStatusBarString(pGlobalTXT_LocalizationStrings[493], 2); // Can't cast Jump while airborne! | 1208 ShowStatusBarString(pGlobalTXT_LocalizationStrings[493], 2); // Can't cast Jump while airborne! |
1209 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 1209 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
1210 break; | 1210 break; |
1211 } | 1211 } |
1212 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 1212 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
1213 break; | 1213 break; |
1214 for ( uint pl_id = 0; pl_id < 4; pl_id++ ) | 1214 for ( uint pl_id = 0; pl_id < 4; pl_id++ ) |
1230 assert(false); | 1230 assert(false); |
1231 } | 1231 } |
1232 if (pParty->uFlags & (PARTY_FLAGS_1_ALERT_RED | PARTY_FLAGS_1_ALERT_YELLOW)) | 1232 if (pParty->uFlags & (PARTY_FLAGS_1_ALERT_RED | PARTY_FLAGS_1_ALERT_YELLOW)) |
1233 { | 1233 { |
1234 ShowStatusBarString(pGlobalTXT_LocalizationStrings[638], 2); // There are hostile creatures nearby! | 1234 ShowStatusBarString(pGlobalTXT_LocalizationStrings[638], 2); // There are hostile creatures nearby! |
1235 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 1235 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
1236 pCastSpell->uSpellID = 0; | 1236 pCastSpell->uSpellID = 0; |
1237 continue; | 1237 continue; |
1238 } | 1238 } |
1239 if ( pPlayer->CanCastSpell(uRequiredMana) ) | 1239 if ( pPlayer->CanCastSpell(uRequiredMana) ) |
1240 { | 1240 { |
1251 case SPELL_AIR_FLY://Полёт | 1251 case SPELL_AIR_FLY://Полёт |
1252 { | 1252 { |
1253 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) | 1253 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) |
1254 { | 1254 { |
1255 ShowStatusBarString(pGlobalTXT_LocalizationStrings[494], 2); // Can not cast Fly indoors! | 1255 ShowStatusBarString(pGlobalTXT_LocalizationStrings[494], 2); // Can not cast Fly indoors! |
1256 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 1256 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
1257 break; | 1257 break; |
1258 } | 1258 } |
1259 if ( !pPlayers[pCastSpell->uPlayerID + 1]->GetMaxMana() ) | 1259 if ( !pPlayers[pCastSpell->uPlayerID + 1]->GetMaxMana() ) |
1260 { | 1260 { |
1261 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed | 1261 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed |
1262 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 1262 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
1263 break; | 1263 break; |
1264 } | 1264 } |
1265 if ( skill_level == 1 || skill_level == 2 || skill_level == 3 ) | 1265 if ( skill_level == 1 || skill_level == 2 || skill_level == 3 ) |
1266 amount = 1; | 1266 amount = 1; |
1267 else | 1267 else |
1279 case SPELL_AIR_STARBURST://Звездопад | 1279 case SPELL_AIR_STARBURST://Звездопад |
1280 { | 1280 { |
1281 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) | 1281 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) |
1282 { | 1282 { |
1283 ShowStatusBarString(pGlobalTXT_LocalizationStrings[495], 2); // Can't cast Starburst indoors! | 1283 ShowStatusBarString(pGlobalTXT_LocalizationStrings[495], 2); // Can't cast Starburst indoors! |
1284 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 1284 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
1285 pCastSpell->uSpellID = 0; | 1285 pCastSpell->uSpellID = 0; |
1286 continue; | 1286 continue; |
1287 } | 1287 } |
1288 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 1288 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
1289 break; | 1289 break; |
1456 case SPELL_WATER_WATER_WALK://Хождение по воде | 1456 case SPELL_WATER_WATER_WALK://Хождение по воде |
1457 { | 1457 { |
1458 if ( !pPlayers[pCastSpell->uPlayerID + 1]->GetMaxMana() ) | 1458 if ( !pPlayers[pCastSpell->uPlayerID + 1]->GetMaxMana() ) |
1459 { | 1459 { |
1460 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed | 1460 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed |
1461 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 1461 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
1462 break; | 1462 break; |
1463 } | 1463 } |
1464 switch (skill_level) | 1464 switch (skill_level) |
1465 { | 1465 { |
1466 case 1: //break; | 1466 case 1: //break; |
1493 { | 1493 { |
1494 _50C9D0_AfterEnchClickEventId = 113; | 1494 _50C9D0_AfterEnchClickEventId = 113; |
1495 _50C9D4_AfterEnchClickEventSecondParam = 0; | 1495 _50C9D4_AfterEnchClickEventSecondParam = 0; |
1496 _50C9D8_AfterEnchClickEventTimeout = 1; | 1496 _50C9D8_AfterEnchClickEventTimeout = 1; |
1497 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed | 1497 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed |
1498 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 1498 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
1499 pCastSpell->uSpellID = 0; | 1499 pCastSpell->uSpellID = 0; |
1500 continue; | 1500 continue; |
1501 } | 1501 } |
1502 if ( skill_level == 1 || skill_level == 2 ) | 1502 if ( skill_level == 1 || skill_level == 2 ) |
1503 v241 = (double)v723 * 0.0099999998 + 0.5;//50 % | 1503 v241 = (double)v723 * 0.0099999998 + 0.5;//50 % |
1517 v730c = 0; | 1517 v730c = 0; |
1518 _50C9D0_AfterEnchClickEventId = 113; | 1518 _50C9D0_AfterEnchClickEventId = 113; |
1519 _50C9D4_AfterEnchClickEventSecondParam = 0; | 1519 _50C9D4_AfterEnchClickEventSecondParam = 0; |
1520 _50C9D8_AfterEnchClickEventTimeout = 1; | 1520 _50C9D8_AfterEnchClickEventTimeout = 1; |
1521 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2);//Не получилось!!! | 1521 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2);//Не получилось!!! |
1522 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 1522 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
1523 pCastSpell->uSpellID = 0; | 1523 pCastSpell->uSpellID = 0; |
1524 spell_level = v723; | 1524 spell_level = v723; |
1525 continue; | 1525 continue; |
1526 } | 1526 } |
1527 v730c->uAttributes |= 0x40u; | 1527 v730c->uAttributes |= 0x40u; |
1680 { | 1680 { |
1681 v317 = pGlobalTXT_LocalizationStrings[428];//Не получилось!!! | 1681 v317 = pGlobalTXT_LocalizationStrings[428];//Не получилось!!! |
1682 if ( item_not_broken == false ) | 1682 if ( item_not_broken == false ) |
1683 v317 = pGlobalTXT_LocalizationStrings[585];//Предмет недостаточно высокого качества | 1683 v317 = pGlobalTXT_LocalizationStrings[585];//Предмет недостаточно высокого качества |
1684 ShowStatusBarString(v317, 2); | 1684 ShowStatusBarString(v317, 2); |
1685 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 1685 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
1686 //v318 = &pParty->pPlayers[pCastSpell->uPlayerID_2]; | 1686 //v318 = &pParty->pPlayers[pCastSpell->uPlayerID_2]; |
1687 pCastSpell->uSpellID = 0; | 1687 pCastSpell->uSpellID = 0; |
1688 pParty->pPlayers[pCastSpell->uPlayerID_2].PlaySound(SPEECH_43, 0); | 1688 pParty->pPlayers[pCastSpell->uPlayerID_2].PlaySound(SPEECH_43, 0); |
1689 } | 1689 } |
1690 break; | 1690 break; |
1696 break; | 1696 break; |
1697 if ( pParty->uFlags & (PARTY_FLAGS_1_ALERT_RED | PARTY_FLAGS_1_ALERT_YELLOW) && skill_level != 4 | 1697 if ( pParty->uFlags & (PARTY_FLAGS_1_ALERT_RED | PARTY_FLAGS_1_ALERT_YELLOW) && skill_level != 4 |
1698 || rand() % 100 >= amount && skill_level != 4 ) | 1698 || rand() % 100 >= amount && skill_level != 4 ) |
1699 { | 1699 { |
1700 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed | 1700 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed |
1701 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 1701 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
1702 pCastSpell->uSpellID = 0; | 1702 pCastSpell->uSpellID = 0; |
1703 continue; | 1703 continue; |
1704 } | 1704 } |
1705 town_portal_caster_id = pCastSpell->uPlayerID; | 1705 town_portal_caster_id = pCastSpell->uPlayerID; |
1706 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_OnCastTownPortal, 0, 0); | 1706 pMessageQueue_50CBD0->AddGUIMessage(UIMSG_OnCastTownPortal, 0, 0); |
1710 case SPELL_WATER_LLOYDS_BEACON://Маяк Ллойда | 1710 case SPELL_WATER_LLOYDS_BEACON://Маяк Ллойда |
1711 { | 1711 { |
1712 if ( !_stricmp(pCurrentMapName, "d05.blv") ) // Arena | 1712 if ( !_stricmp(pCurrentMapName, "d05.blv") ) // Arena |
1713 { | 1713 { |
1714 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed | 1714 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed |
1715 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 1715 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
1716 pCastSpell->uSpellID = 0; | 1716 pCastSpell->uSpellID = 0; |
1717 continue; | 1717 continue; |
1718 } | 1718 } |
1719 if ( pPlayer->sMana >= (signed int)uRequiredMana ) | 1719 if ( pPlayer->sMana >= (signed int)uRequiredMana ) |
1720 { | 1720 { |
1789 case SPELL_EARTH_DEATH_BLOSSOM: //Цветок смерти | 1789 case SPELL_EARTH_DEATH_BLOSSOM: //Цветок смерти |
1790 { | 1790 { |
1791 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) | 1791 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) |
1792 { | 1792 { |
1793 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed | 1793 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed |
1794 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 1794 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
1795 pCastSpell->uSpellID = 0; | 1795 pCastSpell->uSpellID = 0; |
1796 continue; | 1796 continue; |
1797 } | 1797 } |
1798 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 1798 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
1799 break; | 1799 break; |
2645 ++mon_num; | 2645 ++mon_num; |
2646 } | 2646 } |
2647 if ( mon_num >= amount ) | 2647 if ( mon_num >= amount ) |
2648 { | 2648 { |
2649 ShowStatusBarString(pGlobalTXT_LocalizationStrings[648], 2); // This character can't summon any more monsters! | 2649 ShowStatusBarString(pGlobalTXT_LocalizationStrings[648], 2); // This character can't summon any more monsters! |
2650 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 2650 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
2651 pCastSpell->uSpellID = 0; | 2651 pCastSpell->uSpellID = 0; |
2652 continue; | 2652 continue; |
2653 } | 2653 } |
2654 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 2654 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
2655 break; | 2655 break; |
2682 case SPELL_LIGHT_PRISMATIC_LIGHT://Свет призмы | 2682 case SPELL_LIGHT_PRISMATIC_LIGHT://Свет призмы |
2683 { | 2683 { |
2684 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor) | 2684 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor) |
2685 { | 2685 { |
2686 ShowStatusBarString(pGlobalTXT_LocalizationStrings[497], 2); // Can't cast Prismatic Light outdoors! | 2686 ShowStatusBarString(pGlobalTXT_LocalizationStrings[497], 2); // Can't cast Prismatic Light outdoors! |
2687 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 2687 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
2688 pCastSpell->uSpellID = 0; | 2688 pCastSpell->uSpellID = 0; |
2689 continue; | 2689 continue; |
2690 } | 2690 } |
2691 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 2691 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
2692 break; | 2692 break; |
2798 { | 2798 { |
2799 //amount = 3; | 2799 //amount = 3; |
2800 if ( pPlayer->uNumDivineInterventionCastsThisDay >= 3 ) | 2800 if ( pPlayer->uNumDivineInterventionCastsThisDay >= 3 ) |
2801 { | 2801 { |
2802 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed | 2802 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed |
2803 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 2803 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
2804 pCastSpell->uSpellID = 0; | 2804 pCastSpell->uSpellID = 0; |
2805 continue; | 2805 continue; |
2806 } | 2806 } |
2807 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 2807 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
2808 break; | 2808 break; |
2849 } | 2849 } |
2850 mon_id = PID_ID(pCastSpell->spell_target_pid); | 2850 mon_id = PID_ID(pCastSpell->spell_target_pid); |
2851 if ( mon_id == -1 ) | 2851 if ( mon_id == -1 ) |
2852 { | 2852 { |
2853 ShowStatusBarString(pGlobalTXT_LocalizationStrings[496], 2); // No valid target exists! | 2853 ShowStatusBarString(pGlobalTXT_LocalizationStrings[496], 2); // No valid target exists! |
2854 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 2854 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
2855 pCastSpell->uSpellID = 0; | 2855 pCastSpell->uSpellID = 0; |
2856 continue; | 2856 continue; |
2857 } | 2857 } |
2858 if ( pActors[mon_id].sCurrentHP > 0 | 2858 if ( pActors[mon_id].sCurrentHP > 0 |
2859 || pActors[mon_id].uAIState != Dead && pActors[mon_id].uAIState != Dying ) | 2859 || pActors[mon_id].uAIState != Dead && pActors[mon_id].uAIState != Dying ) |
2860 { | 2860 { |
2861 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed | 2861 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed |
2862 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 2862 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
2863 pCastSpell->uSpellID = 0; | 2863 pCastSpell->uSpellID = 0; |
2864 continue; | 2864 continue; |
2865 } | 2865 } |
2866 ++pSpellSprite.uType; | 2866 ++pSpellSprite.uType; |
2867 pSpellSprite.stru_24.Reset(); | 2867 pSpellSprite.stru_24.Reset(); |
2924 { | 2924 { |
2925 _50C9D0_AfterEnchClickEventId = 113; | 2925 _50C9D0_AfterEnchClickEventId = 113; |
2926 _50C9D4_AfterEnchClickEventSecondParam = 0; | 2926 _50C9D4_AfterEnchClickEventSecondParam = 0; |
2927 _50C9D8_AfterEnchClickEventTimeout = 1; | 2927 _50C9D8_AfterEnchClickEventTimeout = 1; |
2928 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed | 2928 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed |
2929 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 2929 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
2930 pCastSpell->uSpellID = 0; | 2930 pCastSpell->uSpellID = 0; |
2931 continue; | 2931 continue; |
2932 } | 2932 } |
2933 item->uSpecEnchantmentType = 16; | 2933 item->uSpecEnchantmentType = 16; |
2934 if ( skill_level != 4 ) | 2934 if ( skill_level != 4 ) |
3010 if ( !MonsterStats::BelongsToSupertype(pActors[mon_id].pMonsterInfo.uID, MONSTER_SUPERTYPE_UNDEAD) ) | 3010 if ( !MonsterStats::BelongsToSupertype(pActors[mon_id].pMonsterInfo.uID, MONSTER_SUPERTYPE_UNDEAD) ) |
3011 break; | 3011 break; |
3012 if ( !pActors[mon_id].DoesDmgTypeDoDamage((DAMAGE_TYPE)10) ) | 3012 if ( !pActors[mon_id].DoesDmgTypeDoDamage((DAMAGE_TYPE)10) ) |
3013 { | 3013 { |
3014 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed | 3014 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed |
3015 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 3015 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
3016 pCastSpell->uSpellID = 0; | 3016 pCastSpell->uSpellID = 0; |
3017 continue; | 3017 continue; |
3018 } | 3018 } |
3019 pActors[mon_id].pActorBuffs[ACTOR_BUFF_BERSERK].Reset(); | 3019 pActors[mon_id].pActorBuffs[ACTOR_BUFF_BERSERK].Reset(); |
3020 pActors[mon_id].pActorBuffs[ACTOR_BUFF_CHARM].Reset(); | 3020 pActors[mon_id].pActorBuffs[ACTOR_BUFF_CHARM].Reset(); |
3072 }*/ | 3072 }*/ |
3073 if ( pCastSpell->uPlayerID_2 != 4 && pCastSpell->uPlayerID_2 != 5 | 3073 if ( pCastSpell->uPlayerID_2 != 4 && pCastSpell->uPlayerID_2 != 5 |
3074 || achieved_awards[pCastSpell->uPlayerID_2 - 4] <= 0 || achieved_awards[pCastSpell->uPlayerID_2 - 4] >= 3 ) | 3074 || achieved_awards[pCastSpell->uPlayerID_2 - 4] <= 0 || achieved_awards[pCastSpell->uPlayerID_2 - 4] >= 3 ) |
3075 { | 3075 { |
3076 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed | 3076 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed |
3077 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 3077 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
3078 pCastSpell->uSpellID = 0; | 3078 pCastSpell->uSpellID = 0; |
3079 continue; | 3079 continue; |
3080 } | 3080 } |
3081 pParty->pHirelings[achieved_awards[pCastSpell->uPlayerID_2 - 4] - 1].evt_A = 1; | 3081 pParty->pHirelings[achieved_awards[pCastSpell->uPlayerID_2 - 4] - 1].evt_A = 1; |
3082 pParty->pHirelings[achieved_awards[pCastSpell->uPlayerID_2 - 4] - 1].evt_B = 0; | 3082 pParty->pHirelings[achieved_awards[pCastSpell->uPlayerID_2 - 4] - 1].evt_B = 0; |
3186 case SPELL_DARK_ARMAGEDDON://Армагеддон | 3186 case SPELL_DARK_ARMAGEDDON://Армагеддон |
3187 { | 3187 { |
3188 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) | 3188 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) |
3189 { | 3189 { |
3190 ShowStatusBarString(pGlobalTXT_LocalizationStrings[499], 2); // Can't cast Armageddon indoors! | 3190 ShowStatusBarString(pGlobalTXT_LocalizationStrings[499], 2); // Can't cast Armageddon indoors! |
3191 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 3191 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
3192 pCastSpell->uSpellID = 0; | 3192 pCastSpell->uSpellID = 0; |
3193 continue; | 3193 continue; |
3194 } | 3194 } |
3195 if ( skill_level == 4) | 3195 if ( skill_level == 4) |
3196 amount = 4; | 3196 amount = 4; |
3197 else | 3197 else |
3198 amount = 3; | 3198 amount = 3; |
3199 if ( pPlayer->uNumArmageddonCasts >= amount || pParty->armageddon_timer > 0 ) | 3199 if ( pPlayer->uNumArmageddonCasts >= amount || pParty->armageddon_timer > 0 ) |
3200 { | 3200 { |
3201 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed | 3201 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed |
3202 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); | 3202 pAudioPlayer->PlaySound(SOUND_spellfail0201, 0, 0, -1, 0, 0, 0, 0); |
3203 pCastSpell->uSpellID = 0; | 3203 pCastSpell->uSpellID = 0; |
3204 continue; | 3204 continue; |
3205 } | 3205 } |
3206 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 3206 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
3207 break; | 3207 break; |