mirror of
https://github.com/wangdage12/Snap.Hutao.git
synced 2026-06-06 09:51:06 +08:00
提升版本号
修复部分操作下添加养成计划时,养成计划页面缓存未刷新的问题 添加部分角色和武器id
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<Package
|
||||
Name="Snap.Hutao"
|
||||
Manufacturer="Millennium Science Technology R-D Inst"
|
||||
Version="1.18.6.0"
|
||||
Version="1.18.7.0"
|
||||
UpgradeCode="121203be-60cb-408f-92cc-7080f6598e68"
|
||||
Language="2052"
|
||||
Scope="perMachine">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<Project Sdk="WixToolset.Sdk/6.0.2">
|
||||
<Project Sdk="WixToolset.Sdk/6.0.2">
|
||||
<PropertyGroup>
|
||||
<SuppressIces>ICE03;ICE60</SuppressIces>
|
||||
<Platform>x64</Platform>
|
||||
@@ -9,11 +9,11 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Snap.Hutao\Snap.Hutao.csproj" />
|
||||
<ProjectReference Include="..\Snap.Hutao\Snap.Hutao.csproj" SetPlatform="Platform=x64" />
|
||||
</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>
|
||||
<DirectoryRefId>INSTALLFOLDER</DirectoryRefId>
|
||||
<SuppressCom>true</SuppressCom>
|
||||
|
||||
@@ -129,6 +129,11 @@ internal static class AvatarIds
|
||||
public static readonly AvatarId Columbina = 10000125;
|
||||
public static readonly AvatarId Zibai = 10000126;
|
||||
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 =
|
||||
[
|
||||
|
||||
@@ -28,13 +28,11 @@ internal static class WeaponIds
|
||||
|
||||
public static readonly FrozenSet<WeaponId> OrangeStandardWishIds =
|
||||
[
|
||||
11501U, 11502U,
|
||||
11501U, 11502U, 11518U, 11519U,
|
||||
12501U, 12502U,
|
||||
13502U, 13505U,
|
||||
14501U, 14502U,
|
||||
15501U, 15502U,
|
||||
15515U, 11518U,
|
||||
14522U, 11519U
|
||||
13502U, 13505U, 13517U,
|
||||
14501U, 14502U, 14522U, 14523U,
|
||||
15501U, 15502U, 15515U
|
||||
];
|
||||
|
||||
public static bool IsOrangeStandardWish(in WeaponId weaponId)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<Identity
|
||||
Name="60568DGPStudio.SnapHutao"
|
||||
Publisher="CN=35C8E923-85DF-49A7-9172-B39DC6312C52"
|
||||
Version="1.18.6.0" />
|
||||
Version="1.18.7.0" />
|
||||
|
||||
<Properties>
|
||||
<DisplayName>Snap Hutao</DisplayName>
|
||||
|
||||
@@ -297,6 +297,7 @@ internal sealed partial class CultivationService : ICultivationService
|
||||
}
|
||||
|
||||
ArgumentNullException.ThrowIfNull(projects.CurrentItem);
|
||||
Guid projectId = projects.CurrentItem.InnerId;
|
||||
|
||||
await taskContext.SwitchToBackgroundAsync();
|
||||
|
||||
@@ -310,7 +311,7 @@ internal sealed partial class CultivationService : ICultivationService
|
||||
if (inputConsumption.Strategy is not ConsumptionSaveStrategyKind.CreateNewEntry)
|
||||
{
|
||||
// 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)
|
||||
{
|
||||
@@ -330,6 +331,7 @@ internal sealed partial class CultivationService : ICultivationService
|
||||
|
||||
if (inputConsumption.Items is [])
|
||||
{
|
||||
entryCollectionCache.TryRemove(projectId, out _);
|
||||
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;
|
||||
cultivationRepository.AddCultivateEntry(entry);
|
||||
|
||||
@@ -356,7 +358,7 @@ internal sealed partial class CultivationService : ICultivationService
|
||||
|
||||
// The consumption save operation is always performed outside cultivation page
|
||||
// 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);
|
||||
}
|
||||
@@ -685,4 +687,4 @@ internal sealed partial class CultivationService : ICultivationService
|
||||
&& li.SkillELevelFrom == li.SkillELevelTo
|
||||
&& li.SkillQLevelFrom == li.SkillQLevelTo;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<UseWinUI>true</UseWinUI>
|
||||
<UseWPF>False</UseWPF>
|
||||
<!-- 配置版本号 -->
|
||||
<Version>1.18.6.0</Version>
|
||||
<Version>1.18.7.0</Version>
|
||||
|
||||
<UseWindowsForms>False</UseWindowsForms>
|
||||
<ImplicitUsings>False</ImplicitUsings>
|
||||
|
||||
@@ -9,13 +9,18 @@ namespace Snap.Hutao.UI.Xaml.Markup;
|
||||
[MarkupExtensionReturnType(ReturnType = typeof(string))]
|
||||
internal sealed partial class ResourceStringExtension : MarkupExtension
|
||||
{
|
||||
public SHName Name { get; set; }
|
||||
public string? Name { get; set; }
|
||||
|
||||
public string? CultureName { get; set; }
|
||||
|
||||
protected override object ProvideValue()
|
||||
{
|
||||
if (string.IsNullOrEmpty(Name))
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
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))
|
||||
{
|
||||
scopeContext.Messenger.Send(InfoBarMessage.Warning(SH.ViewModelCultivationEntryAddWarning));
|
||||
return;
|
||||
}
|
||||
|
||||
scopeContext.Messenger.Send(CultivationProjectEntriesChangedMessage.Empty);
|
||||
}
|
||||
|
||||
[Command("BatchCultivateCommand")]
|
||||
@@ -412,4 +415,4 @@ internal sealed partial class AvatarPropertyViewModel : Abstraction.ViewModel, I
|
||||
Summary.Avatars.MoveCurrentToFirst();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ using Snap.Hutao.Service.Notification;
|
||||
using Snap.Hutao.UI.Xaml.Control.AutoSuggestBox;
|
||||
using Snap.Hutao.UI.Xaml.Data;
|
||||
using Snap.Hutao.UI.Xaml.View.Dialog;
|
||||
using Snap.Hutao.ViewModel.Cultivation;
|
||||
using System.Collections.Immutable;
|
||||
using CalculateBatchConsumption = Snap.Hutao.Web.Hoyolab.Takumi.Event.Calculate.BatchConsumption;
|
||||
|
||||
@@ -155,7 +156,8 @@ internal sealed partial class WikiAvatarViewModel : Abstraction.ViewModel
|
||||
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.Skipped => InfoBarMessage.Information(SH.ViewModelCultivationConsumptionSaveSkippedHint),
|
||||
@@ -168,6 +170,11 @@ internal sealed partial class WikiAvatarViewModel : Abstraction.ViewModel
|
||||
{
|
||||
messenger.Send(message);
|
||||
}
|
||||
|
||||
if (result.Kind is not ConsumptionSaveResultKind.NoProject)
|
||||
{
|
||||
messenger.Send(CultivationProjectEntriesChangedMessage.Empty);
|
||||
}
|
||||
}
|
||||
catch (HutaoException ex)
|
||||
{
|
||||
@@ -225,4 +232,4 @@ internal sealed partial class WikiAvatarViewModel : Abstraction.ViewModel
|
||||
Avatars.MoveCurrentToFirst();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ using Snap.Hutao.Service.Notification;
|
||||
using Snap.Hutao.UI.Xaml.Control.AutoSuggestBox;
|
||||
using Snap.Hutao.UI.Xaml.Data;
|
||||
using Snap.Hutao.UI.Xaml.View.Dialog;
|
||||
using Snap.Hutao.ViewModel.Cultivation;
|
||||
using System.Collections.Immutable;
|
||||
using CalculateBatchConsumption = Snap.Hutao.Web.Hoyolab.Takumi.Event.Calculate.BatchConsumption;
|
||||
|
||||
@@ -146,7 +147,8 @@ internal sealed partial class WikiWeaponViewModel : Abstraction.ViewModel
|
||||
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.Skipped => InfoBarMessage.Information(SH.ViewModelCultivationConsumptionSaveSkippedHint),
|
||||
@@ -159,6 +161,11 @@ internal sealed partial class WikiWeaponViewModel : Abstraction.ViewModel
|
||||
{
|
||||
messenger.Send(message);
|
||||
}
|
||||
|
||||
if (result.Kind is not ConsumptionSaveResultKind.NoProject)
|
||||
{
|
||||
messenger.Send(CultivationProjectEntriesChangedMessage.Empty);
|
||||
}
|
||||
}
|
||||
catch (HutaoException ex)
|
||||
{
|
||||
@@ -200,4 +207,4 @@ internal sealed partial class WikiWeaponViewModel : Abstraction.ViewModel
|
||||
Weapons.MoveCurrentToFirst();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user