static void Zaapi(WorldClient client, InteractiveRecord ele) { if (client.Character.CurrentDialogType == DialogTypeEnum.DIALOG_TELEPORTER) { return; } client.Character.CurrentDialogType = DialogTypeEnum.DIALOG_TELEPORTER; var maps = new List <int>(); var subareas = new List <ushort>(); var cost = new List <ushort>(); var tptype = new List <sbyte>(); foreach (InteractiveRecord interactive in InteractiveRecord.GetInteractivesByActionType("Zaapi")) { if (interactive.OptionalValue1 == ele.OptionalValue1) { maps.Add(interactive.MapId); subareas.Add(MapRecord.GetSubAreaId(interactive.MapId)); cost.Add(ZaapiCost); tptype.Add(0); } } client.Send(new TeleportDestinationsListMessage((sbyte)TeleporterTypeEnum.TELEPORTER_SUBWAY, maps, subareas, cost, tptype)); }
public static void Zaap(WorldClient client, InteractiveRecord ele) { if (client.Character.CurrentDialogType == DialogTypeEnum.DIALOG_TELEPORTER) { return; } client.Character.CurrentDialogType = DialogTypeEnum.DIALOG_TELEPORTER; var maps = new List <int>(); var subareas = new List <ushort>(); var costs = new List <ushort>(); var tptype = new List <sbyte>(); foreach (InteractiveRecord interactive in InteractiveRecord.GetInteractivesByActionType("Zaap")) { if (interactive.OptionalValue1 == ele.OptionalValue1) { maps.Add(interactive.MapId); subareas.Add(MapRecord.GetSubAreaId(interactive.MapId)); costs.Add(ZaapCost); tptype.Add((sbyte)TeleporterTypeEnum.TELEPORTER_ZAAP); } } client.Send(new ZaapListMessage((sbyte)TeleporterTypeEnum.TELEPORTER_ZAAP, maps, subareas, costs, tptype, client.Character.Record.SpawnPointMapId)); }