コード例 #1
0
ファイル: NwFaction.cs プロジェクト: nwn-dotnet/Anvil
        /// <summary>
        /// Resolves a <see cref="NwFaction"/> from a faction id.
        /// </summary>
        /// <param name="factionId">The id of the faction to resolve.</param>
        /// <returns>The associated <see cref="NwFaction"/> instance. Null if the faction id is invalid.</returns>
        public static NwFaction?FromFactionId(int factionId)
        {
            CNWSFaction faction = FactionManager.GetFaction(factionId);

            return(faction != null ? new NwFaction(faction) : null);
        }
コード例 #2
0
ファイル: NwFaction.cs プロジェクト: nwn-dotnet/Anvil
 internal NwFaction(CNWSFaction faction)
 {
     this.faction = faction;
 }