示例#1
0
        // Token: 0x06003190 RID: 12688 RVA: 0x000C25D8 File Offset: 0x000C07D8
        public static BattleHero HeroToBattleHero(Hero hero)
        {
            BattleHero battleHero = new BattleHero();

            battleHero.HeroId              = hero.HeroId;
            battleHero.ActionValue         = hero.ActionValue;
            battleHero.ActionPositionIndex = hero.ActionPositionIndex;
            battleHero.Level             = hero.Level;
            battleHero.StarLevel         = hero.StarLevel;
            battleHero.SelectedSoldierId = hero.SelectedSoldierId;
            battleHero.SelectedSkillList.AddRange(hero.SelectedSkills);
            battleHero.ActiveHeroJobRelatedId = hero.ActiveHeroJobRelatedId;
            battleHero.Power = hero.BattlePower;
            HeroJob heroJob = hero.Jobs.Find((HeroJob m) => m.JobRelatedId == hero.ActiveHeroJobRelatedId);

            battleHero.ModelSkinId           = heroJob.ModelSkinId;
            battleHero.CharSkinId            = hero.CharSkinId;
            battleHero.SelectedSoldierSkinId = hero.GetSoldierSkinId(hero.SelectedSoldierId);
            foreach (HeroJob heroJob2 in hero.Jobs)
            {
                battleHero.Jobs.Add(BattleHeroJob.HeroJobToBattleHeroJob(heroJob2));
            }
            foreach (KeyValuePair <int, int> keyValuePair in hero.Fetters)
            {
                battleHero.Fetters.Add(keyValuePair.Key, keyValuePair.Value);
            }
            return(battleHero);
        }
示例#2
0
 // Token: 0x06004B56 RID: 19286 RVA: 0x0017626C File Offset: 0x0017446C
 public void AddHeroJobAchievements(HeroJob heroJob, List <int> achievements)
 {
     foreach (int item in achievements)
     {
         heroJob.Achievements.Add(item);
     }
 }
示例#3
0
 // Token: 0x060031B0 RID: 12720 RVA: 0x000C3650 File Offset: 0x000C1850
 public static BattleHeroJob HeroJobToBattleHeroJob(HeroJob heroJob)
 {
     return(new BattleHeroJob
     {
         JobRelatedId = heroJob.JobRelatedId,
         JobLevel = heroJob.JobLevel
     });
 }
示例#4
0
        // Token: 0x06004B53 RID: 19283 RVA: 0x001761EC File Offset: 0x001743EC
        public void AddHeroJob(Hero hero, int jobRelatedId)
        {
            HeroJob heroJob = new HeroJob();

            heroJob.JobRelatedId = jobRelatedId;
            heroJob.JobLevel     = 0;
            hero.Jobs.Add(heroJob);
            this.SetHeroDirty(hero);
        }
示例#5
0
        // Token: 0x06003C3D RID: 15421 RVA: 0x00111B20 File Offset: 0x0010FD20
        public static ProHeroJob HeroJobToPBHeroJob(HeroJob heroJob)
        {
            ProHeroJob proHeroJob = new ProHeroJob();

            proHeroJob.JobRelatedId = heroJob.JobRelatedId;
            proHeroJob.JobLevel     = heroJob.JobLevel;
            proHeroJob.ModelSkinId  = heroJob.ModelSkinId;
            proHeroJob.Achievements.AddRange(heroJob.Achievements);
            return(proHeroJob);
        }
示例#6
0
 // Token: 0x06003C36 RID: 15414 RVA: 0x00111A48 File Offset: 0x0010FC48
 public HeroJob(HeroJob other)
 {
     this.JobRelatedId = other.JobRelatedId;
     this.JobLevel     = other.JobLevel;
     this.ModelSkinId  = other.ModelSkinId;
     foreach (int item in other.Achievements)
     {
         this.Achievements.Add(item);
     }
 }
示例#7
0
        // Token: 0x06003C3E RID: 15422 RVA: 0x00111B6C File Offset: 0x0010FD6C
        public static HeroJob PbHeroJobToHeroJob(ProHeroJob pbHeroJob)
        {
            HeroJob heroJob = new HeroJob();

            heroJob.JobRelatedId = pbHeroJob.JobRelatedId;
            heroJob.JobLevel     = pbHeroJob.JobLevel;
            heroJob.ModelSkinId  = pbHeroJob.ModelSkinId;
            foreach (int item in pbHeroJob.Achievements)
            {
                heroJob.Achievements.Add(item);
            }
            return(heroJob);
        }
示例#8
0
        // Token: 0x06003C29 RID: 15401 RVA: 0x00111528 File Offset: 0x0010F728
        public static ProHero HeroToPBHero(Hero hero)
        {
            ProHero proHero = new ProHero();

            proHero.HeroId             = hero.HeroId;
            proHero.Level              = hero.Level;
            proHero.Exp                = hero.Exp;
            proHero.FavorabilityLevel  = hero.FavorabilityLevel;
            proHero.FavorabilityExp    = hero.FavorabilityExp;
            proHero.StarLevel          = hero.StarLevel;
            proHero.ActiveJobRelatedId = hero.ActiveHeroJobRelatedId;
            proHero.SelectedSoldierId  = hero.SelectedSoldierId;
            proHero.FightNums          = hero.FightNums;
            proHero.Confessed          = hero.Confessed;
            proHero.Power              = hero.BattlePower;
            proHero.CharSkinId         = hero.CharSkinId;
            proHero.SelectedSkills.AddRange(hero.SelectedSkills);
            proHero.UnlockedJobs.AddRange(hero.UnlockedJobs);
            foreach (SoldierSkin skin in hero.SoldierSkins)
            {
                proHero.SoldierSkins.Add(SoldierSkin.SoldierSkinToPbSoldierSkin(skin));
            }
            foreach (HeroJob heroJob in hero.Jobs)
            {
                proHero.Jobs.Add(HeroJob.HeroJobToPBHeroJob(heroJob));
            }
            proHero.EquipmentIds.AddRange(hero.EquipmentIds);
            foreach (KeyValuePair <int, int> keyValuePair in hero.Fetters)
            {
                proHero.Fetters.Add(new ProHeroFetter
                {
                    FetterId = keyValuePair.Key,
                    Level    = keyValuePair.Value
                });
            }
            return(proHero);
        }
示例#9
0
        // Token: 0x06003C2A RID: 15402 RVA: 0x00111724 File Offset: 0x0010F924
        public static Hero PBHeroToHero(ProHero pbHero)
        {
            Hero hero = new Hero();

            hero.HeroId                 = pbHero.HeroId;
            hero.Level                  = pbHero.Level;
            hero.Exp                    = pbHero.Exp;
            hero.FavorabilityLevel      = pbHero.FavorabilityLevel;
            hero.FavorabilityExp        = pbHero.FavorabilityExp;
            hero.StarLevel              = pbHero.StarLevel;
            hero.ActiveHeroJobRelatedId = pbHero.ActiveJobRelatedId;
            hero.SelectedSoldierId      = pbHero.SelectedSoldierId;
            hero.FightNums              = pbHero.FightNums;
            hero.Confessed              = pbHero.Confessed;
            hero.BattlePower            = pbHero.Power;
            hero.CharSkinId             = pbHero.CharSkinId;
            hero.SelectedSkills.AddRange(pbHero.SelectedSkills);
            hero.UnlockedJobs.AddRange(pbHero.UnlockedJobs);
            foreach (ProHeroJob pbHeroJob in pbHero.Jobs)
            {
                hero.Jobs.Add(HeroJob.PbHeroJobToHeroJob(pbHeroJob));
            }
            foreach (ProSoldierSkin pbSkin in pbHero.SoldierSkins)
            {
                hero.SoldierSkins.Add(SoldierSkin.PbSoldierSkinToSoldierSkin(pbSkin));
            }
            for (int i = 0; i < pbHero.EquipmentIds.Count; i++)
            {
                hero.EquipmentIds[i] = pbHero.EquipmentIds[i];
            }
            foreach (ProHeroFetter proHeroFetter in pbHero.Fetters)
            {
                hero.Fetters.Add(proHeroFetter.FetterId, proHeroFetter.Level);
            }
            return(hero);
        }
示例#10
0
 // Token: 0x06004B5F RID: 19295 RVA: 0x001763C4 File Offset: 0x001745C4
 public void LevelUpHeroJobLevel(Hero hero, HeroJob heroJob)
 {
     heroJob.JobLevel++;
     this.SetHeroDirty(hero);
 }