예제 #1
0
        // Token: 0x06003B1A RID: 15130 RVA: 0x0010DEF4 File Offset: 0x0010C0F4
        public static BattleActorSetup CreateRealtimePvpBattleActorSetup(IConfigDataLoader configDataLoader, int team, ConfigDataRealTimePVPBattleInfo battleInfo, int position, BattleHero hero)
        {
            BattleActorSetup battleActorSetup = BattleUtility.CreateBattleActorSetupFromBattleHero(configDataLoader, hero, 0, -1, 0);

            if (team == 0)
            {
                battleActorSetup.Position.x = battleInfo.AttackPositions[position].X;
                battleActorSetup.Position.y = battleInfo.AttackPositions[position].Y;
                if (battleInfo.AttackDirs.Count > position)
                {
                    battleActorSetup.Direction = battleInfo.AttackDirs[position];
                }
            }
            else
            {
                if (team != 1)
                {
                    return(null);
                }
                battleActorSetup.Position.x = battleInfo.DefendPositions[position].X;
                battleActorSetup.Position.y = battleInfo.DefendPositions[position].Y;
                if (battleInfo.DefendDirs.Count > position)
                {
                    battleActorSetup.Direction = battleInfo.DefendDirs[position];
                }
            }
            battleActorSetup.IsNpc = false;
            return(battleActorSetup);
        }
예제 #2
0
        // Token: 0x06003B29 RID: 15145 RVA: 0x0010EDC0 File Offset: 0x0010CFC0
        public static void ModifyGuildMassiveCombatBattleTeamSetups(IConfigDataLoader configDataLoader, int strongholdId, List <int> preferredHeroTagIds, BattleTeamSetup mineTime)
        {
            ConfigDataGuildMassiveCombatStrongholdInfo configDataGuildMassiveCombatStrongholdInfo = configDataLoader.GetConfigDataGuildMassiveCombatStrongholdInfo(strongholdId);

            if (configDataGuildMassiveCombatStrongholdInfo == null)
            {
                return;
            }
            if (preferredHeroTagIds == null)
            {
                return;
            }
            ConfigDataSkillInfo configDataSkillInfo = configDataLoader.GetConfigDataSkillInfo(configDataGuildMassiveCombatStrongholdInfo.UpSkill_ID);

            if (configDataSkillInfo != null)
            {
                foreach (BattleActorSetup battleActorSetup in mineTime.m_actors)
                {
                    foreach (int item in preferredHeroTagIds)
                    {
                        if (battleActorSetup.HeroInfo.m_heroTagIds.Contains(item))
                        {
                            BattleUtility.AppendExtraSkillToBattleActorSetup(configDataSkillInfo, battleActorSetup);
                            break;
                        }
                    }
                }
            }
        }
예제 #3
0
        // Token: 0x06003C2E RID: 15406 RVA: 0x001119BC File Offset: 0x0010FBBC
        public ConfigDataModelSkinResourceInfo GetSoldierModelSkinResourceInfo(int soldierId)
        {
            IConfigDataLoader configDataLoader = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;
            int soldierSkinId = this.GetSoldierSkinId(soldierId);

            return(BattleUtility.GetSoldierModelSkinResourceInfo(configDataLoader, soldierSkinId, soldierId));
        }
예제 #4
0
 // Token: 0x0600318F RID: 12687 RVA: 0x000C2548 File Offset: 0x000C0748
 public ConfigDataModelSkinResourceInfo GetSelectedSoldierModelSkinResourceInfo(IConfigDataLoader configDataLoader)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_GetSelectedSoldierModelSkinResourceInfoIConfigDataLoader_hotfix != null)
     {
         return((ConfigDataModelSkinResourceInfo)this.m_GetSelectedSoldierModelSkinResourceInfoIConfigDataLoader_hotfix.call(new object[]
         {
             this,
             configDataLoader
         }));
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     return(BattleUtility.GetSoldierModelSkinResourceInfo(configDataLoader, this.SelectedSoldierSkinId, this.SelectedSoldierId));
 }
예제 #5
0
 // Token: 0x0600318E RID: 12686 RVA: 0x000C24B8 File Offset: 0x000C06B8
 public ConfigDataModelSkinResourceInfo GetHeroActiveJobModelSkinResourceInfo(IConfigDataLoader configDataLoader)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_GetHeroActiveJobModelSkinResourceInfoIConfigDataLoader_hotfix != null)
     {
         return((ConfigDataModelSkinResourceInfo)this.m_GetHeroActiveJobModelSkinResourceInfoIConfigDataLoader_hotfix.call(new object[]
         {
             this,
             configDataLoader
         }));
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     return(BattleUtility.GetHeroModelSkinResourceInfo(configDataLoader, this.ModelSkinId, this.ActiveHeroJobRelatedId));
 }
예제 #6
0
 // Token: 0x0600318D RID: 12685 RVA: 0x000C2430 File Offset: 0x000C0630
 public ConfigDataCharImageSkinResourceInfo GetHeroCharImageSkinResourceInfo(IConfigDataLoader configDataLoader)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_GetHeroCharImageSkinResourceInfoIConfigDataLoader_hotfix != null)
     {
         return((ConfigDataCharImageSkinResourceInfo)this.m_GetHeroCharImageSkinResourceInfoIConfigDataLoader_hotfix.call(new object[]
         {
             this,
             configDataLoader
         }));
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     return(BattleUtility.GetHeroCharImageSkinResourceInfo(configDataLoader, this.CharSkinId));
 }
예제 #7
0
        // Token: 0x06003B17 RID: 15127 RVA: 0x0010DC90 File Offset: 0x0010BE90
        public static BattleActorSetup CreatePveMyBattleActorSetup(IConfigDataLoader configDataLoader, ConfigDataBattleInfo battleInfo, int position, BattleHero hero)
        {
            BattleActorSetup battleActorSetup = BattleUtility.CreateBattleActorSetupFromBattleHero(configDataLoader, hero, 0, -1, 0);

            battleActorSetup.Position.x = battleInfo.AllyPositions[position].X;
            battleActorSetup.Position.y = battleInfo.AllyPositions[position].Y;
            battleActorSetup.Direction  = 0;
            if (battleInfo.AllyDirs.Count > position)
            {
                battleActorSetup.Direction = battleInfo.AllyDirs[position];
            }
            battleActorSetup.IsNpc = false;
            return(battleActorSetup);
        }
예제 #8
0
        // Token: 0x06003B28 RID: 15144 RVA: 0x0010EC1C File Offset: 0x0010CE1C
        public static void ModifyClimbTowerBattleTeamSetups(IConfigDataLoader configDataLoader, int floorId, int bonusHeroGroupId, int battleRuleId, BattleTeamSetup mineTime, BattleTeamSetup opponentTeam)
        {
            ConfigDataTowerFloorInfo configDataTowerFloorInfo = configDataLoader.GetConfigDataTowerFloorInfo(floorId);

            if (configDataTowerFloorInfo == null)
            {
                return;
            }
            ConfigDataTowerBonusHeroGroupInfo configDataTowerBonusHeroGroupInfo = configDataLoader.GetConfigDataTowerBonusHeroGroupInfo(bonusHeroGroupId);

            if (configDataTowerBonusHeroGroupInfo != null)
            {
                ConfigDataSkillInfo configDataSkillInfo = configDataLoader.GetConfigDataSkillInfo(configDataTowerFloorInfo.BonusSkill_ID);
                if (configDataSkillInfo != null)
                {
                    foreach (BattleActorSetup battleActorSetup in mineTime.m_actors)
                    {
                        if (configDataTowerBonusHeroGroupInfo.BonusHeroIdList.Contains(battleActorSetup.HeroInfo.ID))
                        {
                            BattleUtility.AppendExtraSkillToBattleActorSetup(configDataSkillInfo, battleActorSetup);
                        }
                    }
                }
            }
            ConfigDataTowerBattleRuleInfo configDataTowerBattleRuleInfo = configDataLoader.GetConfigDataTowerBattleRuleInfo(battleRuleId);

            if (configDataTowerBattleRuleInfo != null)
            {
                ConfigDataSkillInfo configDataSkillInfo2 = configDataLoader.GetConfigDataSkillInfo(configDataTowerBattleRuleInfo.Skill_ID);
                if (configDataSkillInfo2 != null)
                {
                    if (configDataTowerBattleRuleInfo.Target == 1 || configDataTowerBattleRuleInfo.Target == 3)
                    {
                        foreach (BattleActorSetup a in opponentTeam.m_actors)
                        {
                            BattleUtility.AppendExtraSkillToBattleActorSetup(configDataSkillInfo2, a);
                        }
                    }
                    if (configDataTowerBattleRuleInfo.Target == 2 || configDataTowerBattleRuleInfo.Target == 3)
                    {
                        foreach (BattleActorSetup a2 in mineTime.m_actors)
                        {
                            BattleUtility.AppendExtraSkillToBattleActorSetup(configDataSkillInfo2, a2);
                        }
                    }
                }
            }
        }
예제 #9
0
 // Token: 0x06003B1B RID: 15131 RVA: 0x0010DFE4 File Offset: 0x0010C1E4
 public static int AppendPveMyNpcBattleActorSetups(IConfigDataLoader configDataLoader, ConfigDataBattleInfo battleInfo, int monsterLevel, List <BattleActorSetup> actors)
 {
     for (int i = 0; i < battleInfo.NpcActors.Count; i++)
     {
         BattlePosActor battlePosActor = battleInfo.NpcActors[i];
         int            id             = battlePosActor.ID;
         int            num            = battlePosActor.Level;
         int            behaviorId     = 0;
         if (battleInfo.NpcActorsBehavior.Count > i)
         {
             behaviorId = battleInfo.NpcActorsBehavior[i];
         }
         int groupId = 0;
         if (battleInfo.NpcGroups.Count > i)
         {
             groupId = battleInfo.NpcGroups[i];
         }
         if (num == 0)
         {
             num = monsterLevel;
         }
         ConfigDataHeroInfo configDataHeroInfo = configDataLoader.GetConfigDataHeroInfo(id);
         if (configDataHeroInfo == null)
         {
             return(-618);
         }
         BattleHero       hero             = BattleUtility.CreateDefaultConfigBattleHero(configDataHeroInfo);
         BattleActorSetup battleActorSetup = BattleUtility.CreateBattleActorSetupFromBattleHero(configDataLoader, hero, num, behaviorId, groupId);
         battleActorSetup.Position.x = battlePosActor.X;
         battleActorSetup.Position.y = battlePosActor.Y;
         battleActorSetup.Direction  = 0;
         if (battleInfo.NpcDirs.Count > i)
         {
             battleActorSetup.Direction = battleInfo.NpcDirs[i];
         }
         battleActorSetup.IsNpc = true;
         actors.Add(battleActorSetup);
     }
     return(0);
 }
예제 #10
0
        // Token: 0x06003B1F RID: 15135 RVA: 0x0010E4F8 File Offset: 0x0010C6F8
        public static void GetRandomTalentSkills(IConfigDataLoader configDataLoader, int randomTalentId, List <int> randomTalentProbilities, RandomNumber randomNumber, out List <ConfigDataSkillInfo> actorTalentSkillInfos)
        {
            actorTalentSkillInfos = new List <ConfigDataSkillInfo>();
            int randomTalentSkillId = BattleUtility.GetRandomTalentSkillId(configDataLoader, randomNumber, randomTalentId);
            ConfigDataSkillInfo configDataSkillInfo = configDataLoader.GetConfigDataSkillInfo(randomTalentSkillId);

            if (configDataSkillInfo == null)
            {
                return;
            }
            foreach (int num in randomTalentProbilities)
            {
                if (randomNumber.Next(0, 10000) < num)
                {
                    actorTalentSkillInfos.Add(configDataSkillInfo);
                }
                else
                {
                    actorTalentSkillInfos.Add(null);
                }
            }
        }
예제 #11
0
        // Token: 0x06003B16 RID: 15126 RVA: 0x0010D864 File Offset: 0x0010BA64
        public static BattleActorSetup CreateBattleActorSetupFromBattleHero(IConfigDataLoader configDataLoader, BattleHero hero, int level = 0, int behaviorId = -1, int groupId = 0)
        {
            BattleActorSetup battleActorSetup = new BattleActorSetup();

            battleActorSetup.HeroInfo          = configDataLoader.GetConfigDataHeroInfo(hero.HeroId);
            battleActorSetup.JobConnectionInfo = configDataLoader.GetConfigDataJobConnectionInfo(hero.ActiveHeroJobRelatedId);
            battleActorSetup.SoldierInfo       = configDataLoader.GetConfigDataSoldierInfo(hero.SelectedSoldierId);
            battleActorSetup.HeroStar          = hero.StarLevel;
            battleActorSetup.JobLevel          = hero.GetJob(hero.ActiveHeroJobRelatedId).JobLevel;
            battleActorSetup.SoldierCount      = configDataLoader.Const_SoldierCountMax;
            battleActorSetup.ActionValue       = hero.ActionValue;
            battleActorSetup.BehaviorId        = behaviorId;
            battleActorSetup.GroupId           = groupId;
            battleActorSetup.PlayerIndex       = -1;
            if (level > 0)
            {
                battleActorSetup.HeroLevel = level;
            }
            else
            {
                battleActorSetup.HeroLevel = hero.Level;
            }
            if (hero.SelectedSkillList.Count > 0)
            {
                List <ConfigDataSkillInfo> list = new List <ConfigDataSkillInfo>();
                foreach (int key in hero.SelectedSkillList)
                {
                    ConfigDataSkillInfo configDataSkillInfo = configDataLoader.GetConfigDataSkillInfo(key);
                    if (configDataSkillInfo != null)
                    {
                        list.Add(configDataSkillInfo);
                    }
                }
                if (list.Count > 0)
                {
                    battleActorSetup.SkillInfos = list.ToArray();
                }
            }
            if (hero.Jobs.Count > 0)
            {
                List <ConfigDataJobInfo> list2 = new List <ConfigDataJobInfo>();
                foreach (BattleHeroJob battleHeroJob in hero.Jobs)
                {
                    ConfigDataJobConnectionInfo configDataJobConnectionInfo = configDataLoader.GetConfigDataJobConnectionInfo(battleHeroJob.JobRelatedId);
                    if (configDataJobConnectionInfo.IsJobLevelMax(battleHeroJob.JobLevel))
                    {
                        list2.Add(configDataJobConnectionInfo.m_jobInfo);
                    }
                }
                if (list2.Count > 0)
                {
                    battleActorSetup.MasterJobInfos = list2.ToArray();
                }
            }
            if (hero.Fetters.Count > 0)
            {
                List <ConfigDataSkillInfo> list3 = new List <ConfigDataSkillInfo>();
                foreach (KeyValuePair <int, int> keyValuePair in hero.Fetters)
                {
                    ConfigDataHeroFetterInfo configDataHeroFetterInfo = configDataLoader.GetConfigDataHeroFetterInfo(keyValuePair.Key);
                    if (configDataHeroFetterInfo != null)
                    {
                        int num = keyValuePair.Value - 1;
                        if (num < configDataHeroFetterInfo.GotSkills_ID.Count)
                        {
                            ConfigDataSkillInfo configDataSkillInfo2 = configDataLoader.GetConfigDataSkillInfo(configDataHeroFetterInfo.GotSkills_ID[num]);
                            if (configDataSkillInfo2 != null)
                            {
                                list3.Add(configDataSkillInfo2);
                            }
                        }
                    }
                }
                if (list3.Count > 0)
                {
                    battleActorSetup.FetterSkillInfos = list3.ToArray();
                }
            }
            if (hero.Equipments.Count > 0)
            {
                List <BattleActorEquipment> list4 = new List <BattleActorEquipment>();
                foreach (BattleHeroEquipment battleHeroEquipment in hero.Equipments)
                {
                    ConfigDataEquipmentInfo configDataEquipmentInfo = configDataLoader.GetConfigDataEquipmentInfo(battleHeroEquipment.Id);
                    if (configDataEquipmentInfo != null)
                    {
                        BattleActorEquipment battleActorEquipment = new BattleActorEquipment();
                        battleActorEquipment.EquipmentInfo = configDataEquipmentInfo;
                        battleActorEquipment.Level         = battleHeroEquipment.Level;
                        if (battleHeroEquipment.EnchantProperties.Count > 0)
                        {
                            battleActorEquipment.EnchantProperties = new CommonBattleProperty[battleHeroEquipment.EnchantProperties.Count];
                            for (int i = 0; i < battleHeroEquipment.EnchantProperties.Count; i++)
                            {
                                battleActorEquipment.EnchantProperties[i] = battleHeroEquipment.EnchantProperties[i];
                            }
                        }
                        list4.Add(battleActorEquipment);
                    }
                }
                if (list4.Count > 0)
                {
                    battleActorSetup.Equipments = list4.ToArray();
                }
                List <ConfigDataSkillInfo> equipmentResonanceSkillInfos = BattleUtility.GetEquipmentResonanceSkillInfos(configDataLoader, hero.Equipments);
                if (equipmentResonanceSkillInfos.Count > 0)
                {
                    battleActorSetup.ResonanceSkillInfos = equipmentResonanceSkillInfos.ToArray();
                }
            }
            battleActorSetup.HeroCharImageSkinResourceInfo = hero.GetHeroCharImageSkinResourceInfo(configDataLoader);
            battleActorSetup.HeroModelSkinResourceInfo     = hero.GetHeroActiveJobModelSkinResourceInfo(configDataLoader);
            battleActorSetup.SoldierModelSkinResourceInfo  = hero.GetSelectedSoldierModelSkinResourceInfo(configDataLoader);
            return(battleActorSetup);
        }
예제 #12
0
        // Token: 0x06003B1C RID: 15132 RVA: 0x0010E104 File Offset: 0x0010C304
        public static int AppendPveOpponentBattleActorSetups(IConfigDataLoader configDataLoader, ConfigDataBattleInfo battleInfo, int monsterLevel, int randomSeed, List <BattleActorSetup> actors)
        {
            List <RandomArmyActor> list = null;

            if (battleInfo.BattleRandomEnemies_ID.Count > 0)
            {
                RandomNumber randomNumber = new RandomNumber();
                randomNumber.SetSeed(randomSeed);
                int randomBattleArmyActors = BattleUtility.GetRandomBattleArmyActors(configDataLoader, battleInfo.BattleRandomEnemies_ID, randomNumber, out list);
                if (randomBattleArmyActors != 0)
                {
                    return(randomBattleArmyActors);
                }
            }
            List <ConfigDataSkillInfo> list2 = null;

            if (battleInfo.EnemyRandomTalentProbilities.Count > 0)
            {
                RandomNumber randomNumber2 = new RandomNumber();
                randomNumber2.SetSeed(randomSeed);
                BattleUtility.GetRandomTalentSkills(configDataLoader, battleInfo.EnemyRandomTalent_ID, battleInfo.EnemyRandomTalentProbilities, randomNumber2, out list2);
            }
            for (int i = 0; i < battleInfo.EnemyActors.Count; i++)
            {
                BattlePosActor battlePosActor = battleInfo.EnemyActors[i];
                int            key            = battlePosActor.ID;
                int            num            = battlePosActor.Level;
                int            behaviorId     = 0;
                if (battleInfo.EnemyActorsBehavior.Count > i)
                {
                    behaviorId = battleInfo.EnemyActorsBehavior[i];
                }
                int groupId = 0;
                if (battleInfo.EnemyGroups.Count > i)
                {
                    groupId = battleInfo.EnemyGroups[i];
                }
                if (list != null && i < list.Count && list[i] != null)
                {
                    key        = list[i].HeroID;
                    num        = list[i].Level;
                    behaviorId = list[i].AI;
                }
                if (num == 0)
                {
                    num = monsterLevel;
                }
                ConfigDataHeroInfo configDataHeroInfo = configDataLoader.GetConfigDataHeroInfo(key);
                if (configDataHeroInfo == null)
                {
                    return(-618);
                }
                BattleHero       hero             = BattleUtility.CreateDefaultConfigBattleHero(configDataHeroInfo);
                BattleActorSetup battleActorSetup = BattleUtility.CreateBattleActorSetupFromBattleHero(configDataLoader, hero, num, behaviorId, groupId);
                battleActorSetup.Position.x = battlePosActor.X;
                battleActorSetup.Position.y = battlePosActor.Y;
                battleActorSetup.Direction  = 0;
                if (battleInfo.EnemyDirs.Count > i)
                {
                    battleActorSetup.Direction = battleInfo.EnemyDirs[i];
                }
                battleActorSetup.IsNpc = false;
                if (list2 != null && i < list2.Count)
                {
                    battleActorSetup.ExtraTalentSkillInfo = list2[i];
                }
                actors.Add(battleActorSetup);
            }
            return(0);
        }
예제 #13
0
        // Token: 0x06003C44 RID: 15428 RVA: 0x00111C60 File Offset: 0x0010FE60
        public ConfigDataModelSkinResourceInfo GetModelSkinResourceInfo()
        {
            IConfigDataLoader configDataLoader = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;

            return(BattleUtility.GetHeroModelSkinResourceInfo(configDataLoader, this.ModelSkinId, this.m_jobRelatedId));
        }
예제 #14
0
        // Token: 0x06003C2D RID: 15405 RVA: 0x00111990 File Offset: 0x0010FB90
        public ConfigDataCharImageSkinResourceInfo GetHeroCharImageSkinResourceInfo()
        {
            IConfigDataLoader configDataLoader = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;

            return(BattleUtility.GetHeroCharImageSkinResourceInfo(configDataLoader, this.CharSkinId));
        }