using System; using System.Collections.Generic; using System.Threading.Tasks; using WingsEmu.DTOs.Maps; using WingsEmu.Game.Networking; namespace WingsEmu.Game.Maps; public class StaticMapManager { public static IMapManager Instance { get; private set; } public static void Initialize(IMapManager manager) { Instance = manager; } } public interface IMapManager { Task Initialize(); bool HasMapFlagByMapId(int mapId, MapFlags mapFlag); IReadOnlyList GetMapFlagByMapId(int mapId); MapDataDTO GetMapByMapId(int mapId); /// /// Returns the MapInstance with the corresponding ID /// /// /// IMapInstance GetMapInstance(Guid id); /// /// Generates a new MapInstance /// /// /// /// IMapInstance GenerateMapInstanceByMapId(int mapId, MapInstanceType type); /// /// Generates a new MapInstance /// /// /// /// IMapInstance GenerateMapInstanceByMapVNum(ServerMapDto serverMapDto, MapInstanceType type); void RemoveMapInstance(Guid mapId); /// /// Returns the mapinstance associated to the mapid /// passed as parameter /// /// /// IMapInstance GetBaseMapInstanceByMapId(int mapId); Guid GetBaseMapInstanceIdByMapId(int mapId); /// /// Teleports on a random place on the specified MapInstance /// /// /// /// /// Task TeleportOnRandomPlaceInMapAsync(IClientSession session, IMapInstance mapInstance, bool isSameMap = false); IEnumerable GetMapsWithFlag(MapFlags flags); }