public override void HandleMessageContents(NetworkMessage message, Connection connection) { var packet = new AutoMovePacket(message); var player = Game.Instance.GetCreatureWithId(connection.PlayerId) as Player; player?.AutoWalk(packet.Directions); }
public void AutoMovePacket_Initialization() { Direction[] expectedDirections = new Direction[] { Direction.East, Direction.North, Direction.West, Direction.South, }; IAutoMovementInfo autoMoveInfo = new AutoMovePacket(expectedDirections); CollectionAssert.AreEqual(expectedDirections, autoMoveInfo.Directions, $"Expected {nameof(autoMoveInfo.Directions)} to match {expectedDirections}."); }