diff --git a/Core/Controllers/BotController.cs b/Core/Controllers/BotController.cs index dbffe2b7..1b3a809a 100644 --- a/Core/Controllers/BotController.cs +++ b/Core/Controllers/BotController.cs @@ -1,4 +1,5 @@ using Core.Models.Common; +using Core.Models.Eft.Common; using Core.Models.Eft.Common.Tables; using Core.Models.Spt.Config; @@ -83,10 +84,14 @@ public class BotController { throw new NotImplementedException(); } - - + public int GetBotCap() { throw new NotImplementedException(); } + + public object GetAiBotBrainTypes() // TODO: Returns `any` in the node server + { + throw new NotImplementedException(); + } } \ No newline at end of file diff --git a/Core/Controllers/BuildController.cs b/Core/Controllers/BuildController.cs new file mode 100644 index 00000000..91299800 --- /dev/null +++ b/Core/Controllers/BuildController.cs @@ -0,0 +1,66 @@ +using Core.Models.Eft.Profile; + +namespace Core.Controllers; + +public class BuildController +{ + /// + /// Handle client/handbook/builds/my/list + /// + /// + /// + public UserBuilds GetUserBuilds(string sessionID) + { + throw new NotImplementedException(); + } + + /// + /// Handle client/builds/weapon/save + /// + /// + /// + public void SaveWeaponBuild(string sessionId, PresetBuildActionRequestData body) + { + throw new NotImplementedException(); + } + + /// + /// Handle client/builds/equipment/save event + /// + /// + /// + public void SaveEquipmentBuild(string sessionId, PresetBuildActionRequestData request) + { + throw new NotImplementedException(); + } + + /// + /// Handle client/builds/delete + /// + /// + /// + public void RemoveBuild(string sessionId, RemoveBuildReqestData request) + { + RemovePlayerBuild(request.id, sessionId); + } + + /// + /// Handle client/builds/magazine/save + /// + /// + /// + public void CreateMagazineTemplate(string sessionId, SetMagazineRequest request) + { + throw new NotImplementedException(); + } + + /// + /// + /// + /// + /// + private void RemovePlayerBuild(string idToRemove, string sessionId) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Controllers/ClientLogController.cs b/Core/Controllers/ClientLogController.cs new file mode 100644 index 00000000..3dcab6af --- /dev/null +++ b/Core/Controllers/ClientLogController.cs @@ -0,0 +1,15 @@ +using Core.Models.Spt.Logging; + +namespace Core.Controllers; + +public class ClientLogController +{ + /// + /// Handle /singleplayer/log + /// + /// + public void ClientLog(ClientLogRequest logRequest) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Controllers/CustomizationController.cs b/Core/Controllers/CustomizationController.cs new file mode 100644 index 00000000..f8e7307b --- /dev/null +++ b/Core/Controllers/CustomizationController.cs @@ -0,0 +1,141 @@ +using Core.Models.Eft.Common; +using Core.Models.Eft.Common.Tables; +using Core.Models.Eft.Hideout; +using Core.Models.Eft.Profile; + +namespace Core.Controllers; + +public class CustomizationController +{ + /// + /// Get purchasable clothing items from trader that match players side (usec/bear) + /// + /// trader to look up clothing for + /// Session id + /// Suit array + public Suit GetTraderSuits(string traderId, string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Handle CustomizationBuy event + /// Purchase/unlock a clothing item from a trader + /// + /// Player profile + /// Request object + /// Session id + /// ItemEventRouterResponse + public ItemEventRouterResponse BuyClothing( + PmcData pmcData, + BuyClothingRequest buyClothingRequest, + string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Update output object and player profile with purchase details + /// + /// Session id + /// Player profile + /// Clothing purchased + /// Client response + private void PayForClothingItems( + string sessionId, + PmcData pmcData, + List itemsToPayForClothingWith, + ItemEventRouterResponse output) + { + throw new NotImplementedException(); + } + + /// + /// Update output object and player profile with purchase details for single piece of clothing + /// + /// Session id + /// Player profile + /// Payment details + /// Client response + private void PayForClothingItem( + string sessionId, + PmcData pmcData, + PaymentItemForClothing paymentItemDetails, + ItemEventRouterResponse output) + { + throw new NotImplementedException(); + } + + /// + /// + /// + /// + /// + private List GetAllTraderSuits(string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Handle client/hideout/customization/offer/list + /// + /// + /// + /// + public HideoutCustomisationStorage GetHideoutCustomisation( + string sessionId, + EmptyRequestData info) + { + throw new NotImplementedException(); + } + + /// + /// Handle client/customization/storage + /// + /// + /// + /// + public List GetCustomisationStorage( + string sessionId, + EmptyRequestData info) + { + throw new NotImplementedException(); + } + + /// + /// + /// + /// + /// + private string GetGameEdition(SptProfile profile) + { + throw new NotImplementedException(); + } + + /// + /// Handle CustomizationSet event + /// + /// + /// + /// + /// + public ItemEventRouterResponse SetClothing( + string sessionId, + CustomizationSetRequest request, + PmcData pmcData) + { + throw new NotImplementedException(); + } + + /// + /// Applies a purchased suit to the players doll + /// + /// Suit to apply to profile + /// Profile to update + private void ApplyClothingItemToProfile( + CustomizationSetOption customization, + PmcData pmcData) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Controllers/DialogueController.cs b/Core/Controllers/DialogueController.cs new file mode 100644 index 00000000..5780e3b8 --- /dev/null +++ b/Core/Controllers/DialogueController.cs @@ -0,0 +1,250 @@ +using Core.Models.Eft.Profile; +using Core.Models.Enums; + +namespace Core.Controllers; + +public class DialogueController +{ + /// + /// + /// + /// + public void RegisterChatBot(DialogueChatBot chatBot) + { + throw new NotImplementedException(); + } + + /// + /// Handle onUpdate spt event + /// + public void Update() + { + throw new NotImplementedException(); + } + + /// + /// Handle client/friend/list + /// + /// session id + /// GetFriendListDataResponse + public GetFriendListDataResponse GetFriendList(string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Handle client/mail/dialog/list + /// Create array holding trader dialogs and mail interactions with player + /// Set the content of the dialogue on the list tab. + /// + /// Session Id + /// list of dialogs + public List GenerateDialogueList(string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Get the content of a dialogue + /// + /// Dialog id + /// Session Id + /// DialogueInfo + public DialogueInfo GetDialogueInfo( + string dialogueId, + string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Get the users involved in a dialog (player + other party) + /// + /// The dialog to check for users + /// What type of message is being sent + /// Player id + /// UserDialogInfo list + public List GetDialogueUsers( + Dialogue dialogue, + MessageType messageType, + string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Handle client/mail/dialog/view + /// Handle player clicking 'messenger' and seeing all the messages they've received + /// Set the content of the dialogue on the details panel, showing all the messages + /// for the specified dialogue. + /// + /// Get dialog request + /// Session id + /// GetMailDialogViewResponseData object + public GetMailDialogViewResponseData GenerateDialogueView( + GetMailDialogViewResponseData request, + string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Get dialog from player profile, create if doesn't exist + /// + /// Player profile + /// get dialog request + /// Dialogue + private Dialogue GetDialogByIdFromProfile( + SptProfile profile, + GetMailDialogViewRequestData request) + { + throw new NotImplementedException(); + } + + /// + /// Get the users involved in a mail between two entities + /// + /// Player profile + /// The participants of the mail + /// UserDialogInfo list + private List GetProfilesForMail( + SptProfile fullProfile, + List? userDialogs) + { + throw new NotImplementedException(); + } + + /// + /// Get a count of messages with attachments from a particular dialog + /// + /// Session id + /// Dialog id + /// Count of messages with attachments + private int GetUnreadMessagesWithAttachmentsCount( + string sessionId, + string dialogueId) + { + throw new NotImplementedException(); + } + + /// + /// Does list have messages with uncollected rewards (includes expired rewards) + /// + /// Messages to check + /// true if uncollected rewards found + private bool MessagesHaveUncollectedRewards(List messages) + { + throw new NotImplementedException(); + } + + /// + /// Handle client/mail/dialog/remove + /// Remove an entire dialog with an entity (trader/user) + /// + /// id of the dialog to remove + /// Player id + public void RemoveDialogue( + string dialogueId, + string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Handle client/mail/dialog/pin && Handle client/mail/dialog/unpin + /// + /// + /// + /// + public void SetDialoguePin( + string dialogueId, + bool shouldPin, + string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Handle client/mail/dialog/read + /// Set a dialog to be read (no number alert/attachment alert) + /// + /// Dialog ids to set as read + /// Player profile id + public void SetRead( + HashSet dialogueIds, + string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Handle client/mail/dialog/getAllAttachments + /// Get all uncollected items attached to mail in a particular dialog + /// + /// Dialog to get mail attachments from + /// Session id + /// GetAllAttachmentsResponse or null if dialogue doesnt exist + public GetAllAttachmentsResponse? GetAllAttachments( + string dialogueId, + string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// handle client/mail/msg/send + /// + /// + /// + /// + public string SendMessage( + string sessionId, + SendMessageRequest request) + { + throw new NotImplementedException(); + } + + /// + /// Get messages from a specific dialog that have items not expired + /// + /// Session id + /// Dialog to get mail attachments from + /// message list + private List GetActiveMessagesFromDialogue( + string sessionId, + string dialogueId) + { + throw new NotImplementedException(); + } + + /// + /// Return list of messages with uncollected items (includes expired) + /// + /// Messages to parse + /// messages with items to collect + private List GetMessageWithAttachments(List messages) + { + throw new NotImplementedException(); + } + + /// + /// Delete expired items from all messages in player profile. triggers when updating traders. + /// + /// Session id + private void RemoveExpiredItemsFromMessages(string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Removes expired items from a message in player profile + /// + /// Session id + /// Dialog id + private void RemoveExpiredItemsFromMessage( + string sessionId, + string dialogueId) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Controllers/GameController.cs b/Core/Controllers/GameController.cs new file mode 100644 index 00000000..845bfb8c --- /dev/null +++ b/Core/Controllers/GameController.cs @@ -0,0 +1,182 @@ +using Core.Models.Eft.Common; +using Core.Models.Eft.Profile; + +namespace Core.Controllers; + +public class GameController +{ + /// + /// Handle client/game/start + /// + /// + /// + /// + /// + public void GameStart( + string url, + EmptyRequestData info, + string sessionId, + long startTimeStampMs) + { + throw new NotImplementedException(); + } + + /// + /// Handles migrating profiles from older SPT versions + /// + /// + /// Formerly migrate39xProfile in node server + private void MigrateProfile(SptProfile fullProfile) + { + throw new NotImplementedException(); + } + + /// + /// Handle client/game/config + /// + /// + /// + public GameConfigResponse GetGameConfig(string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Handle client/game/mode + /// + /// + /// + /// + public object GetGameMode( // TODO: Returns `any` in node server + string sessionId, + GameModeRequestData requestData) + { + throw new NotImplementedException(); + } + + /// + /// Handle client/server/list + /// + /// + /// + public List GetServer(string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Handle client/match/group/current + /// + /// + /// + public CurrentGroupResponse GetCurrentGroup(string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Handle client/checkVersion + /// + /// + /// + public CheckVersionResponse GetValidGameVersion(string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Handle client/game/keepalive + /// + /// + /// + public GameKeepAliveResponse GetKeepAlive(string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Handle singleplayer/settings/getRaidTime + /// + /// + /// + /// + public GetRaidTimeResponse GetRaidTime( + string sessionId, + GetRaidTimeRequest request) + { + throw new NotImplementedException(); + } + + /// + /// + /// + /// + /// + public SurveyResponseData GetSurvey(string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Players set botReload to a high value and don't expect the crazy fast reload speeds, give them a warn about it + /// + /// Player profile + private void WarnOnActiveBotReloadSkill(PmcData pmcProfile) + { + throw new NotImplementedException(); + } + + /// + /// When player logs in, iterate over all active effects and reduce timer + /// + /// Profile to adjust values for + private void UpdateProfileHealthValues(PmcData pmcProfile) + { + throw new NotImplementedException(); + } + + /// + /// Send starting gifts to profile after x days + /// + /// Profile to add gifts to + private void SendPraporGiftsToNewProfiles(PmcData pmcProfile) + { + throw new NotImplementedException(); + } + + /// + /// Get a list of installed mods and save their details to the profile being used + /// + /// Profile to add mod details to + private void SaveActiveModsToProfile(SptProfile fullProfile) + { + throw new NotImplementedException(); + } + + /// + /// Add the logged in players name to PMC name pool + /// + /// Profile of player to get name from + private void AddPlayerToPmcNames(PmcData pmcProfile) + { + throw new NotImplementedException(); + } + + /// + /// Check for a dialog with the key 'undefined', and remove it + /// + /// Profile to check for dialog in + private void CheckForAndRemoveUndefinedDialogues(SptProfile fullProfile) + { + throw new NotImplementedException(); + } + + /// + /// + /// + /// + private void LogProfileDetails(SptProfile fullProfile) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Controllers/HandBookController.cs b/Core/Controllers/HandBookController.cs new file mode 100644 index 00000000..e12cea12 --- /dev/null +++ b/Core/Controllers/HandBookController.cs @@ -0,0 +1,10 @@ +namespace Core.Controllers; + +// TODO: This seems unused, is it even needed? +public class HandBookController +{ + public void Load() + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Controllers/HealthController.cs b/Core/Controllers/HealthController.cs new file mode 100644 index 00000000..a4cf719c --- /dev/null +++ b/Core/Controllers/HealthController.cs @@ -0,0 +1,68 @@ +using Core.Models.Eft.Common; +using Core.Models.Eft.Health; + +namespace Core.Controllers; + +public class HealthController +{ + /// + /// When healing in menu + /// + /// Player profile + /// Healing request + /// Player id + /// ItemEventRouterResponse + public ItemEventRouterResponse OffRaidHeal( + PmcData pmcData, + OffraidHealRequestData request, + string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Handle Eat event + /// Consume food/water outside of a raid + /// + /// Player profile + /// Eat request + /// Session id + /// ItemEventRouterResponse + public ItemEventRouterResponse OffRaidEat( + PmcData pmcData, + OffraidEatRequestData request, + string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Handle RestoreHealth event + /// Occurs on post-raid healing page + /// + /// player profile + /// Request data from client + /// Session id + /// + public ItemEventRouterResponse HealthTreatment( + PmcData pmcData, + HealthTreatmentRequestData request, + string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// applies skills from hideout workout. + /// + /// Player profile + /// Request data + /// session id + public void ApplyWorkoutChanges( + PmcData pmcData, + WorkoutData info, + string sessionId) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Controllers/HideoutController.cs b/Core/Controllers/HideoutController.cs new file mode 100644 index 00000000..e672d1fd --- /dev/null +++ b/Core/Controllers/HideoutController.cs @@ -0,0 +1,6 @@ +namespace Core.Controllers; + +public class HideoutController +{ + // TODO +} \ No newline at end of file diff --git a/Core/Controllers/InRaidController.cs b/Core/Controllers/InRaidController.cs new file mode 100644 index 00000000..1644f02f --- /dev/null +++ b/Core/Controllers/InRaidController.cs @@ -0,0 +1,64 @@ +namespace Core.Controllers; + +public class InRaidController +{ + /// + /// Save locationId to active profiles in-raid object AND app context + /// + /// Session id + /// Register player request + public void AddPlayer( + string sessionId, + RegisterPlayerRequestData info) + { + throw new NotImplementedException(); + } + + /// + /// Handle raid/profile/scavsave + /// Save profile state to disk + /// Handles pmc/pscav + /// + /// + /// + public void SavePostRaidProfileForScav( + ScavSaveRequestData offRaidProfileData, + string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Get the inraid config from configs/inraid.json + /// + public void GetInRaidConfig() + { + throw new NotImplementedException(); + } + + /// + /// + /// + /// + /// + /// + public float GetTraitorScavHostileChance( + string url, + string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// + /// + /// + /// + /// + public List GetBossConvertSettings( + string url, + string sessionId) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Controllers/InsuranceController.cs b/Core/Controllers/InsuranceController.cs new file mode 100644 index 00000000..58bdb714 --- /dev/null +++ b/Core/Controllers/InsuranceController.cs @@ -0,0 +1,6 @@ +namespace Core.Controllers; + +public class InsuranceController +{ + // TODO +} \ No newline at end of file diff --git a/Core/Controllers/InventoryController.cs b/Core/Controllers/InventoryController.cs new file mode 100644 index 00000000..3cad5447 --- /dev/null +++ b/Core/Controllers/InventoryController.cs @@ -0,0 +1,6 @@ +namespace Core.Controllers; + +public class InventoryController +{ + // TODO +} \ No newline at end of file diff --git a/Core/Controllers/LauncherController.cs b/Core/Controllers/LauncherController.cs new file mode 100644 index 00000000..cb2d4ac2 --- /dev/null +++ b/Core/Controllers/LauncherController.cs @@ -0,0 +1,146 @@ +using Core.Models.Eft.Profile; +using Core.Models.Spt.Mod; + +namespace Core.Controllers; + +public class LauncherController +{ + /// + /// + /// + /// + public ConnectResponse Connect() + { + throw new NotImplementedException(); + } + + /// + /// Get descriptive text for each of the profile edtions a player can choose, keyed by profile.json profile type + /// e.g. "Edge Of Darkness" + /// + /// Dictionary of profile types with related descriptive text + private Dictionary GetProfileDescriptions() + { + throw new NotImplementedException(); + } + + /// + /// + /// + /// + /// + public Info Find(string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// + /// + /// + /// + public string Login(LoginRequestData info) + { + throw new NotImplementedException(); + } + + /// + /// + /// + /// + /// + public string Register(RegisterData info) + { + throw new NotImplementedException(); + } + + /// + /// + /// + /// + /// + private string CreateAccount(RegisterData info) + { + throw new NotImplementedException(); + } + + /// + /// + /// + /// + private string GenerateProfileId() + { + throw new NotImplementedException(); + } + + /// + /// + /// + /// + /// + /// + private string FormatId( + long timeStamp, + int counter) + { + throw new NotImplementedException(); + } + + /// + /// + /// + /// + /// + public string ChangeUsername(ChangeRequestData info) + { + throw new NotImplementedException(); + } + + /// + /// + /// + /// + /// + public string ChangePassword(ChangeRequestData info) + { + throw new NotImplementedException(); + } + + /// + /// Handle launcher requesting profile be wiped + /// + /// RegisterData + /// Session id + public string Wipe(RegisterData info) + { + throw new NotImplementedException(); + } + + /// + /// + /// + /// + public string GetCompatibleTarkovVersion() + { + throw new NotImplementedException(); + } + + /// + /// Get the mods the server has currently loaded + /// + /// Dictionary of mod name and mod details + public Dictionary GetLoadedServerMods() // TODO: We no longer use a package.json + { + throw new NotImplementedException(); + } + + /// + /// Get the mods a profile has ever loaded into game with + /// + /// Player id + /// List of mod details + public List GetServerModsProfileUsed(string sessionId) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Controllers/LocationController.cs b/Core/Controllers/LocationController.cs new file mode 100644 index 00000000..4f17a525 --- /dev/null +++ b/Core/Controllers/LocationController.cs @@ -0,0 +1,25 @@ +namespace Core.Controllers; + +public class LocationController +{ + /// + /// Handle client/locations + /// Get all maps base location properties without loot data + /// + /// Players Id + /// LocationsGenerateAllResponse + public LocationsGenerateAllResponse GenerateAll(string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Handle client/airdrop/loot + /// + /// + /// + public GetAirDropLootResponse GetAirDropLoot(GetAirDropLootRequest request) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Controllers/MatchController.cs b/Core/Controllers/MatchController.cs new file mode 100644 index 00000000..13c5854d --- /dev/null +++ b/Core/Controllers/MatchController.cs @@ -0,0 +1,94 @@ +namespace Core.Controllers; + +public class MatchController +{ + /// + /// + /// + /// + public bool GetEnabled() + { + throw new NotImplementedException(); + } + + /// + /// Handle client/match/group/delete + /// + /// + public void DeleteGroup(object info) // TODO: info is `any` in the node server + { + throw new NotImplementedException(); + } + + /// + /// Handle match/group/start_game + /// + /// + /// + /// + public ProfileStatusResponse JoinMatch( + MatchGroupStartGameRequest info, + string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Handle client/match/group/status + /// + /// + /// + public MatchGroupStatusReponse GetGroupStatus( + MatchGroupStatusRequest info) + { + throw new NotImplementedException(); + } + + /// + /// Handle /client/raid/configuration + /// + /// + /// + public void ConfigureOfflineRaid( + GetRaidConfigurationRequestData request, + string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Convert a difficulty value from pre-raid screen to a bot difficulty + /// + /// dropdown difficulty value + /// bot difficulty + private string ConvertDifficultyDropdownIntoBotDifficulty( + string botDifficulty) + { + throw new NotImplementedException(); + } + + /// + /// Handle client/match/local/start + /// + /// + /// + /// + public StartLocalRaidResponseData StartLocalRaid( + string sessionId, + StartLocalRaidRequestData request) + { + throw new NotImplementedException(); + } + + /// + /// Handle client/match/local/end + /// + /// + /// + public void EndLocalRaid( + string sessionId, + EndLocalRaidRequestData request) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Controllers/NoteController.cs b/Core/Controllers/NoteController.cs new file mode 100644 index 00000000..075a889b --- /dev/null +++ b/Core/Controllers/NoteController.cs @@ -0,0 +1,51 @@ +using Core.Models.Eft.Common; + +namespace Core.Controllers; + +public class NoteController +{ + /// + /// + /// + /// + /// + /// + /// + public ItemEventRouterResponse AddNote( + PmcData pmcData, + NoteActionBody body, + string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// + /// + /// + /// + /// + /// + public ItemEventRouterResponse EditNote( + PmcData pmcData, + NoteActionBody body, + string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// + /// + /// + /// + /// + /// + public ItemEventRouterResponse DeleteNote( + PmcData pmcData, + NoteActionBody body, + string sessionId) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Controllers/NotifierController.cs b/Core/Controllers/NotifierController.cs new file mode 100644 index 00000000..4f0bc33f --- /dev/null +++ b/Core/Controllers/NotifierController.cs @@ -0,0 +1,37 @@ +namespace Core.Controllers; + +public class NotifierController +{ + /// + /// Resolve an array of session notifications. + /// + /// If no notifications are currently queued then intermittently check for new notifications until either + /// one or more appear or when a timeout expires. + /// If no notifications are available after the timeout, use a default message. + /// + /// + public async Task NotifyAsync(string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// + /// + /// + /// + public string GetServer(string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Handle client/notifier/channel/create + /// + /// + /// + public NotifierChannel GetChannel(string sessionId) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Controllers/PresetController.cs b/Core/Controllers/PresetController.cs new file mode 100644 index 00000000..f33380da --- /dev/null +++ b/Core/Controllers/PresetController.cs @@ -0,0 +1,12 @@ +namespace Core.Controllers; + +public class PresetController +{ + /// + /// + /// + public void Initialize() + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Controllers/PrestigeController.cs b/Core/Controllers/PrestigeController.cs new file mode 100644 index 00000000..2e8d95f3 --- /dev/null +++ b/Core/Controllers/PrestigeController.cs @@ -0,0 +1,32 @@ +using Core.Models.Eft.Common.Tables; + +namespace Core.Controllers; + +public class PrestigeController +{ + /// + /// Handle /client/prestige/list + /// + /// + /// + /// + public Prestige GetPrestige( + string sessionId, + EmptyRequestData info) + { + throw new NotImplementedException(); + } + + /// + /// Handle /client/prestige/obtain + /// + /// + /// + /// + public object ObtainPrestige( // TODO: returns `any` in the node server, not implemented either + string sessionId, + EmptyRequestData info) + { + throw new NotImplementedException("Method not Implemented"); + } +} \ No newline at end of file diff --git a/Core/Controllers/ProfileController.cs b/Core/Controllers/ProfileController.cs new file mode 100644 index 00000000..f468531a --- /dev/null +++ b/Core/Controllers/ProfileController.cs @@ -0,0 +1,6 @@ +namespace Core.Controllers; + +public class ProfileController +{ + // TODO +} \ No newline at end of file diff --git a/Core/Controllers/QuestController.cs b/Core/Controllers/QuestController.cs new file mode 100644 index 00000000..50b51de4 --- /dev/null +++ b/Core/Controllers/QuestController.cs @@ -0,0 +1,6 @@ +namespace Core.Controllers; + +public class QuestController +{ + // TODO +} \ No newline at end of file diff --git a/Core/Controllers/RagfairController.cs b/Core/Controllers/RagfairController.cs new file mode 100644 index 00000000..7dc405fd --- /dev/null +++ b/Core/Controllers/RagfairController.cs @@ -0,0 +1,6 @@ +namespace Core.Controllers; + +public class RagfairController +{ + // TODO +} \ No newline at end of file diff --git a/Core/Controllers/RepairController.cs b/Core/Controllers/RepairController.cs new file mode 100644 index 00000000..584840bc --- /dev/null +++ b/Core/Controllers/RepairController.cs @@ -0,0 +1,39 @@ +using Core.Models.Eft.Common; + +namespace Core.Controllers; + +public class RepairController +{ + /// + /// Handle TraderRepair event + /// Repair with trader + /// + /// session id + /// endpoint request data + /// player profile + /// item event router action + public ItemEventRouterResponse TraderRepair( + string sessionId, + TraderRepairActionDataRequest body, + PmcData pmcData) + { + throw new NotImplementedException(); + } + + /// + /// Handle Repair event + /// Repair with repair kit + /// + /// session id + /// endpoint request data + /// player profile + /// + /// + public ItemEventRouterResponse RepairWithKit( + string sessionId, + RepairActionDataRequest body, + PmcData pmcData) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Controllers/RepeatableQuestController.cs b/Core/Controllers/RepeatableQuestController.cs new file mode 100644 index 00000000..0c3c57ab --- /dev/null +++ b/Core/Controllers/RepeatableQuestController.cs @@ -0,0 +1,6 @@ +namespace Core.Controllers; + +public class RepeatableQuestController +{ + // TODO +} \ No newline at end of file diff --git a/Core/Controllers/TradeController.cs b/Core/Controllers/TradeController.cs new file mode 100644 index 00000000..807767a0 --- /dev/null +++ b/Core/Controllers/TradeController.cs @@ -0,0 +1,147 @@ +using Core.Models.Eft.Common; +using Core.Models.Eft.Common.Tables; +using Core.Models.Eft.Ragfair; +using Core.Models.Enums; + +namespace Core.Controllers; + +public class TradeController +{ + /// + /// Handle TradingConfirm event + /// + /// + /// + /// + /// + public ItemEventRouterResponse ConfirmTrading( + PmcData pmcData, + ProcessBaseTradeRequestData request, + string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Handle RagFairBuyOffer event + /// + /// + /// + /// + /// + public ItemEventRouterResponse ConfirmRagfairTrading( + PmcData pmcData, + ProcessRagfairTradeRequestData request, + string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Buy an item off the flea sold by a trader + /// + /// Session id + /// Player profile + /// Offer being purchased + /// request data from client + /// Output to send back to client + private void BuyTraderItemFromRagfair( + string sessionId, + PmcData pmcData, + RagfairOffer fleaOffer, + OfferRequest offerRequest, + ItemEventRouterResponse output) + { + throw new NotImplementedException(); + } + + /// + /// Buy an item off the flea sold by a PMC + /// + /// Session id + /// Player profile + /// Offer being purchased + /// request data from client + /// Output to send back to client + private void BuyPmcItemFromRagfair( + string sessionId, + PmcData pmcData, + RagfairOffer fleaOffer, + OfferRequest offerRequest, + ItemEventRouterResponse output) + { + throw new NotImplementedException(); + } + + /// + /// Is the provided offerid and ownerid from a player made offer + /// + /// id of the offer + /// Owner id + /// true if offer was made by a player + private bool IsPlayerOffer( + string offerId, + string offerOwnerId) + { + throw new NotImplementedException(); + } + + /// + /// Does Player have necessary trader loyalty to purchase flea offer + /// + /// Flea offer being bought + /// Player profile + /// True if player can buy offer + private bool PlayerLacksTraderLoyaltyLevelToBuyOffer( + RagfairOffer fleaOffer, + PmcData pmcData) + { + throw new NotImplementedException(); + } + + /// + /// Handle SellAllFromSavage event + /// + /// + /// + /// + /// + public ItemEventRouterResponse SellScavItemsToFence( + PmcData pmcData, + SellScavItemsToFenceRequestData request, + string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Send the specified rouble total to player as mail + /// + /// Session id + /// amount of roubles to send + /// Trader to sell items to + private void MailMoneyToPlayer( + string sessionId, + int roublesToSend, + Traders trader) // TODO: This is a static class now and cannot be passed as a param. + { + throw new NotImplementedException(); + } + + /// + /// Looks up an items children and gets total handbook price for them + /// + /// parent item that has children we want to sum price of + /// All items (parent + children) + /// Prices of items from handbook + /// Trader being sold to, to perform buy category check against + /// Rouble price + private int GetPriceOfItemAndChildren( + string parentItemId, + List items, + Dictionary handbookPrices, + TraderBase traderDetails) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Controllers/TraderController.cs b/Core/Controllers/TraderController.cs new file mode 100644 index 00000000..00effd9b --- /dev/null +++ b/Core/Controllers/TraderController.cs @@ -0,0 +1,85 @@ +using Core.Models.Eft.Common.Tables; + +namespace Core.Controllers; + +public class TraderController +{ + /// + /// Runs when onLoad event is fired + /// Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService + /// Store timestamp of next assort refresh in nextResupply property of traders .base object + /// + public void Load() + { + throw new NotImplementedException(); + } + + /// + /// Runs when onUpdate is fired + /// If current time is > nextResupply(expire) time of trader, refresh traders assorts and + /// Fence is handled slightly differently + /// + /// + public bool Update() + { + throw new NotImplementedException(); + } + + /// + /// Handle client/trading/api/traderSettings + /// + /// session id + /// Return a list of all traders + public List GetAllTraders(string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Order traders by their traderId (Ttid) + /// + /// First trader to compare + /// Second trader to compare + /// 1,-1 or 0 + private int SortByTraderId( + TraderBase traderA, + TraderBase traderB) + { + throw new NotImplementedException(); + } + + /// + /// Handle client/trading/api/getTrader + /// + /// + /// + /// + public TraderBase GetTrader( + string sessionId, + string traderId) + { + throw new NotImplementedException(); + } + + /// + /// Handle client/trading/api/getTraderAssort + /// + /// + /// + /// + public TraderAssort GetAssort( + string sessionId, + string traderId) + { + throw new NotImplementedException(); + } + + /// + /// Handle client/items/prices/TRADERID + /// + /// + public GetItemPricesResponse GetItemPrices() + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Controllers/WeatherController.cs b/Core/Controllers/WeatherController.cs new file mode 100644 index 00000000..a5ab2d39 --- /dev/null +++ b/Core/Controllers/WeatherController.cs @@ -0,0 +1,23 @@ +namespace Core.Controllers; + +public class WeatherController +{ + /// + /// Handle client/weather + /// + /// + public WeatherData Generate() + { + throw new NotImplementedException(); + } + + /// + /// Handle client/localGame/weather + /// + /// + /// + public GetLocalWeatherResponseData GenerateLocal(string sessionId) + { + throw new NotImplementedException(); + } +} \ No newline at end of file diff --git a/Core/Controllers/WishlistController.cs b/Core/Controllers/WishlistController.cs new file mode 100644 index 00000000..64386856 --- /dev/null +++ b/Core/Controllers/WishlistController.cs @@ -0,0 +1,51 @@ +using Core.Models.Eft.Common; + +namespace Core.Controllers; + +public class WishlistController +{ + /// + /// Handle AddToWishList + /// + /// + /// + /// + /// + public ItemEventRouterResponse AddToWishList( + PmcData pmcData, + AddItemToWishlistRequest request, + string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Handle RemoveFromWishList event + /// + /// + /// + /// + /// + public ItemEventRouterResponse RemoveFromWishList( + PmcData pmcData, + RemoveFromWishlistRequest request, + string sessionId) + { + throw new NotImplementedException(); + } + + /// + /// Handle changeWishlistItemCategory event + /// + /// + /// + /// + /// + public ItemEventRouterResponse ChangeWishListItemCategory( + PmcData pmcData, + ChangeWishlistItemCategoryRequest request, + string sessionId) + { + throw new NotImplementedException(); + } +} \ No newline at end of file