Browse Source

单击NPC后,弹出对话框时再移动坐标,不要与目标对话重叠。

Wang Jeff 4 years ago
parent
commit
849fbacfeb
1 changed files with 4 additions and 0 deletions
  1. 4 0
      GameAssist/GameAssist/GameAssistDlg.cpp

+ 4 - 0
GameAssist/GameAssist/GameAssistDlg.cpp

@@ -798,6 +798,8 @@ void BattleYS(HWND hWnd, const char* lpszJN)
 	{
 		// È·¶¨
 		bBattle = TRUE;
+		GAssist::MouseMove(hWnd, { rc.left - RAND(30, 50), rc.top - RAND(30, 50) });
+		SRAND(20, 50);
 		GAssist::MouseClick(hWnd, CPoint((rc.right + rc.left) / 2, (rc.top + rc.bottom) / 2), TRUE);
 		SRAND(230, 350);
 		GAssist::MouseMoveEx(hWnd, { rc.left, rc.top }, { rc.right + rand() % 10, rc.bottom + rand() % 10 });
@@ -963,6 +965,8 @@ void BattleOthers(HWND hWnd, const char* lpszName, const char* lpszSkillName)
 	rc = FindMatchIcon(hWnd, _T("img\\gdd\\·Ï»°ÉÙ˵.bmp"));
 	if (!rc.IsRectEmpty() && !rc.IsRectNull())
 	{
+		GAssist::MouseMove(hWnd, { rc.left - RAND(30, 50), rc.top - RAND(30, 50) });
+		SRAND(20, 50);
 		GAssist::MouseClick(hWnd, CPoint((rc.right + rc.left) / 2, (rc.top + rc.bottom) / 2), TRUE);
 		SRAND(330, 550);
 		GAssist::MouseMoveEx(hWnd, { rc.left, rc.top }, { rc.right + rand() % 10, rc.bottom + rand() % 10 });