Outpost is now working

This commit is contained in:
Mikhail
2024-07-05 09:04:56 -04:00
parent 42261a16b6
commit 18102b9922
9 changed files with 65 additions and 16 deletions

View File

@@ -8,9 +8,25 @@ namespace nksrv.LobbyServer.Msgs.Wallet
protected override async Task HandleAsync()
{
var req = await ReadData<ReqRefreshChargeCurrencyData>();
var user = GetUser();
var response = new ResRefreshChargeCurrencyData();
response.FreeCash = new();
response.ChargeCash = new();
foreach (var item in user.Currency)
{
if (item.Key == CurrencyType.FreeCash)
{
response.FreeCash.Type = (int)item.Key;
response.FreeCash.Value = item.Value;
}
else if (item.Key == CurrencyType.ChargeCash)
{
response.ChargeCash.Type = (int)item.Key;
response.ChargeCash.Value = item.Value;
}
}
WriteData(response);
}
}