public static List <MapEffectParam> GetHaveMapEffectLists(string skill_iname) { List <MapEffectParam> mapEffectParamList = new List <MapEffectParam>(); if (string.IsNullOrEmpty(skill_iname)) { return(mapEffectParamList); } GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect(); if (!Object.op_Implicit((Object)instanceDirect) || instanceDirect.MapEffectParam == null) { return(mapEffectParamList); } using (List <MapEffectParam> .Enumerator enumerator = instanceDirect.MapEffectParam.GetEnumerator()) { while (enumerator.MoveNext()) { MapEffectParam current = enumerator.Current; if (current.ValidSkillLists.Contains(skill_iname)) { mapEffectParamList.Add(current); } } } return(mapEffectParamList); }
public bool Equals(MapEffectParam me_param, SkillParam skill_param) { if (this.mMapEffectParam == me_param) { return(this.mSkillParam == skill_param); } return(false); }
public static void AddHaveJob(string skill_iname, JobParam job_param) { if (MapEffectParam.mHaveJobDict == null) { MapEffectParam.MakeHaveJobLists(); } if (!MapEffectParam.mHaveJobDict.ContainsKey(skill_iname)) { MapEffectParam.mHaveJobDict.Add(skill_iname, new List <JobParam>((IEnumerable <JobParam>) new JobParam[1] { job_param })); } else { if (MapEffectParam.mHaveJobDict[skill_iname].Contains(job_param)) { return; } MapEffectParam.mHaveJobDict[skill_iname].Add(job_param); } }
public void Setup() { JobParam dataOfClass = DataSource.FindDataOfClass <JobParam>(((Component)this).get_gameObject(), (JobParam)null); if (dataOfClass == null) { return; } GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect(); if (!UnityEngine.Object.op_Implicit((UnityEngine.Object)instanceDirect)) { return; } if (UnityEngine.Object.op_Implicit((UnityEngine.Object) this.GoMapEffectParent) && UnityEngine.Object.op_Implicit((UnityEngine.Object) this.GoMapEffectBaseItem)) { this.GoMapEffectBaseItem.SetActive(false); BattleUnitDetail.DestroyChildGameObjects(this.GoMapEffectParent, new List <GameObject>((IEnumerable <GameObject>) new GameObject[1] { this.GoMapEffectBaseItem })); } DataSource component = (DataSource)((Component)this).get_gameObject().GetComponent <DataSource>(); if (UnityEngine.Object.op_Implicit((UnityEngine.Object)component)) { component.Clear(); } DataSource.Bind <JobParam>(((Component)this).get_gameObject(), dataOfClass); if (!UnityEngine.Object.op_Implicit((UnityEngine.Object) this.GoMapEffectParent) || !UnityEngine.Object.op_Implicit((UnityEngine.Object) this.GoMapEffectBaseItem)) { return; } List <MapEffectJob.MeSkill> l = new List <MapEffectJob.MeSkill>(); if (!string.IsNullOrEmpty(dataOfClass.MapEffectAbility)) { AbilityParam abilityParam = instanceDirect.GetAbilityParam(dataOfClass.MapEffectAbility); if (abilityParam != null) { foreach (LearningSkill skill in abilityParam.skills) { SkillParam skillParam = instanceDirect.GetSkillParam(skill.iname); if (skillParam != null) { using (List <MapEffectParam> .Enumerator enumerator1 = MapEffectParam.GetHaveMapEffectLists(skill.iname).GetEnumerator()) { while (enumerator1.MoveNext()) { MapEffectParam current = enumerator1.Current; bool flag = false; using (List <MapEffectJob.MeSkill> .Enumerator enumerator2 = l.GetEnumerator()) { while (enumerator2.MoveNext()) { if (enumerator2.Current.Equals(current, skillParam)) { flag = true; break; } } } if (!flag) { l.Add(new MapEffectJob.MeSkill(current, skillParam)); } } } } } } } if (l.Count == 0) { return; } MySort <MapEffectJob.MeSkill> .Sort(l, (Comparison <MapEffectJob.MeSkill>)((src, dsc) => { if (src == dsc) { return(0); } return(dsc.mMapEffectParam.Index - src.mMapEffectParam.Index); })); using (List <MapEffectJob.MeSkill> .Enumerator enumerator = l.GetEnumerator()) { while (enumerator.MoveNext()) { MapEffectJob.MeSkill current = enumerator.Current; GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.GoMapEffectBaseItem); if (UnityEngine.Object.op_Implicit((UnityEngine.Object)gameObject)) { gameObject.get_transform().SetParent(this.GoMapEffectParent.get_transform()); gameObject.get_transform().set_localScale(Vector3.get_one()); DataSource.Bind <MapEffectParam>(gameObject, current.mMapEffectParam); DataSource.Bind <SkillParam>(gameObject, current.mSkillParam); gameObject.SetActive(true); } } } }
public MeSkill(MapEffectParam me_param, SkillParam skill_param) { this.mMapEffectParam = me_param; this.mSkillParam = skill_param; }
public void Setup() { QuestParam dataOfClass = DataSource.FindDataOfClass <QuestParam>(((Component)this).get_gameObject(), (QuestParam)null); if (dataOfClass == null) { return; } GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect(); if (!Object.op_Implicit((Object)instanceDirect)) { return; } if (Object.op_Implicit((Object)this.GoMapEffectParent) && Object.op_Implicit((Object)this.GoMapEffectBaseItem)) { this.GoMapEffectBaseItem.SetActive(false); BattleUnitDetail.DestroyChildGameObjects(this.GoMapEffectParent, new List <GameObject>((IEnumerable <GameObject>) new GameObject[1] { this.GoMapEffectBaseItem })); } MapEffectParam mapEffectParam = instanceDirect.GetMapEffectParam(dataOfClass.MapEffectId); if (mapEffectParam == null) { return; } DataSource component = (DataSource)((Component)this).get_gameObject().GetComponent <DataSource>(); if (Object.op_Implicit((Object)component)) { component.Clear(); } DataSource.Bind <MapEffectParam>(((Component)this).get_gameObject(), mapEffectParam); if (!Object.op_Implicit((Object)this.GoMapEffectParent) || !Object.op_Implicit((Object)this.GoMapEffectBaseItem)) { return; } for (int index = 0; index < mapEffectParam.ValidSkillLists.Count; ++index) { SkillParam skillParam = instanceDirect.GetSkillParam(mapEffectParam.ValidSkillLists[index]); if (skillParam != null) { using (List <JobParam> .Enumerator enumerator = MapEffectParam.GetHaveJobLists(skillParam.iname).GetEnumerator()) { while (enumerator.MoveNext()) { JobParam current = enumerator.Current; GameObject gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.GoMapEffectBaseItem); if (Object.op_Implicit((Object)gameObject)) { gameObject.get_transform().SetParent(this.GoMapEffectParent.get_transform()); gameObject.get_transform().set_localScale(Vector3.get_one()); DataSource.Bind <JobParam>(gameObject, current); DataSource.Bind <SkillParam>(gameObject, skillParam); gameObject.SetActive(true); } } } } } }