mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-03-15 07:43:20 +08:00
少女月卡支持 (#2622)
This commit is contained in:
@@ -256,7 +256,14 @@ public static partial class Bv
|
||||
/// <returns></returns>
|
||||
public static bool IsInBlessingOfTheWelkinMoon(ImageRegion captureRa)
|
||||
{
|
||||
return captureRa.Find(GameLoadingAssets.Instance.WelkinMoonRo).IsExist();
|
||||
var ra = captureRa;
|
||||
|
||||
if (ra.Find(GameLoadingAssets.Instance.GirlMoonRo).IsExist())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return ra.Find(GameLoadingAssets.Instance.WelkinMoonRo).IsExist();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
@@ -9,6 +9,7 @@ public class GameLoadingAssets : BaseAssets<GameLoadingAssets>
|
||||
public RecognitionObject ChooseEnterGameRo;
|
||||
public RecognitionObject EnterGameRo;
|
||||
public RecognitionObject WelkinMoonRo;
|
||||
public RecognitionObject GirlMoonRo;
|
||||
|
||||
private GameLoadingAssets()
|
||||
{
|
||||
@@ -38,5 +39,14 @@ public class GameLoadingAssets : BaseAssets<GameLoadingAssets>
|
||||
RegionOfInterest = new Rect(0, CaptureRect.Height / 2, CaptureRect.Width, CaptureRect.Height / 2),
|
||||
DrawOnWindow = false
|
||||
}.InitTemplate();
|
||||
|
||||
GirlMoonRo = new RecognitionObject
|
||||
{
|
||||
Name = "GirlMoon",
|
||||
RecognitionType = RecognitionTypes.TemplateMatch,
|
||||
TemplateImageMat = GameTaskManager.LoadAssetImage("GameLoading", "girl_moon.png"),
|
||||
RegionOfInterest = new Rect(0, CaptureRect.Height / 2, CaptureRect.Width, CaptureRect.Height / 2),
|
||||
DrawOnWindow = false
|
||||
}.InitTemplate();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -343,8 +343,7 @@ public class GameLoadingTrigger : ITaskTrigger
|
||||
}
|
||||
}
|
||||
|
||||
var wmRa = content.CaptureRectArea.Find(_assets.WelkinMoonRo);
|
||||
if (!wmRa.IsEmpty())
|
||||
if (Bv.IsInBlessingOfTheWelkinMoon(content.CaptureRectArea))
|
||||
{
|
||||
GameCaptureRegion.GameRegion1080PPosMove(100, 100);
|
||||
TaskContext.Instance().PostMessageSimulator.LeftButtonClickBackground();
|
||||
|
||||
Reference in New Issue
Block a user