1
0
mirror of synced 2025-01-19 00:04:05 +01:00

Rename some tokens

This commit is contained in:
esuo1198 2024-03-18 03:25:35 +09:00
parent b7bb0ad616
commit ad01ca2895
3 changed files with 13 additions and 13 deletions

View File

@ -7,18 +7,18 @@ public class GetShopFolderHandler(IGameDataService gameDataService)
{
public Task<CommonGetShopFolderResponse> Handle(GetShopFolderQuery request, CancellationToken cancellationToken)
{
gameDataService.GetTokenDataDictionary().TryGetValue("shopTokenId", out var shopTokenId);
gameDataService.GetTokenDataDictionary().TryGetValue("seasonTokenId", out var seasonTokenId);
var shopFolderList = gameDataService.GetShopFolderList();
var response = new CommonGetShopFolderResponse
{
Result = 1,
TokenId = shopTokenId > 0 ? (uint)shopTokenId : 1,
TokenId = seasonTokenId > 0 ? (uint)seasonTokenId : 1,
VerupNo = 2,
AryShopFolderDatas = shopFolderList
};
return Task.FromResult(response);
}
}

View File

@ -4,8 +4,8 @@ namespace TaikoLocalServer.Handlers;
public record GetTokenCountQuery(uint Baid) : IRequest<CommonGetTokenCountResponse>;
public class GetTokenCountQueryHandler(IGameDataService gameDataService,
TaikoDbContext context,
public class GetTokenCountQueryHandler(IGameDataService gameDataService,
TaikoDbContext context,
#pragma warning disable CS9113 // Parameter is unread.
ILogger<GetTokenCountQueryHandler> logger)
#pragma warning restore CS9113 // Parameter is unread.
@ -17,12 +17,12 @@ public class GetTokenCountQueryHandler(IGameDataService gameDataService,
{
Result = 1
};
string[] tokenNames = ["shopTokenId", "kaTokenId", "onePieceTokenId", "soshinaTokenId", "Yatsushika1TokenId", "Yatsushika2TokenId",
"Yatsushika3TokenId", "Yatsushika4TokenId", "MaskedKid1TokenId", "MaskedKid2TokenId", "MaskedKid3TokenId", "MaskedKid4TokenId",
string[] tokenNames = ["seasonTokenId", "eventTokenId", "onePieceTokenId", "soshinaTokenId", "Yatsushika1TokenId", "Yatsushika2TokenId",
"Yatsushika3TokenId", "Yatsushika4TokenId", "MaskedKid1TokenId", "MaskedKid2TokenId", "MaskedKid3TokenId", "MaskedKid4TokenId",
"Kiyoshi1TokenId", "Kiyoshi2TokenId", "Kiyoshi3TokenId", "Kiyoshi4TokenId", "Amitie1TokenId", "Amitie2TokenId", "Amitie3TokenId",
"Amitie4TokenId", "Machina1TokenId", "Machina2TokenId", "Machina3TokenId", "Machina4TokenId"];
var tokenDataDictionary = gameDataService.GetTokenDataDictionary();
foreach (var tokenName in tokenNames)
{
@ -41,7 +41,7 @@ public class GetTokenCountQueryHandler(IGameDataService gameDataService,
};
context.Tokens.Add(token);
}
response.AryTokenCountDatas.Add(new CommonTokenCountData
{
TokenId = (uint)token.Id,

View File

@ -1,6 +1,6 @@
{
"shopTokenId": -1,
"kaTokenId": -1,
"seasonTokenId": -1,
"eventTokenId": -1,
"onePieceTokenId": 100100,
"soshinaTokenId": 100200,
"Yatsushika1TokenId": 100300,