diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c29ad6f6..1da123635 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## 8193.34.15 +https://github.com/nwn-dotnet/Anvil/compare/v8193.34.14...v8193.34.15 + +### Added +- ItemProperty: Added `SubTypeTable`. + +### Fixed +- Fixed `CalculateValidItemsForProperty` returning false for base items using column 0. + ## 8193.34.14 https://github.com/nwn-dotnet/Anvil/compare/v8193.34.13...v8193.34.14 diff --git a/NWN.Anvil/src/main/API/EngineStructure/ItemProperty.cs b/NWN.Anvil/src/main/API/EngineStructure/ItemProperty.cs index 72a39396c..a91002b8b 100644 --- a/NWN.Anvil/src/main/API/EngineStructure/ItemProperty.cs +++ b/NWN.Anvil/src/main/API/EngineStructure/ItemProperty.cs @@ -103,6 +103,11 @@ public ItemPropertyParamTableEntry? Param1TableValue /// public TimeSpan RemainingDuration => TimeSpan.FromSeconds(NWScript.GetItemPropertyDurationRemaining(this)); + /// + /// Gets the sub type table used by this item property. + /// + public TwoDimArray? SubTypeTable => Property.SubTypeTable; + /// /// Gets or sets the sub type that is set on this item property. /// diff --git a/NWN.Anvil/src/main/API/TwoDimArray/Tables/ItemPropertyItemMapTableEntry.cs b/NWN.Anvil/src/main/API/TwoDimArray/Tables/ItemPropertyItemMapTableEntry.cs index ef2e14dfd..3789a4331 100644 --- a/NWN.Anvil/src/main/API/TwoDimArray/Tables/ItemPropertyItemMapTableEntry.cs +++ b/NWN.Anvil/src/main/API/TwoDimArray/Tables/ItemPropertyItemMapTableEntry.cs @@ -64,7 +64,7 @@ private IReadOnlyDictionary CalculateValidItemsForProperty(Two Dictionary retVal = new Dictionary(); foreach (NwBaseItem item in NwRuleset.BaseItems) { - if (item.ItemPropertyColumnId > 0 && item.ItemPropertyColumnId < isValid.Length) + if (item.ItemPropertyColumnId < isValid.Length) { retVal[item] = isValid[item.ItemPropertyColumnId]; }