public void OnMapChanged(Object p_sender, EventArgs p_args) { m_locker = false; m_queuedMessages.Clear(); if (String.IsNullOrEmpty(LegacyLogic.Instance.MapLoader.Grid.LocationLocaName)) { String gridFileName = LegacyLogic.Instance.MapLoader.GridFileName; String text = gridFileName.Replace("_", " "); if (text.Contains(".xml")) { text = gridFileName.Replace(".xml", String.Empty); } Int32 num = 0; if (Int32.TryParse(gridFileName.Substring(gridFileName.Length - 1), out num)) { text = text.Remove(gridFileName.Length - 2); } GameMessage item; if (LegacyLogic.Instance.MapLoader.Grid.Type == EMapType.DUNGEON && num > 0) { item = new GameMessage(LocaManager.GetText("GAME_MESSAGE_MAP_CHANGE_DUNGEON", text, num.ToString()), 3.5f); } else { Position position = LegacyLogic.Instance.WorldManager.Party.Position; EMapArea mapArea = LegacyLogic.Instance.MapLoader.Grid.GetSlot(position).MapArea; if (mapArea > EMapArea.SAFE_ZONE) { text = text + "@" + LocaManager.GetText("AREA_NAME_" + mapArea.ToString()); } item = new GameMessage(text, 3.5f); } m_queuedMessages.Enqueue(item); } else { String locationLocaName = LegacyLogic.Instance.MapLoader.Grid.LocationLocaName; String text2 = LocaManager.GetText(locationLocaName); if (LegacyLogic.Instance.MapLoader.Grid.Type != EMapType.DUNGEON && !text2.Contains("@")) { Position position2 = LegacyLogic.Instance.WorldManager.Party.Position; EMapArea mapArea2 = LegacyLogic.Instance.MapLoader.Grid.GetSlot(position2).MapArea; if (mapArea2 > EMapArea.SAFE_ZONE) { text2 = text2 + "@" + LocaManager.GetText("AREA_NAME_" + mapArea2.ToString()); } } GameMessage item2 = new GameMessage(text2); m_queuedMessages.Enqueue(item2); } }
public MapAreaEventArgs(EMapArea p_currentArea) : this(EMapArea.NONE, p_currentArea) { }
public MapAreaEventArgs(EMapArea p_lastArea, EMapArea p_currentArea) { LastArea = p_lastArea; CurrentArea = p_currentArea; }