This commit is contained in:
CWX
2025-01-07 12:24:14 +00:00
67 changed files with 1214 additions and 2 deletions
+3
View File
@@ -1,7 +1,10 @@
using Core.Models.Common;
using Core.Models.Eft.Bot;
using Core.Models.Eft.Common;
using Core.Models.Eft.Common.Tables;
using Core.Models.Spt.Bots;
using Core.Models.Spt.Config;
using Condition = Core.Models.Spt.Config.Condition;
namespace Core.Controllers;
+2
View File
@@ -1,3 +1,5 @@
using Core.Models.Eft.InRaid;
namespace Core.Controllers;
public class InRaidController
+2
View File
@@ -1,3 +1,5 @@
using Core.Models.Eft.Notifier;
namespace Core.Controllers;
public class NotifierController
+1
View File
@@ -1,5 +1,6 @@
using Core.Models.Eft.Common;
using Core.Models.Eft.ItemEvent;
using Core.Models.Eft.Repair;
namespace Core.Controllers;
+1
View File
@@ -2,6 +2,7 @@ using Core.Models.Eft.Common;
using Core.Models.Eft.Common.Tables;
using Core.Models.Eft.ItemEvent;
using Core.Models.Eft.Ragfair;
using Core.Models.Eft.Trade;
using Core.Models.Enums;
namespace Core.Controllers;
+3
View File
@@ -1,3 +1,6 @@
using Core.Models.Eft.Weather;
using Core.Models.Spt.Weather;
namespace Core.Controllers;
public class WeatherController
+2 -1
View File
@@ -1,5 +1,6 @@
using Core.Models.Eft.Common;
using Core.Models.Eft.ItemEvent;
using Core.Models.Eft.Wishlist;
namespace Core.Controllers;
@@ -14,7 +15,7 @@ public class WishlistController
/// <returns></returns>
public ItemEventRouterResponse AddToWishList(
PmcData pmcData,
AddItemToWishlistRequest request,
AddToWishlistRequest request,
string sessionId)
{
throw new NotImplementedException();
+25
View File
@@ -0,0 +1,25 @@
using System.Text.Json.Serialization;
using Core.Models.Eft.Common.Request;
namespace Core.Models.Eft.Notes;
public class NoteActionData : BaseInteractionRequestData
{
[JsonPropertyName("Action")]
public string Action { get; set; }
[JsonPropertyName("index")]
public int Index { get; set; }
[JsonPropertyName("note")]
public Note Note { get; set; }
}
public class Note
{
[JsonPropertyName("Time")]
public int Time { get; set; }
[JsonPropertyName("Text")]
public string Text { get; set; }
}
+21
View File
@@ -0,0 +1,21 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Notifier;
public class NotifierChannel
{
[JsonPropertyName("server")]
public string Server { get; set; }
[JsonPropertyName("channel_id")]
public string ChannelId { get; set; }
[JsonPropertyName("url")]
public string Url { get; set; }
[JsonPropertyName("notifierServer")]
public string NotifierServer { get; set; }
[JsonPropertyName("ws")]
public string WebSocket { get; set; }
}
@@ -0,0 +1,9 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Notifier;
public class SelectProfileResponse
{
[JsonPropertyName("status")]
public string Status { get; set; }
}
@@ -0,0 +1,55 @@
using System.Text.Json.Serialization;
using Core.Models.Eft.Common.Tables;
namespace Core.Models.Eft.Player;
public class PlayerIncrementSkillLevelRequestData
{
[JsonPropertyName("_id")]
public string Id { get; set; }
[JsonPropertyName("experience")]
public int Experience { get; set; }
[JsonPropertyName("quests")]
public List<object> Quests { get; set; }
[JsonPropertyName("ragFairOffers")]
public List<object> RagFairOffers { get; set; }
[JsonPropertyName("builds")]
public List<object> Builds { get; set; }
[JsonPropertyName("items")]
public Items Items { get; set; }
[JsonPropertyName("production")]
public Production Production { get; set; }
[JsonPropertyName("skills")]
public Skills Skills { get; set; }
[JsonPropertyName("traderRelations")]
public TraderRelations TraderRelations { get; set; }
}
// TODO: These are all lists of objects.
public class Items
{
[JsonPropertyName("new")]
public List<object> NewItems { get; set; }
[JsonPropertyName("change")]
public List<object> ChangedItems { get; set; }
[JsonPropertyName("del")]
public List<object> DeletedItems { get; set; }
}
public class Production
{
}
public class TraderRelations
{
}
@@ -0,0 +1,9 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Prestige;
public class GetPrestigeResponse
{
[JsonPropertyName("elements")]
public List<Common.Tables.Prestige> Elements { get; set; }
}
@@ -0,0 +1,18 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Profile;
public class ConnectResponse
{
[JsonPropertyName("backendUrl")]
public string BackendUrl { get; set; }
[JsonPropertyName("name")]
public string Name { get; set; }
[JsonPropertyName("editions")]
public List<string> Editions { get; set; }
[JsonPropertyName("profileDescriptions")]
public Dictionary<string, string> ProfileDescriptions { get; set; }
}
@@ -0,0 +1,9 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Profile;
public class CreateProfileResponse
{
[JsonPropertyName("uid")]
public string UserId { get; set; }
}
@@ -0,0 +1,9 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Profile;
public class GetOtherProfileRequest
{
[JsonPropertyName("accountId")]
public string AccountId { get; set; }
}
@@ -0,0 +1,103 @@
using System.Text.Json.Serialization;
using Core.Models.Eft.Common.Tables;
namespace Core.Models.Eft.Profile;
public class GetOtherProfileResponse
{
[JsonPropertyName("id")]
public string Id { get; set; }
[JsonPropertyName("aid")]
public int Aid { get; set; }
[JsonPropertyName("info")]
public OtherProfileInfo Info { get; set; }
[JsonPropertyName("customization")]
public OtherProfileCustomization Customization { get; set; }
[JsonPropertyName("skills")]
public Skills Skills { get; set; }
[JsonPropertyName("equipment")]
public OtherProfileEquipment Equipment { get; set; }
[JsonPropertyName("achievements")]
public Dictionary<string, int> Achievements { get; set; }
[JsonPropertyName("favoriteItems")]
public List<Item> FavoriteItems { get; set; }
[JsonPropertyName("pmcStats")]
public OtherProfileStats PmcStats { get; set; }
[JsonPropertyName("scavStats")]
public OtherProfileStats ScavStats { get; set; }
}
public class OtherProfileInfo
{
[JsonPropertyName("nickname")]
public string Nickname { get; set; }
[JsonPropertyName("side")]
public string Side { get; set; }
[JsonPropertyName("experience")]
public int Experience { get; set; }
[JsonPropertyName("memberCategory")]
public int MemberCategory { get; set; }
[JsonPropertyName("bannedState")]
public bool BannedState { get; set; }
[JsonPropertyName("bannedUntil")]
public long BannedUntil { get; set; }
[JsonPropertyName("registrationDate")]
public long RegistrationDate { get; set; }
}
public class OtherProfileCustomization
{
[JsonPropertyName("head")]
public string Head { get; set; }
[JsonPropertyName("body")]
public string Body { get; set; }
[JsonPropertyName("feet")]
public string Feet { get; set; }
[JsonPropertyName("hands")]
public string Hands { get; set; }
[JsonPropertyName("dogtag")]
public string Dogtag { get; set; }
}
public class OtherProfileEquipment
{
[JsonPropertyName("Id")]
public string Id { get; set; }
[JsonPropertyName("Items")]
public List<Item> Items { get; set; }
}
public class OtherProfileStats
{
[JsonPropertyName("eft")]
public OtherProfileSubStats Eft { get; set; }
}
public class OtherProfileSubStats
{
[JsonPropertyName("totalInGameTime")]
public int TotalInGameTime { get; set; }
[JsonPropertyName("overAllCounters")]
public OverallCounters OverAllCounters { get; set; }
}
@@ -0,0 +1,15 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Profile;
public class GetProfileSettingsRequest
{
/// <summary>
/// Chosen value for profile.Info.SelectedMemberCategory
/// </summary>
[JsonPropertyName("memberCategory")]
public int MemberCategory { get; set; }
[JsonPropertyName("squadInviteRestriction")]
public bool SquadInviteRestriction { get; set; }
}
@@ -0,0 +1,51 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Profile;
public class GetProfileStatusResponseData
{
[JsonPropertyName("maxPveCountExceeded")]
public bool MaxPveCountExceeded { get; set; } = false;
[JsonPropertyName("profiles")]
public List<ProfileStatusData> Profiles { get; set; }
}
public class ProfileStatusData
{
[JsonPropertyName("profileid")]
public string ProfileId { get; set; }
[JsonPropertyName("profileToken")]
public string ProfileToken { get; set; }
[JsonPropertyName("status")]
public string Status { get; set; }
[JsonPropertyName("ip")]
public string Ip { get; set; }
[JsonPropertyName("port")]
public int Port { get; set; }
[JsonPropertyName("sid")]
public string Sid { get; set; }
[JsonPropertyName("version")]
public string? Version { get; set; }
[JsonPropertyName("location")]
public string? Location { get; set; }
[JsonPropertyName("raidMode")]
public string? RaidMode { get; set; }
[JsonPropertyName("mode")]
public string? Mode { get; set; }
[JsonPropertyName("shortId")]
public string? ShortId { get; set; }
[JsonPropertyName("additional_info")]
public List<object>? AdditionalInfo { get; set; } // TODO: Was `any` in the node server
}
@@ -0,0 +1,9 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Profile;
public class ProfileChangeNicknameRequestData
{
[JsonPropertyName("nickname")]
public string Nickname { get; set; }
}
@@ -0,0 +1,9 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Profile;
public class ProfileChangeVoiceRequestData
{
[JsonPropertyName("voice")]
public string Voice { get; set; }
}
@@ -0,0 +1,18 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Profile;
public class ProfileCreateRequestData
{
[JsonPropertyName("side")]
public string Side { get; set; }
[JsonPropertyName("nickname")]
public string Nickname { get; set; }
[JsonPropertyName("headId")]
public string HeadId { get; set; }
[JsonPropertyName("voiceId")]
public string VoiceId { get; set; }
}
@@ -0,0 +1,9 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Profile;
public class SearchFriendRequestData
{
[JsonPropertyName("nickname")]
public string Nickname { get; set; }
}
@@ -0,0 +1,34 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Profile;
public class SearchFriendResponse
{
[JsonPropertyName("_id")]
public string Id { get; set; }
[JsonPropertyName("aid")]
public int Aid { get; set; }
[JsonPropertyName("Info")]
public FriendInfo Info { get; set; }
}
// NOTE: Renamed from `Info` because of a name collision.
public class FriendInfo
{
[JsonPropertyName("Nickname")]
public string Nickname { get; set; }
[JsonPropertyName("Side")]
public string Side { get; set; }
[JsonPropertyName("Level")]
public int Level { get; set; }
[JsonPropertyName("MemberCategory")]
public int MemberCategory { get; set; }
[JsonPropertyName("SelectedMemberCategory")]
public int SelectedMemberCategory { get; set; }
}
@@ -0,0 +1,9 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Profile;
public class ValidateNicknameRequestData
{
[JsonPropertyName("nickname")]
public string Nickname { get; set; }
}
@@ -0,0 +1,15 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Quests;
public class AcceptQuestRequestData
{
[JsonPropertyName("Action")]
public string Action { get; set; } = "QuestAccept";
[JsonPropertyName("qid")]
public string QuestId { get; set; }
[JsonPropertyName("type")]
public string Type { get; set; }
}
@@ -0,0 +1,16 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Quests;
public class CompleteQuestRequestData
{
[JsonPropertyName("Action")]
public string Action { get; set; }
/** Quest Id */
[JsonPropertyName("qid")]
public string QuestId { get; set; }
[JsonPropertyName("removeExcessItems")]
public bool RemoveExcessItems { get; set; }
}
@@ -0,0 +1,27 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Quests;
public class HandoverQuestRequestData
{
[JsonPropertyName("Action")]
public string Action { get; set; } = "QuestHandover";
[JsonPropertyName("qid")]
public string QuestId { get; set; }
[JsonPropertyName("conditionId")]
public string ConditionId { get; set; }
[JsonPropertyName("items")]
public List<HandoverItem> Items { get; set; }
}
public class HandoverItem
{
[JsonPropertyName("id")]
public string Id { get; set; }
[JsonPropertyName("count")]
public int Count { get; set; }
}
@@ -0,0 +1,9 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Quests;
public class ListQuestsRequestData
{
[JsonPropertyName("completed")]
public bool Completed { get; set; }
}
@@ -0,0 +1,12 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Quests;
public class RepeatableQuestChangeRequest
{
[JsonPropertyName("Action")]
public string Action { get; set; } = "RepeatableQuestChange";
[JsonPropertyName("qid")]
public string QuestId { get; set; }
}
@@ -0,0 +1,36 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Ragfair;
public class AddOfferRequestData
{
[JsonPropertyName("Action")]
public string Action { get; set; }
[JsonPropertyName("sellInOnePiece")]
public bool SellInOnePiece { get; set; }
[JsonPropertyName("items")]
public List<string> Items { get; set; }
[JsonPropertyName("requirements")]
public List<Requirement> Requirements { get; set; }
}
public class Requirement
{
[JsonPropertyName("_tpl")]
public string Template { get; set; }
[JsonPropertyName("count")]
public int Count { get; set; }
[JsonPropertyName("level")]
public int Level { get; set; }
[JsonPropertyName("side")]
public int Side { get; set; }
[JsonPropertyName("onlyFunctional")]
public bool OnlyFunctional { get; set; }
}
@@ -0,0 +1,12 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Ragfair;
public class ExtendOfferRequestData
{
[JsonPropertyName("offerId")]
public string OfferId { get; set; }
[JsonPropertyName("renewalTime")]
public int RenewalTime { get; set; }
}
@@ -0,0 +1,10 @@
using System.Text.Json.Serialization;
using Core.Models.Common;
namespace Core.Models.Eft.Ragfair;
public class GetItemPriceResult : MinMax
{
[JsonPropertyName("avg")]
public int Avg { get; set; }
}
@@ -0,0 +1,9 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Ragfair;
public class GetMarketPriceRequestData
{
[JsonPropertyName("templateId")]
public string TemplateId { get; set; }
}
@@ -0,0 +1,18 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Ragfair;
public class GetOffersResult
{
[JsonPropertyName("categories")]
public Dictionary<string, int>? Categories { get; set; }
[JsonPropertyName("offers")]
public List<RagfairOffer> Offers { get; set; }
[JsonPropertyName("offersCount")]
public int OffersCount { get; set; }
[JsonPropertyName("selectedCategory")]
public string SelectedCategory { get; set; }
}
@@ -0,0 +1,9 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Ragfair;
public class GetRagfairOfferByIdRequest
{
[JsonPropertyName("id")]
public int Id { get; set; }
}
@@ -0,0 +1,12 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Ragfair;
public class RemoveOfferRequestData
{
[JsonPropertyName("Action")]
public string Action { get; set; }
[JsonPropertyName("offerId")]
public string OfferId { get; set; }
}
@@ -0,0 +1,87 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Ragfair;
public class SearchRequestData
{
[JsonPropertyName("page")]
public int Page { get; set; }
[JsonPropertyName("limit")]
public int Limit { get; set; }
[JsonPropertyName("sortType")]
public RagfairSort SortType { get; set; }
[JsonPropertyName("sortDirection")]
public int SortDirection { get; set; }
[JsonPropertyName("currency")]
public int Currency { get; set; }
[JsonPropertyName("priceFrom")]
public int PriceFrom { get; set; }
[JsonPropertyName("priceTo")]
public int PriceTo { get; set; }
[JsonPropertyName("quantityFrom")]
public int QuantityFrom { get; set; }
[JsonPropertyName("quantityTo")]
public int QuantityTo { get; set; }
[JsonPropertyName("conditionFrom")]
public int ConditionFrom { get; set; }
[JsonPropertyName("conditionTo")]
public int ConditionTo { get; set; }
[JsonPropertyName("oneHourExpiration")]
public bool OneHourExpiration { get; set; }
[JsonPropertyName("removeBartering")]
public bool RemoveBartering { get; set; }
[JsonPropertyName("offerOwnerType")]
public OfferOwnerType OfferOwnerType { get; set; }
[JsonPropertyName("onlyFunctional")]
public bool OnlyFunctional { get; set; }
[JsonPropertyName("updateOfferCount")]
public bool UpdateOfferCount { get; set; }
[JsonPropertyName("handbookId")]
public string HandbookId { get; set; }
[JsonPropertyName("linkedSearchId")]
public string LinkedSearchId { get; set; }
[JsonPropertyName("neededSearchId")]
public string NeededSearchId { get; set; }
[JsonPropertyName("buildItems")]
public BuildItems BuildItems { get; set; }
[JsonPropertyName("buildCount")]
public int BuildCount { get; set; }
[JsonPropertyName("tm")]
public int Tm { get; set; }
[JsonPropertyName("reload")]
public int Reload { get; set; }
}
public enum OfferOwnerType
{
ANYOWNERTYPE = 0,
TRADEROWNERTYPE = 1,
PLAYEROWNERTYPE = 2,
}
public class BuildItems
{
// Define properties for BuildItems here if needed
}
@@ -0,0 +1,9 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Ragfair;
public class SendRagfairReportRequestData
{
[JsonPropertyName("offerId")]
public int OfferId { get; set; }
}
@@ -0,0 +1,18 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Ragfair;
public class StorePlayerOfferTaxAmountRequestData
{
[JsonPropertyName("id")]
public string Id { get; set; }
[JsonPropertyName("tpl")]
public string Tpl { get; set; }
[JsonPropertyName("count")]
public int Count { get; set; }
[JsonPropertyName("fee")]
public double Fee { get; set; }
}
@@ -0,0 +1,9 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Repair;
public class BaseRepairActionDataRequest
{
[JsonPropertyName("Action")]
public string Action { get; set; }
}
@@ -0,0 +1,24 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Repair;
public class RepairActionDataRequest : BaseRepairActionDataRequest
{
[JsonPropertyName("Action")]
public string Action { get; set; } = "Repair";
[JsonPropertyName("repairKitsInfo")]
public List<RepairKitsInfo> RepairKitsInfo { get; set; }
[JsonPropertyName("target")]
public string Target { get; set; } // item to repair
}
public class RepairKitsInfo
{
[JsonPropertyName("_id")]
public string Id { get; set; } // id of repair kit to use
[JsonPropertyName("count")]
public int Count { get; set; } // amount of units to reduce kit by
}
@@ -0,0 +1,24 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Repair;
public class TraderRepairActionDataRequest : BaseRepairActionDataRequest
{
[JsonPropertyName("Action")]
public string Action { get; set; } = "TraderRepair";
[JsonPropertyName("tid")]
public string TId { get; set; }
[JsonPropertyName("repairItems")]
public List<RepairItem> RepairItems { get; set; }
}
public class RepairItem
{
[JsonPropertyName("_id")]
public string Id { get; set; }
[JsonPropertyName("count")]
public int Count { get; set; }
}
@@ -0,0 +1,15 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Trade;
public class ProcessBaseTradeRequestData
{
[JsonPropertyName("Action")]
public string Action { get; set; }
[JsonPropertyName("type")]
public string Type { get; set; }
[JsonPropertyName("tid")]
public string TransactionId { get; set; }
}
@@ -0,0 +1,37 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Trade;
public class ProcessBuyTradeRequestData : ProcessBaseTradeRequestData
{
[JsonPropertyName("Action")]
public string Action { get; set; } // TODO: formerly - "buy_from_trader" | "TradingConfirm" | "RestoreHealth" | "SptInsure" | "SptRepair" | ""
[JsonPropertyName("type")]
public string Type { get; set; }
[JsonPropertyName("tid")]
public string TId { get; set; }
[JsonPropertyName("item_id")]
public string ItemId { get; set; }
[JsonPropertyName("count")]
public int Count { get; set; }
[JsonPropertyName("scheme_id")]
public int SchemeId { get; set; }
[JsonPropertyName("scheme_items")]
public List<SchemeItem> SchemeItems { get; set; }
}
public class SchemeItem
{
/** Id of stack to take money from, is money tpl when Action is `SptInsure` */
[JsonPropertyName("id")]
public string Id { get; set; }
[JsonPropertyName("count")]
public int Count { get; set; }
}
@@ -0,0 +1,33 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Trade;
public class ProcessRagfairTradeRequestData
{
[JsonPropertyName("Action")]
public string Action { get; set; }
[JsonPropertyName("offers")]
public List<OfferRequest> Offers { get; set; }
}
public class OfferRequest
{
[JsonPropertyName("id")]
public string Id { get; set; }
[JsonPropertyName("count")]
public int Count { get; set; }
[JsonPropertyName("items")]
public List<ItemRequest> Items { get; set; }
}
public class ItemRequest
{
[JsonPropertyName("id")]
public string Id { get; set; }
[JsonPropertyName("count")]
public int Count { get; set; }
}
@@ -0,0 +1,33 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Trade;
public class ProcessSellTradeRequestData : ProcessBaseTradeRequestData
{
[JsonPropertyName("Action")]
public string Action { get; set; } = "sell_to_trader";
[JsonPropertyName("type")]
public string Type { get; set; }
[JsonPropertyName("tid")]
public string Tid { get; set; }
[JsonPropertyName("price")]
public double Price { get; set; }
[JsonPropertyName("items")]
public List<SoldItem> Items { get; set; }
}
public class SoldItem
{
[JsonPropertyName("id")]
public string Id { get; set; }
[JsonPropertyName("count")]
public int Count { get; set; }
[JsonPropertyName("scheme_id")]
public int SchemeId { get; set; }
}
@@ -0,0 +1,19 @@
using System.Text.Json.Serialization;
using Core.Models.Eft.Common.Request;
namespace Core.Models.Eft.Trade;
public class SellScavItemsToFenceRequestData
{
[JsonPropertyName("Action")]
public string Action { get; set; } = "SellAllFromSavage";
[JsonPropertyName("totalValue")]
public double TotalValue { get; set; }
[JsonPropertyName("fromOwner")]
public OwnerInfo FromOwner { get; set; }
[JsonPropertyName("toOwner")]
public OwnerInfo ToOwner { get; set; }
}
+66
View File
@@ -0,0 +1,66 @@
using System.Text.Json.Serialization;
using Core.Models.Enums;
namespace Core.Models.Eft.Weather;
public class WeatherData
{
[JsonPropertyName("acceleration")]
public double Acceleration { get; set; }
[JsonPropertyName("time")]
public string Time { get; set; }
[JsonPropertyName("date")]
public string Date { get; set; }
[JsonPropertyName("weather")]
public Weather Weather { get; set; }
[JsonPropertyName("season")]
public Season Season { get; set; }
}
public class Weather
{
[JsonPropertyName("pressure")]
public double Pressure { get; set; }
[JsonPropertyName("temp")]
public double Temperature { get; set; }
[JsonPropertyName("fog")]
public double Fog { get; set; }
[JsonPropertyName("rain_intensity")]
public double RainIntensity { get; set; }
/** 1 - 3 light rain, 3+ 'rain' */
[JsonPropertyName("rain")]
public double Rain { get; set; }
[JsonPropertyName("wind_gustiness")]
public double WindGustiness { get; set; }
[JsonPropertyName("wind_direction")]
public WindDirection WindDirection { get; set; }
[JsonPropertyName("wind_speed")]
public double WindSpeed { get; set; }
/** < -0.4 = clear day */
[JsonPropertyName("cloud")]
public double Cloud { get; set; }
[JsonPropertyName("time")]
public string Time { get; set; }
[JsonPropertyName("date")]
public string Date { get; set; }
[JsonPropertyName("timestamp")]
public long Timestamp { get; set; }
[JsonPropertyName("sptInRaidTimestamp")]
public long SptInRaidTimestamp { get; set; }
}
@@ -0,0 +1,12 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Wishlist;
public class AddToWishlistRequest
{
[JsonPropertyName("Action")]
public string Action { get; set; }
[JsonPropertyName("items")]
public Dictionary<string, int> Items { get; set; }
}
@@ -0,0 +1,15 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Wishlist;
public class ChangeWishlistItemCategoryRequest
{
[JsonPropertyName("Action")]
public string Action { get; set; }
[JsonPropertyName("item")]
public string Item { get; set; }
[JsonPropertyName("category")]
public int Category { get; set; }
}
@@ -0,0 +1,12 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Wishlist;
public class RemoveFromWishlistRequest
{
[JsonPropertyName("Action")]
public string Action { get; set; }
[JsonPropertyName("items")]
public List<string> Items { get; set; }
}
+9
View File
@@ -0,0 +1,9 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Ws;
public class WsAid : WsNotificationEvent
{
[JsonPropertyName("aid")]
public int Aid { get; set; }
}
+12
View File
@@ -0,0 +1,12 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Ws;
public class WsAidNickname : WsNotificationEvent
{
[JsonPropertyName("aid")]
public int Aid { get; set; }
[JsonPropertyName("Nickname")]
public string Nickname { get; set; }
}
@@ -0,0 +1,16 @@
using System.Text.Json.Serialization;
using Core.Models.Eft.Profile;
namespace Core.Models.Eft.Ws;
public class WsChatMessageReceived : WsNotificationEvent
{
[JsonPropertyName("dialogId")]
public string DialogId { get; set; }
[JsonPropertyName("message")]
public Message Message { get; set; }
[JsonPropertyName("profiles")]
public List<GroupCharacter>? Profiles { get; set; }
}
+9
View File
@@ -0,0 +1,9 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Ws;
public class WsFriendsListAccept : WsNotificationEvent
{
[JsonPropertyName("profile")]
public SearchFriendResponse Profile { get; set; }
}
+9
View File
@@ -0,0 +1,9 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Ws;
public class WsGroupId : WsNotificationEvent
{
[JsonPropertyName("groupId")]
public string GroupId { get; set; }
}
@@ -0,0 +1,5 @@
namespace Core.Models.Eft.Ws;
public class WsGroupMatchInviteAccept : WsNotificationEvent, IGroupCharacter
{
}
@@ -0,0 +1,12 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Ws;
public class WsGroupMatchInviteDecline : WsNotificationEvent
{
[JsonPropertyName("aid")]
public int Aid { get; set; }
[JsonPropertyName("Nickname")]
public string Nickname { get; set; }
}
@@ -0,0 +1,15 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Ws;
public class WsGroupMatchInviteSend : WsNotificationEvent
{
[JsonPropertyName("requestId")]
public string RequestId { get; set; }
[JsonPropertyName("from")]
public int From { get; set; }
[JsonPropertyName("members")]
public List<GroupCharacter> Members { get; set; }
}
@@ -0,0 +1,9 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Ws;
public class WsGroupMatchLeaderChanged : WsNotificationEvent
{
[JsonPropertyName("owner")]
public int Owner { get; set; }
}
@@ -0,0 +1,9 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Ws;
public class WsGroupMatchRaidReady : WsNotificationEvent
{
[JsonPropertyName("extendedProfile")]
public GroupCharacter ExtendedProfile { get; set; }
}
@@ -0,0 +1,9 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Ws;
public class WsGroupMatchRaidSettings : WsNotificationEvent
{
[JsonPropertyName("raidSettings")]
public RaidSettings RaidSettings { get; set; }
}
+12
View File
@@ -0,0 +1,12 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Ws;
public class WsNotificationEvent
{
[JsonPropertyName("type")]
public string EventType { get; set; }
[JsonPropertyName("eventId")]
public string? EventIdentifier { get; set; }
}
+6
View File
@@ -0,0 +1,6 @@
namespace Core.Models.Eft.Ws;
public class WsPing : WsNotificationEvent
{
}
+15
View File
@@ -0,0 +1,15 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Ws;
public class WsRagfairOfferSold : WsNotificationEvent
{
[JsonPropertyName("offerId")]
public string OfferId { get; set; }
[JsonPropertyName("count")]
public int Count { get; set; }
[JsonPropertyName("handbookId")]
public string HandbookId { get; set; }
}
+42
View File
@@ -0,0 +1,42 @@
using System.Text.Json.Serialization;
namespace Core.Models.Eft.Ws;
public class WsUserConfirmed : WsNotificationEvent
{
[JsonPropertyName("profileid")]
public string ProfileId { get; set; }
[JsonPropertyName("profileToken")]
public string ProfileToken { get; set; }
[JsonPropertyName("status")]
public ProfileStatus Status { get; set; }
[JsonPropertyName("ip")]
public string Ip { get; set; }
[JsonPropertyName("port")]
public int Port { get; set; }
[JsonPropertyName("sid")]
public string Sid { get; set; }
[JsonPropertyName("version")]
public string Version { get; set; }
[JsonPropertyName("location")]
public string Location { get; set; }
[JsonPropertyName("raidMode")]
public RaidMode RaidMode { get; set; }
[JsonPropertyName("mode")]
public string Mode { get; set; }
[JsonPropertyName("shortId")]
public string ShortId { get; set; }
[JsonPropertyName("additional_info")]
public List<object> AdditionalInfo { get; set; } // TODO: Was `any` in the node server.
}
@@ -8,5 +8,5 @@ public class GetLocalWeatherResponseData
public int Season { get; set; }
[JsonPropertyName("weather")]
public List<Weather> Weather { get; set; }
public List<Eft.Weather.Weather> Weather { get; set; }
}