mirror of
https://github.com/wangdage12/Snap.Hutao.git
synced 2026-06-15 20:34:50 +08:00
提升版本号
修复部分操作下添加养成计划时,养成计划页面缓存未刷新的问题 添加部分角色和武器id
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
<Package
|
<Package
|
||||||
Name="Snap.Hutao"
|
Name="Snap.Hutao"
|
||||||
Manufacturer="Millennium Science Technology R-D Inst"
|
Manufacturer="Millennium Science Technology R-D Inst"
|
||||||
Version="1.18.6.0"
|
Version="1.18.7.0"
|
||||||
UpgradeCode="121203be-60cb-408f-92cc-7080f6598e68"
|
UpgradeCode="121203be-60cb-408f-92cc-7080f6598e68"
|
||||||
Language="2052"
|
Language="2052"
|
||||||
Scope="perMachine">
|
Scope="perMachine">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<Project Sdk="WixToolset.Sdk/6.0.2">
|
<Project Sdk="WixToolset.Sdk/6.0.2">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<SuppressIces>ICE03;ICE60</SuppressIces>
|
<SuppressIces>ICE03;ICE60</SuppressIces>
|
||||||
<Platform>x64</Platform>
|
<Platform>x64</Platform>
|
||||||
@@ -9,11 +9,11 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Snap.Hutao\Snap.Hutao.csproj" />
|
<ProjectReference Include="..\Snap.Hutao\Snap.Hutao.csproj" SetPlatform="Platform=x64" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<HarvestDirectory Include="..\Snap.Hutao\bin\Release\net10.0-windows10.0.26100.0\win-x64">
|
<HarvestDirectory Include="..\Snap.Hutao\bin\x64\Release\net10.0-windows10.0.26100.0\win-x64">
|
||||||
<ComponentGroupName>MainAppComponents</ComponentGroupName>
|
<ComponentGroupName>MainAppComponents</ComponentGroupName>
|
||||||
<DirectoryRefId>INSTALLFOLDER</DirectoryRefId>
|
<DirectoryRefId>INSTALLFOLDER</DirectoryRefId>
|
||||||
<SuppressCom>true</SuppressCom>
|
<SuppressCom>true</SuppressCom>
|
||||||
|
|||||||
@@ -129,6 +129,11 @@ internal static class AvatarIds
|
|||||||
public static readonly AvatarId Columbina = 10000125;
|
public static readonly AvatarId Columbina = 10000125;
|
||||||
public static readonly AvatarId Zibai = 10000126;
|
public static readonly AvatarId Zibai = 10000126;
|
||||||
public static readonly AvatarId Illuga = 10000127;
|
public static readonly AvatarId Illuga = 10000127;
|
||||||
|
public static readonly AvatarId Varka = 10000128;
|
||||||
|
public static readonly AvatarId Lohen = 10000129;
|
||||||
|
public static readonly AvatarId Linnea = 10000130;
|
||||||
|
public static readonly AvatarId Nicole = 10000131;
|
||||||
|
public static readonly AvatarId Prune = 10000132;
|
||||||
|
|
||||||
private static readonly FrozenSet<AvatarId> StandardWishIds =
|
private static readonly FrozenSet<AvatarId> StandardWishIds =
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -28,13 +28,11 @@ internal static class WeaponIds
|
|||||||
|
|
||||||
public static readonly FrozenSet<WeaponId> OrangeStandardWishIds =
|
public static readonly FrozenSet<WeaponId> OrangeStandardWishIds =
|
||||||
[
|
[
|
||||||
11501U, 11502U,
|
11501U, 11502U, 11518U, 11519U,
|
||||||
12501U, 12502U,
|
12501U, 12502U,
|
||||||
13502U, 13505U,
|
13502U, 13505U, 13517U,
|
||||||
14501U, 14502U,
|
14501U, 14502U, 14522U, 14523U,
|
||||||
15501U, 15502U,
|
15501U, 15502U, 15515U
|
||||||
15515U, 11518U,
|
|
||||||
14522U, 11519U
|
|
||||||
];
|
];
|
||||||
|
|
||||||
public static bool IsOrangeStandardWish(in WeaponId weaponId)
|
public static bool IsOrangeStandardWish(in WeaponId weaponId)
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<Identity
|
<Identity
|
||||||
Name="60568DGPStudio.SnapHutao"
|
Name="60568DGPStudio.SnapHutao"
|
||||||
Publisher="CN=35C8E923-85DF-49A7-9172-B39DC6312C52"
|
Publisher="CN=35C8E923-85DF-49A7-9172-B39DC6312C52"
|
||||||
Version="1.18.6.0" />
|
Version="1.18.7.0" />
|
||||||
|
|
||||||
<Properties>
|
<Properties>
|
||||||
<DisplayName>Snap Hutao</DisplayName>
|
<DisplayName>Snap Hutao</DisplayName>
|
||||||
|
|||||||
@@ -297,6 +297,7 @@ internal sealed partial class CultivationService : ICultivationService
|
|||||||
}
|
}
|
||||||
|
|
||||||
ArgumentNullException.ThrowIfNull(projects.CurrentItem);
|
ArgumentNullException.ThrowIfNull(projects.CurrentItem);
|
||||||
|
Guid projectId = projects.CurrentItem.InnerId;
|
||||||
|
|
||||||
await taskContext.SwitchToBackgroundAsync();
|
await taskContext.SwitchToBackgroundAsync();
|
||||||
|
|
||||||
@@ -310,7 +311,7 @@ internal sealed partial class CultivationService : ICultivationService
|
|||||||
if (inputConsumption.Strategy is not ConsumptionSaveStrategyKind.CreateNewEntry)
|
if (inputConsumption.Strategy is not ConsumptionSaveStrategyKind.CreateNewEntry)
|
||||||
{
|
{
|
||||||
// Check for existing entries
|
// Check for existing entries
|
||||||
ImmutableArray<CultivateEntry> entries = cultivationRepository.GetCultivateEntryImmutableArrayByProjectIdAndItemId(projects.CurrentItem.InnerId, inputConsumption.ItemId);
|
ImmutableArray<CultivateEntry> entries = cultivationRepository.GetCultivateEntryImmutableArrayByProjectIdAndItemId(projectId, inputConsumption.ItemId);
|
||||||
|
|
||||||
if (entries.Length > 0)
|
if (entries.Length > 0)
|
||||||
{
|
{
|
||||||
@@ -330,6 +331,7 @@ internal sealed partial class CultivationService : ICultivationService
|
|||||||
|
|
||||||
if (inputConsumption.Items is [])
|
if (inputConsumption.Items is [])
|
||||||
{
|
{
|
||||||
|
entryCollectionCache.TryRemove(projectId, out _);
|
||||||
return new(ConsumptionSaveResultKind.Removed);
|
return new(ConsumptionSaveResultKind.Removed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -344,7 +346,7 @@ internal sealed partial class CultivationService : ICultivationService
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
CultivateEntry entry = CultivateEntry.From(projects.CurrentItem.InnerId, inputConsumption.Type, inputConsumption.ItemId);
|
CultivateEntry entry = CultivateEntry.From(projectId, inputConsumption.Type, inputConsumption.ItemId);
|
||||||
entry.RelatedEntryId = inputConsumption.RelatedEntryId;
|
entry.RelatedEntryId = inputConsumption.RelatedEntryId;
|
||||||
cultivationRepository.AddCultivateEntry(entry);
|
cultivationRepository.AddCultivateEntry(entry);
|
||||||
|
|
||||||
@@ -356,7 +358,7 @@ internal sealed partial class CultivationService : ICultivationService
|
|||||||
|
|
||||||
// The consumption save operation is always performed outside cultivation page
|
// The consumption save operation is always performed outside cultivation page
|
||||||
// and without touching the cache. So we have to invalidate the cache manually.
|
// and without touching the cache. So we have to invalidate the cache manually.
|
||||||
entryCollectionCache.TryRemove(projects.CurrentItem.InnerId, out _);
|
entryCollectionCache.TryRemove(projectId, out _);
|
||||||
|
|
||||||
return new(ConsumptionSaveResultKind.Added, entry.InnerId);
|
return new(ConsumptionSaveResultKind.Added, entry.InnerId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<UseWinUI>true</UseWinUI>
|
<UseWinUI>true</UseWinUI>
|
||||||
<UseWPF>False</UseWPF>
|
<UseWPF>False</UseWPF>
|
||||||
<!-- 配置版本号 -->
|
<!-- 配置版本号 -->
|
||||||
<Version>1.18.6.0</Version>
|
<Version>1.18.7.0</Version>
|
||||||
|
|
||||||
<UseWindowsForms>False</UseWindowsForms>
|
<UseWindowsForms>False</UseWindowsForms>
|
||||||
<ImplicitUsings>False</ImplicitUsings>
|
<ImplicitUsings>False</ImplicitUsings>
|
||||||
|
|||||||
@@ -9,13 +9,18 @@ namespace Snap.Hutao.UI.Xaml.Markup;
|
|||||||
[MarkupExtensionReturnType(ReturnType = typeof(string))]
|
[MarkupExtensionReturnType(ReturnType = typeof(string))]
|
||||||
internal sealed partial class ResourceStringExtension : MarkupExtension
|
internal sealed partial class ResourceStringExtension : MarkupExtension
|
||||||
{
|
{
|
||||||
public SHName Name { get; set; }
|
public string? Name { get; set; }
|
||||||
|
|
||||||
public string? CultureName { get; set; }
|
public string? CultureName { get; set; }
|
||||||
|
|
||||||
protected override object ProvideValue()
|
protected override object ProvideValue()
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrEmpty(Name))
|
||||||
|
{
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
CultureInfo cultureInfo = CultureName is not null ? CultureInfo.GetCultureInfo(CultureName) : CultureInfo.CurrentCulture;
|
CultureInfo cultureInfo = CultureName is not null ? CultureInfo.GetCultureInfo(CultureName) : CultureInfo.CurrentCulture;
|
||||||
return SH.ResourceManager.GetString(string.Intern(Name.ToString()), cultureInfo) ?? string.Empty;
|
return SH.ResourceManager.GetString(string.Intern(Name), cultureInfo) ?? string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -230,7 +230,10 @@ internal sealed partial class AvatarPropertyViewModel : Abstraction.ViewModel, I
|
|||||||
if (!await SaveCultivationAsync(batchConsumption.Items.Single(), deltaOptions).ConfigureAwait(false))
|
if (!await SaveCultivationAsync(batchConsumption.Items.Single(), deltaOptions).ConfigureAwait(false))
|
||||||
{
|
{
|
||||||
scopeContext.Messenger.Send(InfoBarMessage.Warning(SH.ViewModelCultivationEntryAddWarning));
|
scopeContext.Messenger.Send(InfoBarMessage.Warning(SH.ViewModelCultivationEntryAddWarning));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
scopeContext.Messenger.Send(CultivationProjectEntriesChangedMessage.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Command("BatchCultivateCommand")]
|
[Command("BatchCultivateCommand")]
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ using Snap.Hutao.Service.Notification;
|
|||||||
using Snap.Hutao.UI.Xaml.Control.AutoSuggestBox;
|
using Snap.Hutao.UI.Xaml.Control.AutoSuggestBox;
|
||||||
using Snap.Hutao.UI.Xaml.Data;
|
using Snap.Hutao.UI.Xaml.Data;
|
||||||
using Snap.Hutao.UI.Xaml.View.Dialog;
|
using Snap.Hutao.UI.Xaml.View.Dialog;
|
||||||
|
using Snap.Hutao.ViewModel.Cultivation;
|
||||||
using System.Collections.Immutable;
|
using System.Collections.Immutable;
|
||||||
using CalculateBatchConsumption = Snap.Hutao.Web.Hoyolab.Takumi.Event.Calculate.BatchConsumption;
|
using CalculateBatchConsumption = Snap.Hutao.Web.Hoyolab.Takumi.Event.Calculate.BatchConsumption;
|
||||||
|
|
||||||
@@ -155,7 +156,8 @@ internal sealed partial class WikiAvatarViewModel : Abstraction.ViewModel
|
|||||||
Strategy = deltaOptions.Strategy,
|
Strategy = deltaOptions.Strategy,
|
||||||
};
|
};
|
||||||
|
|
||||||
InfoBarMessage? message = (await cultivationService.SaveConsumptionAsync(input).ConfigureAwait(false)).Kind switch
|
ConsumptionSaveResult result = await cultivationService.SaveConsumptionAsync(input).ConfigureAwait(false);
|
||||||
|
InfoBarMessage? message = result.Kind switch
|
||||||
{
|
{
|
||||||
ConsumptionSaveResultKind.NoProject => InfoBarMessage.Warning(SH.ViewModelCultivationEntryAddWarning),
|
ConsumptionSaveResultKind.NoProject => InfoBarMessage.Warning(SH.ViewModelCultivationEntryAddWarning),
|
||||||
ConsumptionSaveResultKind.Skipped => InfoBarMessage.Information(SH.ViewModelCultivationConsumptionSaveSkippedHint),
|
ConsumptionSaveResultKind.Skipped => InfoBarMessage.Information(SH.ViewModelCultivationConsumptionSaveSkippedHint),
|
||||||
@@ -168,6 +170,11 @@ internal sealed partial class WikiAvatarViewModel : Abstraction.ViewModel
|
|||||||
{
|
{
|
||||||
messenger.Send(message);
|
messenger.Send(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (result.Kind is not ConsumptionSaveResultKind.NoProject)
|
||||||
|
{
|
||||||
|
messenger.Send(CultivationProjectEntriesChangedMessage.Empty);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (HutaoException ex)
|
catch (HutaoException ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ using Snap.Hutao.Service.Notification;
|
|||||||
using Snap.Hutao.UI.Xaml.Control.AutoSuggestBox;
|
using Snap.Hutao.UI.Xaml.Control.AutoSuggestBox;
|
||||||
using Snap.Hutao.UI.Xaml.Data;
|
using Snap.Hutao.UI.Xaml.Data;
|
||||||
using Snap.Hutao.UI.Xaml.View.Dialog;
|
using Snap.Hutao.UI.Xaml.View.Dialog;
|
||||||
|
using Snap.Hutao.ViewModel.Cultivation;
|
||||||
using System.Collections.Immutable;
|
using System.Collections.Immutable;
|
||||||
using CalculateBatchConsumption = Snap.Hutao.Web.Hoyolab.Takumi.Event.Calculate.BatchConsumption;
|
using CalculateBatchConsumption = Snap.Hutao.Web.Hoyolab.Takumi.Event.Calculate.BatchConsumption;
|
||||||
|
|
||||||
@@ -146,7 +147,8 @@ internal sealed partial class WikiWeaponViewModel : Abstraction.ViewModel
|
|||||||
Strategy = deltaOptions.Strategy,
|
Strategy = deltaOptions.Strategy,
|
||||||
};
|
};
|
||||||
|
|
||||||
InfoBarMessage? message = (await cultivationService.SaveConsumptionAsync(input).ConfigureAwait(false)).Kind switch
|
ConsumptionSaveResult result = await cultivationService.SaveConsumptionAsync(input).ConfigureAwait(false);
|
||||||
|
InfoBarMessage? message = result.Kind switch
|
||||||
{
|
{
|
||||||
ConsumptionSaveResultKind.NoProject => InfoBarMessage.Warning(SH.ViewModelCultivationEntryAddWarning),
|
ConsumptionSaveResultKind.NoProject => InfoBarMessage.Warning(SH.ViewModelCultivationEntryAddWarning),
|
||||||
ConsumptionSaveResultKind.Skipped => InfoBarMessage.Information(SH.ViewModelCultivationConsumptionSaveSkippedHint),
|
ConsumptionSaveResultKind.Skipped => InfoBarMessage.Information(SH.ViewModelCultivationConsumptionSaveSkippedHint),
|
||||||
@@ -159,6 +161,11 @@ internal sealed partial class WikiWeaponViewModel : Abstraction.ViewModel
|
|||||||
{
|
{
|
||||||
messenger.Send(message);
|
messenger.Send(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (result.Kind is not ConsumptionSaveResultKind.NoProject)
|
||||||
|
{
|
||||||
|
messenger.Send(CultivationProjectEntriesChangedMessage.Empty);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (HutaoException ex)
|
catch (HutaoException ex)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user