Ejemplo n.º 1
0
        public override void Execute(Map.World world)
        {
            if (HadConversation)
            {
                HadConversation = false;
                Logger.Debug(" Quests.Advance(72221) ");
            }
            foreach (var player in world.Players.Values)
            {
                player.Toon.ActiveQuest = 72221;
                player.Toon.StepOfQuest = 2;
                Logger.Debug(" Progress Saved ");
            }
            ;
            var      TELEGAS    = world.GetActorsBySNO(112131);
            Vector3D LastTelega = new Vector3D();

            foreach (var TELEGA in TELEGAS)
            {
                TELEGA.Destroy();
                LastTelega = TELEGA.Position;
            }

            world.Game.Quests.NotifyQuest(72221, QuestStepObjectiveType.HadConversation, 198292);
            var BlacksmithQuest = world.GetActorBySNO(65036);

            (BlacksmithQuest as Core.GS.Actors.InteractiveNPC).Conversations.Clear();
            (BlacksmithQuest as Core.GS.Actors.InteractiveNPC).Attributes[Net.GS.Message.GameAttribute.Conversation_Icon, 0] = 0;
            (BlacksmithQuest as Core.GS.Actors.InteractiveNPC).Attributes.BroadcastChangedIfRevealed();

            BlacksmithQuest.WalkSpeed = 0.33f;
            BlacksmithQuest.RunSpeed  = 0.33f;

            Vector3D FirstPoint  = new Vector3D(2905.856f, 2584.807f, 0.5997877f);
            Vector3D SecondPoint = new Vector3D(2790.396f, 2611.313f, 0.5997864f);

            var FirstfacingAngle = Actors.Movement.MovementHelpers.GetFacingAngle(BlacksmithQuest, FirstPoint);

            var SecondfacingAngle = Actors.Movement.MovementHelpers.GetFacingAngle(BlacksmithQuest, SecondPoint);

            BlacksmithQuest.Move(FirstPoint, FirstfacingAngle);

            Ticker.TickTimer Timeout  = new Ticker.SecondsTickTimer(world.Game, 3f);
            var ListenerKingSkeletons = System.Threading.Tasks.Task <bool> .Factory.StartNew(() => WaitToSpawn(Timeout));

            ListenerKingSkeletons.ContinueWith(delegate
            {
                BlacksmithQuest.Move(SecondPoint, SecondfacingAngle);
            });
        }
Ejemplo n.º 2
0
        public override void Execute(Map.World world)
        {
            if (HadConversation)
            {
                HadConversation = false;
                world.Game.Quests.Advance(72095);
                world.Game.Quests.Notify(QuestStepObjectiveType.CompleteQuest, 72095);
            }
            foreach (var player in world.Players)
            {
                var dbQuestProgress = DBSessions.AccountSession.Get <DBProgressToon>(player.Value.Toon.PersistentID);
                dbQuestProgress.LastQuest   = 72095;
                dbQuestProgress.ActiveQuest = 72221;
                dbQuestProgress.StepOfQuest = 1;
                DBSessions.AccountSession.SaveOrUpdate(dbQuestProgress);
                DBSessions.AccountSession.Flush();
                player.Value.InGameClient.SendMessage(new Mooege.Net.GS.Message.Definitions.Quest.QuestMeterMessage()
                {
                    snoQuest = 72095,
                    Field1   = 2,
                    Field2   = 10.0f
                });
            }
            ;
            Logger.Debug(" Второй квест окончен. ");

            // starting third quest
            world.Game.Quests.Advance(72221);
            var      BlacksmithVendor = world.GetActorBySNO(56947);
            Vector3D position         = new Vector3D(BlacksmithVendor.Position);
            //world.SpawnMonster(65036, position);// NonVendor - 65036
            var BlacksmithQuest = world.GetActorBySNO(65036);

            BlacksmithQuest.RotationAxis = BlacksmithVendor.RotationAxis;
            BlacksmithQuest.RotationW    = BlacksmithVendor.RotationW;
            world.Leave(BlacksmithVendor);

            var      TELEGAS    = world.GetActorsBySNO(112131);
            Vector3D LastTelega = new Vector3D();

            foreach (var TELEGA in TELEGAS)
            {
                TELEGA.Destroy();
                LastTelega = TELEGA.Position;
            }
        }
Ejemplo n.º 3
0
        public override void Execute(Map.World world)
        {
            if (HadConversation)
            {
                HadConversation = false;
                Logger.Debug(" Quests.Advance(72221) ");
                //198312 - had Conv
                //156381 - Chancellor Eamon
            }
            foreach (var player in world.Players)
            {
                var dbQuestProgress = DBSessions.AccountSession.Get <DBProgressToon>(player.Value.Toon.PersistentID);
                dbQuestProgress.ActiveQuest = 72221;
                dbQuestProgress.StepOfQuest = 2;
                DBSessions.AccountSession.SaveOrUpdate(dbQuestProgress);
                DBSessions.AccountSession.Flush();
                Logger.Debug(" Progress Saved ");
            }
            ;
            // Нахер тележку!)
            //3026,339 2779,678 24,04532
            // 112131 - Телега
            var      TELEGAS    = world.GetActorsBySNO(112131);
            Vector3D LastTelega = new Vector3D();

            foreach (var TELEGA in TELEGAS)
            {
                TELEGA.Destroy();
                LastTelega = TELEGA.Position;
            }


            var      BlacksmithQuest  = world.GetActorBySNO(65036);
            Vector3D FirstPoint       = new Vector3D(3026.339f, 2779.678f, 24.0453f);
            var      FirstfacingAngle = Actors.Movement.MovementHelpers.GetFacingAngle(BlacksmithQuest, FirstPoint);

            //BlacksmithQuest.Move(FirstPoint,FirstfacingAngle);

            //world.SpawnMonster(112131, LastTelega);
            StartConversation(world, 198307);
        }
Ejemplo n.º 4
0
        public void Consume(GameClient client, GameMessage message)
        {
            if (message is JoinBNetGameMessage)
            {
                OnJoinGame(client, (JoinBNetGameMessage)message);
            }

            //Остреливаем левый портал
            var FalsePortal = client.Player.World.GetActorBySNO(5648);
            //client.Player.World.Leave(FalsePortal);
            //FalsePortal.Destroy();
            //Тестовая проверка прохождения // Пока только синг.
            var dbQuestProgress = DBSessions.AccountSession.Get <DBProgressToon>(client.Player.Toon.PersistentID);
            var world           = client.Player.World;

            #region Акт 1

            #region Акт 1 Квест 2 - Наследие декарда каина
            if (dbQuestProgress.ActiveQuest == 72095)
            {
                #region Перемотка ко второму квесту
                for (int Rem = 0; Rem < 8; Rem++)
                {
                    world.Game.Quests.Advance(87700);
                }
                #endregion
                var LeahBrains = world.GetActorByDynamicId(72);

                if (LeahBrains != null)
                {
                    Logger.Debug("Вышибаем SNO {0}, мир содершит {1} ", LeahBrains.ActorSNO, world.GetActorsBySNO(3739).Count);
                    world.Leave(LeahBrains);
                    world.Leave(world.GetActorByDynamicId(75));
                }
                if (dbQuestProgress.StepOfQuest == -1 || dbQuestProgress.StepOfQuest == 0 || dbQuestProgress.StepOfQuest == 1 || dbQuestProgress.StepOfQuest == 2)
                {
                    world.Leave(world.GetActorByDynamicId(83));
                    Hireling LeahFriend = new Hireling(world, LeahBrains.ActorSNO.Id, LeahBrains.Tags);
                    var      NewPoint   = new Vector3D(LeahBrains.Position.X, LeahBrains.Position.Y + 5, LeahBrains.Position.Z);
                    LeahFriend.Brain = new MinionBrain(LeahFriend);
                    LeahFriend.Attributes[GameAttribute.Untargetable] = false;
                    LeahFriend.GBHandle.Type = 4;
                    LeahFriend.GBHandle.GBID = 717705071;
                    LeahFriend.Attributes[GameAttribute.Pet_Creator] = client.Player.PlayerIndex;
                    LeahFriend.Attributes[GameAttribute.Pet_Type]    = 0;
                    LeahFriend.Attributes[GameAttribute.Pet_Owner]   = client.Player.PlayerIndex;
                    LeahFriend.Position     = RandomDirection(client.Player.Position, 3f, 8f);
                    LeahFriend.RotationW    = LeahBrains.RotationW;
                    LeahFriend.RotationAxis = LeahBrains.RotationAxis;
                    LeahFriend.EnterWorld(NewPoint);
                    LeahFriend.Attributes[GameAttribute.Level] = 6;
                    client.Player.ActiveHireling = LeahFriend;
                    client.Player.SelectedNPC    = null;
                    LeahFriend.Brain.Activate();
                }
                if (dbQuestProgress.StepOfQuest == -1 || dbQuestProgress.StepOfQuest == 0 || dbQuestProgress.StepOfQuest == 1)
                {
                    var    NewTristramPortal     = world.GetActorByDynamicId(34);
                    Player MasterPlayer          = client.Player;
                    var    ListenerUsePortalTask = Task <bool> .Factory.StartNew(() => OnUseTeleporterListener(NewTristramPortal.DynamicID, world));
                }
                if (dbQuestProgress.StepOfQuest == -1 || dbQuestProgress.StepOfQuest == 0 || dbQuestProgress.StepOfQuest == 1 || dbQuestProgress.StepOfQuest == 2)
                {
                    Player MasterPlayer = client.Player;
                    var    ListenerEnterToOldTristram = Task <bool> .Factory.StartNew(() => OnListenerToEnter(MasterPlayer, world));

                    ListenerEnterToOldTristram.ContinueWith(delegate   //Once killed:
                    {
                        Logger.Debug("Enter to Road Objective done "); // Waypoint_OldTristram
                        var ListenerEnterToAdriaEnter = Task <bool> .Factory.StartNew(() => OnListenerToAndriaEnter(MasterPlayer, world));
                    });
                }
                if (dbQuestProgress.StepOfQuest == 3)
                {
                    Player MasterPlayer = client.Player;
                    var    ListenerEnterToAdriaEnter = Task <bool> .Factory.StartNew(() => OnListenerToAndriaEnter(MasterPlayer, world));
                }
                if (dbQuestProgress.StepOfQuest > 3 && dbQuestProgress.StepOfQuest < 11)
                {
                    LeahBrains.EnterWorld(LeahBrains.Position);
                }

                if (dbQuestProgress.StepOfQuest == 12)
                {
                    Player      MasterPlayer   = client.Player;
                    var         CainIntroWorld = client.Player.World.Game.GetWorld(60713);
                    var         minions        = CainIntroWorld.GetActorsBySNO(80652);
                    List <uint> SkilletKiller  = new List <uint> {
                    };

                    foreach (var minion in minions)
                    {
                        SkilletKiller.Add(minion.DynamicID);
                    }
                    var CainKillerEvent = Task <bool> .Factory.StartNew(() => OnKillListenerCain(SkilletKiller, CainIntroWorld));

                    CainKillerEvent.ContinueWith(delegate
                    {
                        world.Game.Quests.Advance(72095);
                        dbQuestProgress.StepOfQuest = 13;
                    });
                }
            }

            #endregion

            #region Акт 1 Квест 3 - Сломанная корона
            if (dbQuestProgress.ActiveQuest == 72221)
            {
                world.Leave(world.GetActorByDynamicId(72));
                #region Перемотка ко второму квесту
                for (int Rem = 0; Rem < 8; Rem++)
                {
                    world.Game.Quests.Advance(87700);
                }
                //world.Leave(world.GetActorByDynamicId(75));
                #endregion
                #region Перемотка ко третьему квесту
                for (int Rem = 0; Rem < 15; Rem++)
                {
                    world.Game.Quests.Advance(72095);
                }
                world.Leave(world.GetActorByDynamicId(25));
                //world.Game.Quests.Advance(72095);
                #endregion
                if (dbQuestProgress.StepOfQuest >= 0 && dbQuestProgress.StepOfQuest < 5)
                {
                    var      BlacksmithVendor = world.GetActorBySNO(56947);
                    Vector3D position         = new Vector3D(BlacksmithVendor.Position);
                    //world.SpawnMonster(65036, position);// NonVendor - 65036
                    var BlacksmithQuest = world.GetActorBySNO(65036);
                    BlacksmithQuest.RotationAxis = BlacksmithVendor.RotationAxis;
                    BlacksmithQuest.RotationW    = BlacksmithVendor.RotationW;
                    world.Leave(BlacksmithVendor);
                }
                if (dbQuestProgress.StepOfQuest == 6)
                {
                    var ListenerEnterToGraveyard = Task <bool> .Factory.StartNew(() => OnListenerToEnterGraveyard(client.Player, world));

                    ListenerEnterToGraveyard.ContinueWith(delegate
                    {
                        Logger.Debug("Enter to Road Objective done ");
                    });
                }
            }

            #endregion

            #endregion

            #region Основная проверка
            if (dbQuestProgress.ActiveQuest != -1)
            {
                #region Нижнии ворота тристрама
                var DownGate = world.GetActorBySNO(90419);
                DownGate.Attributes[GameAttribute.Gizmo_State] = 1;
                DownGate.Attributes.BroadcastChangedIfRevealed();
                world.BroadcastIfRevealed(new Message.Definitions.Animation.SetIdleAnimationMessage
                {
                    ActorID      = DownGate.DynamicID,
                    AnimationSNO = Core.GS.Common.Types.TagMap.AnimationSetKeys.Open.ID
                }, DownGate);
                #endregion

                #region Убираем телегу
                if (dbQuestProgress.ActiveQuest != 87700 && dbQuestProgress.ActiveQuest != 72095)
                {
                    var      TELEGAS    = world.GetActorsBySNO(112131);
                    Vector3D LastTelega = new Vector3D();
                    foreach (var TELEGA in TELEGAS)
                    {
                        TELEGA.Destroy();
                        LastTelega = TELEGA.Position;
                    }
                }
                #endregion
                if (dbQuestProgress.StepOfQuest > 0)
                {
                    // Вышибаем лею
                    var actorToShoot = world.GetActorByDynamicId(72);
                    if (dbQuestProgress.ActiveQuest == 87700)
                    {
                        if (actorToShoot != null)
                        {
                            Logger.Debug("Вышибаем SNO {0}, мир содершит {1} ", actorToShoot.ActorSNO, world.GetActorsBySNO(3739).Count);
                            world.Leave(actorToShoot);
                        }
                        else
                        {
                            Logger.Debug("Вышибать некого");
                        }
                    }

                    Logger.Warn("Обнаружен начатый квест {0}", dbQuestProgress.ActiveQuest);
                    for (int CS = 0; CS < dbQuestProgress.StepOfQuest; CS++)
                    {
                        world.Game.Quests.Advance(dbQuestProgress.ActiveQuest);
                        //Logger.Warn("Обнаруженно прохождение квеста {0}, шаг квеста {1]", dbQuestProgress.ActiveQuest, dbQuestProgress.StepOfQuest);
                    }
                    Logger.Warn("Обнаружено Прохождение квеста {0}, шаг - {1}", dbQuestProgress.ActiveQuest, dbQuestProgress.StepOfQuest);
                }
                else
                {
                    world.Game.Quests.Advance(dbQuestProgress.ActiveQuest);
                    Logger.Warn("Обнаружен начатый квест {0}", dbQuestProgress.ActiveQuest);
                }
                if (dbQuestProgress.ActiveQuest == 87700)
                {
                    if (dbQuestProgress.StepOfQuest == 8)
                    {
                        world.Game.Quests.NotifyQuest(87700, Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.InteractWithActor, 192164);
                    }
                }
            }
            #endregion

            #region Сырые локации



            #endregion
            #region Заполним немного локации))
            Vector3D[] Points = new Vector3D[4];
            Points[0] = new Vector3D(2427.788f, 2852.193f, 27.1f);
            Points[1] = new Vector3D(2356.931f, 2528.715f, 27.1f);
            Points[2] = new Vector3D(2119.563f, 2489.693f, 27.1f);
            Points[3] = new Vector3D(2021.855f, 2774.645f, 40.05685f);
            int FatZombieAID   = 6652;
            int RisenZombieAID = 6644;
            //Ugly add monster, скучно))
            Vector3D[] MobPosSpawn = new Vector3D[50];
            foreach (Vector3D Point in Points)
            {
                for (int a = 0; a < 6; a++)
                {
                    world.SpawnMonster(RisenZombieAID, RandomDirection(Point, 10f, 80f));
                }
                for (int a = 0; a < 4; a++)
                {
                    world.SpawnMonster(FatZombieAID, RandomDirection(Point, 10f, 80f));
                }
            }

            #endregion
            DBSessions.AccountSession.Flush();
        }
Ejemplo n.º 5
0
        }   // for possile future messages consumed by game. /raist.

        #endregion

        #region player-handling

        /// <summary>
        /// Allows a player to join the game.
        /// </summary>
        /// <param name="joinedPlayer">The new player.</param>
        public void Enter(Player joinedPlayer)
        {
            this.Players.TryAdd(joinedPlayer.InGameClient, joinedPlayer);

            // send all players in the game to new player that just joined (including him)
            foreach (var pair in this.Players)
            {
                this.SendNewPlayerMessage(joinedPlayer, pair.Value);
            }

            // notify other players about our new player too.
            foreach (var pair in this.Players.Where(pair => pair.Value != joinedPlayer))
            {
                this.SendNewPlayerMessage(pair.Value, joinedPlayer);
            }

            var GameData = new GameSyncedData()
            {
                Field0 = 0x0,
                NowAct = 0x0,
                Field2 = 0x0,
                Field3 = 0x0,
                Field4 = 0x0,
                Field5 = 0x0,
                Field6 = 0x0,
                //Field7 = 0x0,
                Field7 = new[] { 0x0, 0x0 },
                Field8 = new[] { 0x0, 0x0 },
                //Field9 = new[] { 0x0, 0x0 },
                //Field10 = new[] { 0x0, 0x0 },
                //Field11 = new EntityId { High = 0,Low = 0 },
            };

            switch (joinedPlayer.Toon.ActiveAct)
            {
            case 100:
                GameData.NowAct = 100;
                break;

            case 200:
                GameData.NowAct = 200;
                break;

            case 300:
                GameData.NowAct = 300;
                break;
            }
            joinedPlayer.InGameClient.SendMessage(new GameSyncedDataMessage
            {
                Field0 = GameData
            });

            #region Загрузка лора игроков
            string LoreVar = joinedPlayer.Toon.LoreCollected;
            if (LoreVar != null & LoreVar != "")
            {
                string[] parts = LoreVar.Split(new char[] { '|' });
                foreach (var part in parts)
                {
                    joinedPlayer.AddLoreFromBase(Convert.ToInt32(part));
                }
            }
            #endregion
            if (joinedPlayer.PlayerIndex == 0)
            {
                if (joinedPlayer.Toon.ActiveAct == 0)
                {
                    #region Акт 1 Квест 1
                    if (joinedPlayer.Toon.ActiveQuest == 87700 & joinedPlayer.Toon.StepIDofQuest > 0)
                    {
                        StartingWorld.Leave(StartingWorld.GetActorByDynamicId(72));
                        //3739 - Rumford

                        var Capitan = StartingWorld.GetActorBySNO(3739);
                        Capitan.Attributes[Net.GS.Message.GameAttribute.MinimapActive] = true;
                        (Capitan as Core.GS.Actors.InteractiveNPC).Conversations.Clear();
                        (Capitan as Core.GS.Actors.InteractiveNPC).Conversations.Add(new Core.GS.Actors.Interactions.ConversationInteraction(198503));

                        Capitan.Attributes[Net.GS.Message.GameAttribute.Conversation_Icon, 0] = 1;
                        Capitan.Attributes.BroadcastChangedIfRevealed();
                    }
                    #endregion

                    #region Акт 1 Квест 2 - Наследие декарда каина
                    else if (joinedPlayer.Toon.ActiveQuest == 72095)
                    {
                        StartingWorld.Leave(StartingWorld.GetActorByDynamicId(72));

                        #region Перемотка ко второму квесту
                        for (int Rem = 0; Rem < 8; Rem++)
                        {
                            StartingWorld.Game.Quests.Advance(87700);
                        }
                        StartingWorld.Game.Quests.NotifyQuest(87700, NullD.Common.MPQ.FileFormats.QuestStepObjectiveType.InteractWithActor, 192164);
                        StartingWorld.Game.Quests.NotifyQuest(87700, NullD.Common.MPQ.FileFormats.QuestStepObjectiveType.HadConversation, 198521);

                        #endregion


                        //Берем нужную Лию =)
                        var LeahBrains = StartingWorld.GetActorByDynamicId(83);

                        Player MasterPlayer = joinedPlayer;
                        if (LeahBrains != null)
                        {
                            Logger.Debug("Вышибаем SNO {0}, мир содершит {1} ", LeahBrains.ActorSNO, StartingWorld.GetActorsBySNO(3739).Count);
                            StartingWorld.Leave(LeahBrains);
                        }
                        if (joinedPlayer.Toon.StepIDofQuest == -1 || joinedPlayer.Toon.StepIDofQuest == 28)
                        {
                            try
                            {
                                Hireling LeahFriend = new LeahParty(StartingWorld, LeahBrains.ActorSNO.Id, LeahBrains.Tags);
                                //LeahFriend.Brain = new HirelingBrain(LeahFriend);

                                LeahFriend.GBHandle.Type = 4;
                                LeahFriend.GBHandle.GBID = 717705071;
                                LeahFriend.Attributes[GameAttribute.Pet_Creator]        = joinedPlayer.PlayerIndex;
                                LeahFriend.Attributes[GameAttribute.Pet_Type]           = 0x8;
                                LeahFriend.Attributes[GameAttribute.Hitpoints_Max]      = 100f;
                                LeahFriend.Attributes[GameAttribute.Hitpoints_Cur]      = 80f;
                                LeahFriend.Attributes[GameAttribute.Attacks_Per_Second] = 1.6f;
                                LeahFriend.Attributes[GameAttribute.Pet_Owner]          = joinedPlayer.PlayerIndex;
                                LeahFriend.Attributes[GameAttribute.Untargetable]       = false;
                                LeahFriend.Position     = joinedPlayer.Position;
                                LeahFriend.RotationW    = LeahBrains.RotationW;
                                LeahFriend.RotationAxis = LeahBrains.RotationAxis;
                                LeahFriend.EnterWorld(LeahBrains.Position);
                                LeahFriend.Attributes[GameAttribute.Level]++;
                                joinedPlayer.ActiveHireling = LeahFriend;
                                LeahFriend.Brain.Activate();
                                MasterPlayer = joinedPlayer;
                                StartingWorld.Leave(LeahBrains);


                                var NewTristramPortal     = StartingWorld.GetActorBySNO(223757);
                                var ListenerUsePortalTask = Task <bool> .Factory.StartNew(() => OnUseTeleporterListener(NewTristramPortal.DynamicID, StartingWorld));

                                ListenerUsePortalTask.ContinueWith(delegate                //Once killed:
                                {
                                    Logger.Debug(" Waypoint_NewTristram Objective done "); // Waypoint_NewTristram
                                });
                                var ListenerEnterToOldTristram = Task <bool> .Factory.StartNew(() => OnListenerToEnter(joinedPlayer, StartingWorld));

                                ListenerEnterToOldTristram.ContinueWith(delegate   //Once killed:
                                {
                                    Logger.Debug("Enter to Road Objective done "); // Waypoint_OldTristram
                                    var ListenerEnterToAdriaEnter = Task <bool> .Factory.StartNew(() => OnListenerToAndriaEnter(joinedPlayer, StartingWorld));
                                });
                            }
                            catch
                            {
                                Logger.Warn("Ошибка создания спутника");

                                var NewTristramPortal     = StartingWorld.GetActorBySNO(223757);
                                var ListenerUsePortalTask = Task <bool> .Factory.StartNew(() => OnUseTeleporterListener(NewTristramPortal.DynamicID, StartingWorld));

                                ListenerUsePortalTask.ContinueWith(delegate                //Once killed:
                                {
                                    Logger.Debug(" Waypoint_NewTristram Objective done "); // Waypoint_NewTristram
                                });
                                var ListenerEnterToOldTristram = Task <bool> .Factory.StartNew(() => OnListenerToEnter(joinedPlayer, StartingWorld));

                                ListenerEnterToOldTristram.ContinueWith(delegate   //Once killed:
                                {
                                    Logger.Debug("Enter to Road Objective done "); // Waypoint_OldTristram
                                    var ListenerEnterToAdriaEnter = Task <bool> .Factory.StartNew(() => OnListenerToAndriaEnter(joinedPlayer, StartingWorld));
                                });
                            }
                        }
                        else if (joinedPlayer.Toon.StepIDofQuest == 51)
                        {
                            joinedPlayer.Toon.StepOfQuest = 6;
                            var Gate = StartingWorld.GetActorBySNO(108466);
                            Gate.Destroy();
                            StartingWorld.Leave(LeahBrains);
                        }
                        else
                        {
                            StartingWorld.Leave(LeahBrains);
                            LeahBrains.EnterWorld(LeahBrains.Position);
                        }
                    }

                    #endregion
                }
            }

            #region Прохождение игры 2.0 и Хард Фиксы
            if (joinedPlayer.Toon.ActiveQuest != -1)
            {
                if (joinedPlayer.Toon.ActiveAct == 0)
                {
                    joinedPlayer.EnterWorld(StartingWorld.StartingPoints.First().Position);

                    if (joinedPlayer.Toon.ActiveQuest != 87700)
                    {
                        #region Нижнии ворота тристрама
                        var DownGate = StartingWorld.GetActorBySNO(90419);
                        DownGate.Attributes[GameAttribute.Gizmo_State]  = 1;
                        DownGate.Attributes[GameAttribute.Untargetable] = true;
                        DownGate.Attributes.BroadcastChangedIfRevealed();
                        StartingWorld.BroadcastIfRevealed(new Net.GS.Message.Definitions.Animation.SetIdleAnimationMessage
                        {
                            ActorID      = DownGate.DynamicID,
                            AnimationSNO = Core.GS.Common.Types.TagMap.AnimationSetKeys.Open.ID
                        }, DownGate);
                        #endregion
                        //Убираем телегу
                        var FactorToShoot = StartingWorld.GetActorBySNO(81699);
                        FactorToShoot.Destroy();
                    }

                    #region Убираем телегу или делаем её нормальной.
                    if (joinedPlayer.Toon.ActiveQuest != 87700 && joinedPlayer.Toon.ActiveQuest != 72095 && joinedPlayer.Toon.ActiveQuest != -1)
                    {
                        var TELEGAS = StartingWorld.GetActorsBySNO(112131);
                        foreach (var TELEGA in TELEGAS)
                        {
                            TELEGA.Destroy();
                        }
                    }
                    else
                    {
                        var TELEGAS = StartingWorld.GetActorsBySNO(112131);
                        foreach (var TELEGA in TELEGAS)
                        {
                            TELEGA.Field2 = 0;
                        }
                    }
                    #endregion

                    if (joinedPlayer.Toon.StepIDofQuest != -1)
                    {
                        StartingWorld.Game.Quests[joinedPlayer.Toon.ActiveQuest].SwitchToStep(joinedPlayer.Toon.ActiveQuest, joinedPlayer.Toon.StepIDofQuest);
                    }
                    else
                    {
                        StartingWorld.Game.Quests[joinedPlayer.Toon.ActiveQuest].Advance();
                    }
                    if (joinedPlayer.Toon.ActiveQuest == 72546)
                    {
                        if (joinedPlayer.Toon.StepIDofQuest == 36)
                        {
                            joinedPlayer.Toon.StepOfQuest = 10;
                        }
                    }
                    if (joinedPlayer.Toon.ActiveQuest == 72061)
                    {
                        if (joinedPlayer.Toon.StepIDofQuest == 44)
                        {
                            StartingWorld.Game.Quests.NotifyQuest(72061, NullD.Common.MPQ.FileFormats.QuestStepObjectiveType.EnterWorld, 50585);
                        }
                    }
                }
            }
            else
            {
                joinedPlayer.EnterWorld(this.StartingWorld.StartingPoints.Find(x => x.ActorSNO.Name == "Start_Location_Team_0").Position);
                bool questConversation = true;
                var  Capitan           = this.StartingWorld.GetActorBySNO(3739);
                Capitan.Attributes[Net.GS.Message.GameAttribute.MinimapActive] = true;
                (Capitan as Core.GS.Actors.InteractiveNPC).Conversations.Clear();
                (Capitan as Core.GS.Actors.InteractiveNPC).Conversations.Add(new Core.GS.Actors.Interactions.ConversationInteraction(151087));

                Capitan.Attributes[Net.GS.Message.GameAttribute.Conversation_Icon, 0] = questConversation ? 1 : 0;
                Capitan.Attributes.BroadcastChangedIfRevealed();

                //Убираем эту заразу) wretchedMother
                StartingWorld.Leave(StartingWorld.GetActorBySNO(176889));
            }
            joinedPlayer.Toon.Side_StepOfQuest = 0;
            #endregion

            //Запуск игры
            joinedPlayer.InGameClient.TickingEnabled = true; // it seems bnet-servers only start ticking after player is completely in-game. /raist
        }
Ejemplo n.º 6
0
        public override void Execute(Map.World world)
        {
            if (HadConversation)
            {
                HadConversation = false;
            }
            foreach (var player in world.Players.Values)
            {
                player.Toon.MaximumQuest = 72221;
                player.Toon.ActiveQuest  = 72221;
                player.Toon.StepOfQuest  = -1;
            }
            ;
            Logger.Debug(" Второй квест окончен. ");


            bool questConversation = true;
            var  Cain = world.GetActorBySNO(3533);

            Cain.Attributes[Net.GS.Message.GameAttribute.MinimapActive] = true;
            (Cain as InteractiveNPC).Conversations.Clear();
            (Cain as InteractiveNPC).Conversations.Add(new Actors.Interactions.ConversationInteraction(198691));

            Cain.Attributes[Net.GS.Message.GameAttribute.Conversation_Icon, 0] = questConversation ? 1 : 0;
            Cain.Attributes.BroadcastChangedIfRevealed();

            try
            {
                var      BlacksmithVendor = world.GetActorBySNO(56947);
                Vector3D position         = new Vector3D(BlacksmithVendor.Position);
                var      BlacksmithQuest  = world.GetActorBySNO(65036);
                BlacksmithQuest.RotationAxis = BlacksmithVendor.RotationAxis;
                BlacksmithQuest.RotationW    = BlacksmithVendor.RotationW;

                var      TELEGAS    = world.GetActorsBySNO(112131);
                Vector3D LastTelega = new Vector3D();
                foreach (var TELEGA in TELEGAS)
                {
                    LastTelega = TELEGA.Position;
                    TELEGA.Destroy();
                }
            }
            catch { Logger.Warn("Не критичная ошибка скрипта."); }

            Players.Player Master = null;

            Logger.Debug("ПОЛУЧЕНИЕ НАГРАДЫ!");
            foreach (var player in world.Game.Players.Values)
            {
                if (player.PlayerIndex == 0)
                {
                    Master = player;
                }

                D3.Quests.QuestReward.Builder Reward = new D3.Quests.QuestReward.Builder();
                Reward.SnoQuest  = 72095;
                Reward.XpGranted = 3300;

                D3.Quests.QuestStepComplete.Builder StepCompleted = new D3.Quests.QuestStepComplete.Builder();
                StepCompleted.Reward = Reward.Build();
                StepCompleted.SetIsQuestComplete(true);

                player.InGameClient.SendMessage(new Net.GS.Message.Definitions.Quest.QuestStepCompleteMessage()
                {
                    QuestStepComplete = StepCompleted.Build()
                });
                player.UpdateExp(Reward.XpGranted);
            }
        }
Ejemplo n.º 7
0
        public void Consume(GameClient client, GameMessage message)
        {
            if (message is JoinBNetGameMessage)
            {
                OnJoinGame(client, (JoinBNetGameMessage)message);
            }

            //Остреливаем левый портал
            var FalsePortal = client.Player.World.GetActorBySNO(5648);
            //client.Player.World.Leave(FalsePortal);
            //FalsePortal.Destroy();
            //Тестовая проверка прохождения // Пока только синг.
            var dbQuestProgress = DBSessions.AccountSession.Get <DBProgressToon>(client.Player.Toon.PersistentID);
            var world           = client.Player.World;

            //[050453] [UI] Quests
            //[050454] [UI] QuestUpdate
            //[174218] [UI] QuestReward
            #region Акт 1

            #region Акт 1 Квест 2 - Наследие декарда каина
            if (dbQuestProgress.ActiveQuest == 72095)
            {
                #region Перемотка ко второму квесту
                for (int Rem = 0; Rem < 8; Rem++)
                {
                    world.Game.Quests.Advance(87700);
                }
                #endregion
                var LeahBrains = world.GetActorByDynamicId(72);

                if (LeahBrains != null)
                {
                    Logger.Debug("Вышибаем SNO {0}, мир содершит {1} ", LeahBrains.ActorSNO, world.GetActorsBySNO(3739).Count);
                    world.Leave(LeahBrains);
                    world.Leave(world.GetActorByDynamicId(75));
                }
                if (dbQuestProgress.StepOfQuest == -1 || dbQuestProgress.StepOfQuest == 0 || dbQuestProgress.StepOfQuest == 1 || dbQuestProgress.StepOfQuest == 2)
                {
                    world.Leave(world.GetActorByDynamicId(83));
                    Hireling LeahFriend = new Hireling(world, LeahBrains.ActorSNO.Id, LeahBrains.Tags);
                    LeahFriend.Brain = new HirelingBrain(LeahFriend);
                    // SetBrain(new MinionBrain(this));
                    LeahFriend.Attributes[GameAttribute.Untargetable] = false;
                    LeahFriend.GBHandle.Type = 4;
                    LeahFriend.GBHandle.GBID = 717705071;
                    LeahFriend.Attributes[GameAttribute.Pet_Creator] = client.Player.PlayerIndex;
                    LeahFriend.Attributes[GameAttribute.Pet_Type]    = 0;
                    LeahFriend.Attributes[GameAttribute.Pet_Owner]   = client.Player.PlayerIndex;
                    LeahFriend.RotationW    = LeahBrains.RotationW;
                    LeahFriend.RotationAxis = LeahBrains.RotationAxis;
                    LeahFriend.EnterWorld(RandomDirection(client.Player.Position, 3f, 8f));
                    LeahFriend.Attributes[GameAttribute.Level] = 6;
                    client.Player.ActiveHireling = LeahFriend;


                    LeahFriend.Brain.Activate();
                }
                if (dbQuestProgress.StepOfQuest == -1 || dbQuestProgress.StepOfQuest == 0 || dbQuestProgress.StepOfQuest == 1)
                {
                    var    NewTristramPortal     = world.GetActorByDynamicId(34);
                    Player MasterPlayer          = client.Player;
                    var    ListenerUsePortalTask = Task <bool> .Factory.StartNew(() => OnUseTeleporterListener(NewTristramPortal.DynamicID, world));
                }
                if (dbQuestProgress.StepOfQuest == -1 || dbQuestProgress.StepOfQuest == 0 || dbQuestProgress.StepOfQuest == 1 || dbQuestProgress.StepOfQuest == 2)
                {
                    Player MasterPlayer = client.Player;
                    var    ListenerEnterToOldTristram = Task <bool> .Factory.StartNew(() => OnListenerToEnter(MasterPlayer, world));

                    ListenerEnterToOldTristram.ContinueWith(delegate   //Once killed:
                    {
                        Logger.Debug("Enter to Road Objective done "); // Waypoint_OldTristram
                        var ListenerEnterToAdriaEnter = Task <bool> .Factory.StartNew(() => OnListenerToAndriaEnter(MasterPlayer, world));
                    });
                }
                if (dbQuestProgress.StepOfQuest == 3)
                {
                    Player MasterPlayer = client.Player;
                    var    ListenerEnterToAdriaEnter = Task <bool> .Factory.StartNew(() => OnListenerToAndriaEnter(MasterPlayer, world));
                }
                if (dbQuestProgress.StepOfQuest > 3 && dbQuestProgress.StepOfQuest < 11)
                {
                    LeahBrains.EnterWorld(LeahBrains.Position);
                }

                if (dbQuestProgress.StepOfQuest == 12)
                {
                    Player      MasterPlayer   = client.Player;
                    var         CainIntroWorld = client.Player.World.Game.GetWorld(60713);
                    var         minions        = CainIntroWorld.GetActorsBySNO(80652);
                    List <uint> SkilletKiller  = new List <uint> {
                    };

                    foreach (var minion in minions)
                    {
                        SkilletKiller.Add(minion.DynamicID);
                    }
                    var CainKillerEvent = Task <bool> .Factory.StartNew(() => OnKillListenerCain(SkilletKiller, CainIntroWorld));

                    CainKillerEvent.ContinueWith(delegate
                    {
                        world.Game.Quests.Advance(72095);
                        dbQuestProgress.StepOfQuest = 13;
                    });
                }
            }

            #endregion

            #region Акт 1 Квест 3 - Сломанная корона
            if (dbQuestProgress.ActiveQuest == 72221)
            {
                //world.Leave(world.GetActorByDynamicId(72));
                world.Leave(world.GetActorByDynamicId(75));
                #region Перемотка ко второму квесту
                for (int Rem = 0; Rem < 8; Rem++)
                {
                    world.Game.Quests.Advance(87700);
                }
                //world.Leave(world.GetActorByDynamicId(75));
                #endregion
                #region Перемотка ко третьему квесту
                for (int Rem = 0; Rem < 15; Rem++)
                {
                    world.Game.Quests.Advance(72095);
                }
                world.Leave(world.GetActorByDynamicId(25));
                #endregion
                if (dbQuestProgress.StepOfQuest >= 0 && dbQuestProgress.StepOfQuest < 5)
                {
                    var      BlacksmithVendor = world.GetActorBySNO(56947);
                    Vector3D position         = new Vector3D(BlacksmithVendor.Position);
                    //world.SpawnMonster(65036, position);// NonVendor - 65036
                    var BlacksmithQuest = world.GetActorBySNO(65036);
                    BlacksmithQuest.RotationAxis = BlacksmithVendor.RotationAxis;
                    BlacksmithQuest.RotationW    = BlacksmithVendor.RotationW;
                    world.Leave(BlacksmithVendor);
                }
                if (dbQuestProgress.StepOfQuest == 6)
                {
                    var ListenerEnterToGraveyard = Task <bool> .Factory.StartNew(() => OnListenerToEnterGraveyard(client.Player, world));

                    ListenerEnterToGraveyard.ContinueWith(delegate
                    {
                        Logger.Debug("Enter to Road Objective done ");
                    });
                }
            }

            #endregion

            #region Акт 1 Квест 4 - Правление короля скелетов
            if (dbQuestProgress.ActiveQuest == 72061)
            {
                world.Leave(world.GetActorByDynamicId(75));
                #region Перемотка ко второму квесту
                for (int Rem = 0; Rem < 8; Rem++)
                {
                    world.Game.Quests.Advance(87700);
                }
                //world.Leave(world.GetActorByDynamicId(75));
                #endregion
                #region Перемотка ко третьему квесту
                for (int Rem = 0; Rem < 15; Rem++)
                {
                    world.Game.Quests.Advance(72095);
                }
                world.Leave(world.GetActorByDynamicId(25));
                #endregion
                #region Перемотка к четвертому квесту
                for (int Rem = 0; Rem < 10; Rem++)
                {
                    world.Game.Quests.Advance(72221);
                }
                var      BlacksmithVendor = world.GetActorBySNO(56947);
                Vector3D position         = new Vector3D(BlacksmithVendor.Position);
                world.SpawnMonster(56947, position);// NonVendor - 65036
                #endregion

                if (dbQuestProgress.StepOfQuest < 2)
                {
                    var ListenerUsePortalTask = Task <bool> .Factory.StartNew(() => OnEnterToParkListener(client.Player, world));

                    //Wait for portal to be used or player going to scene.
                    ListenerUsePortalTask.ContinueWith(delegate
                    {
                        Logger.Debug(" Waypoint_Park Objective done ");
                    });
                }
            }
            #endregion

            #region Акт 1 Квест 5 - Меч незнакомца
            if (dbQuestProgress.ActiveQuest == 117779)
            {
                world.Leave(world.GetActorByDynamicId(75));
                #region Перемотка ко второму квесту
                for (int Rem = 0; Rem < 8; Rem++)
                {
                    world.Game.Quests.Advance(87700);
                }
                //world.Leave(world.GetActorByDynamicId(75));
                #endregion
                #region Перемотка ко третьему квесту
                for (int Rem = 0; Rem < 15; Rem++)
                {
                    world.Game.Quests.Advance(72095);
                }
                world.Leave(world.GetActorByDynamicId(25));
                #endregion
                #region Перемотка к четвертому квесту
                for (int Rem = 0; Rem < 10; Rem++)
                {
                    world.Game.Quests.Advance(72221);
                }
                var BlacksmithVendor = world.GetActorBySNO(56947);
                world.Leave(BlacksmithVendor);
                Vector3D position = new Vector3D(BlacksmithVendor.Position);
                world.SpawnMonster(56947, position);// NonVendor - 65036


                #endregion
                #region Перемотка к пятому квесту
                for (int Rem = 0; Rem < 17; Rem++)
                {
                    world.Game.Quests.Advance(72061);
                }
                #endregion

                Vector3D PointToTyrael = new Vector3D(2940.182f, 2792.239f, 24.04533f);
                world.SpawnMonster(117365, PointToTyrael);
                //Открытие ворот
                var ListenerNierDoorsTask = Task <bool> .Factory.StartNew(() => OnNierDoorsListener(client.Player, world));

                //Wait for portal to be used or player going to scene.
                ListenerNierDoorsTask.ContinueWith(delegate
                {
                    Logger.Debug(" Waypoint_Park Objective done ");
                    //No Lock 230324
                    //Lock 216574
                    var Locked   = world.GetActorBySNO(216574);
                    var Unlocked = world.GetActorBySNO(230324);
                    world.Leave(Locked);
                    world.BroadcastIfRevealed(new PlayAnimationMessage
                    {
                        ActorID = Unlocked.DynamicID,
                        Field1  = 5,
                        Field2  = 0,
                        tAnim   = new Net.GS.Message.Fields.PlayAnimationMessageSpec[]
                        {
                            new Net.GS.Message.Fields.PlayAnimationMessageSpec()
                            {
                                Duration         = 1000,
                                AnimationSNO     = Unlocked.AnimationSet.TagMapAnimDefault[Mooege.Core.GS.Common.Types.TagMap.AnimationSetKeys.Opening],
                                PermutationIndex = 0,
                                Speed            = 1
                            }
                        }
                    }, Unlocked);

                    world.BroadcastIfRevealed(new SetIdleAnimationMessage
                    {
                        ActorID      = Unlocked.DynamicID,
                        AnimationSNO = Unlocked.AnimationSet.TagMapAnimDefault[Mooege.Core.GS.Common.Types.TagMap.AnimationSetKeys.Open]
                    }, Unlocked);
                });

                if (dbQuestProgress.StepOfQuest < 2)
                {
                    var ListenerTristramFieldsTask = Task <bool> .Factory.StartNew(() => OnFieldsListener(client.Player, world));

                    ListenerTristramFieldsTask.ContinueWith(delegate
                    {
                        Logger.Debug("Добро пожаловать в гиблые поля");
                        var ListenerFoundCaveTask = Task <bool> .Factory.StartNew(() => OnFoundCaveListener(client.Player, world));
                        ListenerFoundCaveTask.ContinueWith(delegate
                        {
                            Logger.Debug("Пещера Хазра найдена");
                        });
                    });
                }
                if (dbQuestProgress.StepOfQuest == 2)
                {
                    //OnFoundCaveListener
                    var ListenerFoundCaveTask = Task <bool> .Factory.StartNew(() => OnFoundCaveListener(client.Player, world));

                    ListenerFoundCaveTask.ContinueWith(delegate
                    {
                        Logger.Debug("Пещера Хазра найдена");
                    });
                }
                //World - Fields_Cave_SwordOfJustice_Level01 [119888]
            }
            #endregion

            #region Акт 1 Квест 6 - Меч незнакомца
            if (dbQuestProgress.ActiveQuest == 72738)
            {
                world.Leave(world.GetActorByDynamicId(75));
                #region Перемотка ко второму квесту
                for (int Rem = 0; Rem < 8; Rem++)
                {
                    world.Game.Quests.Advance(87700);
                }
                #endregion
                #region Перемотка ко третьему квесту
                for (int Rem = 0; Rem < 15; Rem++)
                {
                    world.Game.Quests.Advance(72095);
                }
                world.Leave(world.GetActorByDynamicId(25));
                #endregion
                #region Перемотка к четвертому квесту
                for (int Rem = 0; Rem < 10; Rem++)
                {
                    world.Game.Quests.Advance(72221);
                }
                var BlacksmithVendor = world.GetActorBySNO(56947);
                world.Leave(BlacksmithVendor);
                Vector3D position = new Vector3D(BlacksmithVendor.Position);
                world.SpawnMonster(56947, position);// NonVendor - 65036


                #endregion
                #region Перемотка к пятому квесту
                for (int Rem = 0; Rem < 17; Rem++)
                {
                    world.Game.Quests.Advance(72061);
                }
                #endregion
                #region Перемотка к шестому квесту
                for (int Rem = 0; Rem < 6; Rem++)
                {
                    world.Game.Quests.Advance(117779);
                }
                #endregion

                Vector3D PointToTyrael = new Vector3D(2940.182f, 2792.239f, 24.04533f);
                world.SpawnMonster(117365, PointToTyrael);
                //Открытие ворот
                var ListenerNierDoorsTask = Task <bool> .Factory.StartNew(() => OnNierDoorsListener(client.Player, world));

                //Открытие ворот в гиблые поля.
                ListenerNierDoorsTask.ContinueWith(delegate
                {
                    Logger.Debug(" Waypoint_Park Objective done ");
                    //No Lock 230324
                    //Lock 216574
                    var Locked   = world.GetActorBySNO(216574);
                    var Unlocked = world.GetActorBySNO(230324);
                    world.Leave(Locked);
                    world.BroadcastIfRevealed(new PlayAnimationMessage
                    {
                        ActorID = Unlocked.DynamicID,
                        Field1  = 5,
                        Field2  = 0,
                        tAnim   = new Net.GS.Message.Fields.PlayAnimationMessageSpec[]
                        {
                            new Net.GS.Message.Fields.PlayAnimationMessageSpec()
                            {
                                Duration         = 1000,
                                AnimationSNO     = Unlocked.AnimationSet.TagMapAnimDefault[Mooege.Core.GS.Common.Types.TagMap.AnimationSetKeys.Opening],
                                PermutationIndex = 0,
                                Speed            = 1
                            }
                        }
                    }, Unlocked);

                    world.BroadcastIfRevealed(new SetIdleAnimationMessage
                    {
                        ActorID      = Unlocked.DynamicID,
                        AnimationSNO = Unlocked.AnimationSet.TagMapAnimDefault[Mooege.Core.GS.Common.Types.TagMap.AnimationSetKeys.Open]
                    }, Unlocked);
                });
            }
            #endregion

            #endregion

            #region Основная проверка
            if (dbQuestProgress.ActiveQuest != -1)
            {
                #region Нижнии ворота тристрама
                var DownGate = world.GetActorBySNO(90419);
                DownGate.Attributes[GameAttribute.Gizmo_State] = 1;
                DownGate.Attributes.BroadcastChangedIfRevealed();
                world.BroadcastIfRevealed(new Message.Definitions.Animation.SetIdleAnimationMessage
                {
                    ActorID      = DownGate.DynamicID,
                    AnimationSNO = Core.GS.Common.Types.TagMap.AnimationSetKeys.Open.ID
                }, DownGate);
                #endregion
                //Убираем телегу
                var FactorToShoot = world.GetActorBySNO(81699);
                FactorToShoot.Destroy();
                #region Убираем телегу
                if (dbQuestProgress.ActiveQuest != 87700 && dbQuestProgress.ActiveQuest != 72095)
                {
                    var      TELEGAS    = world.GetActorsBySNO(112131);
                    Vector3D LastTelega = new Vector3D();
                    foreach (var TELEGA in TELEGAS)
                    {
                        TELEGA.Destroy();
                        LastTelega = TELEGA.Position;
                    }
                }
                #endregion
                if (dbQuestProgress.StepOfQuest > 0)
                {
                    // Вышибаем лею
                    var actorToShoot = world.GetActorByDynamicId(72);
                    if (dbQuestProgress.ActiveQuest == 87700)
                    {
                        if (actorToShoot != null)
                        {
                            Logger.Debug("Вышибаем SNO {0}, мир содершит {1} ", actorToShoot.ActorSNO, world.GetActorsBySNO(3739).Count);
                            world.Leave(actorToShoot);
                        }
                        else
                        {
                            Logger.Debug("Вышибать некого");
                        }
                    }

                    Logger.Warn("Обнаружен начатый квест {0}", dbQuestProgress.ActiveQuest);
                    for (int CS = 0; CS < dbQuestProgress.StepOfQuest; CS++)
                    {
                        world.Game.Quests.Advance(dbQuestProgress.ActiveQuest);
                        //Logger.Warn("Обнаруженно прохождение квеста {0}, шаг квеста {1]", dbQuestProgress.ActiveQuest, dbQuestProgress.StepOfQuest);
                    }
                    Logger.Warn("Обнаружено Прохождение квеста {0}, шаг - {1}", dbQuestProgress.ActiveQuest, dbQuestProgress.StepOfQuest);
                }
                else
                {
                    world.Game.Quests.Advance(dbQuestProgress.ActiveQuest);
                    Logger.Warn("Обнаружен начатый квест {0}", dbQuestProgress.ActiveQuest);
                }
                if (dbQuestProgress.ActiveQuest == 87700)
                {
                    if (dbQuestProgress.StepOfQuest == 8)
                    {
                        world.Game.Quests.NotifyQuest(87700, Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.InteractWithActor, 192164);
                    }
                }
            }
            #endregion

            #region Сырые локации

            #region Покои Короля

            //Покои: 117405
            // To Tyrael Zone

            /*
             * [148748] a1dun_Leor_Tyrael_Back_Skybox_01
             * [135396] a1dun_Leor_Tyrael_jail_01
             * [135521] a1dun_Leor_Tyrael_Stairs_A_01
             * [135710] a1dun_Leor_Tyrael_Filler_02
             * [117035] trDun_Crypt_W_Exit_Stranger_01
             *
             */
            //  var Leor_Tyrael = client.Player.World.Game.GetWorld(117405);
            Vector3D PointToScene = new Vector3D(0f, 0f, 0f);
            //   Core.GS.Map.Scene CainScene = new Core.GS.Map.Scene(Leor_Tyrael, PointToScene, 135521, null);
            #endregion

            #endregion

            DBSessions.AccountSession.Flush();
        }