public static void HandleMapDone() { WindowSwitcher.GameWindow.MapViewer.ActiveMap = ActiveMap; PlayerManager.MyPlayer.MapID = ActiveMap.MapID; ActiveMap.DoOverlayChecks(); if (PlayerManager.MyPlayer.Darkness > -2) { Logic.Graphics.Renderers.Screen.ScreenRenderer.RenderOptions.SetDarkness(PlayerManager.MyPlayer.Darkness); } else { Logic.Graphics.Renderers.Screen.ScreenRenderer.RenderOptions.SetDarkness(ActiveMap.Darkness); } Logic.Graphics.Renderers.Screen.ScreenRenderer.DeactivateOffscreenSprites(); //Logic.Graphics.Renderers.Screen.ScreenRenderer.RenderOptions.SetOverlay((Enums.Overlay)Maps.MapHelper.ActiveMap.Overlay); //Logic.Graphics.Renderers.Screen.ScreenRenderer.RenderOptions.SetOverlay(Enums.Overlay.Sandstorm); //Logic.Graphics.Renderers.Screen.ScreenRenderer.RenderOptions.SetWea(Maps.MapHelper.ActiveMap.Weather); Logic.Graphics.Effects.Overlays.ScreenOverlays.MapChangeInfoOverlay infoOverlay = Logic.Graphics.Renderers.Screen.ScreenRenderer.RenderOptions.ScreenOverlay as Logic.Graphics.Effects.Overlays.ScreenOverlays.MapChangeInfoOverlay; if (infoOverlay != null) { if (infoOverlay.MinTimePassed) { Logic.Graphics.Renderers.Screen.ScreenRenderer.RenderOptions.ScreenOverlay = null; } } PlayerManager.MyPlayer.SetCurrentRoom(); //Music.Music.AudioPlayer.PlayMusic(ActiveMap.Music); ((Client.Logic.Music.Bass.BassAudioPlayer)Logic.Music.Music.AudioPlayer).FadeToNext(ActiveMap.Music, 1000); if (Stories.StoryProcessor.ActiveStory != null && Stories.StoryProcessor.ActiveStory.Segments[Stories.StoryProcessor.ActiveStory.State.CurrentSegment].Action == Enums.StoryAction.Warp) { if (ActiveMap.MapID == ((Stories.Segments.WarpSegment)Stories.StoryProcessor.ActiveStory.Segments[Stories.StoryProcessor.ActiveStory.State.CurrentSegment]).Map) { if (Stories.StoryProcessor.ActiveStory.State.StoryPaused) { Stories.StoryProcessor.ActiveStory.State.Unpause(); Stories.StoryProcessor.ActiveStory.State.StoryPaused = false; } } } Globals.GettingMap = false; Globals.RefreshLock = false; Messenger.SendMapLoaded(); }