public void SetSpellData(int spellEnumOrg, int spellClassCode, int spellSlotLevel, int itemSpellData = -1, MetaMagicData metaMagicData = default, SpontCastType spontCastType = default) { this.metaMagicData = metaMagicData; this.spellEnumOrg = spellEnumOrg; this.spellClassCode = spellClassCode; this.itemSpellData = itemSpellData; this.spontCastType = spontCastType; this.spellSlotLevel = spellSlotLevel; }
public static bool TryGet(SpontCastType type, int spellLevel, out int spellEnum) { spellEnum = -1; switch (type) { case SpontCastType.None: return(false); case SpontCastType.GoodCleric: if (spellLevel < GoodCleric.Length) { spellEnum = GoodCleric[spellLevel]; } return(spellEnum != -1); case SpontCastType.EvilCleric: if (spellLevel < EvilCleric.Length) { spellEnum = EvilCleric[spellLevel]; } return(spellEnum != -1); case SpontCastType.Druid: if (spellLevel < Druid.Length) { spellEnum = Druid[spellLevel]; } return(spellEnum != -1); default: throw new ArgumentOutOfRangeException(nameof(type), type, null); } }
public D20SpellData(int spellEnumOrg, int spellClassCode, int spellSlotLevel, int itemSpellData = -1, MetaMagicData metaMagicData = default, SpontCastType spontCastType = default) { SetSpellData(spellEnumOrg, spellClassCode, spellSlotLevel, itemSpellData, metaMagicData, spontCastType); }