예제 #1
0
        // Token: 0x06003192 RID: 12690 RVA: 0x000C2968 File Offset: 0x000C0B68
        public static ProBattleHero BattleHeroToPBBattleHero(BattleHero battleHero)
        {
            ProBattleHero proBattleHero = new ProBattleHero();

            proBattleHero.HeroId = battleHero.HeroId;
            proBattleHero.ActionPositionIndex = battleHero.ActionPositionIndex;
            proBattleHero.Level             = battleHero.Level;
            proBattleHero.StarLevel         = battleHero.StarLevel;
            proBattleHero.ActionValue       = battleHero.ActionValue;
            proBattleHero.SelectedSoldierId = battleHero.SelectedSoldierId;
            proBattleHero.SelectedSkillList.AddRange(battleHero.SelectedSkillList);
            proBattleHero.ActiveHeroJobRelatedId = battleHero.ActiveHeroJobRelatedId;
            proBattleHero.Power                 = battleHero.Power;
            proBattleHero.ModelSkinId           = battleHero.ModelSkinId;
            proBattleHero.CharSkinId            = battleHero.CharSkinId;
            proBattleHero.SelectedSoldierSkinId = battleHero.SelectedSoldierSkinId;
            foreach (BattleHeroJob battleHeroJob in battleHero.Jobs)
            {
                proBattleHero.Jobs.Add(BattleHeroJob.BattleHeroJobToPBBattleHeroJob(battleHeroJob));
            }
            foreach (BattleHeroEquipment equipment in battleHero.Equipments)
            {
                proBattleHero.Equipments.Add(BattleHeroEquipment.BattleHeroEquipmentToPBBattleHeroEquipment(equipment));
            }
            foreach (KeyValuePair <int, int> keyValuePair in battleHero.Fetters)
            {
                proBattleHero.Fetters.Add(new ProHeroFetter
                {
                    FetterId = keyValuePair.Key,
                    Level    = keyValuePair.Value
                });
            }
            return(proBattleHero);
        }
예제 #2
0
        // Token: 0x06003191 RID: 12689 RVA: 0x000C27B0 File Offset: 0x000C09B0
        public static BattleHero PBBattleHeroToBattleHero(ProBattleHero pbBattleHero)
        {
            BattleHero battleHero = new BattleHero();

            battleHero.HeroId              = pbBattleHero.HeroId;
            battleHero.ActionValue         = pbBattleHero.ActionValue;
            battleHero.ActionPositionIndex = pbBattleHero.ActionPositionIndex;
            battleHero.Level             = pbBattleHero.Level;
            battleHero.StarLevel         = pbBattleHero.StarLevel;
            battleHero.SelectedSoldierId = pbBattleHero.SelectedSoldierId;
            battleHero.SelectedSkillList.AddRange(pbBattleHero.SelectedSkillList);
            battleHero.ActiveHeroJobRelatedId = pbBattleHero.ActiveHeroJobRelatedId;
            battleHero.Power                 = pbBattleHero.Power;
            battleHero.ModelSkinId           = pbBattleHero.ModelSkinId;
            battleHero.CharSkinId            = pbBattleHero.CharSkinId;
            battleHero.SelectedSoldierSkinId = pbBattleHero.SelectedSoldierSkinId;
            foreach (ProBattleHeroJob pbBattleHeroJob in pbBattleHero.Jobs)
            {
                battleHero.Jobs.Add(BattleHeroJob.PBBattleHeroJobToBattleHeroJob(pbBattleHeroJob));
            }
            foreach (ProBattleHeroEquipment pbEquipment in pbBattleHero.Equipments)
            {
                battleHero.Equipments.Add(BattleHeroEquipment.PBBattleHeroEquipmentToBattleHeroEquipment(pbEquipment));
            }
            foreach (ProHeroFetter proHeroFetter in pbBattleHero.Fetters)
            {
                battleHero.Fetters.Add(proHeroFetter.FetterId, proHeroFetter.Level);
            }
            return(battleHero);
        }
예제 #3
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);
        }
예제 #4
0
        // Token: 0x06003B15 RID: 15125 RVA: 0x0010D7B0 File Offset: 0x0010B9B0
        public static BattleHero CreateDefaultConfigBattleHero(ConfigDataHeroInfo heroInfo)
        {
            if (heroInfo == null)
            {
                return(null);
            }
            BattleHero battleHero = new BattleHero();

            battleHero.HeroId = heroInfo.ID;
            battleHero.ActiveHeroJobRelatedId = heroInfo.JobConnection_ID;
            battleHero.Level     = 1;
            battleHero.StarLevel = heroInfo.Star;
            BattleHeroJob battleHeroJob = new BattleHeroJob();

            battleHeroJob.JobRelatedId = heroInfo.JobConnection_ID;
            battleHeroJob.JobLevel     = 0;
            battleHero.Jobs.Add(battleHeroJob);
            battleHero.SelectedSoldierId = heroInfo.Soldier_ID;
            int num = 0;

            while (num < heroInfo.Skills_ID.Count && num < 3)
            {
                battleHero.SelectedSkillList.Add(heroInfo.Skills_ID[num]);
                num++;
            }
            return(battleHero);
        }
예제 #5
0
 // Token: 0x060031AF RID: 12719 RVA: 0x000C3624 File Offset: 0x000C1824
 public static HeroJob BattleHeroJobToHeroJob(BattleHeroJob battleHeroJob)
 {
     return(new HeroJob
     {
         JobRelatedId = battleHeroJob.JobRelatedId,
         JobLevel = battleHeroJob.JobLevel
     });
 }
예제 #6
0
 // Token: 0x060031BC RID: 12732 RVA: 0x000C3B84 File Offset: 0x000C1D84
 public LuaExportHelper(BattleHeroJob owner)
 {
     this.m_owner = owner;
 }