private static IReadOnlyList <NwFeat> LoadFeats(CNWFeatArray featArray, int count) { NwFeat[] retVal = new NwFeat[count]; for (int i = 0; i < retVal.Length; i++) { retVal[i] = new NwFeat((ushort)i, featArray.GetItem(i)); } return(retVal); }
private static void LoadRules() { CNWRules rules = NWNXLib.Rules(); Races = LoadRaces(CNWRaceArray.FromPointer(rules.m_lstRaces), rules.m_nNumRaces); Classes = LoadClasses(CNWClassArray.FromPointer(rules.m_lstClasses), rules.m_nNumClasses); Skills = LoadSkills(CNWSkillArray.FromPointer(rules.m_lstSkills), rules.m_nNumSkills); Feats = LoadFeats(CNWFeatArray.FromPointer(rules.m_lstFeats), rules.m_nNumFeats); BaseItems = LoadBaseItems(rules.m_pBaseItemArray); Spells = LoadSpells(rules.m_pSpellArray); }