void HandleSuspendTokenResponse(SuspendTokenResponse suspendTokenResponse)
        {
            if (!_player.IsBeingTeleportedFar())
            {
                return;
            }

            WorldLocation loc = GetPlayer().GetTeleportDest();

            if (CliDB.MapStorage.LookupByKey(loc.GetMapId()).IsDungeon())
            {
                UpdateLastInstance updateLastInstance = new UpdateLastInstance();
                updateLastInstance.MapID = loc.GetMapId();
                SendPacket(updateLastInstance);
            }

            NewWorld packet = new NewWorld();

            packet.MapID   = loc.GetMapId();
            packet.Loc.Pos = loc;
            packet.Reason  = (uint)(!_player.IsBeingTeleportedSeamlessly() ? NewWorldReason.Normal : NewWorldReason.Seamless);
            SendPacket(packet);

            if (_player.IsBeingTeleportedSeamlessly())
            {
                HandleMoveWorldportAck();
            }
        }
Beispiel #2
0
 public void Init(NewWorld world)
 {
     this.world = world;
     this.Idle();
     m_runAnimation.GetChild <Area2D>(0).Connect("area_entered", world, "EndGame");
     m_crouchAnimation.GetChild <Area2D>(0).Connect("area_entered", world, "EndGame");
 }
        private void ListBoxItem_Selected_11(object sender, RoutedEventArgs e)
        {
            StopAllMusic();
            NewWorld.Play();
            BitmapImage newIm = new BitmapImage();

            newIm.BeginInit();
            newIm.UriSource = new Uri(@"C:\Users\admin\Desktop\VirtualOrchestra\GUI\Resources\Dvorak.jpg");
            newIm.EndInit();
            PreviewImage.Source = newIm;
            ArtistName.Content  = "Antonin Dvorak";
            SongName.Content    = "From the New World";
            YearText.Content    = "1893";
            songFile            = @"C:\Users\admin\Desktop\VirtualOrchestra\Sample MIDIs\newworld.mid";
            songName            = "Dvorak: From the New World";
        }
        private void StopAllMusic()
        {
            bool parAndPause = ParaAnd.CanPause;

            if (parAndPause == true)
            {
                ParaAnd.Stop();
            }
            bool fallPause = Fall.CanPause;

            if (fallPause == true)
            {
                Fall.Stop();
            }
            bool prayerPause = Prayer.CanPause;

            if (prayerPause == true)
            {
                Prayer.Stop();
            }
            bool hardDayPause = HardDay.CanPause;

            if (hardDayPause == true)
            {
                HardDay.Stop();
            }
            bool sym5Pause = Sym5.CanPause;

            if (sym5Pause == true)
            {
                Sym5.Stop();
            }
            bool rockAmadeusPause = RockAmadeus.CanPause;

            if (rockAmadeusPause == true)
            {
                RockAmadeus.Stop();
            }
            bool getLuckyPause = GetLucky.CanPause;

            if (getLuckyPause == true)
            {
                GetLucky.Stop();
            }
            bool mtKingPause = MtKing.CanPause;

            if (mtKingPause == true)
            {
                MtKing.Stop();
            }
            bool alwaysPause = Always.CanPause;

            if (alwaysPause == true)
            {
                Always.Stop();
            }
            bool airGPause = AirG.CanPause;

            if (airGPause == true)
            {
                AirG.Stop();
            }
            bool newWorldPause = NewWorld.CanPause;

            if (newWorldPause == true)
            {
                NewWorld.Stop();
            }
            bool swanLakePause = SwanLake.CanPause;

            if (swanLakePause == true)
            {
                SwanLake.Stop();
            }
            bool bohemianPause = Bohemian.CanPause;

            if (bohemianPause == true)
            {
                Bohemian.Stop();
            }
            bool dovesPause = Doves.CanPause;

            if (dovesPause == true)
            {
                Doves.Stop();
            }
            bool canHeatPause = CanHeat.CanPause;

            if (canHeatPause == true)
            {
                CanHeat.Stop();
            }
            bool flashPause = Flash.CanPause;

            if (flashPause == true)
            {
                Flash.Stop();
            }
            bool heyYaPause = HeyYa.CanPause;

            if (heyYaPause == true)
            {
                HeyYa.Stop();
            }
            bool lifePause = Life.CanPause;

            if (lifePause == true)
            {
                Life.Stop();
            }
            bool mansWorldPause = MansWorld.CanPause;

            if (mansWorldPause == true)
            {
                MansWorld.Stop();
            }
            bool stairwayPause = Stairway.CanPause;

            if (stairwayPause == true)
            {
                Stairway.Stop();
            }
            bool superstitionPause = Superstition.CanPause;

            if (superstitionPause == true)
            {
                Superstition.Stop();
            }
        }
 private void NewWorldLoop(object sender, RoutedEventArgs e)
 {
     NewWorld.Position = TimeSpan.Zero;
     NewWorld.Play();
 }