From 96b92a637311a0e7dfcd0c2eddddfe31e7736d3b Mon Sep 17 00:00:00 2001 From: ashakoor <60638768+ashakoor@users.noreply.github.com> Date: Fri, 15 Oct 2021 23:41:47 -0400 Subject: [PATCH] API update v2.12.2 --- .github/workflows/main.yml | 4 +- .../Entities.Destiny.Entities.Characters.cs | 7 ++ .../Entities.Destiny.Entities.Items.cs | 24 ++-- BungieSharper.Entities/Entities.cs | 111 ++++++++++-------- 4 files changed, 81 insertions(+), 65 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 567abab..c3114ab 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,8 +1,8 @@ -name: Main pull request/push +name: Main PR/push + stable push on: push: - branches: [ main ] + branches: [ main, stable ] pull_request: branches: [ main ] diff --git a/BungieSharper.Entities/Destiny/Entities.Destiny.Entities.Characters.cs b/BungieSharper.Entities/Destiny/Entities.Destiny.Entities.Characters.cs index 061a783..dd852ab 100644 --- a/BungieSharper.Entities/Destiny/Entities.Destiny.Entities.Characters.cs +++ b/BungieSharper.Entities/Destiny/Entities.Destiny.Entities.Characters.cs @@ -146,6 +146,13 @@ public class DestinyCharacterProgressionComponent [JsonPropertyName("uninstancedItemObjectives")] public Dictionary> UninstancedItemObjectives { get; set; } + /// + /// Sometimes, you have items in your inventory that don't have instances, but still have perks (for example: Trials passage cards). This gives you the perk information for uninstanced items. + /// This dictionary is keyed by item hash, which you can use to look up the corresponding item definition. The value is the list of perks states for the item. + /// + [JsonPropertyName("uninstancedItemPerks")] + public Dictionary UninstancedItemPerks { get; set; } + /// /// The set of checklists that can be examined for this specific character, keyed by the hash identifier of the Checklist (DestinyChecklistDefinition) /// For each checklist returned, its value is itself a Dictionary keyed by the checklist's hash identifier with the value being a boolean indicating if it's been discovered yet. diff --git a/BungieSharper.Entities/Destiny/Entities.Destiny.Entities.Items.cs b/BungieSharper.Entities/Destiny/Entities.Destiny.Entities.Items.cs index e491514..b69f483 100644 --- a/BungieSharper.Entities/Destiny/Entities.Destiny.Entities.Items.cs +++ b/BungieSharper.Entities/Destiny/Entities.Destiny.Entities.Items.cs @@ -89,6 +89,18 @@ public class DestinyItemComponent public IEnumerable ItemValueVisibility { get; set; } } + /// + /// Instanced items can have perks: benefits that the item bestows. + /// These are related to DestinySandboxPerkDefinition, and sometimes - but not always - have human readable info. When they do, they are the icons and text that you see in an item's tooltip. + /// Talent Grids, Sockets, and the item itself can apply Perks, which are then summarized here for your convenience. + /// + public class DestinyItemPerksComponent + { + /// The list of perks to display in an item tooltip - and whether or not they have been activated. + [JsonPropertyName("perks")] + public IEnumerable Perks { get; set; } + } + /// /// Items can have objectives and progression. When you request this block, you will obtain information about any Objectives and progression tied to this item. /// @@ -200,18 +212,6 @@ public class DestinyItemInstanceEnergy public int EnergyUnused { get; set; } } - /// - /// Instanced items can have perks: benefits that the item bestows. - /// These are related to DestinySandboxPerkDefinition, and sometimes - but not always - have human readable info. When they do, they are the icons and text that you see in an item's tooltip. - /// Talent Grids, Sockets, and the item itself can apply Perks, which are then summarized here for your convenience. - /// - public class DestinyItemPerksComponent - { - /// The list of perks to display in an item tooltip - and whether or not they have been activated. - [JsonPropertyName("perks")] - public IEnumerable Perks { get; set; } - } - /// /// Many items can be rendered in 3D. When you request this block, you will obtain the custom data needed to render this specific instance of the item. /// diff --git a/BungieSharper.Entities/Entities.cs b/BungieSharper.Entities/Entities.cs index 3ec81ef..364b626 100644 --- a/BungieSharper.Entities/Entities.cs +++ b/BungieSharper.Entities/Entities.cs @@ -541,6 +541,9 @@ public class DestinyBaseItemComponentSetOfuint32 { [JsonPropertyName("objectives")] public DictionaryComponentResponseOfuint32AndDestinyItemObjectivesComponent Objectives { get; set; } + + [JsonPropertyName("perks")] + public DictionaryComponentResponseOfuint32AndDestinyItemPerksComponent Perks { get; set; } } public class DictionaryComponentResponseOfuint32AndDestinyItemObjectivesComponent @@ -557,6 +560,20 @@ public class DictionaryComponentResponseOfuint32AndDestinyItemObjectivesComponen public bool? Disabled { get; set; } } + public class DictionaryComponentResponseOfuint32AndDestinyItemPerksComponent + { + [JsonPropertyName("data")] + public Dictionary Data { get; set; } + + [JsonPropertyName("privacy")] + public Components.ComponentPrivacySetting Privacy { get; set; } + + /// If true, this component is disabled. + [JsonPropertyName("disabled")] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + public bool? Disabled { get; set; } + } + public class DictionaryComponentResponseOfint64AndDestinyPresentationNodesComponent { [JsonPropertyName("data")] @@ -617,6 +634,9 @@ public class DestinyBaseItemComponentSetOfint64 { [JsonPropertyName("objectives")] public DictionaryComponentResponseOfint64AndDestinyItemObjectivesComponent Objectives { get; set; } + + [JsonPropertyName("perks")] + public DictionaryComponentResponseOfint64AndDestinyItemPerksComponent Perks { get; set; } } public class DictionaryComponentResponseOfint64AndDestinyItemObjectivesComponent @@ -633,14 +653,25 @@ public class DictionaryComponentResponseOfint64AndDestinyItemObjectivesComponent public bool? Disabled { get; set; } } + public class DictionaryComponentResponseOfint64AndDestinyItemPerksComponent + { + [JsonPropertyName("data")] + public Dictionary Data { get; set; } + + [JsonPropertyName("privacy")] + public Components.ComponentPrivacySetting Privacy { get; set; } + + /// If true, this component is disabled. + [JsonPropertyName("disabled")] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + public bool? Disabled { get; set; } + } + public class DestinyItemComponentSetOfint64 { [JsonPropertyName("instances")] public DictionaryComponentResponseOfint64AndDestinyItemInstanceComponent Instances { get; set; } - [JsonPropertyName("perks")] - public DictionaryComponentResponseOfint64AndDestinyItemPerksComponent Perks { get; set; } - [JsonPropertyName("renderData")] public DictionaryComponentResponseOfint64AndDestinyItemRenderComponent RenderData { get; set; } @@ -664,6 +695,9 @@ public class DestinyItemComponentSetOfint64 [JsonPropertyName("objectives")] public DictionaryComponentResponseOfint64AndDestinyItemObjectivesComponent Objectives { get; set; } + + [JsonPropertyName("perks")] + public DictionaryComponentResponseOfint64AndDestinyItemPerksComponent Perks { get; set; } } public class DictionaryComponentResponseOfint64AndDestinyItemInstanceComponent @@ -680,20 +714,6 @@ public class DictionaryComponentResponseOfint64AndDestinyItemInstanceComponent public bool? Disabled { get; set; } } - public class DictionaryComponentResponseOfint64AndDestinyItemPerksComponent - { - [JsonPropertyName("data")] - public Dictionary Data { get; set; } - - [JsonPropertyName("privacy")] - public Components.ComponentPrivacySetting Privacy { get; set; } - - /// If true, this component is disabled. - [JsonPropertyName("disabled")] - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - public bool? Disabled { get; set; } - } - public class DictionaryComponentResponseOfint64AndDestinyItemRenderComponent { [JsonPropertyName("data")] @@ -1110,6 +1130,9 @@ public class DestinyBaseItemComponentSetOfint32 { [JsonPropertyName("objectives")] public DictionaryComponentResponseOfint32AndDestinyItemObjectivesComponent Objectives { get; set; } + + [JsonPropertyName("perks")] + public DictionaryComponentResponseOfint32AndDestinyItemPerksComponent Perks { get; set; } } public class DictionaryComponentResponseOfint32AndDestinyItemObjectivesComponent @@ -1126,14 +1149,25 @@ public class DictionaryComponentResponseOfint32AndDestinyItemObjectivesComponent public bool? Disabled { get; set; } } + public class DictionaryComponentResponseOfint32AndDestinyItemPerksComponent + { + [JsonPropertyName("data")] + public Dictionary Data { get; set; } + + [JsonPropertyName("privacy")] + public Components.ComponentPrivacySetting Privacy { get; set; } + + /// If true, this component is disabled. + [JsonPropertyName("disabled")] + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] + public bool? Disabled { get; set; } + } + public class DestinyItemComponentSetOfint32 { [JsonPropertyName("instances")] public DictionaryComponentResponseOfint32AndDestinyItemInstanceComponent Instances { get; set; } - [JsonPropertyName("perks")] - public DictionaryComponentResponseOfint32AndDestinyItemPerksComponent Perks { get; set; } - [JsonPropertyName("renderData")] public DictionaryComponentResponseOfint32AndDestinyItemRenderComponent RenderData { get; set; } @@ -1157,6 +1191,9 @@ public class DestinyItemComponentSetOfint32 [JsonPropertyName("objectives")] public DictionaryComponentResponseOfint32AndDestinyItemObjectivesComponent Objectives { get; set; } + + [JsonPropertyName("perks")] + public DictionaryComponentResponseOfint32AndDestinyItemPerksComponent Perks { get; set; } } public class DictionaryComponentResponseOfint32AndDestinyItemInstanceComponent @@ -1173,20 +1210,6 @@ public class DictionaryComponentResponseOfint32AndDestinyItemInstanceComponent public bool? Disabled { get; set; } } - public class DictionaryComponentResponseOfint32AndDestinyItemPerksComponent - { - [JsonPropertyName("data")] - public Dictionary Data { get; set; } - - [JsonPropertyName("privacy")] - public Components.ComponentPrivacySetting Privacy { get; set; } - - /// If true, this component is disabled. - [JsonPropertyName("disabled")] - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - public bool? Disabled { get; set; } - } - public class DictionaryComponentResponseOfint32AndDestinyItemRenderComponent { [JsonPropertyName("data")] @@ -1352,9 +1375,6 @@ public class DestinyItemComponentSetOfuint32 [JsonPropertyName("instances")] public DictionaryComponentResponseOfuint32AndDestinyItemInstanceComponent Instances { get; set; } - [JsonPropertyName("perks")] - public DictionaryComponentResponseOfuint32AndDestinyItemPerksComponent Perks { get; set; } - [JsonPropertyName("renderData")] public DictionaryComponentResponseOfuint32AndDestinyItemRenderComponent RenderData { get; set; } @@ -1378,6 +1398,9 @@ public class DestinyItemComponentSetOfuint32 [JsonPropertyName("objectives")] public DictionaryComponentResponseOfuint32AndDestinyItemObjectivesComponent Objectives { get; set; } + + [JsonPropertyName("perks")] + public DictionaryComponentResponseOfuint32AndDestinyItemPerksComponent Perks { get; set; } } public class DictionaryComponentResponseOfuint32AndDestinyItemInstanceComponent @@ -1394,20 +1417,6 @@ public class DictionaryComponentResponseOfuint32AndDestinyItemInstanceComponent public bool? Disabled { get; set; } } - public class DictionaryComponentResponseOfuint32AndDestinyItemPerksComponent - { - [JsonPropertyName("data")] - public Dictionary Data { get; set; } - - [JsonPropertyName("privacy")] - public Components.ComponentPrivacySetting Privacy { get; set; } - - /// If true, this component is disabled. - [JsonPropertyName("disabled")] - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - public bool? Disabled { get; set; } - } - public class DictionaryComponentResponseOfuint32AndDestinyItemRenderComponent { [JsonPropertyName("data")]