private AbilityData getAbilityForUse(UnitDescriptor unit) { Kingmaker.UnitLogic.Abilities.Ability ab = unit.Abilities.GetAbility(ability); if (ab == null) { return((AbilityData)null); } return(this.CreateAbilityData(unit, ab, null)); }
private AbilityData CreateAbilityData( UnitDescriptor caster, Kingmaker.UnitLogic.Abilities.Ability fact, BlueprintSpellbook spellbook) { AbilityData ad = new AbilityData(ability, caster, fact, spellbook); if (variant == null) { return(ad); } return(new AbilityData(variant, caster, fact, spellbook) { ConvertedFrom = ad }); }