Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
jhett12321 committed Aug 13, 2022
2 parents 05ee5f7 + 70d98ab commit 6947349
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions NWN.Anvil/src/main/API/EngineStructure/ItemProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ public ItemPropertyParamTableEntry? Param1TableValue
/// </summary>
public TimeSpan RemainingDuration => TimeSpan.FromSeconds(NWScript.GetItemPropertyDurationRemaining(this));

/// <summary>
/// Gets the sub type table used by this item property.
/// </summary>
public TwoDimArray<ItemPropertySubTypeTableEntry>? SubTypeTable => Property.SubTypeTable;

/// <summary>
/// Gets or sets the sub type that is set on this item property.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private IReadOnlyDictionary<NwBaseItem, bool> CalculateValidItemsForProperty(Two
Dictionary<NwBaseItem, bool> retVal = new Dictionary<NwBaseItem, bool>();
foreach (NwBaseItem item in NwRuleset.BaseItems)
{
if (item.ItemPropertyColumnId > 0 && item.ItemPropertyColumnId < isValid.Length)
if (item.ItemPropertyColumnId < isValid.Length)
{
retVal[item] = isValid[item.ItemPropertyColumnId];
}
Expand Down

0 comments on commit 6947349

Please sign in to comment.