コード例 #1
0
ファイル: GatherManager.cs プロジェクト: Bia10/Cookie
 private void HandleGameMapMovementCancelMessage(IAccount account, GameMapMovementCancelMessage message)
 {
     if (Id != -1)
     {
         Id = -1;
     }
 }
コード例 #2
0
        public static void HandleGameMapMovementCancelMessage(Bot bot, GameMapMovementCancelMessage message)
        {
            if (!AllowComparer)
            {
                return;
            }

            bot.SendToClient(new DebugHighlightCellsMessage(Color.Violet.ToArgb(), new short[] { message.cellId }));
        }
コード例 #3
0
        public static void HandleMapMovementCancel(GameMapMovementCancelMessage message, WorldClient client)
        {
            var mobGroup = client.Character.Map.Instance.MonstersGroups.Find(x => x.CellId == client.Character.MovedCell);

            if (mobGroup != null)
            {
                client.Character.CancelMonsterAgression = true;
            }
            client.Character.Record.CellId = (short)message.cellId;
        }
コード例 #4
0
        public static void HandleGameMapMovementCancelMessage(Bot bot, GameMapMovementCancelMessage message)
        {
            // always check, the client can send bad things :)
            if (!bot.Character.IsMoving())
            {
                return;
            }

            var attemptElement = bot.Character.Movement.TimedPath.GetCurrentElement();

            if (attemptElement.CurrentCell.Id != message.cellId)
            {
                var clientCell = bot.Character.Movement.TimedPath.Elements.First(entry => entry.CurrentCell.Id == message.cellId);

                // the difference is the time elapsed until the client analyse the path and start moving (~160ms) it depends also on computer hardware
                logger.Warn("Warning the client has canceled the movement but the given cell ({0}) is not the attempted one ({1})." +
                            "Estimated difference : {2}ms", message.cellId, attemptElement.CurrentCell.Id, (attemptElement.EndTime - clientCell.EndTime).TotalMilliseconds);
            }

            bot.Character.NotifyStopMoving(true);
        }
コード例 #5
0
 public static void HandleMapMovementCancel(GameMapMovementCancelMessage message, WorldClient client)
 {
     client.Character.Record.CellId = message.cellId;
     client.Send(new BasicNoOperationMessage());
 }
コード例 #6
0
 public static void HandleGameMapMovementCancelMessage(WorldClient client, GameMapMovementCancelMessage message)
 {
     client.Character.StopMove(new ObjectPosition(client.Character.Map, message.cellId,
                                                  client.Character.Position.Direction));
 }
コード例 #7
0
        public static void HandleGameMapMovementCancelMessage(WorldClient client, GameMapMovementCancelMessage message)
        {
            client.Character.StopMove(new ObjectPosition(client.Character.Map, (short)message.cellId, client.Character.Position.Direction));

            BasicHandler.SendBasicNoOperationMessage(client);
        }
コード例 #8
0
 public void HandleGameMapMovementCancelMessage(Bot bot, GameMapMovementCancelMessage message)
 {
     //bot.SendToClient(new DebugHighlightCellsMessage(Color.Violet.ToArgb(), new short[] { message.cellId }));
 }