private static void HandleChangeRide(GameSession session, PacketReader packet) { int mountId = packet.ReadInt(); long mountUid = packet.ReadLong(); if (!session.Player.Inventory.HasItem(mountUid)) { return; } Item item = session.Player.Inventory.GetByUid(mountUid); if (item.IsExpired()) { return; } if (item.TransferFlag.HasFlag(ItemTransferFlag.Binds) && !item.IsBound()) { item.BindItem(session.Player); } PacketWriter changePacket = MountPacket.ChangeRide(session.Player.FieldPlayer.ObjectId, mountId, mountUid); session.FieldManager.BroadcastPacket(changePacket); }
private static void HandleChangeRide(GameSession session, PacketReader packet) { int mountId = packet.ReadInt(); long mountUid = packet.ReadLong(); Packet changePacket = MountPacket.ChangeRide(session.FieldPlayer.ObjectId, mountId, mountUid); session.FieldManager.BroadcastPacket(changePacket); }
private static void HandleChangeRide(GameSession session, PacketReader packet) { int mountId = packet.ReadInt(); long mountUid = packet.ReadLong(); if (!session.Player.Inventory.Items.ContainsKey(mountUid)) { return; } Packet changePacket = MountPacket.ChangeRide(session.FieldPlayer.ObjectId, mountId, mountUid); session.FieldManager.BroadcastPacket(changePacket); }