public static void HandleTeleportRequestMessage(Client client, TeleportRequestMessage message) { var cellId = GetCellId(client, message.mapId, message.teleporterType); client.Character.Teleport(message.mapId, cellId); client.Send(new LeaveDialogMessage()); }
public static void HandleTeleportRequestMessage(WorldClient client, TeleportRequestMessage message) { if (client.Character.IsInZaapDialog()) { var map = World.Instance.GetMap(message.mapId); if (map == null) { return; } client.Character.ZaapDialog.Teleport(map); } else if (client.Character.IsInZaapiDialog()) { var map = World.Instance.GetMap(message.mapId); if (map == null) { return; } client.Character.ZaapiDialog.Teleport(map); } }
public static void HandleTeleportRequestMessage(TeleportRequestMessage message, WorldClient client) { if ((TeleporterTypeEnum)message.teleporterType == TeleporterTypeEnum.TELEPORTER_ZAAP) { InteractiveRecord destinationZaap = MapRecord.GetMap(message.mapId).Zaap; if (client.Character.Map != null) { InteractiveRecord currentZaap = client.Character.Map.Zaap; if (destinationZaap.OptionalValue1 != currentZaap.OptionalValue1) { return; } } else { return; } } client.Character.Teleport(message.mapId, (short)InteractiveRecord.GetTeleporterCellId(message.mapId, (TeleporterTypeEnum)message.teleporterType)); switch ((TeleporterTypeEnum)message.teleporterType) { case TeleporterTypeEnum.TELEPORTER_ZAAP: client.Character.RemoveKamas(InteractiveActionProvider.ZaapCost, true); break; case TeleporterTypeEnum.TELEPORTER_SUBWAY: client.Character.RemoveKamas(InteractiveActionProvider.ZaapiCost, true); break; case TeleporterTypeEnum.TELEPORTER_PRISM: break; } client.Character.LeaveDialog(); client.Character.Reply("Vous avez été téleporté"); }
public void HandleTeleportRequestMessage(Bot bot, TeleportRequestMessage message) { if (PartyLeaderId == CharacterId) { foreach (FFight ffight in GetOtherFFights(true, true)) // All member of the party on the same map { ffight.Bot.SendToServer(new TeleportRequestMessage(message.teleporterType, message.mapId), 2500 + 500 * ffight.Id); } } }
public static void HandleTeleportRequestMessage(GameClient client, TeleportRequestMessage message) { Map map = Map.Maps.FirstOrDefault(findMap => findMap.Id == message.mapId); if (map != null && map.Id != client.Character.CurrentMapId) { short cellId = Common.Data.Interactive.GetZaapCellId(map.Id); client.Character.Teleport(map.Id, cellId == 0 ? client.Character.CellId : cellId); } client.Send(new LeaveDialogMessage()); }
public static void HandleTeleportRequestMessage(WorldClient client, TeleportRequestMessage message) { if (client.Character.IsInZaapDialog()) { Map map = Singleton <World> .Instance.GetMap(message.mapId); if (!(map == null)) { client.Character.ZaapDialog.Teleport(map); } } }
public void useZaap(int mapid) { InteractiveElement e = m_Account.MapData.InteractiveElements.Keys.ToList().Find(i => i.TypeId == 16); if (e != null) { MoveToSecureElement((int)e.Id); UseElement((int)e.Id, e.EnabledSkills[0].SkillInstanceUid); m_Account.Wait(500, 1000); TeleportRequestMessage msg = new TeleportRequestMessage(0, mapid); m_Account.SocketManager.Send(msg); } }
public void useZaap(int mapid) { foreach (InteractiveElement e in InteractiveElements.Values) { if (e.TypeId == 16) { MoveToSecureElement((int)e.Id); UseElement((int)e.Id, e.EnabledSkills[0].skillInstanceUid); m_Account.Wait(500, 1000); TeleportRequestMessage msg = new TeleportRequestMessage(0, mapid); m_Account.SocketManager.Send(msg); } } }
public static void HandleTeleportRequestMessage(WorldClient client, TeleportRequestMessage message) { var dialog = client.Character.Dialog as TeleportDialog; if (dialog == null) { return; } var map = World.Instance.GetMap(message.mapId); if (map == null) { return; } dialog.Teleport(map); }
public static void HandleTeleportRequest(TeleportRequestMessage message, WorldClient client) { switch ((TeleporterTypeEnum)message.teleporterType) { case TeleporterTypeEnum.TELEPORTER_ZAAP: if (client.Character.GetDialog <ZaapDialog>() != null) { client.Character.GetDialog <ZaapDialog>().Teleport(MapRecord.GetMap(message.mapId)); } break; case TeleporterTypeEnum.TELEPORTER_SUBWAY: if (client.Character.GetDialog <ZaapiDialog>() != null) { client.Character.GetDialog <ZaapiDialog>().Teleport(MapRecord.GetMap(message.mapId)); } break; } }
public void useZaapi(int mapid) { foreach (InteractiveElement e in InteractiveElements.Values) { if (e.TypeId == 106) { MoveToSecureElement((int)e.Id); UseElement((int)e.Id, e.EnabledSkills[0].skillInstanceUid); m_Account.Wait(500, 1000); using (BigEndianWriter writer = new BigEndianWriter()) { TeleportRequestMessage msg = new TeleportRequestMessage(1, mapid); msg.Serialize(writer); MessagePackaging pack = new MessagePackaging(writer); pack.Pack((int)msg.ProtocolID); m_Account.SocketManager.Send(pack.Writer.Content); } } } }