Skip to content

Commit

Permalink
add required field for API
Browse files Browse the repository at this point in the history
  • Loading branch information
Lightczx committed Dec 24, 2022
1 parent fb77bd2 commit 26e6d20
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Licensed under the MIT license.

using System.IO;
using Windows.ApplicationModel;

namespace Snap.Hutao.Context.FileSystem.Location;

Expand All @@ -19,7 +20,10 @@ public string GetPath()
if (string.IsNullOrEmpty(path))
{
string myDocument = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
path = Path.GetFullPath(Path.Combine(myDocument, "Hutao"));

// 将测试版与正式版的文件目录分离
string folderName = Package.Current.PublisherDisplayName == "DGP Studio CI" ? "HutaoAlpha" : "Hutao";
path = Path.GetFullPath(Path.Combine(myDocument, folderName));
}

return path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@ public static void RedirectActivationTo(this AppInstance appInstance, AppActivat
});

ReadOnlySpan<HANDLE> handles = new(in redirectEventHandle);

// non-blocking
CoWaitForMultipleObjects((uint)CWMO_FLAGS.CWMO_DEFAULT, INFINITE, handles, out uint _);
}

private static unsafe HANDLE UnsafeCreateEvent()
{
return CreateEvent((SECURITY_ATTRIBUTES*)null, true, false, null);
return CreateEvent(default(SECURITY_ATTRIBUTES*), true, false, null);
}
}
2 changes: 1 addition & 1 deletion src/Snap.Hutao/Snap.Hutao/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<Identity
Name="7f0db578-026f-4e0b-a75b-d5d06bb0a74d"
Publisher="CN=DGP Studio"
Version="1.2.15.0" />
Version="1.2.16.0" />

<Properties>
<DisplayName>胡桃</DisplayName>
Expand Down
15 changes: 15 additions & 0 deletions src/Snap.Hutao/Snap.Hutao/Web/Hutao/Model/Overview.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,26 @@ public class Overview
/// </summary>
public int SpiralAbyssTotal { get; set; }

/// <summary>
/// 通关玩家总数
/// </summary>
public int SpiralAbyssPassed { get; set; }

/// <summary>
/// 总星数
/// </summary>
public int SpiralAbyssStarTotal { get; set; }

/// <summary>
/// 满星数
/// </summary>
public int SpiralAbyssFullStar { get; set; }

/// <summary>
/// 总战斗次数
/// </summary>
public long SpiralAbyssBattleTotal { get; set; }

/// <summary>
/// 统计时间
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ public class SimpleSpiralAbyss
public SimpleSpiralAbyss(SpiralAbyss spiralAbyss)
{
ScheduleId = spiralAbyss.ScheduleId;
TotalBattleTimes = spiralAbyss.TotalBattleTimes;
TotalWinTimes = spiralAbyss.TotalWinTimes;
Damage = SimpleRank.FromRank(spiralAbyss.DamageRank.SingleOrDefault());
TakeDamage = SimpleRank.FromRank(spiralAbyss.TakeDamageRank.SingleOrDefault());
Floors = spiralAbyss.Floors.Select(f => new SimpleFloor(f));
Expand All @@ -27,6 +29,16 @@ public SimpleSpiralAbyss(SpiralAbyss spiralAbyss)
/// </summary>
public int ScheduleId { get; set; }

/// <summary>
/// 总战斗次数
/// </summary>
public int TotalBattleTimes { get; set; }

/// <summary>
/// 总战斗胜利次数
/// </summary>
public int TotalWinTimes { get; set; }

/// <summary>
/// 造成伤害
/// </summary>
Expand Down

0 comments on commit 26e6d20

Please sign in to comment.