| | |
| | | G.Instance.InfoWriter("技能摆放成功"); |
| | | |
| | | |
| | | CloseAllAlertWindow(this.CancelToken, this.GameRect); |
| | | CloseAllAlertWindowByEsc(this.CancelToken, this.GameRect); |
| | | return ZTResult.Success; |
| | | } |
| | | |
| | |
| | | ZTRectangle innertitleRect=ZTRectangle.Empty, innerlvRect = ZTRectangle.Empty, innerupKeyRect = ZTRectangle.Empty, innerdownKeyRect = ZTRectangle.Empty; |
| | | for (int i = 0; i < 2; i++) |
| | | { |
| | | CloseAllAlertWindow(this.CancelToken, this.GameRect); |
| | | CloseAllAlertWindowByEsc(this.CancelToken, this.GameRect); |
| | | G.Instance.InputControl.PressKey(RandomUtils.KeyPressDuration,HIDCode.K); |
| | | |
| | | bool result=FuncUtils.TimeoutCancelableWrap(5000, this.CancelToken, () => { |
| | |
| | | { |
| | | //如果当前选的是tp技能学习(tp技能学习的右侧滚动条跟sp右侧的不一样),则: |
| | | //选中sp技能学习 |
| | | Utility.Structs.ZTPoint spPoint = new Utility.Structs.ZTPoint(lvRect.End.X + 55, lvRect.Start.Y - 80); |
| | | Utility.Structs.ZTPoint spPoint = new Utility.Structs.ZTPoint(this.GameRect.Start.X+65, this.GameRect.Start.Y+105); |
| | | G.Instance.InputControl.MoveToAndClick(spPoint); |
| | | |
| | | result = FuncUtils.TimeoutCancelableWrap(3000, this.CancelToken, () => { |
| | | //识别技能窗 |
| | | return SkillCVHelper.FindCommonUpDownKey(out innerupKeyRect, out innerdownKeyRect, this.titleRect,this.GameRect); |
| | | return SkillCVHelper.FindCommonUpDownKey(out innerupKeyRect, out innerdownKeyRect, this.GameRect); |
| | | },300); |
| | | if (!result) |
| | | { |
| | |
| | | private bool InitSkills() |
| | | { |
| | | //点击初始化 |
| | | Utility.Structs.ZTPoint initButton = new Utility.Structs.ZTPoint(this.upKeyRect.Start.X - 37, this.upKeyRect.Start.Y - 86); |
| | | Utility.Structs.ZTPoint initButton = new Utility.Structs.ZTPoint(this.GameRect.Start.X +510, this.GameRect.Start.Y +105); |
| | | G.Instance.InputControl.MoveToAndClick(initButton); |
| | | |
| | | //是否已打开确认对话框 |
| | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 关闭所有弹出窗 |
| | | /// </summary> |
| | | /// <param name="cancelToken"></param> |
| | | /// <param name="gameRect"></param> |
| | | /// <returns></returns> |
| | | private void CloseAllAlertWindow(CancellationToken cancelToken, ZTRectangle gameRect) |
| | | { |
| | | while (!cancelToken.IsCancellationRequested) |
| | | { |
| | | //G.Instance.InputControl.MoveTo(gameRect.Start.X,gameRect.Start.Y, false, false, false); |
| | | //Thread.Sleep(10); |
| | | //截图 |
| | | Image<Rgb, byte> image = ScreenCapture.Instance.CaptureScreenReturnImage(); |
| | | |
| | | ZTRectangle closeButtonRect = ZTRectangle.Empty; |
| | | if (!DnfCVHelper.GetAlertWindow(out closeButtonRect, image, gameRect)) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | G.Instance.InputControl.MoveToAndClick(closeButtonRect.GetCenterPoint()); |
| | | Thread.Sleep(500); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 设置顶端技能 |
| | |
| | | private bool SettingTopSkills() |
| | | { |
| | | //物理暴击 |
| | | Utility.Structs.ZTPoint skillPoint = new Utility.Structs.ZTPoint(lvRect.End.X + 200, lvRect.Start.Y - 42); |
| | | Utility.Structs.ZTPoint skillPoint = new Utility.Structs.ZTPoint(this.GameRect.Start.X+224, this.GameRect.Start.Y+143); |
| | | SettingSkill(skillPoint); |
| | | |
| | | //物理背击 |
| | | skillPoint = new Utility.Structs.ZTPoint(lvRect.End.X + 280, lvRect.Start.Y - 42); |
| | | skillPoint = new Utility.Structs.ZTPoint(this.GameRect.Start.X + 306, this.GameRect.Start.Y + 143); |
| | | SettingSkill(skillPoint); |
| | | return true; |
| | | } |
| | |
| | | private bool SettingSPSkills() |
| | | { |
| | | //选中sp技能学习 |
| | | Utility.Structs.ZTPoint spPoint = new Utility.Structs.ZTPoint(lvRect.End.X + 55, lvRect.Start.Y - 80); |
| | | Utility.Structs.ZTPoint spPoint = new Utility.Structs.ZTPoint(this.GameRect.Start.X + 65, this.GameRect.Start.Y + 105); |
| | | //原来 Utility.Structs.ZTPoint spPoint = new Utility.Structs.ZTPoint(lvRect.End.X + 55, lvRect.Start.Y - 80); |
| | | G.Instance.InputControl.MoveToAndClick(spPoint); |
| | | |
| | | ZTRectangle numberLimitArea = new ZTRectangle(lvRect.Start.X-5,lvRect.End.Y,lvRect.End.X+21,lvRect.End.Y+340); |
| | |
| | | /// <returns></returns> |
| | | private bool SettingSkill(Utility.Structs.ZTPoint skillPoint) |
| | | { |
| | | //84,71 |
| | | ZTRectangle limitRect = new ZTRectangle(skillPoint.X-84,skillPoint.Y-71,skillPoint.X+84,skillPoint.Y+71); |
| | | //加技能按钮区域 |
| | | ZTRectangle limitRect = new ZTRectangle(skillPoint.X-52,skillPoint.Y+27,skillPoint.X+52,skillPoint.Y+63); |
| | | |
| | | bool result = false; |
| | | ZTRectangle addSkillLevelButton = ZTRectangle.Empty; |