Rename some tokens
This commit is contained in:
parent
b7bb0ad616
commit
ad01ca2895
@ -7,18 +7,18 @@ public class GetShopFolderHandler(IGameDataService gameDataService)
|
|||||||
{
|
{
|
||||||
public Task<CommonGetShopFolderResponse> Handle(GetShopFolderQuery request, CancellationToken cancellationToken)
|
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 shopFolderList = gameDataService.GetShopFolderList();
|
||||||
|
|
||||||
var response = new CommonGetShopFolderResponse
|
var response = new CommonGetShopFolderResponse
|
||||||
{
|
{
|
||||||
Result = 1,
|
Result = 1,
|
||||||
TokenId = shopTokenId > 0 ? (uint)shopTokenId : 1,
|
TokenId = seasonTokenId > 0 ? (uint)seasonTokenId : 1,
|
||||||
VerupNo = 2,
|
VerupNo = 2,
|
||||||
AryShopFolderDatas = shopFolderList
|
AryShopFolderDatas = shopFolderList
|
||||||
};
|
};
|
||||||
|
|
||||||
return Task.FromResult(response);
|
return Task.FromResult(response);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -4,8 +4,8 @@ namespace TaikoLocalServer.Handlers;
|
|||||||
|
|
||||||
public record GetTokenCountQuery(uint Baid) : IRequest<CommonGetTokenCountResponse>;
|
public record GetTokenCountQuery(uint Baid) : IRequest<CommonGetTokenCountResponse>;
|
||||||
|
|
||||||
public class GetTokenCountQueryHandler(IGameDataService gameDataService,
|
public class GetTokenCountQueryHandler(IGameDataService gameDataService,
|
||||||
TaikoDbContext context,
|
TaikoDbContext context,
|
||||||
#pragma warning disable CS9113 // Parameter is unread.
|
#pragma warning disable CS9113 // Parameter is unread.
|
||||||
ILogger<GetTokenCountQueryHandler> logger)
|
ILogger<GetTokenCountQueryHandler> logger)
|
||||||
#pragma warning restore CS9113 // Parameter is unread.
|
#pragma warning restore CS9113 // Parameter is unread.
|
||||||
@ -17,12 +17,12 @@ public class GetTokenCountQueryHandler(IGameDataService gameDataService,
|
|||||||
{
|
{
|
||||||
Result = 1
|
Result = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
string[] tokenNames = ["shopTokenId", "kaTokenId", "onePieceTokenId", "soshinaTokenId", "Yatsushika1TokenId", "Yatsushika2TokenId",
|
string[] tokenNames = ["seasonTokenId", "eventTokenId", "onePieceTokenId", "soshinaTokenId", "Yatsushika1TokenId", "Yatsushika2TokenId",
|
||||||
"Yatsushika3TokenId", "Yatsushika4TokenId", "MaskedKid1TokenId", "MaskedKid2TokenId", "MaskedKid3TokenId", "MaskedKid4TokenId",
|
"Yatsushika3TokenId", "Yatsushika4TokenId", "MaskedKid1TokenId", "MaskedKid2TokenId", "MaskedKid3TokenId", "MaskedKid4TokenId",
|
||||||
"Kiyoshi1TokenId", "Kiyoshi2TokenId", "Kiyoshi3TokenId", "Kiyoshi4TokenId", "Amitie1TokenId", "Amitie2TokenId", "Amitie3TokenId",
|
"Kiyoshi1TokenId", "Kiyoshi2TokenId", "Kiyoshi3TokenId", "Kiyoshi4TokenId", "Amitie1TokenId", "Amitie2TokenId", "Amitie3TokenId",
|
||||||
"Amitie4TokenId", "Machina1TokenId", "Machina2TokenId", "Machina3TokenId", "Machina4TokenId"];
|
"Amitie4TokenId", "Machina1TokenId", "Machina2TokenId", "Machina3TokenId", "Machina4TokenId"];
|
||||||
|
|
||||||
var tokenDataDictionary = gameDataService.GetTokenDataDictionary();
|
var tokenDataDictionary = gameDataService.GetTokenDataDictionary();
|
||||||
foreach (var tokenName in tokenNames)
|
foreach (var tokenName in tokenNames)
|
||||||
{
|
{
|
||||||
@ -41,7 +41,7 @@ public class GetTokenCountQueryHandler(IGameDataService gameDataService,
|
|||||||
};
|
};
|
||||||
context.Tokens.Add(token);
|
context.Tokens.Add(token);
|
||||||
}
|
}
|
||||||
|
|
||||||
response.AryTokenCountDatas.Add(new CommonTokenCountData
|
response.AryTokenCountDatas.Add(new CommonTokenCountData
|
||||||
{
|
{
|
||||||
TokenId = (uint)token.Id,
|
TokenId = (uint)token.Id,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"shopTokenId": -1,
|
"seasonTokenId": -1,
|
||||||
"kaTokenId": -1,
|
"eventTokenId": -1,
|
||||||
"onePieceTokenId": 100100,
|
"onePieceTokenId": 100100,
|
||||||
"soshinaTokenId": 100200,
|
"soshinaTokenId": 100200,
|
||||||
"Yatsushika1TokenId": 100300,
|
"Yatsushika1TokenId": 100300,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user