Exemplo n.º 1
0
        static private void FixFactsWithBindClass()
        {
            List <BlueprintUnitFact> facts = new List <BlueprintUnitFact>();

            Main.logger.Log("RUA 0");
            foreach (string id in config.FactWithBindClass)
            {
                facts.Add(library.Get <BlueprintUnitFact>(id));
            }
            Main.logger.Log("RUA 1");
            facts.AddRange(draconicBreathFeatures);
            facts.AddRange(elementalBlastFeatures);
            Main.logger.Log("RUA 2");
            foreach (var fact in facts)
            {
                Main.logger.Log($"Fixing Fact {fact.name}, ID {fact.AssetGuid}");
                BindAbilitiesToClass comp = fact.GetComponent <BindAbilitiesToClass>();
                if (comp == null)
                {
                    Main.logger.Log("Bind Abl to class comp is NULL !");
                }
                if (comp.AdditionalClasses == null)
                {
                    Main.logger.Log("Comp.additionalClasses is NULL !");
                }
                if (comp.Archetypes == null)
                {
                    Main.logger.Log("Comp.Archetypes is NULL !");
                }
                HelpersNeu.Add <BlueprintCharacterClass>(ref comp.AdditionalClasses, ArcanistClass.arcanist);
                HelpersNeu.Add <BlueprintArchetype>(ref comp.Archetypes, archetype);
            }
        }
Exemplo n.º 2
0
 static bool Prefix(BindAbilitiesToClass __instance)
 {
     ReplaceCasterLevelOfAbility_CalculateClassLevel_Patch.currentFact = __instance.Fact;
     return(true);
 }