Bläddra i källkod

完善IsWaittingAttack

Jeff 4 år sedan
förälder
incheckning
7fc9446c6d
2 ändrade filer med 5 tillägg och 2 borttagningar
  1. 1 0
      GameAssist/GameAssist/Assist.cpp
  2. 4 2
      GameAssist/GameAssist/GameAssistDlg.cpp

+ 1 - 0
GameAssist/GameAssist/Assist.cpp

@@ -1141,6 +1141,7 @@ namespace GAssist
 		// 指定源图片区域来做模块比较,提高效率;
 		cv::Mat imgROI;
 		imgROI = srcImg(cv::Rect(srcRect.left, srcRect.top, srcRect.right - srcRect.left, srcRect.bottom - srcRect.top));
+		cv::imwrite("roi.bmp", imgROI);
 		/*
 		m_ImgROI = srcImg([&]()-> cv::Rect {
 			// 注意是x,y,w=cols,h=rows

+ 4 - 2
GameAssist/GameAssist/GameAssistDlg.cpp

@@ -196,9 +196,10 @@ BOOL IsWattingAttack(HWND hWnd, int nAttackNPCType)
 	{
 		case 0:
 		{	// 将鼠标移动到指定位置;
+			DebugLog(_T("IsWattingAttack:镜妖中……"));
 			POINT ptDest = { 20, 50 }; // 左上角;
 			GAssist::MouseMove(hWnd, ptDest);
-			if (GAssist::IsMatchIcon(hWnd, GAssist::g_strAppdir + _T("img\\我方攻击中.bmp"), { 0, 0, 30, 60 }, rc)) {
+			if (GAssist::IsMatchIcon(hWnd, GAssist::g_strAppdir + _T("img\\我方攻击.bmp"), { 0, 50, 60, 115 }, rc)) {
 				DebugLog(_T("IsWattingAttack:我方攻击"));
 				bIsAttack = TRUE;
 			}
@@ -207,6 +208,7 @@ BOOL IsWattingAttack(HWND hWnd, int nAttackNPCType)
 		case 1:
 		{
 			// 将鼠标移动到指定位置;
+			DebugLog(_T("IsWattingAttack:职业挑战中……"));
 			POINT ptDest = { 625, 28 }; // 左上角;
 			GAssist::MouseMove(hWnd, ptDest);
 			if (!GAssist::IsMatchIcon(hWnd, GAssist::g_strAppdir + _T("img\\战斗中2.bmp"), { 0, 0, 30, 60 }, rc)) {
@@ -219,7 +221,7 @@ BOOL IsWattingAttack(HWND hWnd, int nAttackNPCType)
 			break;
 	}
 
-	DebugLog(_T("IsWattingAttack:非技能选择"));
+	//DebugLog(_T("IsWattingAttack:非技能选择"));
 
 	return bIsAttack;
 #endif