more callbacks

This commit is contained in:
CWX
2025-01-07 12:51:59 +00:00
parent 52d510cfcc
commit 0b4a231b71
38 changed files with 388 additions and 101 deletions
+5
View File
@@ -7,6 +7,11 @@ namespace Core.Callbacks;
public class BotCallbacks
{
public BotCallbacks()
{
}
public string GetBotLimit(string url, EmptyRequestData info, string sessionID)
{
throw new NotImplementedException();
+9 -3
View File
@@ -1,4 +1,5 @@
using Core.Models.Eft.Common;
using Core.DI;
using Core.Models.Eft.Common;
using Core.Models.Eft.Common.Request;
using Core.Models.Eft.Dialog;
using Core.Models.Eft.HttpResponse;
@@ -6,8 +7,13 @@ using Core.Models.Eft.Profile;
namespace Core.Callbacks;
public class DialogCallbacks
public class DialogCallbacks : OnUpdate
{
public DialogCallbacks()
{
}
public GetBodyResponseData<GetFriendListDataResponse> GetFriendList(string url, EmptyRequestData info, string sessionID)
{
throw new NotImplementedException();
@@ -143,7 +149,7 @@ public class DialogCallbacks
throw new NotImplementedException();
}
public async Task<bool> OnUpdate(int timeSinceLastRun)
public async Task<bool> OnUpdate(long timeSinceLastRun)
{
throw new NotImplementedException();
}
+3 -2
View File
@@ -1,11 +1,12 @@
using Core.Models.Eft.Common;
using Core.DI;
using Core.Models.Eft.Common;
using Core.Models.Eft.Common.Request;
using Core.Models.Eft.Game;
using Core.Models.Eft.HttpResponse;
namespace Core.Callbacks;
public class GameCallbacks
public class GameCallbacks : OnLoad
{
public GameCallbacks()
{
+15 -3
View File
@@ -1,8 +1,20 @@
namespace Core.Callbacks;
using Core.DI;
public class HandbookCallbacks
namespace Core.Callbacks;
public class HandbookCallbacks : OnLoad
{
public void Load()
public HandbookCallbacks()
{
}
public Task OnLoad()
{
throw new NotImplementedException();
}
public string GetRoute()
{
throw new NotImplementedException();
}
+4 -3
View File
@@ -1,11 +1,12 @@
using Core.Models.Eft.Common;
using Core.DI;
using Core.Models.Eft.Common;
using Core.Models.Eft.Hideout;
using Core.Models.Eft.ItemEvent;
using Core.Models.Spt.Config;
namespace Core.Callbacks;
public class HideoutCallbacks
public class HideoutCallbacks : OnUpdate
{
private HideoutConfig _hideoutConfig;
@@ -94,7 +95,7 @@ public class HideoutCallbacks
throw new NotImplementedException();
}
public async Task<bool> OnUpdate(int timeSinceLastRun)
public async Task<bool> OnUpdate(long timeSinceLastRun)
{
throw new NotImplementedException();
}
+9 -2
View File
@@ -1,7 +1,14 @@
namespace Core.Callbacks;
using Core.DI;
public class HttpCallbacks
namespace Core.Callbacks;
public class HttpCallbacks : OnLoad
{
public HttpCallbacks()
{
}
public async Task OnLoad()
{
throw new NotImplementedException();
+4 -3
View File
@@ -1,4 +1,5 @@
using Core.Models.Eft.Common;
using Core.DI;
using Core.Models.Eft.Common;
using Core.Models.Eft.HttpResponse;
using Core.Models.Eft.Insurance;
using Core.Models.Eft.ItemEvent;
@@ -6,7 +7,7 @@ using Core.Models.Spt.Config;
namespace Core.Callbacks;
public class InsuranceCallbacks
public class InsuranceCallbacks : OnUpdate
{
private InsuranceConfig _insuranceConfig;
@@ -25,7 +26,7 @@ public class InsuranceCallbacks
throw new NotImplementedException();
}
public async Task<bool> OnUpdate(int secondsSinceLastRun)
public Task<bool> OnUpdate(long timeSinceLastRun)
{
throw new NotImplementedException();
}
+5
View File
@@ -7,6 +7,11 @@ namespace Core.Callbacks;
public class InventoryCallbacks
{
public InventoryCallbacks()
{
}
public ItemEventRouterResponse MoveItem(PmcData pmcData, InventoryMoveRequestData info, string sessionID)
{
throw new NotImplementedException();
+5
View File
@@ -5,6 +5,11 @@ namespace Core.Callbacks;
public class ItemEventCallbacks
{
public ItemEventCallbacks()
{
}
public async Task<GetBodyResponseData<ItemEventRouterResponse>> HandleEvents(string url, ItemEventRouterRequest info, string sessionID)
{
throw new NotImplementedException();
+5
View File
@@ -5,6 +5,11 @@ namespace Core.Callbacks;
public class LauncherCallbacks
{
public LauncherCallbacks()
{
}
public string Connect()
{
throw new NotImplementedException();
+5
View File
@@ -7,6 +7,11 @@ namespace Core.Callbacks;
public class LocationCallbacks
{
public LocationCallbacks()
{
}
public GetBodyResponseData<LocationsGenerateAllResponse> GetLocationData(string url, EmptyRequestData info, string sessionID)
{
throw new NotImplementedException();
+5
View File
@@ -7,6 +7,11 @@ namespace Core.Callbacks;
public class MatchCallbacks
{
public MatchCallbacks()
{
}
public NullResponseData UpdatePing(string url, EmptyRequestData info, string sessionID)
{
throw new NotImplementedException();
+11 -14
View File
@@ -1,23 +1,20 @@
namespace Core.Callbacks;
using Core.DI;
public class ModCallbacks
namespace Core.Callbacks;
public class ModCallbacks : OnLoad
{
public void Load()
public ModCallbacks()
{
}
public async Task OnLoad()
{
throw new NotImplementedException();
}
public void SendBundle(string sessionID, object req, object resp, object body)
{
throw new NotImplementedException();
}
public string GetBundles(string url, object info, string sessionID)
{
throw new NotImplementedException();
}
public string GetBundle(string url, object info, string sessionID)
public string GetRoute()
{
throw new NotImplementedException();
}
+10 -1
View File
@@ -1,7 +1,16 @@
namespace Core.Callbacks;
using Core.Models.Eft.Common;
using Core.Models.Eft.ItemEvent;
using Core.Models.Eft.Notes;
namespace Core.Callbacks;
public class NoteCallbacks
{
public NoteCallbacks()
{
}
public ItemEventRouterResponse AddNote(PmcData pmcData, NoteActionData info, string sessionID)
{
throw new NotImplementedException();
+15 -5
View File
@@ -1,19 +1,29 @@
namespace Core.Callbacks;
using Core.Models.Eft.Common;
using Core.Models.Eft.Common.Request;
using Core.Models.Eft.HttpResponse;
using Core.Models.Eft.Notifier;
namespace Core.Callbacks;
public class NotifierCallbacks
{
public NotifierCallbacks()
{
}
/**
* If we don't have anything to send, it's ok to not send anything back
* because notification requests can be long-polling. In fact, we SHOULD wait
* until we actually have something to send because otherwise we'd spam the client
* and the client would abort the connection due to spam.
*/
public void SendNotification(string sessionID, object req, object resp, object data)
public void SendNotification(string sessionID, object req, object resp, object data) // TODO: no types were given
{
throw new NotImplementedException();
}
public GetBodyResponseData<List<object>> GetNotifier(string url, object info, string sessionID)
public GetBodyResponseData<List<object>> GetNotifier(string url, object info, string sessionID) // TODO: no types were given
{
throw new NotImplementedException();
}
@@ -23,12 +33,12 @@ public class NotifierCallbacks
throw new NotImplementedException();
}
public GetBodyResponseData<object> SelectProfile(string url, UIDRequestData info, string sessionID)
public GetBodyResponseData<SelectProfileResponse> SelectProfile(string url, UIDRequestData info, string sessionID)
{
throw new NotImplementedException();
}
public string Notify(string url, object info, string sessionID)
public string Notify(string url, object info, string sessionID) // TODO: no types were given
{
throw new NotImplementedException();
}
-29
View File
@@ -1,29 +0,0 @@
namespace Core.Callbacks;
public class PresetBuildCallbacks
{
public GetBodyResponseData<List<WeaponBuild>> GetHandbookUserList(string url, object info, string sessionID)
{
throw new NotImplementedException();
}
public ItemEventRouterResponse SaveWeaponBuild(PmcData pmcData, PresetBuildActionRequestData info, string sessionID)
{
throw new NotImplementedException();
}
public ItemEventRouterResponse RemoveWeaponBuild(PmcData pmcData, PresetBuildActionRequestData info, string sessionID)
{
throw new NotImplementedException();
}
public ItemEventRouterResponse SaveEquipmentBuild(PmcData pmcData, PresetBuildActionRequestData info, string sessionID)
{
throw new NotImplementedException();
}
public ItemEventRouterResponse RemoveEquipmentBuild(PmcData pmcData, PresetBuildActionRequestData info, string sessionID)
{
throw new NotImplementedException();
}
}
+15 -3
View File
@@ -1,8 +1,20 @@
namespace Core.Callbacks;
using Core.DI;
public class PresetCallbacks
namespace Core.Callbacks;
public class PresetCallbacks : OnLoad
{
public void Load()
public PresetCallbacks()
{
}
public async Task OnLoad()
{
throw new NotImplementedException();
}
public string GetRoute()
{
throw new NotImplementedException();
}
+23
View File
@@ -0,0 +1,23 @@
using Core.Models.Eft.Common;
using Core.Models.Eft.Common.Tables;
using Core.Models.Eft.HttpResponse;
namespace Core.Callbacks;
public class PrestigeCallbacks
{
public PrestigeCallbacks()
{
}
public GetBodyResponseData<Prestige> GetPrestige(string url, EmptyRequestData info, string sessionID)
{
throw new NotImplementedException();
}
public GetBodyResponseData<object> ObtainPrestige(string url, EmptyRequestData info, string sessionID)
{
throw new NotImplementedException();
}
}
+30 -10
View File
@@ -1,17 +1,22 @@
namespace Core.Callbacks;
using Core.Models.Eft.Common;
using Core.Models.Eft.HttpResponse;
using Core.Models.Eft.Launcher;
using Core.Models.Eft.Profile;
namespace Core.Callbacks;
public class ProfileCallbacks
{
public object OnLoad(string sessionID)
public ProfileCallbacks()
{
}
public GetBodyResponseData<CreateProfileResponse> CreateProfile(string url, ProfileCreateRequestData info, string sessionID)
{
throw new NotImplementedException();
}
public GetBodyResponseData<object> CreateProfile(string url, ProfileCreateRequestData info, string sessionID)
{
throw new NotImplementedException();
}
public GetBodyResponseData<object> GetProfileData(string url, EmptyRequestData info, string sessionID)
{
throw new NotImplementedException();
@@ -41,8 +46,13 @@ public class ProfileCallbacks
{
throw new NotImplementedException();
}
public GetBodyResponseData<object> GetProfileStatus(string url, EmptyRequestData info, string sessionID)
public GetBodyResponseData<GetOtherProfileResponse> GetOtherProfile(string url, GetOtherProfileRequest info, string sessionID)
{
throw new NotImplementedException();
}
public GetBodyResponseData<bool> GetProfileSettings(string url, GetProfileSettingsRequest info, string sessionID)
{
throw new NotImplementedException();
}
@@ -51,4 +61,14 @@ public class ProfileCallbacks
{
throw new NotImplementedException();
}
public string GetMiniProfile(string url, GetMiniProfileRequestData info, string sessionID)
{
throw new NotImplementedException();
}
public string GetAllMiniProfiles(string url, EmptyRequestData info, string sessionID)
{
throw new NotImplementedException();
}
}
+10 -1
View File
@@ -1,9 +1,18 @@
using Core.Models.Eft.Common.Tables;
using Core.Models.Eft.Common;
using Core.Models.Eft.Common.Tables;
using Core.Models.Eft.HttpResponse;
using Core.Models.Eft.ItemEvent;
using Core.Models.Eft.Quests;
namespace Core.Callbacks;
public class QuestCallbacks
{
public QuestCallbacks()
{
}
public ItemEventRouterResponse ChangeRepeatableQuest(PmcData pmcData, RepeatableQuestChangeRequest info, string sessionID)
{
throw new NotImplementedException();
+42 -8
View File
@@ -1,13 +1,37 @@
namespace Core.Callbacks;
using Core.DI;
using Core.Models.Eft.Common;
using Core.Models.Eft.HttpResponse;
using Core.Models.Eft.ItemEvent;
using Core.Models.Eft.Ragfair;
using Core.Models.Spt.Config;
public class RagfairCallbacks
namespace Core.Callbacks;
public class RagfairCallbacks : OnLoad, OnUpdate
{
public void Load()
private RagfairConfig _ragfairConfig;
public RagfairCallbacks()
{
}
public async Task OnLoad()
{
throw new NotImplementedException();
}
public GetBodyResponseData<object> Search(string url, SearchRequestData info, string sessionID)
public string GetRoute()
{
throw new NotImplementedException();
}
public async Task<bool> OnUpdate(long timeSinceLastRun)
{
throw new NotImplementedException();
}
public GetBodyResponseData<GetOffersResult> Search(string url, SearchRequestData info, string sessionID)
{
throw new NotImplementedException();
}
@@ -17,12 +41,12 @@ public class RagfairCallbacks
throw new NotImplementedException();
}
public GetBodyResponseData<object> GetItemPrices(string url, EmptyRequestData info, string sessionID)
public ItemEventRouterResponse AddOffer(string url, AddOfferRequestData info, string sessionID)
{
throw new NotImplementedException();
}
public ItemEventRouterResponse AddOffer(string url, AddOfferRequestData info, string sessionID)
public ItemEventRouterResponse RemoveOffer(string url, RemoveOfferRequestData info, string sessionID)
{
throw new NotImplementedException();
}
@@ -32,12 +56,22 @@ public class RagfairCallbacks
throw new NotImplementedException();
}
public bool Update(int timeSinceLastRun)
public GetBodyResponseData<Dictionary<string, int>> GetFleaPrices(string url, EmptyRequestData info, string sessionID)
{
throw new NotImplementedException();
}
public bool UpdatePlayer(int timeSinceLastRun)
public NullResponseData SendReport(string url, SendRagfairReportRequestData info, string sessionID)
{
throw new NotImplementedException();
}
public NullResponseData StorePlayerOfferTaxAmount(string url, StorePlayerOfferTaxAmountRequestData info, string sessionID)
{
throw new NotImplementedException();
}
public GetBodyResponseData<RagfairOffer> GetFleaOfferById(string url, GetRagfairOfferByIdRequest info, string sessionID)
{
throw new NotImplementedException();
}
+10 -1
View File
@@ -1,7 +1,16 @@
namespace Core.Callbacks;
using Core.Models.Eft.Common;
using Core.Models.Eft.ItemEvent;
using Core.Models.Eft.Repair;
namespace Core.Callbacks;
public class RepairCallbacks
{
public RepairCallbacks()
{
}
public ItemEventRouterResponse TraderRepair(PmcData pmcData, TraderRepairActionDataRequest info, string sessionID)
{
throw new NotImplementedException();
+19 -4
View File
@@ -1,13 +1,28 @@
namespace Core.Callbacks;
using Core.DI;
using Core.Models.Spt.Config;
public class SaveCallbacks
namespace Core.Callbacks;
public class SaveCallbacks : OnLoad, OnUpdate
{
public void Load()
private CoreConfig _coreConfig;
public SaveCallbacks()
{
}
public async Task OnLoad()
{
throw new NotImplementedException();
}
public bool Update(int SecondsSinceLastRun)
public async Task<bool> OnUpdate(long SecondsSinceLastRun)
{
throw new NotImplementedException();
}
public string GetRoute()
{
throw new NotImplementedException();
}
+16 -2
View File
@@ -1,8 +1,17 @@
namespace Core.Callbacks;
using Core.Models.Eft.Common;
using Core.Models.Eft.ItemEvent;
using Core.Models.Eft.Trade;
namespace Core.Callbacks;
public class TradeCallbacks
{
public ItemEventRouterReponse ProcessTrade(PmcData pmcData, ProcessBaseTradeRequestData info, string sessionID)
public TradeCallbacks()
{
}
public ItemEventRouterResponse ProcessTrade(PmcData pmcData, ProcessBaseTradeRequestData info, string sessionID)
{
throw new NotImplementedException();
}
@@ -11,4 +20,9 @@ public class TradeCallbacks
{
throw new NotImplementedException();
}
public ItemEventRouterResponse SellAllFromSavage(PmcData pmcData, SellScavItemsToFenceRequestData info, string sessionID)
{
throw new NotImplementedException();
}
}
+25 -4
View File
@@ -1,12 +1,33 @@
namespace Core.Callbacks;
using Core.DI;
using Core.Models.Eft.Common;
using Core.Models.Eft.Common.Tables;
using Core.Models.Eft.HttpResponse;
using Core.Models.Spt.Config;
public class TraderCallbacks
namespace Core.Callbacks;
public class TraderCallbacks : OnLoad, OnUpdate
{
public void Load()
public TraderCallbacks()
{
}
public async Task OnLoad()
{
throw new NotImplementedException();
}
public async Task<bool> OnUpdate(long _)
{
throw new NotImplementedException();
}
public string GetRoute()
{
throw new NotImplementedException();
}
public GetBodyResponseData<List<TraderBase>> GetTraderSettings(string url, EmptyRequestData info, string sessionID)
{
throw new NotImplementedException();
@@ -22,7 +43,7 @@ public class TraderCallbacks
throw new NotImplementedException();
}
public bool Update()
public GetBodyResponseData<ModdedTraders> GetModdedTraderData(string url, EmptyRequestData info, string sessionID)
{
throw new NotImplementedException();
}
+17 -2
View File
@@ -1,8 +1,23 @@
namespace Core.Callbacks;
using Core.Models.Eft.Common;
using Core.Models.Eft.HttpResponse;
using Core.Models.Eft.Weather;
using Core.Models.Spt.Weather;
namespace Core.Callbacks;
public class WeatherCallbacks
{
public GetBodyResponseData<object> GetWeather(string url, EmptyRequestData info, string sessionID)
public WeatherCallbacks()
{
}
public GetBodyResponseData<WeatherData> GetWeather(string url, EmptyRequestData info, string sessionID)
{
throw new NotImplementedException();
}
public GetBodyResponseData<GetLocalWeatherResponseData> GetLocalWeather(string url, EmptyRequestData info, string sessionID)
{
throw new NotImplementedException();
}
+28
View File
@@ -0,0 +1,28 @@
using Core.Models.Eft.Common;
using Core.Models.Eft.ItemEvent;
using Core.Models.Eft.Wishlist;
namespace Core.Callbacks;
public class WishlistCallbacks
{
public WishlistCallbacks()
{
}
public ItemEventRouterResponse AddToWishlist(PmcData pmcData, AddToWishlistRequest info, string sessionID)
{
throw new NotImplementedException();
}
public ItemEventRouterResponse RemoveFromWishlist(PmcData pmcData, RemoveFromWishlistRequest info, string sessionID)
{
throw new NotImplementedException();
}
public ItemEventRouterResponse ChangeWishlistItemCategory(PmcData pmcData, ChangeWishlistItemCategoryRequest info, string sessionID)
{
throw new NotImplementedException();
}
}
@@ -0,0 +1,12 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Launcher;
public class GetMiniProfileRequestData
{
[JsonPropertyName("username")]
public string Username { get; set; }
[JsonPropertyName("password")]
public string Password { get; set; }
}
@@ -1,4 +1,5 @@
using System.Text.Json.Serialization;
using Core.Models.Enums;
namespace Core.Models.Eft.Ragfair;
@@ -1,4 +1,5 @@
using System.Text.Json.Serialization;
using Core.Models.Eft.Match;
using Core.Models.Eft.Profile;
namespace Core.Models.Eft.Ws;
+1
View File
@@ -1,4 +1,5 @@
using System.Text.Json.Serialization;
using Core.Models.Eft.Profile;
namespace Core.Models.Eft.Ws;
@@ -1,5 +1,7 @@
using Core.Models.Eft.Match;
namespace Core.Models.Eft.Ws;
public class WsGroupMatchInviteAccept : WsNotificationEvent, IGroupCharacter
public class WsGroupMatchInviteAccept : WsNotificationEvent, GroupCharacter // TODOL trying to inherit multiTypes
{
}
@@ -1,4 +1,5 @@
using System.Text.Json.Serialization;
using Core.Models.Eft.Match;
namespace Core.Models.Eft.Ws;
@@ -1,4 +1,5 @@
using System.Text.Json.Serialization;
using Core.Models.Eft.Match;
namespace Core.Models.Eft.Ws;
@@ -1,4 +1,5 @@
using System.Text.Json.Serialization;
using Core.Models.Eft.Match;
namespace Core.Models.Eft.Ws;
+1
View File
@@ -1,4 +1,5 @@
using System.Text.Json.Serialization;
using Core.Models.Enums;
namespace Core.Models.Eft.Ws;
+10
View File
@@ -0,0 +1,10 @@
namespace Core.Models.Enums;
public enum ProfileStatus
{
FREE,
MATCH_WAIT,
BUSY,
LEAVING,
TRANSFER,
}
+11
View File
@@ -0,0 +1,11 @@
namespace Core.Models.Enums;
public enum RagfairSort
{
ID = 0,
BARTER = 2,
RATING = 3,
OFFER_TITLE = 4,
PRICE = 5,
EXPIRY = 6,
}