diff --git a/TaikoLocalServer/Controllers/Game/GetTokenCountController.cs b/TaikoLocalServer/Controllers/Game/GetTokenCountController.cs index 7993e79..8993784 100644 --- a/TaikoLocalServer/Controllers/Game/GetTokenCountController.cs +++ b/TaikoLocalServer/Controllers/Game/GetTokenCountController.cs @@ -26,6 +26,8 @@ public class GetTokenCountController : BaseController var tokenDataDictionary = gameDataService.GetTokenDataDictionary(); tokenDataDictionary.TryGetValue("shopTokenId", out var shopTokenId); tokenDataDictionary.TryGetValue("kaTokenId", out var kaTokenId); + tokenDataDictionary.TryGetValue("onePieceTokenId", out var onePieceTokenId); + tokenDataDictionary.TryGetValue("soshinaTokenId", out var soshinaTokenId); user.ThrowIfNull($"User with baid {request.Baid} does not exist!"); var tokenCountDict = new Dictionary(); @@ -69,6 +71,28 @@ public class GetTokenCountController : BaseController TokenId = castedKaTokenId }); } + + if (onePieceTokenId > 0) + { + var castedOnePieceTokenId = (uint)onePieceTokenId; + tokenCountDict.TryAdd(castedOnePieceTokenId, 0); + response.AryTokenCountDatas.Add(new GetTokenCountResponse.TokenCountData + { + TokenCount = tokenCountDict[castedOnePieceTokenId], + TokenId = castedOnePieceTokenId + }); + } + + if (soshinaTokenId > 0) + { + var castedSoshinaTokenId = (uint)soshinaTokenId; + tokenCountDict.TryAdd(castedSoshinaTokenId, 0); + response.AryTokenCountDatas.Add(new GetTokenCountResponse.TokenCountData + { + TokenCount = tokenCountDict[castedSoshinaTokenId], + TokenId = castedSoshinaTokenId + }); + } user.TokenCountDict = JsonSerializer.Serialize(tokenCountDict); await userDatumService.UpdateUserDatum(user); diff --git a/TaikoLocalServer/Controllers/Game/InitialDataCheckController.cs b/TaikoLocalServer/Controllers/Game/InitialDataCheckController.cs index bdc1f96..4f7323e 100644 --- a/TaikoLocalServer/Controllers/Game/InitialDataCheckController.cs +++ b/TaikoLocalServer/Controllers/Game/InitialDataCheckController.cs @@ -31,7 +31,7 @@ public class InitialDataCheckController : BaseController new InitialdatacheckResponse.VerupNoData1 { MasterType = i, diff --git a/TaikoLocalServer/wwwroot/data/token_data.json b/TaikoLocalServer/wwwroot/data/token_data.json index 837057c..a8edc65 100644 --- a/TaikoLocalServer/wwwroot/data/token_data.json +++ b/TaikoLocalServer/wwwroot/data/token_data.json @@ -1,4 +1,6 @@ { "shopTokenId": -1, - "kaTokenId": -1 + "kaTokenId": -1, + "onePieceTokenId": 100100, + "soshinaTokenId": 100200 } \ No newline at end of file