Updated method comments + made private methods protected
This commit is contained in:
@@ -16,7 +16,7 @@ public class AchievementCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetAchievements(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -28,7 +28,7 @@ public class AchievementCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string Statistic(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ public class BotCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetBotLimit(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -35,7 +35,7 @@ public class BotCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetBotDifficulty(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -58,7 +58,7 @@ public class BotCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetAllBotDifficulties(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -70,7 +70,7 @@ public class BotCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GenerateBots(string url, GenerateBotsRequestData info, string sessionID)
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@ public class BuildsCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetBuilds(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -30,7 +30,7 @@ public class BuildsCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string CreateMagazineTemplate(string url, SetMagazineRequest info, string sessionID)
|
||||
{
|
||||
@@ -43,7 +43,7 @@ public class BuildsCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string SetWeapon(string url, PresetBuildActionRequestData info, string sessionID)
|
||||
{
|
||||
@@ -56,7 +56,7 @@ public class BuildsCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string SetEquipment(string url, PresetBuildActionRequestData info, string sessionID)
|
||||
{
|
||||
@@ -69,7 +69,7 @@ public class BuildsCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string DeleteBuild(string url, RemoveBuildRequestData info, string sessionID)
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ public class BundleCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetBundles(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@ public class ClientLogCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string ClientLog(string url, ClientLogRequest info, string sessionID)
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@ public class CustomizationCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetCustomisationUnlocks(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -32,7 +32,7 @@ public class CustomizationCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetTraderSuits(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -45,9 +45,9 @@ public class CustomizationCallbacks(
|
||||
/// <summary>
|
||||
/// Handle CustomizationBuy event
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse BuyCustomisation(PmcData pmcData, BuyClothingRequestData info, string sessionID)
|
||||
{
|
||||
@@ -59,7 +59,7 @@ public class CustomizationCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetHideoutCustomisation(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -71,7 +71,7 @@ public class CustomizationCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetStorage(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -81,9 +81,9 @@ public class CustomizationCallbacks(
|
||||
/// <summary>
|
||||
/// Handle CustomizationSet
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse SetCustomisation(PmcData pmcData, CustomizationSetRequest info, string sessionID)
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ public class DataCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetSettings(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -32,7 +32,7 @@ public class DataCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetGlobals(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -47,7 +47,7 @@ public class DataCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetTemplateItems(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -59,7 +59,7 @@ public class DataCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetTemplateHandbook(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -71,7 +71,7 @@ public class DataCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetTemplateSuits(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -83,7 +83,7 @@ public class DataCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetTemplateCharacter(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -95,7 +95,7 @@ public class DataCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetHideoutSettings(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -107,7 +107,7 @@ public class DataCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetHideoutAreas(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -119,7 +119,7 @@ public class DataCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetHideoutProduction(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -131,7 +131,7 @@ public class DataCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetLocalesLanguages(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -143,7 +143,7 @@ public class DataCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetLocalesMenu(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -164,7 +164,7 @@ public class DataCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetLocalesGlobal(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -180,7 +180,7 @@ public class DataCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetQteList(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -192,7 +192,7 @@ public class DataCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetItemPrices(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@ public class DialogueCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public virtual string GetFriendList(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -46,7 +46,7 @@ public class DialogueCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public virtual string GetChatServerList(string url, GetChatServerListRequestData info, string sessionID)
|
||||
{
|
||||
@@ -81,7 +81,7 @@ public class DialogueCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public virtual string GetMailDialogList(string url, GetMailDialogListRequestData info, string sessionID)
|
||||
{
|
||||
@@ -93,7 +93,7 @@ public class DialogueCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public virtual string GetMailDialogView(string url, GetMailDialogViewRequestData info, string sessionID)
|
||||
{
|
||||
@@ -105,7 +105,7 @@ public class DialogueCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public virtual string GetMailDialogInfo(string url, GetMailDialogInfoRequestData info, string sessionID)
|
||||
{
|
||||
@@ -117,7 +117,7 @@ public class DialogueCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public virtual string RemoveDialog(string url, RemoveDialogRequestData info, string sessionID)
|
||||
{
|
||||
@@ -130,7 +130,7 @@ public class DialogueCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public virtual string PinDialog(string url, PinDialogRequestData info, string sessionID)
|
||||
{
|
||||
@@ -143,7 +143,7 @@ public class DialogueCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public virtual string UnpinDialog(string url, PinDialogRequestData info, string sessionID)
|
||||
{
|
||||
@@ -156,7 +156,7 @@ public class DialogueCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public virtual string SetRead(string url, SetDialogReadRequestData info, string sessionID)
|
||||
{
|
||||
@@ -169,7 +169,7 @@ public class DialogueCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public virtual string GetAllAttachments(string url, GetAllAttachmentsRequestData info, string sessionID)
|
||||
{
|
||||
@@ -181,7 +181,7 @@ public class DialogueCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public virtual string SendMessage(string url, SendMessageRequest info, string sessionID)
|
||||
{
|
||||
@@ -193,7 +193,7 @@ public class DialogueCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public virtual string ListOutbox(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -205,7 +205,7 @@ public class DialogueCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public virtual string ListInbox(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -217,7 +217,7 @@ public class DialogueCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public virtual string SendFriendRequest(string url, FriendRequestData info, string sessionID)
|
||||
{
|
||||
@@ -229,7 +229,7 @@ public class DialogueCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public virtual string AcceptAllFriendRequests(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -241,7 +241,7 @@ public class DialogueCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public virtual string AcceptFriendRequest(string url, AcceptFriendRequestData info, string sessionID)
|
||||
{
|
||||
@@ -253,7 +253,7 @@ public class DialogueCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public virtual string DeclineFriendRequest(string url, DeclineFriendRequestData info, string sessionID)
|
||||
{
|
||||
@@ -265,7 +265,7 @@ public class DialogueCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public virtual string CancelFriendRequest(string url, CancelFriendRequestData info, string sessionID)
|
||||
{
|
||||
@@ -277,7 +277,7 @@ public class DialogueCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public virtual string DeleteFriend(string url, DeleteFriendRequest info, string sessionID)
|
||||
{
|
||||
@@ -290,7 +290,7 @@ public class DialogueCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public virtual string IgnoreFriend(string url, UIDRequestData info, string sessionID)
|
||||
{
|
||||
@@ -302,7 +302,7 @@ public class DialogueCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public virtual string UnIgnoreFriend(string url, UIDRequestData info, string sessionID)
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@ public class GameCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string VersionValidate(string url, VersionValidateRequestData info, string sessionID)
|
||||
{
|
||||
@@ -47,7 +47,7 @@ public class GameCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GameStart(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -67,7 +67,7 @@ public class GameCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GameLogout(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -85,7 +85,7 @@ public class GameCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetGameConfig(string url, GameEmptyCrcRequestData info, string sessionID)
|
||||
{
|
||||
@@ -97,7 +97,7 @@ public class GameCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetGameMode(string url, GameModeRequestData info, string sessionID)
|
||||
{
|
||||
@@ -109,7 +109,7 @@ public class GameCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetServer(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -121,7 +121,7 @@ public class GameCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetCurrentGroup(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -133,7 +133,7 @@ public class GameCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string ValidateGameVersion(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -145,7 +145,7 @@ public class GameCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GameKeepalive(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -157,7 +157,7 @@ public class GameCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetVersion(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -175,7 +175,7 @@ public class GameCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string ReportNickname(string url, UIDRequestData info, string sessionID)
|
||||
{
|
||||
@@ -187,7 +187,7 @@ public class GameCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetRaidTime(string url, GetRaidTimeRequest info, string sessionID)
|
||||
{
|
||||
@@ -199,7 +199,7 @@ public class GameCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetSurvey(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -211,7 +211,7 @@ public class GameCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetSurveyView(string url, SendSurveyOpinionRequest info, string sessionID)
|
||||
{
|
||||
@@ -223,7 +223,7 @@ public class GameCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string SendSurveyOpinion(string url, SendSurveyOpinionRequest info, string sessionID)
|
||||
{
|
||||
|
||||
@@ -31,9 +31,9 @@ public class HealthCallbacks(
|
||||
/// <summary>
|
||||
/// Handle Eat
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse OffraidEat(PmcData pmcData, OffraidEatRequestData info, string sessionID)
|
||||
{
|
||||
@@ -43,9 +43,9 @@ public class HealthCallbacks(
|
||||
/// <summary>
|
||||
/// Handle Heal
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse OffraidHeal(PmcData pmcData, OffraidHealRequestData info, string sessionID)
|
||||
{
|
||||
@@ -55,9 +55,9 @@ public class HealthCallbacks(
|
||||
/// <summary>
|
||||
/// Handle RestoreHealth
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse HealthTreatment(PmcData pmcData, HealthTreatmentRequestData info, string sessionID)
|
||||
{
|
||||
|
||||
@@ -44,7 +44,7 @@ public class InsuranceCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetInsuranceCost(string url, GetInsuranceCostRequestData info, string sessionID)
|
||||
{
|
||||
@@ -54,9 +54,9 @@ public class InsuranceCallbacks(
|
||||
/// <summary>
|
||||
/// Handle Insure event
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse Insure(PmcData pmcData, InsureRequestData info, string sessionID)
|
||||
{
|
||||
|
||||
@@ -16,10 +16,10 @@ public class InventoryCallbacks(
|
||||
/// <summary>
|
||||
/// Handle client/game/profile/items/moving Move event
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="output"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse MoveItem(PmcData pmcData, InventoryMoveRequestData info, string sessionID,
|
||||
ItemEventRouterResponse output)
|
||||
@@ -31,25 +31,25 @@ public class InventoryCallbacks(
|
||||
/// <summary>
|
||||
/// Handle Remove event
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="output"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse RemoveItem(PmcData pmcData, InventoryRemoveRequestData info, string sessionID,
|
||||
ItemEventRouterResponse output)
|
||||
{
|
||||
_inventoryController.RemoveItem(pmcData, info, sessionID, output);
|
||||
_inventoryController.DiscardItem(pmcData, info, sessionID, output);
|
||||
return output;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle Split event
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="output"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse SplitItem(PmcData pmcData, InventorySplitRequestData info, string sessionID,
|
||||
ItemEventRouterResponse output)
|
||||
@@ -60,10 +60,10 @@ public class InventoryCallbacks(
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="output"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse MergeItem(PmcData pmcData, InventoryMergeRequestData info, string sessionID,
|
||||
ItemEventRouterResponse output)
|
||||
@@ -74,10 +74,10 @@ public class InventoryCallbacks(
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="output"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse TransferItem(PmcData pmcData, InventoryTransferRequestData info, string sessionID,
|
||||
ItemEventRouterResponse output)
|
||||
@@ -89,9 +89,9 @@ public class InventoryCallbacks(
|
||||
/// <summary>
|
||||
/// Handle Swap
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse SwapItem(PmcData pmcData, InventorySwapRequestData info, string sessionID)
|
||||
{
|
||||
@@ -100,9 +100,9 @@ public class InventoryCallbacks(
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse FoldItem(PmcData pmcData, InventoryFoldRequestData info, string sessionID)
|
||||
{
|
||||
@@ -111,9 +111,9 @@ public class InventoryCallbacks(
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse ToggleItem(PmcData pmcData, InventoryToggleRequestData info, string sessionID)
|
||||
{
|
||||
@@ -122,9 +122,9 @@ public class InventoryCallbacks(
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse TagItem(PmcData pmcData, InventoryTagRequestData request, string sessionId)
|
||||
{
|
||||
@@ -133,10 +133,10 @@ public class InventoryCallbacks(
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="output"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse BindItem(PmcData pmcData, InventoryBindRequestData info, string sessionID,
|
||||
ItemEventRouterResponse output)
|
||||
@@ -147,10 +147,10 @@ public class InventoryCallbacks(
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="output"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse UnBindItem(PmcData pmcData, InventoryBindRequestData info, string sessionID,
|
||||
ItemEventRouterResponse output)
|
||||
@@ -161,10 +161,10 @@ public class InventoryCallbacks(
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="output"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse ExamineItem(PmcData pmcData, InventoryExamineRequestData info, string sessionID,
|
||||
ItemEventRouterResponse output)
|
||||
@@ -176,9 +176,9 @@ public class InventoryCallbacks(
|
||||
/// <summary>
|
||||
/// Handle ReadEncyclopedia
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse ReadEncyclopedia(PmcData pmcData, InventoryReadEncyclopediaRequestData info,
|
||||
string sessionID)
|
||||
@@ -189,10 +189,10 @@ public class InventoryCallbacks(
|
||||
/// <summary>
|
||||
/// Handle ApplyInventoryChanges
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="output"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse SortInventory(PmcData pmcData, InventorySortRequestData info, string sessionID,
|
||||
ItemEventRouterResponse output)
|
||||
@@ -203,10 +203,10 @@ public class InventoryCallbacks(
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="output"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse CreateMapMarker(PmcData pmcData, InventoryCreateMarkerRequestData info,
|
||||
string sessionID, ItemEventRouterResponse output)
|
||||
@@ -217,10 +217,10 @@ public class InventoryCallbacks(
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="output"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse DeleteMapMarker(PmcData pmcData, InventoryDeleteMarkerRequestData info,
|
||||
string sessionID, ItemEventRouterResponse output)
|
||||
@@ -231,10 +231,10 @@ public class InventoryCallbacks(
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="output"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse EditMapMarker(PmcData pmcData, InventoryEditMarkerRequestData info, string sessionID,
|
||||
ItemEventRouterResponse output)
|
||||
@@ -246,10 +246,10 @@ public class InventoryCallbacks(
|
||||
/// <summary>
|
||||
/// Handle OpenRandomLootContainer
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="output"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse OpenRandomLootContainer(PmcData pmcData, OpenRandomLootContainerRequestData info,
|
||||
string sessionID,
|
||||
@@ -261,10 +261,10 @@ public class InventoryCallbacks(
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="output"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse RedeemProfileReward(PmcData pmcData, RedeemProfileRequestData info, string sessionID,
|
||||
ItemEventRouterResponse output)
|
||||
@@ -274,11 +274,12 @@ public class InventoryCallbacks(
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle game/profile/items/moving SetFavoriteItems
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="output"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse SetFavoriteItem(PmcData pmcData, SetFavoriteItems info, string sessionID,
|
||||
ItemEventRouterResponse output)
|
||||
@@ -291,10 +292,10 @@ public class InventoryCallbacks(
|
||||
/// TODO: MOVE INTO QUEST CODE
|
||||
/// Handle game/profile/items/moving - QuestFail
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="output"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse FailQuest(PmcData pmcData, FailQuestRequestData info, string sessionID,
|
||||
ItemEventRouterResponse output)
|
||||
@@ -305,10 +306,10 @@ public class InventoryCallbacks(
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="output"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse PinOrLock(PmcData pmcData, PinOrLockItemRequest info, string sessionID,
|
||||
ItemEventRouterResponse output)
|
||||
|
||||
@@ -17,7 +17,7 @@ public class LocationCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetLocationData(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -29,7 +29,7 @@ public class LocationCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetAirdropLoot(string url, GetAirdropLootRequest info, string sessionID)
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@ public class MatchCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string UpdatePing(string url, UpdatePingRequestData info, string sessionID)
|
||||
{
|
||||
@@ -32,7 +32,7 @@ public class MatchCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string ExitMatch(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -44,7 +44,7 @@ public class MatchCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string ExitFromMenu(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -56,7 +56,7 @@ public class MatchCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GroupCurrent(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -73,7 +73,7 @@ public class MatchCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string StartGroupSearch(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -85,7 +85,7 @@ public class MatchCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string StopGroupSearch(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -97,7 +97,7 @@ public class MatchCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string SendGroupInvite(string url, MatchGroupInviteSendRequest info, string sessionID)
|
||||
{
|
||||
@@ -109,7 +109,7 @@ public class MatchCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string AcceptGroupInvite(string url, RequestIdRequest info, string sessionID)
|
||||
{
|
||||
@@ -126,7 +126,7 @@ public class MatchCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string DeclineGroupInvite(string url, RequestIdRequest info, string sessionID)
|
||||
{
|
||||
@@ -138,7 +138,7 @@ public class MatchCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string CancelGroupInvite(string url, RequestIdRequest info, string sessionID)
|
||||
{
|
||||
@@ -150,7 +150,7 @@ public class MatchCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string TransferGroup(string url, MatchGroupTransferRequest info, string sessionID)
|
||||
{
|
||||
@@ -162,7 +162,7 @@ public class MatchCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string CancelAllGroupInvite(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -174,7 +174,7 @@ public class MatchCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string PutMetrics(string url, PutMetricsRequestData info, string sessionID)
|
||||
{
|
||||
@@ -186,7 +186,7 @@ public class MatchCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string EventDisconnect(string url, PutMetricsRequestData info, string sessionID)
|
||||
{
|
||||
@@ -198,7 +198,7 @@ public class MatchCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string ServerAvailable(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -210,7 +210,7 @@ public class MatchCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string JoinMatch(string url, MatchGroupStartGameRequest info, string sessionID)
|
||||
{
|
||||
@@ -222,7 +222,7 @@ public class MatchCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetMetrics(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -235,7 +235,7 @@ public class MatchCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetGroupStatus(string url, MatchGroupStatusRequest info, string sessionID)
|
||||
{
|
||||
@@ -247,7 +247,7 @@ public class MatchCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string DeleteGroup(string url, DeleteGroupRequest info, string sessionID)
|
||||
{
|
||||
@@ -260,7 +260,7 @@ public class MatchCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string LeaveGroup(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -272,7 +272,7 @@ public class MatchCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string RemovePlayerFromGroup(string url, MatchGroupPlayerRemoveRequest info, string sessionID)
|
||||
{
|
||||
@@ -284,7 +284,7 @@ public class MatchCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string StartLocalRaid(string url, StartLocalRaidRequestData info, string sessionID)
|
||||
{
|
||||
@@ -296,7 +296,7 @@ public class MatchCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string EndLocalRaid(string url, EndLocalRaidRequestData info, string sessionID)
|
||||
{
|
||||
@@ -309,7 +309,7 @@ public class MatchCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetRaidConfiguration(string url, GetRaidConfigurationRequestData info, string sessionID)
|
||||
{
|
||||
@@ -322,7 +322,7 @@ public class MatchCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetConfigurationByProfile(string url, GetRaidConfigurationRequestData info, string sessionID)
|
||||
{
|
||||
@@ -334,7 +334,7 @@ public class MatchCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string RaidReady(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -346,7 +346,7 @@ public class MatchCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string NotRaidReady(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
|
||||
@@ -12,9 +12,9 @@ public class NoteCallbacks(NoteController _noteController)
|
||||
/// <summary>
|
||||
/// Handle AddNote event
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse AddNote(PmcData pmcData, NoteActionData info, string sessionID)
|
||||
{
|
||||
@@ -24,9 +24,9 @@ public class NoteCallbacks(NoteController _noteController)
|
||||
/// <summary>
|
||||
/// Handle EditNote event
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse EditNote(PmcData pmcData, NoteActionData info, string sessionID)
|
||||
{
|
||||
@@ -36,9 +36,9 @@ public class NoteCallbacks(NoteController _noteController)
|
||||
/// <summary>
|
||||
/// Handle DeleteNote event
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse DeleteNote(PmcData pmcData, NoteActionData info, string sessionID)
|
||||
{
|
||||
|
||||
@@ -51,7 +51,7 @@ public class NotifierCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string CreateNotifierChannel(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -63,7 +63,7 @@ public class NotifierCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string SelectProfile(string url, UIDRequestData info, string sessionID)
|
||||
{
|
||||
@@ -79,7 +79,7 @@ public class NotifierCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string Notify(string url, object info, string sessionID)
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ public class PrestigeCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetPrestige(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -29,7 +29,7 @@ public class PrestigeCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string ObtainPrestige(string url, ObtainPrestigeRequestList info, string sessionID)
|
||||
{
|
||||
|
||||
@@ -17,9 +17,9 @@ public class QuestCallbacks(
|
||||
/// <summary>
|
||||
/// Handle RepeatableQuestChange event
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse ChangeRepeatableQuest(PmcData pmcData, RepeatableQuestChangeRequest info, string sessionID)
|
||||
{
|
||||
@@ -29,9 +29,9 @@ public class QuestCallbacks(
|
||||
/// <summary>
|
||||
/// Handle QuestAccept event
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse AcceptQuest(PmcData pmcData, AcceptQuestRequestData info, string sessionID)
|
||||
{
|
||||
@@ -46,9 +46,9 @@ public class QuestCallbacks(
|
||||
/// <summary>
|
||||
/// Handle QuestComplete event
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse CompleteQuest(PmcData pmcData, CompleteQuestRequestData info, string sessionID)
|
||||
{
|
||||
@@ -58,9 +58,9 @@ public class QuestCallbacks(
|
||||
/// <summary>
|
||||
/// Handle QuestHandover event
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse HandoverQuest(PmcData pmcData, HandoverQuestRequestData info, string sessionID)
|
||||
{
|
||||
@@ -72,7 +72,7 @@ public class QuestCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string ListQuests(string url, ListQuestsRequestData info, string sessionID)
|
||||
{
|
||||
@@ -84,7 +84,7 @@ public class QuestCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string ActivityPeriods(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
|
||||
@@ -62,7 +62,7 @@ public class RagfairCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string Search(string url, SearchRequestData info, string sessionID)
|
||||
{
|
||||
@@ -74,7 +74,7 @@ public class RagfairCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetMarketPrice(string url, GetMarketPriceRequestData info, string sessionID)
|
||||
{
|
||||
@@ -84,9 +84,9 @@ public class RagfairCallbacks(
|
||||
/// <summary>
|
||||
/// Handle RagFairAddOffer event
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse AddOffer(PmcData pmcData, AddOfferRequestData info, string sessionID)
|
||||
{
|
||||
@@ -96,9 +96,9 @@ public class RagfairCallbacks(
|
||||
/// <summary>
|
||||
/// Handle RagFairRemoveOffer event
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse RemoveOffer(PmcData pmcData, RemoveOfferRequestData info, string sessionID)
|
||||
{
|
||||
@@ -108,9 +108,9 @@ public class RagfairCallbacks(
|
||||
/// <summary>
|
||||
/// Handle RagFairRenewOffer event
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse ExtendOffer(PmcData pmcData, ExtendOfferRequestData info, string sessionID)
|
||||
{
|
||||
@@ -123,7 +123,7 @@ public class RagfairCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetFleaPrices(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -135,7 +135,7 @@ public class RagfairCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string SendReport(string url, SendRagfairReportRequestData info, string sessionID)
|
||||
{
|
||||
@@ -153,7 +153,7 @@ public class RagfairCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetFleaOfferById(string url, GetRagfairOfferByIdRequest info, string sessionID)
|
||||
{
|
||||
|
||||
@@ -13,9 +13,9 @@ public class RepairCallbacks(RepairController _repairController)
|
||||
/// Handle TraderRepair event
|
||||
/// use trader to repair item
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse TraderRepair(PmcData pmcData, TraderRepairActionDataRequest info, string sessionID)
|
||||
{
|
||||
@@ -26,9 +26,9 @@ public class RepairCallbacks(RepairController _repairController)
|
||||
/// Handle Repair event
|
||||
/// Use repair kit to repair item
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse Repair(PmcData pmcData, RepairActionDataRequest info, string sessionID)
|
||||
{
|
||||
|
||||
@@ -12,9 +12,9 @@ public class TradeCallbacks(TradeController _tradeController)
|
||||
/// <summary>
|
||||
/// Handle client/game/profile/items/moving TradingConfirm event
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse ProcessTrade(PmcData pmcData, ProcessBaseTradeRequestData info, string sessionID)
|
||||
{
|
||||
@@ -24,9 +24,9 @@ public class TradeCallbacks(TradeController _tradeController)
|
||||
/// <summary>
|
||||
/// Handle RagFairBuyOffer event
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse ProcessRagfairTrade(PmcData pmcData, ProcessRagfairTradeRequestData info, string sessionID)
|
||||
{
|
||||
@@ -36,9 +36,9 @@ public class TradeCallbacks(TradeController _tradeController)
|
||||
/// <summary>
|
||||
/// Handle SellAllFromSavage event
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse SellAllFromSavage(PmcData pmcData, SellScavItemsToFenceRequestData info, string sessionID)
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ public class TraderCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetTraderSettings(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -52,7 +52,7 @@ public class TraderCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetTrader(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -65,7 +65,7 @@ public class TraderCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetAssort(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -78,7 +78,7 @@ public class TraderCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetModdedTraderData(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ public class WeatherCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetWeather(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
@@ -28,7 +28,7 @@ public class WeatherCallbacks(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetLocalWeather(string url, EmptyRequestData info, string sessionID)
|
||||
{
|
||||
|
||||
@@ -12,9 +12,9 @@ public class WishlistCallbacks(WishlistController _wishlistController)
|
||||
/// <summary>
|
||||
/// Handle AddToWishList event
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse AddToWishlist(PmcData pmcData, AddToWishlistRequest info, string sessionID)
|
||||
{
|
||||
@@ -24,9 +24,9 @@ public class WishlistCallbacks(WishlistController _wishlistController)
|
||||
/// <summary>
|
||||
/// Handle RemoveFromWishList event
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse RemoveFromWishlist(PmcData pmcData, RemoveFromWishlistRequest info, string sessionID)
|
||||
{
|
||||
@@ -36,9 +36,9 @@ public class WishlistCallbacks(WishlistController _wishlistController)
|
||||
/// <summary>
|
||||
/// Handle ChangeWishlistItemCategory
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse ChangeWishlistItemCategory(PmcData pmcData, ChangeWishlistItemCategoryRequest info, string sessionID)
|
||||
{
|
||||
|
||||
@@ -5,8 +5,8 @@ namespace Core.Context;
|
||||
[Injectable(InjectionType.Singleton)]
|
||||
public class ApplicationContext
|
||||
{
|
||||
private const short MaxSavedValues = 10;
|
||||
private readonly Dictionary<ContextVariableType, LinkedList<ContextVariable>> variables = new();
|
||||
protected const short MaxSavedValues = 10;
|
||||
protected readonly Dictionary<ContextVariableType, LinkedList<ContextVariable>> variables = new();
|
||||
private readonly Lock variablesLock = new();
|
||||
|
||||
public ContextVariable? GetLatestValue(ContextVariableType type)
|
||||
|
||||
@@ -16,6 +16,11 @@ public class AchievementController(
|
||||
{
|
||||
protected CoreConfig coreConfig = configServer.GetConfig<CoreConfig>();
|
||||
|
||||
/// <summary>
|
||||
/// Get base achievements
|
||||
/// </summary>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public virtual GetAchievementsResponse GetAchievements(string sessionID)
|
||||
{
|
||||
return new GetAchievementsResponse
|
||||
@@ -24,6 +29,11 @@ public class AchievementController(
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Shows % of 'other' players who've completed each achievement
|
||||
/// </summary>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns>CompletedAchievementsResponse</returns>
|
||||
public virtual CompletedAchievementsResponse GetAchievementStatics(string sessionId)
|
||||
{
|
||||
var stats = new Dictionary<string, int>();
|
||||
|
||||
@@ -40,11 +40,11 @@ public class BotController(
|
||||
private readonly BotConfig _botConfig = _configServer.GetConfig<BotConfig>();
|
||||
private readonly PmcConfig _pmcConfig = _configServer.GetConfig<PmcConfig>();
|
||||
|
||||
/**
|
||||
* Return the number of bot load-out varieties to be generated
|
||||
* @param type bot Type we want the load-out gen count for
|
||||
* @returns number of bots to generate
|
||||
*/
|
||||
/// <summary>
|
||||
/// Return the number of bot load-out varieties to be generated
|
||||
/// </summary>
|
||||
/// <param name="type">bot Type we want the load-out gen count for</param>
|
||||
/// <returns>number of bots to generate</returns>
|
||||
public int GetBotPresetGenerationLimit(string type)
|
||||
{
|
||||
|
||||
@@ -59,11 +59,25 @@ public class BotController(
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle singleplayer/settings/bot/difficulty
|
||||
/// Get the core.json difficulty settings from database/bots
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Dictionary<string, object> GetBotCoreDifficulty()
|
||||
{
|
||||
return _databaseService.GetBots().Core!;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get bot difficulty settings
|
||||
/// Adjust PMC settings to ensure they engage the correct bot types
|
||||
/// </summary>
|
||||
/// <param name="type">what bot the server is requesting settings for</param>
|
||||
/// <param name="diffLevel">difficulty level server requested settings for</param>
|
||||
/// <param name="raidConfig">OPTIONAL - applicationContext Data stored at start of raid</param>
|
||||
/// <param name="ignoreRaidSettings">OPTIONAL - should raid settings chosen pre-raid be ignored</param>
|
||||
/// <returns>Difficulty object</returns>
|
||||
public DifficultyCategories GetBotDifficulty(string type, string diffLevel, GetRaidConfigurationRequestData? raidConfig, bool ignoreRaidSettings = false)
|
||||
{
|
||||
var difficulty = diffLevel.ToLower();
|
||||
@@ -145,14 +159,27 @@ public class BotController(
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<BotBase> Generate(string sessionId, GenerateBotsRequestData info)
|
||||
/// <summary>
|
||||
/// Generate bots for a wave
|
||||
/// </summary>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="request"></param>
|
||||
/// <returns>List of bots</returns>
|
||||
public List<BotBase> Generate(string sessionId, GenerateBotsRequestData request)
|
||||
{
|
||||
var pmcProfile = _profileHelper.GetPmcProfile(sessionId);
|
||||
|
||||
return GenerateBotWaves(info, pmcProfile, sessionId);
|
||||
return GenerateBotWaves(request, pmcProfile, sessionId);
|
||||
}
|
||||
|
||||
private List<BotBase> GenerateBotWaves(GenerateBotsRequestData request, PmcData? pmcProfile, string sessionId)
|
||||
/// <summary>
|
||||
/// Generate bots for passed in wave data
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="pmcProfile">Player generating bots</param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns>List of generated bots</returns>
|
||||
protected List<BotBase> GenerateBotWaves(GenerateBotsRequestData request, PmcData? pmcProfile, string sessionId)
|
||||
{
|
||||
var result = new List<BotBase>();
|
||||
|
||||
@@ -187,13 +214,20 @@ public class BotController(
|
||||
return result;
|
||||
}
|
||||
|
||||
private List<BotBase> GenerateBotWave(GenerateCondition condition, BotGenerationDetails botGenerationDetails, string sessionId)
|
||||
/// <summary>
|
||||
/// Generate bots for a single wave request
|
||||
/// </summary>
|
||||
/// <param name="generateRequest"></param>
|
||||
/// <param name="botGenerationDetails"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns></returns>
|
||||
protected List<BotBase> GenerateBotWave(GenerateCondition generateRequest, BotGenerationDetails botGenerationDetails, string sessionId)
|
||||
{
|
||||
var isEventBot = condition.Role?.ToLower().Contains("event");
|
||||
var isEventBot = generateRequest.Role?.ToLower().Contains("event");
|
||||
if (isEventBot.GetValueOrDefault(false))
|
||||
{
|
||||
// Add eventRole data + reassign role property to be base type
|
||||
botGenerationDetails.EventRole = condition.Role;
|
||||
botGenerationDetails.EventRole = generateRequest.Role;
|
||||
botGenerationDetails.Role = _seasonalEventService.GetBaseRoleForEventBot(
|
||||
botGenerationDetails.EventRole
|
||||
);
|
||||
@@ -241,7 +275,11 @@ public class BotController(
|
||||
return results;
|
||||
}
|
||||
|
||||
private GetRaidConfigurationRequestData? GetMostRecentRaidSettings()
|
||||
/// <summary>
|
||||
/// Pull raid settings from Application context
|
||||
/// </summary>
|
||||
/// <returns>GetRaidConfigurationRequestData if it exists</returns>
|
||||
protected GetRaidConfigurationRequestData? GetMostRecentRaidSettings()
|
||||
{
|
||||
var raidSettings = _applicationContext
|
||||
.GetLatestValue(ContextVariableType.RAID_CONFIGURATION)
|
||||
@@ -255,12 +293,27 @@ public class BotController(
|
||||
return raidSettings;
|
||||
}
|
||||
|
||||
private MinMax<int> GetPmcLevelRangeForMap(string? location)
|
||||
/// <summary>
|
||||
/// Get min/max level range values for a specific map
|
||||
/// </summary>
|
||||
/// <param name="location">Map name e.g. factory4_day</param>
|
||||
/// <returns>MinMax values</returns>
|
||||
protected MinMax<int> GetPmcLevelRangeForMap(string? location)
|
||||
{
|
||||
return _pmcConfig.LocationSpecificPmcLevelOverride!.GetValueOrDefault(location?.ToLower() ?? "", null);
|
||||
}
|
||||
|
||||
private BotGenerationDetails GetBotGenerationDetailsForWave(
|
||||
/// <summary>
|
||||
/// Create a BotGenerationDetails for the bot generator to use
|
||||
/// </summary>
|
||||
/// <param name="condition">Data from client defining bot type and difficulty</param>
|
||||
/// <param name="pmcProfile">Player who is generating bots</param>
|
||||
/// <param name="allPmcsHaveSameNameAsPlayer">Should all PMCs have same name as player</param>
|
||||
/// <param name="raidSettings">Settings chosen pre-raid by player in client</param>
|
||||
/// <param name="botCountToGenerate">How many bots to generate</param>
|
||||
/// <param name="generateAsPmc">Force bot being generated to be a PMC</param>
|
||||
/// <returns>BotGenerationDetails</returns>
|
||||
protected BotGenerationDetails GetBotGenerationDetailsForWave(
|
||||
GenerateCondition condition,
|
||||
PmcData? pmcProfile,
|
||||
bool allPmcsHaveSameNameAsPlayer,
|
||||
@@ -285,6 +338,12 @@ public class BotController(
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the max number of bots allowed on a map
|
||||
/// Looks up location player is entering when getting cap value
|
||||
/// </summary>
|
||||
/// <param name="location">The map location cap was requested for</param>
|
||||
/// <returns>bot cap for map</returns>
|
||||
public int GetBotCap(string location)
|
||||
{
|
||||
var botCap = _botConfig.MaxBotCap.FirstOrDefault(x =>
|
||||
@@ -299,6 +358,10 @@ public class BotController(
|
||||
return botCap.Value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get weights for what each bot type should use as a brain - used by client
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public AiBotBrainTypes GetAiBotBrainTypes()
|
||||
{
|
||||
return new AiBotBrainTypes
|
||||
|
||||
@@ -29,7 +29,7 @@ public class BuildController(
|
||||
/// <summary>
|
||||
/// Handle client/handbook/builds/my/list
|
||||
/// </summary>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <returns></returns>
|
||||
public UserBuilds? GetUserBuilds(string sessionID)
|
||||
{
|
||||
@@ -86,7 +86,7 @@ public class BuildController(
|
||||
/// <summary>
|
||||
/// Handle client/builds/weapon/save
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="body"></param>
|
||||
public void SaveWeaponBuild(string sessionId, PresetBuildActionRequestData body)
|
||||
{
|
||||
@@ -126,7 +126,7 @@ public class BuildController(
|
||||
/// <summary>
|
||||
/// Handle client/builds/equipment/save event
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <param name="request"></param>
|
||||
public void SaveEquipmentBuild(string sessionID, PresetBuildActionRequestData request)
|
||||
{
|
||||
@@ -169,7 +169,7 @@ public class BuildController(
|
||||
/// <summary>
|
||||
/// Handle client/builds/delete
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="request"></param>
|
||||
public void RemoveBuild(string sessionId, RemoveBuildRequestData request)
|
||||
{
|
||||
@@ -182,7 +182,7 @@ public class BuildController(
|
||||
/// <summary>
|
||||
/// Handle client/builds/magazine/save
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="request"></param>
|
||||
public void CreateMagazineTemplate(string sessionId, SetMagazineRequest request)
|
||||
{
|
||||
@@ -213,10 +213,12 @@ public class BuildController(
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle client/builds/delete
|
||||
/// Remove build from players profile
|
||||
/// </summary>
|
||||
/// <param name="idToRemove"></param>
|
||||
/// <param name="sessionId"></param>
|
||||
private void RemovePlayerBuild(string idToRemove, string sessionID)
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
protected void RemovePlayerBuild(string idToRemove, string sessionID)
|
||||
{
|
||||
var profile = _saveServer.GetProfile(sessionID);
|
||||
var weaponBuilds = profile.UserBuildData.WeaponBuilds;
|
||||
|
||||
@@ -120,7 +120,13 @@ public class CustomizationController(
|
||||
return output;
|
||||
}
|
||||
|
||||
private bool OutfitAlreadyPurchased(object suitId, string sessionId)
|
||||
/// <summary>
|
||||
/// Has an outfit been purchased by a player
|
||||
/// </summary>
|
||||
/// <param name="suitId">clothing id</param>
|
||||
/// <param name="sessionId">Session id of profile to check for clothing in</param>
|
||||
/// <returns>true if already purchased</returns>
|
||||
protected bool OutfitAlreadyPurchased(object suitId, string sessionId)
|
||||
{
|
||||
var suits = _saveServer.GetProfile(sessionId).Suits;
|
||||
|
||||
@@ -132,7 +138,13 @@ public class CustomizationController(
|
||||
return suits.Contains(suitId);
|
||||
}
|
||||
|
||||
private Suit? GetTraderClothingOffer(string sessionId, string? offerId)
|
||||
/// <summary>
|
||||
/// Get clothing offer from trader by suit id
|
||||
/// </summary>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="offerId"></param>
|
||||
/// <returns>Suit</returns>
|
||||
protected Suit? GetTraderClothingOffer(string sessionId, string? offerId)
|
||||
{
|
||||
var foundSuit = GetAllTraderSuits(sessionId).FirstOrDefault(s => s.Id == offerId);
|
||||
if (foundSuit is null)
|
||||
@@ -150,7 +162,7 @@ public class CustomizationController(
|
||||
/// <param name="pmcData">Player profile</param>
|
||||
/// <param name="itemsToPayForClothingWith">Clothing purchased</param>
|
||||
/// <param name="output">Client response</param>
|
||||
private void PayForClothingItems(string sessionId, PmcData pmcData,
|
||||
protected void PayForClothingItems(string sessionId, PmcData pmcData,
|
||||
List<PaymentItemForClothing>? itemsToPayForClothingWith,
|
||||
ItemEventRouterResponse output)
|
||||
{
|
||||
@@ -184,10 +196,11 @@ public class CustomizationController(
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get all suits from Traders
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns></returns>
|
||||
private List<Suit> GetAllTraderSuits(string sessionId)
|
||||
protected List<Suit> GetAllTraderSuits(string sessionId)
|
||||
{
|
||||
var traders = _databaseService.GetTraders();
|
||||
var result = new List<Suit>();
|
||||
@@ -206,7 +219,7 @@ public class CustomizationController(
|
||||
/// <summary>
|
||||
/// Handle client/hideout/customization/offer/list
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="info"></param>
|
||||
/// <returns></returns>
|
||||
public HideoutCustomisation GetHideoutCustomisation(string sessionId, EmptyRequestData info)
|
||||
@@ -217,7 +230,7 @@ public class CustomizationController(
|
||||
/// <summary>
|
||||
/// Handle client/customization/storage
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="info"></param>
|
||||
/// <returns></returns>
|
||||
public List<CustomisationStorage> GetCustomisationStorage(
|
||||
@@ -240,9 +253,9 @@ public class CustomizationController(
|
||||
/// <summary>
|
||||
/// Handle CustomizationSet event
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse SetCustomisation(string sessionId, CustomizationSetRequest request, PmcData pmcData)
|
||||
{
|
||||
@@ -270,7 +283,7 @@ public class CustomizationController(
|
||||
/// </summary>
|
||||
/// <param name="customisation">Suit to apply to profile</param>
|
||||
/// <param name="pmcData">Profile to update</param>
|
||||
private void ApplyClothingItemToProfile(CustomizationSetOption customisation, PmcData pmcData)
|
||||
protected void ApplyClothingItemToProfile(CustomizationSetOption customisation, PmcData pmcData)
|
||||
{
|
||||
var dbSuit = _databaseService.GetCustomization()[customisation.Id!];
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ public class DialogueController(
|
||||
};
|
||||
}
|
||||
|
||||
private List<UserDialogInfo> GetActiveChatBots()
|
||||
protected List<UserDialogInfo> GetActiveChatBots()
|
||||
{
|
||||
var activeBots = new List<UserDialogInfo>();
|
||||
|
||||
@@ -234,7 +234,7 @@ public class DialogueController(
|
||||
/// <param name="profile">Player profile</param>
|
||||
/// <param name="request">get dialog request</param>
|
||||
/// <returns>Dialogue</returns>
|
||||
private Dialogue GetDialogByIdFromProfile(
|
||||
protected Dialogue GetDialogByIdFromProfile(
|
||||
SptProfile profile,
|
||||
GetMailDialogViewRequestData request)
|
||||
{
|
||||
@@ -279,7 +279,7 @@ public class DialogueController(
|
||||
/// <param name="fullProfile">Player profile</param>
|
||||
/// <param name="userDialogs">The participants of the mail</param>
|
||||
/// <returns>UserDialogInfo list</returns>
|
||||
private List<UserDialogInfo> GetProfilesForMail(SptProfile fullProfile, List<UserDialogInfo>? userDialogs)
|
||||
protected List<UserDialogInfo> GetProfilesForMail(SptProfile fullProfile, List<UserDialogInfo>? userDialogs)
|
||||
{
|
||||
List<UserDialogInfo> result = [];
|
||||
if (userDialogs is null)
|
||||
@@ -322,7 +322,7 @@ public class DialogueController(
|
||||
/// <param name="sessionId">Session id</param>
|
||||
/// <param name="dialogueId">Dialog id</param>
|
||||
/// <returns>Count of messages with attachments</returns>
|
||||
private int GetUnreadMessagesWithAttachmentsCount(
|
||||
protected int GetUnreadMessagesWithAttachmentsCount(
|
||||
string sessionId,
|
||||
string dialogueId)
|
||||
{
|
||||
@@ -358,7 +358,7 @@ public class DialogueController(
|
||||
/// </summary>
|
||||
/// <param name="messages">Messages to check</param>
|
||||
/// <returns>true if uncollected rewards found</returns>
|
||||
private bool MessagesHaveUncollectedRewards(List<Message> messages)
|
||||
protected bool MessagesHaveUncollectedRewards(List<Message> messages)
|
||||
{
|
||||
return messages.Any(message => (message.Items?.Data?.Count ?? 0) > 0);
|
||||
}
|
||||
@@ -399,7 +399,7 @@ public class DialogueController(
|
||||
/// </summary>
|
||||
/// <param name="dialogueId"></param>
|
||||
/// <param name="shouldPin"></param>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
public virtual void SetDialoguePin(string? dialogueId, bool shouldPin, string sessionId)
|
||||
{
|
||||
var dialog = _dialogueHelper.GetDialogsForProfile(sessionId).GetValueOrDefault(dialogueId);
|
||||
@@ -490,7 +490,7 @@ public class DialogueController(
|
||||
/// <summary>
|
||||
/// handle client/mail/msg/send
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
public virtual string SendMessage(
|
||||
@@ -513,7 +513,7 @@ public class DialogueController(
|
||||
/// </summary>
|
||||
/// <param name="messages">Messages to parse</param>
|
||||
/// <returns>messages with items to collect</returns>
|
||||
private List<Message> GetMessageWithAttachments(List<Message> messages)
|
||||
protected List<Message> GetMessageWithAttachments(List<Message> messages)
|
||||
{
|
||||
return messages.Where(message => (message.Items?.Data?.Count ?? 0) > 0).ToList();
|
||||
}
|
||||
@@ -522,7 +522,7 @@ public class DialogueController(
|
||||
/// Delete expired items from all messages in player profile. triggers when updating traders.
|
||||
/// </summary>
|
||||
/// <param name="sessionId">Session id</param>
|
||||
private void RemoveExpiredItemsFromMessages(string sessionId)
|
||||
protected void RemoveExpiredItemsFromMessages(string sessionId)
|
||||
{
|
||||
foreach (var dialogueId in _dialogueHelper.GetDialogsForProfile(sessionId))
|
||||
{
|
||||
@@ -535,7 +535,7 @@ public class DialogueController(
|
||||
/// </summary>
|
||||
/// <param name="sessionId">Session id</param>
|
||||
/// <param name="dialogueId">Dialog id</param>
|
||||
private void RemoveExpiredItemsFromMessage(string sessionId, string dialogueId)
|
||||
protected void RemoveExpiredItemsFromMessage(string sessionId, string dialogueId)
|
||||
{
|
||||
var dialogs = _dialogueHelper.GetDialogsForProfile(sessionId);
|
||||
if (!dialogs.TryGetValue(dialogueId, out var dialog))
|
||||
@@ -562,6 +562,12 @@ public class DialogueController(
|
||||
return _timeUtil.GetTimeStamp() > message.DateTime + (message.MaxStorageTime ?? 0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle client/friend/request/send
|
||||
/// </summary>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <param name="request">Sent friend request</param>
|
||||
/// <returns></returns>
|
||||
public virtual FriendRequestSendResponse SendFriendRequest(string sessionID, FriendRequestData request)
|
||||
{
|
||||
// To avoid needing to jump between profiles, auto-accept all friend requests
|
||||
@@ -607,6 +613,11 @@ public class DialogueController(
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle client/friend/delete
|
||||
/// </summary>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <param name="request">Sent delete friend request</param>
|
||||
public virtual void DeleteFriend(string sessionID, DeleteFriendRequest request)
|
||||
{
|
||||
var profile = _saveServer.GetProfile(sessionID);
|
||||
|
||||
@@ -57,7 +57,7 @@ public class GameController(
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="startTimeStampMs"></param>
|
||||
public void GameStart(string url, EmptyRequestData info, string? sessionId, long startTimeStampMs)
|
||||
{
|
||||
@@ -158,8 +158,8 @@ public class GameController(
|
||||
/// <summary>
|
||||
/// Handle client/game/config
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <returns></returns>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns>GameConfigResponse</returns>
|
||||
public GameConfigResponse GetGameConfig(string sessionId)
|
||||
{
|
||||
var profile = _profileHelper.GetPmcProfile(sessionId);
|
||||
@@ -204,7 +204,7 @@ public class GameController(
|
||||
/// <summary>
|
||||
/// Handle client/game/mode
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="requestData"></param>
|
||||
/// <returns></returns>
|
||||
public GameModeResponse GetGameMode(
|
||||
@@ -221,7 +221,7 @@ public class GameController(
|
||||
/// <summary>
|
||||
/// Handle client/server/list
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns></returns>
|
||||
public List<ServerDetails> GetServer(string sessionId)
|
||||
{
|
||||
@@ -238,7 +238,7 @@ public class GameController(
|
||||
/// <summary>
|
||||
/// Handle client/match/group/current
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns></returns>
|
||||
public CurrentGroupResponse GetCurrentGroup(string sessionId)
|
||||
{
|
||||
@@ -252,7 +252,7 @@ public class GameController(
|
||||
/// <summary>
|
||||
/// Handle client/checkVersion
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns></returns>
|
||||
public CheckVersionResponse GetValidGameVersion(string sessionId)
|
||||
{
|
||||
@@ -266,7 +266,7 @@ public class GameController(
|
||||
/// <summary>
|
||||
/// Handle client/game/keepalive
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns></returns>
|
||||
public GameKeepAliveResponse GetKeepAlive(string sessionId)
|
||||
{
|
||||
@@ -281,7 +281,7 @@ public class GameController(
|
||||
/// <summary>
|
||||
/// Handle singleplayer/settings/getRaidTime
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
public GetRaidTimeResponse GetRaidTime(string sessionId, GetRaidTimeRequest request)
|
||||
@@ -291,7 +291,7 @@ public class GameController(
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns></returns>
|
||||
public SurveyResponseData GetSurvey(string sessionId)
|
||||
{
|
||||
@@ -302,7 +302,7 @@ public class GameController(
|
||||
/// Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it
|
||||
/// </summary>
|
||||
/// <param name="pmcProfile">Player profile</param>
|
||||
private void WarnOnActiveBotReloadSkill(PmcData pmcProfile)
|
||||
protected void WarnOnActiveBotReloadSkill(PmcData pmcProfile)
|
||||
{
|
||||
var botReloadSkill = _profileHelper.GetSkillFromProfile(pmcProfile, SkillTypes.BotReload);
|
||||
if (botReloadSkill?.Progress > 0)
|
||||
@@ -315,7 +315,7 @@ public class GameController(
|
||||
/// When player logs in, iterate over all active effects and reduce timer
|
||||
/// </summary>
|
||||
/// <param name="pmcProfile">Profile to adjust values for</param>
|
||||
private void UpdateProfileHealthValues(PmcData pmcProfile)
|
||||
protected void UpdateProfileHealthValues(PmcData pmcProfile)
|
||||
{
|
||||
var healthLastUpdated = pmcProfile.Health?.UpdateTime;
|
||||
var currentTimeStamp = _timeUtil.GetTimeStamp();
|
||||
@@ -431,7 +431,7 @@ public class GameController(
|
||||
/// Send starting gifts to profile after x days
|
||||
/// </summary>
|
||||
/// <param name="pmcProfile">Profile to add gifts to</param>
|
||||
private void SendPraporGiftsToNewProfiles(PmcData pmcProfile)
|
||||
protected void SendPraporGiftsToNewProfiles(PmcData pmcProfile)
|
||||
{
|
||||
var timeStampProfileCreated = pmcProfile.Info?.RegistrationDate;
|
||||
var oneDaySeconds = _timeUtil.GetHoursAsSeconds(24);
|
||||
@@ -463,7 +463,7 @@ public class GameController(
|
||||
/// Get a list of installed mods and save their details to the profile being used
|
||||
/// </summary>
|
||||
/// <param name="fullProfile">Profile to add mod details to</param>
|
||||
private void SaveActiveModsToProfile(SptProfile fullProfile)
|
||||
protected void SaveActiveModsToProfile(SptProfile fullProfile)
|
||||
{
|
||||
fullProfile.SptData!.Mods ??= [];
|
||||
var mods = _applicationContext?.GetLatestValue(ContextVariableType.LOADED_MOD_ASSEMBLIES).GetValue<List<SptMod>>();
|
||||
@@ -498,7 +498,7 @@ public class GameController(
|
||||
/// Add the logged in players name to PMC name pool
|
||||
/// </summary>
|
||||
/// <param name="pmcProfile">Profile of player to get name from</param>
|
||||
private void AddPlayerToPmcNames(PmcData pmcProfile)
|
||||
protected void AddPlayerToPmcNames(PmcData pmcProfile)
|
||||
{
|
||||
var playerName = pmcProfile.Info?.Nickname;
|
||||
if (playerName is not null)
|
||||
@@ -534,7 +534,7 @@ public class GameController(
|
||||
/// Check for a dialog with the key 'undefined', and remove it
|
||||
/// </summary>
|
||||
/// <param name="fullProfile">Profile to check for dialog in</param>
|
||||
private void CheckForAndRemoveUndefinedDialogues(SptProfile fullProfile)
|
||||
protected void CheckForAndRemoveUndefinedDialogues(SptProfile fullProfile)
|
||||
{
|
||||
if (fullProfile.DialogueRecords!.TryGetValue("undefined", out _))
|
||||
{
|
||||
@@ -545,7 +545,7 @@ public class GameController(
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <param name="fullProfile"></param>
|
||||
private void LogProfileDetails(SptProfile fullProfile)
|
||||
protected void LogProfileDetails(SptProfile fullProfile)
|
||||
{
|
||||
if (_logger.IsLogEnabled(LogLevel.Debug))
|
||||
{
|
||||
|
||||
@@ -128,7 +128,7 @@ public class HealthController(
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Player profile</param>
|
||||
/// <param name="request">Eat request</param>
|
||||
/// <param name="sessionId">Session id</param>
|
||||
/// <param name="sessionID">Session id</param>
|
||||
/// <returns>ItemEventRouterResponse</returns>
|
||||
public ItemEventRouterResponse OffRaidEat(
|
||||
PmcData pmcData,
|
||||
@@ -200,6 +200,13 @@ public class HealthController(
|
||||
return output;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Apply effects to profile from consumable used
|
||||
/// </summary>
|
||||
/// <param name="bodyValue">Hydration/Energy</param>
|
||||
/// <param name="consumptionDetails">Properties of consumed item</param>
|
||||
/// <param name="foodIsSingleUse">Single use item</param>
|
||||
/// <param name="request">Client request</param>
|
||||
protected void ApplyEdibleEffect(CurrentMinMax bodyValue, EffectsHealthProps consumptionDetails, bool foodIsSingleUse,
|
||||
OffraidEatRequestData request)
|
||||
{
|
||||
@@ -233,8 +240,8 @@ public class HealthController(
|
||||
/// Occurs on post-raid healing page
|
||||
/// </summary>
|
||||
/// <param name="pmcData">player profile</param>
|
||||
/// <param name="request">Request data from client</param>
|
||||
/// <param name="sessionId">Session id</param>
|
||||
/// <param name="healthTreatmentRequest">Request data from client</param>
|
||||
/// <param name="sessionID">Session id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse HealthTreatment(
|
||||
PmcData pmcData,
|
||||
@@ -299,7 +306,7 @@ public class HealthController(
|
||||
/// applies skills from hideout workout.
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Player profile</param>
|
||||
/// <param name="info">Request data</param>
|
||||
/// <param name="request">Request data</param>
|
||||
/// <param name="sessionId">session id</param>
|
||||
public void ApplyWorkoutChanges(
|
||||
PmcData? pmcData,
|
||||
|
||||
@@ -57,6 +57,14 @@ public class HideoutController(
|
||||
|
||||
protected HideoutConfig _hideoutConfig = _configServer.GetConfig<HideoutConfig>();
|
||||
|
||||
/// <summary>
|
||||
/// Handle HideoutUpgrade event
|
||||
/// Start a hideout area upgrade
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Player profile</param>
|
||||
/// <param name="request">Start upgrade request</param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
public void StartUpgrade(PmcData pmcData, HideoutUpgradeRequestData request, string sessionID, ItemEventRouterResponse output)
|
||||
{
|
||||
var items = request.Items.Select(
|
||||
@@ -138,6 +146,14 @@ public class HideoutController(
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle HideoutUpgradeComplete event
|
||||
/// Complete a hideout area upgrade
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Player profile</param>
|
||||
/// <param name="request">Completed upgrade request</param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
public void UpgradeComplete(PmcData pmcData, HideoutUpgradeCompleteRequestData request, string sessionID, ItemEventRouterResponse output)
|
||||
{
|
||||
var hideout = _databaseService.GetHideout();
|
||||
@@ -215,7 +231,11 @@ public class HideoutController(
|
||||
);
|
||||
}
|
||||
|
||||
private void SetWallVisibleIfPrereqsMet(PmcData pmcData)
|
||||
/// <summary>
|
||||
/// Upgrade wall status to visible in profile if medstation/water collector are both level 1
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Player profile</param>
|
||||
protected void SetWallVisibleIfPrereqsMet(PmcData pmcData)
|
||||
{
|
||||
var medStation = pmcData.Hideout.Areas.FirstOrDefault(area => area.Type == HideoutAreas.MEDSTATION);
|
||||
var waterCollector = pmcData.Hideout.Areas.FirstOrDefault(area => area.Type == HideoutAreas.WATER_COLLECTOR);
|
||||
@@ -229,7 +249,16 @@ public class HideoutController(
|
||||
}
|
||||
}
|
||||
|
||||
private void AddContainerImprovementToProfile(ItemEventRouterResponse output, string sessionID, PmcData pmcData, BotHideoutArea profileParentHideoutArea,
|
||||
/// <summary>
|
||||
/// Add a stash upgrade to profile
|
||||
/// </summary>
|
||||
/// <param name="output">Client response</param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="profileParentHideoutArea"></param>
|
||||
/// <param name="dbHideoutArea"></param>
|
||||
/// <param name="hideoutStage"></param>
|
||||
protected void AddContainerImprovementToProfile(ItemEventRouterResponse output, string sessionID, PmcData pmcData, BotHideoutArea profileParentHideoutArea,
|
||||
HideoutArea dbHideoutArea, Stage hideoutStage)
|
||||
{
|
||||
// Add key/value to `hideoutAreaStashes` dictionary - used to link hideout area to inventory stash by its id
|
||||
@@ -281,7 +310,14 @@ public class HideoutController(
|
||||
}
|
||||
}
|
||||
|
||||
private void AddUpdateInventoryItemToProfile(string sessionId, PmcData pmcData, HideoutArea dbHideoutArea, Stage hideoutStage)
|
||||
/// <summary>
|
||||
/// Add an inventory item to profile from a hideout area stage data
|
||||
/// </summary>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="dbHideoutArea">Hideout area from db being upgraded</param>
|
||||
/// <param name="hideoutStage">Stage area upgraded to</param>
|
||||
protected void AddUpdateInventoryItemToProfile(string sessionId, PmcData pmcData, HideoutArea dbHideoutArea, Stage hideoutStage)
|
||||
{
|
||||
var existingInventoryItem = pmcData.Inventory.Items.FirstOrDefault(item => item.Id == dbHideoutArea.Id);
|
||||
if (existingInventoryItem is not null)
|
||||
@@ -301,7 +337,15 @@ public class HideoutController(
|
||||
pmcData.Inventory.Items.Add(newContainerItem);
|
||||
}
|
||||
|
||||
private void AddContainerUpgradeToClientOutput(string sessionID, HideoutAreas? areaType, HideoutArea hideoutDbData, Stage hideoutStage,
|
||||
/// <summary>
|
||||
/// Include container upgrade in client response
|
||||
/// </summary>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="areaType"></param>
|
||||
/// <param name="hideoutDbData"></param>
|
||||
/// <param name="hideoutStage"></param>
|
||||
/// <param name="output">Client response</param>
|
||||
protected void AddContainerUpgradeToClientOutput(string sessionID, HideoutAreas? areaType, HideoutArea hideoutDbData, Stage hideoutStage,
|
||||
ItemEventRouterResponse output)
|
||||
{
|
||||
if (output.ProfileChanges[sessionID].ChangedHideoutStashes is null)
|
||||
@@ -317,6 +361,14 @@ public class HideoutController(
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle HideoutPutItemsInAreaSlots
|
||||
/// Create item in hideout slot item array, remove item from player inventory
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="addItemToHideoutRequest">request from client to place item in area slot</param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <returns>ItemEventRouterResponse</returns>
|
||||
public ItemEventRouterResponse PutItemsInAreaSlots(PmcData pmcData, HideoutPutItemInRequestData addItemToHideoutRequest, string sessionID)
|
||||
{
|
||||
var output = _eventOutputHolder.GetOutput(sessionID);
|
||||
@@ -395,6 +447,14 @@ public class HideoutController(
|
||||
return output;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle HideoutTakeItemsFromAreaSlots event
|
||||
/// Remove item from hideout area and place into player inventory
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request">Take item out of area request</param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <returns>ItemEventRouterResponse</returns>
|
||||
public ItemEventRouterResponse TakeItemsFromAreaSlots(PmcData pmcData, HideoutTakeItemOutRequestData request, string sessionID)
|
||||
{
|
||||
var output = _eventOutputHolder.GetOutput(sessionID);
|
||||
@@ -431,7 +491,16 @@ public class HideoutController(
|
||||
);
|
||||
}
|
||||
|
||||
private ItemEventRouterResponse RemoveResourceFromArea(string sessionID, PmcData pmcData, HideoutTakeItemOutRequestData removeResourceRequest,
|
||||
/// <summary>
|
||||
/// Find resource item in hideout area, add copy to player inventory, remove Item from hideout slot
|
||||
/// </summary>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="removeResourceRequest">client request</param>
|
||||
/// <param name="output">Client response</param>
|
||||
/// <param name="hideoutArea">Area fuel is being removed from</param>
|
||||
/// <returns>ItemEventRouterResponse</returns>
|
||||
protected ItemEventRouterResponse RemoveResourceFromArea(string sessionID, PmcData pmcData, HideoutTakeItemOutRequestData removeResourceRequest,
|
||||
ItemEventRouterResponse output, BotHideoutArea hideoutArea)
|
||||
{
|
||||
var slotIndexToRemove = removeResourceRequest?.Slots.FirstOrDefault();
|
||||
@@ -475,6 +544,14 @@ public class HideoutController(
|
||||
return output;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle HideoutToggleArea event
|
||||
/// Toggle area on/off
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request">Toggle area request</param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <returns>ItemEventRouterResponse</returns>
|
||||
public ItemEventRouterResponse ToggleArea(PmcData pmcData, HideoutToggleAreaRequestData request, string sessionID)
|
||||
{
|
||||
var output = _eventOutputHolder.GetOutput(sessionID);
|
||||
@@ -494,15 +571,22 @@ public class HideoutController(
|
||||
return output;
|
||||
}
|
||||
|
||||
public ItemEventRouterResponse SingleProductionStart(PmcData pmcData, HideoutSingleProductionStartRequestData body, string sessionID)
|
||||
/// <summary>
|
||||
/// Handle HideoutSingleProductionStart event
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <returns>ItemEventRouterResponse</returns>
|
||||
public ItemEventRouterResponse SingleProductionStart(PmcData pmcData, HideoutSingleProductionStartRequestData request, string sessionID)
|
||||
{
|
||||
// Start production
|
||||
_hideoutHelper.RegisterProduction(pmcData, body, sessionID);
|
||||
_hideoutHelper.RegisterProduction(pmcData, request, sessionID);
|
||||
|
||||
// Find the recipe of the production
|
||||
var recipe = _databaseService
|
||||
.GetHideout()
|
||||
.Production.Recipes.FirstOrDefault(production => production.Id == body.RecipeId);
|
||||
.Production.Recipes.FirstOrDefault(production => production.Id == request.RecipeId);
|
||||
|
||||
// Find the actual amount of items we need to remove because body can send weird data
|
||||
var recipeRequirementsClone = _cloner.Clone(
|
||||
@@ -511,8 +595,8 @@ public class HideoutController(
|
||||
|
||||
List<IdWithCount> itemsToDelete = [];
|
||||
var output = _eventOutputHolder.GetOutput(sessionID);
|
||||
itemsToDelete.AddRange(body.Tools);
|
||||
itemsToDelete.AddRange(body.Items);
|
||||
itemsToDelete.AddRange(request.Tools);
|
||||
itemsToDelete.AddRange(request.Items);
|
||||
|
||||
foreach (var itemToDelete in itemsToDelete)
|
||||
{
|
||||
@@ -540,11 +624,19 @@ public class HideoutController(
|
||||
return output;
|
||||
}
|
||||
|
||||
public ItemEventRouterResponse ScavCaseProductionStart(PmcData pmcData, HideoutScavCaseStartRequestData body, string sessionID)
|
||||
/// <summary>
|
||||
/// Handle HideoutScavCaseProductionStart event
|
||||
/// Handles event after clicking 'start' on the scav case hideout page
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <returns>ItemEventRouterResponse</returns>
|
||||
public ItemEventRouterResponse ScavCaseProductionStart(PmcData pmcData, HideoutScavCaseStartRequestData request, string sessionID)
|
||||
{
|
||||
var output = _eventOutputHolder.GetOutput(sessionID);
|
||||
|
||||
foreach (var requestedItem in body.Items)
|
||||
foreach (var requestedItem in request.Items)
|
||||
{
|
||||
var inventoryItem = pmcData.Inventory.Items.FirstOrDefault(item => item.Id == requestedItem.Id);
|
||||
if (inventoryItem is null)
|
||||
@@ -568,11 +660,11 @@ public class HideoutController(
|
||||
}
|
||||
}
|
||||
|
||||
var recipe = _databaseService.GetHideout().Production?.ScavRecipes?.FirstOrDefault(r => r.Id == body.RecipeId);
|
||||
var recipe = _databaseService.GetHideout().Production?.ScavRecipes?.FirstOrDefault(r => r.Id == request.RecipeId);
|
||||
if (recipe is null)
|
||||
{
|
||||
_logger.Error(
|
||||
_localisationService.GetText("hideout-unable_to_find_scav_case_recipie_in_database", body.RecipeId)
|
||||
_localisationService.GetText("hideout-unable_to_find_scav_case_recipie_in_database", request.RecipeId)
|
||||
);
|
||||
|
||||
return _httpResponseUtil.AppendErrorToOutput(output);
|
||||
@@ -592,17 +684,23 @@ public class HideoutController(
|
||||
|
||||
var modifiedScavCaseTime = GetScavCaseTime(pmcData, adjustedCraftTime);
|
||||
|
||||
pmcData.Hideout.Production[body.RecipeId] = _hideoutHelper.InitProduction(
|
||||
body.RecipeId,
|
||||
pmcData.Hideout.Production[request.RecipeId] = _hideoutHelper.InitProduction(
|
||||
request.RecipeId,
|
||||
(int) (_profileHelper.IsDeveloperAccount(sessionID) ? 40 : modifiedScavCaseTime),
|
||||
false
|
||||
);
|
||||
pmcData.Hideout.Production[body.RecipeId].SptIsScavCase = true;
|
||||
pmcData.Hideout.Production[request.RecipeId].SptIsScavCase = true;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
private double? GetScavCaseTime(PmcData pmcData, double? productionTime)
|
||||
/// <summary>
|
||||
/// Adjust scav case time based on fence standing
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="productionTime">Time to complete scav case in seconds</param>
|
||||
/// <returns>Adjusted scav case time in seconds</returns>
|
||||
protected double? GetScavCaseTime(PmcData pmcData, double? productionTime)
|
||||
{
|
||||
var fenceLevel = _fenceService.GetFenceInfo(pmcData);
|
||||
if (fenceLevel is null)
|
||||
@@ -613,6 +711,12 @@ public class HideoutController(
|
||||
return productionTime * fenceLevel.ScavCaseTimeModifier;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add generated scav case rewards to player profile
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="rewards">reward items to add to profile</param>
|
||||
/// <param name="recipeId">recipe id to save into Production dict</param>
|
||||
public void AddScavCaseRewardsToProfile(PmcData pmcData, List<Item> rewards, string recipeId)
|
||||
{
|
||||
pmcData.Hideout.Production[$"ScavCase{recipeId}"] = new Production
|
||||
@@ -622,6 +726,13 @@ public class HideoutController(
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start production of continuously created item
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request">Continuous production request</param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <returns>ItemEventRouterResponse</returns>
|
||||
public ItemEventRouterResponse ContinuousProductionStart(PmcData pmcData, HideoutContinuousProductionStartRequestData request, string sessionID)
|
||||
{
|
||||
_hideoutHelper.RegisterProduction(pmcData, request, sessionID);
|
||||
@@ -629,6 +740,14 @@ public class HideoutController(
|
||||
return _eventOutputHolder.GetOutput(sessionID);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle HideoutTakeProduction event
|
||||
/// Take completed item out of hideout area and place into player inventory
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request">Remove production from area request</param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse TakeProduction(PmcData pmcData, HideoutTakeProductionRequestData request, string sessionID)
|
||||
{
|
||||
var output = _eventOutputHolder.GetOutput(sessionID);
|
||||
@@ -669,7 +788,15 @@ public class HideoutController(
|
||||
return _httpResponseUtil.AppendErrorToOutput(output);
|
||||
}
|
||||
|
||||
private void HandleRecipe(string sessionID, HideoutProduction recipe, PmcData pmcData, HideoutTakeProductionRequestData request,
|
||||
/// <summary>
|
||||
/// Take recipe-type production out of hideout area and place into player inventory
|
||||
/// </summary>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="recipe">Completed recipe of item</param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request">Remove production from area request</param>
|
||||
/// <param name="output">Client response</param>
|
||||
protected void HandleRecipe(string sessionID, HideoutProduction recipe, PmcData pmcData, HideoutTakeProductionRequestData request,
|
||||
ItemEventRouterResponse output)
|
||||
{
|
||||
// Validate that we have a matching production
|
||||
@@ -873,6 +1000,12 @@ public class HideoutController(
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ensure non-stackable items are 'unstacked'
|
||||
/// </summary>
|
||||
/// <param name="recipe"></param>
|
||||
/// <param name="itemAndChildrenToSendToPlayer"></param>
|
||||
/// <param name="rewardIsPreset">Reward is a preset</param>
|
||||
protected void HandleStackableState(HideoutProduction recipe, List<List<Item>> itemAndChildrenToSendToPlayer, bool rewardIsPreset)
|
||||
{
|
||||
var rewardIsStackable = _itemHelper.IsItemTplStackable(recipe.EndProduct);
|
||||
@@ -922,6 +1055,11 @@ public class HideoutController(
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="recipe"></param>
|
||||
/// <returns></returns>
|
||||
protected List<List<Item>> HandlePresetReward(HideoutProduction recipe)
|
||||
{
|
||||
var defaultPreset = _presetHelper.GetDefaultPreset(recipe.EndProduct);
|
||||
@@ -935,7 +1073,13 @@ public class HideoutController(
|
||||
return [presetAndMods];
|
||||
}
|
||||
|
||||
private TaskConditionCounter GetHoursCraftingTaskConditionCounter(PmcData pmcData, HideoutProduction recipe)
|
||||
/// <summary>
|
||||
/// Get the "CounterHoursCrafting" TaskConditionCounter from a profile
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Profile to get counter from</param>
|
||||
/// <param name="recipe">Recipe being crafted</param>
|
||||
/// <returns>TaskConditionCounter</returns>
|
||||
protected TaskConditionCounter GetHoursCraftingTaskConditionCounter(PmcData pmcData, HideoutProduction recipe)
|
||||
{
|
||||
if (!pmcData.TaskConditionCounters.TryGetValue(NameTaskConditionCountersCraftingId, out _))
|
||||
// Doesn't exist, create
|
||||
@@ -952,7 +1096,14 @@ public class HideoutController(
|
||||
return pmcData.TaskConditionCounters[NameTaskConditionCountersCraftingId];
|
||||
}
|
||||
|
||||
private void HandleScavCase(string sessionID, PmcData pmcData, HideoutTakeProductionRequestData request, ItemEventRouterResponse output)
|
||||
/// <summary>
|
||||
/// Handles generating scav case rewards and sending to player inventory
|
||||
/// </summary>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request">Get rewards from scavcase craft request</param>
|
||||
/// <param name="output">Client response</param>
|
||||
protected void HandleScavCase(string sessionID, PmcData pmcData, HideoutTakeProductionRequestData request, ItemEventRouterResponse output)
|
||||
{
|
||||
var ongoingProductions = pmcData.Hideout.Production;
|
||||
string? prodId = null;
|
||||
@@ -1007,6 +1158,14 @@ public class HideoutController(
|
||||
pmcData.Hideout.Production[prodId].InProgress = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle HideoutQuickTimeEvent on client/game/profile/items/moving
|
||||
/// Called after completing workout at gym
|
||||
/// </summary>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request">QTE result object</param>
|
||||
/// <param name="output">Client response</param>
|
||||
public void HandleQTEEventOutcome(string sessionId, PmcData pmcData, HandleQTEEventRequestData request, ItemEventRouterResponse output)
|
||||
{
|
||||
// {
|
||||
@@ -1050,7 +1209,12 @@ public class HideoutController(
|
||||
HandleMusclePain(pmcData, relevantQte.Results[QteEffectType.finishEffect]);
|
||||
}
|
||||
|
||||
private void HandleMusclePain(PmcData pmcData, QteResult finishEffect)
|
||||
/// <summary>
|
||||
/// Apply mild/severe muscle pain after gym use
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="finishEffect">Effect data to apply after completing QTE gym event</param>
|
||||
protected void HandleMusclePain(PmcData pmcData, QteResult finishEffect)
|
||||
{
|
||||
var hasMildPain = pmcData.Health.BodyParts["Chest"].Effects?.ContainsKey("MildMusclePain");
|
||||
var hasSeverePain = pmcData.Health.BodyParts["Chest"].Effects?.ContainsKey("SevereMusclePain");
|
||||
@@ -1080,6 +1244,12 @@ public class HideoutController(
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Record a high score from the shooting range into a player profiles `overallcounters`
|
||||
/// </summary>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request">shooting range score request></param>
|
||||
public void RecordShootingRangePoints(string sessionId, PmcData pmcData, RecordShootingRangePoints request)
|
||||
{
|
||||
const string shootingRangeKey = "ShootingRangePoints";
|
||||
@@ -1103,11 +1273,18 @@ public class HideoutController(
|
||||
shootingRangeHighScore.Value = request.Points;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle client/game/profile/items/moving - HideoutImproveArea
|
||||
/// </summary>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request">Improve area request</param>
|
||||
/// <returns>ItemEventRouterResponse</returns>
|
||||
public ItemEventRouterResponse ImproveArea(string sessionId, PmcData pmcData, HideoutImproveAreaRequestData request)
|
||||
{
|
||||
var output = _eventOutputHolder.GetOutput(sessionId);
|
||||
|
||||
// Create mapping of required item with corrisponding item from player inventory
|
||||
// Create mapping of required item with corresponding item from player inventory
|
||||
var items = request.Items.Select(
|
||||
reqItem =>
|
||||
{
|
||||
@@ -1187,6 +1364,13 @@ public class HideoutController(
|
||||
return output;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle client/game/profile/items/moving HideoutCancelProductionCommand
|
||||
/// </summary>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request">Cancel production request data</param>
|
||||
/// <returns>ItemEventRouterResponse</returns>
|
||||
public ItemEventRouterResponse CancelProduction(string sessionId, PmcData pmcData, HideoutCancelProductionRequestData request)
|
||||
{
|
||||
var output = _eventOutputHolder.GetOutput(sessionId);
|
||||
@@ -1213,6 +1397,13 @@ public class HideoutController(
|
||||
return _circleOfCultistService.StartSacrifice(sessionId, pmcData, request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle HideoutDeleteProductionCommand event
|
||||
/// </summary>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request">Delete production request</param>
|
||||
/// <returns>ItemEventRouterResponse</returns>
|
||||
public ItemEventRouterResponse HideoutDeleteProductionCommand(string sessionId, PmcData pmcData, HideoutDeleteProductionRequestData request)
|
||||
{
|
||||
var output = _eventOutputHolder.GetOutput(sessionId);
|
||||
@@ -1223,6 +1414,13 @@ public class HideoutController(
|
||||
return output;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle HideoutCustomizationApply event
|
||||
/// </summary>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request">Apply hideout customisation request</param>
|
||||
/// <returns>ItemEventRouterResponse</returns>
|
||||
public ItemEventRouterResponse HideoutCustomizationApply(string sessionId, PmcData pmcData, HideoutCustomizationApplyRequestData request)
|
||||
{
|
||||
var output = _eventOutputHolder.GetOutput(sessionId);
|
||||
@@ -1242,7 +1440,12 @@ public class HideoutController(
|
||||
return output;
|
||||
}
|
||||
|
||||
private string? GetHideoutCustomisationType(string? type)
|
||||
/// <summary>
|
||||
/// Map an internal customisation type to a client hideout customisation type
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
/// <returns>hideout customisation type</returns>
|
||||
protected string? GetHideoutCustomisationType(string? type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -1262,7 +1465,15 @@ public class HideoutController(
|
||||
}
|
||||
}
|
||||
|
||||
private void AddMissingPresetStandItemsToProfile(string sessionId, Stage equipmentPresetStage, PmcData pmcData, HideoutArea equipmentPresetHideoutArea,
|
||||
/// <summary>
|
||||
/// Add stand1/stand2/stand3 inventory items to profile, depending on passed in hideout stage
|
||||
/// </summary>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="equipmentPresetStage">Current EQUIPMENT_PRESETS_STAND stage data</param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="equipmentPresetHideoutArea"></param>
|
||||
/// <param name="output">Client response</param>
|
||||
protected void AddMissingPresetStandItemsToProfile(string sessionId, Stage equipmentPresetStage, PmcData pmcData, HideoutArea equipmentPresetHideoutArea,
|
||||
ItemEventRouterResponse output)
|
||||
{
|
||||
// Each slot is a single Mannequin
|
||||
@@ -1330,6 +1541,12 @@ public class HideoutController(
|
||||
return _eventOutputHolder.GetOutput(sessionId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle client/hideout/qte/list
|
||||
/// Get quick time event list for hideout
|
||||
/// </summary>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns></returns>
|
||||
public List<QteData> GetQteList(string sessionId)
|
||||
{
|
||||
return _databaseService.GetHideout().Qte;
|
||||
|
||||
@@ -35,7 +35,7 @@ public class InRaidController(
|
||||
/// Handles pmc/pscav
|
||||
/// </summary>
|
||||
/// <param name="offRaidProfileData"></param>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
public void SavePostRaidProfileForScav(ScavSaveRequestData offRaidProfileData, string sessionId)
|
||||
{
|
||||
var serverScavProfile = _profileHelper.GetScavProfile(sessionId);
|
||||
@@ -57,9 +57,10 @@ public class InRaidController(
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a % chance a scav will be hostile to the player when they're also a scav
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns></returns>
|
||||
public double GetTraitorScavHostileChance(string url, string sessionId)
|
||||
{
|
||||
@@ -70,7 +71,7 @@ public class InRaidController(
|
||||
/// Get all boss role types e.g. bossTagilla
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns>string array of boss types</returns>
|
||||
public List<string> GetBossTypes(string url, string sessionId)
|
||||
{
|
||||
|
||||
@@ -45,11 +45,9 @@ public class InsuranceController(
|
||||
{
|
||||
protected InsuranceConfig _insuranceConfig = _configServer.GetConfig<InsuranceConfig>();
|
||||
|
||||
/**
|
||||
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
||||
*
|
||||
* @returns void
|
||||
*/
|
||||
/// <summary>
|
||||
/// Process insurance items of all profiles prior to being given back to the player through the mail service
|
||||
/// </summary>
|
||||
public void ProcessReturn()
|
||||
{
|
||||
// Process each installed profile.
|
||||
@@ -77,13 +75,12 @@ public class InsuranceController(
|
||||
ProcessInsuredItems(insuranceDetails, sessionId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all insured items that are ready to be processed in a specific profile.
|
||||
*
|
||||
* @param sessionID Session ID of the profile to check.
|
||||
* @param time The time to check ready status against. Current time by default.
|
||||
* @returns All insured items that are ready to be processed.
|
||||
*/
|
||||
/// <summary>
|
||||
/// Get all insured items that are ready to be processed in a specific profile
|
||||
/// </summary>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="time">The time to check ready status against. Current time by default</param>
|
||||
/// <returns>All insured items that are ready to be processed</returns>
|
||||
protected List<Insurance> FilterInsuredItems(string sessionId, long? time = null)
|
||||
{
|
||||
// Use the current time by default.
|
||||
@@ -101,13 +98,11 @@ public class InsuranceController(
|
||||
return profileInsuranceDetails.Where(insured => insuranceTime >= insured.ScheduledTime).ToList();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method orchestrates the processing of insured items in a profile.
|
||||
*
|
||||
* @param insuranceDetails The insured items to process.
|
||||
* @param sessionID The session ID that should receive the processed items.
|
||||
* @returns void
|
||||
*/
|
||||
/// <summary>
|
||||
/// This method orchestrates the processing of insured items in a profile
|
||||
/// </summary>
|
||||
/// <param name="insuranceDetails">The insured items to process</param>
|
||||
/// <param name="sessionId">session ID that should receive the processed items</param>
|
||||
protected void ProcessInsuredItems(List<Insurance> insuranceDetails, string sessionId)
|
||||
{
|
||||
if (_logger.IsLogEnabled(LogLevel.Debug))
|
||||
@@ -146,12 +141,12 @@ public class InsuranceController(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Count all items in all insurance packages.
|
||||
* @param insurance
|
||||
* @returns
|
||||
*/
|
||||
protected double CountAllInsuranceItems(List<Insurance> insuranceDetails)
|
||||
/// <summary>
|
||||
/// Count all items in all insurance packages
|
||||
/// </summary>
|
||||
/// <param name="insuranceDetails"></param>
|
||||
/// <returns>Count of insured items</returns>
|
||||
protected int CountAllInsuranceItems(List<Insurance> insuranceDetails)
|
||||
{
|
||||
return insuranceDetails.Select(ins => ins.Items.Count).Count();
|
||||
}
|
||||
@@ -179,13 +174,12 @@ public class InsuranceController(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the items that should be deleted based on the given Insurance object.
|
||||
*
|
||||
* @param rootItemParentID - The ID that should be assigned to all "hideout"/root items.
|
||||
* @param insured - The insurance object containing the items to evaluate for deletion.
|
||||
* @returns A Set containing the IDs of items that should be deleted.
|
||||
*/
|
||||
/// <summary>
|
||||
/// Finds the items that should be deleted based on the given Insurance object
|
||||
/// </summary>
|
||||
/// <param name="rootItemParentId">The ID that should be assigned to all "hideout"/root items</param>
|
||||
/// <param name="insured">The insurance object containing the items to evaluate for deletion</param>
|
||||
/// <returns>A Set containing the IDs of items that should be deleted</returns>
|
||||
protected HashSet<string> FindItemsToDelete(string rootItemParentId, Insurance insured)
|
||||
{
|
||||
var toDelete = new HashSet<string>();
|
||||
@@ -228,16 +222,15 @@ public class InsuranceController(
|
||||
return toDelete;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this
|
||||
* context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun,
|
||||
* not the backpack that the gun is located in (the gun's parent).
|
||||
*
|
||||
* @param rootItemParentID - The ID that should be assigned to all "hideout"/root items.
|
||||
* @param insured - The insurance object containing the items to evaluate.
|
||||
* @param itemsMap - A Map object for quick item look-up by item ID.
|
||||
* @returns A Map object containing parent item IDs to arrays of their attachment items.
|
||||
*/
|
||||
/// <summary>
|
||||
/// Initialize a dictionary that holds main-parents to all of their attachments. Note that "main-parent" in this
|
||||
/// context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun,
|
||||
/// not the backpack that the gun is located in (the gun's parent).
|
||||
/// </summary>
|
||||
/// <param name="rootItemParentID">The ID that should be assigned to all "hideout"/root items</param>
|
||||
/// <param name="insured">The insurance object containing the items to evaluate</param>
|
||||
/// <param name="itemsMap">A Dictionary for quick item look-up by item ID</param>
|
||||
/// <returns>A dictionary containing parent item IDs to arrays of their attachment items</returns>
|
||||
protected Dictionary<string, List<Item>> PopulateParentAttachmentsMap(string rootItemParentID, Insurance insured, Dictionary<string, Item> itemsMap)
|
||||
{
|
||||
var mainParentToAttachmentsMap = new Dictionary<string, List<Item>>();
|
||||
@@ -324,14 +317,13 @@ public class InsuranceController(
|
||||
return mainParentToAttachmentsMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments
|
||||
* remain, the parent is removed from the map as well.
|
||||
*
|
||||
* @param parentAttachmentsMap - A Map object containing parent item IDs to arrays of their attachment items.
|
||||
* @param itemsMap - A Map object for quick item look-up by item ID.
|
||||
* @returns A Map object containing parent item IDs to arrays of their attachment items which are not moddable in-raid.
|
||||
*/
|
||||
/// <summary>
|
||||
/// Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments
|
||||
/// remain, the parent is removed from the map as well
|
||||
/// </summary>
|
||||
/// <param name="parentAttachmentsMap">Dictionary containing parent item IDs to arrays of their attachment items</param>
|
||||
/// <param name="itemsMap">Hashset containing parent item IDs to arrays of their attachment items which are not moddable in-raid</param>
|
||||
/// <returns></returns>
|
||||
protected Dictionary<string, List<Item>> RemoveNonModdableAttachments(Dictionary<string, List<Item>> parentAttachmentsMap, Dictionary<string, Item> itemsMap)
|
||||
{
|
||||
var updatedMap = new Dictionary<string, List<Item>>();
|
||||
@@ -372,16 +364,14 @@ public class InsuranceController(
|
||||
return updatedMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Process "regular" insurance items. Any insured item that is not an attached, attachment is considered a "regular"
|
||||
* item. This method iterates over them, preforming item deletion rolls to see if they should be deleted. If so,
|
||||
* they (and their attached, attachments, if any) are marked for deletion in the toDelete Set.
|
||||
*
|
||||
* @param insured The insurance object containing the items to evaluate.
|
||||
* @param toDelete A Set to keep track of items marked for deletion.
|
||||
* @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items.
|
||||
* @returns void
|
||||
*/
|
||||
/// <summary>
|
||||
/// Process "regular" insurance items. Any insured item that is not an attached, attachment is considered a "regular"
|
||||
/// item. This method iterates over them, preforming item deletion rolls to see if they should be deleted. If so,
|
||||
/// they (and their attached, attachments, if any) are marked for deletion in the toDelete Dictionary
|
||||
/// </summary>
|
||||
/// <param name="insured">Insurance object containing the items to evaluate</param>
|
||||
/// <param name="toDelete">Hashset to keep track of items marked for deletion</param>
|
||||
/// <param name="parentAttachmentsMap">Dictionary containing parent item IDs to arrays of their attachment items</param>
|
||||
protected void ProcessRegularItems(Insurance insured, HashSet<string> toDelete, Dictionary<string, List<Item>> parentAttachmentsMap)
|
||||
{
|
||||
foreach (var insuredItem in insured.Items)
|
||||
@@ -423,14 +413,13 @@ public class InsuranceController(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Process parent items and their attachments, updating the toDelete Set accordingly.
|
||||
*
|
||||
* @param mainParentToAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items.
|
||||
* @param itemsMap A Map object for quick item look-up by item ID.
|
||||
* @param traderId The trader ID from the Insurance object.
|
||||
* @param toDelete A Set object to keep track of items marked for deletion.
|
||||
*/
|
||||
/// <summary>
|
||||
/// Process parent items and their attachments, updating the toDelete Set accordingly
|
||||
/// </summary>
|
||||
/// <param name="mainParentToAttachmentsMap">Dictionary containing parent item IDs to arrays of their attachment items</param>
|
||||
/// <param name="itemsMap">Dictionary for quick item look-up by item ID</param>
|
||||
/// <param name="insuredTraderId">Trader ID from the Insurance object</param>
|
||||
/// <param name="toDelete">Tracked attachment ids to be removed</param>
|
||||
protected void ProcessAttachments(Dictionary<string, List<Item>> mainParentToAttachmentsMap, Dictionary<string, Item> itemsMap, string? insuredTraderId,
|
||||
HashSet<string> toDelete)
|
||||
{
|
||||
@@ -456,17 +445,16 @@ public class InsuranceController(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Takes an array of attachment items that belong to the same main-parent item, sorts them in descending order by
|
||||
* their maximum price. For each attachment, a roll is made to determine if a deletion should be made. Once the
|
||||
* number of deletions has been counted, the attachments are added to the toDelete Set, starting with the most
|
||||
* valuable attachments first.
|
||||
*
|
||||
* @param attachments The array of attachment items to sort, filter, and roll.
|
||||
* @param traderId The ID of the trader to that has ensured these items.
|
||||
* @param toDelete The array that accumulates the IDs of the items to be deleted.
|
||||
* @returns void
|
||||
*/
|
||||
|
||||
/// <summary>
|
||||
/// Takes an array of attachment items that belong to the same main-parent item, sorts them in descending order by
|
||||
/// their maximum price. For each attachment, a roll is made to determine if a deletion should be made. Once the
|
||||
/// number of deletions has been counted, the attachments are added to the toDelete Set, starting with the most
|
||||
/// valuable attachments first
|
||||
/// </summary>
|
||||
/// <param name="attachments">Array of attachment items to sort, filter, and roll</param>
|
||||
/// <param name="traderId">ID of the trader to that has ensured these items</param>
|
||||
/// <param name="toDelete">array that accumulates the IDs of the items to be deleted</param>
|
||||
protected void ProcessAttachmentByParent(List<Item> attachments, string? traderId, HashSet<string> toDelete)
|
||||
{
|
||||
// Create dict of item ids + their flea/handbook price (highest is chosen)
|
||||
@@ -499,6 +487,12 @@ public class InsuranceController(
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write out attachments being removed
|
||||
/// </summary>
|
||||
/// <param name="attachmentIdsToRemove"></param>
|
||||
/// <param name="attachments"></param>
|
||||
/// <param name="attachmentPrices"></param>
|
||||
protected void LogAttachmentsBeingRemoved(List<string> attachmentIdsToRemove, List<Item> attachments, Dictionary<string, double> attachmentPrices)
|
||||
{
|
||||
var index = 1;
|
||||
@@ -516,6 +510,11 @@ public class InsuranceController(
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get dictionary of items with their corresponding price
|
||||
/// </summary>
|
||||
/// <param name="attachments">Item attachments</param>
|
||||
/// <returns></returns>
|
||||
protected Dictionary<string, double> WeightAttachmentsByPrice(List<Item> attachments)
|
||||
{
|
||||
var result = new Dictionary<string, double>();
|
||||
@@ -535,6 +534,12 @@ public class InsuranceController(
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get count of items to remove from weapon (take into account trader + price of attachment)
|
||||
/// </summary>
|
||||
/// <param name="weightedAttachmentByPrice">Dict of item Tpls and their rouble price</param>
|
||||
/// <param name="traderId">Trader the attachment is insured against</param>
|
||||
/// <returns>Attachment count to remove</returns>
|
||||
protected double GetAttachmentCountToRemove(Dictionary<string, double> weightedAttachmentByPrice, string? traderId)
|
||||
{
|
||||
var removeCount = 0;
|
||||
@@ -550,18 +555,21 @@ public class InsuranceController(
|
||||
.Count(_ => RollForDelete(traderId) ?? false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove items from the insured items that should not be returned to the player
|
||||
/// </summary>
|
||||
/// <param name="insured">The insured items to process</param>
|
||||
/// <param name="toDelete">The items that should be deleted</param>
|
||||
protected void RemoveItemsFromInsurance(Insurance insured, HashSet<string> toDelete)
|
||||
{
|
||||
insured.Items = insured.Items.Where(item => !toDelete.Contains(item.Id)).ToList();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle sending the insurance message to the user that potentially contains the valid insurance items.
|
||||
*
|
||||
* @param sessionID The session ID that should receive the insurance message.
|
||||
* @param insurance The context of insurance to use.
|
||||
* @returns void
|
||||
*/
|
||||
/// <summary>
|
||||
/// Handle sending the insurance message to the user that potentially contains the valid insurance items
|
||||
/// </summary>
|
||||
/// <param name="sessionId">Profile that should receive the insurance message</param>
|
||||
/// <param name="insurance">context of insurance to use</param>
|
||||
protected void SendMail(string sessionId, Insurance insurance)
|
||||
{
|
||||
// If there are no items remaining after the item filtering, the insurance has
|
||||
@@ -596,15 +604,23 @@ public class InsuranceController(
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Edge case - labs doesn't allow for insurance returns unless location config is edited
|
||||
/// </summary>
|
||||
/// <param name="insurance">The insured items to process</param>
|
||||
/// <param name="labsId">OPTIONAL - id of labs location</param>
|
||||
/// <returns></returns>
|
||||
protected bool IsMapLabsAndInsuranceDisabled(Insurance insurance, string labsId = "laboratory")
|
||||
{
|
||||
return string.Equals(insurance.SystemData?.Location, labsId, StringComparison.OrdinalIgnoreCase) &&
|
||||
!(_databaseService.GetLocation(labsId)?.Base?.Insurance.GetValueOrDefault(false) ?? false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update IInsurance object with new messageTemplateId and wipe out items array data
|
||||
*/
|
||||
/// <summary>
|
||||
/// Update IInsurance object with new messageTemplateId and wipe out items array data
|
||||
/// </summary>
|
||||
/// <param name="traderDialogMessages"></param>
|
||||
/// <param name="insurance"></param>
|
||||
protected void HandleLabsInsurance(Dictionary<string, List<string>?>? traderDialogMessages, Insurance insurance)
|
||||
{
|
||||
// Use labs specific messages if available, otherwise use default
|
||||
@@ -620,6 +636,12 @@ public class InsuranceController(
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Roll for chance of item being 'lost'
|
||||
/// </summary>
|
||||
/// <param name="traderId">Trader item was insured with</param>
|
||||
/// <param name="insuredItem">Item being rolled on</param>
|
||||
/// <returns>Should item be deleted</returns>
|
||||
protected bool? RollForDelete(string traderId, Item? insuredItem = null)
|
||||
{
|
||||
var trader = _traderHelper.GetTraderById(traderId);
|
||||
@@ -646,26 +668,24 @@ public class InsuranceController(
|
||||
return roll;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle Insure event
|
||||
* Add insurance to an item
|
||||
*
|
||||
* @param pmcData Player profile
|
||||
* @param body Insurance request
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse object to send to client
|
||||
*/
|
||||
public ItemEventRouterResponse Insure(PmcData pmcData, InsureRequestData body, string sessionId)
|
||||
/// <summary>
|
||||
/// Handle Insure event, Add insurance to an item
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request">Insurance request</param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns>ItemEventRouterResponse object to send to client</returns>
|
||||
public ItemEventRouterResponse Insure(PmcData pmcData, InsureRequestData request, string sessionId)
|
||||
{
|
||||
var output = _eventOutputHolder.GetOutput(sessionId);
|
||||
var itemsToInsureCount = body.Items.Count;
|
||||
var itemsToInsureCount = request.Items.Count;
|
||||
List<IdWithCount> itemsToPay = [];
|
||||
|
||||
// Create hash of player inventory items (keyed by item id)
|
||||
var inventoryItemsHash = pmcData.Inventory.Items.ToDictionary(item => item.Id);
|
||||
|
||||
// Get price of all items being insured, add to 'itemsToPay'
|
||||
foreach (var key in body.Items)
|
||||
foreach (var key in request.Items)
|
||||
{
|
||||
itemsToPay.Add(
|
||||
new IdWithCount
|
||||
@@ -674,7 +694,7 @@ public class InsuranceController(
|
||||
Count = _insuranceService.GetRoublePriceToInsureItemWithTrader(
|
||||
pmcData,
|
||||
inventoryItemsHash[key],
|
||||
body.TransactionId
|
||||
request.TransactionId
|
||||
)
|
||||
}
|
||||
);
|
||||
@@ -683,7 +703,7 @@ public class InsuranceController(
|
||||
var options = new ProcessBuyTradeRequestData
|
||||
{
|
||||
SchemeItems = itemsToPay,
|
||||
TransactionId = body.TransactionId,
|
||||
TransactionId = request.TransactionId,
|
||||
Action = "SptInsure",
|
||||
Type = "",
|
||||
ItemId = "",
|
||||
@@ -700,19 +720,19 @@ public class InsuranceController(
|
||||
|
||||
// add items to InsuredItems list once money has been paid
|
||||
pmcData.InsuredItems ??= [];
|
||||
foreach (var key in body.Items)
|
||||
foreach (var key in request.Items)
|
||||
{
|
||||
pmcData.InsuredItems.Add(
|
||||
new InsuredItem
|
||||
{
|
||||
TId = body.TransactionId,
|
||||
TId = request.TransactionId,
|
||||
ItemId = inventoryItemsHash[key].Id
|
||||
}
|
||||
);
|
||||
// If Item is Helmet or Body Armour -> Handle insurance of soft inserts
|
||||
if (_itemHelper.ArmorItemHasRemovableOrSoftInsertSlots(inventoryItemsHash[key].Template))
|
||||
{
|
||||
InsureSoftInserts(inventoryItemsHash[key], pmcData, body);
|
||||
InsureSoftInserts(inventoryItemsHash[key], pmcData, request);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -721,14 +741,13 @@ public class InsuranceController(
|
||||
return output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensure soft inserts of Armor that has soft insert slots
|
||||
* Allows armors to come back after being lost correctly
|
||||
* @param item Armor item to be insured
|
||||
* @param pmcData Player profile
|
||||
* @param body Insurance request data
|
||||
*/
|
||||
public void InsureSoftInserts(Item itemWithSoftInserts, PmcData pmcData, InsureRequestData body)
|
||||
/// <summary>
|
||||
/// Ensure soft inserts of Armor that has soft insert slots, Allows armors to come back after being lost correctly
|
||||
/// </summary>
|
||||
/// <param name="itemWithSoftInserts">Armor item to be insured</param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request">Insurance request data</param>
|
||||
public void InsureSoftInserts(Item itemWithSoftInserts, PmcData pmcData, InsureRequestData request)
|
||||
{
|
||||
var softInsertSlots = pmcData.Inventory.Items.Where(
|
||||
item => item.ParentId == itemWithSoftInserts.Id && _itemHelper.IsSoftInsertId(item.SlotId.ToLower())
|
||||
@@ -744,21 +763,20 @@ public class InsuranceController(
|
||||
pmcData.InsuredItems.Add(
|
||||
new InsuredItem
|
||||
{
|
||||
TId = body.TransactionId,
|
||||
TId = request.TransactionId,
|
||||
ItemId = softInsertSlot.Id
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle client/insurance/items/list/cost
|
||||
* Calculate insurance cost
|
||||
*
|
||||
* @param request request object
|
||||
* @param sessionID session id
|
||||
* @returns IGetInsuranceCostResponseData object to send to client
|
||||
*/
|
||||
/// <summary>
|
||||
/// Handle client/insurance/items/list/cost
|
||||
/// Calculate insurance cost
|
||||
/// </summary>
|
||||
/// <param name="request">request object</param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns>GetInsuranceCostResponseData object to send to client</returns>
|
||||
public GetInsuranceCostResponseData Cost(GetInsuranceCostRequestData request, string sessionId)
|
||||
{
|
||||
var response = new GetInsuranceCostResponseData();
|
||||
|
||||
@@ -41,6 +41,14 @@ public class InventoryController(
|
||||
ICloner _cloner
|
||||
)
|
||||
{
|
||||
/// <summary>
|
||||
/// Move Item - change location of item with parentId and slotId, transfers items from one profile to another if fromOwner/toOwner is set in the body.
|
||||
/// Otherwise, move is contained within the same profile_f
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="moveRequest">Move request data</param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
public void MoveItem(PmcData pmcData, InventoryMoveRequestData moveRequest, string sessionId,
|
||||
ItemEventRouterResponse output)
|
||||
{
|
||||
@@ -85,7 +93,7 @@ public class InventoryController(
|
||||
|
||||
// Item is moving into or out of place of fame dog tag slot
|
||||
if (moveRequest.To?.Container != null &&
|
||||
(moveRequest.To.Container.StartsWith("dogtag") || originalLocationSlotId.StartsWith("dogtag")))
|
||||
(moveRequest.To.Container.StartsWith("dogtag", StringComparison.OrdinalIgnoreCase) || originalLocationSlotId.StartsWith("dogtag", StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
_hideoutHelper.ApplyPlaceOfFameDogtagBonus(pmcData);
|
||||
}
|
||||
@@ -100,7 +108,11 @@ public class InventoryController(
|
||||
}
|
||||
}
|
||||
|
||||
private void AppendTraderExploitErrorResponse(ItemEventRouterResponse output)
|
||||
/// <summary>
|
||||
/// Get an event router response with inventory trader message
|
||||
/// </summary>
|
||||
/// <param name="output">Item event router response</param>
|
||||
protected void AppendTraderExploitErrorResponse(ItemEventRouterResponse output)
|
||||
{
|
||||
_httpResponseUtil.AppendErrorToOutput(
|
||||
output,
|
||||
@@ -109,6 +121,14 @@ public class InventoryController(
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle /client/game/profile/items/moving - PinLock
|
||||
/// Requires no response to client, only server change
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request">Pin/Lock request data</param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
public void PinOrLock(PmcData pmcData, PinOrLockItemRequest request, string sessionId,
|
||||
ItemEventRouterResponse output)
|
||||
{
|
||||
@@ -126,6 +146,12 @@ public class InventoryController(
|
||||
itemToAdjust.Upd.PinLockState = request.State;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle /client/game/profile/items/moving SetFavoriteItems
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
public void SetFavoriteItem(PmcData pmcData, SetFavoriteItems request, string sessionId)
|
||||
{
|
||||
// The client sends the full list of favorite items, so clear the current favorites
|
||||
@@ -133,6 +159,12 @@ public class InventoryController(
|
||||
pmcData.Inventory.FavoriteItems.AddRange(request.Items);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle /client/game/profile/items/moving RedeemProfileReward
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
public void RedeemProfileReward(PmcData pmcData, RedeemProfileRequestData request, string sessionId)
|
||||
{
|
||||
var fullProfile = _profileHelper.GetFullProfile(sessionId);
|
||||
@@ -217,11 +249,11 @@ public class InventoryController(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Flag an item as seen in profiles encyclopedia + add inspect xp to profile
|
||||
* @param itemTpls Inspected item tpls
|
||||
* @param fullProfile Profile to add xp to
|
||||
*/
|
||||
/// <summary>
|
||||
/// Flag an item as seen in profiles encyclopedia + add inspect xp to profile
|
||||
/// </summary>
|
||||
/// <param name="itemTpls">Inspected item tpls</param>
|
||||
/// <param name="fullProfile">Profile to add xp to</param>
|
||||
protected void FlagItemsAsInspectedAndRewardXp(IEnumerable<string> itemTpls, SptProfile fullProfile)
|
||||
{
|
||||
foreach (var itemTpl in itemTpls)
|
||||
@@ -251,6 +283,14 @@ public class InventoryController(
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle OpenRandomLootContainer event
|
||||
/// Handle event fired when a container is unpacked (e.g. halloween pumpkin)
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
public void OpenRandomLootContainer(PmcData pmcData, OpenRandomLootContainerRequestData request, string sessionId,
|
||||
ItemEventRouterResponse output)
|
||||
{
|
||||
@@ -317,6 +357,13 @@ public class InventoryController(
|
||||
_inventoryHelper.RemoveItem(pmcData, request.Item, sessionId, output);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Edit an existing map marker
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request">Edit marker request</param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
public void EditMapMarker(PmcData pmcData, InventoryEditMarkerRequestData request, string sessionId,
|
||||
ItemEventRouterResponse output)
|
||||
{
|
||||
@@ -326,6 +373,13 @@ public class InventoryController(
|
||||
output.ProfileChanges[sessionId].Items.ChangedItems.Add(mapItem);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete a map marker
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request">Delete marker request</param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
public void DeleteMapMarker(PmcData pmcData, InventoryDeleteMarkerRequestData request, string sessionId,
|
||||
ItemEventRouterResponse output)
|
||||
{
|
||||
@@ -344,6 +398,13 @@ public class InventoryController(
|
||||
output.ProfileChanges[sessionId].Items.ChangedItems.Add(adjustedMapItem);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add note to a map
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request">Add marker request</param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
public void SortInventory(PmcData pmcData, InventorySortRequestData request, string sessionId,
|
||||
ItemEventRouterResponse output)
|
||||
{
|
||||
@@ -372,10 +433,17 @@ public class InventoryController(
|
||||
}
|
||||
}
|
||||
|
||||
public ItemEventRouterResponse ReadEncyclopedia(PmcData pmcData, InventoryReadEncyclopediaRequestData body,
|
||||
/// <summary>
|
||||
/// Flag item as 'seen' by player in profile
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse ReadEncyclopedia(PmcData pmcData, InventoryReadEncyclopediaRequestData request,
|
||||
string sessionId)
|
||||
{
|
||||
foreach (var id in body.Ids)
|
||||
foreach (var id in request.Ids)
|
||||
{
|
||||
pmcData.Encyclopedia[id] = true;
|
||||
}
|
||||
@@ -383,6 +451,13 @@ public class InventoryController(
|
||||
return _eventOutputHolder.GetOutput(sessionId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle examining an item
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request">Examine item request</param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
public void ExamineItem(PmcData pmcData, InventoryExamineRequestData request, string sessionId,
|
||||
ItemEventRouterResponse output)
|
||||
{
|
||||
@@ -425,6 +500,12 @@ public class InventoryController(
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the tplid of an item from the examine request object
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns>Item tpl</returns>
|
||||
protected string? GetExaminedItemTpl(InventoryExamineRequestData request, string? sessionId)
|
||||
{
|
||||
if (_presetHelper.IsPreset(request.Item))
|
||||
@@ -501,6 +582,14 @@ public class InventoryController(
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unbind an inventory item from quick access menu at bottom of player screen
|
||||
/// Handle unbind event
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
public void UnBindItem(PmcData pmcData, InventoryBindRequestData request, string sessionId,
|
||||
ItemEventRouterResponse output)
|
||||
{
|
||||
@@ -510,6 +599,14 @@ public class InventoryController(
|
||||
pmcData.Inventory.FastPanel.Remove(request.Index);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handle bind event
|
||||
/// Bind an inventory item to the quick access menu at bottom of player screen
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="bindRequest"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
public void BindItem(PmcData pmcData, InventoryBindRequestData bindRequest, string sessionId,
|
||||
ItemEventRouterResponse output)
|
||||
{
|
||||
@@ -524,6 +621,13 @@ public class InventoryController(
|
||||
pmcData.Inventory.FastPanel[bindRequest.Index] = bindRequest.Item;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add a tag to an inventory item
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Profile with item to add tag to</param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns>ItemEventRouterResponse</returns>
|
||||
public ItemEventRouterResponse TagItem(PmcData pmcData, InventoryTagRequestData request, string sessionId)
|
||||
{
|
||||
var itemToTag = pmcData.Inventory.Items.FirstOrDefault(item => item.Id == request.Item);
|
||||
@@ -551,6 +655,13 @@ public class InventoryController(
|
||||
return _eventOutputHolder.GetOutput(sessionId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Toggles "Toggleable" items like night vision goggles and face shields.
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request">Toggle request</param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns>ItemEventRouterResponse</returns>
|
||||
public ItemEventRouterResponse ToggleItem(PmcData pmcData, InventoryToggleRequestData request, string sessionId)
|
||||
{
|
||||
// May need to reassign to scav profile
|
||||
@@ -586,6 +697,13 @@ public class InventoryController(
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles folding of Weapons
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request">Fold item request</param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns>ItemEventRouterResponse</returns>
|
||||
public ItemEventRouterResponse FoldItem(PmcData pmcData, InventoryFoldRequestData request, string sessionId)
|
||||
{
|
||||
// May need to reassign to scav profile
|
||||
@@ -622,11 +740,15 @@ public class InventoryController(
|
||||
return _eventOutputHolder.GetOutput(sessionId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Swap Item
|
||||
* its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment
|
||||
* Also used to swap items using quick selection on character screen
|
||||
*/
|
||||
/// <summary>
|
||||
/// Swap Item
|
||||
/// used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment
|
||||
/// Also used to swap items using quick selection on character screen
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request">Swap item request</param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns>ItemEventRouterResponse</returns>
|
||||
public ItemEventRouterResponse SwapItem(PmcData pmcData, InventorySwapRequestData request, string sessionId)
|
||||
{
|
||||
// During post-raid scav transfer, the swap may be in the scav inventory
|
||||
@@ -697,16 +819,15 @@ public class InventoryController(
|
||||
return _eventOutputHolder.GetOutput(sessionId);
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO: Adds no data to output to send to client, is this by design?
|
||||
* Transfer items from one stack into another while keeping original stack
|
||||
* Used to take items from scav inventory into stash or to insert ammo into mags (shotgun ones) and reloading weapon by clicking "Reload"
|
||||
* @param pmcData Player profile
|
||||
* @param body Transfer request
|
||||
* @param sessionID Session id
|
||||
* @param output Client response
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
/// <summary>
|
||||
/// TODO: Adds no data to output to send to client, is this by design?
|
||||
/// Transfer items from one stack into another while keeping original stack
|
||||
/// Used to take items from scav inventory into stash or to insert ammo into mags (shotgun ones) and reloading weapon by clicking "Reload"
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request">Transfer item request</param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
public void TransferItem(PmcData pmcData, InventoryTransferRequestData request, string sessionId,
|
||||
ItemEventRouterResponse output)
|
||||
{
|
||||
@@ -761,17 +882,25 @@ public class InventoryController(
|
||||
destinationItem.Upd.StackObjectsCount = destinationStackCount + request.Count;
|
||||
}
|
||||
|
||||
public void MergeItem(PmcData pmcData, InventoryMergeRequestData body, string sessionID,
|
||||
/// <summary>
|
||||
/// Fully merge 2 inventory stacks together into one stack (merging where both stacks remain is called 'transfer')
|
||||
/// Deletes item from `body.item` and adding number of stacks into `body.with`
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request">Merge stacks request</param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="output">Client response</param>
|
||||
public void MergeItem(PmcData pmcData, InventoryMergeRequestData request, string sessionID,
|
||||
ItemEventRouterResponse output)
|
||||
{
|
||||
// Changes made to result apply to character inventory
|
||||
var inventoryItems = _inventoryHelper.GetOwnerInventoryItems(body, body.Item, sessionID);
|
||||
var inventoryItems = _inventoryHelper.GetOwnerInventoryItems(request, request.Item, sessionID);
|
||||
|
||||
// Get source item (can be from player or trader or mail)
|
||||
var sourceItem = inventoryItems.From.FirstOrDefault(x => x.Id == body.Item);
|
||||
var sourceItem = inventoryItems.From.FirstOrDefault(x => x.Id == request.Item);
|
||||
if (sourceItem is null)
|
||||
{
|
||||
var errorMessage = $"Unable to merge stacks as source item: {body.With} cannot be found";
|
||||
var errorMessage = $"Unable to merge stacks as source item: {request.With} cannot be found";
|
||||
_logger.Error(errorMessage);
|
||||
|
||||
_httpResponseUtil.AppendErrorToOutput(output, errorMessage);
|
||||
@@ -780,10 +909,10 @@ public class InventoryController(
|
||||
}
|
||||
|
||||
// Get item being merged into
|
||||
var destinationItem = inventoryItems.To.FirstOrDefault(x => x.Id == body.With);
|
||||
var destinationItem = inventoryItems.To.FirstOrDefault(x => x.Id == request.With);
|
||||
if (destinationItem is null)
|
||||
{
|
||||
var errorMessage = $"Unable to merge stacks as destination item: {body.With} cannot be found";
|
||||
var errorMessage = $"Unable to merge stacks as destination item: {request.With} cannot be found";
|
||||
_logger.Error(errorMessage);
|
||||
|
||||
_httpResponseUtil.AppendErrorToOutput(output, errorMessage);
|
||||
@@ -844,6 +973,13 @@ public class InventoryController(
|
||||
inventoryItems.From.RemoveAt(indexOfItemToRemove); // Remove source item from 'from' inventory
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Split Item stack - 1 stack into 2
|
||||
/// </summary>
|
||||
/// <param name="pmcData">(unused, getOwnerInventoryItems() gets profile)</param>
|
||||
/// <param name="request">Split stack request</param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="output">Client response</param>
|
||||
public void SplitItem(PmcData pmcData, InventorySplitRequestData request, string sessionID,
|
||||
ItemEventRouterResponse output)
|
||||
{
|
||||
@@ -901,7 +1037,15 @@ public class InventoryController(
|
||||
);
|
||||
}
|
||||
|
||||
public void RemoveItem(PmcData pmcData, InventoryRemoveRequestData request, string sessionId,
|
||||
/// <summary>
|
||||
/// Implements "Discard" functionality from Main menu (Stash etc.)
|
||||
/// Removes item from PMC Profile
|
||||
/// </summary>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request">Discard item request</param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="output">Client response</param>
|
||||
public void DiscardItem(PmcData pmcData, InventoryRemoveRequestData request, string sessionId,
|
||||
ItemEventRouterResponse output)
|
||||
{
|
||||
if (request.FromOwner?.Type == "Mail")
|
||||
|
||||
@@ -32,6 +32,10 @@ public class LauncherController(
|
||||
{
|
||||
protected CoreConfig _coreConfig = _configServer.GetConfig<CoreConfig>();
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public ConnectResponse Connect()
|
||||
{
|
||||
// Get all possible profile types + filter out any that are blacklisted
|
||||
@@ -75,11 +79,21 @@ public class LauncherController(
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <returns></returns>
|
||||
public Info? Find(string? sessionId)
|
||||
{
|
||||
return sessionId is not null && _saveServer.GetProfiles().TryGetValue(sessionId, out var profile) ? profile.ProfileInfo : null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="info"></param>
|
||||
/// <returns></returns>
|
||||
public string? Login(LoginRequestData? info)
|
||||
{
|
||||
foreach (var kvp in _saveServer.GetProfiles())
|
||||
@@ -94,6 +108,11 @@ public class LauncherController(
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="info"></param>
|
||||
/// <returns></returns>
|
||||
public string Register(RegisterData info)
|
||||
{
|
||||
foreach (var kvp in _saveServer.GetProfiles())
|
||||
@@ -107,6 +126,11 @@ public class LauncherController(
|
||||
return CreateAccount(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="info"></param>
|
||||
/// <returns></returns>
|
||||
protected string CreateAccount(RegisterData info)
|
||||
{
|
||||
var profileId = GenerateProfileId();
|
||||
@@ -129,6 +153,10 @@ public class LauncherController(
|
||||
return profileId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected string GenerateProfileId()
|
||||
{
|
||||
var timestamp = _timeUtil.GetTimeStamp();
|
||||
@@ -136,6 +164,12 @@ public class LauncherController(
|
||||
return FormatID(timestamp, timestamp * _randomUtil.GetInt(1, 1000000));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="timeStamp"></param>
|
||||
/// <param name="counter"></param>
|
||||
/// <returns></returns>
|
||||
protected string FormatID(long timeStamp, long counter)
|
||||
{
|
||||
var timeStampStr = Convert.ToString(timeStamp, 16).PadLeft(8, '0');
|
||||
@@ -144,6 +178,11 @@ public class LauncherController(
|
||||
return timeStampStr.ToLower() + counterStr.ToLower();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="info"></param>
|
||||
/// <returns></returns>
|
||||
public string? ChangeUsername(ChangeRequestData info)
|
||||
{
|
||||
var sessionID = Login(info);
|
||||
@@ -156,6 +195,11 @@ public class LauncherController(
|
||||
return sessionID;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="info"></param>
|
||||
/// <returns></returns>
|
||||
public string? ChangePassword(ChangeRequestData info)
|
||||
{
|
||||
var sessionID = Login(info);
|
||||
@@ -192,6 +236,10 @@ public class LauncherController(
|
||||
return sessionID;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string GetCompatibleTarkovVersion()
|
||||
{
|
||||
return _coreConfig.CompatibleTarkovVersion;
|
||||
@@ -231,6 +279,11 @@ public class LauncherController(
|
||||
return [];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="profileMods"></param>
|
||||
/// <returns></returns>
|
||||
public List<ModDetails> GetProfileModsGroupedByModName(List<ModDetails> profileMods)
|
||||
{
|
||||
// Group all mods used by profile by name
|
||||
|
||||
@@ -45,7 +45,7 @@ public class MatchController(
|
||||
/// Handle match/group/start_game
|
||||
/// </summary>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns></returns>
|
||||
public ProfileStatusResponse JoinMatch(MatchGroupStartGameRequest info, string sessionId)
|
||||
{
|
||||
@@ -94,7 +94,7 @@ public class MatchController(
|
||||
/// Handle /client/raid/configuration
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
public void ConfigureOfflineRaid(GetRaidConfigurationRequestData request, string sessionId)
|
||||
{
|
||||
// Store request data for access during bot generation
|
||||
@@ -116,7 +116,7 @@ public class MatchController(
|
||||
/// </summary>
|
||||
/// <param name="botDifficulty">dropdown difficulty value</param>
|
||||
/// <returns>bot difficulty</returns>
|
||||
private string ConvertDifficultyDropdownIntoBotDifficulty(string botDifficulty)
|
||||
protected string ConvertDifficultyDropdownIntoBotDifficulty(string botDifficulty)
|
||||
{
|
||||
// Edge case medium - must be altered
|
||||
if (string.Equals(botDifficulty, "medium", StringComparison.OrdinalIgnoreCase))
|
||||
@@ -130,7 +130,7 @@ public class MatchController(
|
||||
/// <summary>
|
||||
/// Handle client/match/local/start
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
public StartLocalRaidResponseData StartLocalRaid(string sessionId, StartLocalRaidRequestData request)
|
||||
@@ -141,7 +141,7 @@ public class MatchController(
|
||||
/// <summary>
|
||||
/// Handle client/match/local/end
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="request"></param>
|
||||
public void EndLocalRaid(string sessionId, EndLocalRaidRequestData request)
|
||||
{
|
||||
|
||||
@@ -13,9 +13,9 @@ public class NoteController(
|
||||
{
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="body"></param>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse AddNote(
|
||||
PmcData pmcData,
|
||||
@@ -34,9 +34,9 @@ public class NoteController(
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="body"></param>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse EditNote(
|
||||
PmcData pmcData,
|
||||
@@ -52,9 +52,9 @@ public class NoteController(
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="body"></param>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse DeleteNote(
|
||||
PmcData pmcData,
|
||||
|
||||
@@ -22,7 +22,7 @@ public class NotifierController(
|
||||
/// one or more appear or when a timeout expires.
|
||||
/// If no notifications are available after the timeout, use a default message.
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
public Task<List<WsNotificationEvent>> NotifyAsync(string sessionId)
|
||||
{
|
||||
return Task.Factory.StartNew(() => {
|
||||
@@ -52,7 +52,7 @@ public class NotifierController(
|
||||
/// <summary>
|
||||
/// Handle client/notifier/channel/create
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns></returns>
|
||||
public NotifierChannel GetChannel(string sessionId)
|
||||
{
|
||||
@@ -68,7 +68,7 @@ public class NotifierController(
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns></returns>
|
||||
public string GetServer(string sessionId)
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ public class PrestigeController(
|
||||
/// <summary>
|
||||
/// Handle /client/prestige/list
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="info"></param>
|
||||
/// <returns></returns>
|
||||
public Prestige GetPrestige(
|
||||
|
||||
@@ -113,7 +113,7 @@ public class QuestController(
|
||||
return acceptQuestResponse;
|
||||
}
|
||||
|
||||
private void AddTaskConditionCountersToProfile(List<QuestCondition>? questConditions, PmcData pmcData, string questId)
|
||||
protected void AddTaskConditionCountersToProfile(List<QuestCondition>? questConditions, PmcData pmcData, string questId)
|
||||
{
|
||||
foreach (var condition in questConditions)
|
||||
{
|
||||
@@ -177,7 +177,7 @@ public class QuestController(
|
||||
return response;
|
||||
}
|
||||
|
||||
private RepeatableQuest GetRepeatableQuestFromProfile(PmcData pmcData, AcceptQuestRequestData acceptedQuest)
|
||||
protected RepeatableQuest GetRepeatableQuestFromProfile(PmcData pmcData, AcceptQuestRequestData acceptedQuest)
|
||||
{
|
||||
foreach (var repeatableQuest in pmcData.RepeatableQuests)
|
||||
{
|
||||
@@ -350,7 +350,7 @@ public class QuestController(
|
||||
return output;
|
||||
}
|
||||
|
||||
private ItemEventRouterResponse ShowRepeatableQuestInvalidConditionError(HandoverQuestRequestData handoverQuestRequest, ItemEventRouterResponse output)
|
||||
protected ItemEventRouterResponse ShowRepeatableQuestInvalidConditionError(HandoverQuestRequestData handoverQuestRequest, ItemEventRouterResponse output)
|
||||
{
|
||||
var errorMessage = _localisationService.GetText(
|
||||
"repeatable-quest_handover_failed_condition_invalid",
|
||||
@@ -365,7 +365,7 @@ public class QuestController(
|
||||
return _httpResponseUtil.AppendErrorToOutput(output, errorMessage);
|
||||
}
|
||||
|
||||
private ItemEventRouterResponse ShowQuestItemHandoverMatchError(HandoverQuestRequestData handoverQuestRequest, Item? itemHandedOver,
|
||||
protected ItemEventRouterResponse ShowQuestItemHandoverMatchError(HandoverQuestRequestData handoverQuestRequest, Item? itemHandedOver,
|
||||
QuestCondition? handoverRequirements, ItemEventRouterResponse output)
|
||||
{
|
||||
var errorMessage = _localisationService.GetText(
|
||||
@@ -382,7 +382,7 @@ public class QuestController(
|
||||
return _httpResponseUtil.AppendErrorToOutput(output, errorMessage);
|
||||
}
|
||||
|
||||
private void UpdateProfileTaskConditionCounterValue(PmcData pmcData, string conditionId, string questId, double counterValue)
|
||||
protected void UpdateProfileTaskConditionCounterValue(PmcData pmcData, string conditionId, string questId, double counterValue)
|
||||
{
|
||||
if (pmcData.TaskConditionCounters.GetValueOrDefault(conditionId) != null)
|
||||
{
|
||||
|
||||
@@ -22,32 +22,32 @@ namespace Core.Controllers;
|
||||
[Injectable]
|
||||
public class RagfairController
|
||||
{
|
||||
private readonly ConfigServer _configServer;
|
||||
private readonly DatabaseService _databaseService;
|
||||
private readonly EventOutputHolder _eventOutputHolder;
|
||||
private readonly HandbookHelper _handbookHelper;
|
||||
private readonly HttpResponseUtil _httpResponseUtil;
|
||||
private readonly InventoryHelper _inventoryHelper;
|
||||
private readonly ItemHelper _itemHelper;
|
||||
private readonly JsonUtil _jsonUtil;
|
||||
private readonly LocalisationService _localisationService;
|
||||
private readonly ISptLogger<RagfairController> _logger;
|
||||
private readonly PaymentHelper _paymentHelper;
|
||||
private readonly PaymentService _paymentService;
|
||||
private readonly ProfileHelper _profileHelper;
|
||||
protected ConfigServer _configServer;
|
||||
protected DatabaseService _databaseService;
|
||||
protected EventOutputHolder _eventOutputHolder;
|
||||
protected HandbookHelper _handbookHelper;
|
||||
protected HttpResponseUtil _httpResponseUtil;
|
||||
protected InventoryHelper _inventoryHelper;
|
||||
protected ItemHelper _itemHelper;
|
||||
protected JsonUtil _jsonUtil;
|
||||
protected LocalisationService _localisationService;
|
||||
protected ISptLogger<RagfairController> _logger;
|
||||
protected PaymentHelper _paymentHelper;
|
||||
protected PaymentService _paymentService;
|
||||
protected ProfileHelper _profileHelper;
|
||||
|
||||
private readonly RagfairConfig _ragfairConfig;
|
||||
private readonly RagfairHelper _ragfairHelper;
|
||||
private readonly RagfairOfferGenerator _ragfairOfferGenerator;
|
||||
private readonly RagfairOfferHelper _ragfairOfferHelper;
|
||||
private readonly RagfairOfferService _ragfairOfferService;
|
||||
private readonly RagfairPriceService _ragfairPriceService;
|
||||
private readonly RagfairSellHelper _ragfairSellHelper;
|
||||
private readonly RagfairServer _ragfairServer;
|
||||
private readonly RagfairSortHelper _ragfairSortHelper;
|
||||
private readonly RagfairTaxService _ragfairTaxService;
|
||||
private readonly TimeUtil _timeUtil;
|
||||
private readonly TraderHelper _traderHelper;
|
||||
protected RagfairConfig _ragfairConfig;
|
||||
protected RagfairHelper _ragfairHelper;
|
||||
protected RagfairOfferGenerator _ragfairOfferGenerator;
|
||||
protected RagfairOfferHelper _ragfairOfferHelper;
|
||||
protected RagfairOfferService _ragfairOfferService;
|
||||
protected RagfairPriceService _ragfairPriceService;
|
||||
protected RagfairSellHelper _ragfairSellHelper;
|
||||
protected RagfairServer _ragfairServer;
|
||||
protected RagfairSortHelper _ragfairSortHelper;
|
||||
protected RagfairTaxService _ragfairTaxService;
|
||||
protected TimeUtil _timeUtil;
|
||||
protected TraderHelper _traderHelper;
|
||||
|
||||
public RagfairController(
|
||||
ISptLogger<RagfairController> logger,
|
||||
@@ -260,7 +260,7 @@ public class RagfairController
|
||||
* Add index to all offers passed in (0-indexed)
|
||||
* @param offers Offers to add index value to
|
||||
*/
|
||||
private void AddIndexValueToOffers(List<RagfairOffer> offers)
|
||||
protected void AddIndexValueToOffers(List<RagfairOffer> offers)
|
||||
{
|
||||
var counter = 0;
|
||||
|
||||
@@ -276,7 +276,7 @@ public class RagfairController
|
||||
* @param offers Ragfair offers to get categories for
|
||||
* @returns record with templates + counts
|
||||
*/
|
||||
private Dictionary<string, int>? GetSpecificCategories(PmcData pmcProfile, SearchRequestData searchRequest,
|
||||
protected Dictionary<string, int> GetSpecificCategories(PmcData pmcProfile, SearchRequestData searchRequest,
|
||||
List<RagfairOffer> offers)
|
||||
{
|
||||
// Linked/required search categories
|
||||
@@ -311,7 +311,7 @@ public class RagfairController
|
||||
* @param info Search request
|
||||
* @returns True if it is a 'linked' search type
|
||||
*/
|
||||
private bool IsLinkedSearch(SearchRequestData searchRequest)
|
||||
protected bool IsLinkedSearch(SearchRequestData searchRequest)
|
||||
{
|
||||
return !string.IsNullOrEmpty(searchRequest.LinkedSearchId);
|
||||
}
|
||||
@@ -321,7 +321,7 @@ public class RagfairController
|
||||
* @param info Search request
|
||||
* @returns True if it is a 'required' search type
|
||||
*/
|
||||
private bool IsRequiredSearch(SearchRequestData searchRequest)
|
||||
protected bool IsRequiredSearch(SearchRequestData searchRequest)
|
||||
{
|
||||
return !string.IsNullOrEmpty(searchRequest.NeededSearchId);
|
||||
}
|
||||
@@ -334,7 +334,7 @@ public class RagfairController
|
||||
* @param pmcProfile Player profile
|
||||
* @returns array of offers
|
||||
*/
|
||||
private List<RagfairOffer> GetOffersForSearchType(SearchRequestData searchRequest, List<string> itemsToAdd,
|
||||
protected List<RagfairOffer> GetOffersForSearchType(SearchRequestData searchRequest, List<string> itemsToAdd,
|
||||
Dictionary<string, TraderAssort> traderAssorts,
|
||||
PmcData pmcProfile)
|
||||
{
|
||||
@@ -398,7 +398,7 @@ public class RagfairController
|
||||
};
|
||||
}
|
||||
|
||||
private double GetAveragePriceFromOffers(List<RagfairOffer> offers, MinMax<double> minMax, bool ignoreTraderOffers)
|
||||
protected double GetAveragePriceFromOffers(List<RagfairOffer> offers, MinMax<double> minMax, bool ignoreTraderOffers)
|
||||
{
|
||||
var sum = 0d;
|
||||
var totalOfferCount = 0;
|
||||
@@ -494,7 +494,7 @@ public class RagfairController
|
||||
* @param errorMessage message to show to player when offer is invalid
|
||||
* @returns Is offer valid
|
||||
*/
|
||||
private bool IsValidPlayerOfferRequest(AddOfferRequestData offerRequest, string validationMessage)
|
||||
protected bool IsValidPlayerOfferRequest(AddOfferRequestData offerRequest, string validationMessage)
|
||||
{
|
||||
if (offerRequest?.Items is null || offerRequest.Items.Count == 0)
|
||||
{
|
||||
@@ -519,7 +519,7 @@ public class RagfairController
|
||||
* @param offerRequest Client request
|
||||
* @returns FleaOfferType
|
||||
*/
|
||||
private FleaOfferType GetOfferType(AddOfferRequestData offerRequest)
|
||||
protected FleaOfferType GetOfferType(AddOfferRequestData offerRequest)
|
||||
{
|
||||
var sellInOncePiece = offerRequest.SellInOnePiece.GetValueOrDefault(false);
|
||||
|
||||
@@ -554,7 +554,7 @@ public class RagfairController
|
||||
* @param output Response to send to client
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
private ItemEventRouterResponse CreateMultiOffer(string sessionID, AddOfferRequestData offerRequest,
|
||||
protected ItemEventRouterResponse CreateMultiOffer(string sessionID, AddOfferRequestData offerRequest,
|
||||
SptProfile fullProfile, ItemEventRouterResponse output)
|
||||
{
|
||||
var pmcData = fullProfile.CharacterData.PmcData;
|
||||
@@ -666,7 +666,7 @@ public class RagfairController
|
||||
* @param output Response to send to client
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
private ItemEventRouterResponse CreatePackOffer(string sessionID, AddOfferRequestData offerRequest,
|
||||
protected ItemEventRouterResponse CreatePackOffer(string sessionID, AddOfferRequestData offerRequest,
|
||||
SptProfile fullProfile, ItemEventRouterResponse output)
|
||||
{
|
||||
var pmcData = fullProfile.CharacterData.PmcData;
|
||||
@@ -775,7 +775,7 @@ public class RagfairController
|
||||
* @param output Response to send to client
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
private ItemEventRouterResponse CreateSingleOffer(string sessionID, AddOfferRequestData offerRequest,
|
||||
protected ItemEventRouterResponse CreateSingleOffer(string sessionID, AddOfferRequestData offerRequest,
|
||||
SptProfile fullProfile,
|
||||
ItemEventRouterResponse output)
|
||||
{
|
||||
@@ -874,7 +874,7 @@ public class RagfairController
|
||||
* @param output IItemEventRouterResponse
|
||||
* @returns True if charging tax to player failed
|
||||
*/
|
||||
private bool ChargePlayerTaxFee(
|
||||
protected bool ChargePlayerTaxFee(
|
||||
string sessionId,
|
||||
Item rootItem,
|
||||
PmcData pmcData,
|
||||
@@ -917,7 +917,7 @@ public class RagfairController
|
||||
return false;
|
||||
}
|
||||
|
||||
private RagfairOffer CreatePlayerOffer(string sessionId, List<Requirement> requirements, List<Item> items,
|
||||
protected RagfairOffer CreatePlayerOffer(string sessionId, List<Requirement> requirements, List<Item> items,
|
||||
bool sellInOnePiece)
|
||||
{
|
||||
const int loyalLevel = 1;
|
||||
@@ -962,7 +962,7 @@ public class RagfairController
|
||||
* @param requirements
|
||||
* @returns Rouble price
|
||||
*/
|
||||
private double CalculateRequirementsPriceInRub(List<Requirement> requirements)
|
||||
protected double CalculateRequirementsPriceInRub(List<Requirement> requirements)
|
||||
{
|
||||
return requirements.Sum(requirement =>
|
||||
{
|
||||
@@ -978,7 +978,7 @@ public class RagfairController
|
||||
);
|
||||
}
|
||||
|
||||
private GetItemsToListOnFleaFromInventoryResult GetItemsToListOnFleaFromInventory(PmcData pmcData,
|
||||
protected GetItemsToListOnFleaFromInventoryResult GetItemsToListOnFleaFromInventory(PmcData pmcData,
|
||||
List<string> itemIdsFromFleaOfferRequest)
|
||||
{
|
||||
List<List<Item>> itemsToReturn = [];
|
||||
@@ -1157,7 +1157,7 @@ public class RagfairController
|
||||
* @param value Amount of currency
|
||||
* @returns IProcessBuyTradeRequestData
|
||||
*/
|
||||
private ProcessBuyTradeRequestData CreateBuyTradeRequestObject(CurrencyType currency, double value)
|
||||
protected ProcessBuyTradeRequestData CreateBuyTradeRequestObject(CurrencyType currency, double value)
|
||||
{
|
||||
return new ProcessBuyTradeRequestData
|
||||
{
|
||||
|
||||
@@ -223,7 +223,7 @@ public class RepeatableQuestController(
|
||||
* @param repeatablesOfTypeInProfile The repeatables that have the replaced and new quest
|
||||
* @param replacedQuestId Id of the replaced quest
|
||||
*/
|
||||
private void CleanUpRepeatableChangeRequirements(PmcDataRepeatableQuest repeatablesOfTypeInProfile,
|
||||
protected void CleanUpRepeatableChangeRequirements(PmcDataRepeatableQuest repeatablesOfTypeInProfile,
|
||||
string replacedQuestId)
|
||||
{
|
||||
if (repeatablesOfTypeInProfile.ActiveQuests.Count == 1)
|
||||
@@ -239,7 +239,7 @@ public class RepeatableQuestController(
|
||||
}
|
||||
}
|
||||
|
||||
private RepeatableQuest? AttemptToGenerateRepeatableQuest(string sessionId, PmcData pmcData,
|
||||
protected RepeatableQuest? AttemptToGenerateRepeatableQuest(string sessionId, PmcData pmcData,
|
||||
QuestTypePool questTypePool, RepeatableQuestConfig repeatableConfig)
|
||||
{
|
||||
const int maxAttempts = 10;
|
||||
@@ -272,7 +272,7 @@ public class RepeatableQuestController(
|
||||
return newRepeatableQuest;
|
||||
}
|
||||
|
||||
private void RemoveQuestFromProfile(SptProfile? fullProfile, string questToReplaceId)
|
||||
protected void RemoveQuestFromProfile(SptProfile? fullProfile, string questToReplaceId)
|
||||
{
|
||||
// Find quest we're replacing in pmc profile quests array and remove it
|
||||
_questHelper.FindAndRemoveQuestFromArrayIfExists(questToReplaceId, fullProfile.CharacterData.PmcData.Quests);
|
||||
@@ -446,7 +446,7 @@ public class RepeatableQuestController(
|
||||
return returnData;
|
||||
}
|
||||
|
||||
private PmcDataRepeatableQuest GetRepeatableQuestSubTypeFromProfile(RepeatableQuestConfig repeatableConfig,
|
||||
protected PmcDataRepeatableQuest GetRepeatableQuestSubTypeFromProfile(RepeatableQuestConfig repeatableConfig,
|
||||
PmcData pmcData)
|
||||
{
|
||||
// Get from profile, add if missing
|
||||
@@ -475,7 +475,7 @@ public class RepeatableQuestController(
|
||||
return repeatableQuestDetails;
|
||||
}
|
||||
|
||||
private bool CanProfileAccessRepeatableQuests(RepeatableQuestConfig repeatableConfig, PmcData pmcData)
|
||||
protected bool CanProfileAccessRepeatableQuests(RepeatableQuestConfig repeatableConfig, PmcData pmcData)
|
||||
{
|
||||
// PMC and daily quests not unlocked yet
|
||||
if (repeatableConfig.Side == "Pmc" && !PlayerHasDailyPmcQuestsUnlocked(pmcData, repeatableConfig))
|
||||
@@ -503,7 +503,7 @@ public class RepeatableQuestController(
|
||||
* @param repeatableConfig Config of daily type to check
|
||||
* @returns True if unlocked
|
||||
*/
|
||||
private bool PlayerHasDailyPmcQuestsUnlocked(PmcData pmcData, RepeatableQuestConfig repeatableConfig)
|
||||
protected static bool PlayerHasDailyPmcQuestsUnlocked(PmcData pmcData, RepeatableQuestConfig repeatableConfig)
|
||||
{
|
||||
return pmcData.Info.Level >= repeatableConfig.MinPlayerLevel;
|
||||
}
|
||||
@@ -513,14 +513,14 @@ public class RepeatableQuestController(
|
||||
* @param pmcData Player profile to check
|
||||
* @returns True if unlocked
|
||||
*/
|
||||
private bool PlayerHasDailyScavQuestsUnlocked(PmcData pmcData)
|
||||
protected bool PlayerHasDailyScavQuestsUnlocked(PmcData pmcData)
|
||||
{
|
||||
return pmcData?.Hideout?.Areas?.FirstOrDefault(hideoutArea => hideoutArea.Type == HideoutAreas.INTEL_CENTER)
|
||||
?.Level >=
|
||||
1;
|
||||
}
|
||||
|
||||
private void ProcessExpiredQuests(PmcDataRepeatableQuest generatedRepeatables, PmcData pmcData)
|
||||
protected void ProcessExpiredQuests(PmcDataRepeatableQuest generatedRepeatables, PmcData pmcData)
|
||||
{
|
||||
var questsToKeep = new List<RepeatableQuest>();
|
||||
foreach (var activeQuest in generatedRepeatables.ActiveQuests)
|
||||
@@ -558,7 +558,7 @@ public class RepeatableQuestController(
|
||||
generatedRepeatables.ActiveQuests = questsToKeep;
|
||||
}
|
||||
|
||||
private QuestTypePool GenerateQuestPool(RepeatableQuestConfig repeatableConfig, int? pmcLevel)
|
||||
protected QuestTypePool GenerateQuestPool(RepeatableQuestConfig repeatableConfig, int? pmcLevel)
|
||||
{
|
||||
var questPool = CreateBaseQuestPool(repeatableConfig);
|
||||
|
||||
@@ -617,7 +617,7 @@ public class RepeatableQuestController(
|
||||
return questPool;
|
||||
}
|
||||
|
||||
private QuestTypePool CreateBaseQuestPool(RepeatableQuestConfig repeatableConfig)
|
||||
protected QuestTypePool CreateBaseQuestPool(RepeatableQuestConfig repeatableConfig)
|
||||
{
|
||||
return new QuestTypePool
|
||||
{
|
||||
@@ -640,7 +640,7 @@ public class RepeatableQuestController(
|
||||
};
|
||||
}
|
||||
|
||||
private Dictionary<ELocationName, List<string>> GetAllowedLocationsForPmcLevel(
|
||||
protected Dictionary<ELocationName, List<string>> GetAllowedLocationsForPmcLevel(
|
||||
Dictionary<ELocationName, List<string>> locations, int pmcLevel)
|
||||
{
|
||||
var allowedLocation = new Dictionary<ELocationName, List<string>>();
|
||||
@@ -694,7 +694,7 @@ public class RepeatableQuestController(
|
||||
/// <param name="repeatableConfig"></param>
|
||||
/// <param name="pmcData">Player profile</param>
|
||||
/// <returns>Quest count</returns>
|
||||
private int GetQuestCount(RepeatableQuestConfig repeatableConfig, PmcData pmcData)
|
||||
protected int GetQuestCount(RepeatableQuestConfig repeatableConfig, PmcData pmcData)
|
||||
{
|
||||
var questCount = repeatableConfig.NumQuests.GetValueOrDefault(0);
|
||||
if (questCount == 0)
|
||||
|
||||
@@ -43,9 +43,9 @@ public class TradeController(
|
||||
/// <summary>
|
||||
/// Handle TradingConfirm event
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionID">Session/Player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse ConfirmTrading(
|
||||
PmcData pmcData,
|
||||
@@ -82,9 +82,9 @@ public class TradeController(
|
||||
/// <summary>
|
||||
/// Handle RagFairBuyOffer event
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionID">Session/Player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse ConfirmRagfairTrading(
|
||||
PmcData pmcData,
|
||||
@@ -141,7 +141,7 @@ public class TradeController(
|
||||
/// <param name="fleaOffer">Offer being purchased</param>
|
||||
/// <param name="requestOffer">request data from client</param>
|
||||
/// <param name="output">Output to send back to client</param>
|
||||
private void BuyTraderItemFromRagfair(
|
||||
protected void BuyTraderItemFromRagfair(
|
||||
string sessionId,
|
||||
PmcData pmcData,
|
||||
RagfairOffer fleaOffer,
|
||||
@@ -187,7 +187,7 @@ public class TradeController(
|
||||
/// <param name="fleaOffer">Offer being purchased</param>
|
||||
/// <param name="requestOffer">request data from client</param>
|
||||
/// <param name="output">Output to send back to client</param>
|
||||
private void BuyPmcItemFromRagfair(
|
||||
protected void BuyPmcItemFromRagfair(
|
||||
string sessionId,
|
||||
PmcData pmcData,
|
||||
RagfairOffer fleaOffer,
|
||||
@@ -234,11 +234,11 @@ public class TradeController(
|
||||
/// <param name="offerId">id of the offer</param>
|
||||
/// <param name="offerOwnerId">Owner id</param>
|
||||
/// <returns>true if offer was made by a player</returns>
|
||||
private bool IsPlayerOffer(
|
||||
protected bool IsPlayerOffer(
|
||||
string offerId,
|
||||
string? offerOwnerId)
|
||||
{
|
||||
// No ownerid, not player offer
|
||||
// No ownerId, not player offer
|
||||
if (offerOwnerId is null)
|
||||
{
|
||||
return false;
|
||||
@@ -261,7 +261,7 @@ public class TradeController(
|
||||
/// <param name="fleaOffer">Flea offer being bought</param>
|
||||
/// <param name="pmcData">Player profile</param>
|
||||
/// <returns>True if player can buy offer</returns>
|
||||
private bool PlayerLacksTraderLoyaltyLevelToBuyOffer(
|
||||
protected bool PlayerLacksTraderLoyaltyLevelToBuyOffer(
|
||||
RagfairOffer fleaOffer,
|
||||
PmcData pmcData)
|
||||
{
|
||||
@@ -271,9 +271,9 @@ public class TradeController(
|
||||
/// <summary>
|
||||
/// Handle SellAllFromSavage event
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse SellScavItemsToFence(
|
||||
PmcData pmcData,
|
||||
@@ -293,7 +293,7 @@ public class TradeController(
|
||||
/// <param name="sessionId">Session id</param>
|
||||
/// <param name="roublesToSend">amount of roubles to send</param>
|
||||
/// <param name="trader">Trader to sell items to</param>
|
||||
private void MailMoneyToPlayer(
|
||||
protected void MailMoneyToPlayer(
|
||||
string sessionId,
|
||||
int roublesToSend,
|
||||
string trader)
|
||||
@@ -336,7 +336,7 @@ public class TradeController(
|
||||
/// <param name="handbookPrices">Prices of items from handbook</param>
|
||||
/// <param name="traderDetails">Trader being sold to, to perform buy category check against</param>
|
||||
/// <returns>Rouble price</returns>
|
||||
private int GetPriceOfItemAndChildren(
|
||||
protected int GetPriceOfItemAndChildren(
|
||||
string parentItemId,
|
||||
List<Item> items,
|
||||
Dictionary<string, int?> handbookPrices,
|
||||
|
||||
@@ -80,11 +80,16 @@ public class TraderController(
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adjust trader item prices based on config value multiplier
|
||||
/// </summary>
|
||||
/// <param name="trader"></param>
|
||||
/// <param name="multiplier"></param>
|
||||
protected void AdjustTraderItemPrices(Trader trader, double multiplier)
|
||||
{
|
||||
foreach (var kvp in trader.Assort?.BarterScheme)
|
||||
{
|
||||
var barterSchemeItem = kvp.Value[0][0];
|
||||
var barterSchemeItem = kvp.Value?.FirstOrDefault()?.FirstOrDefault();
|
||||
if (barterSchemeItem != null && _paymentHelper.IsMoneyTpl(barterSchemeItem.Template))
|
||||
{
|
||||
barterSchemeItem.Count += Math.Round(
|
||||
@@ -100,7 +105,7 @@ public class TraderController(
|
||||
/// If current time is > nextResupply(expire) time of trader, refresh traders assorts and
|
||||
/// Fence is handled slightly differently
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <returns>True if ran successfully</returns>
|
||||
public bool Update()
|
||||
{
|
||||
foreach (var (traderId, data) in _databaseService.GetTables().Traders)
|
||||
@@ -157,12 +162,12 @@ public class TraderController(
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Order traders by their traderId (Ttid)
|
||||
/// Order traders by their traderId (tid)
|
||||
/// </summary>
|
||||
/// <param name="traderA">First trader to compare</param>
|
||||
/// <param name="traderB">Second trader to compare</param>
|
||||
/// <returns>1,-1 or 0</returns>
|
||||
private int SortByTraderId(TraderBase traderA, TraderBase traderB)
|
||||
protected static int SortByTraderId(TraderBase traderA, TraderBase traderB)
|
||||
{
|
||||
return string.CompareOrdinal(traderA.Id, traderB.Id);
|
||||
}
|
||||
@@ -170,7 +175,7 @@ public class TraderController(
|
||||
/// <summary>
|
||||
/// Handle client/trading/api/getTrader
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="traderId"></param>
|
||||
/// <returns></returns>
|
||||
public TraderBase GetTrader(string sessionId, string traderId)
|
||||
@@ -181,7 +186,7 @@ public class TraderController(
|
||||
/// <summary>
|
||||
/// Handle client/trading/api/getTraderAssort
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="traderId"></param>
|
||||
/// <returns></returns>
|
||||
public TraderAssort GetAssort(string sessionId, string traderId)
|
||||
|
||||
@@ -27,7 +27,7 @@ public class WeatherController(
|
||||
/// <summary>
|
||||
/// Handle client/weather
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <returns>WeatherData</returns>
|
||||
public WeatherData Generate()
|
||||
{
|
||||
var result = new WeatherData
|
||||
@@ -48,8 +48,8 @@ public class WeatherController(
|
||||
/// <summary>
|
||||
/// Handle client/localGame/weather
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <returns></returns>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns>GetLocalWeatherResponseData</returns>
|
||||
public GetLocalWeatherResponseData GenerateLocal(string sessionId)
|
||||
{
|
||||
var result = new GetLocalWeatherResponseData
|
||||
|
||||
@@ -14,9 +14,9 @@ public class WishlistController(
|
||||
/// <summary>
|
||||
/// Handle AddToWishList
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse AddToWishList(
|
||||
PmcData pmcData,
|
||||
@@ -34,9 +34,9 @@ public class WishlistController(
|
||||
/// <summary>
|
||||
/// Handle RemoveFromWishList event
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse RemoveFromWishList(
|
||||
PmcData pmcData,
|
||||
@@ -54,9 +54,9 @@ public class WishlistController(
|
||||
/// <summary>
|
||||
/// Handle changeWishlistItemCategory event
|
||||
/// </summary>
|
||||
/// <param name="pmcData"></param>
|
||||
/// <param name="pmcData">Players PMC profile</param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns></returns>
|
||||
public ItemEventRouterResponse ChangeWishListItemCategory(
|
||||
PmcData pmcData,
|
||||
|
||||
@@ -372,7 +372,7 @@ public class BotEquipmentModGenerator(
|
||||
return result;
|
||||
}
|
||||
|
||||
private MinMax<int> GetMinMaxArmorPlateClass(List<TemplateItem> platePool)
|
||||
protected static MinMax<int> GetMinMaxArmorPlateClass(List<TemplateItem> platePool)
|
||||
{
|
||||
platePool.Sort(
|
||||
(x, y) =>
|
||||
|
||||
@@ -39,7 +39,7 @@ public class BotLootGenerator(
|
||||
/// </summary>
|
||||
/// <param name="botRole"></param>
|
||||
/// <returns></returns>
|
||||
private ItemSpawnLimitSettings GetItemSpawnLimitsForBot(string botRole)
|
||||
protected ItemSpawnLimitSettings GetItemSpawnLimitsForBot(string botRole)
|
||||
{
|
||||
var limits = GetItemSpawnLimitsForBotType(botRole);
|
||||
|
||||
@@ -329,7 +329,7 @@ public class BotLootGenerator(
|
||||
}
|
||||
}
|
||||
|
||||
private MinMaxLootItemValue? GetSingleItemLootPriceLimits(int botLevel, bool isPmc)
|
||||
protected MinMaxLootItemValue? GetSingleItemLootPriceLimits(int botLevel, bool isPmc)
|
||||
{
|
||||
// TODO - extend to other bot types
|
||||
if (!isPmc)
|
||||
@@ -351,7 +351,7 @@ public class BotLootGenerator(
|
||||
/// <param name="botLevel">Bots level</param>
|
||||
/// <param name="isPmc">Is the bot a PMC</param>
|
||||
/// <returns>int</returns>
|
||||
private double? GetBackpackRoubleTotalByLevel(int botLevel, bool isPmc)
|
||||
protected double? GetBackpackRoubleTotalByLevel(int botLevel, bool isPmc)
|
||||
{
|
||||
if (!isPmc)
|
||||
{
|
||||
@@ -368,7 +368,7 @@ public class BotLootGenerator(
|
||||
/// </summary>
|
||||
/// <param name="botInventory"></param>
|
||||
/// <returns></returns>
|
||||
private HashSet<EquipmentSlots> GetAvailableContainersBotCanStoreItemsIn(BotBaseInventory botInventory)
|
||||
protected HashSet<EquipmentSlots> GetAvailableContainersBotCanStoreItemsIn(BotBaseInventory botInventory)
|
||||
{
|
||||
HashSet<EquipmentSlots> result = [EquipmentSlots.Pockets];
|
||||
|
||||
@@ -390,7 +390,7 @@ public class BotLootGenerator(
|
||||
/// </summary>
|
||||
/// <param name="botInventory">Inventory to add items to</param>
|
||||
/// <param name="botRole">Role of bot (pmcBEAR/pmcUSEC)</param>
|
||||
private void AddForcedMedicalItemsToPmcSecure(BotBaseInventory botInventory, string botRole)
|
||||
protected void AddForcedMedicalItemsToPmcSecure(BotBaseInventory botInventory, string botRole)
|
||||
{
|
||||
// surv12
|
||||
AddLootFromPool(
|
||||
@@ -435,7 +435,7 @@ public class BotLootGenerator(
|
||||
/// <param name="containersIdFull"></param>
|
||||
/// <param name="totalValueLimitRub">Total value of loot allowed in roubles</param>
|
||||
/// <param name="isPmc">Is bot being generated for a pmc</param>
|
||||
private void AddLootFromPool
|
||||
protected void AddLootFromPool
|
||||
(
|
||||
Dictionary<string, double> pool,
|
||||
HashSet<EquipmentSlots> equipmentSlots,
|
||||
@@ -663,7 +663,7 @@ public class BotLootGenerator(
|
||||
/// <summary>
|
||||
/// Add generated weapons to inventory as loot
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <param name="botInventory">Inventory to add preset to</param>
|
||||
/// <param name="equipmentSlot">Slot to place the preset in (backpack)</param>
|
||||
/// <param name="templateInventory">Bots template, assault.json</param>
|
||||
@@ -738,7 +738,7 @@ public class BotLootGenerator(
|
||||
/// <param name="botRole">Bot type</param>
|
||||
/// <param name="itemSpawnLimits"></param>
|
||||
/// <returns>true if item has reached spawn limit</returns>
|
||||
private bool ItemHasReachedSpawnLimit(TemplateItem? itemTemplate, string botRole, ItemSpawnLimitSettings? itemSpawnLimits)
|
||||
protected bool ItemHasReachedSpawnLimit(TemplateItem? itemTemplate, string botRole, ItemSpawnLimitSettings? itemSpawnLimits)
|
||||
{
|
||||
// PMCs and scavs have different sections of bot config for spawn limits
|
||||
if (itemSpawnLimits is not null && itemSpawnLimits.GlobalLimits?.Count == 0)
|
||||
|
||||
@@ -40,7 +40,7 @@ public class BotWeaponGenerator(
|
||||
protected PmcConfig _pmcConfig = _configServer.GetConfig<PmcConfig>();
|
||||
protected RepairConfig _repairConfig = _configServer.GetConfig<RepairConfig>();
|
||||
|
||||
private static List<IInventoryMagGen> MagGenSetUp(IEnumerable<IInventoryMagGen> components)
|
||||
protected static List<IInventoryMagGen> MagGenSetUp(IEnumerable<IInventoryMagGen> components)
|
||||
{
|
||||
var inventoryMagGens = components.ToList();
|
||||
inventoryMagGens.Sort((a, b) => a.GetPriority() - b.GetPriority());
|
||||
|
||||
@@ -978,7 +978,7 @@ public class LocationLootGenerator(
|
||||
}
|
||||
}
|
||||
|
||||
private ContainerItem CreateDynamicLootItem(string? chosenComposedKey, List<Item> items, Dictionary<string, List<StaticAmmoDetails>> staticAmmoDist)
|
||||
protected ContainerItem CreateDynamicLootItem(string? chosenComposedKey, List<Item> items, Dictionary<string, List<StaticAmmoDetails>> staticAmmoDist)
|
||||
{
|
||||
var chosenItem = items.FirstOrDefault(item => item.Id == chosenComposedKey);
|
||||
var chosenTpl = chosenItem?.Template;
|
||||
@@ -1168,7 +1168,7 @@ public class LocationLootGenerator(
|
||||
};
|
||||
}
|
||||
|
||||
private List<Item> GetArmorItems(string chosenTpl, Item? rootItem, List<Item> items, TemplateItem armorDbTemplate)
|
||||
protected List<Item> GetArmorItems(string chosenTpl, Item? rootItem, List<Item> items, TemplateItem armorDbTemplate)
|
||||
{
|
||||
var defaultPreset = _presetHelper.GetDefaultPreset(chosenTpl);
|
||||
if (defaultPreset is not null)
|
||||
@@ -1196,7 +1196,7 @@ public class LocationLootGenerator(
|
||||
return items;
|
||||
}
|
||||
|
||||
private Item? CreateWeaponItems(string chosenTpl, Dictionary<string, List<StaticAmmoDetails>> staticAmmoDist, string? parentId, ref List<Item> items)
|
||||
protected Item? CreateWeaponItems(string chosenTpl, Dictionary<string, List<StaticAmmoDetails>> staticAmmoDist, string? parentId, ref List<Item> items)
|
||||
{
|
||||
Item? rootItem;
|
||||
List<Item> children = [];
|
||||
@@ -1309,7 +1309,7 @@ public class LocationLootGenerator(
|
||||
return rootItem;
|
||||
}
|
||||
|
||||
private void GenerateStaticMagazineItem(Dictionary<string, List<StaticAmmoDetails>> staticAmmoDist, Item? rootItem, TemplateItem itemTemplate,
|
||||
protected void GenerateStaticMagazineItem(Dictionary<string, List<StaticAmmoDetails>> staticAmmoDist, Item? rootItem, TemplateItem itemTemplate,
|
||||
List<Item> items)
|
||||
{
|
||||
List<Item> magazineWithCartridges = [rootItem];
|
||||
|
||||
@@ -299,7 +299,7 @@ public class LootGenerator(
|
||||
/// </summary>
|
||||
/// <param name="limits">limits as defined in config</param>
|
||||
/// <returns>record, key: item tplId, value: current/max item count allowed</returns>
|
||||
private Dictionary<string, ItemLimit> InitItemLimitCounter(Dictionary<string, int> limits)
|
||||
protected Dictionary<string, ItemLimit> InitItemLimitCounter(Dictionary<string, int> limits)
|
||||
{
|
||||
var itemTypeCounts = new Dictionary<string, ItemLimit>();
|
||||
foreach (var itemTypeId in limits)
|
||||
|
||||
@@ -106,7 +106,7 @@ public class PMCLootGenerator
|
||||
return _pocketLootPool;
|
||||
}
|
||||
|
||||
private HashSet<string> GetLootBlacklist()
|
||||
protected HashSet<string> GetLootBlacklist()
|
||||
{
|
||||
var blacklist = new HashSet<string>();
|
||||
blacklist.UnionWith(_pmcConfig.PocketLoot.Blacklist);
|
||||
|
||||
@@ -215,7 +215,7 @@ public class RepeatableQuestRewardGenerator(
|
||||
return rewards;
|
||||
}
|
||||
|
||||
private QuestRewardValues GetQuestRewardValues(RewardScaling? rewardScaling, double? difficulty, int pmcLevel)
|
||||
protected QuestRewardValues GetQuestRewardValues(RewardScaling? rewardScaling, double? difficulty, int pmcLevel)
|
||||
{
|
||||
// difficulty could go from 0.2 ... -> for lowest difficulty receive 0.2*nominal reward
|
||||
var levelsConfig = rewardScaling.Levels;
|
||||
@@ -264,7 +264,7 @@ public class RepeatableQuestRewardGenerator(
|
||||
};
|
||||
}
|
||||
|
||||
private double GetRewardXp(double? effectiveDifficulty, int pmcLevel, List<double>? levelsConfig,
|
||||
protected double GetRewardXp(double? effectiveDifficulty, int pmcLevel, List<double>? levelsConfig,
|
||||
List<double>? xpConfig, double? rewardSpreadConfig)
|
||||
{
|
||||
return Math.Floor(
|
||||
@@ -275,7 +275,7 @@ public class RepeatableQuestRewardGenerator(
|
||||
);
|
||||
}
|
||||
|
||||
private double GetGpCoinRewardCount(double? effectiveDifficulty, int pmcLevel, List<double>? levelsConfig,
|
||||
protected double GetGpCoinRewardCount(double? effectiveDifficulty, int pmcLevel, List<double>? levelsConfig,
|
||||
List<double>? gpCoinConfig,
|
||||
double? rewardSpreadConfig)
|
||||
{
|
||||
@@ -287,7 +287,7 @@ public class RepeatableQuestRewardGenerator(
|
||||
);
|
||||
}
|
||||
|
||||
private double GetRewardRep(double? effectiveDifficulty, int pmcLevel, List<double>? levelsConfig,
|
||||
protected double GetRewardRep(double? effectiveDifficulty, int pmcLevel, List<double>? levelsConfig,
|
||||
List<double>? reputationConfig,
|
||||
double? rewardSpreadConfig)
|
||||
{
|
||||
@@ -301,12 +301,12 @@ public class RepeatableQuestRewardGenerator(
|
||||
100;
|
||||
}
|
||||
|
||||
private int GetRewardNumItems(int pmcLevel, List<double>? levelsConfig, List<double>? itemsConfig)
|
||||
protected int GetRewardNumItems(int pmcLevel, List<double>? levelsConfig, List<double>? itemsConfig)
|
||||
{
|
||||
return _randomUtil.RandInt(1, (int) Math.Round(_mathUtil.Interp1(pmcLevel, levelsConfig, itemsConfig) ?? 0) + 1);
|
||||
}
|
||||
|
||||
private double GetRewardRoubles(double? effectiveDifficulty, int pmcLevel, List<double>? levelsConfig,
|
||||
protected double GetRewardRoubles(double? effectiveDifficulty, int pmcLevel, List<double>? levelsConfig,
|
||||
List<double>? roublesConfig,
|
||||
double? rewardSpreadConfig)
|
||||
{
|
||||
@@ -318,7 +318,7 @@ public class RepeatableQuestRewardGenerator(
|
||||
);
|
||||
}
|
||||
|
||||
private Dictionary<TemplateItem, int> GetRewardableItemsFromPoolWithinBudget(List<TemplateItem> itemPool,
|
||||
protected Dictionary<TemplateItem, int> GetRewardableItemsFromPoolWithinBudget(List<TemplateItem> itemPool,
|
||||
int maxItemCount, double itemRewardBudget, RepeatableQuestConfig repeatableConfig)
|
||||
{
|
||||
var itemsToReturn = new Dictionary<TemplateItem, int>();
|
||||
@@ -404,7 +404,7 @@ public class RepeatableQuestRewardGenerator(
|
||||
* @param rewardNumItems
|
||||
* @returns Count that fits budget (min 1)
|
||||
*/
|
||||
private int CalculateAmmoStackSizeThatFitsBudget(TemplateItem itemSelected, double roublesBudget,
|
||||
protected int CalculateAmmoStackSizeThatFitsBudget(TemplateItem itemSelected, double roublesBudget,
|
||||
int rewardNumItems)
|
||||
{
|
||||
// Calculate budget per reward item
|
||||
@@ -422,7 +422,7 @@ public class RepeatableQuestRewardGenerator(
|
||||
return (int) Math.Max(1, Math.Min(stackSizeThatFitsBudget, stackMaxCount));
|
||||
}
|
||||
|
||||
private bool CanIncreaseRewardItemStackSize(TemplateItem item, int maxRoublePriceToStack,
|
||||
protected bool CanIncreaseRewardItemStackSize(TemplateItem item, int maxRoublePriceToStack,
|
||||
int randomChanceToPass = 100)
|
||||
{
|
||||
var isEligibleForStackSizeIncrease =
|
||||
@@ -445,7 +445,7 @@ public class RepeatableQuestRewardGenerator(
|
||||
* @param item Reward item to get stack size for
|
||||
* @returns matching stack size for the passed in items price
|
||||
*/
|
||||
private int GetRandomisedRewardItemStackSizeByPrice(TemplateItem item)
|
||||
protected int GetRandomisedRewardItemStackSizeByPrice(TemplateItem item)
|
||||
{
|
||||
var rewardItemPrice = _presetHelper.GetDefaultPresetOrItemPrice(item.Id);
|
||||
|
||||
@@ -474,7 +474,7 @@ public class RepeatableQuestRewardGenerator(
|
||||
* @param traderId Id of the trader who will give player reward
|
||||
* @returns Array of reward items that fit budget
|
||||
*/
|
||||
private List<TemplateItem> ChooseRewardItemsWithinBudget(RepeatableQuestConfig repeatableConfig,
|
||||
protected List<TemplateItem> ChooseRewardItemsWithinBudget(RepeatableQuestConfig repeatableConfig,
|
||||
double? roublesBudget, string traderId)
|
||||
{
|
||||
// First filter for type and baseclass to avoid lookup in handbook for non-available items
|
||||
@@ -515,7 +515,7 @@ public class RepeatableQuestRewardGenerator(
|
||||
* @param minPrice The minimum priced item to include
|
||||
* @returns True if any items remain in `rewardItems`, false otherwise
|
||||
*/
|
||||
private List<TemplateItem> FilterRewardPoolWithinBudget(List<TemplateItem> rewardItems, double roublesBudget,
|
||||
protected List<TemplateItem> FilterRewardPoolWithinBudget(List<TemplateItem> rewardItems, double roublesBudget,
|
||||
double minPrice)
|
||||
{
|
||||
return rewardItems.Where(
|
||||
@@ -528,7 +528,7 @@ public class RepeatableQuestRewardGenerator(
|
||||
.ToList();
|
||||
}
|
||||
|
||||
private KeyValuePair<Reward, double>? GetRandomWeaponPresetWithinBudget(double roublesBudget, int rewardIndex)
|
||||
protected KeyValuePair<Reward, double>? GetRandomWeaponPresetWithinBudget(double roublesBudget, int rewardIndex)
|
||||
{
|
||||
// Add a random default preset weapon as reward
|
||||
var defaultPresetPool = new ExhaustableArray<Preset>(
|
||||
@@ -652,7 +652,7 @@ public class RepeatableQuestRewardGenerator(
|
||||
return questRewardItem;
|
||||
}
|
||||
|
||||
private Reward GetMoneyReward(string traderId, double rewardRoubles, int rewardIndex)
|
||||
protected Reward GetMoneyReward(string traderId, double rewardRoubles, int rewardIndex)
|
||||
{
|
||||
// Determine currency based on trader
|
||||
// PK and Fence use Euros, everyone else is Roubles
|
||||
@@ -720,7 +720,7 @@ public class RepeatableQuestRewardGenerator(
|
||||
* @param {string} tpl template id of item to check
|
||||
* @returns True if item is valid reward
|
||||
*/
|
||||
private bool IsValidRewardItem(string tpl, RepeatableQuestConfig repeatableQuestConfig,
|
||||
protected bool IsValidRewardItem(string tpl, RepeatableQuestConfig repeatableQuestConfig,
|
||||
List<string>? itemBaseWhitelist = null)
|
||||
{
|
||||
// Return early if not valid item to give as reward
|
||||
|
||||
@@ -193,7 +193,7 @@ public class BotGeneratorHelper(
|
||||
/// <param name="maxResource">Max resource value of medical items</param>
|
||||
/// <param name="randomizationValues">Value provided from config</param>
|
||||
/// <returns>Randomized value from maxHpResource</returns>
|
||||
private double GetRandomizedResourceValue(double maxResource, RandomisedResourceValues? randomizationValues)
|
||||
protected double GetRandomizedResourceValue(double maxResource, RandomisedResourceValues? randomizationValues)
|
||||
{
|
||||
if (randomizationValues is null)
|
||||
{
|
||||
@@ -218,7 +218,7 @@ public class BotGeneratorHelper(
|
||||
/// <param name="setting">the setting of the weapon attachment/helmet equipment to be activated</param>
|
||||
/// <param name="defaultValue">default value for the chance of activation if the botrole or bot equipment role is undefined</param>
|
||||
/// <returns>Percent chance to be active</returns>
|
||||
private double? GetBotEquipmentSettingFromConfig(string? botRole, string setting, double defaultValue)
|
||||
protected double? GetBotEquipmentSettingFromConfig(string? botRole, string setting, double defaultValue)
|
||||
{
|
||||
if (botRole is null)
|
||||
{
|
||||
@@ -273,7 +273,7 @@ public class BotGeneratorHelper(
|
||||
/// <param name="itemTemplate">weapon object being generated for</param>
|
||||
/// <param name="botRole">type of bot being generated for</param>
|
||||
/// <returns>Repairable object</returns>
|
||||
private UpdRepairable GenerateWeaponRepairableProperties(TemplateItem itemTemplate, string? botRole = null)
|
||||
protected UpdRepairable GenerateWeaponRepairableProperties(TemplateItem itemTemplate, string? botRole = null)
|
||||
{
|
||||
var maxDurability = _durabilityLimitsHelper.GetRandomizedMaxWeaponDurability(itemTemplate, botRole);
|
||||
var currentDurability = _durabilityLimitsHelper.GetRandomizedWeaponDurability(
|
||||
@@ -295,7 +295,7 @@ public class BotGeneratorHelper(
|
||||
/// <param name="itemTemplate">weapon object being generated for</param>
|
||||
/// <param name="botRole">type of bot being generated for</param>
|
||||
/// <returns>Repairable object</returns>
|
||||
private UpdRepairable GenerateArmorRepairableProperties(TemplateItem itemTemplate, string? botRole = null)
|
||||
protected UpdRepairable GenerateArmorRepairableProperties(TemplateItem itemTemplate, string? botRole = null)
|
||||
{
|
||||
double maxDurability;
|
||||
double currentDurability;
|
||||
@@ -724,7 +724,7 @@ public class BotGeneratorHelper(
|
||||
/// <param name="slotGrid">Items sub-grid we want to place item inside</param>
|
||||
/// <param name="itemTpl">Item tpl being placed</param>
|
||||
/// <returns>True if allowed</returns>
|
||||
private bool ItemAllowedInContainer(Grid? slotGrid, string? itemTpl)
|
||||
protected bool ItemAllowedInContainer(Grid? slotGrid, string? itemTpl)
|
||||
{
|
||||
var propFilters = slotGrid?.Props?.Filters;
|
||||
var excludedFilter = propFilters?.FirstOrDefault()?.ExcludedFilter ?? [];
|
||||
|
||||
@@ -66,7 +66,7 @@ public class ContainerHelper
|
||||
return new FindSlotResult(false);
|
||||
}
|
||||
|
||||
private bool ItemBiggerThan1X1(int itemWidth, int itemHeight)
|
||||
protected static bool ItemBiggerThan1X1(int itemWidth, int itemHeight)
|
||||
{
|
||||
return itemWidth * itemHeight > 1;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ public abstract class AbstractDialogChatBot(
|
||||
return null;
|
||||
}
|
||||
|
||||
private string? SendPlayerHelpMessage(string sessionId, SendMessageRequest request)
|
||||
protected string? SendPlayerHelpMessage(string sessionId, SendMessageRequest request)
|
||||
{
|
||||
_mailSendService.SendUserMessageToPlayer(
|
||||
sessionId,
|
||||
|
||||
@@ -73,7 +73,7 @@ public class SptDialogueChatBot(
|
||||
return request.DialogId;
|
||||
}
|
||||
|
||||
private static List<IChatMessageHandler> ChatMessageHandlerSetup(IEnumerable<IChatMessageHandler> components)
|
||||
protected static List<IChatMessageHandler> ChatMessageHandlerSetup(IEnumerable<IChatMessageHandler> components)
|
||||
{
|
||||
var chatMessageHandlers = components.ToList();
|
||||
chatMessageHandlers.Sort((a, b) => a.GetPriority() - b.GetPriority());
|
||||
@@ -81,12 +81,12 @@ public class SptDialogueChatBot(
|
||||
return chatMessageHandlers;
|
||||
}
|
||||
|
||||
private string GetUnrecognizedCommandMessage()
|
||||
protected string GetUnrecognizedCommandMessage()
|
||||
{
|
||||
return "Unknown command.";
|
||||
}
|
||||
|
||||
private string? SendPlayerHelpMessage(string sessionId, SendMessageRequest request)
|
||||
protected string? SendPlayerHelpMessage(string sessionId, SendMessageRequest request)
|
||||
{
|
||||
_mailSendService.SendUserMessageToPlayer(
|
||||
sessionId,
|
||||
|
||||
@@ -54,7 +54,7 @@ public class DialogueHelper(
|
||||
/// Get the item contents for a particular message.
|
||||
/// </summary>
|
||||
/// <param name="messageID"></param>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <param name="itemId">Item being moved to inventory</param>
|
||||
/// <returns></returns>
|
||||
public List<Item> GetMessageItemContents(string messageID, string sessionID, string itemId)
|
||||
|
||||
@@ -76,11 +76,11 @@ public class DurabilityLimitsHelper(
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert a botrole into a durability role used for looking up durability values with
|
||||
/// Convert a bots role into a durability role used for looking up durability values with
|
||||
/// </summary>
|
||||
/// <param name="botRole">Role to convert</param>
|
||||
/// <returns></returns>
|
||||
private string GetDurabilityRole(string? botRole)
|
||||
protected string GetDurabilityRole(string? botRole)
|
||||
{
|
||||
if (botRole is null)
|
||||
{
|
||||
|
||||
@@ -366,7 +366,7 @@ public class InventoryHelper(
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
handleContainerPlacementError(ex.Message, output);
|
||||
HandleContainerPlacementError(ex.Message, output);
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -408,7 +408,7 @@ public class InventoryHelper(
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
handleContainerPlacementError(ex.Message, output);
|
||||
HandleContainerPlacementError(ex.Message, output);
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -433,7 +433,7 @@ public class InventoryHelper(
|
||||
}
|
||||
}
|
||||
|
||||
private void handleContainerPlacementError(string errorText, ItemEventRouterResponse output)
|
||||
protected void HandleContainerPlacementError(string errorText, ItemEventRouterResponse output)
|
||||
{
|
||||
_logger.Error(_localisationService.GetText("inventory-fill_container_failed", errorText));
|
||||
|
||||
@@ -1290,7 +1290,7 @@ public class InventoryHelper(
|
||||
return IsParentInStash(itemToCheck.Id, pmcData);
|
||||
}
|
||||
|
||||
private bool IsParentInStash(string itemId, PmcData pmcData)
|
||||
protected static bool IsParentInStash(string itemId, PmcData pmcData)
|
||||
{
|
||||
// Item not found / has no parent
|
||||
var item = pmcData.Inventory.Items.FirstOrDefault(item => item.Id == itemId);
|
||||
|
||||
@@ -21,7 +21,7 @@ public class NotificationSendHelper(
|
||||
/// <summary>
|
||||
/// Send notification message to the appropriate channel
|
||||
/// </summary>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
/// <param name="notificationMessage"></param>
|
||||
public void SendMessage(string sessionID, WsNotificationEvent notificationMessage)
|
||||
{
|
||||
|
||||
@@ -61,7 +61,7 @@ public class ProfileHelper(
|
||||
/// <summary>
|
||||
/// Get the pmc and scav profiles as an array by profile id
|
||||
/// </summary>
|
||||
/// <param name="sessionId"></param>
|
||||
/// <param name="sessionId">Session/Player id</param>
|
||||
/// <returns>Array of PmcData objects</returns>
|
||||
public List<PmcData> GetCompleteProfile(string sessionId)
|
||||
{
|
||||
|
||||
@@ -52,7 +52,7 @@ public class NotificationService
|
||||
/// <summary>
|
||||
/// Get message queue for session
|
||||
/// </summary>
|
||||
/// <param name="sessionID"></param>
|
||||
/// <param name="sessionID">Session/player id</param>
|
||||
public List<WsNotificationEvent> Get(string sessionID)
|
||||
{
|
||||
if (sessionID is null)
|
||||
|
||||
@@ -122,7 +122,7 @@ public class RepairService(
|
||||
/// <param name="repairedItemId">Repaired item id</param>
|
||||
/// <param name="repairCost">Cost to repair item in roubles</param>
|
||||
/// <param name="traderId">Id of the trader who repaired the item / who is paid</param>
|
||||
/// <param name="output"></param>
|
||||
/// <param name="output">Client response</param>
|
||||
public void PayForRepair(
|
||||
string sessionID,
|
||||
PmcData pmcData,
|
||||
|
||||
Reference in New Issue
Block a user