Remove unused imports
Adjust default values Implement recent songs
This commit is contained in:
parent
4907466774
commit
42db23ce17
@ -2,6 +2,8 @@
|
||||
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}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -12,5 +14,9 @@ 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
|
||||
EndGlobal
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
public enum Difficulty : uint
|
||||
{
|
||||
None = 0,
|
||||
Easy = 1,
|
||||
Normal = 2,
|
||||
Hard = 3,
|
||||
|
@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using TaikoLocalServer.Common;
|
||||
using TaikoLocalServer.Entities;
|
||||
|
||||
|
@ -115,9 +115,9 @@ public class BaidController:ControllerBase
|
||||
MydonName = userData.MyDonName,
|
||||
Title = userData.Title,
|
||||
TitleplateId = userData.TitlePlateId,
|
||||
ColorFace = 1,
|
||||
ColorFace = 0,
|
||||
ColorBody = 1,
|
||||
ColorLimb = 1,
|
||||
ColorLimb = 3,
|
||||
AryCostumedata = new BAIDResponse.CostumeData
|
||||
{
|
||||
Costume1 = ValueHelpers.GetNonZeroValue(costumeData[0]),
|
||||
@ -142,7 +142,7 @@ public class BaidController:ControllerBase
|
||||
AryScoreRankCounts = scoreRankCount,
|
||||
IsDispAchievementOn = userData.DisplayAchievement,
|
||||
DispAchievementType = (uint)userData.AchievementDisplayDifficulty,
|
||||
IsDispAchievementTypeSet = false,
|
||||
IsDispAchievementTypeSet = true,
|
||||
LastPlayMode = 0,
|
||||
IsDispSouuchiOn = true,
|
||||
AiRank = 0,
|
||||
|
@ -1,6 +1,4 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/challengecompe.php")]
|
||||
[ApiController]
|
||||
|
@ -1,7 +1,4 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Specialized;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using TaikoLocalServer.Common;
|
||||
using TaikoLocalServer.Common;
|
||||
using TaikoLocalServer.Common.Enums;
|
||||
using TaikoLocalServer.Context;
|
||||
using TaikoLocalServer.Utils;
|
||||
|
@ -1,6 +1,4 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/executeqrcode.php")]
|
||||
[ApiController]
|
||||
|
@ -1,6 +1,4 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/getaidata.php")]
|
||||
[ApiController]
|
||||
|
@ -1,6 +1,4 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/getaiscore.php")]
|
||||
[ApiController]
|
||||
|
@ -1,6 +1,4 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/getapplicationurl.php")]
|
||||
[ApiController]
|
||||
|
@ -1,6 +1,4 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/getdanodai.php")]
|
||||
[ApiController]
|
||||
|
@ -1,6 +1,4 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
|
@ -1,6 +1,4 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/getfolder.php")]
|
||||
[ApiController]
|
||||
|
@ -1,5 +1,4 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using TaikoLocalServer.Common;
|
||||
using TaikoLocalServer.Common;
|
||||
using TaikoLocalServer.Common.Enums;
|
||||
using TaikoLocalServer.Context;
|
||||
using TaikoLocalServer.Utils;
|
||||
|
@ -1,6 +1,4 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/getshopfolder.php")]
|
||||
[ApiController]
|
||||
|
@ -1,6 +1,4 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/getsongintroduction.php")]
|
||||
[ApiController]
|
||||
|
@ -1,6 +1,4 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Swan.Extensions;
|
||||
using TaikoLocalServer.Common;
|
||||
using TaikoLocalServer.Common;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
|
@ -1,6 +1,4 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/gettokencount.php")]
|
||||
[ApiController]
|
||||
|
@ -1,7 +1,4 @@
|
||||
using System.Collections;
|
||||
using Swan.Extensions;
|
||||
using TaikoLocalServer.Common;
|
||||
using TaikoLocalServer.Utils;
|
||||
using TaikoLocalServer.Common;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
|
@ -1,6 +1,4 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Swan.Formatters;
|
||||
using TaikoLocalServer.Models;
|
||||
using TaikoLocalServer.Models;
|
||||
using TaikoLocalServer.Utils;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
@ -1,8 +1,6 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using TaikoLocalServer.Common.Enums;
|
||||
using TaikoLocalServer.Common.Enums;
|
||||
using TaikoLocalServer.Context;
|
||||
using TaikoLocalServer.Entities;
|
||||
using TaikoLocalServer.Utils;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
@ -38,7 +36,7 @@ public class MyDonEntryController : ControllerBase
|
||||
MyDonName = request.MydonName,
|
||||
DisplayDan = false,
|
||||
DisplayAchievement = true,
|
||||
AchievementDisplayDifficulty = Difficulty.Easy
|
||||
AchievementDisplayDifficulty = Difficulty.None
|
||||
});
|
||||
context.SaveChanges();
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
using System.Globalization;
|
||||
using System.Text.Json;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using ProtoBuf;
|
||||
using TaikoLocalServer.Common;
|
||||
using TaikoLocalServer.Common.Enums;
|
||||
|
@ -1,6 +1,4 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Swan.Formatters;
|
||||
using TaikoLocalServer.Models;
|
||||
using TaikoLocalServer.Models;
|
||||
using TaikoLocalServer.Utils;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
@ -1,6 +1,4 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/rewarditem.php")]
|
||||
[ApiController]
|
||||
|
@ -1,9 +1,6 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
using TaikoLocalServer.Common.Enums;
|
||||
using TaikoLocalServer.Common.Enums;
|
||||
using TaikoLocalServer.Context;
|
||||
using TaikoLocalServer.Entities;
|
||||
using TaikoLocalServer.Models;
|
||||
using TaikoLocalServer.Utils;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
@ -1,6 +1,4 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/songpurchase.php")]
|
||||
[ApiController]
|
||||
|
@ -1,6 +1,4 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/tournamentcheck.php")]
|
||||
[ApiController]
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using TaikoLocalServer.Common;
|
||||
using TaikoLocalServer.Context;
|
||||
using TaikoLocalServer.Utils;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
@ -10,8 +10,13 @@ namespace TaikoLocalServer.Controllers;
|
||||
public class UserDataController : ControllerBase
|
||||
{
|
||||
private readonly ILogger<UserDataController> logger;
|
||||
public UserDataController(ILogger<UserDataController> logger) {
|
||||
|
||||
private readonly TaikoDbContext context;
|
||||
|
||||
public UserDataController(ILogger<UserDataController> logger, TaikoDbContext context)
|
||||
{
|
||||
this.logger = logger;
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
@ -37,17 +42,32 @@ public class UserDataController : ControllerBase
|
||||
bitSet.Set((int)music, true);
|
||||
}
|
||||
bitSet.CopyTo(uraSongArray, 0);
|
||||
|
||||
|
||||
var toneArray = new byte[5];
|
||||
Array.Fill(toneArray, byte.MaxValue);
|
||||
|
||||
var recentSongs = context.SongPlayData
|
||||
.Where(datum => datum.Baid == request.Baid)
|
||||
.OrderByDescending(datum => datum.PlayTime)
|
||||
.AsEnumerable()
|
||||
.DistinctBy(datum => datum.SongId)
|
||||
.Take(10)
|
||||
.Select(datum => datum.SongId)
|
||||
.ToArray();
|
||||
|
||||
var response = new UserDataResponse
|
||||
{
|
||||
Result = 1,
|
||||
ToneFlg = new byte[] {0},
|
||||
ToneFlg = toneArray,
|
||||
// TitleFlg = GZipBytesUtil.GetGZipBytes(new byte[100]),
|
||||
ReleaseSongFlg = releaseSongArray,
|
||||
UraReleaseSongFlg = uraSongArray,
|
||||
DefaultOptionSetting = new byte[] {0},
|
||||
IsVoiceOn = true,
|
||||
IsSkipOn = false
|
||||
IsSkipOn = false,
|
||||
IsChallengecompe = false,
|
||||
SongRecentCnt = (uint)recentSongs.Length,
|
||||
AryRecentSongNoes = recentSongs
|
||||
};
|
||||
|
||||
|
||||
|
@ -1,6 +1,4 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
namespace TaikoLocalServer.Controllers;
|
||||
|
||||
[Route("/v12r03/chassis/verifyqrcode.php")]
|
||||
[ApiController]
|
||||
|
@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace TaikoLocalServer.Entities
|
||||
namespace TaikoLocalServer.Entities
|
||||
{
|
||||
public partial class Card
|
||||
{
|
||||
|
@ -1,6 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using TaikoLocalServer.Common.Enums;
|
||||
using TaikoLocalServer.Common.Enums;
|
||||
|
||||
namespace TaikoLocalServer.Entities
|
||||
{
|
||||
|
@ -1,6 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using TaikoLocalServer.Common.Enums;
|
||||
using TaikoLocalServer.Common.Enums;
|
||||
|
||||
namespace TaikoLocalServer.Entities
|
||||
{
|
||||
|
@ -1,6 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using TaikoLocalServer.Common.Enums;
|
||||
using TaikoLocalServer.Common.Enums;
|
||||
|
||||
namespace TaikoLocalServer.Entities
|
||||
{
|
||||
|
@ -1,6 +1,4 @@
|
||||
using System.Buffers.Text;
|
||||
using System.IO.Compression;
|
||||
using System.Net;
|
||||
using System.Net;
|
||||
using ICSharpCode.SharpZipLib.Zip.Compression.Streams;
|
||||
|
||||
namespace TaikoLocalServer.Middlewares;
|
||||
|
@ -1,6 +1,4 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace TaikoLocalServer.Models;
|
||||
namespace TaikoLocalServer.Models;
|
||||
|
||||
public class MuchaBoardAuthRequest
|
||||
{
|
||||
|
@ -1,6 +1,4 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace TaikoLocalServer.Models;
|
||||
namespace TaikoLocalServer.Models;
|
||||
|
||||
public class MuchaUpdateCheckRequest
|
||||
{
|
||||
|
@ -1,6 +1,4 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace TaikoLocalServer.Models;
|
||||
namespace TaikoLocalServer.Models;
|
||||
|
||||
public class PowerOnRequest
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user