Пример #1
0
        void AssignRace()
        {
            // Try to get the race from the current faction
            race = RaceTemplate.GetRaceFromFactionRace((FactionFile.FactionRaces)factionData.race);
            if (race == Races.None)
            {
                // Otherwise use race of current region
                race = GameManager.Instance.PlayerGPS.GetRaceOfCurrentRegion();
            }

            nameBank = GameManager.Instance.PlayerGPS.GetNameBankOfCurrentRegion();
        }
Пример #2
0
        /// <summary>
        /// Return the race corresponding to a given faction ID.
        /// </summary>
        /// <param name="factionId"></param>
        /// <returns>The faction race if available, otherwise the race of the current region.</returns>
        public static Races GetRaceFromFaction(int factionId)
        {
            if (factionId != 0)
            {
                FactionFile.FactionData fd;
                GameManager.Instance.PlayerEntity.FactionData.GetFactionData(factionId, out fd);
                Races race = RaceTemplate.GetRaceFromFactionRace((FactionFile.FactionRaces)fd.race);
                if (race != Races.None)
                {
                    return(race);
                }
            }

            return(GameManager.Instance.PlayerGPS.GetRaceOfCurrentRegion());
        }
Пример #3
0
        void AssignRace()
        {
            // Use faction race only for individuals
            if (isIndividualNPC)
            {
                race = RaceTemplate.GetRaceFromFactionRace((FactionFile.FactionRaces)factionData.race);
                if (race != Races.None)
                {
                    return;
                }
            }

            // Otherwise use race of current region
            race     = GameManager.Instance.PlayerGPS.GetRaceOfCurrentRegion();
            nameBank = GameManager.Instance.PlayerGPS.GetNameBankOfCurrentRegion();
        }