public static void GenerateRaid(FactionType raidType) { RaidInstance = ServerManager.Instance.Act6Raids.FirstOrDefault(s => s.Id == (raidType == FactionType.Angel ? 23 : 24)); if (RaidInstance == null) { Logger.Log.Info(Language.Instance.GetMessageFromKey("CANT_CREATE_RAIDS")); return; } EntryMap = ServerManager.Instance.GetMapInstance( ServerManager.Instance.GetBaseMapInstanceIdByMapId(RaidInstance.MapId)); if (EntryMap == null) { Logger.Log.Info(Language.Instance.GetMessageFromKey("MAP_MISSING")); return; } EntryMap.CreatePortal(new Portal { Type = (byte)PortalType.Raid, SourceMapId = RaidInstance.MapId, SourceX = RaidInstance.PositionX, SourceY = RaidInstance.PositionY }, 3600, true); }
public static void AddPortals() { EntryMap?.CreatePortal(new Portal { SourceMapId = 153, SourceX = 70, SourceY = 159, DestinationMapId = 0, DestinationX = 70, DestinationY = 159, DestinationMapInstanceId = ServerManager.Instance.CaligorMapInstance.MapInstanceId, Type = -1 }); EntryMap?.CreatePortal(new Portal { SourceMapId = 153, SourceX = 110, SourceY = 159, DestinationMapId = 0, DestinationX = 110, DestinationY = 159, DestinationMapInstanceId = ServerManager.Instance.CaligorMapInstance.MapInstanceId, Type = -1 }); EntryMap?.CreatePortal(new Portal() { SourceMapId = 153, SourceX = 87, SourceY = 24, DestinationMapId = 0, DestinationX = 87, DestinationY = 24, DestinationMapInstanceId = ServerManager.Instance.CaligorMapInstance.MapInstanceId, Type = -1 }); ServerManager.Instance.CaligorMapInstance?.CreatePortal(new Portal { SourceMapId = 154, SourceX = 70, SourceY = 159, DestinationMapId = 0, DestinationX = 70, DestinationY = 159, DestinationMapInstanceId = EntryMap.MapInstanceId, Type = -1 }); ServerManager.Instance.CaligorMapInstance?.CreatePortal(new Portal { SourceMapId = 154, SourceX = 110, SourceY = 159, DestinationMapId = 0, DestinationX = 110, DestinationY = 159, DestinationMapInstanceId = EntryMap.MapInstanceId, Type = -1 }); ServerManager.Instance.CaligorMapInstance?.CreatePortal(new Portal() { SourceMapId = 154, SourceX = 87, SourceY = 24, DestinationMapId = 0, DestinationX = 87, DestinationY = 24, DestinationMapInstanceId = EntryMap.MapInstanceId, Type = -1 }); }