mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-05-27 10:15:50 +08:00
feat: 开门时适龄提示自动关闭 (#2948)
This commit is contained in:
@@ -35,6 +35,7 @@ public class GameLoadingTrigger : ITaskTrigger
|
||||
public bool IsBackgroundRunning => true;
|
||||
|
||||
private readonly GameLoadingAssets _assets;
|
||||
private readonly ElementAssets _elementAssets;
|
||||
|
||||
private readonly GenshinStartConfig _config = TaskContext.Instance().Config.GenshinStartConfig;
|
||||
private static ILogger<GameLoadingTrigger> _logger = App.GetLogger<GameLoadingTrigger>();
|
||||
@@ -61,6 +62,7 @@ public class GameLoadingTrigger : ITaskTrigger
|
||||
{
|
||||
GameLoadingAssets.DestroyInstance();
|
||||
_assets = GameLoadingAssets.Instance;
|
||||
_elementAssets = ElementAssets.Instance;
|
||||
}
|
||||
|
||||
public void InnerSetEnabled(bool enabled)
|
||||
@@ -247,6 +249,7 @@ public class GameLoadingTrigger : ITaskTrigger
|
||||
InnerSetEnabled(false);
|
||||
return;
|
||||
}
|
||||
|
||||
// 成功进入游戏判断
|
||||
if (Bv.IsInMainUi(content.CaptureRectArea) || Bv.IsInAnyClosableUi(content.CaptureRectArea) || Bv.IsInDomain(content.CaptureRectArea))
|
||||
{
|
||||
@@ -254,6 +257,13 @@ public class GameLoadingTrigger : ITaskTrigger
|
||||
InnerSetEnabled(false);
|
||||
return;
|
||||
}
|
||||
|
||||
// 适龄提示窗口自动关闭
|
||||
var agePopup = content.CaptureRectArea.Find(_elementAssets.BtnWhiteConfirm);
|
||||
if (!agePopup.IsEmpty())
|
||||
{
|
||||
agePopup.Click();
|
||||
}
|
||||
|
||||
// B服判断
|
||||
if (!IsBiliJudged)
|
||||
|
||||
Reference in New Issue
Block a user