From f8deb290f5db09be5d8fcc534490ccd58677a464 Mon Sep 17 00:00:00 2001 From: CWX Date: Thu, 16 Jan 2025 20:21:30 +0000 Subject: [PATCH] fix more to do with ws --- Core/Helpers/ItemHelper.cs | 8 ++++---- Core/Helpers/NotifierHelper.cs | 11 +++++------ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Core/Helpers/ItemHelper.cs b/Core/Helpers/ItemHelper.cs index f73341df..88a33edc 100644 --- a/Core/Helpers/ItemHelper.cs +++ b/Core/Helpers/ItemHelper.cs @@ -222,7 +222,7 @@ public class ItemHelper /// /// Item to look price up of /// Price in roubles - public decimal GetItemPrice(string tpl) + public double GetItemPrice(string tpl) { throw new NotImplementedException(); } @@ -233,7 +233,7 @@ public class ItemHelper /// /// Item to look price up of /// Price in roubles - public decimal GetItemMaxPrice(string tpl) + public double GetItemMaxPrice(string tpl) { throw new NotImplementedException(); } @@ -243,7 +243,7 @@ public class ItemHelper /// /// Items tpl id to look up price /// Price in roubles (0 if not found) - public decimal GetStaticItemPrice(string tpl) + public double GetStaticItemPrice(string tpl) { throw new NotImplementedException(); } @@ -253,7 +253,7 @@ public class ItemHelper /// /// Items tpl id to look up price /// Price in roubles (undefined if not found) - public decimal GetDynamicItemPrice(string tpl) + public double GetDynamicItemPrice(string tpl) { throw new NotImplementedException(); } diff --git a/Core/Helpers/NotifierHelper.cs b/Core/Helpers/NotifierHelper.cs index b3d3ba62..d67f857b 100644 --- a/Core/Helpers/NotifierHelper.cs +++ b/Core/Helpers/NotifierHelper.cs @@ -4,20 +4,19 @@ using Core.Models.Eft.Ws; namespace Core.Helpers; -[Injectable] +[Injectable(InjectionType.Singleton)] public class NotifierHelper { private readonly HttpServerHelper _httpServerHelper; + protected WsPing ping = new WsPing(); public NotifierHelper( HttpServerHelper httpServerHelper) { _httpServerHelper = httpServerHelper; } - public WsNotificationEvent GetDefaultNotification() - { - throw new NotImplementedException(); - } + + public WsNotificationEvent GetDefaultNotification() => ping; /** * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside @@ -55,6 +54,6 @@ public class NotifierHelper public string GetWebSocketServer(string sessionID) { - return $"{ _httpServerHelper.GetWebsocketUrl()}/ notifierServer / getwebsocket /{sessionID}"; + return $"{_httpServerHelper.GetWebsocketUrl()}/notifierServer/getwebsocket/{sessionID}"; } }