Example #1
0
        private void NpcDialog_AnswerListChanged(object s, Dictionary <int, string> options)
        {
            SimpleChar dialogNpc = DynelManager.GetDynel((Identity)s).Cast <SimpleChar>();

            if (dialogNpc.Name == Constants.QuestGiverName)
            {
                foreach (KeyValuePair <int, string> option in options)
                {
                    if (option.Value == "Is there anything I can help you with?" ||
                        (ActiveGlobalSettings.MissionFaction == MissionFaction.Clan && option.Value == "I will defend against the Unredeemed!") ||
                        (ActiveGlobalSettings.MissionFaction == MissionFaction.Omni && option.Value == "I will defend against the Redeemed!") ||
                        (ActiveGlobalSettings.MissionFaction == MissionFaction.Neut && option.Value == "I will defend against the creatures of the brink!") ||
                        (ActiveGlobalSettings.MissionDifficulty == MissionDifficulty.Easy && option.Value == "I will deal with only the weakest aversaries") || //Brink missions have a typo
                        (ActiveGlobalSettings.MissionDifficulty == MissionDifficulty.Easy && option.Value == "I will deal with only the weakest adversaries") ||
                        (ActiveGlobalSettings.MissionDifficulty == MissionDifficulty.Medium && option.Value == "I will challenge these invaders, as long as there aren't too many") ||
                        (ActiveGlobalSettings.MissionDifficulty == MissionDifficulty.Hard && option.Value == "I will purge the temple of any and all assailants"))
                    {
                        NpcDialog.SelectAnswer(dialogNpc.Identity, option.Key);
                    }
                }
            }
            else if (dialogNpc.Name == Constants.QuestStarterName)
            {
                foreach (KeyValuePair <int, string> option in options)
                {
                    if (option.Value == "Yes, I am ready.")
                    {
                        NpcDialog.SelectAnswer(dialogNpc.Identity, option.Key);
                    }
                }
            }
        }