Files
SPT-Server-Build/Libraries/Core/Routers/Static/ItemEventStaticRouter.cs
T
2025-01-19 17:45:48 +00:00

35 lines
913 B
C#

using SptCommon.Annotations;
using Core.Callbacks;
using Core.DI;
using Core.Models.Eft.ItemEvent;
using Core.Utils;
namespace Core.Routers.Static;
[Injectable(InjectableTypeOverride = typeof(StaticRouter))]
public class ItemEventStaticRouter : StaticRouter
{
protected static ItemEventCallbacks _itemEventCallbacks;
public ItemEventStaticRouter(
JsonUtil jsonUtil,
ItemEventCallbacks itemEventCallbacks
) : base(
jsonUtil,
[
new RouteAction(
"/client/game/profile/items/moving",
(
url,
info,
sessionID,
output
) => _itemEventCallbacks.HandleEvents(url, info as ItemEventRouterRequest, sessionID),
typeof(ItemEventRouterRequest))
]
)
{
_itemEventCallbacks = itemEventCallbacks;
}
}