Mercurial > mm7
comparison Engine/Spells/CastSpellInfo.cpp @ 2541:a902abdfc7f2
1. Renamed class Game to class Engine.
2. Separated game logic as state of FSM from game logic as engine.
3. Found out that many UI screen initializers were optimized away, intially
they all returned newly created window as separate object like it is done
in CharacterUI_Initialize.
author | a.parshin |
---|---|
date | Sun, 10 May 2015 01:29:11 +0200 |
parents | 1bcadc6dd203 |
children | b6140dfeac27 |
comparison
equal
deleted
inserted
replaced
2540:abc6a9d079b9 | 2541:a902abdfc7f2 |
---|---|
1 #define _CRTDBG_MAP_ALLOC | 1 #define _CRTDBG_MAP_ALLOC |
2 #include <stdlib.h> | 2 #include <stdlib.h> |
3 #include <crtdbg.h> | 3 #include <crtdbg.h> |
4 | 4 |
5 #define _CRT_SECURE_NO_WARNINGS | 5 #define _CRT_SECURE_NO_WARNINGS |
6 | |
7 #include "Engine/Engine.h" | |
8 | |
6 #include "CastSpellInfo.h" | 9 #include "CastSpellInfo.h" |
7 #include "../Objects/Actor.h" | 10 #include "../Objects/Actor.h" |
8 #include "../Party.h" | 11 #include "../Party.h" |
9 #include "../MM7.h" | |
10 #include "IO/Mouse.h" | 12 #include "IO/Mouse.h" |
11 #include "../../stru6.h" | 13 #include "../../stru6.h" |
12 #include "../Game.h" | |
13 #include "GUI/GUIWindow.h" | 14 #include "GUI/GUIWindow.h" |
14 #include "Media/Audio/AudioPlayer.h" | 15 #include "Media/Audio/AudioPlayer.h" |
15 #include "../Graphics/Outdoor.h" | 16 #include "../Graphics/Outdoor.h" |
16 #include "../Graphics/Overlays.h" | 17 #include "../Graphics/Overlays.h" |
17 #include "../Events.h" | 18 #include "../Events.h" |
25 #include "../Awards.h" | 26 #include "../Awards.h" |
26 #include "../TurnEngine/TurnEngine.h" | 27 #include "../TurnEngine/TurnEngine.h" |
27 #include "../texts.h" | 28 #include "../texts.h" |
28 #include "../LOD.h" | 29 #include "../LOD.h" |
29 #include "../Graphics/Level/Decoration.h" | 30 #include "../Graphics/Level/Decoration.h" |
30 | |
31 #include "..\..\GUI\UI\UIPartyCreation.h" | 31 #include "..\..\GUI\UI\UIPartyCreation.h" |
32 | 32 |
33 const size_t CastSpellInfoCount = 10; | 33 const size_t CastSpellInfoCount = 10; |
34 std::array<CastSpellInfo, CastSpellInfoCount> pCastSpellInfo; | 34 std::array<CastSpellInfo, CastSpellInfoCount> pCastSpellInfo; |
35 | 35 |
630 Actor::AI_Stand(PID_ID(a2), 4, 0x80, 0); | 630 Actor::AI_Stand(PID_ID(a2), 4, 0x80, 0); |
631 pActors[mon_id].pActorBuffs[ACTOR_BUFF_PARALYZED].Apply(pParty->uTimePlayed + (signed __int64)((double)(signed int)23040 * spell_level * 0.033333335), skill_level, 0, 0, 0); | 631 pActors[mon_id].pActorBuffs[ACTOR_BUFF_PARALYZED].Apply(pParty->uTimePlayed + (signed __int64)((double)(signed int)23040 * spell_level * 0.033333335), skill_level, 0, 0, 0); |
632 pActors[mon_id].uAttributes |= ACTOR_AGGRESSOR; | 632 pActors[mon_id].uAttributes |= ACTOR_AGGRESSOR; |
633 pActors[mon_id].vVelocity.x = 0; | 633 pActors[mon_id].vVelocity.x = 0; |
634 pActors[mon_id].vVelocity.y = 0; | 634 pActors[mon_id].vVelocity.y = 0; |
635 pGame->GetStru6()->_4A7E89_sparkles_on_actor_after_it_casts_buff(&pActors[mon_id], 0); | 635 pEngine->GetStru6()->_4A7E89_sparkles_on_actor_after_it_casts_buff(&pActors[mon_id], 0); |
636 } | 636 } |
637 spell_sound_flag = true; | 637 spell_sound_flag = true; |
638 break; | 638 break; |
639 } | 639 } |
640 case SPELL_EARTH_SLOW://Замедление | 640 case SPELL_EARTH_SLOW://Замедление |
654 mon_id = PID_ID(a2); | 654 mon_id = PID_ID(a2); |
655 if (PID_TYPE(a2) == OBJECT_Actor && pActors[mon_id].DoesDmgTypeDoDamage((DAMAGE_TYPE)3) ) | 655 if (PID_TYPE(a2) == OBJECT_Actor && pActors[mon_id].DoesDmgTypeDoDamage((DAMAGE_TYPE)3) ) |
656 { | 656 { |
657 pActors[mon_id].pActorBuffs[ACTOR_BUFF_SLOWED].Apply(pParty->uTimePlayed + (signed __int64)((double)(signed int)23040 * spell_level * 0.033333335), skill_level, amount, 0, 0); | 657 pActors[mon_id].pActorBuffs[ACTOR_BUFF_SLOWED].Apply(pParty->uTimePlayed + (signed __int64)((double)(signed int)23040 * spell_level * 0.033333335), skill_level, amount, 0, 0); |
658 pActors[mon_id].uAttributes |= ACTOR_AGGRESSOR; | 658 pActors[mon_id].uAttributes |= ACTOR_AGGRESSOR; |
659 pGame->GetStru6()->_4A7E89_sparkles_on_actor_after_it_casts_buff(&pActors[mon_id], 0); | 659 pEngine->GetStru6()->_4A7E89_sparkles_on_actor_after_it_casts_buff(&pActors[mon_id], 0); |
660 } | 660 } |
661 spell_sound_flag = true; | 661 spell_sound_flag = true; |
662 break; | 662 break; |
663 } | 663 } |
664 case SPELL_MIND_CHARM:// Очарование | 664 case SPELL_MIND_CHARM:// Очарование |
780 default: | 780 default: |
781 assert(false); | 781 assert(false); |
782 } | 782 } |
783 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 783 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
784 break; | 784 break; |
785 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); | 785 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); |
786 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); | 786 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); |
787 spell_sound_flag = true; | 787 spell_sound_flag = true; |
788 break; | 788 break; |
789 } | 789 } |
790 case SPELL_FIRE_PROTECTION_FROM_FIRE://Защита от Огня | 790 case SPELL_FIRE_PROTECTION_FROM_FIRE://Защита от Огня |
827 assert(false); | 827 assert(false); |
828 continue; | 828 continue; |
829 } | 829 } |
830 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 830 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
831 break; | 831 break; |
832 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 0); | 832 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 0); |
833 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 1); | 833 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 1); |
834 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 2); | 834 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 2); |
835 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); | 835 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); |
836 //v90 = (double)(signed int)(3600 * spell_level) * 4.2666669; | 836 //v90 = (double)(signed int)(3600 * spell_level) * 4.2666669; |
837 pParty->pPartyBuffs[buff_resist].Apply(pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)(3600 * spell_level) * 4.2666669), skill_level, amount, 0, 0); | 837 pParty->pPartyBuffs[buff_resist].Apply(pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)(3600 * spell_level) * 4.2666669), skill_level, amount, 0, 0); |
838 spell_sound_flag = true; | 838 spell_sound_flag = true; |
839 break; | 839 break; |
840 } | 840 } |
858 spell_sound_flag = false; | 858 spell_sound_flag = false; |
859 } | 859 } |
860 if ( spell_sound_flag ) | 860 if ( spell_sound_flag ) |
861 { | 861 { |
862 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); | 862 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); |
863 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 0); | 863 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 0); |
864 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 1); | 864 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 1); |
865 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 2); | 865 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 2); |
866 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); | 866 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); |
867 } | 867 } |
868 } | 868 } |
869 break; | 869 break; |
870 } | 870 } |
871 case SPELL_SPIRIT_BLESS://Благословение | 871 case SPELL_SPIRIT_BLESS://Благословение |
882 amount = spell_level + 5; | 882 amount = spell_level + 5; |
883 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 883 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
884 break; | 884 break; |
885 if ( skill_level == 1 ) | 885 if ( skill_level == 1 ) |
886 { | 886 { |
887 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); | 887 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); |
888 v111 = pOtherOverlayList->_4418B1(10000, pCastSpell->uPlayerID_2 + 310, 0, 65536); | 888 v111 = pOtherOverlayList->_4418B1(10000, pCastSpell->uPlayerID_2 + 310, 0, 65536); |
889 pParty->pPlayers[pCastSpell->uPlayerID_2].pPlayerBuffs[PLAYER_BUFF_BLESS].Apply(pParty->uTimePlayed + | 889 pParty->pPlayers[pCastSpell->uPlayerID_2].pPlayerBuffs[PLAYER_BUFF_BLESS].Apply(pParty->uTimePlayed + |
890 (signed int)(signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), 1, amount, v111, 0); | 890 (signed int)(signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), 1, amount, v111, 0); |
891 spell_sound_flag = true; | 891 spell_sound_flag = true; |
892 break; | 892 break; |
893 } | 893 } |
894 for ( uint pl_id = 0; pl_id < 4; pl_id++ ) | 894 for ( uint pl_id = 0; pl_id < 4; pl_id++ ) |
895 { | 895 { |
896 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pl_id); | 896 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pl_id); |
897 v111 = pOtherOverlayList->_4418B1(10000, pl_id + 310, 0, 65536); | 897 v111 = pOtherOverlayList->_4418B1(10000, pl_id + 310, 0, 65536); |
898 pParty->pPlayers[pl_id].pPlayerBuffs[1].Apply(pParty->uTimePlayed + | 898 pParty->pPlayers[pl_id].pPlayerBuffs[1].Apply(pParty->uTimePlayed + |
899 (signed int)(signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, amount, v111, 0); | 899 (signed int)(signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, amount, v111, 0); |
900 } | 900 } |
901 spell_sound_flag = true; | 901 spell_sound_flag = true; |
974 assert(false); | 974 assert(false); |
975 continue; | 975 continue; |
976 } | 976 } |
977 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 977 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
978 break; | 978 break; |
979 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 0); | 979 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 0); |
980 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 1); | 980 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 1); |
981 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 2); | 981 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 2); |
982 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); | 982 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); |
983 pParty->pPartyBuffs[buff_resist].Apply(pParty->uTimePlayed + | 983 pParty->pPartyBuffs[buff_resist].Apply(pParty->uTimePlayed + |
984 (signed int)(signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, amount, 0, 0); | 984 (signed int)(signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, amount, 0, 0); |
985 spell_sound_flag = true; | 985 spell_sound_flag = true; |
986 break; | 986 break; |
987 } | 987 } |
991 duration = 600 * spell_level; | 991 duration = 600 * spell_level; |
992 else | 992 else |
993 duration = 60 * spell_level; | 993 duration = 60 * spell_level; |
994 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 994 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
995 break; | 995 break; |
996 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 0); | 996 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 0); |
997 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 1); | 997 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 1); |
998 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 2); | 998 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 2); |
999 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); | 999 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); |
1000 pParty->pPartyBuffs[PARTY_BUFF_IMMOLATION].Apply(pParty->uTimePlayed + | 1000 pParty->pPartyBuffs[PARTY_BUFF_IMMOLATION].Apply(pParty->uTimePlayed + |
1001 (signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, spell_level, 0, 0); | 1001 (signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, spell_level, 0, 0); |
1002 spell_sound_flag = true; | 1002 spell_sound_flag = true; |
1003 break; | 1003 break; |
1004 } | 1004 } |
1111 pSpellSprite.vPosition.x = pActors[_50BF30_actors_in_viewport_ids[i]].vPosition.x; | 1111 pSpellSprite.vPosition.x = pActors[_50BF30_actors_in_viewport_ids[i]].vPosition.x; |
1112 pSpellSprite.vPosition.y = pActors[_50BF30_actors_in_viewport_ids[i]].vPosition.y; | 1112 pSpellSprite.vPosition.y = pActors[_50BF30_actors_in_viewport_ids[i]].vPosition.y; |
1113 pSpellSprite.vPosition.z = pActors[_50BF30_actors_in_viewport_ids[i]].vPosition.z - (unsigned int)(signed __int64)((double)pActors[_50BF30_actors_in_viewport_ids[i]].uActorHeight * -0.8); | 1113 pSpellSprite.vPosition.z = pActors[_50BF30_actors_in_viewport_ids[i]].vPosition.z - (unsigned int)(signed __int64)((double)pActors[_50BF30_actors_in_viewport_ids[i]].uActorHeight * -0.8); |
1114 pSpellSprite.spell_target_pid = PID(OBJECT_Actor, _50BF30_actors_in_viewport_ids[i]); | 1114 pSpellSprite.spell_target_pid = PID(OBJECT_Actor, _50BF30_actors_in_viewport_ids[i]); |
1115 Actor::DamageMonsterFromParty(PID(OBJECT_Item, pSpellSprite.Create(0, 0, 0, 0)), _50BF30_actors_in_viewport_ids[i], &v700); | 1115 Actor::DamageMonsterFromParty(PID(OBJECT_Item, pSpellSprite.Create(0, 0, 0, 0)), _50BF30_actors_in_viewport_ids[i], &v700); |
1116 pGame->GetStru6()->_4A81CA(&pSpellSprite); | 1116 pEngine->GetStru6()->_4A81CA(&pSpellSprite); |
1117 pGame->GetStru6()->FadeScreen__like_Turn_Undead_and_mb_Armageddon(0xFF3C1E, 0x40); | 1117 pEngine->GetStru6()->FadeScreen__like_Turn_Undead_and_mb_Armageddon(0xFF3C1E, 0x40); |
1118 } | 1118 } |
1119 spell_sound_flag = true; | 1119 spell_sound_flag = true; |
1120 break; | 1120 break; |
1121 } | 1121 } |
1122 case SPELL_AIR_WIZARD_EYE://Око чародея | 1122 case SPELL_AIR_WIZARD_EYE://Око чародея |
1143 } | 1143 } |
1144 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 1144 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
1145 break; | 1145 break; |
1146 for ( uint pl_id = 0; pl_id < 4; pl_id++ ) | 1146 for ( uint pl_id = 0; pl_id < 4; pl_id++ ) |
1147 pOtherOverlayList->_4418B1(2010, pl_id + 100, 0, 65536); | 1147 pOtherOverlayList->_4418B1(2010, pl_id + 100, 0, 65536); |
1148 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 0); | 1148 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 0); |
1149 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 1); | 1149 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 1); |
1150 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 2); | 1150 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 2); |
1151 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); | 1151 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); |
1152 | 1152 |
1153 pParty->pPartyBuffs[PARTY_BUFF_FEATHER_FALL].Apply(pParty->uTimePlayed + | 1153 pParty->pPartyBuffs[PARTY_BUFF_FEATHER_FALL].Apply(pParty->uTimePlayed + |
1154 (signed int)(signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, 0, 0, 0); | 1154 (signed int)(signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, 0, 0, 0); |
1155 spell_sound_flag = true; | 1155 spell_sound_flag = true; |
1156 break; | 1156 break; |
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 { |
1241 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 0); | 1241 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 0); |
1242 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 1); | 1242 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 1); |
1243 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 2); | 1243 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 2); |
1244 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); | 1244 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); |
1245 pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].Apply(pParty->uTimePlayed + | 1245 pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].Apply(pParty->uTimePlayed + |
1246 (signed int)(signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, amount, 0, 0); | 1246 (signed int)(signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, amount, 0, 0); |
1247 spell_sound_flag = true; | 1247 spell_sound_flag = true; |
1248 } | 1248 } |
1249 break; | 1249 break; |
1471 assert(false); | 1471 assert(false); |
1472 } | 1472 } |
1473 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 1473 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
1474 break; | 1474 break; |
1475 v169 = pOtherOverlayList->_4418B1(10005, 201, 0, 65536); | 1475 v169 = pOtherOverlayList->_4418B1(10005, 201, 0, 65536); |
1476 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 0); | 1476 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 0); |
1477 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 1); | 1477 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 1); |
1478 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 2); | 1478 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 2); |
1479 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); | 1479 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); |
1480 pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].Apply(pParty->uTimePlayed + (signed int)(signed __int64)((double)(duration << 7) * 0.033333335), | 1480 pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].Apply(pParty->uTimePlayed + (signed int)(signed __int64)((double)(duration << 7) * 0.033333335), |
1481 skill_level, amount, v169, pCastSpell->uPlayerID + 1); | 1481 skill_level, amount, v169, pCastSpell->uPlayerID + 1); |
1482 if ( skill_level == 4 ) | 1482 if ( skill_level == 4 ) |
1483 pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uFlags = 1; | 1483 pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uFlags = 1; |
1484 spell_sound_flag = true; | 1484 spell_sound_flag = true; |
1834 default: | 1834 default: |
1835 assert(false); | 1835 assert(false); |
1836 } | 1836 } |
1837 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 1837 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
1838 break; | 1838 break; |
1839 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 0); | 1839 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 0); |
1840 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 1); | 1840 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 1); |
1841 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 2); | 1841 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 2); |
1842 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); | 1842 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); |
1843 pParty->pPartyBuffs[PARTY_BUFF_DETECT_LIFE].Apply(pParty->uTimePlayed + | 1843 pParty->pPartyBuffs[PARTY_BUFF_DETECT_LIFE].Apply(pParty->uTimePlayed + |
1844 (signed int)(signed __int64)((double)(signed int)((int)amount << 7) * 0.033333335), skill_level, 0, 0, 0); | 1844 (signed int)(signed __int64)((double)(signed int)((int)amount << 7) * 0.033333335), skill_level, 0, 0, 0); |
1845 spell_sound_flag = true; | 1845 spell_sound_flag = true; |
1846 break; | 1846 break; |
1847 } | 1847 } |
1859 //LODWORD(v733) = 300; | 1859 //LODWORD(v733) = 300; |
1860 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 1860 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
1861 break; | 1861 break; |
1862 if ( pCastSpell->spell_target_pid == 0 ) | 1862 if ( pCastSpell->spell_target_pid == 0 ) |
1863 { | 1863 { |
1864 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); | 1864 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); |
1865 pParty->pPlayers[pCastSpell->uPlayerID_2].pPlayerBuffs[PLAYER_BUFF_FATE].Apply(pParty->uTimePlayed + 1280, skill_level, amount, 0, 0); | 1865 pParty->pPlayers[pCastSpell->uPlayerID_2].pPlayerBuffs[PLAYER_BUFF_FATE].Apply(pParty->uTimePlayed + 1280, skill_level, amount, 0, 0); |
1866 spell_sound_flag = true; | 1866 spell_sound_flag = true; |
1867 break; | 1867 break; |
1868 } | 1868 } |
1869 if (PID_TYPE(pCastSpell->spell_target_pid) == OBJECT_Actor) | 1869 if (PID_TYPE(pCastSpell->spell_target_pid) == OBJECT_Actor) |
1870 { | 1870 { |
1871 mon_id = PID_ID(pCastSpell->spell_target_pid); | 1871 mon_id = PID_ID(pCastSpell->spell_target_pid); |
1872 pActors[mon_id].pActorBuffs[ACTOR_BUFF_FATE].Apply(pParty->uTimePlayed + 1280, skill_level, amount, 0, 0); | 1872 pActors[mon_id].pActorBuffs[ACTOR_BUFF_FATE].Apply(pParty->uTimePlayed + 1280, skill_level, amount, 0, 0); |
1873 pActors[mon_id].uAttributes |= ACTOR_AGGRESSOR; | 1873 pActors[mon_id].uAttributes |= ACTOR_AGGRESSOR; |
1874 pGame->GetStru6()->_4A7E89_sparkles_on_actor_after_it_casts_buff(&pActors[mon_id], 0); | 1874 pEngine->GetStru6()->_4A7E89_sparkles_on_actor_after_it_casts_buff(&pActors[mon_id], 0); |
1875 } | 1875 } |
1876 spell_sound_flag = true; | 1876 spell_sound_flag = true; |
1877 break; | 1877 break; |
1878 } | 1878 } |
1879 case SPELL_SPIRIT_REMOVE_CURSE:// Снятие порчи | 1879 case SPELL_SPIRIT_REMOVE_CURSE:// Снятие порчи |
1904 { | 1904 { |
1905 spell_sound_flag = true; | 1905 spell_sound_flag = true; |
1906 break; | 1906 break; |
1907 } | 1907 } |
1908 } | 1908 } |
1909 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); | 1909 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); |
1910 spell_sound_flag = true; | 1910 spell_sound_flag = true; |
1911 break; | 1911 break; |
1912 } | 1912 } |
1913 case SPELL_SPIRIT_PRESERVATION://Сохранение | 1913 case SPELL_SPIRIT_PRESERVATION://Сохранение |
1914 { | 1914 { |
1918 duration = 300 * (spell_level + 12); | 1918 duration = 300 * (spell_level + 12); |
1919 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 1919 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
1920 break; | 1920 break; |
1921 if ( skill_level == 1 || skill_level == 2 ) | 1921 if ( skill_level == 1 || skill_level == 2 ) |
1922 { | 1922 { |
1923 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); | 1923 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); |
1924 pParty->pPlayers[pCastSpell->uPlayerID_2].pPlayerBuffs[PLAYER_BUFF_PRESERVATION].Apply(pParty->uTimePlayed + | 1924 pParty->pPlayers[pCastSpell->uPlayerID_2].pPlayerBuffs[PLAYER_BUFF_PRESERVATION].Apply(pParty->uTimePlayed + |
1925 (signed int)(signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, 0, 0, 0); | 1925 (signed int)(signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, 0, 0, 0); |
1926 spell_sound_flag = true; | 1926 spell_sound_flag = true; |
1927 break; | 1927 break; |
1928 } | 1928 } |
1929 for ( uint pl_id = 0; pl_id < 4; pl_id++ ) | 1929 for ( uint pl_id = 0; pl_id < 4; pl_id++ ) |
1930 { | 1930 { |
1931 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pl_id); | 1931 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pl_id); |
1932 pParty->pPlayers[pl_id].pPlayerBuffs[PLAYER_BUFF_PRESERVATION].Apply(pParty->uTimePlayed + | 1932 pParty->pPlayers[pl_id].pPlayerBuffs[PLAYER_BUFF_PRESERVATION].Apply(pParty->uTimePlayed + |
1933 (signed int)(signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, 0, 0, 0); | 1933 (signed int)(signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, 0, 0, 0); |
1934 } | 1934 } |
1935 spell_sound_flag = true; | 1935 spell_sound_flag = true; |
1936 break; | 1936 break; |
1942 else | 1942 else |
1943 duration = 300 * spell_level + 180; | 1943 duration = 300 * spell_level + 180; |
1944 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 1944 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
1945 break; | 1945 break; |
1946 int mon_num = pRenderer->_46А6АС_GetActorsInViewport(4096); | 1946 int mon_num = pRenderer->_46А6АС_GetActorsInViewport(4096); |
1947 pGame->GetStru6()->FadeScreen__like_Turn_Undead_and_mb_Armageddon(0xFFFFFF, 192); | 1947 pEngine->GetStru6()->FadeScreen__like_Turn_Undead_and_mb_Armageddon(0xFFFFFF, 192); |
1948 ++pSpellSprite.uType; | 1948 ++pSpellSprite.uType; |
1949 pSpellSprite.stru_24.Reset(); | 1949 pSpellSprite.stru_24.Reset(); |
1950 pSpellSprite.spell_id = pCastSpell->uSpellID; | 1950 pSpellSprite.spell_id = pCastSpell->uSpellID; |
1951 pSpellSprite.spell_level = spell_level; | 1951 pSpellSprite.spell_level = spell_level; |
1952 pSpellSprite.spell_skill = skill_level; | 1952 pSpellSprite.spell_skill = skill_level; |
2031 pPlayers[pl_array[i]]->sHealth = mean_life; | 2031 pPlayers[pl_array[i]]->sHealth = mean_life; |
2032 if ( pPlayers[pl_array[i]]->sHealth > pPlayers[pl_array[i]]->GetMaxHealth()) | 2032 if ( pPlayers[pl_array[i]]->sHealth > pPlayers[pl_array[i]]->GetMaxHealth()) |
2033 pPlayers[pl_array[i]]->sHealth = pPlayers[pl_array[i]]->GetMaxHealth(); | 2033 pPlayers[pl_array[i]]->sHealth = pPlayers[pl_array[i]]->GetMaxHealth(); |
2034 if ( pPlayers[pl_array[i]]->sHealth > 0 ) | 2034 if ( pPlayers[pl_array[i]]->sHealth > 0 ) |
2035 pPlayers[pl_array[i]]->SetUnconcious(0); | 2035 pPlayers[pl_array[i]]->SetUnconcious(0); |
2036 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pl_array[i] - 1); | 2036 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pl_array[i] - 1); |
2037 } | 2037 } |
2038 spell_sound_flag = true; | 2038 spell_sound_flag = true; |
2039 break; | 2039 break; |
2040 } | 2040 } |
2041 case SPELL_SPIRIT_RESSURECTION://Воскресение | 2041 case SPELL_SPIRIT_RESSURECTION://Воскресение |
2071 pParty->pPlayers[pCastSpell->uPlayerID_2].DiscardConditionIfLastsLongerThan( Condition_Unconcious, | 2071 pParty->pPlayers[pCastSpell->uPlayerID_2].DiscardConditionIfLastsLongerThan( Condition_Unconcious, |
2072 (signed __int64)((double)(signed __int64)pParty->uTimePlayed - (double)(amount << 7) * 0.033333335)); | 2072 (signed __int64)((double)(signed __int64)pParty->uTimePlayed - (double)(amount << 7) * 0.033333335)); |
2073 } | 2073 } |
2074 pParty->pPlayers[pCastSpell->uPlayerID_2].SetCondition(Condition_Weak, 1); | 2074 pParty->pPlayers[pCastSpell->uPlayerID_2].SetCondition(Condition_Weak, 1); |
2075 pParty->pPlayers[pCastSpell->uPlayerID_2].sHealth = 1; | 2075 pParty->pPlayers[pCastSpell->uPlayerID_2].sHealth = 1; |
2076 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); | 2076 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); |
2077 } | 2077 } |
2078 spell_sound_flag = true; | 2078 spell_sound_flag = true; |
2079 break; | 2079 break; |
2080 } | 2080 } |
2081 case SPELL_MIND_CURE_PARALYSIS://лечение паралича | 2081 case SPELL_MIND_CURE_PARALYSIS://лечение паралича |
2089 default: | 2089 default: |
2090 assert(false); | 2090 assert(false); |
2091 } | 2091 } |
2092 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 2092 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
2093 break; | 2093 break; |
2094 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); | 2094 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); |
2095 if ( !pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Paralyzed] ) | 2095 if ( !pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Paralyzed] ) |
2096 { | 2096 { |
2097 spell_sound_flag = true; | 2097 spell_sound_flag = true; |
2098 break; | 2098 break; |
2099 } | 2099 } |
2119 default: | 2119 default: |
2120 assert(false); | 2120 assert(false); |
2121 } | 2121 } |
2122 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 2122 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
2123 break; | 2123 break; |
2124 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); | 2124 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); |
2125 if ( !pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Fear] ) | 2125 if ( !pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Fear] ) |
2126 { | 2126 { |
2127 spell_sound_flag = true; | 2127 spell_sound_flag = true; |
2128 break; | 2128 break; |
2129 } | 2129 } |
2298 else | 2298 else |
2299 amount = 180 * spell_level; | 2299 amount = 180 * spell_level; |
2300 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 2300 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
2301 break; | 2301 break; |
2302 int mon_num = pRenderer->_46А6АС_GetActorsInViewport(4096); | 2302 int mon_num = pRenderer->_46А6АС_GetActorsInViewport(4096); |
2303 pGame->GetStru6()->FadeScreen__like_Turn_Undead_and_mb_Armageddon(0xA0A0A, 192); | 2303 pEngine->GetStru6()->FadeScreen__like_Turn_Undead_and_mb_Armageddon(0xA0A0A, 192); |
2304 ++pSpellSprite.uType; | 2304 ++pSpellSprite.uType; |
2305 pSpellSprite.stru_24.Reset(); | 2305 pSpellSprite.stru_24.Reset(); |
2306 pSpellSprite.spell_id = pCastSpell->uSpellID; | 2306 pSpellSprite.spell_id = pCastSpell->uSpellID; |
2307 pSpellSprite.spell_level = spell_level; | 2307 pSpellSprite.spell_level = spell_level; |
2308 pSpellSprite.spell_skill = skill_level; | 2308 pSpellSprite.spell_skill = skill_level; |
2338 amount = 0; | 2338 amount = 0; |
2339 else | 2339 else |
2340 amount = 86400 * spell_level; | 2340 amount = 86400 * spell_level; |
2341 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 2341 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
2342 break; | 2342 break; |
2343 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); | 2343 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); |
2344 if ( pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Insane] ) | 2344 if ( pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Insane] ) |
2345 { | 2345 { |
2346 if ( !(pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Weak]) ) | 2346 if ( !(pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Weak]) ) |
2347 pParty->pPlayers[pCastSpell->uPlayerID_2].PlaySound(SPEECH_25, 0); | 2347 pParty->pPlayers[pCastSpell->uPlayerID_2].PlaySound(SPEECH_25, 0); |
2348 if ( skill_level == 4 ) | 2348 if ( skill_level == 4 ) |
2422 default: | 2422 default: |
2423 assert(false); | 2423 assert(false); |
2424 } | 2424 } |
2425 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 2425 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
2426 break; | 2426 break; |
2427 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); | 2427 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); |
2428 if ( pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Weak] ) | 2428 if ( pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Weak] ) |
2429 { | 2429 { |
2430 if ( skill_level == 4 ) | 2430 if ( skill_level == 4 ) |
2431 { | 2431 { |
2432 pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Weak] = 0; | 2432 pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Weak] = 0; |
2453 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 2453 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
2454 break; | 2454 break; |
2455 if ( !pCastSpell->spell_target_pid ) | 2455 if ( !pCastSpell->spell_target_pid ) |
2456 { | 2456 { |
2457 pParty->pPlayers[pCastSpell->uPlayerID_2].Heal(amount); | 2457 pParty->pPlayers[pCastSpell->uPlayerID_2].Heal(amount); |
2458 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); | 2458 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); |
2459 } | 2459 } |
2460 if (PID_TYPE(pCastSpell->spell_target_pid) == OBJECT_Actor) | 2460 if (PID_TYPE(pCastSpell->spell_target_pid) == OBJECT_Actor) |
2461 { | 2461 { |
2462 mon_id = PID_ID(pCastSpell->spell_target_pid); | 2462 mon_id = PID_ID(pCastSpell->spell_target_pid); |
2463 if ( pActors[mon_id].uAIState != Dead && pActors[mon_id].uAIState != Dying && pActors[mon_id].uAIState != Disabled | 2463 if ( pActors[mon_id].uAIState != Dead && pActors[mon_id].uAIState != Dying && pActors[mon_id].uAIState != Disabled |
2482 default: | 2482 default: |
2483 assert(false); | 2483 assert(false); |
2484 } | 2484 } |
2485 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 2485 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
2486 break; | 2486 break; |
2487 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); | 2487 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); |
2488 if ( pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Poison_Weak] | 2488 if ( pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Poison_Weak] |
2489 || pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Poison_Medium] | 2489 || pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Poison_Medium] |
2490 || pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Poison_Severe] ) | 2490 || pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Poison_Severe] ) |
2491 { | 2491 { |
2492 if ( skill_level == 4 ) | 2492 if ( skill_level == 4 ) |
2506 } | 2506 } |
2507 case SPELL_BODY_PROTECTION_FROM_MAGIC://Защита от магии | 2507 case SPELL_BODY_PROTECTION_FROM_MAGIC://Защита от магии |
2508 { | 2508 { |
2509 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 2509 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
2510 break; | 2510 break; |
2511 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 0); | 2511 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 0); |
2512 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 1); | 2512 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 1); |
2513 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 2); | 2513 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 2); |
2514 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); | 2514 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); |
2515 pParty->pPartyBuffs[PARTY_BUFF_PROTECTION_FROM_MAGIC].Apply(pParty->uTimePlayed + | 2515 pParty->pPartyBuffs[PARTY_BUFF_PROTECTION_FROM_MAGIC].Apply(pParty->uTimePlayed + |
2516 (signed __int64)((double)(signed int)((int)(3600 * spell_level) << 7) * 0.033333335), skill_level, spell_level, 0, 0); | 2516 (signed __int64)((double)(signed int)((int)(3600 * spell_level) << 7) * 0.033333335), skill_level, spell_level, 0, 0); |
2517 spell_sound_flag = true; | 2517 spell_sound_flag = true; |
2518 break; | 2518 break; |
2519 } | 2519 } |
2521 { | 2521 { |
2522 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 2522 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
2523 break; | 2523 break; |
2524 if ( skill_level == 4 ) | 2524 if ( skill_level == 4 ) |
2525 { | 2525 { |
2526 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 0); | 2526 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 0); |
2527 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 1); | 2527 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 1); |
2528 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 2); | 2528 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 2); |
2529 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); | 2529 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); |
2530 for ( uint pl_id = 0; pl_id < 4; pl_id++) | 2530 for ( uint pl_id = 0; pl_id < 4; pl_id++) |
2531 pParty->pPlayers[pl_id].pPlayerBuffs[PLAYER_BUFF_HAMMERHANDS].Apply(pParty->uTimePlayed + | 2531 pParty->pPlayers[pl_id].pPlayerBuffs[PLAYER_BUFF_HAMMERHANDS].Apply(pParty->uTimePlayed + |
2532 (signed int)(signed __int64)((double)(signed int)((int)(3600 * spell_level) << 7) * 0.033333335), 4, spell_level, spell_level, 0); | 2532 (signed int)(signed __int64)((double)(signed int)((int)(3600 * spell_level) << 7) * 0.033333335), 4, spell_level, spell_level, 0); |
2533 spell_sound_flag = true; | 2533 spell_sound_flag = true; |
2534 break; | 2534 break; |
2535 } | 2535 } |
2536 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); | 2536 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); |
2537 pParty->pPlayers[pCastSpell->uPlayerID_2].pPlayerBuffs[PLAYER_BUFF_HAMMERHANDS].Apply(pParty->uTimePlayed + | 2537 pParty->pPlayers[pCastSpell->uPlayerID_2].pPlayerBuffs[PLAYER_BUFF_HAMMERHANDS].Apply(pParty->uTimePlayed + |
2538 (signed int)(signed __int64)((double)(signed int)((int)(3600 * spell_level) << 7) * 0.033333335), skill_level, spell_level, spell_level, 0); | 2538 (signed int)(signed __int64)((double)(signed int)((int)(3600 * spell_level) << 7) * 0.033333335), skill_level, spell_level, spell_level, 0); |
2539 spell_sound_flag = true; | 2539 spell_sound_flag = true; |
2540 break; | 2540 break; |
2541 } | 2541 } |
2545 amount = 0; | 2545 amount = 0; |
2546 else | 2546 else |
2547 amount = 86400 * spell_level; | 2547 amount = 86400 * spell_level; |
2548 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 2548 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
2549 break; | 2549 break; |
2550 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); | 2550 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); |
2551 if ( pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Disease_Weak] | 2551 if ( pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Disease_Weak] |
2552 || pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Disease_Medium] | 2552 || pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Disease_Medium] |
2553 || pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Disease_Severe] ) | 2553 || pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Disease_Severe] ) |
2554 { | 2554 { |
2555 if ( skill_level == 4 ) | 2555 if ( skill_level == 4 ) |
2572 { | 2572 { |
2573 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 2573 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
2574 break; | 2574 break; |
2575 for ( uint pl_id = 0; pl_id < 4; ++pl_id ) | 2575 for ( uint pl_id = 0; pl_id < 4; ++pl_id ) |
2576 { | 2576 { |
2577 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pl_id); | 2577 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pl_id); |
2578 pParty->pPlayers[pl_id].Heal(5 * spell_level + 10); | 2578 pParty->pPlayers[pl_id].Heal(5 * spell_level + 10); |
2579 } | 2579 } |
2580 spell_sound_flag = true; | 2580 spell_sound_flag = true; |
2581 break; | 2581 break; |
2582 } | 2582 } |
2583 case SPELL_LIGHT_DISPEL_MAGIC://Снятие чар | 2583 case SPELL_LIGHT_DISPEL_MAGIC://Снятие чар |
2584 { | 2584 { |
2585 sRecoveryTime -= spell_level; | 2585 sRecoveryTime -= spell_level; |
2586 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 2586 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
2587 break; | 2587 break; |
2588 pGame->GetStru6()->FadeScreen__like_Turn_Undead_and_mb_Armageddon(0xAFF0A, 192); | 2588 pEngine->GetStru6()->FadeScreen__like_Turn_Undead_and_mb_Armageddon(0xAFF0A, 192); |
2589 int mon_num = pRenderer->_46А6АС_GetActorsInViewport(4096); | 2589 int mon_num = pRenderer->_46А6АС_GetActorsInViewport(4096); |
2590 ++pSpellSprite.uType; | 2590 ++pSpellSprite.uType; |
2591 v688.x = 0; | 2591 v688.x = 0; |
2592 v688.y = 0; | 2592 v688.y = 0; |
2593 v688.z = 0; | 2593 v688.z = 0; |
2668 default: | 2668 default: |
2669 assert(false); | 2669 assert(false); |
2670 } | 2670 } |
2671 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 2671 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
2672 break; | 2672 break; |
2673 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 0); | 2673 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 0); |
2674 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 1); | 2674 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 1); |
2675 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 2); | 2675 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 2); |
2676 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); | 2676 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); |
2677 pParty->pPartyBuffs[PARTY_BUFF_DAY_OF_GODS].Apply(pParty->uTimePlayed + | 2677 pParty->pPartyBuffs[PARTY_BUFF_DAY_OF_GODS].Apply(pParty->uTimePlayed + |
2678 (signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, amount, 0, 0); | 2678 (signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, amount, 0, 0); |
2679 spell_sound_flag = true; | 2679 spell_sound_flag = true; |
2680 break; | 2680 break; |
2681 } | 2681 } |
2714 pSpellSprite.vPosition.z = pActors[_50BF30_actors_in_viewport_ids[mon_id]].vPosition.z - | 2714 pSpellSprite.vPosition.z = pActors[_50BF30_actors_in_viewport_ids[mon_id]].vPosition.z - |
2715 (unsigned int)(signed __int64)((double)pActors[_50BF30_actors_in_viewport_ids[mon_id]].uActorHeight * -0.8); | 2715 (unsigned int)(signed __int64)((double)pActors[_50BF30_actors_in_viewport_ids[mon_id]].uActorHeight * -0.8); |
2716 pSpellSprite.spell_target_pid = PID(OBJECT_Actor, _50BF30_actors_in_viewport_ids[mon_id]); | 2716 pSpellSprite.spell_target_pid = PID(OBJECT_Actor, _50BF30_actors_in_viewport_ids[mon_id]); |
2717 Actor::DamageMonsterFromParty(PID(OBJECT_Item, pSpellSprite.Create(0, 0, 0, 0)), _50BF30_actors_in_viewport_ids[mon_id], &v694); | 2717 Actor::DamageMonsterFromParty(PID(OBJECT_Item, pSpellSprite.Create(0, 0, 0, 0)), _50BF30_actors_in_viewport_ids[mon_id], &v694); |
2718 } | 2718 } |
2719 //v537 = pGame->GetStru6(); | 2719 //v537 = pEngine->GetStru6(); |
2720 pGame->GetStru6()->_4A8BFC(); | 2720 pEngine->GetStru6()->_4A8BFC(); |
2721 spell_sound_flag = true; | 2721 spell_sound_flag = true; |
2722 break; | 2722 break; |
2723 } | 2723 } |
2724 case SPELL_LIGHT_DAY_OF_PROTECTION://День защиты | 2724 case SPELL_LIGHT_DAY_OF_PROTECTION://День защиты |
2725 { | 2725 { |
2732 default: | 2732 default: |
2733 assert(false); | 2733 assert(false); |
2734 } | 2734 } |
2735 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 2735 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
2736 break; | 2736 break; |
2737 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 0); | 2737 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 0); |
2738 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 1); | 2738 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 1); |
2739 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 2); | 2739 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 2); |
2740 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); | 2740 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); |
2741 pParty->pPartyBuffs[PARTY_BUFF_RESIST_BODY].Apply(pParty->uTimePlayed + | 2741 pParty->pPartyBuffs[PARTY_BUFF_RESIST_BODY].Apply(pParty->uTimePlayed + |
2742 (signed __int64)((double)(duration << 7) * 0.033333335), skill_level, amount, 0, 0); | 2742 (signed __int64)((double)(duration << 7) * 0.033333335), skill_level, amount, 0, 0); |
2743 pParty->pPartyBuffs[PARTY_BUFF_RESIST_MIND].Apply(pParty->uTimePlayed + | 2743 pParty->pPartyBuffs[PARTY_BUFF_RESIST_MIND].Apply(pParty->uTimePlayed + |
2744 (signed __int64)((double)(duration << 7) * 0.033333335), skill_level, amount, 0, 0); | 2744 (signed __int64)((double)(duration << 7) * 0.033333335), skill_level, amount, 0, 0); |
2745 pParty->pPartyBuffs[PARTY_BUFF_RESIST_FIRE].Apply(pParty->uTimePlayed + | 2745 pParty->pPartyBuffs[PARTY_BUFF_RESIST_FIRE].Apply(pParty->uTimePlayed + |
2771 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 2771 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
2772 break; | 2772 break; |
2773 bool player_weak = false; | 2773 bool player_weak = false; |
2774 for ( uint pl_id = 0; pl_id < 4; pl_id++ ) | 2774 for ( uint pl_id = 0; pl_id < 4; pl_id++ ) |
2775 { | 2775 { |
2776 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 0); | 2776 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 0); |
2777 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 1); | 2777 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 1); |
2778 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 2); | 2778 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 2); |
2779 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); | 2779 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, 3); |
2780 pParty->pPlayers[pl_id].pPlayerBuffs[PLAYER_BUFF_BLESS].Apply(pParty->uTimePlayed + | 2780 pParty->pPlayers[pl_id].pPlayerBuffs[PLAYER_BUFF_BLESS].Apply(pParty->uTimePlayed + |
2781 (signed __int64)((double)((300 * amount * spell_level + 60) << 7) * 0.033333335), skill_level, spell_level + 5, 0, 0); | 2781 (signed __int64)((double)((300 * amount * spell_level + 60) << 7) * 0.033333335), skill_level, spell_level + 5, 0, 0); |
2782 if ( pParty->pPlayers[pl_id].pConditions[Condition_Weak] ) | 2782 if ( pParty->pPlayers[pl_id].pConditions[Condition_Weak] ) |
2783 player_weak = true; | 2783 player_weak = true; |
2784 } | 2784 } |
2810 { | 2810 { |
2811 for ( uint buff_id = 0; buff_id <= 19; buff_id++ ) | 2811 for ( uint buff_id = 0; buff_id <= 19; buff_id++ ) |
2812 pParty->pPlayers[pl_id].pConditions[buff_id] = 0; | 2812 pParty->pPlayers[pl_id].pConditions[buff_id] = 0; |
2813 pParty->pPlayers[pl_id].sHealth = pParty->pPlayers[pl_id].GetMaxHealth(); | 2813 pParty->pPlayers[pl_id].sHealth = pParty->pPlayers[pl_id].GetMaxHealth(); |
2814 pParty->pPlayers[pl_id].sMana = pParty->pPlayers[pl_id].GetMaxMana(); | 2814 pParty->pPlayers[pl_id].sMana = pParty->pPlayers[pl_id].GetMaxMana(); |
2815 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pl_id); | 2815 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pl_id); |
2816 } | 2816 } |
2817 if ( pPlayer->sAgeModifier + 10 >= 120 ) | 2817 if ( pPlayer->sAgeModifier + 10 >= 120 ) |
2818 pPlayer->sAgeModifier = 120; | 2818 pPlayer->sAgeModifier = 120; |
2819 else | 2819 else |
2820 pPlayer->sAgeModifier = pPlayer->sAgeModifier + 10; | 2820 pPlayer->sAgeModifier = pPlayer->sAgeModifier + 10; |
2836 } | 2836 } |
2837 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 2837 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
2838 break; | 2838 break; |
2839 if (!pCastSpell->spell_target_pid) | 2839 if (!pCastSpell->spell_target_pid) |
2840 { | 2840 { |
2841 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); | 2841 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); |
2842 if ( pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Dead] ) | 2842 if ( pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Dead] ) |
2843 { | 2843 { |
2844 pParty->pPlayers[pCastSpell->uPlayerID_2].SetCondition(Condition_Zombie, 1); | 2844 pParty->pPlayers[pCastSpell->uPlayerID_2].SetCondition(Condition_Zombie, 1); |
2845 ReloadPlayerPortraits(pCastSpell->uPlayerID_2, (pParty->pPlayers[pCastSpell->uPlayerID_2].GetSexByVoice() != 0) + 23); | 2845 ReloadPlayerPortraits(pCastSpell->uPlayerID_2, (pParty->pPlayers[pCastSpell->uPlayerID_2].GetSexByVoice() != 0) + 23); |
2846 pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Zombie] = pParty->uTimePlayed; | 2846 pParty->pPlayers[pCastSpell->uPlayerID_2].pConditions[Condition_Zombie] = pParty->uTimePlayed; |
3109 amount = spell_level + 5; | 3109 amount = spell_level + 5; |
3110 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 3110 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
3111 break; | 3111 break; |
3112 if ( skill_level != 3 && skill_level != 4 ) | 3112 if ( skill_level != 3 && skill_level != 4 ) |
3113 { | 3113 { |
3114 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); | 3114 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pCastSpell->uPlayerID_2); |
3115 pParty->pPlayers[pCastSpell->uPlayerID_2].pPlayerBuffs[PLAYER_BUFF_PAIN_REFLECTION].Apply(pParty->uTimePlayed + | 3115 pParty->pPlayers[pCastSpell->uPlayerID_2].pPlayerBuffs[PLAYER_BUFF_PAIN_REFLECTION].Apply(pParty->uTimePlayed + |
3116 (signed int)(signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, amount, 0, 0); | 3116 (signed int)(signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, amount, 0, 0); |
3117 spell_sound_flag = true; | 3117 spell_sound_flag = true; |
3118 break; | 3118 break; |
3119 } | 3119 } |
3120 for ( uint pl_id = 0; pl_id < 4; pl_id++ ) | 3120 for ( uint pl_id = 0; pl_id < 4; pl_id++ ) |
3121 { | 3121 { |
3122 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pl_id); | 3122 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pl_id); |
3123 pParty->pPlayers[pl_id].pPlayerBuffs[PLAYER_BUFF_PAIN_REFLECTION].Apply(pParty->uTimePlayed + | 3123 pParty->pPlayers[pl_id].pPlayerBuffs[PLAYER_BUFF_PAIN_REFLECTION].Apply(pParty->uTimePlayed + |
3124 (signed int)(signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, amount, 0, 0); | 3124 (signed int)(signed __int64)((double)(signed int)((int)duration << 7) * 0.033333335), skill_level, amount, 0, 0); |
3125 } | 3125 } |
3126 spell_sound_flag = true; | 3126 spell_sound_flag = true; |
3127 break; | 3127 break; |
3128 } | 3128 } |
3129 case SPELL_DARK_SOULDRINKER://Испить душу | 3129 case SPELL_DARK_SOULDRINKER://Испить душу |
3130 { | 3130 { |
3131 if ( !pPlayer->CanCastSpell(uRequiredMana) ) | 3131 if ( !pPlayer->CanCastSpell(uRequiredMana) ) |
3132 break; | 3132 break; |
3133 pGame->GetIndoorCamera(); | 3133 pEngine->GetIndoorCamera(); |
3134 int mon_num = pRenderer->_46А6АС_GetActorsInViewport((signed __int64)pGame->pIndoorCameraD3D->GetPickDepth()); | 3134 int mon_num = pRenderer->_46А6АС_GetActorsInViewport((signed __int64)pEngine->pIndoorCameraD3D->GetPickDepth()); |
3135 v707.x = 0; | 3135 v707.x = 0; |
3136 v707.y = 0; | 3136 v707.y = 0; |
3137 v707.z = 0; | 3137 v707.z = 0; |
3138 pSpellSprite.stru_24.Reset(); | 3138 pSpellSprite.stru_24.Reset(); |
3139 pSpellSprite.spell_id = pCastSpell->uSpellID; | 3139 pSpellSprite.spell_id = pCastSpell->uSpellID; |
3175 for ( uint j = 0; j < pl_num; j++ ) | 3175 for ( uint j = 0; j < pl_num; j++ ) |
3176 { | 3176 { |
3177 pPlayers[pl_array[j]]->sHealth += (signed __int64)((double)(signed int)amount / (double)pl_num); | 3177 pPlayers[pl_array[j]]->sHealth += (signed __int64)((double)(signed int)amount / (double)pl_num); |
3178 if ( pPlayers[pl_array[j]]->sHealth > pPlayers[pl_array[j]]->GetMaxHealth()) | 3178 if ( pPlayers[pl_array[j]]->sHealth > pPlayers[pl_array[j]]->GetMaxHealth()) |
3179 pPlayers[pl_array[j]]->sHealth = pPlayers[pl_array[j]]->GetMaxHealth(); | 3179 pPlayers[pl_array[j]]->sHealth = pPlayers[pl_array[j]]->GetMaxHealth(); |
3180 pGame->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pl_array[j]); | 3180 pEngine->GetStru6()->SetPlayerBuffAnim(pCastSpell->uSpellID, pl_array[j]); |
3181 } | 3181 } |
3182 pGame->GetStru6()->FadeScreen__like_Turn_Undead_and_mb_Armageddon(0, 64); | 3182 pEngine->GetStru6()->FadeScreen__like_Turn_Undead_and_mb_Armageddon(0, 64); |
3183 spell_sound_flag = true; | 3183 spell_sound_flag = true; |
3184 break; | 3184 break; |
3185 } | 3185 } |
3186 case SPELL_DARK_ARMAGEDDON://Армагеддон | 3186 case SPELL_DARK_ARMAGEDDON://Армагеддон |
3187 { | 3187 { |