1.16.3 release candidate 1

This commit is contained in:
Lightczx
2023-05-10 21:19:26 +08:00
parent e147b8773f
commit 6b5477ba44
9 changed files with 18 additions and 51 deletions

View File

@@ -44,10 +44,10 @@ internal sealed class GachaEvent
/// <summary>
/// 五星列表
/// </summary>
public List<string> UpOrangeList { get; set; } = default!;
public List<int> UpOrangeList { get; set; } = default!;
/// <summary>
/// 四星列表
/// </summary>
public List<string> UpPurpleList { get; set; } = default!;
public List<int> UpPurpleList { get; set; } = default!;
}

View File

@@ -38,13 +38,13 @@ internal sealed class HistoryWishBuilder
if (configType is GachaConfigType.AvatarEventWish or GachaConfigType.AvatarEventWish2)
{
orangeUpCounter = gachaEvent.UpOrangeList.Select(name => context.NameAvatarMap[name]).ToDictionary(a => (IStatisticsItemSource)a, a => 0);
purpleUpCounter = gachaEvent.UpPurpleList.Select(name => context.NameAvatarMap[name]).ToDictionary(a => (IStatisticsItemSource)a, a => 0);
orangeUpCounter = gachaEvent.UpOrangeList.Select(id => context.IdAvatarMap[id]).ToDictionary(a => (IStatisticsItemSource)a, a => 0);
purpleUpCounter = gachaEvent.UpPurpleList.Select(id => context.IdAvatarMap[id]).ToDictionary(a => (IStatisticsItemSource)a, a => 0);
}
else if (configType is GachaConfigType.WeaponEventWish)
{
orangeUpCounter = gachaEvent.UpOrangeList.Select(name => context.NameWeaponMap[name]).ToDictionary(w => (IStatisticsItemSource)w, w => 0);
purpleUpCounter = gachaEvent.UpPurpleList.Select(name => context.NameWeaponMap[name]).ToDictionary(w => (IStatisticsItemSource)w, w => 0);
orangeUpCounter = gachaEvent.UpOrangeList.Select(id => context.IdWeaponMap[id]).ToDictionary(w => (IStatisticsItemSource)w, w => 0);
purpleUpCounter = gachaEvent.UpPurpleList.Select(id => context.IdWeaponMap[id]).ToDictionary(w => (IStatisticsItemSource)w, w => 0);
}
}

View File

@@ -297,7 +297,7 @@ internal sealed partial class GameService : IGameService
if (isAdvancedOptionsAllowed && launchOptions.UnlockFps)
{
await ProcessInterop.UnlockFpsAsync(game, launchOptions).ConfigureAwait(false);
await ProcessInterop.UnlockFpsAsync(serviceProvider, game).ConfigureAwait(false);
}
else
{

View File

@@ -47,12 +47,12 @@ internal static class ProcessInterop
/// <summary>
/// 解锁帧率
/// </summary>
/// <param name="serviceProvider">服务提供器</param>
/// <param name="game">游戏进程</param>
/// <param name="options">启动选项</param>
/// <returns>任务</returns>
public static Task UnlockFpsAsync(Process game, LaunchOptions options)
public static Task UnlockFpsAsync(IServiceProvider serviceProvider, Process game)
{
IGameFpsUnlocker unlocker = new GameFpsUnlocker(game);
IGameFpsUnlocker unlocker = serviceProvider.CreateInstance<GameFpsUnlocker>(game);
TimeSpan findModuleDelay = TimeSpan.FromMilliseconds(100);
TimeSpan findModuleLimit = TimeSpan.FromMilliseconds(10000);

View File

@@ -32,9 +32,11 @@ internal sealed class GameFpsUnlocker : IGameFpsUnlocker
/// 解锁器需要在管理员模式下才能正确的完成解锁操作,
/// 非管理员模式不能解锁
/// </summary>
/// <param name="serviceProvider">服务提供器</param>
/// <param name="gameProcess">游戏进程</param>
public GameFpsUnlocker(Process gameProcess)
public GameFpsUnlocker(IServiceProvider serviceProvider, Process gameProcess)
{
launchOptions = serviceProvider.GetRequiredService<LaunchOptions>();
this.gameProcess = gameProcess;
}

View File

@@ -49,7 +49,7 @@ internal sealed partial class MetadataService
/// <inheritdoc/>
public ValueTask<List<GachaEvent>> GetGachaEventsAsync(CancellationToken token = default)
{
return FromCacheOrFileAsync<List<GachaEvent>>("GachaEvent", token);
return FromCacheOrFileAsync<List<GachaEvent>>("GachaEvent2", token);
}
/// <inheritdoc/>

View File

@@ -173,12 +173,12 @@
<shvca:AchievementCard/>
<shvca:DailyNoteCard/>
<Border Style="{StaticResource BorderCardStyle}">
<!--<Border Style="{StaticResource BorderCardStyle}">
<TextBlock Text="养成计划"/>
</Border>
<Border Style="{StaticResource BorderCardStyle}">
<TextBlock Text="深渊"/>
</Border>
</Border>-->
</cwucont:AdaptiveGridView>
</StackPanel>

View File

@@ -65,7 +65,7 @@ internal sealed partial class AnnouncementViewModel : Abstraction.ViewModel
else if (rand >= 6 && rand < 57)
{
// TODO: retrieve days
GreetingText = string.Format(SH.ViewPageHomeGreetingTextEpic1, 0);
// GreetingText = string.Format(SH.ViewPageHomeGreetingTextEpic1, 0);
}
else if (rand >= 57 && rand < 1000)
{
@@ -73,7 +73,7 @@ internal sealed partial class AnnouncementViewModel : Abstraction.ViewModel
if (rand == 0)
{
// TODO: impl game launch times
GreetingText = string.Format(SH.ViewPageHomeGreetingTextCommon1, 0);
// GreetingText = string.Format(SH.ViewPageHomeGreetingTextCommon1, 0);
}
else if (rand == 1)
{

View File

@@ -1,35 +0,0 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
namespace Snap.Hutao.ViewModel.Home;
/// <summary>
/// 欢迎语等级
/// </summary>
internal enum GreetingTier
{
/// <summary>
/// 默认
/// </summary>
Default,
/// <summary>
/// 普通
/// </summary>
Common,
/// <summary>
/// 稀有
/// </summary>
Rare,
/// <summary>
/// 史诗
/// </summary>
Epic,
/// <summary>
/// 传说
/// </summary>
Legendary,
}