예제 #1
0
            private static IReadOnlyList <NwRace> LoadRaces(CNWRaceArray raceArray, int count)
            {
                NwRace[] retVal = new NwRace[count];
                for (int i = 0; i < retVal.Length; i++)
                {
                    retVal[i] = new NwRace((ushort)i, raceArray.GetItem(i));
                }

                return(retVal);
            }
예제 #2
0
            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);
            }