diff --git a/Libraries/Core/Routers/EventOutputHolder.cs b/Libraries/Core/Routers/EventOutputHolder.cs index 9f19a13a..bcf95313 100644 --- a/Libraries/Core/Routers/EventOutputHolder.cs +++ b/Libraries/Core/Routers/EventOutputHolder.cs @@ -96,7 +96,10 @@ public class EventOutputHolder } ); } - + /// + /// Update output object with most recent values from player profile + /// + /// Session id public void UpdateOutputProperties(string sessionId) { var pmcData = _profileHelper.GetPmcProfile(sessionId); @@ -122,6 +125,10 @@ public class EventOutputHolder CleanUpCompleteCraftsInProfile(pmcData.Hideout.Production); } + /// + /// Required as continuous productions don't reset and stay at 100% completion but client thinks it hasn't started + /// + /// Productions in a profile private void CleanUpCompleteCraftsInProfile(Dictionary? productions) { foreach (var production in productions) @@ -140,7 +147,12 @@ public class EventOutputHolder } } } - + + /// + /// Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true + /// + /// Player profile + /// Dictionary of hideout improvements private Dictionary? GetImprovementsFromProfileAndFlagComplete(PmcData pmcData) { foreach (var improvementKey in pmcData.Hideout.Improvements) @@ -162,6 +174,12 @@ public class EventOutputHolder return pmcData.Hideout.Improvements; } + /// + /// Return productions from player profile except those completed crafts the client has already seen + /// + /// Productions from player profile + /// Player session ID + /// Dictionary of hideout productions private Dictionary? GetProductionsFromProfileAndFlagComplete(Dictionary? productions, string sessionId) { foreach (var production in productions) @@ -219,7 +237,12 @@ public class EventOutputHolder limit.RemainingLimit = limit.TotalLimit; } } - + + /// + /// Convert the internal trader data object into an object we can send to the client + /// + /// Server data for traders + /// Dict of trader id + TraderData private Dictionary ConstructTraderRelations(Dictionary traderData) { return traderData.ToDictionary( diff --git a/Libraries/Core/Routers/ItemEventRouter.cs b/Libraries/Core/Routers/ItemEventRouter.cs index 1139cd35..4443cef9 100644 --- a/Libraries/Core/Routers/ItemEventRouter.cs +++ b/Libraries/Core/Routers/ItemEventRouter.cs @@ -42,7 +42,13 @@ public class ItemEventRouter _itemEventRouters = itemEventRouters.ToList(); _cloner = cloner; } - + + /// + /// Handles ItemEventRouter Requests and processes them. + /// + /// Event request + /// Session ID + /// Item response public ItemEventRouterResponse HandleEvents(ItemEventRouterRequest info, string sessionID) { var output = _eventOutputHolder.GetOutput(sessionID);