Beispiel #1
0
        public void MoveToCell(short CellID)
        {
            List <CellWithOrientation> path = Fight.finder.GetPath((short)Player.PlayerBaseInformations.CellId, CellID);

            //if (path == null) {
            //    Fight.mHost.logger.Log ("Path null !", RaidBot.Common.Default.Loging.LogLevelEnum.Error);
            //    return;
            //}
            //if (path.Count - 1 > Player.PlayerFightInformations.Stats.movementPoints)
            //{
            //    path = path.GetRange(0, Player.PlayerFightInformations.Stats.movementPoints + 1);
            //}
            //for (int i = 0; i <= path.Count - 1 ; i++ )
            //{
            //    RaidBot.Data.IO.D2P.Map.CellData Cellule = Player.mWorld.Map.Data.Cells[path[i].Id];
            //    if (Fight.GetEnnemiesCells().Any(cell => cell == path[i].Id) || !Cellule.los)
            //    {
            //        if (path.Count < 3)
            //            return;
            //        path = path.GetRange(0, i );
            //          break;
            //    }
            //}
            //if (path.Count < 2) {
            //    Fight.mHost.logger.Log ("path count !", RaidBot.Common.Default.Loging.LogLevelEnum.Error);
            //    return;
            //}
            Player.mHost.SendMessage(new GameMapMovementRequestMessage(PathingUtils.GetCompressedPath(path), (int)Player.mWorld.Map.Data.Id));
        }
Beispiel #2
0
 public short[] GetCompressedPath(short startCellId, short destinationCellId)
 {
     return(PathingUtils.GetCompressedPath(Find(startCellId, destinationCellId)).ToArray());
 }
Beispiel #3
0
 public short[] GetCompressedPath(List <CellWithOrientation> cells)
 {
     return(PathingUtils.GetCompressedPath(cells));
 }