Skip to content

Commit

Permalink
Define EffectBase.Spell as nullable (#773)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakkn authored Aug 10, 2024
1 parent 46d13f1 commit 40eb250
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions NWN.Anvil/src/main/API/EngineStructures/EffectBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ public bool ShowIcon
/// <summary>
/// Gets or sets the associated spell for this effect/item property.
/// </summary>
public NwSpell Spell
public NwSpell? Spell
{
get => NwSpell.FromSpellId(Effect.m_nSpellId.AsInt())!;
set => Effect.m_nSpellId = value.Id.AsUInt();
get => NwSpell.FromSpellId(Effect.m_nSpellId.AsInt());
set => Effect.m_nSpellId = value?.Id.AsUInt() ?? 0xFFFFFFFF;
}

/// <summary>
Expand Down

0 comments on commit 40eb250

Please sign in to comment.