using SPTarkov.Server.Core.Models.Eft.Common.Tables;
using SPTarkov.Server.Core.Models.Eft.ItemEvent;
namespace SPTarkov.Server.Core.Extensions
{
public static class ItemEventRouterResponseExtensions
{
///
/// Add item stack change object into output route event response
///
/// Response to add item change event into
/// Session id
/// Item that was adjusted
public static void AddItemStackSizeChangeIntoEventResponse(
this ItemEventRouterResponse output,
string sessionId,
Item item
)
{
output
.ProfileChanges[sessionId]
.Items.ChangedItems.Add(
new Item
{
Id = item.Id,
Template = item.Template,
ParentId = item.ParentId,
SlotId = item.SlotId,
Location = item.Location,
Upd = new Upd { StackObjectsCount = item.Upd.StackObjectsCount },
}
);
}
}
}