Ejemplo n.º 1
0
        /// <summary>
        /// 选择武将
        /// </summary>
        /// <param name="dmGuid"></param>
        /// <param name="staff"></param>
        /// <param name="view"></param>
        public static void SelectStaff(string dmGuid, WlyStaffType staff, WlyViewType view)
        {
            // 首先跳转到训练界面
            WlyViewMgr.GoTo(dmGuid, view);
            if (!WlyUtilityBiz.SelectStaffInList(dmGuid, staff))
            {
                GetStaff(dmGuid, staff);
                WlyViewMgr.GoTo(dmGuid, view);
                WlyUtilityBiz.SelectStaffInList(dmGuid, staff);
            }

            if (DMService.Instance.FindStr(dmGuid, new WxRect(529, 321, 562, 341), "取消", WlyColor.Normal))
            {
                DMService.Instance.LeftClick(dmGuid, new WxPoint(546, 329));
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 考虑已经加入和军团人数已满的情况
        /// </summary>
        /// <param name="dmGuid"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        private static bool JoinCore(string dmGuid, string name)
        {
            if (DMService.Instance.FindStr(dmGuid, new WxRect(667, 465, 728, 490), "加入军团", WlyColor.Normal))
            {
                DMService.Instance.LeftClick(dmGuid, new WxPoint(695, 479), TimeSpan.FromSeconds(1));
            }

            // 确认加入成功
            WlyViewMgr.GoTo(dmGuid, WlyViewType.功能_军团信息);
            if (DMService.Instance.FindStr(dmGuid, new WxRect(384, 183, 454, 208), name, "e9e7cf-000000"))
            {
                return(true);
            }

            return(false);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 武将转职
        /// </summary>
        /// <param name="staff"></param>
        /// <param name="dmGuid"></param>
        public static void Evolve(WlyStaffType staff, string dmGuid)
        {
            WlyViewMgr.GoTo(dmGuid, WlyViewType.功能_武将);
            var result = WlyUtilityBiz.SelectStaffInList(dmGuid, staff);

            if (!result)
            {
                throw new InvalidOperationException($"未能选择到武将{staff.ToString()}");
            }

            DMService.Instance.LeftClick(dmGuid, new WxPoint(581, 341));
            if (DMService.Instance.FindStr(dmGuid, new WxRect(429, 342, 475, 371), "确定", WlyColor.Normal))
            {
                DMService.Instance.LeftClick(dmGuid, new WxPoint(454, 360));
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 武将下野
        /// </summary>
        /// <param name="dmGuid"></param>
        /// <param name="staff"></param>
        /// <returns></returns>
        public static bool ThrowStaff(string dmGuid, WlyStaffType staff)
        {
            WlyViewMgr.GoTo(dmGuid, WlyViewType.功能_招募);

            // 无法选中则当做下野已经成功
            if (!WlyUtilityBiz.SelectStaffInList(dmGuid, staff))
            {
                return(true);
            }

            // 点击下野
            DMService.Instance.LeftClick(dmGuid, new WxPoint(270, 476));
            DMService.Instance.LeftClick(dmGuid, new WxPoint(453, 332));

            // 操作确认
            return(!DMService.Instance.FindStr(dmGuid, 总成_武将.武将列表, staff.ToString(), WlyColor.StaffColor));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 设置武将兵种类型
        /// </summary>
        /// <param name="staff"></param>
        /// <param name="index"></param>
        /// <param name="dmGuid"></param>
        public static void SetType(WlyStaffType staff, int index, string dmGuid)
        {
            WlyViewMgr.GoTo(dmGuid, WlyViewType.功能_武将);
            if (!WlyUtilityBiz.SelectStaffInList(dmGuid, staff))
            {
                throw new InvalidOperationException($"无法选择到武将{staff}");
            }

            if (index == 1)
            {
                DMService.Instance.LeftClick(dmGuid, new WxPoint(370, 254));
            }
            else
            {
                DMService.Instance.LeftClick(dmGuid, new WxPoint(469, 265));
            }

            DMService.Instance.LeftClick(dmGuid, new WxPoint(459, 340));
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 升级军团科技
        /// </summary>
        /// <param name="dmGuid"></param>
        public static bool Upgrade(string dmGuid)
        {
            WlyViewMgr.GoTo(dmGuid, WlyViewType.功能_军团科技);

            // 检测科技等级
            var res = WlyUtilityBiz.GetAmount(dmGuid, new WxRect(739, 340, 783, 364), "20ef4c-000000", out var l);

            if (res && (l < 100))
            {
                DMService.Instance.LeftClick(dmGuid, new WxPoint(516, 474));
                DMService.Instance.LeftClick(dmGuid, new WxPoint(609, 476));
                DMService.Instance.LeftClick(dmGuid, new WxPoint(587, 287));
                DMService.Instance.LeftClick(dmGuid, new WxPoint(436, 364));
                return(false);
            }

            var startPoint = new WxPoint(237, 256);

            for (int i = 0; i < 6; i++)
            {
                DMService.Instance.LeftClick(dmGuid, startPoint.Shift(74 * i, 0));

                // 检测科技等级
                var result = WlyUtilityBiz.GetAmount(dmGuid, new WxRect(739, 340, 783, 364), "20ef4c-000000", out var level);
                if (!result)
                {
                    throw new InvalidOperationException("无法检测到科技等级");
                }

                if (level < 100)
                {
                    DMService.Instance.LeftClick(dmGuid, new WxPoint(516, 474));
                    DMService.Instance.LeftClick(dmGuid, new WxPoint(609, 476));
                    DMService.Instance.LeftClick(dmGuid, new WxPoint(587, 287));
                    DMService.Instance.LeftClick(dmGuid, new WxPoint(436, 364));
                    return(false);
                }
            }

            return(true);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// 更换指定部位的装备
        /// </summary>
        /// <param name="dmGuid"></param>
        /// <param name="staff"></param>
        /// <param name="type"></param>
        /// <param name="staffLevel"></param>
        public static void ChangeEquipmenet(string dmGuid, WlyStaffType staff, WlyEquipType type, int staffLevel)
        {
            WlyViewMgr.GoTo(dmGuid, WlyViewType.功能_装备);
            WlyUtilityBiz.SelectStaffInList(dmGuid, staff);

            var p = _equipSpaceMap[type];

            DMService.Instance.LeftClick(dmGuid, p);
            var currentInfo = GetEquipInfo(dmGuid);

            var startPoint = new WxPoint(551, 240);

            for (var j = 0; j < 4; j++)
            {
                for (var i = 0; i < 2; i++)
                {
                    var clickPoint = startPoint.Shift(i * 60, j * 60);
                    if (DMService.Instance.FindColor(dmGuid, "0a1215-000000", new WxRect(clickPoint, 10)))
                    {
                        return;
                    }

                    DMService.Instance.LeftClick(dmGuid, clickPoint);
                    var equipInfo = GetEquipInfo(dmGuid);

                    if (equipInfo.EquipLevel > staffLevel)
                    {
                        continue;
                    }

                    // 符合更换条件则进行更换
                    if ((equipInfo.Quality > currentInfo.Quality) ||
                        ((equipInfo.Quality == currentInfo.Quality) && (equipInfo.EquipLevel > currentInfo.EquipLevel)))
                    {
                        // 点击更换
                        DMService.Instance.LeftClick(dmGuid, new WxPoint(590, 473));
                        return;
                    }
                }
            }
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 打开指定的城池
        /// </summary>
        /// <param name="dmGuid"></param>
        /// <param name="city"></param>
        public static void OpenCity(string dmGuid, WlyCityType city)
        {
            WlyViewMgr.GoTo(dmGuid, WlyViewType.场景_世界地图);

            var find = DMService.Instance.FindStr(dmGuid, WlyUtilityBiz.GameWndRect, city.ToString(), "f3f3da-000000", out var x,
                                                  out var y);

            if (!find)
            {
                throw new InvalidOperationException($"未找到城池{city.ToString()}");
            }

            DMService.Instance.LeftClick(dmGuid, new WxPoint(x + 20, y - 20));
            var wait = FlowLogicHelper.RepeatRun(
                () => DMService.Instance.FindStr(dmGuid, new WxRect(485, 148, 518, 173), city.ToString(), WlyColor.Normal),
                TimeSpan.FromSeconds(5));

            if (!wait)
            {
                throw new InvalidOperationException($"无法打开城池{city.ToString()}");
            }
        }
Ejemplo n.º 9
0
        /// <summary>
        /// 获取指定建筑的等级
        /// </summary>
        /// <param name="buildingType"></param>
        /// <param name="dmGuid"></param>
        /// <returns></returns>
        public static int GetBuildingLevel(WlyBuildingType buildingType, string dmGuid)
        {
            WlyViewMgr.GoTo(dmGuid, _typeMap[buildingType]);

            // 获取建筑等级
            var levelStr = DMService.Instance.GetWords(dmGuid, new WxRect(291, 308, 518, 333), "ffffff-000000", 1);
            var indexOf  = levelStr.IndexOf("级", StringComparison.Ordinal);

            if (indexOf == -1)
            {
                return(0);
            }

            bool result = int.TryParse(levelStr.Substring(0, indexOf), out var level);

            if (!result)
            {
                throw new InvalidOperationException("错误的等级格式");
            }

            return(level);
        }
Ejemplo n.º 10
0
        /// <summary>
        /// 设置阵型
        /// </summary>
        /// <param name="type"></param>
        /// <param name="dmGuid"></param>
        public static void SetFormation(WlyFormationType type, string dmGuid)
        {
            WlyViewMgr.GoTo(dmGuid, WlyViewType.功能_阵型);

            var wait = FlowLogicHelper.RepeatRun(() =>
            {
                if (DMService.Instance.FindStr(dmGuid, new WxRect(386, 432, 438, 453), type.ToString(), "f3f3da-000000"))
                {
                    return(true);
                }

                DMService.Instance.LeftClick(dmGuid, _formationMap[type]);
                DMService.Instance.LeftClick(dmGuid, new WxPoint(599, 463));
                return(false);
            }, TimeSpan.FromSeconds(5));

            if (!wait)
            {
                throw new InvalidOperationException("无法设置指定阵型");
            }
            DMService.Instance.LeftClick(dmGuid, new WxPoint(500, 322));
        }
Ejemplo n.º 11
0
        /// <summary>
        /// 交换两个武将指定的装备
        /// </summary>
        /// <param name="dmGuid"></param>
        /// <param name="staff1"></param>
        /// <param name="staff2"></param>
        /// <param name="equipType"></param>
        public static void SwitchEquipment(string dmGuid, WlyStaffInfo staff1, WlyStaffInfo staff2, WlyEquipType equipType)
        {
            WlyViewMgr.GoTo(dmGuid, WlyViewType.功能_武将);
            var e1 = staff1.GetEquipInfo(equipType);
            var e2 = staff2.GetEquipInfo(equipType);

            WlyEquipMgr.UnequipStaff(dmGuid, staff1.Name, equipType);
            WlyEquipMgr.UnequipStaff(dmGuid, staff2.Name, equipType);

            if (staff1.Level < e2.EquipLevel)
            {
                Upgrade(staff1.Name, e2.EquipLevel, dmGuid);
            }
            WlyEquipMgr.ChangeEquipmenet(dmGuid, staff1.Name, equipType, e2.EquipLevel);

            if (staff2.Level < e1.EquipLevel)
            {
                Upgrade(staff2.Name, e1.EquipLevel, dmGuid);
            }
            WlyEquipMgr.ChangeEquipmenet(dmGuid, staff2.Name, equipType, e1.EquipLevel);

            staff1.SaveEquipInfo(WlyEquipMgr.GetStaffEquipInfo(dmGuid, staff1.Name, equipType));
            staff2.SaveEquipInfo(WlyEquipMgr.GetStaffEquipInfo(dmGuid, staff2.Name, equipType));
        }
Ejemplo n.º 12
0
        /// <summary>
        /// 为指定英雄卸下装备
        /// </summary>
        /// <param name="dmGuid"></param>
        /// <param name="staff"></param>
        public static bool UnequipStaff(string dmGuid, WlyStaffType staff)
        {
            WlyViewMgr.GoTo(dmGuid, WlyViewType.功能_装备);
            if (!WlyUtilityBiz.SelectStaffInList(dmGuid, staff))
            {
                return(false);
            }

            // 点击全部卸载
            DMService.Instance.LeftClick(dmGuid, new WxPoint(372, 470));

            // 确认装备已经全部卸载
            foreach (var p in _equipSpaceMap.Values)
            {
                DMService.Instance.LeftClick(dmGuid, p);
                var type = GetEquipInfo(dmGuid);
                if (type.Quality > WlyQualityType.Unknow)
                {
                    return(false);
                }
            }

            return(true);
        }
Ejemplo n.º 13
0
        /// <summary>
        /// 升级科技到指定的策略府等级
        /// </summary>
        /// <param name="level"></param>
        /// <param name="dmGuid"></param>
        public static bool UpgradeTechnology(int level, string dmGuid)
        {
            WlyViewMgr.GoTo(dmGuid, WlyViewType.功能_升级科技);

            var startPoint = new WxPoint(239, 249);

            for (int column = 0; column < 6; column++)
            {
                for (int row = 0; row < 2; row++)
                {
                    DMService.Instance.LeftClick(dmGuid, startPoint.Shift(column * 72, row * 72));
                    if (!FlowLogicHelper.RunToTarget(() =>
                    {
                        var str = DMService.Instance.GetWords(dmGuid, new WxRect(719, 358, 800, 382), "33ffff-000000");
                        return(int.Parse(str.Substring(3, str.Length - 4)));
                    }, current => current > level, () => DMService.Instance.LeftClick(dmGuid, new WxPoint(613, 472))))
                    {
                        return(false);
                    }
                }
            }

            return(true);
        }
Ejemplo n.º 14
0
        /// <summary>
        /// 升级主公属性
        /// </summary>
        /// <param name="dmGuid"></param>
        /// <returns></returns>
        public static bool Upgrade(string dmGuid)
        {
            WlyViewMgr.GoTo(dmGuid, WlyViewType.功能_主公属性);

            // 升级进攻
            var wait = FlowLogicHelper.RepeatRun(() =>
            {
                DMService.Instance.LeftClick(dmGuid, new WxPoint(220, 157));
                return(DMService.Instance.FindStr(dmGuid, new WxRect(485, 188, 518, 206), "进攻", "ffcc00-000000"));
            }, TimeSpan.FromSeconds(5));

            if (!wait)
            {
                throw new InvalidOperationException("无法打开主公属性进攻");
            }

            while (WlyUtilityBiz.GetAmount(dmGuid, new WxRect(506, 210, 536, 228), "66ff00-000000", out var _))
            {
                DMService.Instance.LeftClick(dmGuid, new WxPoint(750, 265));
            }

            // 升级防御
            wait = FlowLogicHelper.RepeatRun(() =>
            {
                DMService.Instance.LeftClick(dmGuid, new WxPoint(296, 158));
                return(DMService.Instance.FindStr(dmGuid, new WxRect(485, 188, 518, 206), "防御", "ffcc00-000000"));
            }, TimeSpan.FromSeconds(5));

            if (!wait)
            {
                throw new InvalidOperationException("无法打开主公属性防御");
            }

            while (WlyUtilityBiz.GetAmount(dmGuid, new WxRect(506, 210, 536, 228), "66ff00-000000", out var _))
            {
                DMService.Instance.LeftClick(dmGuid, new WxPoint(751, 420));
            }

            // 升级经济
            wait = FlowLogicHelper.RepeatRun(() =>
            {
                DMService.Instance.LeftClick(dmGuid, new WxPoint(375, 160));
                return(DMService.Instance.FindStr(dmGuid, new WxRect(485, 188, 518, 206), "经济", "ffcc00-000000"));
            }, TimeSpan.FromSeconds(5));

            if (!wait)
            {
                throw new InvalidOperationException("无法打开主公属性经济");
            }

            while (WlyUtilityBiz.GetAmount(dmGuid, new WxRect(506, 210, 536, 228), "66ff00-000000", out var _))
            {
                DMService.Instance.LeftClick(dmGuid, new WxPoint(745, 264));
            }

            // 升级通用
            wait = FlowLogicHelper.RepeatRun(() =>
            {
                DMService.Instance.LeftClick(dmGuid, new WxPoint(452, 160));
                return(DMService.Instance.FindStr(dmGuid, new WxRect(485, 188, 518, 206), "通用", "ffcc00-000000"));
            }, TimeSpan.FromSeconds(5));

            if (!wait)
            {
                throw new InvalidOperationException("无法打开主公属性通用");
            }

            while (WlyUtilityBiz.GetAmount(dmGuid, new WxRect(506, 210, 536, 228), "66ff00-000000", out var _))
            {
                DMService.Instance.LeftClick(dmGuid, new WxPoint(750, 420));
            }

            return(true);
        }
Ejemplo n.º 15
0
        /// <summary>
        /// 攻击指定位置的npc,获取攻击结果
        /// </summary>
        /// <param name="point"></param>
        /// <param name="dmGuid"></param>
        /// <returns></returns>
        private static bool?Attack(WxPoint point, string dmGuid)
        {
            var wait = FlowLogicHelper.RepeatRun(() =>
            {
                var v = WlyViewMgr.GetView(WlyViewType.导航_日常按钮栏);
                if (v.IsCurrentView(dmGuid))
                {
                    v.Exit(dmGuid);
                }

                v = WlyViewMgr.GetView(WlyViewType.右侧提示);
                if (v.IsCurrentView(dmGuid))
                {
                    v.Exit(dmGuid);
                }

                v = WlyViewMgr.GetView(WlyViewType.略_点击继续);
                if (v.IsCurrentView(dmGuid))
                {
                    v.Exit(dmGuid);
                }

                Thread.Sleep(100);
                WlyViewMgr.GoTo(dmGuid, WlyViewType.场景_副本);
                DMService.Instance.LeftClick(dmGuid, point);
                return(DMService.Instance.FindStr(dmGuid, new WxRect(556, 290, 608, 318), "攻击", WlyColor.Normal));
            }, TimeSpan.FromSeconds(5));

            if (!wait)
            {
                if (DMService.Instance.FindStr(dmGuid, new WxRect(566, 297, 605, 314), "攻击", "cccccc-000000"))
                {
                    DMService.Instance.LeftClick(dmGuid, new WxPoint(638, 183));
                    return(null);
                }

                throw new InvalidOperationException("无法点开NPC");
            }

            // 判断NPC是否已经完成攻击
            if (DMService.Instance.FindStr(dmGuid, new WxRect(587, 401, 624, 422), "战斗", "66ff00-000000"))
            {
                DMService.Instance.LeftClick(dmGuid, new WxPoint(638, 183));
                return(null);
            }

            DMService.Instance.LeftClick(dmGuid, new WxPoint(584, 304));
            var view = WlyViewMgr.GetView(WlyViewType.场景_战斗);

            wait = FlowLogicHelper.RepeatRun(() =>
            {
                Thread.Sleep(2000);
                return(view.IsCurrentView(dmGuid));
            }, TimeSpan.FromSeconds(30));

            if (!wait)
            {
                throw new InvalidOperationException("无法进去战斗画面");
            }

            //if (!DMService.Instance.FindStr(dmGuid, new WxRect(791, 566, 826, 591), "关闭", "f3f3da-000000"))
            //{
            //    DMService.Instance.LeftClick(dmGuid, new WxPoint(817, 576));
            //}

            // 等待战斗结果
            bool key = true;

            wait = FlowLogicHelper.RepeatRun(() =>
            {
                if (DMService.Instance.FindStr(dmGuid, new WxRect(723, 560, 768, 591), "结果", "f3f3da-000000"))
                {
                    DMService.Instance.LeftClick(dmGuid, new WxPoint(751, 576));
                }

                if (DMService.Instance.FindStr(dmGuid, new WxRect(439, 205, 560, 238), "获得胜利", "e9e7cf-000000"))
                {
                    return(true);
                }

                if (DMService.Instance.FindStr(dmGuid, new WxRect(517, 211, 552, 234), "失败", "e9e7cf-000000"))
                {
                    key = false;
                    return(true);
                }

                return(false);
            }, TimeSpan.FromSeconds(60));
            if (!wait)
            {
                throw new InvalidOperationException("等待不到战斗结果");
            }

            WlyViewMgr.ExitCurrentView(dmGuid, TimeSpan.FromSeconds(10));
            return(key);
        }
Ejemplo n.º 16
0
        private static WlyProgressNode GetSubPoint(string dmGuid, int index, string previousID)
        {
            var location = new WxPoint(0, 0);

            if (previousID == "wly17_347_127")
            {
                location = new WxPoint(394, 94);
            }
            else
            {
                var wait = FlowLogicHelper.RepeatRun(() =>
                {
                    var find = DMService.Instance.FindPic(dmGuid, WlyPicType.可攻击目标, WlyUtilityBiz.GameWndRect, out var x, out var y);
                    if (find)
                    {
                        location = new WxPoint(x + 7, y + 14);
                        return(true);
                    }

                    Thread.Sleep(500);
                    var view = WlyViewMgr.GetView(WlyViewType.导航_日常按钮栏);
                    if (view.IsCurrentView(dmGuid))
                    {
                        view.Exit(dmGuid);
                    }

                    view = WlyViewMgr.GetView(WlyViewType.右侧提示);
                    if (view.IsCurrentView(dmGuid))
                    {
                        view.Exit(dmGuid);
                    }

                    view = WlyViewMgr.GetView(WlyViewType.略_点击继续);
                    if (view.IsCurrentView(dmGuid))
                    {
                        view.Exit(dmGuid);
                    }

                    Thread.Sleep(100);
                    return(false);
                }, TimeSpan.FromSeconds(5));

                if (!wait)
                {
                    if (index == 11)
                    {
                        location = new WxPoint(909, 213);
                    }

                    if (index == 17)
                    {
                        location = new WxPoint(347, 127);
                    }
                }
            }

            // 判断是否寻到攻击目标
            if ((location.X == 0) && (location.Y == 0))
            {
                throw new InvalidOperationException("找不到攻击目标");
            }

            // 构建攻击节点
            var node = new WlyProgressNode
            {
                Location = location,
                Progress = index
            };

            return(node);
        }
Ejemplo n.º 17
0
        private static void GoToMain(int main, string dmGuid)
        {
            WlyViewMgr.GoTo(dmGuid, WlyViewType.场景_副本);
            var name = GetMainName(main);

            if (DMService.Instance.FindStr(dmGuid, _mainRect, name, "ffffcc-000000"))
            {
                return;
            }

            var current = DMService.Instance.GetWords(dmGuid, _mainRect, "ffffcc-000000");
            var index   = GetIndex(current);
            var direct  = index < main;

            var wait = FlowLogicHelper.RepeatRun(() =>
            {
                if (DMService.Instance.FindStr(dmGuid, new WxRect(468, 356, 508, 381), "副本", WlyColor.Normal))
                {
                    return(true);
                }

                var view = WlyViewMgr.GetView(WlyViewType.功能_军团战);
                if (view.IsCurrentView(dmGuid))
                {
                    view.Exit(dmGuid);
                }

                DMService.Instance.LeftClick(dmGuid, new WxPoint(502, 578));
                return(false);
            }, TimeSpan.FromSeconds(10));

            if (!wait)
            {
                throw new InvalidOperationException($"未能找到副本{name}");
            }

            wait = FlowLogicHelper.RepeatRun(() =>
            {
                var result = DMService.Instance.FindStr(dmGuid, new WxRect(420, 377, 567, 568), name, "e9e7cf-000000", out var x, out var y);
                if (result)
                {
                    DMService.Instance.LeftClick(dmGuid, new WxPoint(x, y));
                    return(true);
                }

                if (direct)
                {
                    DMService.Instance.LeftClick(dmGuid, new WxPoint(574, 554));
                }
                else
                {
                    DMService.Instance.LeftClick(dmGuid, new WxPoint(576, 393));
                }

                return(false);
            }, TimeSpan.FromSeconds(10));

            if (wait)
            {
                GoToMain(main, dmGuid);
            }
            else
            {
                throw new InvalidOperationException($"未能找到副本{name}");
            }
        }
Ejemplo n.º 18
0
        /// <summary>
        /// 推图
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="index"></param>
        public static bool Attack(WlyEntity entity, int index)
        {
            var dmGuid = entity.DMGuid;

            WlyViewMgr.GoTo(dmGuid, WlyViewType.场景_副本);
            var view = WlyViewMgr.GetView(WlyViewType.导航_日常按钮栏);

            if (view.IsCurrentView(dmGuid))
            {
                view.Exit(dmGuid);
            }

            WlyProgressNode current  = null;
            WlyProgressNode previous = null;

            if (!string.IsNullOrEmpty(entity.AccountInfo.ProgressNode))
            {
                m_progressDict.TryGetValue(entity.AccountInfo.ProgressNode, out previous);
            }

            if ((previous != null) && !string.IsNullOrEmpty(previous.Next))
            {
                current = m_progressDict[previous.Next];
            }

            while (true)
            {
                GoToMain(index, dmGuid);
                if (DMService.Instance.FindPic(dmGuid, WlyPicType.一个副本, new WxRect(567, 567, 592, 589)))
                {
                    return(true);
                }

                if (DMService.Instance.FindPic(dmGuid, WlyPicType.首攻军团, WlyUtilityBiz.GameWndRect))
                {
                    return(true);
                }

                // 寻找下一节点
                if (current == null)
                {
                    var node = GetSubPoint(dmGuid, index, previous?.ID);
                    if (!m_progressDict.TryGetValue(node.ID, out current))
                    {
                        current = node;
                    }
                }

                bool?result;
                try
                {
                    result = Attack(current.Location, dmGuid);
                    if (result == false)
                    {
                        return(false);
                    }
                }
                catch
                {
                    entity.AccountInfo.ProgressNode = string.Empty;
                    entity.AccountInfo.Save();
                    throw;
                }

                entity.AccountInfo.ProgressNode = current.ID;
                entity.AccountInfo.Save();

                if (result == null)
                {
                    if (!string.IsNullOrEmpty(current.Next))
                    {
                        current = m_progressDict[current.Next];
                    }
                    else
                    {
                        current = null;
                    }
                }
                else
                {
                    var key = false;
                    if ((previous != null) && (previous.Next == null))
                    {
                        previous.Next = current.ID;
                        key           = true;
                    }

                    if ((current.Previous == null) && (previous != null))
                    {
                        current.Previous = previous.ID;
                        key = true;
                    }

                    if (!m_progressDict.ContainsKey(current.ID))
                    {
                        current = m_progressDict.GetOrAdd(current.ID, current);
                        key     = true;
                    }

                    if (key)
                    {
                        Save();
                    }

                    if (current.IsEnd)
                    {
                        return(true);
                    }

                    previous = current;
                    if (string.IsNullOrEmpty(current.Next))
                    {
                        current = null;
                    }
                    else
                    {
                        m_progressDict.TryGetValue(current.Next, out current);
                    }
                }
            }
        }