public static void MultiMouseMovementRequest(NetState state, PacketReader reader) { Serial playerSerial = reader.ReadInt32(); Direction movement = (Direction)reader.ReadByte(); reader.ReadByte(); // movement direction duplicated int speed = reader.ReadByte(); Mobile mob = World.FindMobile(playerSerial); if (mob == null || mob.NetState == null || !mob.Mounted) { return; } IMount multi = mob.Mount; if (!(multi is BaseSmoothMulti)) { return; } BaseSmoothMulti smooth = (BaseSmoothMulti)multi; smooth.OnMousePilotCommand(mob, movement, speed); }
public SmoothMultiMountItem(BaseSmoothMulti mount) : base(0x3E96) { Layer = Layer.Mount; Movable = false; m_Mount = mount; }
public TurnTimer(BaseSmoothMulti multi, Direction turnDir) : base(TimeSpan.FromSeconds(0.5)) { m_Multi = multi; m_TurnDir = turnDir; Priority = TimerPriority.TenMS; }
protected override void OnTarget(Mobile from, object targeted) { bool GM = from.AccessLevel >= AccessLevel.GameMaster; //IPoint3D p3d; int id = 0; if (_can.UsesCharges && _can.Uses < 1) { from.SendMessage("Your paint can is empty."); return; } //if (from == BaseSmoothMulti.Owner) //{ if (targeted is BaseSmoothMulti) { BaseSmoothMulti target = targeted as BaseSmoothMulti; id = target.ItemID; target.Hue = _can.DyedHue; from.PlaySound(0x23E); if (_can.UsesCharges) { _can.Uses--; } //from.SendMessage("TEMP: Successfully painted over BaseSmoothMulti."); } else if (targeted is MainMast) { MainMast target = targeted as MainMast; id = target.ItemID; target.Hue = _can.DyedHue; target.Ship.Hue = _can.DyedHue; from.PlaySound(0x23E); if (_can.UsesCharges) { _can.Uses--; } } else { from.SendMessage("Unable to paint that using this type of paint."); } //} //else // from.SendMessage("You must be standing in, and targeting a boat you own."); }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); m_Mount = reader.ReadItem() as BaseSmoothMulti; if (m_Mount == null) { Delete(); } else { Internalize(); } }
public MoveTimer(BaseSmoothMulti multi, TimeSpan interval, SpeedCode speed) : base(TimeSpan.Zero, interval, speed == SpeedCode.One ? 1 : 0) { m_Multi = multi; Priority = TimerPriority.TwentyFiveMS; }