Example #1
0
        public static List <string> GetLearnSkill(string quest_iname, string unit_iname)
        {
            List <string> stringList = new List <string>();

            if (string.IsNullOrEmpty(quest_iname) || string.IsNullOrEmpty(unit_iname))
            {
                return(stringList);
            }
            GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect();

            if (Object.op_Equality((Object)instanceDirect, (Object)null))
            {
                return(stringList);
            }
            CollaboSkillParam collaboSkillParam = instanceDirect.MasterParam.CollaboSkills.Find((Predicate <CollaboSkillParam>)(fcs => fcs.UnitIname == unit_iname));

            if (collaboSkillParam == null)
            {
                return(stringList);
            }
            using (List <CollaboSkillParam.LearnSkill> .Enumerator enumerator = collaboSkillParam.mLearnSkillLists.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    CollaboSkillParam.LearnSkill current = enumerator.Current;
                    if (!(current.QuestIname != quest_iname))
                    {
                        stringList.Add(current.SkillIname);
                    }
                }
            }
            return(stringList);
        }
Example #2
0
        public static string GetPartnerIname(string unit_iname, string skill_iname)
        {
            if (string.IsNullOrEmpty(unit_iname) || string.IsNullOrEmpty(skill_iname))
            {
                return((string)null);
            }
            GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect();

            if (Object.op_Equality((Object)instanceDirect, (Object)null))
            {
                return((string)null);
            }
            CollaboSkillParam collaboSkillParam = instanceDirect.MasterParam.CollaboSkills.Find((Predicate <CollaboSkillParam>)(fcs => fcs.UnitIname == unit_iname));

            if (collaboSkillParam == null)
            {
                DebugUtility.LogError(string.Format("CollaboSkillParam/GetPartnerIname CollaboSkillParam not found. unit_iname={0}", (object)unit_iname));
                return((string)null);
            }
            CollaboSkillParam.LearnSkill learnSkill = collaboSkillParam.mLearnSkillLists.Find((Predicate <CollaboSkillParam.LearnSkill>)(fls => fls.SkillIname == skill_iname));
            if (learnSkill != null)
            {
                return(learnSkill.PartnerUnitIname);
            }
            DebugUtility.LogError(string.Format("CollaboSkillParam/GetPartnerIname LearnSkill not found. skill_iname={0}", (object)skill_iname));
            return((string)null);
        }
Example #3
0
        public static void UpdateCollaboSkill(List <CollaboSkillParam> csp_lists)
        {
            GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect();

            if (Object.op_Equality((Object)instanceDirect, (Object)null))
            {
                return;
            }
            using (List <CollaboSkillParam> .Enumerator enumerator1 = csp_lists.GetEnumerator())
            {
                while (enumerator1.MoveNext())
                {
                    CollaboSkillParam current1 = enumerator1.Current;
                    for (int index = 0; index < current1.mLearnSkillLists.Count; ++index)
                    {
                        // ISSUE: object of a compiler-generated type is created
                        // ISSUE: variable of a compiler-generated type
                        CollaboSkillParam.\u003CUpdateCollaboSkill\u003Ec__AnonStorey225 skillCAnonStorey225 = new CollaboSkillParam.\u003CUpdateCollaboSkill\u003Ec__AnonStorey225();
                        // ISSUE: reference to a compiler-generated field
                        skillCAnonStorey225.ls = current1.mLearnSkillLists[index];
                        // ISSUE: reference to a compiler-generated field
                        if (!string.IsNullOrEmpty(skillCAnonStorey225.ls.QuestIname))
                        {
                            AbilityParam abilityParam1 = instanceDirect.MasterParam.GetAbilityParam(current1.AbilityIname);
                            if (abilityParam1 == null)
                            {
                                DebugUtility.LogError(string.Format("CollaboSkillParam/Deserialize AbilityParam not found. ability_iname={0}", (object)current1.mAbilityIname));
                            }
                            else if (index < abilityParam1.skills.Length)
                            {
                                // ISSUE: reference to a compiler-generated field
                                skillCAnonStorey225.ls.SkillIname = abilityParam1.skills[index].iname;
                                using (List <CollaboSkillParam> .Enumerator enumerator2 = csp_lists.GetEnumerator())
                                {
                                    while (enumerator2.MoveNext())
                                    {
                                        CollaboSkillParam current2 = enumerator2.Current;
                                        if (!(current2.mUnitIname == current1.mUnitIname))
                                        {
                                            AbilityParam abilityParam2 = instanceDirect.MasterParam.GetAbilityParam(current2.AbilityIname);
                                            // ISSUE: reference to a compiler-generated method
                                            if (abilityParam2 != null && new List <LearningSkill>((IEnumerable <LearningSkill>)abilityParam2.skills).Find(new Predicate <LearningSkill>(skillCAnonStorey225.\u003C\u003Em__22A)) != null)
                                            {
                                                // ISSUE: reference to a compiler-generated field
                                                skillCAnonStorey225.ls.PartnerUnitIname = current2.UnitIname;
                                                break;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        public void RefreshCollaboData()
        {
            GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect();

            if (Object.op_Equality((Object)instanceDirect, (Object)null))
            {
                return;
            }
            List <CharacterQuestData>     characterQuestDataList = new List <CharacterQuestData>();
            List <CollaboSkillParam.Pair> pairLists = CollaboSkillParam.GetPairLists();

            if (pairLists != null)
            {
                for (int index = 0; index < pairLists.Count; ++index)
                {
                    UnitData           dataByUniqueParam1 = instanceDirect.Player.FindUnitDataByUniqueParam(pairLists[index].UnitParam1);
                    UnitData           dataByUniqueParam2 = instanceDirect.Player.FindUnitDataByUniqueParam(pairLists[index].UnitParam2);
                    CharacterQuestData characterQuestData = new CharacterQuestData();
                    characterQuestData.questType = CharacterQuestData.EType.Collabo;
                    if (dataByUniqueParam1 == null)
                    {
                        characterQuestData.unitParam1 = pairLists[index].UnitParam1;
                    }
                    else
                    {
                        characterQuestData.unitData1 = dataByUniqueParam1;
                    }
                    if (dataByUniqueParam2 == null)
                    {
                        characterQuestData.unitParam2 = pairLists[index].UnitParam2;
                    }
                    else
                    {
                        characterQuestData.unitData2 = dataByUniqueParam2;
                    }
                    characterQuestData.UpdateStatus();
                    characterQuestDataList.Add(characterQuestData);
                }
            }
            if (this.mFilterMethod == null)
            {
                Debug.Log((object)"mFilterMethod == null");
            }
            else
            {
                characterQuestDataList = characterQuestDataList.FindAll((Predicate <CharacterQuestData>)(quest => this.mFilterMethod(quest)));
            }
            this.SetData((object[])characterQuestDataList.ToArray(), typeof(CharacterQuestData));
        }
Example #5
0
        public static void UpdateCollaboSkill(List <CollaboSkillParam> csp_lists)
        {
            GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect();

            if (UnityEngine.Object.op_Equality((UnityEngine.Object)instanceDirect, (UnityEngine.Object)null))
            {
                return;
            }
            using (List <CollaboSkillParam> .Enumerator enumerator1 = csp_lists.GetEnumerator())
            {
                while (enumerator1.MoveNext())
                {
                    CollaboSkillParam current1 = enumerator1.Current;
                    for (int index = 0; index < current1.mLearnSkillLists.Count; ++index)
                    {
                        CollaboSkillParam.LearnSkill ls = current1.mLearnSkillLists[index];
                        if (!string.IsNullOrEmpty(ls.QuestIname))
                        {
                            AbilityParam abilityParam1 = instanceDirect.MasterParam.GetAbilityParam(current1.AbilityIname);
                            if (abilityParam1 == null)
                            {
                                DebugUtility.LogError(string.Format("CollaboSkillParam/Deserialize AbilityParam not found. ability_iname={0}", (object)current1.mAbilityIname));
                            }
                            else if (index < abilityParam1.skills.Length)
                            {
                                ls.SkillIname = abilityParam1.skills[index].iname;
                                using (List <CollaboSkillParam> .Enumerator enumerator2 = csp_lists.GetEnumerator())
                                {
                                    while (enumerator2.MoveNext())
                                    {
                                        CollaboSkillParam current2 = enumerator2.Current;
                                        if (!(current2.mUnitIname == current1.mUnitIname))
                                        {
                                            AbilityParam abilityParam2 = instanceDirect.MasterParam.GetAbilityParam(current2.AbilityIname);
                                            if (abilityParam2 != null && new List <LearningSkill>((IEnumerable <LearningSkill>)abilityParam2.skills).Find((Predicate <LearningSkill>)(flgs => flgs.iname == ls.SkillIname)) != null)
                                            {
                                                ls.PartnerUnitIname = current2.UnitIname;
                                                break;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
Example #6
0
        private static QuestParam GetLearnSkillQuest(CollaboSkillParam csp, UnitData partner)
        {
            GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect();

            if (Object.op_Equality((Object)instanceDirect, (Object)null))
            {
                return((QuestParam)null);
            }
            if (csp == null || partner == null)
            {
                return((QuestParam)null);
            }
            CollaboSkillParam.LearnSkill learnSkill = csp.LearnSkillLists.Find((Predicate <CollaboSkillParam.LearnSkill>)(ls => ls.PartnerUnitIname == partner.UnitParam.iname));
            if (learnSkill != null)
            {
                return(instanceDirect.FindQuest(learnSkill.QuestIname));
            }
            DebugUtility.LogError("learnSkill がnull");
            return((QuestParam)null);
        }
Example #7
0
        public static List <CollaboSkillParam.Pair> GetPairLists()
        {
            List <CollaboSkillParam.Pair> pairList = new List <CollaboSkillParam.Pair>();
            GameManager instanceDirect             = MonoSingleton <GameManager> .GetInstanceDirect();

            if (UnityEngine.Object.op_Equality((UnityEngine.Object)instanceDirect, (UnityEngine.Object)null))
            {
                return(pairList);
            }
            using (List <CollaboSkillParam> .Enumerator enumerator1 = instanceDirect.MasterParam.CollaboSkills.GetEnumerator())
            {
                while (enumerator1.MoveNext())
                {
                    CollaboSkillParam csp = enumerator1.Current;
                    using (List <CollaboSkillParam.LearnSkill> .Enumerator enumerator2 = csp.mLearnSkillLists.GetEnumerator())
                    {
                        while (enumerator2.MoveNext())
                        {
                            CollaboSkillParam.LearnSkill ls = enumerator2.Current;
                            if (pairList.Find((Predicate <CollaboSkillParam.Pair>)(tp =>
                            {
                                if (tp.UnitParam1.iname == csp.mUnitIname && tp.UnitParam2.iname == ls.PartnerUnitIname)
                                {
                                    return(true);
                                }
                                if (tp.UnitParam1.iname == ls.PartnerUnitIname)
                                {
                                    return(tp.UnitParam2.iname == csp.mUnitIname);
                                }
                                return(false);
                            })) == null)
                            {
                                pairList.Add(new CollaboSkillParam.Pair(instanceDirect.MasterParam.GetUnitParam(csp.mUnitIname), instanceDirect.MasterParam.GetUnitParam(ls.PartnerUnitIname)));
                            }
                        }
                    }
                }
            }
            return(pairList);
        }