1
0
mirror of synced 2025-01-31 12:23:50 +01:00

Remove unused

This commit is contained in:
TLH 2022-08-27 23:15:32 +09:00
parent b4d612e015
commit 066b115c84
4 changed files with 22 additions and 28 deletions

View File

@ -1,8 +1,9 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TaikoLocalServer", "TaikoLocalServer\TaikoLocalServer.csproj", "{98FDA12C-CD3C-42D0-BEBE-4E809E6E41AC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntDashboard", "AntDashboard\AntDashboard.csproj", "{BBB35D52-6635-4DD7-BB6D-A4EA534E0CEB}"
# Visual Studio Version 17
VisualStudioVersion = 17.0.32112.339
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TaikoLocalServer", "TaikoLocalServer\TaikoLocalServer.csproj", "{98FDA12C-CD3C-42D0-BEBE-4E809E6E41AC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -14,9 +15,11 @@ Global
{98FDA12C-CD3C-42D0-BEBE-4E809E6E41AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{98FDA12C-CD3C-42D0-BEBE-4E809E6E41AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{98FDA12C-CD3C-42D0-BEBE-4E809E6E41AC}.Release|Any CPU.Build.0 = Release|Any CPU
{BBB35D52-6635-4DD7-BB6D-A4EA534E0CEB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BBB35D52-6635-4DD7-BB6D-A4EA534E0CEB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BBB35D52-6635-4DD7-BB6D-A4EA534E0CEB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BBB35D52-6635-4DD7-BB6D-A4EA534E0CEB}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9CF7BC99-7D07-47BA-A735-B292D48174C4}
EndGlobalSection
EndGlobal

View File

@ -89,7 +89,7 @@ public class BaidController:ControllerBase
}
var costumeData = new List<uint>{ 0, 1, 1, 1, 1 };
var costumeData = new List<uint>{ 0, 0, 0, 0, 0 };
try
{
costumeData = JsonSerializer.Deserialize<List<uint>>(userData.CostumeData);
@ -101,7 +101,7 @@ public class BaidController:ControllerBase
if (costumeData == null || costumeData.Count < 5)
{
logger.LogWarning("Costume data is null or count less than 5!");
costumeData = new List<uint> { 0, 1, 1, 1, 1 };
costumeData = new List<uint> { 0, 0, 0, 0, 0 };
}
var costumeFlag = new byte[10];
@ -128,11 +128,11 @@ public class BaidController:ControllerBase
ColorLimb = 3,
AryCostumedata = new BAIDResponse.CostumeData
{
Costume1 = ValueHelpers.GetNonZeroValue(costumeData[0]),
Costume2 = ValueHelpers.GetNonZeroValue(costumeData[1]),
Costume3 = ValueHelpers.GetNonZeroValue(costumeData[2]),
Costume4 = ValueHelpers.GetNonZeroValue(costumeData[3]),
Costume5 = ValueHelpers.GetNonZeroValue(costumeData[4])
Costume1 = costumeData[0],
Costume2 = costumeData[1],
Costume3 = costumeData[2],
Costume4 = costumeData[3],
Costume5 = costumeData[4]
},
CostumeFlg1 = costumeFlag,
CostumeFlg2 = costumeFlag,

View File

@ -47,11 +47,11 @@ public class PlayResultController : ControllerBase
userdata.TitlePlateId = playResultData.TitleplateId;
var costumeData = new List<uint>
{
ValueHelpers.GetNonZeroValue(playResultData.AryCurrentCostume.Costume1),
ValueHelpers.GetNonZeroValue(playResultData.AryCurrentCostume.Costume2),
ValueHelpers.GetNonZeroValue(playResultData.AryCurrentCostume.Costume3),
ValueHelpers.GetNonZeroValue(playResultData.AryCurrentCostume.Costume4),
ValueHelpers.GetNonZeroValue(playResultData.AryCurrentCostume.Costume5)
playResultData.AryCurrentCostume.Costume1,
playResultData.AryCurrentCostume.Costume2,
playResultData.AryCurrentCostume.Costume3,
playResultData.AryCurrentCostume.Costume4,
playResultData.AryCurrentCostume.Costume5
};
userdata.CostumeData = JsonSerializer.Serialize(costumeData);

View File

@ -1,9 +0,0 @@
namespace TaikoLocalServer.Utils;
public static class ValueHelpers
{
public static uint GetNonZeroValue(uint val)
{
return val == 0 ? 1 : val;
}
}