From d4deb4aa494346ffaa9af16673a46d5a7771b363 Mon Sep 17 00:00:00 2001 From: Mikhail Date: Fri, 20 Dec 2024 16:05:01 -0500 Subject: [PATCH] use decimal --- EpinelPS/LobbyServer/Msgs/Shop/GetProductList.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EpinelPS/LobbyServer/Msgs/Shop/GetProductList.cs b/EpinelPS/LobbyServer/Msgs/Shop/GetProductList.cs index 1ba5288..3ad2ba0 100644 --- a/EpinelPS/LobbyServer/Msgs/Shop/GetProductList.cs +++ b/EpinelPS/LobbyServer/Msgs/Shop/GetProductList.cs @@ -23,11 +23,11 @@ namespace EpinelPS.LobbyServer.Msgs.Shop MidasProductRecord? record = product.FirstOrDefault().Value; if (record != null) { - if(!double.TryParse(record.cost, out double price)) + if(!decimal.TryParse(record.cost, out decimal price)) { Console.WriteLine("Failed to parse " + record.cost+" Cash shop will not work probably"); } - + long microPrice = (long)(price * 1000000); response.ProductInfoList.Add(new NetJupiterProductInfo() { CurrencyCode = "USD", CurrencySymbol = "$", MicroPrice = microPrice, Price = record.cost, ProductId = item }); }