more types

This commit is contained in:
CWX
2025-01-06 22:52:49 +00:00
parent bdcac81a79
commit 211e68f3fc
24 changed files with 659 additions and 16 deletions
+23 -3
View File
@@ -1,5 +1,7 @@
using Core.Models.Eft.Common;
using Core.Models.Eft.Builds;
using Core.Models.Eft.Common;
using Core.Models.Eft.HttpResponse;
using Core.Models.Eft.PresetBuild;
using Core.Models.Eft.Profile;
namespace Core.Callbacks;
@@ -15,6 +17,24 @@ public class BuildsCallbacks
{
throw new NotImplementedException();
}
public NullResponseData CreateMagazineTemplate(string url, SetMagazineRequest info, string sessionID)
{
throw new NotImplementedException();
}
public NullResponseData SetWeapon(string url, PresetBuildActionRequestData info, string sessionID)
{
throw new NotImplementedException();
}
public NullResponseData SetEquipment(string url, PresetBuildActionRequestData info, string sessionID)
{
throw new NotImplementedException();
}
public NullResponseData DeleteBuild(string url, RemoveBuildRequestData info, string sessionID)
{
throw new NotImplementedException();
}
}
+10 -1
View File
@@ -1,7 +1,16 @@
namespace Core.Callbacks;
using Core.Models.Spt.Config;
namespace Core.Callbacks;
public class BundleCallbacks
{
private HttpConfig _httpConfig;
public BundleCallbacks()
{
}
public object SendBundle(string sessionID, object req, object res, object body)
{
throw new NotImplementedException();
+27
View File
@@ -0,0 +1,27 @@
using Core.Models.Eft.HttpResponse;
using Core.Models.Spt.Logging;
namespace Core.Callbacks;
public class ClientLogCallbacks
{
public ClientLogCallbacks()
{
}
public NullResponseData ClientLog(string url, ClientLogRequest info, string sessionID)
{
throw new NotImplementedException();
}
public string ReleaseNotes()
{
throw new NotImplementedException();
}
public string BsgLogging()
{
throw new NotImplementedException();
}
}
+13 -2
View File
@@ -1,8 +1,19 @@
namespace Core.Callbacks;
using Core.Models.Eft.Common;
using Core.Models.Eft.Common.Tables;
using Core.Models.Eft.Customization;
using Core.Models.Eft.HttpResponse;
using Core.Models.Eft.ItemEvent;
namespace Core.Callbacks;
public class CustomizationCallbacks
{
public GetBodyResponseData<object> GetSuits(string url, object info, string sessionID)
public CustomizationCallbacks()
{
}
public GetBodyResponseData<GetSuitsResponse> GetSuits(string url, EmptyRequestData info, string sessionID)
{
throw new NotImplementedException();
}
+86
View File
@@ -0,0 +1,86 @@
using Core.Models.Eft.Common;
using Core.Models.Eft.Common.Tables;
using Core.Models.Eft.Game;
using Core.Models.Eft.Hideout;
using Core.Models.Eft.HttpResponse;
using Core.Models.Spt.Server;
namespace Core.Callbacks;
public class DataCallbacks
{
public DataCallbacks()
{
}
public GetBodyResponseData<SettingsBase> GetSettings(string url, EmptyRequestData info, string sessionID)
{
throw new NotImplementedException();
}
public GetBodyResponseData<Globals> GetGlobals(string url, EmptyRequestData info, string sessionID)
{
throw new NotImplementedException();
}
public string GetTemplateItems(string url, EmptyRequestData info, string sessionID)
{
throw new NotImplementedException();
}
public GetBodyResponseData<HandbookBase> GetTemplateHandbook(string url, EmptyRequestData info, string sessionID)
{
throw new NotImplementedException();
}
public GetBodyResponseData<Dictionary<string, CustomizationItem>> GetTemplateSuits(string url, EmptyRequestData info, string sessionID)
{
throw new NotImplementedException();
}
public GetBodyResponseData<List<string>> GetTemplateCharacter(string url, EmptyRequestData info, string sessionID)
{
throw new NotImplementedException();
}
public GetBodyResponseData<HideoutSettingsBase> GetHideoutSettings(string url, EmptyRequestData info, string sessionID)
{
throw new NotImplementedException();
}
public GetBodyResponseData<List<HideoutArea>> GetHideoutAreas(string url, EmptyRequestData info, string sessionID)
{
throw new NotImplementedException();
}
public GetBodyResponseData<HideoutProductionData> GetHideoutProduction(string url, EmptyRequestData info, string sessionID)
{
throw new NotImplementedException();
}
public GetBodyResponseData<Dictionary<string, string>> GetLocalesLanguages(string url, EmptyRequestData info, string sessionID)
{
throw new NotImplementedException();
}
public GetBodyResponseData<string> GetLocalesMenu(string url, EmptyRequestData info, string sessionID)
{
throw new NotImplementedException();
}
public string GetLocalesGlobal(string url, EmptyRequestData info, string sessionID)
{
throw new NotImplementedException();
}
public string GetQteList(string url, EmptyRequestData info, string sessionID)
{
throw new NotImplementedException();
}
public GetBodyResponseData<GetItemPricesResponse> GetItemPrices(string url, EmptyRequestData info, string sessionID)
{
throw new NotImplementedException();
}
}
+7 -2
View File
@@ -1,4 +1,9 @@
namespace Core.Callbacks;
using Core.Models.Eft.Common;
using Core.Models.Eft.Dialog;
using Core.Models.Eft.HttpResponse;
using Core.Models.Eft.Profile;
namespace Core.Callbacks;
public class DialogCallbacks
{
@@ -7,7 +12,7 @@ public class DialogCallbacks
throw new NotImplementedException();
}
public GetBodyResponseData<List<object>> GetChatServerList(string url, GetChatServerListRequestData info, string sessionID)
public GetBodyResponseData<List<ChatServer>> GetChatServerList(string url, GetChatServerListRequestData info, string sessionID)
{
throw new NotImplementedException();
}
-8
View File
@@ -1,8 +0,0 @@
namespace Core.Models.Config;
public class HttpConfig
{
public int Port { get; set; }
public string Ip { get; set; }
public bool LogRequests { get; set; }
}
@@ -0,0 +1,25 @@
using System.Text.Json.Serialization;
using Core.Models.Eft.Profile;
namespace Core.Models.Eft.Builds;
public class SetMagazineRequest
{
[JsonPropertyName("Id")]
public string Id { get; set; }
[JsonPropertyName("Name")]
public string Name { get; set; }
[JsonPropertyName("Caliber")]
public string Caliber { get; set; }
[JsonPropertyName("Items")]
public List<MagazineTemplateAmmoItem> Items { get; set; }
[JsonPropertyName("TopCount")]
public int TopCount { get; set; }
[JsonPropertyName("BottomCount")]
public int BottomCount { get; set; }
}
@@ -0,0 +1,27 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Customization;
public class BuyClothingRequestData
{
[JsonPropertyName("Action")]
public string Action { get; set; } = "CustomizationBuy";
[JsonPropertyName("offer")]
public string Offer { get; set; }
[JsonPropertyName("items")]
public List<PaymentItemForClothing> Items { get; set; }
}
public class PaymentItemForClothing
{
[JsonPropertyName("del")]
public bool Del { get; set; }
[JsonPropertyName("id")]
public string Id { get; set; }
[JsonPropertyName("count")]
public int Count { get; set; }
}
@@ -0,0 +1,24 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Customization;
public class CustomizationSetRequest
{
[JsonPropertyName("Action")]
public string Action { get; set; } = "CustomizationSet";
[JsonPropertyName("customizations")]
public List<CustomizationSetOption> Customizations { get; set; }
}
public class CustomizationSetOption
{
[JsonPropertyName("id")]
public string Id { get; set; }
[JsonPropertyName("type")]
public string Type { get; set; }
[JsonPropertyName("source")]
public string Source { get; set; }
}
@@ -0,0 +1,12 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Customization;
public class GetSuitsResponse
{
[JsonPropertyName("_id")]
public string Id { get; set; }
[JsonPropertyName("suites")]
public string[] Suites { get; set; }
}
@@ -0,0 +1,6 @@
namespace Core.Models.Eft.Customization;
public class WearClothingRequestData
{
}
+43
View File
@@ -0,0 +1,43 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Dialog;
public class ChatServer
{
[JsonPropertyName("_id")]
public string Id { get; set; }
[JsonPropertyName("RegistrationId")]
public int RegistrationId { get; set; }
[JsonPropertyName("VersionId")]
public string VersionId { get; set; }
[JsonPropertyName("Ip")]
public string Ip { get; set; }
[JsonPropertyName("Port")]
public int Port { get; set; }
[JsonPropertyName("DateTime")]
public long DateTime { get; set; }
[JsonPropertyName("Chats")]
public List<Chat> Chats { get; set; }
[JsonPropertyName("Regions")]
public List<string> Regions { get; set; }
/** Possibly removed */
[JsonPropertyName("IsDeveloper")]
public bool? IsDeveloper { get; set; }
}
public class Chat
{
[JsonPropertyName("_id")]
public string Id { get; set; }
[JsonPropertyName("Members")]
public int Members { get; set; }
}
@@ -0,0 +1,9 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Dialog;
public class GetChatServerListRequestData
{
[JsonPropertyName("VersionId")]
public string VersionId { get; set; }
}
@@ -0,0 +1,16 @@
using System.Text.Json.Serialization;
using Core.Models.Eft.Profile;
namespace Core.Models.Eft.Dialog;
public class GetFriendListDataResponse
{
[JsonPropertyName("Friends")]
public List<UserDialogInfo> Friends { get; set; }
[JsonPropertyName("Ignore")]
public List<string> Ignore { get; set; }
[JsonPropertyName("InIgnoreList")]
public List<string> InIgnoreList { get; set; }
}
@@ -0,0 +1,12 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Dialog;
public class GetMailDialogListRequestData
{
[JsonPropertyName("limit")]
public int Limit { get; set; }
[JsonPropertyName("offset")]
public int Offset { get; set; }
}
@@ -0,0 +1,15 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Game;
public class GetItemPricesResponse
{
[JsonPropertyName("supplyNextTime")]
public double SupplyNextTime { get; set; }
[JsonPropertyName("prices")]
public Dictionary<string, double> Prices { get; set; }
[JsonPropertyName("currencyCourses")]
public Dictionary<string, double> CurrencyCourses { get; set; }
}
@@ -0,0 +1,15 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.HttpResponse;
public class NullResponseData
{
[JsonPropertyName("err")]
public int Err { get; set; }
[JsonPropertyName("errmsg")]
public object ErrMsg { get; set; }
[JsonPropertyName("data")]
public object Data { get; set; }
}
@@ -0,0 +1,9 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.ItemEvent;
public class EmptyItemEventRouterResponse : ItemEventRouterBase
{
[JsonPropertyName("profileChanges")]
public string ProfileChanges { get; set; } = "";
}
@@ -0,0 +1,188 @@
using Core.Models.Eft.Common.Tables;
using Core.Models.Eft.Ragfair;
using Core.Models.Enums;
namespace Core.Models.Eft.ItemEvent;
using System.Text.Json.Serialization;
public class ItemEventRouterBase
{
[JsonPropertyName("warnings")]
public List<Warning> Warnings { get; set; }
[JsonPropertyName("profileChanges")]
public object ProfileChanges { get; set; } // Note: using object to accommodate string or TProfileChanges
}
public class TProfileChanges : Dictionary<string, ProfileChange> { }
public class Warning
{
[JsonPropertyName("index")]
public int Index { get; set; }
[JsonPropertyName("errmsg")]
public string ErrorMessage { get; set; }
[JsonPropertyName("code")]
public string Code { get; set; }
[JsonPropertyName("data")]
public object Data { get; set; }
}
public class ProfileChange
{
[JsonPropertyName("_id")]
public string Id { get; set; }
[JsonPropertyName("experience")]
public int Experience { get; set; }
[JsonPropertyName("quests")]
public List<Quest> Quests { get; set; }
[JsonPropertyName("ragFairOffers")]
public List<RagfairOffer> RagFairOffers { get; set; }
[JsonPropertyName("weaponBuilds")]
public List<WeaponBuildChange> WeaponBuilds { get; set; }
[JsonPropertyName("equipmentBuilds")]
public List<EquipmentBuildChange> EquipmentBuilds { get; set; }
[JsonPropertyName("items")]
public ItemChanges Items { get; set; }
[JsonPropertyName("production")]
public Dictionary<string, Productive> Production { get; set; }
/** Hideout area improvement id */
[JsonPropertyName("improvements")]
public Dictionary<string, HideoutImprovement> Improvements { get; set; }
[JsonPropertyName("skills")]
public Skills Skills { get; set; }
[JsonPropertyName("health")]
public Common.Health Health { get; set; }
[JsonPropertyName("traderRelations")]
public Dictionary<string, TraderData> TraderRelations { get; set; }
[JsonPropertyName("moneyTransferLimitData")]
public MoneyTransferLimits MoneyTransferLimitData { get; set; }
[JsonPropertyName("repeatableQuests")]
public List<PmcDataRepeatableQuest> RepeatableQuests { get; set; }
[JsonPropertyName("recipeUnlocked")]
public Dictionary<string, bool> RecipeUnlocked { get; set; }
[JsonPropertyName("changedHideoutStashes")]
public Dictionary<string, HideoutStashItem> ChangedHideoutStashes { get; set; }
[JsonPropertyName("questsStatus")]
public List<QuestStatus> QuestsStatus { get; set; }
}
public class HideoutStashItem
{
[JsonPropertyName("id")]
public string Id { get; set; }
[JsonPropertyName("tpl")]
public string Template { get; set; }
}
public class WeaponBuildChange
{
[JsonPropertyName("id")]
public string Id { get; set; }
[JsonPropertyName("name")]
public string Name { get; set; }
[JsonPropertyName("root")]
public string Root { get; set; }
[JsonPropertyName("items")]
public List<Item> Items { get; set; }
}
public class EquipmentBuildChange
{
[JsonPropertyName("id")]
public string Id { get; set; }
[JsonPropertyName("name")]
public string Name { get; set; }
[JsonPropertyName("root")]
public string Root { get; set; }
[JsonPropertyName("items")]
public List<Item> Items { get; set; }
[JsonPropertyName("type")]
public string Type { get; set; }
[JsonPropertyName("fastpanel")]
public List<object> FastPanel { get; set; }
[JsonPropertyName("buildType")]
public EquipmentBuildType BuildType { get; set; }
}
public class ItemChanges
{
[JsonPropertyName("new")]
public List<Product> NewItems { get; set; }
[JsonPropertyName("change")]
public List<Product> ChangedItems { get; set; }
[JsonPropertyName("del")]
public List<Product> DeletedItems { get; set; } // Only needs _id property
}
/** Related to TraderInfo */
public class TraderData
{
[JsonPropertyName("salesSum")]
public double SalesSum { get; set; }
[JsonPropertyName("standing")]
public double Standing { get; set; }
[JsonPropertyName("loyalty")]
public double Loyalty { get; set; }
[JsonPropertyName("unlocked")]
public bool Unlocked { get; set; }
[JsonPropertyName("disabled")]
public bool Disabled { get; set; }
}
public class Product
{
[JsonPropertyName("_id")]
public string Id { get; set; }
[JsonPropertyName("_tpl")]
public string Template { get; set; }
[JsonPropertyName("parentId")]
public string ParentId { get; set; }
[JsonPropertyName("slotId")]
public string SlotId { get; set; }
[JsonPropertyName("location")]
public ItemLocation Location { get; set; }
[JsonPropertyName("upd")]
public Upd Upd { get; set; }
}
@@ -0,0 +1,54 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.ItemEvent;
public class ItemEventRouterRequest
{
[JsonPropertyName("data")]
public List<Daum> Data { get; set; }
[JsonPropertyName("tm")]
public int Time { get; set; }
[JsonPropertyName("reload")]
public int Reload { get; set; }
}
public class Daum
{
[JsonPropertyName("Action")]
public string Action { get; set; }
[JsonPropertyName("item")]
public string Item { get; set; }
[JsonPropertyName("to")]
public To To { get; set; }
}
public class To
{
[JsonPropertyName("id")]
public string Id { get; set; }
[JsonPropertyName("container")]
public string Container { get; set; }
[JsonPropertyName("location")]
public Location Location { get; set; }
}
public class Location
{
[JsonPropertyName("x")]
public int X { get; set; }
[JsonPropertyName("y")]
public int Y { get; set; }
[JsonPropertyName("r")]
public string R { get; set; }
[JsonPropertyName("isSearched")]
public bool IsSearched { get; set; }
}
@@ -0,0 +1,6 @@
namespace Core.Models.Eft.ItemEvent;
public class ItemEventRouterResponse : ItemEventRouterBase
{
}
@@ -0,0 +1,23 @@
using System.Text.Json.Serialization;
using Core.Models.Eft.Common.Tables;
namespace Core.Models.Eft.PresetBuild;
public class PresetBuildActionRequestData
{
[JsonPropertyName("Action")]
public string Action { get; set; }
[JsonPropertyName("Id")]
public string Id { get; set; }
/** name of preset given by player */
[JsonPropertyName("Name")]
public string Name { get; set; }
[JsonPropertyName("Root")]
public string Root { get; set; }
[JsonPropertyName("Items")]
public List<Item> Items { get; set; }
}
@@ -0,0 +1,9 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.PresetBuild;
public class RemoveBuildRequestData
{
[JsonPropertyName("id")]
public string Id { get; set; }
}