Various fixes
This commit is contained in:
parent
07213c84e2
commit
614b693760
@ -41,7 +41,7 @@ public class MyDonEntryController : BaseController<MyDonEntryController>
|
|||||||
ColorBody = 1,
|
ColorBody = 1,
|
||||||
ColorLimb = 3,
|
ColorLimb = 3,
|
||||||
FavoriteSongsArray = "[]",
|
FavoriteSongsArray = "[]",
|
||||||
ToneFlgArray = "[]",
|
ToneFlgArray = "[0]",
|
||||||
TitleFlgArray = "[]",
|
TitleFlgArray = "[]",
|
||||||
CostumeFlgArray = "[[],[],[],[],[]]",
|
CostumeFlgArray = "[[],[],[],[],[]]",
|
||||||
GenericInfoFlgArray = "[]",
|
GenericInfoFlgArray = "[]",
|
||||||
|
@ -76,6 +76,14 @@ public class UserDataController : BaseController<UserDataController>
|
|||||||
// The only way to get a null is provide string "null" as input,
|
// The only way to get a null is provide string "null" as input,
|
||||||
// which means database content need to be fixed, so better throw
|
// which means database content need to be fixed, so better throw
|
||||||
toneFlg.ThrowIfNull("Tone flg should never be null!");
|
toneFlg.ThrowIfNull("Tone flg should never be null!");
|
||||||
|
|
||||||
|
// If toneFlg is empty, add 0 to it
|
||||||
|
if (toneFlg.Length == 0)
|
||||||
|
{
|
||||||
|
toneFlg = new uint[] { 0 };
|
||||||
|
userData.ToneFlgArray = JsonSerializer.Serialize(toneFlg);
|
||||||
|
await userDatumService.UpdateUserDatum(userData);
|
||||||
|
}
|
||||||
|
|
||||||
var toneArray = FlagCalculator.GetBitArrayFromIds(toneFlg, gameDataService.GetToneFlagArraySize(), Logger);
|
var toneArray = FlagCalculator.GetBitArrayFromIds(toneFlg, gameDataService.GetToneFlagArraySize(), Logger);
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Security.Authentication;
|
using System.Security.Authentication;
|
||||||
using GameDatabase.Context;
|
using GameDatabase.Context;
|
||||||
|
using Microsoft.AspNetCore.HttpLogging;
|
||||||
using Microsoft.AspNetCore.HttpOverrides;
|
using Microsoft.AspNetCore.HttpOverrides;
|
||||||
using TaikoLocalServer.Middlewares;
|
using TaikoLocalServer.Middlewares;
|
||||||
using TaikoLocalServer.Services.Extentions;
|
using TaikoLocalServer.Services.Extentions;
|
||||||
@ -23,6 +24,13 @@ try
|
|||||||
{
|
{
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
|
builder.Services.AddHttpLogging(options =>
|
||||||
|
{
|
||||||
|
options.LoggingFields = HttpLoggingFields.All;
|
||||||
|
options.RequestBodyLogLimit = 32768;
|
||||||
|
options.ResponseBodyLogLimit = 32768;
|
||||||
|
});
|
||||||
|
|
||||||
const string configurationsDirectory = "Configurations";
|
const string configurationsDirectory = "Configurations";
|
||||||
builder.Configuration.AddJsonFile($"{configurationsDirectory}/Kestrel.json", optional: true, reloadOnChange: false);
|
builder.Configuration.AddJsonFile($"{configurationsDirectory}/Kestrel.json", optional: true, reloadOnChange: false);
|
||||||
builder.Configuration.AddJsonFile($"{configurationsDirectory}/Logging.json", optional: false, reloadOnChange: false);
|
builder.Configuration.AddJsonFile($"{configurationsDirectory}/Logging.json", optional: false, reloadOnChange: false);
|
||||||
|
@ -378,24 +378,24 @@ public class GameDataService : IGameDataService
|
|||||||
|
|
||||||
costumeFlagArraySizes = new List<int>
|
costumeFlagArraySizes = new List<int>
|
||||||
{
|
{
|
||||||
(int)kigurumiUniqueIdList.Max(),
|
(int)kigurumiUniqueIdList.Max() + 1,
|
||||||
(int)headUniqueIdList.Max(),
|
(int)headUniqueIdList.Max() + 1,
|
||||||
(int)bodyUniqueIdList.Max(),
|
(int)bodyUniqueIdList.Max() + 1,
|
||||||
(int)faceUniqueIdList.Max(),
|
(int)faceUniqueIdList.Max() + 1,
|
||||||
(int)puchiUniqueIdList.Max()
|
(int)puchiUniqueIdList.Max() + 1
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitializeTitleFlagArraySize(Shougous? shougouData)
|
private void InitializeTitleFlagArraySize(Shougous? shougouData)
|
||||||
{
|
{
|
||||||
shougouData.ThrowIfNull("Shouldn't happen!");
|
shougouData.ThrowIfNull("Shouldn't happen!");
|
||||||
titleFlagArraySize = (int)shougouData.ShougouEntries.Max(entry => entry.uniqueId);
|
titleFlagArraySize = (int)shougouData.ShougouEntries.Max(entry => entry.uniqueId) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitializeToneFlagArraySize(Neiros? neiroData)
|
private void InitializeToneFlagArraySize(Neiros? neiroData)
|
||||||
{
|
{
|
||||||
neiroData.ThrowIfNull("Shouldn't happen!");
|
neiroData.ThrowIfNull("Shouldn't happen!");
|
||||||
toneFlagArraySize = (int)neiroData.NeiroEntries.Max(entry => entry.uniqueId);
|
toneFlagArraySize = (int)neiroData.NeiroEntries.Max(entry => entry.uniqueId) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitializeQrCodeData(List<QRCodeData>? qrCodeData)
|
private void InitializeQrCodeData(List<QRCodeData>? qrCodeData)
|
||||||
|
Loading…
Reference in New Issue
Block a user