Esempio n. 1
0
 private void ToDTOImpl(Deploy.BrandQualityDTO dto)
 {
     if (this.Variety != null)
     {
         dto.VarietyName = this.Variety.Name;
     }
 }
Esempio n. 2
0
 private void ToDTOImpl(Deploy.ContractTypeDTO dto)
 {
     if (this.BaseType != null)
     {
         dto.BaseTypeName = this.BaseType.Name;
     }
 }
Esempio n. 3
0
 private void ToDTOImpl(Deploy.CompanyContactDTO dto)
 {
     if (this.PCompany != null)
     {
         dto.CompanyName = this.PCompany.Name;
     }
 }
Esempio n. 4
0
 private void ToDTOImpl(Deploy.ContractSchoolDTO dto)
 {
     if (this.PsInfo != null)
     {
         dto.PsInfoName = this.PsInfo.Name;
     }
     if (this.School != null)
     {
         dto.SchoolName = this.School.Name;
         dto.Url = this.School.Url;
     }
     if (this.Ps != null)
     {
         dto.PsName = this.Ps.Name;
     }
     if (this.Online != null)
     {
         dto.OnlineName = this.Online.Name;
     }
     if (this.Status != null)
     {
         dto.StatusName = this.Status.Name;
     }
     else { dto.StatusName = ""; }
 }
Esempio n. 5
0
        private void ToDTOImpl(Deploy.HandleQuanDTO dto)
        {
            if (this.Contract != null)
            {
                dto.ContractNo = this.Contract.ContractNo;
                dto.Student = this.Contract.Student.Name;

                dto.Visa = this.Contract.Visa.Name;
                dto.Author = this.Contract.Author.Name;
                dto.ApplicationType = this.Contract.ApplicationType.Name;
            }
            if (this.ContractSchool != null)
            {
                dto.School = this.ContractSchool.School.Name;
                dto.Online = this.ContractSchool.Online.Name;
                dto.Ps = this.ContractSchool.Ps.Name;
            }
            else
            {
                dto.Online = "¡õ";
                dto.Ps = "¡õ";
            }
            dto.Leaf = true;
            dto.DisplayName = dto.InputDate.ToString("yyyy-MM-dd");
        }
Esempio n. 6
0
 private void ToDTOImpl(Deploy.CompanyDTO dto)
 {
     if (this.Level != null)
     {
         dto.LevelName = this.Level.Name;
     }
     if (this.Type != null)
     {
         dto.TypeName = this.Type.Name;
     }
     if (this.BusinessType != null)
     {
         dto.BusinessTypeName = this.BusinessType.Name;
     }
     if (this.Variety != null)
     {
         dto.VarietyName = this.Variety.Name;
     }
     if (this.Country != null)
     {
         dto.CountryName = this.Country.Name;
     }
     if (this.Province != null)
     {
         dto.ProvinceName = this.Province.Name;
     }
     if (this.City != null)
     {
         dto.CityName = this.City.Name;
     }
 }
Esempio n. 7
0
 private void ToDTOImpl(Deploy.LogDTO dto)
 {
     if (this.LogType != null)
     {
         dto.LogTypeName = this.LogType.Name;
     }
     dto.Leaf = true;
 }
 private void ToDTOImpl(Deploy.DeviceRepairRecordDTO dto)
 {
     dto.DeviceStatusName = this.Device.DeviceStatus.Name;
     dto.UserName = this.User.Name;
     dto.UserTel = this.User.Tel;
     dto.DeviceSN = this.Device.SN;
     dto.DeviceName = this.Device.Device.Name;
     dto.HouseName = this.Device.House.Name;
 }
Esempio n. 9
0
 private void ToDTOImpl(Deploy.BrandVarietyDTO dto)
 {
     if (this.Variety != null)
     {
         dto.VarietyName = this.Variety.Name;
         dto.VarietyFullName = this.Variety.FullName;
     }
     dto.BrandName = this.PBrand.Name;
 }
Esempio n. 10
0
 private void FromDTOImpl(Deploy.StudentDTO dto)
 {
     if (IWEHAVE.ERP.CenterBE.Counselor.Finder.FindById(dto.Counselor) == null)
     {
         IWEHAVE.ERP.CenterBE.Counselor c = IWEHAVE.ERP.CenterBE.Counselor.Create();
         c.Dept = dto.CounselorDept;
         c.Name = dto.CounselorName;
         this.Counselor = c;
         // NHExt.Runtime.Session.Session.Current.Commit();
     }
 }
Esempio n. 11
0
 private void ToDTOImpl(Deploy.StudentDTO dto)
 {
     if (this.Counselor != null)
     {
         dto.CounselorName = this.Counselor.Name;
         dto.CounselorDept = this.Counselor.Dept;
     }
     if (this.Sex != null)
     {
         dto.SexName = this.Sex.Name;
     }
 }
Esempio n. 12
0
 private void FromDTOImpl(Deploy.ContractDTO dto)
 {
     if (dto.Application == 2)//ѧУ����
     {
         this.Visa = IWEHAVE.ERP.CenterBE.VisaEnum.No;
     }
     else
     { //ǩ֤����
         this.Application = IWEHAVE.ERP.CenterBE.ApplicationEnum.No;
         this.FirstFour = IWEHAVE.ERP.CenterBE.FirstFourEnum.No;
         this.Doctor = IWEHAVE.ERP.CenterBE.DoctorEnum.No;
         this.Cooperation = IWEHAVE.ERP.CenterBE.CooperationEnum.No;
     }
 }
Esempio n. 13
0
 private void ToDTOImpl(Deploy.TeacherDTO dto)
 {
     if (this.Sex != null)
     {
         dto.SexName = this.Sex.Name;
     }
     if (this.Position != null)
     {
         dto.PositionName = this.Position.Name;
     }
     if (this.Department != null)
     {
         dto.DepartmentName = this.Department.Name;
     }
 }
Esempio n. 14
0
 private void FromDTOImpl(Deploy.ContractSchoolDTO dto)
 {
     if (dto.Online == 0)
     {
         this.Online = IWEHAVE.ERP.CenterBE.OnlineEnum.No;
     }
     if (dto.Ps == 0)
     {
         this.Ps = IWEHAVE.ERP.CenterBE.PsEnum.No;
     }
     if ((dto.Status ?? 0) == 0)
     {
         this.Status = null;
     }
 }
Esempio n. 15
0
 private void ToDTOImpl(Deploy.HandleNumDTO dto)
 {
     if (this.Contract != null)
     {
         dto.ContractNo = this.Contract.ContractNo;
         dto.Student = this.Contract.Student.Name;
         dto.Author = this.Contract.Author.Name;
         dto.Application = this.Contract.Application.Name;
         dto.FirstFour = this.Contract.FirstFour.Name;
         dto.Visa = this.Contract.Visa.Name;
         dto.Doctor = this.Contract.Doctor.Name;
         dto.Cooperation = this.Contract.Cooperation.Name;
         dto.Note = this.Contract.ApplicationType.Name;
     }
     dto.Leaf = true;
     dto.DisplayName = dto.InputDate.ToString("yyyy-MM-dd");
 }
Esempio n. 16
0
 private void ToDTOImpl(Deploy.BrandDTO dto)
 {
     if (this.Variety != null)
     {
         dto.VarietyName = this.Variety.Name;
         dto.VarietyFullName = this.Variety.FullName;
     }
     if (this.Company != null)
     {
         dto.CompanyName = this.Company.Name;
         if (this.Company.Country != null)
         {
             dto.Country = this.Company.Country.ID;
             dto.CountryName = this.Company.Country.Name;
         }
         if (this.Company.Province != null)
         {
             dto.Province = this.Company.Province.ID;
             dto.ProvinceName = this.Company.Province.Name;
         }
         if (this.Company.City != null)
         {
             dto.City = this.Company.City.ID;
             dto.CityName = this.Company.City.Name;
         }
     }
     else
     {
         if (this.Country != null)
         {
             dto.CountryName = this.Country.Name;
         }
         if (this.Province!=null)
         {
             dto.ProvinceName = this.Province.Name;
         }
         if (this.City != null)
         {
             dto.CityName = this.City.Name;
         }
     }
 }
Esempio n. 17
0
 private void ToDTOImpl(Deploy.DeviceMapDTO dto)
 {
     dto.HouseName = this.House.Name;
     dto.DeviceName = this.Device.Name;
     dto.DeviceStatusName = this.DeviceStatus.Name;
     dto.UseStatusName = this.UseStatus.Name;
     dto.DeviceTypeName = this.Device.Type.Name;
     dto.CanUse = false;
     if (this.DeviceStatus == THU.LabSystemBE.DeviceStatusEnum.Normal)
     {
         if (this.UseStatus == THU.LabSystemBE.UseStatusEnum.Idle)
         {
             dto.CanUse = true;
         }
         else if (this.Device.Type == THU.LabSystemBE.DeviceTypeEnum.Multiple)
         {
             dto.CanUse = true;
         }
     }
 }
Esempio n. 18
0
 private void FromDTOImpl(Deploy.ProvinceDTO dto)
 {
 }
Esempio n. 19
0
 private void ToDTOImpl(Deploy.CountryDTO dto)
 {
 }
Esempio n. 20
0
 private void FromDTOImpl(Deploy.CountryDTO dto)
 {
 }
        public override IEnumerable <int> AttackRoutine()
        {
            // Set start battle time.
            startTime = DateTime.Now;

            int waveLimit   = UserSettings.WaveSize;
            int waveDelay   = (int)(UserSettings.WaveDelay * 1000);
            int heroesIndex = -1;

            var core = new PointFT(-0.01f, 0.01f);

            // Points to draw lines in deploy extends area.
            var topLeft  = new PointFT((float)GameGrid.MaxX - 2, (float)GameGrid.DeployExtents.MaxY);
            var topRight = new PointFT((float)GameGrid.DeployExtents.MaxX, (float)GameGrid.MaxY - 2);

            var rightTop    = new PointFT((float)GameGrid.DeployExtents.MaxX, (float)GameGrid.MinY + 2);
            var rightBottom = new PointFT((float)GameGrid.MaxX - 2, (float)GameGrid.DeployExtents.MinY);

            // Move 8 tiles from bottom corner due to unitsbar.
            var bottomLeft  = new PointFT((float)GameGrid.DeployExtents.MinX, (float)GameGrid.MinY + 8);
            var bottomRight = new PointFT((float)GameGrid.MinX + 8, (float)GameGrid.DeployExtents.MinY);

            var leftTop    = new PointFT((float)GameGrid.MinX + 2, (float)GameGrid.DeployExtents.MaxY);
            var leftBottom = new PointFT((float)GameGrid.DeployExtents.MinX, (float)GameGrid.MaxY - 2);

            var linesPointsList = new List <PointFT>
            {
                topLeft, topRight,
                rightTop, rightBottom,
                bottomLeft, bottomRight,
                leftBottom, leftTop
            };

            // Main four lines of attack.
            var topRightLine    = new Tuple <PointFT, PointFT>(topRight, rightTop);
            var bottomRightLine = new Tuple <PointFT, PointFT>(bottomRight, rightBottom);
            var bottomLeftLine  = new Tuple <PointFT, PointFT>(bottomLeft, leftBottom);
            var topLeftLine     = new Tuple <PointFT, PointFT>(topLeft, leftTop);

            // List of the four attack lines in clocwise order
            var attackLines = new List <Tuple <PointFT, PointFT> >
            {
                topLeftLine,
                topRightLine,
                bottomRightLine,
                bottomLeftLine
            };

            var deployHeroesAt = GetCurrentSetting("Deploy Heroes At");


            var target = SmartFourFingersHelper.GetHeroesTarget(deployHeroesAt);

            // Search for target if not found for 3 more times
            if (target.X == 0f && target.Y == 0f)
            {
                for (var i = 1; i <= 3; i++)
                {
                    yield return(1000);

                    target = SmartFourFingersHelper.GetHeroesTarget(deployHeroesAt);
                    if (target.X != 0f || target.Y != 0f)
                    {
                        break;
                    }
                }
            }

            var nearestRedPointToTarget = GameGrid.RedPoints.OrderBy(p => p.DistanceSq(target)).FirstOrDefault();
            var nearestLinePoint        = linesPointsList.OrderBy(p => p.DistanceSq(nearestRedPointToTarget)).FirstOrDefault();

            heroesIndex = attackLines.FindIndex(u => (u.Item1.X == nearestLinePoint.X && u.Item1.Y == nearestLinePoint.Y) || (u.Item2.X == nearestLinePoint.X && u.Item2.Y == nearestLinePoint.Y));

            var units  = Deploy.GetTroops();
            var heroes = units.Extract(x => x.IsHero);
            var cc     = units.ExtractOne(u => u.ElementType == DeployElementType.ClanTroops);
            var spells = units.Extract(u => u.ElementType == DeployElementType.Spell);

            units.OrderForDeploy();

            // Set first attack line
            // Start from the next line to user defined to end with user defined line
            var line  = attackLines.NextOf(attackLines[heroesIndex]);
            var index = attackLines.FindIndex(u => u.Item1.X == line.Item1.X && u.Item1.Y == line.Item1.Y);

            Log.Info($"{AttackName} {Version} starts");
            // Start troops deployment on four sides.
            for (var i = 4; i >= 1; i--)
            {
                foreach (var unit in units)
                {
                    if (unit?.Count > 0)
                    {
                        var count   = unit.Count / i;
                        var fingers = count < 8 ? count : 4;
                        foreach (var t in Deploy.AlongLine(unit, line.Item1, line.Item2, count, fingers, 0, waveDelay))
                        {
                            yield return(t);
                        }
                    }
                }
                if (i != 1)
                {
                    line  = attackLines.NextOf(attackLines[index]);
                    index = attackLines.FindIndex(u => u.Item1.X == line.Item1.X && u.Item1.Y == line.Item1.Y);
                }
            }

            if (cc?.Count > 0)
            {
                Log.Info($"{AttackName} Deploy Clan Castle troops");
                foreach (var t in Deploy.AlongLine(cc, line.Item1, line.Item2, 1, 1, 0, waveDelay))
                {
                    yield return(t);
                }
            }

            if (heroes.Any())
            {
                Log.Info($"{AttackName} Deploy Heroes");
                foreach (var hero in heroes.Where(u => u.Count > 0))
                {
                    foreach (var t in Deploy.AlongLine(hero, line.Item1, line.Item2, 1, 1, 0, waveDelay))
                    {
                        yield return(t);
                    }
                }
                Deploy.WatchHeroes(heroes, 5000);
            }

            // Call FinalizeAttack and ForceZap at the same time
            var finalize = this.FinalizeAttack(units).GetEnumerator();
            var force    = ForceZap().GetEnumerator();

            var firstEnumMoreItems  = finalize.MoveNext();
            var secondEnumMoreItems = force.MoveNext();

            // Start both FinalizeAttack and ForceZap
            while (firstEnumMoreItems && secondEnumMoreItems)
            {
                firstEnumMoreItems  = finalize.MoveNext();
                secondEnumMoreItems = force.MoveNext();
                yield return(200);
            }
            // Complete ForceZap if FinalizeAttack finished
            while (!firstEnumMoreItems && secondEnumMoreItems)
            {
                secondEnumMoreItems = force.MoveNext();
                yield return(200);
            }
            // Complete FinalizeAttack if ForceZap finished
            while (!secondEnumMoreItems && firstEnumMoreItems)
            {
                firstEnumMoreItems = finalize.MoveNext();
                yield return(200);
            }
        }
Esempio n. 22
0
 private void FromDTOImpl(Deploy.HandleQuanDTO dto)
 {
 }
        public override IEnumerable <int> AttackRoutine()
        {
            List <Point> deployPoints             = new List <Point>();
            var          combatNormalDeployPoints = GetStorageAttackPoints(RedPoints);

            deployPoints.AddRange(combatNormalDeployPoints);

            _deployPoints = deployPoints.ToArray();


            if (_deployPoints == null)
            {
                throw new ArgumentNullException(nameof(_deployPoints));
            }
            if (_deployPoints.Length == 0)
            {
                throw new ArgumentException(nameof(_deployPoints) + " must contain at least one point");
            }

            // Get outer border to move ranges towards there if possible
            List <Point> outerBorderPoints = DeployHelper.GetRectPoints(15);

            if (surrenderOnFirstStar)
            {
                Logger.Info("[Deploy] Bot will surrender as soon as the first star is reached to save troops (Trophy Push Mode)");
            }


            var allDeployElements = Deploy.GetTroops();

            var heroes = allDeployElements
                         .Where(u => (UserSettings.UseKing && u.ElementType == DeployElementType.HeroKing) ||
                                (UserSettings.UseQueen && u.ElementType == DeployElementType.HeroQueen) ||
                                (UserSettings.UseWarden && u.ElementType == DeployElementType.HeroWarden))
                         .ToList();

            int    deployPointCounter = 0;
            int    waveLimit          = UserSettings.WaveSize;
            double waitTimeSeconds    = UserSettings.WaveDelay;
            Random rng = new Random();

            while (true)
            {
                Logger.Debug("Scan Troops");
                // Scan available troops
                var units = Deploy.GetTroops()
                            .Where(u => u.ElementType == DeployElementType.NormalUnit ||
                                   (UserSettings.UseKing && u.ElementType == DeployElementType.HeroKing) ||
                                   (UserSettings.UseQueen && u.ElementType == DeployElementType.HeroQueen) ||
                                   (UserSettings.UseWarden && u.ElementType == DeployElementType.HeroWarden) ||
                                   (UserSettings.UseClanTroops && u.ElementType == DeployElementType.ClanTroops))
                            .ToList();

                // Remove king/queen
                ExtractHeroes(units, heroes);

                Logger.DebugDev("Deployable Troops: " + ToUnitString(units));
                // Break if we don't have any left
                if (units.Count == 0 || units.All(u => u.Count == 0))
                {
                    break;
                }


                // Order units by priority
                // Tank > Wallbreaker > Heal > Damage > Heroes
                Logger.Debug("OrderTroops");
                units.OrderForDeploy();
                int waveCounter = 0;
                foreach (var u in units)
                {
                    if (u == null)
                    {
                        Logger.Info("Wave #{0} complete, short deploy delay now...", waveCounter);
                        yield return(rng.Next(900, 2000));

                        continue;
                    }

                    if (u.Count == 0)
                    {
                        continue;
                    }

                    // Select unit
                    Logger.Debug("[Deploy] Deploying '{0}'", u);
                    u.Select();

                    // Deploy them
                    while (true)
                    {
                        int unitCount             = u.Count;
                        int totalDeployedThisWave = 0;
                        while (unitCount > 0)
                        {
                            //var line = deployLines[lineCounter++ % deployLines.Length];
                            //
                            //DeployHelper.ClickAlongLine(line.Item1, line.Item2, deployCount, 10);

                            var deployCount = Math.Min(u.Count, 4);
                            Logger.Debug("Deploy Start");
                            for (int i = 0; i < deployCount; i++)
                            {
                                if (surrenderOnFirstStar)
                                {
                                    if (SurrenderIfWeHaveAStar())
                                    {
                                        yield return(500);

                                        yield break;
                                    }
                                }

                                if (deployPointCounter >= _deployPoints.Length)
                                {
                                    deployPointCounter = 0;
                                }

                                Logger.Debug("deploy at point index {0} of {1}", deployPointCounter, _deployPoints.Length);
                                var point = _deployPoints[deployPointCounter++];


                                // If this unit is ranged, we deploy further back
                                if (u.IsRanged)
                                {
                                    var borderPoint = outerBorderPoints.OrderBy(p => p.DistanceSq(point)).First();
                                    var distance    = (int)Math.Sqrt(borderPoint.DistanceSq(point));
                                    if (distance > 10)
                                    {
                                        var maxMove = Math.Min(u.UnitData.Range * 16, distance);
                                        var dir     = borderPoint.Normalize();
                                        // Clamp the distance to the max move distance so we dont deploy too far behind
                                        borderPoint = new Point((int)(dir.Item1 * maxMove) + point.X, (int)(dir.Item2 * maxMove) + point.Y);
                                        var t = (float)rng.Range(0.85, 1.05);
                                        point = point.Lerp(borderPoint, t);
                                    }
                                }

                                // Modify this point a bit so its not too ovbious
                                point.X += rng.Next(-12, 12);
                                point.Y += rng.Next(-12, 12);

                                Input.Click(point);
                                totalDeployedThisWave++;
                                if (totalDeployedThisWave >= waveLimit)
                                {
                                    Logger.Info("WaveLimit {0} reached. Wait {1:0.0} sec.", waveLimit, waitTimeSeconds);
                                    yield return((int)(waitTimeSeconds * 1000));

                                    totalDeployedThisWave = 0;
                                }

                                Thread.Sleep(10);
                                Thread.Sleep(5);
                            }
                            Logger.Debug("Deploy End");

                            unitCount -= deployCount;
                        }

                        // Refresh unit count, if its really 0, break.
                        Logger.Debug("RecountA");
                        int countA = u.Count;
                        u.Recount();
                        int countB = u.Count;
                        Logger.Debug("RecountB");

                        if (countA != countB)
                        {
                            Logger.Info("Recount of '{0}'. {1}->{2}", u.PrettyName, countA, countB);
                        }

                        if (u.Count <= 0)
                        {
                            Logger.Info("Unit '{0}' depleted. Break.", u.PrettyName);
                            yield return(500);

                            break;
                        }
                    }


                    waveCounter++;
                }
                yield return(50);
            }

            if (heroes.Count > 0)
            {
                foreach (var y in DeployHeroes(heroes, _deployPoints))
                {
                    if (surrenderOnFirstStar)
                    {
                        if (SurrenderIfWeHaveAStar())
                        {
                            break;
                        }
                    }

                    yield return(y);
                }
            }

            Logger.Info("[Deploy] Deploy done.");
        }
Esempio n. 24
0
 private IInternalActorRef LocalActorOf(ActorSystemImpl system, Props props, IInternalActorRef supervisor,
                                        ActorPath path, bool systemService, Deploy deploy, bool lookupDeploy, bool async)
 {
     return(_local.ActorOf(system, props, supervisor, path, systemService, deploy, lookupDeploy, async));
 }
Esempio n. 25
0
 private void ToDTOImpl(Deploy.BusinessTypeDTO dto)
 {
 }
Esempio n. 26
0
 private void ToDTOImpl(Deploy.CourseDTO dto)
 {
 }
Esempio n. 27
0
 private void FromDTOImpl(Deploy.CourseDTO dto)
 {
 }
Esempio n. 28
0
 private void ToDTOImpl(Deploy.AuthorDTO dto)
 {
 }
Esempio n. 29
0
 private void FromDTOImpl(Deploy.AuthorDTO dto)
 {
 }
Esempio n. 30
0
 private void ToDTOImpl(Deploy.ProvinceDTO dto)
 {
 }
Esempio n. 31
0
        /// <summary>
        /// Set deploy points for troops and spells
        /// </summary>
        public static void SetDeployPoints()
        {
            // Top right side
            var topRight = new PointFT((float)GameGrid.DeployExtents.MaxX, (float)GameGrid.MaxY - 2);
            var rightTop = new PointFT((float)GameGrid.DeployExtents.MaxX, (float)GameGrid.MinY + 2);

            // Bottom right side
            var rightBottom = new PointFT((float)GameGrid.MaxX - 5, (float)GameGrid.DeployExtents.MinY);
            var bottomRight = new PointFT((float)GameGrid.MinX + 10, (float)GameGrid.DeployExtents.MinY);

            // Bottom left side
            // Move 8 tiles from bottom corner due to unitsbar.
            var bottomLeft = new PointFT((float)GameGrid.DeployExtents.MinX, (float)GameGrid.MinY + 8);
            var leftBottom = new PointFT((float)GameGrid.DeployExtents.MinX, (float)GameGrid.MaxY - 2);

            // Top Left side
            var leftTop = new PointFT((float)GameGrid.MinX + 2, (float)GameGrid.DeployExtents.MaxY);
            var topLeft = new PointFT((float)GameGrid.MaxX - 2, (float)GameGrid.DeployExtents.MaxY);

            var isJumpSpell = Deploy.GetTroops().ExtractOne(DeployId.Jump)?.Count > 0 ? true : false;


            if (AllInOnePushDeploy.Origin.X > AllInOnePushDeploy.Core.X)
            {
                Log.Info($"[{AllInOnePushDeploy.AttackName}] Attacking from the top right");

                AllInOnePushDeploy.AttackLine = new Tuple <PointFT, PointFT>(topRight, rightTop);

                var distance = Math.Abs(AllInOnePushDeploy.Origin.X) - Math.Abs(AllInOnePushDeploy.Target.X);
                var target   = distance >= AllInOnePushDeploy.MinDistace ? AllInOnePushDeploy.Target : AllInOnePushDeploy.Core;

                var firstWall = GetFirstWallForJump(AllInOnePushDeploy.Origin.Y, "Y");
                AllInOnePushDeploy.FirstJumpPoint = new PointFT(firstWall.X - 2.75f, AllInOnePushDeploy.Core.Y);

                var maxX  = isJumpSpell ? AllInOnePushDeploy.FirstJumpPoint.X - 5f : firstWall.X - 1.5f;
                var start = target.X + 4f;

                var earthQuakePoints = new List <PointFT> {
                    new PointFT(AllInOnePushDeploy.Target.X + 6f, AllInOnePushDeploy.Core.Y)
                };
                var jumpPoints = new List <PointFT> {
                    new PointFT(AllInOnePushDeploy.Target.X + 5.5f, AllInOnePushDeploy.Core.Y)
                };

                if (GetWallsInsideSpell(earthQuakePoints[0], 4f) < 8)
                {
                    while (maxX > start)
                    {
                        earthQuakePoints.Add(new PointFT(start, AllInOnePushDeploy.Core.Y));
                        jumpPoints.Add(new PointFT(start - 0.5f, AllInOnePushDeploy.Core.Y));
                        start += 0.25f;
                    }
                }

                AllInOnePushDeploy.EqPoint = earthQuakePoints.OrderByDescending(e => GetWallsInsideSpell(e)).FirstOrDefault();

                // Prevent overlaping EQ with jump
                if (isJumpSpell && AllInOnePushDeploy.FirstJumpPoint.X - AllInOnePushDeploy.EqPoint.X < 7f)
                {
                    AllInOnePushDeploy.EqPoint = new PointFT(AllInOnePushDeploy.FirstJumpPoint.X - 7f, AllInOnePushDeploy.FirstJumpPoint.Y);
                }
                AllInOnePushDeploy.SecondJumpPoint = new PointFT(AllInOnePushDeploy.EqPoint.X - 0.5f, AllInOnePushDeploy.EqPoint.Y);

                var shiftSpells = AllInOnePushDeploy.ShiftSpells;
                AllInOnePushDeploy.FirstRagePoint  = new PointFT(AllInOnePushDeploy.Origin.X - 11f - shiftSpells, AllInOnePushDeploy.Core.Y);
                AllInOnePushDeploy.FirstHealPoint  = new PointFT(AllInOnePushDeploy.Origin.X - 17f - shiftSpells, AllInOnePushDeploy.Core.Y);
                AllInOnePushDeploy.SecondRagePoint = new PointFT(AllInOnePushDeploy.Origin.X - 22f - shiftSpells, AllInOnePushDeploy.Core.Y);
                AllInOnePushDeploy.FirstHastePoint = new PointFT(AllInOnePushDeploy.Origin.X - 26f - shiftSpells, AllInOnePushDeploy.Core.Y);

                //try to find better funneling points
                var frac = 0.65f;

                AllInOnePushDeploy.FirstFunnellingPoint = new PointFT(AllInOnePushDeploy.Origin.X + frac *
                                                                      (AllInOnePushDeploy.AttackLine.Item1.X - AllInOnePushDeploy.Origin.X),
                                                                      AllInOnePushDeploy.Origin.Y + frac *
                                                                      (AllInOnePushDeploy.AttackLine.Item1.Y - AllInOnePushDeploy.Origin.Y));

                AllInOnePushDeploy.SecondFunnellingPoint = new PointFT(AllInOnePushDeploy.Origin.X + frac *
                                                                       (AllInOnePushDeploy.AttackLine.Item2.X - AllInOnePushDeploy.Origin.X),
                                                                       AllInOnePushDeploy.Origin.Y + frac *
                                                                       (AllInOnePushDeploy.AttackLine.Item2.Y - AllInOnePushDeploy.Origin.Y));

                AllInOnePushDeploy.FirstHasteLine = new Tuple <PointFT, PointFT>
                                                    (
                    new PointFT(AllInOnePushDeploy.FirstFunnellingPoint.X - 11f - shiftSpells, AllInOnePushDeploy.FirstFunnellingPoint.Y),
                    new PointFT(AllInOnePushDeploy.SecondFunnellingPoint.X - 11f - shiftSpells, AllInOnePushDeploy.SecondFunnellingPoint.Y)
                                                    );
                AllInOnePushDeploy.FirstRageLine = new Tuple <PointFT, PointFT>
                                                   (
                    new PointFT(AllInOnePushDeploy.FirstFunnellingPoint.X - 19f - shiftSpells, AllInOnePushDeploy.FirstFunnellingPoint.Y),
                    new PointFT(AllInOnePushDeploy.SecondFunnellingPoint.X - 19f - shiftSpells, AllInOnePushDeploy.SecondFunnellingPoint.Y)
                                                   );

                AllInOnePushDeploy.SecondHasteLine = new Tuple <PointFT, PointFT>
                                                     (
                    new PointFT(AllInOnePushDeploy.FirstFunnellingPoint.X - 24f - shiftSpells, AllInOnePushDeploy.FirstFunnellingPoint.Y),
                    new PointFT(AllInOnePushDeploy.SecondFunnellingPoint.X - 24f - shiftSpells, AllInOnePushDeploy.SecondFunnellingPoint.Y)
                                                     );
                AllInOnePushDeploy.SecondRageLine = new Tuple <PointFT, PointFT>
                                                    (
                    new PointFT(AllInOnePushDeploy.FirstFunnellingPoint.X - 24f - shiftSpells, AllInOnePushDeploy.FirstFunnellingPoint.Y),
                    new PointFT(AllInOnePushDeploy.SecondFunnellingPoint.X - 24f - shiftSpells, AllInOnePushDeploy.SecondFunnellingPoint.Y)
                                                    );

                AllInOnePushDeploy.QWHealer    = new PointFT(GameGrid.DeployExtents.MaxX, AllInOnePushDeploy.FirstFunnellingPoint.Y);
                AllInOnePushDeploy.QWRagePoint = new PointFT(AllInOnePushDeploy.FirstFunnellingPoint.X - 2, AllInOnePushDeploy.FirstFunnellingPoint.Y);
            }

            else if (AllInOnePushDeploy.Origin.X < AllInOnePushDeploy.Core.X)
            {
                Log.Info($"[{AllInOnePushDeploy.AttackName}] Attacking from the bottom left");

                AllInOnePushDeploy.AttackLine = new Tuple <PointFT, PointFT>(leftBottom, bottomLeft);

                var distance = Math.Abs(AllInOnePushDeploy.Origin.X) - Math.Abs(AllInOnePushDeploy.Target.X);
                var target   = distance >= AllInOnePushDeploy.MinDistace ? AllInOnePushDeploy.Target : AllInOnePushDeploy.Core;

                var firstWall = GetFirstWallForJump(AllInOnePushDeploy.Origin.Y, "Y");
                AllInOnePushDeploy.FirstJumpPoint = new PointFT(firstWall.X + 2.75f, AllInOnePushDeploy.Core.Y);

                var maxX  = isJumpSpell ? AllInOnePushDeploy.FirstJumpPoint.X + 5f : firstWall.X + 1.5f;
                var start = target.X - 4f;

                var earthQuakePoints = new List <PointFT> {
                    new PointFT(AllInOnePushDeploy.Target.X - 6f, AllInOnePushDeploy.Core.Y)
                };
                var jumpPoints = new List <PointFT> {
                    new PointFT(AllInOnePushDeploy.Target.X - 5.5f, AllInOnePushDeploy.Core.Y)
                };

                if (GetWallsInsideSpell(earthQuakePoints[0], 4f) < 8)
                {
                    while (maxX < start)
                    {
                        earthQuakePoints.Add(new PointFT(start, AllInOnePushDeploy.Core.Y));
                        jumpPoints.Add(new PointFT(start + 0.5f, AllInOnePushDeploy.Core.Y));
                        start -= 0.25f;
                    }
                }

                AllInOnePushDeploy.EqPoint = earthQuakePoints.OrderByDescending(e => GetWallsInsideSpell(e)).FirstOrDefault();

                // Prevent overlaping EQ with jump
                if (isJumpSpell && Math.Abs(AllInOnePushDeploy.FirstJumpPoint.X - AllInOnePushDeploy.EqPoint.X) < 7f)
                {
                    AllInOnePushDeploy.EqPoint = new PointFT(AllInOnePushDeploy.FirstJumpPoint.X + 7f, AllInOnePushDeploy.FirstJumpPoint.Y);
                }

                AllInOnePushDeploy.SecondJumpPoint = new PointFT(AllInOnePushDeploy.EqPoint.X + 0.5f, AllInOnePushDeploy.EqPoint.Y);

                var shiftSpells = AllInOnePushDeploy.ShiftSpells;
                AllInOnePushDeploy.FirstRagePoint  = new PointFT(AllInOnePushDeploy.Origin.X + 11f + shiftSpells, AllInOnePushDeploy.Core.Y);
                AllInOnePushDeploy.FirstHealPoint  = new PointFT(AllInOnePushDeploy.Origin.X + 17f + shiftSpells, AllInOnePushDeploy.Core.Y);
                AllInOnePushDeploy.SecondRagePoint = new PointFT(AllInOnePushDeploy.Origin.X + 22f + shiftSpells, AllInOnePushDeploy.Core.Y);
                AllInOnePushDeploy.FirstHastePoint = new PointFT(AllInOnePushDeploy.Origin.X + 26f + shiftSpells, AllInOnePushDeploy.Core.Y);

                //try to find better funneling points
                var frac = 0.65f;

                AllInOnePushDeploy.FirstFunnellingPoint = new PointFT(AllInOnePushDeploy.Origin.X + frac *
                                                                      (AllInOnePushDeploy.AttackLine.Item1.X - AllInOnePushDeploy.Origin.X),
                                                                      AllInOnePushDeploy.Origin.Y + frac *
                                                                      (AllInOnePushDeploy.AttackLine.Item1.Y - AllInOnePushDeploy.Origin.Y));

                AllInOnePushDeploy.SecondFunnellingPoint = bottomLeft;

                AllInOnePushDeploy.FirstHasteLine = new Tuple <PointFT, PointFT>
                                                    (
                    new PointFT(AllInOnePushDeploy.FirstFunnellingPoint.X + 11f + shiftSpells, AllInOnePushDeploy.FirstFunnellingPoint.Y),
                    new PointFT(AllInOnePushDeploy.SecondFunnellingPoint.X + 11f + shiftSpells, AllInOnePushDeploy.SecondFunnellingPoint.Y)
                                                    );

                AllInOnePushDeploy.FirstRageLine = new Tuple <PointFT, PointFT>
                                                   (
                    new PointFT(AllInOnePushDeploy.FirstFunnellingPoint.X + 19f + shiftSpells, AllInOnePushDeploy.FirstFunnellingPoint.Y),
                    new PointFT(AllInOnePushDeploy.SecondFunnellingPoint.X + 19f + shiftSpells, AllInOnePushDeploy.SecondFunnellingPoint.Y)
                                                   );

                AllInOnePushDeploy.SecondHasteLine = new Tuple <PointFT, PointFT>
                                                     (
                    new PointFT(AllInOnePushDeploy.FirstFunnellingPoint.X + 24f + shiftSpells, AllInOnePushDeploy.FirstFunnellingPoint.Y),
                    new PointFT(AllInOnePushDeploy.SecondFunnellingPoint.X + 24f + shiftSpells, AllInOnePushDeploy.SecondFunnellingPoint.Y)
                                                     );

                AllInOnePushDeploy.SecondRageLine = new Tuple <PointFT, PointFT>
                                                    (
                    new PointFT(AllInOnePushDeploy.FirstFunnellingPoint.X + 24f + shiftSpells, AllInOnePushDeploy.FirstFunnellingPoint.Y),
                    new PointFT(AllInOnePushDeploy.SecondFunnellingPoint.X + 24f + shiftSpells, AllInOnePushDeploy.SecondFunnellingPoint.Y)
                                                    );

                AllInOnePushDeploy.QWHealer    = new PointFT(GameGrid.DeployExtents.MinX, AllInOnePushDeploy.FirstFunnellingPoint.Y);
                AllInOnePushDeploy.QWRagePoint = new PointFT(AllInOnePushDeploy.FirstFunnellingPoint.X + 2, AllInOnePushDeploy.FirstFunnellingPoint.Y);
            }

            else if (AllInOnePushDeploy.Origin.Y > AllInOnePushDeploy.Core.Y)
            {
                Log.Info($"[{AllInOnePushDeploy.AttackName}] Attacking from the top left");

                AllInOnePushDeploy.AttackLine = new Tuple <PointFT, PointFT>(leftTop, topLeft);

                var distance = Math.Abs(AllInOnePushDeploy.Origin.Y) - Math.Abs(AllInOnePushDeploy.Target.Y);
                var target   = distance >= AllInOnePushDeploy.MinDistace ? AllInOnePushDeploy.Target : AllInOnePushDeploy.Core;

                var firstWall = GetFirstWallForJump(AllInOnePushDeploy.Origin.X, "X");
                AllInOnePushDeploy.FirstJumpPoint = new PointFT(AllInOnePushDeploy.Core.X, firstWall.Y - 2.75f);

                var maxX  = isJumpSpell ? AllInOnePushDeploy.FirstJumpPoint.Y - 5f : firstWall.Y - 1.5f;
                var start = target.Y + 4f;

                var earthQuakePoints = new List <PointFT> {
                    new PointFT(AllInOnePushDeploy.Core.X, AllInOnePushDeploy.Target.Y + 6f)
                };
                var jumpPoints = new List <PointFT> {
                    new PointFT(AllInOnePushDeploy.Core.X, AllInOnePushDeploy.Target.Y + 5.5f)
                };

                if (GetWallsInsideSpell(earthQuakePoints[0], 4f) < 8)
                {
                    while (maxX > start)
                    {
                        earthQuakePoints.Add(new PointFT(AllInOnePushDeploy.Core.X, start));
                        jumpPoints.Add(new PointFT(AllInOnePushDeploy.Core.X, start - 0.5f));
                        start += 0.25f;
                    }
                }

                AllInOnePushDeploy.EqPoint = earthQuakePoints.OrderByDescending(e => GetWallsInsideSpell(e)).FirstOrDefault();

                // Prevent overlaping EQ with jump
                if (isJumpSpell && AllInOnePushDeploy.FirstJumpPoint.Y - AllInOnePushDeploy.EqPoint.Y < 7f)
                {
                    AllInOnePushDeploy.EqPoint = new PointFT(AllInOnePushDeploy.FirstJumpPoint.X, AllInOnePushDeploy.FirstJumpPoint.Y - 7f);
                }
                AllInOnePushDeploy.SecondJumpPoint = new PointFT(AllInOnePushDeploy.Core.X, AllInOnePushDeploy.EqPoint.Y - 0.5f);

                var shiftSpells = AllInOnePushDeploy.ShiftSpells;
                AllInOnePushDeploy.FirstRagePoint  = new PointFT(AllInOnePushDeploy.Core.X, AllInOnePushDeploy.Origin.Y - 11f - shiftSpells);
                AllInOnePushDeploy.FirstHealPoint  = new PointFT(AllInOnePushDeploy.Core.X, AllInOnePushDeploy.Origin.Y - 17f - shiftSpells);
                AllInOnePushDeploy.SecondRagePoint = new PointFT(AllInOnePushDeploy.Core.X, AllInOnePushDeploy.Origin.Y - 22f - shiftSpells);
                AllInOnePushDeploy.FirstHastePoint = new PointFT(AllInOnePushDeploy.Core.X, AllInOnePushDeploy.Origin.Y - 26f - shiftSpells);

                //try to find better funneling points
                var frac = 0.65f;

                AllInOnePushDeploy.FirstFunnellingPoint = new PointFT(AllInOnePushDeploy.Origin.X + frac *
                                                                      (AllInOnePushDeploy.AttackLine.Item1.X - AllInOnePushDeploy.Origin.X),
                                                                      AllInOnePushDeploy.Origin.Y + frac *
                                                                      (AllInOnePushDeploy.AttackLine.Item1.Y - AllInOnePushDeploy.Origin.Y));

                AllInOnePushDeploy.SecondFunnellingPoint = new PointFT(AllInOnePushDeploy.Origin.X + frac *
                                                                       (AllInOnePushDeploy.AttackLine.Item2.X - AllInOnePushDeploy.Origin.X),
                                                                       AllInOnePushDeploy.Origin.Y + frac *
                                                                       (AllInOnePushDeploy.AttackLine.Item2.Y - AllInOnePushDeploy.Origin.Y));

                AllInOnePushDeploy.FirstHasteLine = new Tuple <PointFT, PointFT>
                                                    (
                    new PointFT(AllInOnePushDeploy.FirstFunnellingPoint.X, AllInOnePushDeploy.FirstFunnellingPoint.Y - 11f - shiftSpells),
                    new PointFT(AllInOnePushDeploy.SecondFunnellingPoint.X, AllInOnePushDeploy.SecondFunnellingPoint.Y - 11f - shiftSpells)
                                                    );

                AllInOnePushDeploy.FirstRageLine = new Tuple <PointFT, PointFT>
                                                   (
                    new PointFT(AllInOnePushDeploy.FirstFunnellingPoint.X, AllInOnePushDeploy.FirstFunnellingPoint.Y - 19f - shiftSpells),
                    new PointFT(AllInOnePushDeploy.SecondFunnellingPoint.X, AllInOnePushDeploy.SecondFunnellingPoint.Y - 19f - shiftSpells)
                                                   );

                AllInOnePushDeploy.SecondHasteLine = new Tuple <PointFT, PointFT>
                                                     (
                    new PointFT(AllInOnePushDeploy.FirstFunnellingPoint.X, AllInOnePushDeploy.FirstFunnellingPoint.Y - 24f - shiftSpells),
                    new PointFT(AllInOnePushDeploy.SecondFunnellingPoint.X, AllInOnePushDeploy.SecondFunnellingPoint.Y - 24f - shiftSpells)
                                                     );

                AllInOnePushDeploy.SecondRageLine = new Tuple <PointFT, PointFT>
                                                    (
                    new PointFT(AllInOnePushDeploy.FirstFunnellingPoint.X, AllInOnePushDeploy.FirstFunnellingPoint.Y - 24f - shiftSpells),
                    new PointFT(AllInOnePushDeploy.SecondFunnellingPoint.X, AllInOnePushDeploy.SecondFunnellingPoint.Y - 24f - shiftSpells)
                                                    );

                AllInOnePushDeploy.QWHealer    = new PointFT(AllInOnePushDeploy.FirstFunnellingPoint.X, GameGrid.DeployExtents.MaxY);
                AllInOnePushDeploy.QWRagePoint = new PointFT(AllInOnePushDeploy.FirstFunnellingPoint.X, AllInOnePushDeploy.FirstFunnellingPoint.Y - 2);
            }

            else // (orgin.Y < core.Y)
            {
                Log.Info($"[{AllInOnePushDeploy.AttackName}] Attacking from the bottom right");

                // Avoid bottom right side until fix zoom out on attack progress issue
                var avoidBottomRight = true;
                if (avoidBottomRight)
                {
                    var originPoints = new[]
                    {
                        new PointFT(GameGrid.DeployExtents.MaxX, AllInOnePushDeploy.Core.Y),
                        new PointFT(GameGrid.DeployExtents.MinX, AllInOnePushDeploy.Core.Y),
                        new PointFT(AllInOnePushDeploy.Core.X, GameGrid.DeployExtents.MaxY),
                        new PointFT(AllInOnePushDeploy.Core.X, GameGrid.DeployExtents.MinY)
                    };
                    AllInOnePushDeploy.Origin = originPoints.OrderBy(point => point.DistanceSq(AllInOnePushDeploy.Target)).ElementAt(1);
                    Log.Warning($"Avoid bottom right side set to true, We will attack from next closest side to the target");

                    SetDeployPoints();
                }
                else
                {
                    AllInOnePushDeploy.AttackLine = new Tuple <PointFT, PointFT>(rightBottom, bottomRight);

                    var distance = Math.Abs(AllInOnePushDeploy.Origin.Y) - Math.Abs(AllInOnePushDeploy.Target.Y);
                    var target   = distance >= AllInOnePushDeploy.MinDistace ? AllInOnePushDeploy.Target : AllInOnePushDeploy.Core;

                    var firstWall = GetFirstWallForJump(AllInOnePushDeploy.Origin.X, "X");
                    AllInOnePushDeploy.FirstJumpPoint = new PointFT(AllInOnePushDeploy.Core.X, firstWall.Y + 2.75f);

                    var maxX  = isJumpSpell ? AllInOnePushDeploy.FirstJumpPoint.Y + 5f : firstWall.Y + 1.5f;
                    var start = target.Y - 4f;

                    var earthQuakePoints = new List <PointFT> {
                        new PointFT(AllInOnePushDeploy.Core.X, AllInOnePushDeploy.Target.Y - 6f)
                    };
                    var jumpPoints = new List <PointFT> {
                        new PointFT(AllInOnePushDeploy.Core.X, AllInOnePushDeploy.Target.Y - 5.5f)
                    };

                    if (GetWallsInsideSpell(earthQuakePoints[0], 4f) < 8)
                    {
                        while (maxX < start)
                        {
                            earthQuakePoints.Add(new PointFT(AllInOnePushDeploy.Core.X, start));
                            jumpPoints.Add(new PointFT(AllInOnePushDeploy.Core.X, start + 0.5f));
                            start -= 0.25f;
                        }
                    }

                    AllInOnePushDeploy.EqPoint = earthQuakePoints.OrderByDescending(e => GetWallsInsideSpell(e)).FirstOrDefault();

                    // Prevent overlaping EQ with jump
                    if (isJumpSpell && Math.Abs(AllInOnePushDeploy.FirstJumpPoint.Y - AllInOnePushDeploy.EqPoint.Y) < 7f)
                    {
                        AllInOnePushDeploy.EqPoint = new PointFT(AllInOnePushDeploy.FirstJumpPoint.X, AllInOnePushDeploy.FirstJumpPoint.Y + 7f);
                    }
                    AllInOnePushDeploy.SecondJumpPoint = new PointFT(AllInOnePushDeploy.EqPoint.X, AllInOnePushDeploy.EqPoint.Y + 0.5f);

                    var shiftSpells = AllInOnePushDeploy.ShiftSpells;
                    AllInOnePushDeploy.FirstRagePoint  = new PointFT(AllInOnePushDeploy.Core.X, AllInOnePushDeploy.Origin.Y + 11f + shiftSpells);
                    AllInOnePushDeploy.FirstHealPoint  = new PointFT(AllInOnePushDeploy.Core.X, AllInOnePushDeploy.Origin.Y + 17f + shiftSpells);
                    AllInOnePushDeploy.SecondRagePoint = new PointFT(AllInOnePushDeploy.Core.X, AllInOnePushDeploy.Origin.Y + 22f + shiftSpells);
                    AllInOnePushDeploy.FirstHastePoint = new PointFT(AllInOnePushDeploy.Core.X, AllInOnePushDeploy.Origin.Y + 26f + shiftSpells);

                    //try to find better funneling points
                    var frac = 0.65f;

                    AllInOnePushDeploy.FirstFunnellingPoint = new PointFT(AllInOnePushDeploy.Origin.X + frac *
                                                                          (AllInOnePushDeploy.AttackLine.Item1.X - AllInOnePushDeploy.Origin.X),
                                                                          AllInOnePushDeploy.Origin.Y + frac *
                                                                          (AllInOnePushDeploy.AttackLine.Item1.Y - AllInOnePushDeploy.Origin.Y));

                    AllInOnePushDeploy.SecondFunnellingPoint = bottomRight;

                    AllInOnePushDeploy.FirstHasteLine = new Tuple <PointFT, PointFT>
                                                        (
                        new PointFT(AllInOnePushDeploy.FirstFunnellingPoint.X, AllInOnePushDeploy.FirstFunnellingPoint.Y + 11f + shiftSpells),
                        new PointFT(AllInOnePushDeploy.SecondFunnellingPoint.X, AllInOnePushDeploy.SecondFunnellingPoint.Y + 11f + shiftSpells)
                                                        );

                    AllInOnePushDeploy.FirstRageLine = new Tuple <PointFT, PointFT>
                                                       (
                        new PointFT(AllInOnePushDeploy.FirstFunnellingPoint.X, AllInOnePushDeploy.FirstFunnellingPoint.Y + 19f + shiftSpells),
                        new PointFT(AllInOnePushDeploy.SecondFunnellingPoint.X, AllInOnePushDeploy.SecondFunnellingPoint.Y + 19f + shiftSpells)
                                                       );

                    AllInOnePushDeploy.SecondHasteLine = new Tuple <PointFT, PointFT>
                                                         (
                        new PointFT(AllInOnePushDeploy.FirstFunnellingPoint.X, AllInOnePushDeploy.FirstFunnellingPoint.Y + 24f + shiftSpells),
                        new PointFT(AllInOnePushDeploy.SecondFunnellingPoint.X, AllInOnePushDeploy.SecondFunnellingPoint.Y + 24f + shiftSpells)
                                                         );

                    AllInOnePushDeploy.SecondRageLine = new Tuple <PointFT, PointFT>
                                                        (
                        new PointFT(AllInOnePushDeploy.FirstFunnellingPoint.X, AllInOnePushDeploy.FirstFunnellingPoint.Y + 24f + shiftSpells),
                        new PointFT(AllInOnePushDeploy.SecondFunnellingPoint.X, AllInOnePushDeploy.SecondFunnellingPoint.Y + 24f + shiftSpells)
                                                        );

                    AllInOnePushDeploy.QWHealer    = new PointFT(AllInOnePushDeploy.FirstFunnellingPoint.X, GameGrid.DeployExtents.MinY);
                    AllInOnePushDeploy.QWRagePoint = new PointFT(AllInOnePushDeploy.FirstFunnellingPoint.X, AllInOnePushDeploy.FirstFunnellingPoint.Y + 1);
                }
            }
        }
Esempio n. 32
0
 private void ToDTOImpl(Deploy.ContactStudentDTO dto)
 {
 }
Esempio n. 33
0
 private void FromDTOImpl(Deploy.DeviceLogDTO dto)
 {
 }
Esempio n. 34
0
 private void ToDTOImpl(Deploy.DeviceLogDTO dto)
 {
 }
Esempio n. 35
0
        public IInternalActorRef ActorOf(ActorSystemImpl system, Props props, IInternalActorRef supervisor, ActorPath path, bool systemService, Deploy deploy, bool lookupDeploy, bool async)
        {
            if (systemService)
            {
                return(LocalActorOf(system, props, supervisor, path, true, deploy, lookupDeploy, async));
            }

            /*
             * This needs to deal with "mangled" paths, which are created by remote
             * deployment, also in this method. The scheme is the following:
             *
             * Whenever a remote deployment is found, create a path on that remote
             * address below "remote", including the current system’s identification
             * as "sys@host:port" (typically; it will use whatever the remote
             * transport uses). This means that on a path up an actor tree each node
             * change introduces one layer or "remote/scheme/sys@host:port/" within the URI.
             *
             * Example:
             *
             * akka.tcp://sys@home:1234/remote/akka/sys@remote:6667/remote/akka/sys@other:3333/user/a/b/c
             *
             * means that the logical parent originates from "akka.tcp://sys@other:3333" with
             * one child (may be "a" or "b") being deployed on "akka.tcp://sys@remote:6667" and
             * finally either "b" or "c" being created on "akka.tcp://sys@home:1234", where
             * this whole thing actually resides. Thus, the logical path is
             * "/user/a/b/c" and the physical path contains all remote placement
             * information.
             *
             * Deployments are always looked up using the logical path, which is the
             * purpose of the lookupRemotes internal method.
             */

            var    elements     = path.Elements;
            Deploy configDeploy = null;

            if (lookupDeploy)
            {
                if (elements.Head().Equals("user"))
                {
                    configDeploy = Deployer.Lookup(elements.Drop(1));
                }
                else if (elements.Head().Equals("remote"))
                {
                    configDeploy = LookUpRemotes(elements);
                }
            }

            //merge all of the fallbacks together
            var deployment = new List <Deploy>()
            {
                deploy, configDeploy
            }.Where(x => x != null).Aggregate(Deploy.None, (deploy1, deploy2) => deploy2.WithFallback(deploy1));
            var propsDeploy = new List <Deploy>()
            {
                props.Deploy, deployment
            }.Where(x => x != null)
            .Aggregate(Deploy.None, (deploy1, deploy2) => deploy2.WithFallback(deploy1));

            //match for remote scope
            if (propsDeploy.Scope is RemoteScope)
            {
                var addr = propsDeploy.Scope.AsInstanceOf <RemoteScope>().Address;

                //Even if this actor is in RemoteScope, it might still be a local address
                if (HasAddress(addr))
                {
                    return(LocalActorOf(system, props, supervisor, path, false, deployment, false, async));
                }

                //check for correct scope configuration
                if (props.Deploy.Scope is LocalScope)
                {
                    throw new ConfigurationException(
                              string.Format("configuration requested remote deployment for local-only Props at {0}", path));
                }

                try
                {
                    try
                    {
                        // for consistency we check configuration of dispatcher and mailbox locally
                        var dispatcher  = _system.Dispatchers.Lookup(props.Dispatcher);
                        var mailboxType = _system.Mailboxes.GetMailboxType(props, dispatcher.Configurator.Config);
                    }
                    catch (Exception ex)
                    {
                        throw new ConfigurationException(
                                  string.Format(
                                      "Configuration problem while creating {0} with dispatcher [{1}] and mailbox [{2}]", path,
                                      props.Dispatcher, props.Mailbox), ex);
                    }
                    var localAddress = Transport.LocalAddressForRemote(addr);
                    var rpath        = (new RootActorPath(addr) / "remote" / localAddress.Protocol / localAddress.HostPort() /
                                        path.Elements.ToArray()).
                                       WithUid(path.Uid);
                    var remoteRef = new RemoteActorRef(Transport, localAddress, rpath, supervisor, props, deployment);
                    return(remoteRef);
                }
                catch (Exception ex)
                {
                    throw new ActorInitializationException(string.Format("Remote deployment failed for [{0}]", path), ex);
                }
            }
            else
            {
                return(LocalActorOf(system, props, supervisor, path, false, deployment, false, async));
            }
        }