mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-03-15 07:43:20 +08:00
优化快速购买时候,对洞天的识别率
This commit is contained in:
@@ -16,8 +16,9 @@ public class QuickBuyAssets : BaseAssets<QuickBuyAssets>
|
||||
Name = "SereniteaPotCoin",
|
||||
RecognitionType = RecognitionTypes.TemplateMatch,
|
||||
TemplateImageMat = GameTaskManager.LoadAssetImage("QuickBuy", "SereniteaPotCoin.png"),
|
||||
RegionOfInterest = new Rect((int)(1620 * AssetScale),(int)(30 * AssetScale),(int)(50 * AssetScale),(int)(40 * AssetScale)),
|
||||
DrawOnWindow = false
|
||||
RegionOfInterest = new Rect((int)(1610 * AssetScale),(int)(28 * AssetScale),(int)(160 * AssetScale),(int)(45 * AssetScale)),
|
||||
Use3Channels = true,
|
||||
DrawOnWindow = true
|
||||
}.InitTemplate();
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ using BetterGenshinImpact.Core.Simulator;
|
||||
using BetterGenshinImpact.GameTask.Common;
|
||||
using BetterGenshinImpact.GameTask.Model.Area;
|
||||
using BetterGenshinImpact.GameTask.QuickBuy.Assets;
|
||||
using BetterGenshinImpact.View.Drawable;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Wpf.Ui.Violeta.Controls;
|
||||
|
||||
@@ -52,6 +53,7 @@ public class QuickBuyTask
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// 点击购买/兑换 右下225x60
|
||||
GameCaptureRegion.GameRegionClick((size, scale) => (size.Width - 225 * scale, size.Height - 60 * scale));
|
||||
TaskControl.CheckAndSleep(100); // 等待窗口弹出
|
||||
@@ -78,5 +80,9 @@ public class QuickBuyTask
|
||||
{
|
||||
TaskControl.Logger.LogWarning(e.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
VisionContext.Instance().DrawContent.ClearAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user