partial itemeventrouter changes
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Core.Models.Eft.Inventory;
|
||||
|
||||
namespace Core.Models.Eft.Hideout;
|
||||
|
||||
public record HandleQTEEventRequestData
|
||||
public record HandleQTEEventRequestData : InventoryBaseActionRequestData
|
||||
{
|
||||
[JsonPropertyName("Action")]
|
||||
public string? Action { get; set; }
|
||||
|
||||
/** true if QTE was successful, otherwise false */
|
||||
[JsonPropertyName("results")]
|
||||
public List<bool>? Results { get; set; }
|
||||
|
||||
@@ -7,7 +7,4 @@ public record InventoryExamineRequestData : InventoryBaseActionRequestData
|
||||
{
|
||||
[JsonPropertyName("item")]
|
||||
public string? Item { get; set; }
|
||||
|
||||
[JsonPropertyName("fromOwner")]
|
||||
public OwnerInfo? FromOwner { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Core.Models.Eft.Inventory;
|
||||
|
||||
namespace Core.Models.Eft.Quests;
|
||||
|
||||
public record AcceptQuestRequestData
|
||||
public record AcceptQuestRequestData : InventoryBaseActionRequestData
|
||||
{
|
||||
[JsonPropertyName("Action")]
|
||||
public string? Action { get; set; } = "QuestAccept";
|
||||
|
||||
[JsonPropertyName("qid")]
|
||||
public string? QuestId { get; set; }
|
||||
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Core.Models.Eft.Inventory;
|
||||
|
||||
namespace Core.Models.Eft.Quests;
|
||||
|
||||
public record CompleteQuestRequestData
|
||||
public record CompleteQuestRequestData : InventoryBaseActionRequestData
|
||||
{
|
||||
[JsonPropertyName("Action")]
|
||||
public string? Action { get; set; }
|
||||
|
||||
/** Quest Id */
|
||||
[JsonPropertyName("qid")]
|
||||
public string? QuestId { get; set; }
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Core.Models.Eft.Inventory;
|
||||
|
||||
namespace Core.Models.Eft.Quests;
|
||||
|
||||
public record FailQuestRequestData
|
||||
public record FailQuestRequestData : InventoryBaseActionRequestData
|
||||
{
|
||||
[JsonPropertyName("Action")]
|
||||
public string? Action { get; set; } = "QuestFail";
|
||||
|
||||
[JsonPropertyName("qid")]
|
||||
public string? QuestId { get; set; }
|
||||
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Core.Models.Eft.Inventory;
|
||||
|
||||
namespace Core.Models.Eft.Quests;
|
||||
|
||||
public record HandoverQuestRequestData
|
||||
public record HandoverQuestRequestData : InventoryBaseActionRequestData
|
||||
{
|
||||
[JsonPropertyName("Action")]
|
||||
public string? Action { get; set; } = "QuestHandover";
|
||||
|
||||
[JsonPropertyName("qid")]
|
||||
public string? QuestId { get; set; }
|
||||
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Core.Models.Eft.Inventory;
|
||||
|
||||
namespace Core.Models.Eft.Quests;
|
||||
|
||||
public record RepeatableQuestChangeRequest
|
||||
public record RepeatableQuestChangeRequest : InventoryBaseActionRequestData
|
||||
{
|
||||
[JsonPropertyName("Action")]
|
||||
public string? Action { get; set; } = "RepeatableQuestChange";
|
||||
|
||||
[JsonPropertyName("qid")]
|
||||
public string? QuestId { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Core.Models.Eft.Inventory;
|
||||
|
||||
namespace Core.Models.Eft.Ragfair;
|
||||
|
||||
public record AddOfferRequestData
|
||||
public record AddOfferRequestData : InventoryBaseActionRequestData
|
||||
{
|
||||
[JsonPropertyName("Action")]
|
||||
public string? Action { get; set; }
|
||||
|
||||
[JsonPropertyName("sellInOnePiece")]
|
||||
public bool? SellInOnePiece { get; set; }
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Core.Models.Eft.Inventory;
|
||||
|
||||
namespace Core.Models.Eft.Ragfair;
|
||||
|
||||
public record ExtendOfferRequestData
|
||||
public record ExtendOfferRequestData : InventoryBaseActionRequestData
|
||||
{
|
||||
[JsonPropertyName("offerId")]
|
||||
public string? OfferId { get; set; }
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Core.Models.Eft.Inventory;
|
||||
|
||||
namespace Core.Models.Eft.Ragfair;
|
||||
|
||||
public record RemoveOfferRequestData
|
||||
public record RemoveOfferRequestData : InventoryBaseActionRequestData
|
||||
{
|
||||
[JsonPropertyName("Action")]
|
||||
public string? Action { get; set; }
|
||||
|
||||
[JsonPropertyName("offerId")]
|
||||
public string? OfferId { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Core.Models.Eft.Inventory;
|
||||
|
||||
namespace Core.Models.Eft.Repair;
|
||||
|
||||
public record RepairActionDataRequest : BaseRepairActionDataRequest
|
||||
public record RepairActionDataRequest : InventoryBaseActionRequestData
|
||||
{
|
||||
[JsonPropertyName("Action")]
|
||||
public string? Action { get; set; } = "Repair";
|
||||
|
||||
[JsonPropertyName("repairKitsInfo")]
|
||||
public List<RepairKitsInfo>? RepairKitsInfo { get; set; }
|
||||
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Core.Models.Eft.Inventory;
|
||||
|
||||
namespace Core.Models.Eft.Repair;
|
||||
|
||||
public record TraderRepairActionDataRequest : BaseRepairActionDataRequest
|
||||
public record TraderRepairActionDataRequest : InventoryBaseActionRequestData
|
||||
{
|
||||
[JsonPropertyName("Action")]
|
||||
public string? Action { get; set; } = "TraderRepair";
|
||||
|
||||
[JsonPropertyName("tid")]
|
||||
public string? TId { get; set; }
|
||||
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Core.Models.Eft.Inventory;
|
||||
|
||||
namespace Core.Models.Eft.Trade;
|
||||
|
||||
public record ProcessBaseTradeRequestData
|
||||
public record ProcessBaseTradeRequestData : InventoryBaseActionRequestData
|
||||
{
|
||||
[JsonPropertyName("Action")]
|
||||
public string? Action { get; set; }
|
||||
|
||||
[JsonPropertyName("type")]
|
||||
public string? Type { get; set; }
|
||||
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Core.Models.Eft.Inventory;
|
||||
|
||||
namespace Core.Models.Eft.Trade;
|
||||
|
||||
public record ProcessRagfairTradeRequestData
|
||||
public record ProcessRagfairTradeRequestData : InventoryBaseActionRequestData
|
||||
{
|
||||
[JsonPropertyName("Action")]
|
||||
public string? Action { get; set; }
|
||||
|
||||
[JsonPropertyName("offers")]
|
||||
public List<OfferRequest>? Offers { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,19 +1,11 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Core.Models.Eft.Common.Request;
|
||||
using Core.Models.Eft.Inventory;
|
||||
|
||||
namespace Core.Models.Eft.Trade;
|
||||
|
||||
public record SellScavItemsToFenceRequestData
|
||||
public record SellScavItemsToFenceRequestData : InventoryBaseActionRequestData
|
||||
{
|
||||
[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; }
|
||||
}
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Core.Models.Eft.Inventory;
|
||||
|
||||
namespace Core.Models.Eft.Wishlist;
|
||||
|
||||
public record AddToWishlistRequest
|
||||
public record AddToWishlistRequest : InventoryBaseActionRequestData
|
||||
{
|
||||
[JsonPropertyName("Action")]
|
||||
public string? Action { get; set; }
|
||||
|
||||
[JsonPropertyName("items")]
|
||||
public Dictionary<string, int>? Items { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Core.Models.Eft.Inventory;
|
||||
|
||||
namespace Core.Models.Eft.Wishlist;
|
||||
|
||||
public record ChangeWishlistItemCategoryRequest
|
||||
public record ChangeWishlistItemCategoryRequest : InventoryBaseActionRequestData
|
||||
{
|
||||
[JsonPropertyName("Action")]
|
||||
public string? Action { get; set; }
|
||||
|
||||
[JsonPropertyName("item")]
|
||||
public string? Item { get; set; }
|
||||
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Core.Models.Eft.Inventory;
|
||||
|
||||
namespace Core.Models.Eft.Wishlist;
|
||||
|
||||
public record RemoveFromWishlistRequest
|
||||
public record RemoveFromWishlistRequest : InventoryBaseActionRequestData
|
||||
{
|
||||
[JsonPropertyName("Action")]
|
||||
public string? Action { get; set; }
|
||||
|
||||
[JsonPropertyName("items")]
|
||||
public List<string>? Items { get; set; }
|
||||
}
|
||||
|
||||
@@ -2,6 +2,15 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Core.Models.Eft.Common.Request;
|
||||
using Core.Models.Eft.Customization;
|
||||
using Core.Models.Eft.Hideout;
|
||||
using Core.Models.Eft.Inventory;
|
||||
using Core.Models.Eft.Notes;
|
||||
using Core.Models.Eft.Quests;
|
||||
using Core.Models.Eft.Ragfair;
|
||||
using Core.Models.Eft.Repair;
|
||||
using Core.Models.Eft.Trade;
|
||||
using Core.Models.Eft.Wishlist;
|
||||
using Core.Models.Enums;
|
||||
|
||||
namespace Core.Utils.Json.Converters;
|
||||
|
||||
@@ -24,8 +33,90 @@ public class BaseInteractionRequestDataConverter : JsonConverter<BaseInteraction
|
||||
case "CustomizationSet":
|
||||
return JsonSerializer.Deserialize<CustomizationSetRequest>(jsonText, options);
|
||||
|
||||
///////////////////////////////////////////
|
||||
/////////////////////////////////////////// InventoryBaseActionRequestData
|
||||
|
||||
case "AddToWishList":
|
||||
return JsonSerializer.Deserialize<AddToWishlistRequest>(jsonText, options);
|
||||
case "RemoveFromWishList":
|
||||
return JsonSerializer.Deserialize<RemoveFromWishlistRequest>(jsonText, options);
|
||||
case "ChangeWishlistItemCategory":
|
||||
return JsonSerializer.Deserialize<ChangeWishlistItemCategoryRequest>(jsonText, options);
|
||||
case "TradingConfirm":
|
||||
return JsonSerializer.Deserialize<ProcessBaseTradeRequestData>(jsonText, options);
|
||||
case "RagFairBuyOffer":
|
||||
return JsonSerializer.Deserialize<ProcessRagfairTradeRequestData>(jsonText, options);
|
||||
case "SellAllFromSavage":
|
||||
return JsonSerializer.Deserialize<SellScavItemsToFenceRequestData>(jsonText, options);
|
||||
case "Repair":
|
||||
return JsonSerializer.Deserialize<RepairActionDataRequest>(jsonText, options);
|
||||
case "TraderRepair":
|
||||
return JsonSerializer.Deserialize<TraderRepairActionDataRequest>(jsonText, options);
|
||||
case "RagFairAddOffer":
|
||||
return JsonSerializer.Deserialize<AddOfferRequestData>(jsonText, options);
|
||||
case "RagFairRemoveOffer":
|
||||
return JsonSerializer.Deserialize<RemoveOfferRequestData>(jsonText, options);
|
||||
case "RagFairRenewOffer":
|
||||
return JsonSerializer.Deserialize<ExtendOfferRequestData>(jsonText, options);
|
||||
case "QuestAccept":
|
||||
return JsonSerializer.Deserialize<AcceptQuestRequestData>(jsonText, options);
|
||||
case "QuestComplete":
|
||||
return JsonSerializer.Deserialize<CompleteQuestRequestData>(jsonText, options);
|
||||
case "QuestHandover":
|
||||
return JsonSerializer.Deserialize<HandoverQuestRequestData>(jsonText, options);
|
||||
case "RepeatableQuestChange":
|
||||
return JsonSerializer.Deserialize<RepeatableQuestChangeRequest>(jsonText, options);
|
||||
case "AddNote":
|
||||
case "EditNote":
|
||||
case "DeleteNote":
|
||||
return JsonSerializer.Deserialize<NoteActionData>(jsonText, options);
|
||||
case ItemEventActions.MOVE:
|
||||
return JsonSerializer.Deserialize<InventoryMoveRequestData>(jsonText, options);
|
||||
case ItemEventActions.REMOVE:
|
||||
return JsonSerializer.Deserialize<InventoryRemoveRequestData>(jsonText, options);
|
||||
case ItemEventActions.SPLIT:
|
||||
return JsonSerializer.Deserialize<InventorySplitRequestData>(jsonText, options);
|
||||
case ItemEventActions.MERGE:
|
||||
return JsonSerializer.Deserialize<InventoryMergeRequestData>(jsonText, options);
|
||||
case ItemEventActions.TRANSFER:
|
||||
return JsonSerializer.Deserialize<InventoryTransferRequestData>(jsonText, options);
|
||||
case ItemEventActions.SWAP:
|
||||
return JsonSerializer.Deserialize<InventorySwapRequestData>(jsonText, options);
|
||||
case ItemEventActions.FOLD:
|
||||
return JsonSerializer.Deserialize<InventoryFoldRequestData>(jsonText, options);
|
||||
case ItemEventActions.TOGGLE:
|
||||
return JsonSerializer.Deserialize<InventoryToggleRequestData>(jsonText, options);
|
||||
case ItemEventActions.TAG:
|
||||
return JsonSerializer.Deserialize<InventoryTagRequestData>(jsonText, options);
|
||||
case ItemEventActions.BIND:
|
||||
return JsonSerializer.Deserialize<InventoryBindRequestData>(jsonText, options);
|
||||
case ItemEventActions.UNBIND:
|
||||
return JsonSerializer.Deserialize<InventoryBindRequestData>(jsonText, options);
|
||||
case ItemEventActions.EXAMINE:
|
||||
return JsonSerializer.Deserialize<InventoryExamineRequestData>(jsonText, options);
|
||||
case ItemEventActions.READ_ENCYCLOPEDIA:
|
||||
return JsonSerializer.Deserialize<InventoryReadEncyclopediaRequestData>(jsonText, options);
|
||||
case ItemEventActions.APPLY_INVENTORY_CHANGES:
|
||||
return JsonSerializer.Deserialize<InventorySortRequestData>(jsonText, options);
|
||||
case ItemEventActions.CREATE_MAP_MARKER:
|
||||
return JsonSerializer.Deserialize<InventoryCreateMarkerRequestData>(jsonText, options);
|
||||
case ItemEventActions.DELETE_MAP_MARKER:
|
||||
return JsonSerializer.Deserialize<InventoryDeleteMarkerRequestData>(jsonText, options);
|
||||
case ItemEventActions.EDIT_MAP_MARKER:
|
||||
return JsonSerializer.Deserialize<InventoryEditMarkerRequestData>(jsonText, options);
|
||||
case ItemEventActions.OPEN_RANDOM_LOOT_CONTAINER:
|
||||
return JsonSerializer.Deserialize<OpenRandomLootContainerRequestData>(jsonText, options);
|
||||
case ItemEventActions.HIDEOUT_QTE_EVENT:
|
||||
return JsonSerializer.Deserialize<HandleQTEEventRequestData>(jsonText, options);
|
||||
case ItemEventActions.REDEEM_PROFILE_REWARD:
|
||||
return JsonSerializer.Deserialize<RedeemProfileRequestData>(jsonText, options);
|
||||
case ItemEventActions.SET_FAVORITE_ITEMS:
|
||||
return JsonSerializer.Deserialize<SetFavoriteItems>(jsonText, options);
|
||||
case ItemEventActions.QUEST_FAIL:
|
||||
return JsonSerializer.Deserialize<FailQuestRequestData>(jsonText, options);
|
||||
case ItemEventActions.PIN_LOCK:
|
||||
return JsonSerializer.Deserialize<PinOrLockItemRequest>(jsonText, options);
|
||||
default:
|
||||
// bitch
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user