using RichCreator.Utility.Captures;
|
using RichCreator.Utility.CV;
|
using RichCreator.Utility.Structs;
|
using RichCreator.Utility.Utilitys;
|
using Emgu.CV;
|
using Emgu.CV.Structure;
|
using RichCreator.Models;
|
using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
using ZTImage.Configuration;
|
|
namespace RichCreator
|
{
|
/// <summary>
|
/// 运行步骤
|
/// </summary>
|
public class RunningStep
|
{
|
/// <summary>
|
/// 一个步骤都没有
|
/// </summary>
|
public const Int32 None = 0;
|
|
/// <summary>
|
/// 选择角色
|
/// </summary>
|
public const Int32 SelectRole = 51;
|
|
/// <summary>
|
/// 赛利亚的房间
|
/// </summary>
|
public const Int32 Home = 52;
|
|
/// <summary>
|
/// 素喃
|
/// </summary>
|
public const Int32 Sunan = 53;
|
|
|
/// <summary>
|
/// 时空之门
|
/// </summary>
|
public const Int32 Shikongzhimen = 54;
|
|
/// <summary>
|
/// 选择难度界面
|
/// </summary>
|
public const Int32 SelectDifficulty = 55;
|
|
/// <summary>
|
/// 战斗界面
|
/// </summary>
|
public const Int32 War = 56;
|
|
/// <summary>
|
/// 最后一关
|
/// </summary>
|
public const Int32 LastLevel = 57;
|
|
|
/// <summary>
|
/// 得到当前步骤
|
/// 51.选择角色界面,通过开始游戏按钮界定
|
/// 52.赛丽亚的房间,通过邮箱界定
|
/// 53.嗉喃,通过小地图上面的素喃文字界定
|
/// 54.时空之门,通过小地图上面的文字界定
|
/// 55.副本选择界面,通过space界定
|
/// 56.战斗中界面,通过小地图界定
|
/// 57.最后一关已打完,通过加号来界定
|
/// </summary>
|
/// <returns></returns>
|
public static Int32 GetStep()
|
{
|
RunningModel rm = ConfigHelper.GetInstance<RunningModel>();
|
|
ZTRectangle gameRect = ZTRectangle.Empty;
|
if (WindowUtils.GetDnfRect(out gameRect))
|
{
|
Image<Rgb, byte> image = ScreenCapture.Instance.CaptureScreenReturnImage();
|
////57.最后一关已打完,通过加号来界定
|
//if (DnfCVHelper.IsAllComplete(image, gameRect))
|
//{
|
// return LastLevel;
|
//}
|
|
//56.战斗中判断
|
ZTRectangle minimapRect = ZTRectangle.Empty;
|
if (LindongCVHelper.ExistLingdongText(image, gameRect))
|
{
|
return War;
|
}
|
|
//// 55.副本选择,通过space界定
|
//if (LindongCVHelper.IsInChoiceTaskPage(image, gameRect))
|
//{
|
// return SelectDifficulty;
|
//}
|
|
////54.时空之门
|
//if (LindongCVHelper.IsShikongzhimen(image, gameRect))
|
//{
|
// return Shikongzhimen;
|
//}
|
|
////53.素喃
|
//if (LindongCVHelper.IsInSunan(image, gameRect))
|
//{
|
// return Sunan;
|
//}
|
|
////52.赛丽亚房间
|
//if (DnfCVHelper.IsInSaiLiYaFangJian(gameRect))
|
//{
|
// return Home;
|
//}
|
|
//51.角色选择界面
|
ZTRectangle startRect = ZTRectangle.Empty;
|
if (DnfCVHelper.IsSelectRoleWindow(out startRect))
|
{
|
return SelectRole;
|
}
|
}
|
|
//ZTRectangle wegameRect = ZTRectangle.Empty;
|
//if (WindowUtils.GetWeGameRect(out wegameRect))
|
//{
|
|
//}
|
return None;
|
}
|
}
|
}
|