Пример #1
0
            // Oaths are declared by NPC race according to the race index used in FACTION.TXT.
            // Unfortunately, classic never uses this faction race ID but, instead, uses the
            // hardcoded index race of each region, which is not the same. In classic, this
            // results in all NPCs from High Rock saying Nord oaths, while all NPCs in Hammerfell
            // will say Khajiit oaths.
            // Instead, DFU uses the faction race ID to return the correct oath.
            // For the list of oaths, see https://www.imperial-library.info/content/daggerfall-oaths-and-expletives
            public override string Oath()
            {
                // Get the questor race to find the correct oath
                Races race = Races.None;

                Symbol[] questors = parent.GetQuestors();
                if (questors.Length > 0)
                {
                    race = parent.GetPerson(questors[0]).Race;
                }
                else if (QuestMachine.Instance.LastNPCClicked != null)
                {
                    // %oth is used in some of the main quests before the questor is actually set. In this
                    // case try to use the data from the last clicked NPC, which should be the questor.
                    race = QuestMachine.Instance.LastNPCClicked.Data.race;
                }

                // Fallback to race of current region
                if (race == Races.None)
                {
                    race = GameManager.Instance.PlayerGPS.GetRaceOfCurrentRegion();
                }

                int oathId = (int)RaceTemplate.GetFactionRaceFromRace(race);

                return(DaggerfallUnity.Instance.TextProvider.GetRandomText(201 + oathId));
            }
Пример #2
0
            // Oaths are declared by NPC race according to the race index used in FACTION.TXT.
            // Unfortunately, classic never uses this faction race ID but, instead, uses the
            // hardcoded index race of each region, which is not the same. In classic, this
            // results in all NPCs from High Rock saying Nord oaths, while all NPCs in Hammerfell
            // will say Khajiit oaths.
            // Instead, DFU uses the faction race ID to return the correct oath.
            // For the list of oaths, see https://www.imperial-library.info/content/daggerfall-oaths-and-expletives
            public override string Oath()
            {
                // Get NPC race with fallback to race of current region
                Races race = parent.npcRace;

                if (race == Races.None)
                {
                    race = GameManager.Instance.PlayerGPS.GetRaceOfCurrentRegion();
                }

                int oathId = (int)RaceTemplate.GetFactionRaceFromRace(race);

                return(DaggerfallUnity.Instance.TextProvider.GetRandomText(201 + oathId));
            }
Пример #3
0
            // Oaths are declared by NPC race according to the race index used in FACTION.TXT.
            // Unfortunately, classic never uses this faction race ID but, instead, uses the
            // hardcoded index race of each region, which is not the same. In classic, this
            // results in all NPCs from High Rock saying Nord oaths, while all NPCs in Hammerfell
            // will say Khajiit oaths.
            // Instead, DFU uses the faction race ID to return the correct oath.
            // For the list of oaths, see https://www.imperial-library.info/content/daggerfall-oaths-and-expletives
            public override string Oath()
            {
                // Get the questor race to find the correct oath
                Races race = Races.None;

                Symbol[] questors = parent.GetQuestors();
                if (questors.Length > 0)
                {
                    race = parent.GetPerson(questors[0]).Race;
                }

                int oathId = (int)RaceTemplate.GetFactionRaceFromRace(race);

                return(DaggerfallUnity.Instance.TextProvider.GetRandomText(201 + oathId));
            }
            // Oaths are declared by NPC race according to the race index used in FACTION.TXT.
            // Unfortunately, classic never uses this faction race ID but, instead, uses the
            // hardcoded index race of each region, which is not the same. In classic, this
            // results in all NPCs from High Rock saying Nord oaths, while all NPCs in Hammerfell
            // will say Khajiit oaths.
            // Instead, DFU uses the faction race ID to return the correct oath.
            // For the list of oaths, see https://www.imperial-library.info/content/daggerfall-oaths-and-expletives
            public override string Oath()
            {
                int oathId = (int)RaceTemplate.GetFactionRaceFromRace(parent.npcRace);

                return(DaggerfallUnity.Instance.TextProvider.GetRandomText(201 + oathId));
            }