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
{
///
/// 运行步骤
///
public class RunningStep
{
///
/// 一个步骤都没有
///
public const Int32 None = 0;
///
/// 选择角色
///
public const Int32 SelectRole = 51;
///
/// 赛利亚的房间
///
public const Int32 Home = 52;
///
/// 素喃
///
public const Int32 Sunan = 53;
///
/// 时空之门
///
public const Int32 Shikongzhimen = 54;
///
/// 选择难度界面
///
public const Int32 SelectDifficulty = 55;
///
/// 战斗界面
///
public const Int32 War = 56;
///
/// 最后一关
///
public const Int32 LastLevel = 57;
///
/// 得到当前步骤
/// 51.选择角色界面,通过开始游戏按钮界定
/// 52.赛丽亚的房间,通过邮箱界定
/// 53.嗉喃,通过小地图上面的素喃文字界定
/// 54.时空之门,通过小地图上面的文字界定
/// 55.副本选择界面,通过space界定
/// 56.战斗中界面,通过小地图界定
/// 57.最后一关已打完,通过加号来界定
///
///
public static Int32 GetStep()
{
RunningModel rm = ConfigHelper.GetInstance();
ZTRectangle gameRect = ZTRectangle.Empty;
if (WindowUtils.GetDnfRect(out gameRect))
{
Image 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;
}
}
}