public static void OnNamingHeroOverPostfix(ClanLordItemVM __instance, string suggestedName)
 {
     if (!CampaignUIHelper.IsStringApplicableForHeroName(suggestedName))
     {
         return;
     }
     __instance.GetHero().FirstName = __instance.GetHero().Name;
 }
示例#2
0
        public static void OnNamingHeroOverPostfix(ClanLordItemVM __instance, string suggestedName)
        {
            if (!CampaignUIHelper.IsStringApplicableForHeroName(suggestedName))
            {
                return;
            }
            Hero selectedHero = __instance.GetHero();

            selectedHero.FirstName = selectedHero.Name;
            if (selectedHero.IsPartyLeader)
            {
                selectedHero.PartyBelongedTo.Name = MobilePartyHelper.GeneratePartyName(selectedHero.CharacterObject);
            }
        }
示例#3
0
        public static void OnNamingHeroOverPostfix(ClanLordItemVM __instance, string suggestedName)
        {
            if (!CampaignUIHelper.IsStringApplicableForHeroName(suggestedName))
            {
                return;
            }
            Hero selectedHero = __instance.GetHero();

            selectedHero.FirstName = selectedHero.Name;
            if (selectedHero.IsPartyLeader)
            {
                ReflectUtils.ReflectMethodAndInvoke("Name", selectedHero.PartyBelongedTo, new object[] { selectedHero.CharacterObject.GetName() });
            }
        }
 public static void Postfix(ClanLordItemVM __instance, Hero ____hero)
 {
     __instance.IsChild = ____hero.Age < 3; // seriously TaleWorlds don't you think a picture of a baby is weird for a 3+ year old?
 }