Files
Shigure/UI/ModuleDisplay.cs
waynebian01 e7cdbe6f2a feat: update warrior keymap and add priest keymap with new skills and hotkeys
- Modified warrior keymap to change the unit for "拳击" and ensure proper formatting.
- Introduced a new ReservedUnit class to manage reserved units and their display names.
- Added a comprehensive priest keymap with multiple skills and corresponding hotkeys, enhancing gameplay functionality.
2026-07-30 01:32:16 +08:00

45 lines
1.4 KiB
C#

namespace Shigure;
internal static class ModuleDisplay
{
public static string FormatListItem(ModuleDefinition module)
{
return module.Name;
}
public static string FormatMatch(ModuleMatch match)
{
return $"{FormatMatchValue(match.ClassId)}/{FormatMatchValue(match.SpecId)}/{FormatPartyTypeValue(match.PartyType)}/{FormatMatchValue(match.HeroTalent)}";
}
public static string FormatState(RenderSnapshot snapshot)
{
var classText = snapshot.ClassName is null
? FormatMatchValue(snapshot.ClassId)
: $"{snapshot.ClassName} ({snapshot.ClassId})";
var specText = snapshot.SpecName is null
? FormatMatchValue(snapshot.SpecId)
: $"{snapshot.SpecName} ({snapshot.SpecId})";
var partyType = snapshot.State?.GetInt("队伍类型");
var heroTalent = snapshot.State?.GetInt("英雄天赋");
return $"{classText} / {specText} / {FormatPartyTypeValue(partyType?.ToString())} / {FormatMatchValue(heroTalent)}";
}
private static string FormatMatchValue(int? value)
{
return value?.ToString() ?? "*";
}
private static string FormatPartyTypeValue(string? value)
{
return ModuleMatch.NormalizePartyTypeValue(value) switch
{
null => "*",
"0" => "单人",
"1-40" => "团队",
"46" => "队伍",
var other => other
};
}
}