diff --git a/Libraries/Core/Callbacks/HideoutCallbacks.cs b/Libraries/Core/Callbacks/HideoutCallbacks.cs
index c64cbc8e..a5d7dfaa 100644
--- a/Libraries/Core/Callbacks/HideoutCallbacks.cs
+++ b/Libraries/Core/Callbacks/HideoutCallbacks.cs
@@ -171,9 +171,10 @@ public class HideoutCallbacks(
return _hideoutController.HideoutCustomizationApply(sessionID, pmcData, request);
}
- /**
- * Handle client/game/profile/items/moving - hideoutCustomizationSetMannequinPose
- */
+ ///
+ /// Handle client/game/profile/items/moving - hideoutCustomizationSetMannequinPose
+ ///
+ ///
public ItemEventRouterResponse HideoutCustomizationSetMannequinPose(PmcData pmcData, HideoutCustomizationSetMannequinPoseRequest request, string sessionId)
{
return _hideoutController.HideoutCustomizationSetMannequinPose(sessionId, pmcData, request);
diff --git a/Libraries/Core/Callbacks/NotifierCallbacks.cs b/Libraries/Core/Callbacks/NotifierCallbacks.cs
index 580821a3..0e3a1f4e 100644
--- a/Libraries/Core/Callbacks/NotifierCallbacks.cs
+++ b/Libraries/Core/Callbacks/NotifierCallbacks.cs
@@ -18,12 +18,12 @@ public class NotifierCallbacks(
)
{
- /**
- * If we don't have anything to send, it's ok to not send anything back
- * because notification requests can be long-polling. In fact, we SHOULD wait
- * until we actually have something to send because otherwise we'd spam the client
- * and the client would abort the connection due to spam.
- */
+ ///
+ /// If we don't have anything to send, it's ok to not send anything back
+ /// because notification requests can be long-polling. In fact, we SHOULD wait
+ /// until we actually have something to send because otherwise we'd spam the client
+ /// and the client would abort the connection due to spam.
+ ///
public void SendNotification(string sessionID, HttpRequest req, HttpResponse resp, object data)
{
var splittedUrl = req.Path.Value.Split("/");
@@ -38,9 +38,14 @@ public class NotifierCallbacks(
.ContinueWith(text => httpServerHelper.SendTextJson(resp, text.Result));
}
- /** Handle push/notifier/get */
- /** Handle push/notifier/getwebsocket */
- // TODO: removed from client?
+
+ ///
+ /// TODO: removed from client?
+ /// Handle push/notifier/get
+ /// Handle push/notifier/getwebsocket
+ ///
+ ///
+
public string GetNotifier(string url, IRequestData info, string sessionID)
{
return _httpResponseUtil.EmptyArrayResponse();
@@ -49,9 +54,6 @@ public class NotifierCallbacks(
///
/// Handle client/notifier/channel/create
///
- ///
- ///
- /// Session/player id
///
public string CreateNotifierChannel(string url, EmptyRequestData _, string sessionID)
{
@@ -61,9 +63,6 @@ public class NotifierCallbacks(
///
/// Handle client/game/profile/select
///
- ///
- ///
- /// Session/player id
///
public string SelectProfile(string url, UIDRequestData info, string sessionID)
{
@@ -77,9 +76,6 @@ public class NotifierCallbacks(
///
///
- ///
- ///
- /// Session/player id
///
public string Notify(string url, object info, string sessionID)
{
diff --git a/Libraries/Core/Callbacks/ProfileCallbacks.cs b/Libraries/Core/Callbacks/ProfileCallbacks.cs
index 00735f61..4c487585 100644
--- a/Libraries/Core/Callbacks/ProfileCallbacks.cs
+++ b/Libraries/Core/Callbacks/ProfileCallbacks.cs
@@ -17,9 +17,10 @@ public class ProfileCallbacks(
ProfileHelper _profileHelper
)
{
- /**
- * Handle client/game/profile/create
- */
+ ///
+ /// Handle client/game/profile/create
+ ///
+ ///
public string CreateProfile(string url, ProfileCreateRequestData info, string sessionID)
{
var id = _profileController.CreateProfile(info, sessionID);
@@ -31,24 +32,22 @@ public class ProfileCallbacks(
);
}
- /**
- * Handle client/game/profile/list
- * Get the complete player profile (scav + pmc character)
- */
+ ///
+ /// Handle client/game/profile/list
+ /// Get the complete player profile (scav + pmc character)
+ ///
+ ///
public string GetProfileData(string url, EmptyRequestData _, string sessionID)
{
return _httpResponse.GetBody(_profileController.GetCompleteProfile(sessionID));
}
- /**
- * Handle client/game/profile/savage/regenerate
- * Handle the creation of a scav profile for player
- * Occurs post-raid and when profile first created immediately after character details are confirmed by player
- * @param url
- * @param info empty
- * @param sessionID Session id
- * @returns Profile object
- */
+ ///
+ /// Handle client/game/profile/savage/regenerate
+ /// Handle the creation of a scav profile for player
+ /// Occurs post-raid and when profile first created immediately after character details are confirmed by player
+ ///
+ ///
public string RegenerateScav(string url, EmptyRequestData _, string sessionID)
{
return _httpResponse.GetBody(
@@ -59,19 +58,21 @@ public class ProfileCallbacks(
);
}
- /**
- * Handle client/game/profile/voice/change event
- */
+ ///
+ /// Handle client/game/profile/voice/change event
+ ///
+ ///
public string ChangeVoice(string url, ProfileChangeVoiceRequestData info, string sessionID)
{
_profileController.ChangeVoice(info, sessionID);
return _httpResponse.NullResponse();
}
- /**
- * Handle client/game/profile/nickname/change event
- * Client allows player to adjust their profile name
- */
+ ///
+ /// Handle client/game/profile/nickname/change event
+ /// Client allows player to adjust their profile name
+ ///
+ ///
public string ChangeNickname(string url, ProfileChangeNicknameRequestData info, string sessionID)
{
var output = _profileController.ChangeNickname(info, sessionID);
@@ -90,9 +91,10 @@ public class ProfileCallbacks(
};
}
- /**
- * Handle client/game/profile/nickname/validate
- */
+ ///
+ /// Handle client/game/profile/nickname/validate
+ ///
+ ///
public string ValidateNickname(string url, ValidateNicknameRequestData info, string sessionID)
{
var output = _profileController.ValidateNickname(info, sessionID);
@@ -110,9 +112,10 @@ public class ProfileCallbacks(
};
}
- /**
- * Handle client/game/profile/nickname/reserved
- */
+ ///
+ /// Handle client/game/profile/nickname/reserved
+ ///
+ ///
public string GetReservedNickname(string url, EmptyRequestData _, string sessionID)
{
var fullProfile = _profileHelper.GetFullProfile(sessionID);
@@ -124,51 +127,57 @@ public class ProfileCallbacks(
return _httpResponse.GetBody("SPTarkov");
}
- /**
- * Handle client/profile/status
- * Called when creating a character when choosing a character face/voice
- */
+ ///
+ /// Handle client/profile/status
+ /// Called when creating a character when choosing a character face/voice
+ ///
+ ///
public string GetProfileStatus(string url, EmptyRequestData _, string sessionID)
{
return _httpResponse.GetBody(_profileController.GetProfileStatus(sessionID));
}
- /**
- * Handle client/profile/view
- * Called when viewing another players profile
- */
+ ///
+ /// Handle client/profile/view
+ /// Called when viewing another players profile
+ ///
+ ///
public string GetOtherProfile(string url, GetOtherProfileRequest request, string sessionID)
{
return _httpResponse.GetBody(_profileController.GetOtherProfile(sessionID, request));
}
- /**
- * Handle client/profile/settings
- */
+ ///
+ /// Handle client/profile/settings
+ ///
+ ///
public string GetProfileSettings(string url, GetProfileSettingsRequest info, string sessionID)
{
return _httpResponse.GetBody(_profileController.SetChosenProfileIcon(sessionID, info));
}
- /**
- * Handle client/game/profile/search
- */
+ ///
+ /// Handle client/game/profile/search
+ ///
+ ///
public string SearchProfiles(string url, SearchProfilesRequestData info, string sessionID)
{
return _httpResponse.GetBody(_profileController.SearchProfiles(info, sessionID));
}
- /**
- * Handle launcher/profile/info
- */
+ ///
+ /// Handle launcher/profile/info
+ ///
+ ///
public string GetMiniProfile(string url, GetMiniProfileRequestData info, string sessionID)
{
return _httpResponse.NoBody(_profileController.GetMiniProfile(sessionID));
}
- /**
- * Handle /launcher/profiles
- */
+ ///
+ /// Handle /launcher/profiles
+ ///
+ ///
public string GetAllMiniProfiles(string url, EmptyRequestData _, string sessionID)
{
return _httpResponse.NoBody(_profileController.GetMiniProfiles());
diff --git a/Libraries/Core/Callbacks/RagfairCallbacks.cs b/Libraries/Core/Callbacks/RagfairCallbacks.cs
index 145ba481..447065cd 100644
--- a/Libraries/Core/Callbacks/RagfairCallbacks.cs
+++ b/Libraries/Core/Callbacks/RagfairCallbacks.cs
@@ -157,6 +157,6 @@ public class RagfairCallbacks(
///
public string GetFleaOfferById(string url, GetRagfairOfferByIdRequest info, string sessionID)
{
- return _httpResponseUtil.GetBody(_ragfairController.GetOfferById(sessionID, info));
+ return _httpResponseUtil.GetBody(_ragfairController.GetOfferByInternalId(sessionID, info));
}
}
diff --git a/Libraries/Core/Context/ContextVariableType.cs b/Libraries/Core/Context/ContextVariableType.cs
index b57f38e1..4b2f447f 100644
--- a/Libraries/Core/Context/ContextVariableType.cs
+++ b/Libraries/Core/Context/ContextVariableType.cs
@@ -2,30 +2,20 @@
public enum ContextVariableType
{
- /**
- * Logged in users session id
- */
+ // Logged-in users session id
SESSION_ID = 0,
- /**
- * Currently acive raid information
- */
+ // Currently active raid information
RAID_CONFIGURATION = 1,
- /**
- * SessionID + Timestamp when client first connected, has _ between values
- */
+ // SessionID + Timestamp when client first connected, has _ between values
CLIENT_START_TIMESTAMP = 2,
- /**
- * When player is loading into map and loot is requested
- */
+ // When player is loading into map and loot is requested
REGISTER_PLAYER_REQUEST = 3,
RAID_ADJUSTMENTS = 4,
- /**
- * Data returned from client request object from endLocalRaid()
- */
+ // Data returned from client request object from endLocalRaid()
TRANSIT_INFO = 5,
APP_BUILDER = 6,
LOADED_MOD_ASSEMBLIES = 7,
diff --git a/Libraries/Core/Controllers/DialogueController.cs b/Libraries/Core/Controllers/DialogueController.cs
index cee99f30..20458e22 100644
--- a/Libraries/Core/Controllers/DialogueController.cs
+++ b/Libraries/Core/Controllers/DialogueController.cs
@@ -339,12 +339,12 @@ public class DialogueController(
return newAttachmentCount;
}
- /**
- * Get messages from a specific dialog that have items not expired
- * @param sessionId Session id
- * @param dialogueId Dialog to get mail attachments from
- * @returns Message array
- */
+ ///
+ /// Get messages from a specific dialog that have items not expired
+ ///
+ /// Session/Player id
+ /// Dialog to get mail attachments from
+ /// Message array
protected List GetActiveMessagesFromDialog(string sessionId, string dialogueId)
{
var timeNow = _timeUtil.GetTimeStamp();
@@ -552,11 +552,11 @@ public class DialogueController(
}
}
- /**
- * Has a dialog message expired
- * @param message Message to check expiry of
- * @returns true or false
- */
+ ///
+ /// Has a dialog message expired
+ ///
+ /// Message to check expiry of
+ /// True = expired
protected bool MessageHasExpired(Message message)
{
return _timeUtil.GetTimeStamp() > message.DateTime + (message.MaxStorageTime ?? 0);
diff --git a/Libraries/Core/Controllers/GameController.cs b/Libraries/Core/Controllers/GameController.cs
index c6774814..79acfdc2 100644
--- a/Libraries/Core/Controllers/GameController.cs
+++ b/Libraries/Core/Controllers/GameController.cs
@@ -456,10 +456,10 @@ public class GameController(
}
}
- /**
- * Mechanic sends players a measuring tape on profile start for some reason
- * @param pmcProfile Player profile
- */
+ ///
+ /// Mechanic sends players a measuring tape on profile start for some reason
+ ///
+ ///
protected void SendMechanicGiftsToNewProfile(PmcData pmcProfile)
{
_giftService.SendGiftWithSilentReceivedCheck("MechanicGiftDay1", pmcProfile.SessionId, 1);
diff --git a/Libraries/Core/Controllers/HideoutController.cs b/Libraries/Core/Controllers/HideoutController.cs
index 296e7e07..216e61d6 100644
--- a/Libraries/Core/Controllers/HideoutController.cs
+++ b/Libraries/Core/Controllers/HideoutController.cs
@@ -1552,9 +1552,9 @@ public class HideoutController(
return _databaseService.GetHideout().Qte;
}
- /**
- * Function called every `hideoutConfig.runIntervalSeconds` seconds as part of onUpdate event
- */
+ ///
+ /// Function called every `hideoutConfig.runIntervalSeconds` seconds as part of onUpdate event
+ ///
public void Update()
{
foreach (var sessionID in _saveServer.GetProfiles())
diff --git a/Libraries/Core/Controllers/InventoryController.cs b/Libraries/Core/Controllers/InventoryController.cs
index ec1b0360..03ef34ea 100644
--- a/Libraries/Core/Controllers/InventoryController.cs
+++ b/Libraries/Core/Controllers/InventoryController.cs
@@ -294,7 +294,7 @@ public class InventoryController(
public void OpenRandomLootContainer(PmcData pmcData, OpenRandomLootContainerRequestData request, string sessionId,
ItemEventRouterResponse output)
{
- /** Container player opened in their inventory */
+ // Container player opened in their inventory
var openedItem = pmcData.Inventory.Items.FirstOrDefault(item => item.Id == request.Item);
var containerDetailsDb = _itemHelper.GetItem(openedItem.Template);
var isSealedWeaponBox = containerDetailsDb.Value.Name.Contains("event_container_airdrop");
diff --git a/Libraries/Core/Controllers/LauncherController.cs b/Libraries/Core/Controllers/LauncherController.cs
index 25d5da80..227925a3 100644
--- a/Libraries/Core/Controllers/LauncherController.cs
+++ b/Libraries/Core/Controllers/LauncherController.cs
@@ -55,10 +55,10 @@ public class LauncherController(
};
}
- /**
- * Get descriptive text for each of the profile edtions a player can choose, keyed by profile.json profile type e.g. "Edge Of Darkness"
- * @returns Dictionary of profile types with related descriptive text
- */
+ ///
+ /// Get descriptive text for each of the profile editions a player can choose, keyed by profile.json profile type e.g. "Edge Of Darkness"
+ ///
+ /// Dictionary of profile types with related descriptive text
protected Dictionary GetProfileDescriptions()
{
var result = new Dictionary();
@@ -212,11 +212,11 @@ public class LauncherController(
return sessionID;
}
- /**
- * Handle launcher requesting profile be wiped
- * @param info IRegisterData
- * @returns Session id
- */
+ ///
+ /// Handle launcher requesting profile be wiped
+ ///
+ /// Registration data
+ /// Session id
public string? Wipe(RegisterData info)
{
if (!_coreConfig.AllowProfileWipe)
@@ -245,10 +245,10 @@ public class LauncherController(
return _coreConfig.CompatibleTarkovVersion;
}
- /**
- * Get the mods the server has currently loaded
- * @returns Dictionary of mod name and mod details
- */
+ ///
+ /// Get the mods the server has currently loaded
+ ///
+ /// Dictionary of mod name and mod details
public Dictionary GetLoadedServerMods()
{
var mods = _applicationContext?.GetLatestValue(ContextVariableType.LOADED_MOD_ASSEMBLIES).GetValue>();
@@ -262,11 +262,11 @@ public class LauncherController(
return result;
}
- /**
- * Get the mods a profile has ever loaded into game with
- * @param sessionId Player id
- * @returns Array of mod details
- */
+ ///
+ /// Get the mods a profile has ever loaded into game with
+ ///
+ /// Session/Player id
+ /// Array of mod details
public List GetServerModsProfileUsed(string sessionId)
{
var profile = _profileHelper.GetFullProfile(sessionId);
diff --git a/Libraries/Core/Controllers/ProfileController.cs b/Libraries/Core/Controllers/ProfileController.cs
index fd738726..861b6700 100644
--- a/Libraries/Core/Controllers/ProfileController.cs
+++ b/Libraries/Core/Controllers/ProfileController.cs
@@ -37,17 +37,20 @@ public class ProfileController(
ProfileHelper _profileHelper
)
{
- /**
- * Handle /launcher/profiles
- */
+ ///
+ /// Handle /launcher/profiles
+ ///
+ ///
public virtual List GetMiniProfiles()
{
return _saveServer.GetProfiles().Select(kvp => GetMiniProfile(kvp.Key)).ToList();
}
- /**
- * Handle launcher/profile/info
- */
+ ///
+ /// Handle launcher/profile/info
+ ///
+ /// Session/Player id
+ ///
public virtual MiniProfile GetMiniProfile(string sessionID)
{
var profile = _saveServer.GetProfile(sessionID);
@@ -98,10 +101,11 @@ public class ProfileController(
};
}
- /**
- * Handle client/game/profile/list
- * Return a full profile, scav and pmc profiles + meta data
- */
+ ///
+ /// Handle client/game/profile/list
+ ///
+ /// Session/Player id
+ /// Return a full profile, scav and pmc profiles + meta data
public virtual List GetCompleteProfile(string sessionID)
{
return _profileHelper.GetCompleteProfile(sessionID);
@@ -129,9 +133,12 @@ public class ProfileController(
return _playerScavGenerator.Generate(sessionID);
}
- /**
- * Handle client/game/profile/nickname/validate
- */
+ ///
+ /// Handle client/game/profile/nickname/validate
+ ///
+ /// Validate nickname request
+ /// Session/Player id
+ ///
public virtual string ValidateNickname(ValidateNicknameRequestData request, string sessionID)
{
if (request.Nickname.Length < 3)
diff --git a/Libraries/Core/Controllers/RagfairController.cs b/Libraries/Core/Controllers/RagfairController.cs
index c96da33a..7b1bb03e 100644
--- a/Libraries/Core/Controllers/RagfairController.cs
+++ b/Libraries/Core/Controllers/RagfairController.cs
@@ -104,9 +104,9 @@ public class RagfairController
_ragfairConfig = _configServer.GetConfig();
}
- /**
- * Check all profiles and sell player offers / send player money for listing if it sold
- */
+ ///
+ /// Check all profiles and sell player offers / send player money for listing if it sold
+ ///
public void Update()
{
foreach (var (sessionId, profile) in _profileHelper.GetProfiles())
@@ -123,13 +123,12 @@ public class RagfairController
}
}
- /**
- * Handles client/ragfair/find
- * Returns flea offers that match required search parameters
- * @param sessionID Player id
- * @param searchRequest Search request data
- * @returns IGetOffersResult
- */
+ ///
+ /// Handles client/ragfair/find
+ ///
+ /// Session/Player id
+ /// Search request data
+ /// Flea offers that match required search parameters
public GetOffersResult GetOffers(string sessionID, SearchRequestData searchRequest)
{
var profile = _profileHelper.GetFullProfile(sessionID);
@@ -188,10 +187,10 @@ public class RagfairController
return result;
}
- /**
- * Adjust ragfair offer stack count to match same value as traders assort stack count
- * @param offer Flea offer to adjust stack size of
- */
+ ///
+ /// Adjust ragfair offer stack count to match same value as traders assort stack count
+ ///
+ /// Flea offer to adjust stack size of
private void SetTraderOfferStackSize(RagfairOffer offer)
{
var firstItem = offer.Items[0];
@@ -217,11 +216,11 @@ public class RagfairController
firstItem.Upd.StackObjectsCount = assortPurchased.Upd.StackObjectsCount;
}
- /**
- * Update a trader flea offer with buy restrictions stored in the traders assort
- * @param offer Flea offer to update
- * @param fullProfile Players full profile
- */
+ ///
+ /// Update a trader flea offer with buy restrictions stored in the traders assort
+ ///
+ /// Flea offer to update
+ /// Players full profile
private void SetTraderOfferPurchaseLimits(RagfairOffer offer, SptProfile fullProfile)
{
var offerRootItem = offer.Items.First();
@@ -256,10 +255,10 @@ public class RagfairController
offer.BuyRestrictionMax = offerRootItem.Upd.BuyRestrictionMax;
}
- /**
- * Add index to all offers passed in (0-indexed)
- * @param offers Offers to add index value to
- */
+ ///
+ /// Add index to all offers passed in (0-indexed)
+ ///
+ /// Offers to add index value to
protected void AddIndexValueToOffers(List offers)
{
var counter = 0;
@@ -270,12 +269,13 @@ public class RagfairController
}
}
- /**
- * Get categories for the type of search being performed, linked/required/all
- * @param searchRequest Client search request data
- * @param offers Ragfair offers to get categories for
- * @returns record with templates + counts
- */
+ ///
+ /// Get categories for the type of search being performed, linked/required/all
+ ///
+ ///
+ /// Client search request data
+ /// Ragfair offers to get categories for
+ /// Record with templates + counts
protected Dictionary GetSpecificCategories(PmcData pmcProfile, SearchRequestData searchRequest,
List offers)
{
@@ -306,34 +306,34 @@ public class RagfairController
return _ragfairServer.GetAllActiveCategories(playerHasFleaUnlocked, searchRequest, offerPool);
}
- /**
- * Is the flea search being performed a 'linked' search type
- * @param info Search request
- * @returns True if it is a 'linked' search type
- */
+ ///
+ /// Is the flea search being performed a 'linked' search type
+ ///
+ /// Search request
+ /// True = a 'linked' search type
protected bool IsLinkedSearch(SearchRequestData searchRequest)
{
return !string.IsNullOrEmpty(searchRequest.LinkedSearchId);
}
- /**
- * Is the flea search being performed a 'required' search type
- * @param info Search request
- * @returns True if it is a 'required' search type
- */
+ ///
+ /// Is the flea search being performed a 'required' search type
+ ///
+ /// Search request
+ /// True if it is a 'required' search type
protected bool IsRequiredSearch(SearchRequestData searchRequest)
{
return !string.IsNullOrEmpty(searchRequest.NeededSearchId);
}
- /**
- * Get offers for the client based on type of search being performed
- * @param searchRequest Client search request data
- * @param itemsToAdd Comes from ragfairHelper.filterCategories()
- * @param traderAssorts Trader assorts
- * @param pmcProfile Player profile
- * @returns array of offers
- */
+ ///
+ /// Get offers for the client based on type of search being performed
+ ///
+ /// Client search request data
+ /// Comes from ragfairHelper.filterCategories()
+ /// Trader assorts
+ ///
+ /// Array of offers
protected List GetOffersForSearchType(SearchRequestData searchRequest, List itemsToAdd,
Dictionary traderAssorts,
PmcData pmcProfile)
@@ -353,12 +353,12 @@ public class RagfairController
return _ragfairOfferHelper.GetValidOffers(searchRequest, itemsToAdd, traderAssorts, pmcProfile);
}
- /**
- * Called when creating an offer on flea, fills values in top right corner
- * @param getPriceRequest Client request object
- * @param ignoreTraderOffers Should trader offers be ignored in the calculation
- * @returns min/avg/max values for an item based on flea offers available
- */
+ ///
+ /// Called when creating an offer on flea, fills values in top right corner
+ ///
+ /// Client request object
+ /// OPTIONAL - Should trader offers be ignored in the calculation
+ /// min/avg/max values for an item based on flea offers available
public GetItemPriceResult GetItemMinAvgMaxFleaPriceValues(GetMarketPriceRequestData getPriceRequest,
bool ignoreTraderOffers = true)
{
@@ -444,13 +444,13 @@ public class RagfairController
return sum / totalOfferCount;
}
- /**
- * List item(s) on flea for sale
- * @param pmcData Player profile
- * @param offerRequest Flea list creation offer
- * @param sessionID Session id
- * @returns IItemEventRouterResponse
- */
+ ///
+ /// List item(s) on flea for sale
+ ///
+ /// Players PMC profile
+ /// Flea list creation offer
+ /// Session/Player id
+ /// ItemEventRouterResponse
public ItemEventRouterResponse AddPlayerOffer(PmcData pmcData, AddOfferRequestData offerRequest, string sessionID)
{
var output = _eventOutputHolder.GetOutput(sessionID);
@@ -488,12 +488,12 @@ public class RagfairController
}
}
- /**
- * Is the item to be listed on the flea valid
- * @param offerRequest Client offer request
- * @param errorMessage message to show to player when offer is invalid
- * @returns Is offer valid
- */
+ ///
+ /// Is the item to be listed on the flea valid
+ ///
+ /// Client offer request
+ /// message to show to player when offer is invalid
+ /// Is offer valid
protected bool IsValidPlayerOfferRequest(AddOfferRequestData offerRequest, string validationMessage)
{
if (offerRequest?.Items is null || offerRequest.Items.Count == 0)
@@ -513,12 +513,11 @@ public class RagfairController
return true;
}
- /**
- * Given a client request, determine what type of offer is being created
- * single/multi/pack
- * @param offerRequest Client request
- * @returns FleaOfferType
- */
+ ///
+ /// Given a client request, determine what type of offer is being created single/multi/pack
+ ///
+ /// Client request
+ /// FleaOfferType
protected FleaOfferType GetOfferType(AddOfferRequestData offerRequest)
{
var sellInOncePiece = offerRequest.SellInOnePiece.GetValueOrDefault(false);
@@ -544,16 +543,16 @@ public class RagfairController
return FleaOfferType.UNKNOWN;
}
- /**
- * Create a flea offer for multiples of the same item, can be single items or items with multiple in the stack
- * e.g. 2 ammo stacks of 30 cartridges each
- * Each item can be purchased individually
- * @param sessionID Session id
- * @param offerRequest Offer request from client
- * @param fullProfile Full profile of player
- * @param output Response to send to client
- * @returns IItemEventRouterResponse
- */
+ ///
+ /// Create a flea offer for multiples of the same item, can be single items or items with multiple in the stack
+ /// e.g. 2 ammo stacks of 30 cartridges each
+ /// Each item can be purchased individually
+ ///
+ /// Session/Player id
+ /// Offer request from client
+ /// Full profile of player
+ /// output Response to send to client
+ /// ItemEventRouterResponse
protected ItemEventRouterResponse CreateMultiOffer(string sessionID, AddOfferRequestData offerRequest,
SptProfile fullProfile, ItemEventRouterResponse output)
{
@@ -579,9 +578,7 @@ public class RagfairController
// When listing identical items on flea, condense separate items into one stack with a merged stack count
// e.g. 2 ammo items, stackObjectCount = 3 for each, will result in 1 stack of 6
-
firstListingAndChidren[0].Upd ??= new Upd();
-
firstListingAndChidren[0].Upd.StackObjectsCount = stackCountTotal;
// Create flea object
@@ -656,16 +653,16 @@ public class RagfairController
return output;
}
- /**
- * Create a flea offer for multiple items, can be single items or items with multiple in the stack
- * e.g. 2 ammo stacks of 30 cartridges each
- * The entire package must be purchased in one go
- * @param sessionID Session id
- * @param offerRequest Offer request from client
- * @param fullProfile Full profile of player
- * @param output Response to send to client
- * @returns IItemEventRouterResponse
- */
+ ///
+ /// Create a flea offer for multiple items, can be single items or items with multiple in the stack
+ /// e.g. 2 ammo stacks of 30 cartridges each
+ /// The entire package must be purchased in one go
+ ///
+ /// Session/Player id
+ /// Offer request from client
+ /// Full profile of player
+ /// Response to send to client
+ /// ItemEventRouterResponse
protected ItemEventRouterResponse CreatePackOffer(string sessionID, AddOfferRequestData offerRequest,
SptProfile fullProfile, ItemEventRouterResponse output)
{
@@ -766,15 +763,15 @@ public class RagfairController
return output;
}
- /**
- * Create a flea offer for a single item - includes an item with > 1 sized stack
- * e.g. 1 ammo stack of 30 cartridges
- * @param sessionID Session id
- * @param offerRequest Offer request from client
- * @param fullProfile Full profile of player
- * @param output Response to send to client
- * @returns IItemEventRouterResponse
- */
+ ///
+ /// Create a flea offer for a single item - includes an item with > 1 sized stack
+ /// e.g. 1 ammo stack of 30 cartridges
+ ///
+ /// Session/Player id
+ /// Offer request from client
+ /// Full profile of player
+ /// Response to send to client
+ /// ItemEventRouterResponse
protected ItemEventRouterResponse CreateSingleOffer(string sessionID, AddOfferRequestData offerRequest,
SptProfile fullProfile,
ItemEventRouterResponse output)
@@ -863,17 +860,17 @@ public class RagfairController
return output;
}
- /**
- * Charge player a listing fee for using flea, pulls charge from data previously sent by client
- * @param sessionID Player id
- * @param rootItem Base item being listed (used when client tax cost not found and must be done on server)
- * @param pmcData Player profile
- * @param requirementsPriceInRub Rouble cost player chose for listing (used when client tax cost not found and must be done on server)
- * @param itemStackCount How many items were listed by player (used when client tax cost not found and must be done on server)
- * @param offerRequest Add offer request object from client
- * @param output IItemEventRouterResponse
- * @returns True if charging tax to player failed
- */
+ ///
+ /// Charge player a listing fee for using flea, pulls charge from data previously sent by client
+ ///
+ ///
+ /// Base item being listed (used when client tax cost not found and must be done on server)
+ ///
+ /// Rouble cost player chose for listing (used when client tax cost not found and must be done on server)
+ /// How many items were listed by player (used when client tax cost not found and must be done on server)
+ /// Add offer request object from client
+ /// ItemEventRouterResponse
+ /// True if charging tax to player failed
protected bool ChargePlayerTaxFee(
string sessionId,
Item rootItem,
@@ -917,6 +914,14 @@ public class RagfairController
return false;
}
+ ///
+ /// Create a flea offer for a player
+ ///
+ /// Session/Player id
+ ///
+ /// Item(s) to list on flea (with children)
+ /// Is this a pack offer
+ /// RagfairOffer
protected RagfairOffer CreatePlayerOffer(string sessionId, List requirements, List- items,
bool sellInOnePiece)
{
@@ -957,11 +962,11 @@ public class RagfairController
);
}
- /**
- * Get the handbook price in roubles for the items being listed
- * @param requirements
- * @returns Rouble price
- */
+ ///
+ /// Get the handbook price in roubles for the items being listed
+ ///
+ ///
+ /// Rouble price
protected double CalculateRequirementsPriceInRub(List requirements)
{
return requirements.Sum(requirement =>
@@ -978,6 +983,12 @@ public class RagfairController
);
}
+ ///
+ /// Find items with their children from players inventory
+ ///
+ /// Players PMC profile
+ /// Request
+ /// GetItemsToListOnFleaFromInventoryResult
protected GetItemsToListOnFleaFromInventoryResult GetItemsToListOnFleaFromInventory(PmcData pmcData,
List itemIdsFromFleaOfferRequest)
{
@@ -1034,7 +1045,7 @@ public class RagfairController
///
/// Id of offer to remove
/// Session id of requesting player
- ///
+ /// ItemEventRouterResponse
public ItemEventRouterResponse FlagOfferForRemoval(string offerId, string sessionId)
{
var output = _eventOutputHolder.GetOutput(sessionId);
@@ -1088,6 +1099,12 @@ public class RagfairController
return output;
}
+ ///
+ /// Extend a flea offers active time
+ ///
+ /// Extend time request
+ /// Session/Player id
+ /// ItemEventRouterResponse
public ItemEventRouterResponse ExtendOffer(ExtendOfferRequestData extendRequest, string sessionId)
{
var output = _eventOutputHolder.GetOutput(sessionId);
@@ -1151,12 +1168,12 @@ public class RagfairController
return output;
}
- /**
- * Create a basic trader request object with price and currency type
- * @param currency What currency: RUB, EURO, USD
- * @param value Amount of currency
- * @returns IProcessBuyTradeRequestData
- */
+ ///
+ /// Create a basic trader request object with price and currency type
+ ///
+ /// What currency: RUB, EURO, USD
+ /// Amount of currency
+ /// ProcessBuyTradeRequestData
protected ProcessBuyTradeRequestData CreateBuyTradeRequestObject(CurrencyType currency, double value)
{
return new ProcessBuyTradeRequestData
@@ -1178,6 +1195,10 @@ public class RagfairController
};
}
+ ///
+ /// Get prices for all items on flea
+ ///
+ /// Dictionary of tpl and item price
public Dictionary GetAllFleaPrices()
{
return _ragfairPriceService.GetAllFleaPrices();
@@ -1188,7 +1209,7 @@ public class RagfairController
return _ragfairPriceService.GetAllStaticPrices();
}
- public RagfairOffer? GetOfferById(string sessionId, GetRagfairOfferByIdRequest request)
+ public RagfairOffer? GetOfferByInternalId(string sessionId, GetRagfairOfferByIdRequest request)
{
var offers = _ragfairOfferService.GetOffers();
var offerToReturn = offers.FirstOrDefault(offer => offer.InternalId == request.Id);
diff --git a/Libraries/Core/Controllers/RepeatableQuestController.cs b/Libraries/Core/Controllers/RepeatableQuestController.cs
index fd65d41e..bd99cf6e 100644
--- a/Libraries/Core/Controllers/RepeatableQuestController.cs
+++ b/Libraries/Core/Controllers/RepeatableQuestController.cs
@@ -46,9 +46,9 @@ public class RepeatableQuestController(
///
/// Handle RepeatableQuestChange event
///
- ///
+ /// Players PMC profile
/// Change quest request
- ///
+ /// Session/Player id
///
public ItemEventRouterResponse ChangeRepeatableQuest(PmcData pmcData, RepeatableQuestChangeRequest changeRequest,
string sessionID)
@@ -250,8 +250,8 @@ public class RepeatableQuestController(
///
/// Generate a repeatable quest
///
- ///
- ///
+ /// Session/Player id
+ /// Players PMC profile
/// What type/level range of quests can be generated for player
/// Config for the quest type to generate
///
@@ -359,7 +359,7 @@ public class RepeatableQuestController(
/// (if the are on "Succeed" but not "Completed" we keep them, to allow the player to complete them and get the rewards)
/// The new quests generated are again persisted in profile.RepeatableQuests
///
- ///
+ /// Session/Player id
/// Array of repeatable quests
public List GetClientRepeatableQuests(string sessionID)
{
@@ -495,7 +495,7 @@ public class RepeatableQuestController(
/// Get repeatable quest data from profile from name (daily/weekly), creates base repeatable quest object if none exists
///
/// daily/weekly config
- ///
+ /// Players PMC profile
/// PmcDataRepeatableQuest
protected PmcDataRepeatableQuest GetRepeatableQuestSubTypeFromProfile(RepeatableQuestConfig repeatableConfig,
PmcData pmcData)
@@ -530,7 +530,7 @@ public class RepeatableQuestController(
/// Check if a repeatable quest type (daily/weekly) is active for the given profile
///
/// Repeatable quest config
- ///
+ /// Players PMC profile
/// True if profile has access to repeatables
protected bool CanProfileAccessRepeatableQuests(RepeatableQuestConfig repeatableConfig, PmcData pmcData)
{
@@ -557,7 +557,7 @@ public class RepeatableQuestController(
///
/// Does player have daily pmc quests unlocked
///
- ///
+ /// Players PMC profile
/// Config of daily type to check
/// True if unlocked
protected static bool PlayerHasDailyPmcQuestsUnlocked(PmcData pmcData, RepeatableQuestConfig repeatableConfig)
@@ -568,7 +568,7 @@ public class RepeatableQuestController(
///
/// Does player have daily scav quests unlocked
///
- ///
+ /// Players PMC profile
/// True if unlocked
protected bool PlayerHasDailyScavQuestsUnlocked(PmcData pmcData)
{
@@ -581,7 +581,7 @@ public class RepeatableQuestController(
/// Expire quests and replace expired quests with ready-to-hand-in quests inside generatedRepeatables.activeQuests
///
/// Repeatables to process (daily/weekly)
- ///
+ /// Players PMC profile
protected void ProcessExpiredQuests(PmcDataRepeatableQuest generatedRepeatables, PmcData pmcData)
{
var questsToKeep = new List();
diff --git a/Libraries/Core/Utils/Watermark.cs b/Libraries/Core/Utils/Watermark.cs
index 5aa01704..53a549d1 100644
--- a/Libraries/Core/Utils/Watermark.cs
+++ b/Libraries/Core/Utils/Watermark.cs
@@ -125,11 +125,11 @@ public class Watermark
Draw();
}
- /**
- * Get a version string (x.x.x) or (x.x.x-BLEEDINGEDGE) OR (X.X.X (18xxx))
- * @param withEftVersion Include the eft version this spt version was made for
- * @returns string
- */
+ ///
+ /// Get a version string (x.x.x) or (x.x.x-BLEEDINGEDGE) OR (X.X.X (18xxx))
+ ///
+ /// Include the eft version this spt version was made for
+ ///
public string GetVersionTag(bool withEftVersion = false)
{
var sptVersion = ProgramStatics.SPT_VERSION() ?? sptConfig.SptVersion;