コード例 #1
0
 private void Hero_ModifyLocalActiveHeroes(On.Hero.orig_ModifyLocalActiveHeroes orig, bool add, Hero hero)
 {
     // This should be called every time a hero is given/taken
     orig(add, hero);
     if (mod.settings.Enabled)
     {
         if ((mod.settings as CustomHeroTestSettings).ReplaceHero && (mod.settings as CustomHeroTestSettings).HeroToReplace == hero.LocalizedName)
         {
             // We are matching Heroes! Start to change data!
             SetHeroStats(hero);
             //self.HealthCpnt.SetHealth((float)Convert.ToDouble(mod.Values["Hero HP"]));
         }
         SetHeroRankName(hero);
     }
 }
コード例 #2
0
 private void Hero_ModifyLocalActiveHeroes(On.Hero.orig_ModifyLocalActiveHeroes orig, bool add, Hero hero)
 {
     Log("Attempting to add?: " + add + " hero: " + hero.LocalizedName + " to localActiveHeroes!");
     orig(add, hero);
 }