/// <summary> /// 武将上阵 /// </summary> /// <param name="staff"></param> /// <param name="formation"></param> /// <param name="index"></param> /// <param name="dmGuid"></param> public static void SetStaff(WlyStaffType staff, WlyFormationType formation, int index, string dmGuid) { SetFormation(formation, dmGuid); WlyUtilityBiz.SelectStaffInList(dmGuid, staff); if (DMService.Instance.FindStr(dmGuid, new WxRect(228, 458, 267, 487), "下阵", WlyColor.Normal)) { DMService.Instance.LeftClick(dmGuid, new WxPoint(251, 471)); WlyUtilityBiz.SelectStaffInList(dmGuid, staff); } DMService.Instance.LeftClick(dmGuid, new WxPoint(248, 474)); DMService.Instance.LeftClick(dmGuid, _locationMap[index]); DMService.Instance.LeftClick(dmGuid, new WxPoint(386, 449)); // 检测 DMService.Instance.LeftClick(dmGuid, _locationMap[index]); var result = DMService.Instance.FindStr(dmGuid, new WxRect(718, 307, 796, 328), staff.ToString(), WlyUtilityBiz.GetStaffQualityStr()); if (!result) { throw new InvalidOperationException("武将上阵失败"); } }