Exemplo n.º 1
0
        /// <summary>
        /// 执行任务
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        protected override WlyTaskInfo InternalRun(WlyEntity entity)
        {
            var dmGuid = entity.DMGuid;

            WlyViewMgr.GoTo(dmGuid, WlyViewType.功能_主公信息);
            DMService.Instance.LeftClick(dmGuid, new WxPoint(355, 214), TimeSpan.FromSeconds(2));
            DMService.Instance.LeftClick(dmGuid, new WxPoint(506, 157), TimeSpan.FromSeconds(2));
            DMService.Instance.LeftClick(dmGuid, new WxPoint(793, 391), TimeSpan.FromSeconds(2));
            DMService.Instance.LeftClick(dmGuid, new WxPoint(457, 353), TimeSpan.FromSeconds(2));
            DMService.Instance.LeftClick(dmGuid, new WxPoint(863, 118), TimeSpan.FromSeconds(2));

            WlyViewMgr.GoTo(dmGuid, WlyViewType.功能_仓库);
            DMService.Instance.LeftClick(dmGuid, new WxPoint(220, 230));
            if (DMService.Instance.FindStr(dmGuid, new WxRect(475, 403, 529, 433), "使用", WlyColor.Normal))
            {
                DMService.Instance.LeftClick(dmGuid, new WxPoint(500, 417));
                return(new WlyTaskInfo(ID, true));
            }

            DMService.Instance.LeftClick(dmGuid, new WxPoint(278, 231));
            if (DMService.Instance.FindStr(dmGuid, new WxRect(475, 403, 529, 433), "使用", WlyColor.Normal))
            {
                DMService.Instance.LeftClick(dmGuid, new WxPoint(500, 417));
                return(new WlyTaskInfo(ID, true));
            }

            WlyEntityBiz.ClearEquipments(entity);
            if (entity.AccountInfo.GetStaffInfo(WlyStaffType.文凤卿).GetEquipInfo(WlyEquipType.物理防御).Quality >= WlyQualityType.Purple)
            {
                return(new WlyTaskInfo(ID, true));
            }

            return(new WlyTaskInfo(ID));
        }
Exemplo n.º 2
0
        /// <summary>
        /// 执行任务
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        protected override WlyTaskInfo InternalRun(WlyEntity entity)
        {
            var dmGuid    = entity.DMGuid;
            var cityLevel = entity.AccountInfo.GetBuildingInfo(WlyBuildingType.主城).Level;

            foreach (var staff in entity.AccountInfo.StaffInfoDict.Values)
            {
                if ((staff.Level == cityLevel) && (staff.GrowLevel > cityLevel))
                {
                    continue;
                }

                staff.Level = WlyStaffMgr.GetStaffLevel(dmGuid, staff.Name);
                if (cityLevel >= 100 && staff.Level < 80)
                {
                    WlyStaffMgr.Upgrade(staff.Name, 80, dmGuid);
                    staff.Level = WlyStaffMgr.GetStaffLevel(dmGuid, staff.Name);
                }
            }

            WlyEntityBiz.ClearEquipments(entity);
            //WlyEntityBiz.UpgradeAllEquipmenets(entity);
            return(new WlyTaskInfo(ID, true));
        }