public static void HandleCautiousMapMovement(GameCautiousMapMovementRequestMessage message, WorldClient client) { if (client.Character.IsFighting) { Logger.Error("Client try a cautious move while fighting, aborting"); return; } sbyte direction = PathParser.GetDirection(message.keyMovements.Last()); short cellid = PathParser.ReadCell(message.keyMovements.Last()); if (client.Character.Busy) { return; } client.Character.Look.UnsetAura(); client.Character.RefreshOnMapInstance(); client.Character.Record.Direction = direction; client.Character.MovedCell = cellid; client.Character.SendMap(new GameCautiousMapMovementMessage(message.keyMovements, client.Character.Id)); }
public static void HandleMapMovement(GameMapMovementRequestMessage message, WorldClient client) { sbyte direction = PathParser.GetDirection(message.keyMovements.Last()); short cellid = PathParser.ReadCell(message.keyMovements.Last()); if (client.Character.IsFighting) { client.Character.FighterInstance.Move(message.keyMovements.ToList(), cellid, direction); } else { if (client.Character.Busy) { return; } client.Character.Look.UnsetAura(); client.Character.RefreshOnMapInstance(); client.Character.Record.Direction = direction; client.Character.MovedCell = cellid; client.Character.SendMap(new GameMapMovementMessage(message.keyMovements, client.Character.Id)); } }