public static List <ConceptCardSkillDatailData> CreateConceptCardSkillDatailData(AbilityData abilityData) { List <ConceptCardSkillDatailData> cardSkillDatailDataList = new List <ConceptCardSkillDatailData>(); if (abilityData == null) { return(cardSkillDatailDataList); } ConceptCardEquipEffect fromAbility = ConceptCardEquipEffect.CreateFromAbility(abilityData); for (int index = 0; index < abilityData.LearningSkills.Length; ++index) { LearningSkill learning_skill = abilityData.LearningSkills[index]; if (learning_skill != null) { ConceptCardDetailAbility.ShowType _type = ConceptCardDetailAbility.ShowType.Ability; SkillData data = abilityData.Skills.Find((Predicate <SkillData>)(x => x.SkillParam.iname == learning_skill.iname)); if (data == null) { SkillParam skillParam = MonoSingleton <GameManager> .Instance.MasterParam.GetSkillParam(learning_skill.iname); data = new SkillData(); data.Setup(skillParam.iname, 1, 1, (MasterParam)null); _type = ConceptCardDetailAbility.ShowType.LockSkill; } if (cardSkillDatailDataList.FindIndex((Predicate <ConceptCardSkillDatailData>)(abi => abi.skill_data.SkillParam.iname == data.SkillParam.iname)) <= -1) { cardSkillDatailDataList.Add(new ConceptCardSkillDatailData(fromAbility, data, _type, learning_skill)); } } } return(cardSkillDatailDataList); }
private void RefreshEquipTarget(ConceptCardEffectsParam equipParam) { if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.mGroupNameField, (UnityEngine.Object)null)) { return; } this.mGroupNameField.set_text(string.Empty); if (this.mIsBaseParam) { this.mGroupNameField.set_text(LocalizedText.Get("sys.CONCEPT_CARD_STATUS_DEFAULT_TITLE")); } else { if (equipParam == null || string.IsNullOrEmpty(equipParam.statusup_skill)) { return; } SkillParam skillParam = MonoSingleton <GameManager> .Instance.MasterParam.GetSkillParam(equipParam.statusup_skill); if (skillParam == null) { return; } this.mGroupNameField.set_text(skillParam.expr + LocalizedText.Get("sys.CONCEPT_CARD_STATUS_ADDPARAM_TITLE")); } }
public List <BuffEffect> GetEnableCardSkillAddBuffs(UnitData unit, SkillParam parent_card_skill) { List <BuffEffect> buffEffectList = new List <BuffEffect>(); if (unit == null) { return(buffEffectList); } List <ConceptCardEquipEffect> enableEquipEffects = this.GetEnableEquipEffects(unit, unit.Jobs[unit.JobIndex]); for (int index = 0; index < enableEquipEffects.Count; ++index) { if (enableEquipEffects[index].CardSkill != null && !(enableEquipEffects[index].CardSkill.SkillID != parent_card_skill.iname)) { if (enableEquipEffects[index].AddCardSkillBuffEffectAwake != null) { buffEffectList.Add(enableEquipEffects[index].AddCardSkillBuffEffectAwake); } if (enableEquipEffects[index].AddCardSkillBuffEffectLvMax != null) { buffEffectList.Add(enableEquipEffects[index].AddCardSkillBuffEffectLvMax); } } } return(buffEffectList); }
public static string SkillEffect(SkillParam skill) { AssetPath.mSB.Length = 0; AssetPath.mSB.Append("SkillEff/"); AssetPath.mSB.Append(skill.effect); return(AssetPath.mSB.ToString()); }
private void CreateCardSkillBonus(ConceptCardEffectsParam[] effect_params, int lv, int lv_cap, int awake_count_cap, bool is_enable) { if (Object.op_Equality((Object)this.mParamTemplate, (Object)null)) { return; } Transform parent = this.mParamTemplate.get_transform().get_parent(); List <string> stringList = new List <string>(); for (int index1 = 0; index1 < effect_params.Length; ++index1) { if (!string.IsNullOrEmpty(effect_params[index1].card_skill)) { SkillParam skillParam = MonoSingleton <GameManager> .Instance.MasterParam.GetSkillParam(effect_params[index1].card_skill); if (skillParam != null && !string.IsNullOrEmpty(effect_params[index1].add_card_skill_buff_lvmax) && !stringList.Contains(skillParam.iname)) { BaseStatus status = new BaseStatus(); BaseStatus scale_status = new BaseStatus(); SkillData skill = new SkillData(); skill.Setup(skillParam.iname, lv, lv_cap, (MasterParam)null); SkillData.GetPassiveBuffStatus(skill, (BuffEffect[])null, EElement.None, ref status, ref scale_status); BaseStatus total_add = new BaseStatus(); BaseStatus total_scale = new BaseStatus(); effect_params[index1].GetAddCardSkillBuffStatusLvMax(lv, lv_cap, awake_count_cap, ref total_add, ref total_scale); string str1 = !Object.op_Inequality((Object)this.mParamStatusList, (Object)null) ? string.Empty : ((Object)this.mParamStatusList).get_name(); string str2 = !Object.op_Inequality((Object)this.mBonusStatusList, (Object)null) ? string.Empty : ((Object)this.mBonusStatusList).get_name(); GameObject root = (GameObject)Object.Instantiate <GameObject>((M0)this.mParamTemplate); root.get_transform().SetParent(parent, false); StatusList[] componentsInChildren = (StatusList[])root.GetComponentsInChildren <StatusList>(); for (int index2 = 0; index2 < componentsInChildren.Length; ++index2) { if (((Object)componentsInChildren[index2]).get_name().StartsWith(str1)) { componentsInChildren[index2].SetValues_Restrict(status, scale_status, total_add, total_scale, false); } else if (((Object)componentsInChildren[index2]).get_name().StartsWith(str2)) { componentsInChildren[index2].SetValues_Restrict(status, scale_status, total_add, total_scale, true); } } if (Object.op_Inequality((Object)this.mAwakeIconImageArray, (Object)null)) { this.mAwakeIconImageArray.ImageIndex = this.mAwakeIconImageArray.Images.Length - 1; } DataSource.Bind <SkillParam>(root, skillParam); DataSource.Bind <bool>(((Component)this).get_gameObject(), is_enable); GameParameter.UpdateAll(root); stringList.Add(skillParam.iname); ++this.mCreatedCount; } } } if (Object.op_Inequality((Object)this.mAwakeIconBgArray, (Object)null)) { this.mAwakeIconBgArray.ImageIndex = !is_enable ? 1 : 0; } this.mParamTemplate.SetActive(false); }
public bool IsEnableHeightRangeBonus() { if (SkillParam.IsTypeLaser(this.select_range) || SkillParam.IsTypeLaser(this.select_scope)) { return(false); } return((this.flags & SkillFlags.EnableHeightRangeBonus) != (SkillFlags)0); }
public bool Equals(MapEffectParam me_param, SkillParam skill_param) { if (this.mMapEffectParam == me_param) { return(this.mSkillParam == skill_param); } return(false); }
public void Setup(UnitData unit, SkillParam skill) { if (unit == null || skill == null) { return; } this.mTitleText.set_text(LocalizedText.Get("sys.TOBIRA_LEARN_NEW_LEADER_SKILL_TEXT")); this.mNameText.set_text(skill.name); this.mDescText.set_text(skill.expr); DataSource.Bind <UnitData>(((Component)this).get_gameObject(), unit); GameParameter.UpdateAll(((Component)this).get_gameObject()); }
private void UpdateLeaderSkills() { if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.LeaderSkill, (UnityEngine.Object)null)) { SkillParam data = (SkillParam)null; if (this.mIsHeloOnly) { if (this.mGuestUnits != null && this.mGuestUnits.Count > 0 && this.mGuestUnits[0].LeaderSkill != null) { data = this.mGuestUnits[0].LeaderSkill.SkillParam; } } else if (this.mCurrentParty[0] != null) { if (this.mCurrentParty[0].LeaderSkill != null) { data = this.mCurrentParty[0].LeaderSkill.SkillParam; } } else if (this.mSlotData[0].Type == PartySlotType.Npc || this.mSlotData[0].Type == PartySlotType.NpcHero) { UnitParam unitParam = MonoSingleton <GameManager> .Instance.MasterParam.GetUnitParam(this.mSlotData[0].UnitName); if (unitParam != null && unitParam.leader_skills != null && unitParam.leader_skills.Length >= 4) { string leaderSkill = unitParam.leader_skills[4]; if (!string.IsNullOrEmpty(leaderSkill)) { data = MonoSingleton <GameManager> .Instance.MasterParam.GetSkillParam(leaderSkill); } } } else if (this.mGuestUnits != null && this.mGuestUnits.Count > 0 && this.mGuestUnits[0].LeaderSkill != null) { data = this.mGuestUnits[0].LeaderSkill.SkillParam; } this.LeaderSkill.SetSlotData <SkillParam>(data); } if (!UnityEngine.Object.op_Inequality((UnityEngine.Object) this.SupportSkill, (UnityEngine.Object)null)) { return; } SupportData supportData = !this.mIsUserOwnUnits ? this.mCurrentSupport : MonoSingleton <GameManager> .Instance.Player.Supports.Find((Predicate <SupportData>)(f => f.FUID == GlobalVars.SelectedFriendID)) ?? GlobalVars.SelectedSupport.Get(); SkillParam data1 = (SkillParam)null; if (supportData != null && supportData.Unit.LeaderSkill != null && supportData.IsFriend()) { data1 = supportData.Unit.LeaderSkill.SkillParam; } this.SupportSkill.SetSlotData <SkillParam>(data1); }
public int CalcBuffEffectValue(ParamTypes type, int src, SkillEffectTargets target = SkillEffectTargets.Target) { BuffEffect buffEffect = this.GetBuffEffect(target); if (buffEffect == null) { return(src); } BuffEffect.BuffTarget buffTarget = buffEffect[type]; if (buffTarget == null) { return(src); } return(SkillParam.CalcSkillEffectValue(buffTarget.calcType, (int)buffTarget.value, src)); }
private void CreateAbilityBonus(ConceptCardEffectsParam[] effect_params, int lv, int lv_cap, int awake_count_cap, bool is_enable) { if (Object.op_Equality((Object)this.mParamTemplate, (Object)null)) { return; } Transform parent = this.mParamTemplate.get_transform().get_parent(); List <string> stringList = new List <string>(); for (int index1 = 0; index1 < effect_params.Length; ++index1) { if (!string.IsNullOrEmpty(effect_params[index1].abil_iname) && !string.IsNullOrEmpty(effect_params[index1].abil_iname_lvmax)) { AbilityParam abilityParam = MonoSingleton <GameManager> .Instance.MasterParam.GetAbilityParam(effect_params[index1].abil_iname_lvmax); if (!stringList.Contains(abilityParam.iname)) { for (int index2 = 0; index2 < abilityParam.skills.Length; ++index2) { SkillParam skillParam = MonoSingleton <GameManager> .Instance.MasterParam.GetSkillParam(abilityParam.skills[index2].iname); if (skillParam != null) { GameObject root = (GameObject)Object.Instantiate <GameObject>((M0)this.mParamTemplate); root.get_transform().SetParent(parent, false); if (Object.op_Inequality((Object)this.mAwakeIconImageArray, (Object)null)) { this.mAwakeIconImageArray.ImageIndex = this.mAwakeIconImageArray.Images.Length - 1; } DataSource.Bind <SkillParam>(root, skillParam); DataSource.Bind <bool>(((Component)this).get_gameObject(), is_enable); GameParameter.UpdateAll(root); ++this.mCreatedCount; } } stringList.Add(abilityParam.iname); } } } if (Object.op_Inequality((Object)this.mAwakeIconBgArray, (Object)null)) { this.mAwakeIconBgArray.ImageIndex = !is_enable ? 1 : 0; } this.mParamTemplate.SetActive(false); }
private void Refresh() { if (this.Skills == null) { return; } for (int index = 0; index < this.Skills.Count; ++index) { SkillParam skill = this.Skills[index]; if (skill != null) { GameObject gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.SkillTemplate); DataSource.Bind <SkillParam>(gameObject, skill); gameObject.get_transform().SetParent(this.SkillParent, false); gameObject.SetActive(true); } } }
public List <ConceptCardSkillDatailData> GetAbilityDatailData() { List <ConceptCardSkillDatailData> cardSkillDatailDataList = new List <ConceptCardSkillDatailData>(); List <ConceptCardEquipEffect> abilities = this.GetAbilities(); List <ConceptCardEquipEffect> cardSkills = this.GetCardSkills(); for (int index = 0; index < cardSkills.Count; ++index) { SkillData skill = cardSkills[index].CardSkill; if (skill != null && cardSkillDatailDataList.FindIndex((Predicate <ConceptCardSkillDatailData>)(abi => abi.skill_data.SkillParam.iname == skill.SkillParam.iname)) <= -1) { cardSkillDatailDataList.Add(new ConceptCardSkillDatailData(cardSkills[index], skill, ConceptCardDetailAbility.ShowType.Skill, (LearningSkill)null)); } } for (int index1 = 0; index1 < abilities.Count; ++index1) { AbilityData ability = abilities[index1].Ability; if (ability != null) { for (int index2 = 0; index2 < ability.LearningSkills.Length; ++index2) { LearningSkill learning_skill = ability.LearningSkills[index2]; if (learning_skill != null) { ConceptCardDetailAbility.ShowType _type = ConceptCardDetailAbility.ShowType.Ability; SkillData data = ability.Skills.Find((Predicate <SkillData>)(x => x.SkillParam.iname == learning_skill.iname)); if (data == null) { SkillParam skillParam = MonoSingleton <GameManager> .Instance.MasterParam.GetSkillParam(learning_skill.iname); data = new SkillData(); data.Setup(skillParam.iname, 1, 1, (MasterParam)null); _type = ConceptCardDetailAbility.ShowType.LockSkill; } if (cardSkillDatailDataList.FindIndex((Predicate <ConceptCardSkillDatailData>)(abi => abi.skill_data.SkillParam.iname == data.SkillParam.iname)) <= -1) { cardSkillDatailDataList.Add(new ConceptCardSkillDatailData(abilities[index1], data, _type, learning_skill)); } } } } } return(cardSkillDatailDataList); }
public void Setup(ConceptCardEffectsParam[] effect_params, int awake_count, int awake_count_cap, bool is_enable) { if (Object.op_Equality((Object)this.mSkillParamTemplate, (Object)null)) { return; } this.mIsEnable = is_enable; Transform parent = this.mSkillParamTemplate.get_transform().get_parent(); List <string> stringList = new List <string>(); for (int index = 0; index < effect_params.Length; ++index) { if (!string.IsNullOrEmpty(effect_params[index].card_skill)) { SkillParam skillParam = MonoSingleton <GameManager> .Instance.MasterParam.GetSkillParam(effect_params[index].card_skill); if (skillParam != null && !string.IsNullOrEmpty(effect_params[index].add_card_skill_buff_awake) && !stringList.Contains(skillParam.iname)) { BaseStatus total_add = new BaseStatus(); BaseStatus total_scale = new BaseStatus(); effect_params[index].GetAddCardSkillBuffStatusAwake(awake_count, awake_count_cap, ref total_add, ref total_scale); GameObject root = (GameObject)Object.Instantiate <GameObject>((M0)this.mSkillParamTemplate); root.get_transform().SetParent(parent, false); ((StatusList)root.GetComponentInChildren <StatusList>()).SetValues(total_add, total_scale, false); if (Object.op_Inequality((Object)this.mAwakeIconImageArray, (Object)null)) { this.mAwakeIconImageArray.ImageIndex = awake_count - 1; } DataSource.Bind <SkillParam>(root, skillParam); DataSource.Bind <bool>(((Component)this).get_gameObject(), is_enable); GameParameter.UpdateAll(root); stringList.Add(skillParam.iname); ++this.mCreatedCount; } } } if (Object.op_Inequality((Object)this.mAwakeIconBgArray, (Object)null)) { this.mAwakeIconBgArray.ImageIndex = !is_enable ? 1 : 0; } this.mSkillParamTemplate.SetActive(false); ((Component)this).get_gameObject().SetActive(this.mCreatedCount > 0); }
public static void UpdateReplaceSkill(List <SkillParam> sp_lists) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type SkillParam.\u003CUpdateReplaceSkill\u003Ec__AnonStorey23A skillCAnonStorey23A = new SkillParam.\u003CUpdateReplaceSkill\u003Ec__AnonStorey23A(); using (List <SkillParam> .Enumerator enumerator = sp_lists.GetEnumerator()) { while (enumerator.MoveNext()) { // ISSUE: reference to a compiler-generated field skillCAnonStorey23A.sp = enumerator.Current; // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field if (skillCAnonStorey23A.sp.ReplaceChangeIdLists != null && skillCAnonStorey23A.sp.ReplaceChangeIdLists.Count > 0 && (skillCAnonStorey23A.sp.ReplaceTargetIdLists != null && skillCAnonStorey23A.sp.ReplaceTargetIdLists.Count > 0) && skillCAnonStorey23A.sp.ReplaceChangeIdLists.Count == skillCAnonStorey23A.sp.ReplaceTargetIdLists.Count) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type SkillParam.\u003CUpdateReplaceSkill\u003Ec__AnonStorey23B skillCAnonStorey23B = new SkillParam.\u003CUpdateReplaceSkill\u003Ec__AnonStorey23B(); // ISSUE: reference to a compiler-generated field skillCAnonStorey23B.\u003C\u003Ef__ref\u0024570 = skillCAnonStorey23A; // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field for (skillCAnonStorey23B.idx = 0; skillCAnonStorey23B.idx < skillCAnonStorey23A.sp.ReplaceChangeIdLists.Count; ++skillCAnonStorey23B.idx) { // ISSUE: reference to a compiler-generated method SkillParam skillParam1 = sp_lists.Find(new Predicate <SkillParam>(skillCAnonStorey23B.\u003C\u003Em__1AF)); // ISSUE: reference to a compiler-generated method SkillParam skillParam2 = sp_lists.Find(new Predicate <SkillParam>(skillCAnonStorey23B.\u003C\u003Em__1B0)); if (skillParam1 != null && skillParam2 != null && string.IsNullOrEmpty(skillParam1.ReplacedTargetId)) { skillParam1.ReplacedTargetId = skillParam2.iname; } } } } } }
public static void UpdateReplaceSkill(List <SkillParam> sp_lists) { using (List <SkillParam> .Enumerator enumerator = sp_lists.GetEnumerator()) { while (enumerator.MoveNext()) { SkillParam sp = enumerator.Current; if (sp.ReplaceChangeIdLists != null && sp.ReplaceChangeIdLists.Count > 0 && (sp.ReplaceTargetIdLists != null && sp.ReplaceTargetIdLists.Count > 0) && sp.ReplaceChangeIdLists.Count == sp.ReplaceTargetIdLists.Count) { for (int idx = 0; idx < sp.ReplaceChangeIdLists.Count; ++idx) { SkillParam skillParam1 = sp_lists.Find((Predicate <SkillParam>)(skill => skill.iname == sp.ReplaceChangeIdLists[idx])); SkillParam skillParam2 = sp_lists.Find((Predicate <SkillParam>)(skill => skill.iname == sp.ReplaceTargetIdLists[idx])); if (skillParam1 != null && skillParam2 != null && string.IsNullOrEmpty(skillParam1.ReplacedTargetId)) { skillParam1.ReplacedTargetId = skillParam2.iname; } } } } } }
public void Setup(string iname, int rank, int rankcap = 1, MasterParam master = null) { if (string.IsNullOrEmpty(iname)) { this.Reset(); } else { if (master == null) { master = MonoSingleton <GameManager> .GetInstanceDirect().MasterParam; } this.mSkillParam = master.GetSkillParam(iname); this.mRankCap = (int)this.mSkillParam.lvcap != 0 ? (OInt)Math.Max((int)this.mSkillParam.lvcap, 1) : (OInt)Math.Max(rankcap, 1); this.mRank = (OInt)Math.Min(rank, (int)this.mRankCap); this.mTargetBuffEffect = BuffEffect.CreateBuffEffect(master.GetBuffEffectParam(this.SkillParam.target_buff_iname), (int)this.mRank, (int)this.mRankCap); this.mSelfBuffEffect = BuffEffect.CreateBuffEffect(master.GetBuffEffectParam(this.SkillParam.self_buff_iname), (int)this.mRank, (int)this.mRankCap); this.mTargetCondEffect = CondEffect.CreateCondEffect(master.GetCondEffectParam(this.SkillParam.target_cond_iname), (int)this.mRank, (int)this.mRankCap); this.mSelfCondEffect = CondEffect.CreateCondEffect(master.GetCondEffectParam(this.SkillParam.self_cond_iname), (int)this.mRank, (int)this.mRankCap); this.UpdateParam(); } }
private void UpdateLeaderSkills() { if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.LeaderSkill, (UnityEngine.Object)null)) { SkillParam data = (SkillParam)null; if (this.mIsHeloOnly) { if (this.mGuestUnit != null && this.mGuestUnit.LeaderSkill != null) { data = this.mGuestUnit.LeaderSkill.SkillParam; } } else if (this.mCurrentParty[0] != null) { if (this.mCurrentParty[0].LeaderSkill != null) { data = this.mCurrentParty[0].LeaderSkill.SkillParam; } } else if (this.mGuestUnit != null && this.mGuestUnit.LeaderSkill != null) { data = this.mGuestUnit.LeaderSkill.SkillParam; } this.LeaderSkill.SetSlotData <SkillParam>(data); } if (!UnityEngine.Object.op_Inequality((UnityEngine.Object) this.SupportSkill, (UnityEngine.Object)null)) { return; } SupportData supportData = !this.mIsUserOwnUnits ? this.mSupportData : MonoSingleton <GameManager> .Instance.Player.Supports.Find((Predicate <SupportData>)(f => f.FUID == GlobalVars.SelectedFriendID)); SkillParam data1 = (SkillParam)null; if (supportData != null && supportData.Unit.LeaderSkill != null) { data1 = supportData.Unit.LeaderSkill.SkillParam; } this.SupportSkill.SetSlotData <SkillParam>(data1); }
public void Setup(SkillParam baseSkill, List <SkillDeriveParam> skillDeriveParams) { if (skillDeriveParams != null && skillDeriveParams.Count > 0) { using (List <SkillDeriveParam> .Enumerator enumerator = skillDeriveParams.GetEnumerator()) { while (enumerator.MoveNext()) { this.CreateDeriveSkillItem(enumerator.Current); } } } else { this.IsShowBaseSkill = true; } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_BaseSkillRoot, (UnityEngine.Object)null)) { DataSource.Bind <SkillParam>(this.m_BaseSkillRoot, baseSkill); } this.UpdateUIActive(); }
public void Refresh() { AbilityData dataOfClass = DataSource.FindDataOfClass <AbilityData>(((Component)this).get_gameObject(), (AbilityData)null); if (dataOfClass != null) { this.mSkills = new List <GameObject>(dataOfClass.LearningSkills.Length); for (int index = 0; index < dataOfClass.LearningSkills.Length; ++index) { if (dataOfClass.LearningSkills[index] != null && dataOfClass.Rank >= dataOfClass.LearningSkills[index].locklv) { GameObject gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.SkillTemplate); SkillParam skillParam = MonoSingleton <GameManager> .Instance.GetSkillParam(dataOfClass.LearningSkills[index].iname); DataSource.Bind <SkillParam>(gameObject, skillParam); gameObject.get_transform().SetParent(this.SkillParent, false); gameObject.SetActive(true); this.mSkills.Add(gameObject); } } } ((Component)this).get_gameObject().SetActive(true); GameParameter.UpdateAll(((Component)this).get_gameObject()); }
private void Start() { this.mUnlocks = DataSource.FindDataOfClass <QuestClearUnlockUnitDataParam[]>(((Component)this).get_gameObject(), (QuestClearUnlockUnitDataParam[])null); if (this.mUnlocks == null) { return; } this.mUnit = DataSource.FindDataOfClass <UnitData>(((Component)this).get_gameObject(), (UnitData)null); if (this.mUnit == null) { return; } if (Object.op_Inequality((Object)this.SkillNewItem, (Object)null)) { this.SkillNewItem.SetActive(false); } if (Object.op_Inequality((Object)this.SkillUpdateItem, (Object)null)) { this.SkillUpdateItem.SetActive(false); } if (Object.op_Inequality((Object)this.AbilityNewItem, (Object)null)) { this.AbilityNewItem.SetActive(false); } if (Object.op_Inequality((Object)this.AbilityUpdateItem, (Object)null)) { this.AbilityUpdateItem.SetActive(false); } if (Object.op_Inequality((Object)this.LeaderSkillNewItem, (Object)null)) { this.LeaderSkillNewItem.SetActive(false); } if (Object.op_Inequality((Object)this.LeaderSkillUpdateItem, (Object)null)) { this.LeaderSkillUpdateItem.SetActive(false); } if (Object.op_Inequality((Object)this.MasterAbilityNewItem, (Object)null)) { this.MasterAbilityNewItem.SetActive(false); } ((Component)this.CloseButton).get_gameObject().SetActive(false); MasterParam masterParam = MonoSingleton <GameManager> .Instance.MasterParam; for (int index = 0; index < this.mUnlocks.Length; ++index) { GameObject gameObject = (GameObject)null; AbilityParam data1 = (AbilityParam)null; SkillParam data2 = (SkillParam)null; switch (this.mUnlocks[index].type + 1) { case QuestClearUnlockUnitDataParam.EUnlockTypes.Ability: gameObject = !this.mUnlocks[index].add ? this.CreateInstance(this.SkillUpdateItem) : this.CreateInstance(this.SkillNewItem); data1 = masterParam.GetAbilityParam(this.mUnlocks[index].parent_id); data2 = masterParam.GetSkillParam(this.mUnlocks[index].new_id); break; case QuestClearUnlockUnitDataParam.EUnlockTypes.LeaderSkill: gameObject = this.CreateInstance(!this.mUnlocks[index].add ? this.AbilityUpdateItem : this.AbilityNewItem); data1 = masterParam.GetAbilityParam(this.mUnlocks[index].new_id); break; case QuestClearUnlockUnitDataParam.EUnlockTypes.MasterAbility: gameObject = this.CreateInstance(!this.mUnlocks[index].add ? this.LeaderSkillUpdateItem : this.LeaderSkillNewItem); data2 = masterParam.GetSkillParam(this.mUnlocks[index].new_id); break; case QuestClearUnlockUnitDataParam.EUnlockTypes.CollaboAbility: gameObject = this.CreateInstance(!this.mUnlocks[index].add ? this.MasterAbilityUpdateItem : this.MasterAbilityNewItem); data1 = masterParam.GetAbilityParam(this.mUnlocks[index].new_id); if (data1 != null && data1.skills != null) { data2 = masterParam.GetSkillParam(data1.skills[0].iname); break; } break; case QuestClearUnlockUnitDataParam.EUnlockTypes.Ability | QuestClearUnlockUnitDataParam.EUnlockTypes.MasterAbility: gameObject = this.CreateInstance(!this.mUnlocks[index].add ? this.MasterAbilityUpdateItem : this.MasterAbilityNewItem); data2 = masterParam.GetSkillParam(this.mUnlocks[index].new_id); break; } if (Object.op_Inequality((Object)this.ItemWindow, (Object)null) && Object.op_Inequality((Object)gameObject, (Object)null)) { if (data1 != null) { DataSource.Bind <AbilityParam>(gameObject, data1); } if (data2 != null) { DataSource.Bind <SkillParam>(gameObject, data2); } gameObject.get_transform().SetParent(this.ItemWindow.get_transform(), false); gameObject.SetActive(false); this.mListItems.Add(gameObject); } } if (this.mListItems.Count <= 0) { return; } if (Object.op_Inequality((Object)this.ItemWindow, (Object)null)) { this.mWindowAnimator = (Animator)this.ItemWindow.GetComponent <Animator>(); } this.mListItems[0].SetActive(true); }
private void Reset() { this.mSkillParam = (SkillParam)null; this.mRank = (OInt)1; }
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); } } } } } }
private void Refresh() { UnitData data1 = (UnitData)null; if (UnityEngine.Object.op_Implicit((UnityEngine.Object)UnitEnhanceV3.Instance)) { data1 = UnitEnhanceV3.Instance.CurrentUnit; } if (data1 == null) { data1 = MonoSingleton <GameManager> .Instance.Player.FindUnitDataByUniqueID((long)GlobalVars.SelectedUnitUniqueID); } if (data1 == null && AbilityDetailWindow.BindUnit != null) { data1 = AbilityDetailWindow.BindUnit; } if (data1 == null && AbilityDetailWindow.BindAbility == null) { DebugUtility.LogError("Not found bind unit data."); } else { if (AbilityDetailWindow.BindAbility != null) { DataSource.Bind <AbilityParam>(((Component)this).get_gameObject(), AbilityDetailWindow.BindAbility); if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.SkillTemplate, (UnityEngine.Object)null)) { List <AbilityDetailWindow.ViewContentParam> viewContentParams = new List <AbilityDetailWindow.ViewContentParam>(); if (AbilityDetailWindow.BindAbility.skills != null) { for (int index = 0; index < AbilityDetailWindow.BindAbility.skills.Length; ++index) { SkillParam skillParam = MonoSingleton <GameManager> .Instance.GetSkillParam(AbilityDetailWindow.BindAbility.skills[index].iname); AbilityDetailWindow.AddSkillParam(viewContentParams, skillParam, (SkillDeriveParam)null); } } for (int index = 0; index < viewContentParams.Count; ++index) { GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.SkillTemplate); SkillDeriveList componentInChildren = (SkillDeriveList)gameObject.GetComponentInChildren <SkillDeriveList>(); componentInChildren.Setup(viewContentParams[index].m_SkillParam, viewContentParams[index].m_SkillDeriveParams); gameObject.get_transform().SetParent(this.SkillLayoutParent, false); gameObject.SetActive(true); this.m_SkillDeriveList.Add(componentInChildren); } } } else { AbilityData data2 = data1.GetAbilityData((long)GlobalVars.SelectedAbilityUniqueID); AbilityParam abilityParam = MonoSingleton <GameManager> .Instance.GetAbilityParam((string)GlobalVars.SelectedAbilityID); QuestClearUnlockUnitDataParam[] unlockedSkills = data1.UnlockedSkills; List <QuestClearUnlockUnitDataParam> unlockUnitDataParamList = new List <QuestClearUnlockUnitDataParam>(); QuestClearUnlockUnitDataParam[] allUnlockUnitDatas = MonoSingleton <GameManager> .Instance.MasterParam.GetAllUnlockUnitDatas(); if (allUnlockUnitDatas != null) { for (int index = 0; index < allUnlockUnitDatas.Length; ++index) { QuestClearUnlockUnitDataParam param = allUnlockUnitDatas[index]; if (param.type == QuestClearUnlockUnitDataParam.EUnlockTypes.Skill && param.uid == data1.UnitID && param.parent_id == abilityParam.iname && (unlockedSkills == null || Array.FindIndex <QuestClearUnlockUnitDataParam>(unlockedSkills, (Predicate <QuestClearUnlockUnitDataParam>)(p => p.iname == param.iname)) == -1)) { unlockUnitDataParamList.Add(param); } } } if (data2 != null && data2.Param != null && data2.IsDeriveBaseAbility) { data2 = data2.DerivedAbility; } RarityParam rarityParam = MonoSingleton <GameManager> .Instance.GetRarityParam((int)data1.UnitParam.raremax); int num = Math.Min((int)rarityParam.UnitLvCap + (int)rarityParam.UnitAwakeLvCap, abilityParam.GetRankCap()); DataSource.Bind <UnitData>(((Component)this).get_gameObject(), data1); DataSource.Bind <AbilityData>(((Component)this).get_gameObject(), data2); AbilityParam data3 = abilityParam; if (AbilityDetailWindow.IsEnableSkillChange) { string key = data1.SearchAbilityReplacementSkill(abilityParam.iname); if (!string.IsNullOrEmpty(key)) { data3 = MonoSingleton <GameManager> .Instance.GetAbilityParam(key); } } DataSource.Bind <AbilityParam>(((Component)this).get_gameObject(), data3); if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.SkillTemplate, (UnityEngine.Object)null)) { List <AbilityDetailWindow.ViewContentParam> viewContentParams = new List <AbilityDetailWindow.ViewContentParam>(); if (data2 != null && data2.LearningSkills != null) { for (int index1 = 0; index1 < data2.LearningSkills.Length; ++index1) { if (data2.LearningSkills[index1].locklv <= num) { string str1 = data2.LearningSkills[index1].iname; if (unlockedSkills != null) { for (int index2 = 0; index2 < unlockedSkills.Length; ++index2) { if (unlockedSkills[index2].old_id == str1) { str1 = unlockedSkills[index2].new_id; break; } } } if (AbilityDetailWindow.IsEnableSkillChange) { string str2 = data1.SearchReplacementSkill(str1); if (!string.IsNullOrEmpty(str2)) { str1 = str2; } } SkillData[] deriveSkills = data2.FindDeriveSkills(str1); if (deriveSkills.Length > 0) { foreach (SkillData skillData in deriveSkills) { AbilityDetailWindow.AddSkillParam(viewContentParams, skillData.SkillParam, skillData.DeriveParam); } } else { AbilityDetailWindow.AddSkillParam(viewContentParams, MonoSingleton <GameManager> .Instance.GetSkillParam(str1), (SkillDeriveParam)null); } } } if (unlockedSkills != null) { for (int index = 0; index < unlockedSkills.Length; ++index) { if (unlockedSkills[index].add && unlockedSkills[index].parent_id == data2.AbilityID) { AbilityDetailWindow.AddSkillParam(viewContentParams, MonoSingleton <GameManager> .Instance.GetSkillParam(unlockedSkills[index].new_id), (SkillDeriveParam)null); } } } } else { for (int index = 0; index < abilityParam.skills.Length; ++index) { if (abilityParam.skills[index].locklv <= num) { AbilityDetailWindow.AddSkillParam(viewContentParams, MonoSingleton <GameManager> .Instance.GetSkillParam(abilityParam.skills[index].iname), (SkillDeriveParam)null); } } } if (data1.MasterAbility != null && data1.CollaboAbility != null) { AbilityData abilityData = data1.MasterAbility; if (data1.MasterAbility.IsDeriveBaseAbility) { abilityData = data1.MasterAbility.DerivedAbility; } if (abilityData == data2) { using (List <SkillData> .Enumerator enumerator = data1.CollaboAbility.Skills.GetEnumerator()) { while (enumerator.MoveNext()) { SkillData current = enumerator.Current; AbilityDetailWindow.AddSkillParam(viewContentParams, current.SkillParam, (SkillDeriveParam)null); } } } } for (int index = 0; index < viewContentParams.Count; ++index) { GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.SkillTemplate); SkillDeriveList componentInChildren = (SkillDeriveList)gameObject.GetComponentInChildren <SkillDeriveList>(); componentInChildren.Setup(viewContentParams[index].m_SkillParam, viewContentParams[index].m_SkillDeriveParams); gameObject.get_transform().SetParent(this.SkillLayoutParent, false); gameObject.SetActive(true); this.m_SkillDeriveList.Add(componentInChildren); } for (int index = 0; index < unlockUnitDataParamList.Count; ++index) { GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.SkillLockedTemplate); DataSource.Bind <SkillParam>(gameObject, MonoSingleton <GameManager> .Instance.GetSkillParam(unlockUnitDataParamList[index].new_id)); DataSource.Bind <QuestClearUnlockUnitDataParam>(gameObject, unlockUnitDataParamList[index]); gameObject.get_transform().SetParent(this.SkillLayoutParent, false); gameObject.SetActive(true); } for (int index = 0; index < viewContentParams.Count; ++index) { if (viewContentParams[index].m_SkillDeriveParams != null && viewContentParams[index].m_SkillDeriveParams.Count >= 1) { this.m_ShowBaseToggle.set_interactable(true); break; } } } } GameParameter.UpdateAll(((Component)this).get_gameObject()); } }
private static void AddSkillParam(List <AbilityDetailWindow.ViewContentParam> viewContentParams, SkillParam skillParam, SkillDeriveParam skillDeriveParam) { if (skillDeriveParam != null) { skillParam = skillDeriveParam.m_BaseParam; } AbilityDetailWindow.ViewContentParam viewContentParam1 = viewContentParams.Find((Predicate <AbilityDetailWindow.ViewContentParam>)(param => param.m_SkillParam == skillParam)); if (viewContentParam1 != null) { viewContentParam1.m_SkillDeriveParams.Add(skillDeriveParam); } else { AbilityDetailWindow.ViewContentParam viewContentParam2 = new AbilityDetailWindow.ViewContentParam(); viewContentParam2.m_SkillParam = skillParam; if (skillDeriveParam != null) { viewContentParam2.m_SkillDeriveParams = new List <SkillDeriveParam>(); viewContentParam2.m_SkillDeriveParams.Add(skillDeriveParam); } viewContentParams.Add(viewContentParam2); } }
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 string GetCondText(UnitParam unit) { if (unit == null) { return(string.Empty); } string str1 = string.Empty; string str2 = string.Empty; string str3 = string.Empty; if (this.type == QuestClearUnlockUnitDataParam.EUnlockTypes.Ability || this.type == QuestClearUnlockUnitDataParam.EUnlockTypes.Skill) { OString[] jobsets = unit.jobsets; if (jobsets != null) { MasterParam masterParam = MonoSingleton <GameManager> .Instance.MasterParam; JobParam[] jobParamArray = new JobParam[jobsets.Length]; for (int index = 0; index < jobsets.Length; ++index) { JobSetParam jobSetParam = masterParam.GetJobSetParam((string)jobsets[index]); if (jobSetParam != null) { jobParamArray[index] = MonoSingleton <GameManager> .Instance.MasterParam.GetJobParam(jobSetParam.job); } } if (this.type == QuestClearUnlockUnitDataParam.EUnlockTypes.Ability) { if (!this.add) { for (int index = 0; index < jobParamArray.Length; ++index) { if (jobParamArray[index].FindRankOfAbility(this.old_id) != -1) { str1 = jobParamArray[index].name; break; } } } } else if (this.type == QuestClearUnlockUnitDataParam.EUnlockTypes.Skill) { for (int index1 = 0; index1 < jobParamArray.Length; ++index1) { for (int lv = 0; lv < JobParam.MAX_JOB_RANK; ++lv) { OString[] learningAbilitys = jobParamArray[index1].GetLearningAbilitys(lv); if (learningAbilitys != null && learningAbilitys.Length >= 1) { for (int index2 = 0; index2 < learningAbilitys.Length; ++index2) { if (this.add) { if ((string)learningAbilitys[index2] == this.parent_id) { str1 = jobParamArray[index1].name; break; } } else { AbilityParam abilityParam = MonoSingleton <GameManager> .Instance.MasterParam.GetAbilityParam((string)learningAbilitys[index2]); if (abilityParam != null && Array.FindIndex <LearningSkill>(abilityParam.skills, (Predicate <LearningSkill>)(p => p.iname == (!this.add ? this.old_id : this.parent_id))) != -1) { str1 = jobParamArray[index1].name; break; } } } if (!string.IsNullOrEmpty(str1)) { break; } } } if (!string.IsNullOrEmpty(str1)) { break; } } } } } if (!string.IsNullOrEmpty(str1)) { str1 = LocalizedText.Get("sys.PARTYEDITOR_COND_UNLOCK_TEXTFRAME", new object[1] { (object)str1 }); } switch (this.type + 1) { case QuestClearUnlockUnitDataParam.EUnlockTypes.Ability: case QuestClearUnlockUnitDataParam.EUnlockTypes.MasterAbility: if (this.add) { str2 = LocalizedText.Get(!string.IsNullOrEmpty(str1) ? "sys.UNITLIST_REWRITE_ABILITY" : "sys.UNITLIST_REWRITE_MASTERABILITY"); AbilityParam abilityParam = MonoSingleton <GameManager> .Instance.MasterParam.GetAbilityParam(this.parent_id); str3 = abilityParam == null ? str3 : abilityParam.name; break; } str2 = this.type != QuestClearUnlockUnitDataParam.EUnlockTypes.LeaderSkill ? LocalizedText.Get(!string.IsNullOrEmpty(str1) ? "sys.UNITLIST_REWRITE_SKILL" : "sys.UNITLIST_REWRITE_MASTERABILITY") : LocalizedText.Get("sys.UNITLIST_REWRITE_LEADERSKILL"); SkillParam skillParam1 = MonoSingleton <GameManager> .Instance.MasterParam.GetSkillParam(this.old_id); str3 = skillParam1 == null ? str3 : skillParam1.name; break; case QuestClearUnlockUnitDataParam.EUnlockTypes.LeaderSkill: if (this.add) { str2 = LocalizedText.Get("sys.UNITLIST_REWRITE_JOB"); JobParam jobParam = MonoSingleton <GameManager> .Instance.MasterParam.GetJobParam(this.parent_id); str3 = jobParam == null ? str3 : jobParam.name; break; } str2 = LocalizedText.Get("sys.UNITLIST_REWRITE_ABILITY"); AbilityParam abilityParam1 = MonoSingleton <GameManager> .Instance.MasterParam.GetAbilityParam(this.old_id); str3 = abilityParam1 == null ? str3 : abilityParam1.name; break; case QuestClearUnlockUnitDataParam.EUnlockTypes.CollaboAbility: if (!this.add) { str2 = LocalizedText.Get("sys.UNITLIST_REWRITE_MASTERABILITY"); AbilityParam abilityParam2 = MonoSingleton <GameManager> .Instance.MasterParam.GetAbilityParam(this.old_id); if (abilityParam2 != null) { SkillParam skillParam2 = MonoSingleton <GameManager> .Instance.MasterParam.GetSkillParam(abilityParam2.skills[0].iname); str3 = skillParam2 == null ? str3 : skillParam2.name; break; } break; } break; } if (string.IsNullOrEmpty(str2) || string.IsNullOrEmpty(str3)) { return(string.Empty); } return(LocalizedText.Get("sys.PARTYEDITOR_COND_UNLOCK_PARENT", (object)str2, (object)str1, (object)str3)); }
public bool CheckGridLineSkill() { SkillParam skillParam = this.SkillParam; return(skillParam != null && skillParam.line_type != ELineType.None && this.RangeMax > 1); }
public static UnitListFilterWindow.SelectType GetFilterMask(UnitListWindow.Data data) { if (data.param == null) { return(UnitListFilterWindow.SelectType.RARITY_1 | UnitListFilterWindow.SelectType.RARITY_2 | UnitListFilterWindow.SelectType.RARITY_3 | UnitListFilterWindow.SelectType.RARITY_4 | UnitListFilterWindow.SelectType.RARITY_5 | UnitListFilterWindow.SelectType.WEAPON_SLASH | UnitListFilterWindow.SelectType.WEAPON_STAB | UnitListFilterWindow.SelectType.WEAPON_BLOW | UnitListFilterWindow.SelectType.WEAPON_SHOT | UnitListFilterWindow.SelectType.WEAPON_MAG | UnitListFilterWindow.SelectType.WEAPON_NONE | UnitListFilterWindow.SelectType.BIRTH_ENV | UnitListFilterWindow.SelectType.BIRTH_WRATH | UnitListFilterWindow.SelectType.BIRTH_SAGA | UnitListFilterWindow.SelectType.BIRTH_SLOTH | UnitListFilterWindow.SelectType.BIRTH_LUST | UnitListFilterWindow.SelectType.BIRTH_WADATSUMI | UnitListFilterWindow.SelectType.BIRTH_DESERT | UnitListFilterWindow.SelectType.BIRTH_GREED | UnitListFilterWindow.SelectType.BIRTH_GLUTTONY | UnitListFilterWindow.SelectType.BIRTH_OTHER | UnitListFilterWindow.SelectType.BIRTH_NOZ); } MasterParam masterParam = MonoSingleton <GameManager> .Instance.MasterParam; UnitParam unitParam = data.param; UnitListFilterWindow.SelectType selectType = UnitListFilterWindow.SelectType.NONE; AttackDetailTypes attackDetailTypes = AttackDetailTypes.None; if (data.unit != null) { UnitData unit = data.unit; if (unit.CurrentJob.GetAttackSkill() != null) { attackDetailTypes = unit.CurrentJob.GetAttackSkill().AttackDetailType; } if (unit.Rarity == 0) { selectType |= UnitListFilterWindow.SelectType.RARITY_1; } else if (unit.Rarity == 1) { selectType |= UnitListFilterWindow.SelectType.RARITY_2; } else if (unit.Rarity == 2) { selectType |= UnitListFilterWindow.SelectType.RARITY_3; } else if (unit.Rarity == 3) { selectType |= UnitListFilterWindow.SelectType.RARITY_4; } else if (unit.Rarity == 4) { selectType |= UnitListFilterWindow.SelectType.RARITY_5; } else if (unit.Rarity == 5) { selectType |= UnitListFilterWindow.SelectType.RARITY_6; } } else { if (unitParam.jobsets != null && unitParam.jobsets.Length > 0) { JobSetParam jobSetParam = MonoSingleton <GameManager> .Instance.GetJobSetParam(unitParam.jobsets[0]); if (jobSetParam != null) { JobParam jobParam = MonoSingleton <GameManager> .Instance.GetJobParam(jobSetParam.job); if (jobParam != null && jobParam.atkskill != null && jobParam.atkskill.Length > 0) { string key = jobParam.atkskill[0]; if (!string.IsNullOrEmpty(key)) { SkillParam skillParam = masterParam.GetSkillParam(key); if (skillParam != null) { attackDetailTypes = skillParam.attack_detail; } } } } } if (unitParam.rare == (byte)0) { selectType |= UnitListFilterWindow.SelectType.RARITY_1; } else if (unitParam.rare == (byte)1) { selectType |= UnitListFilterWindow.SelectType.RARITY_2; } else if (unitParam.rare == (byte)2) { selectType |= UnitListFilterWindow.SelectType.RARITY_3; } else if (unitParam.rare == (byte)3) { selectType |= UnitListFilterWindow.SelectType.RARITY_4; } else if (unitParam.rare == (byte)4) { selectType |= UnitListFilterWindow.SelectType.RARITY_5; } else if (unitParam.rare == (byte)5) { selectType |= UnitListFilterWindow.SelectType.RARITY_6; } } switch (attackDetailTypes) { case AttackDetailTypes.None: selectType |= UnitListFilterWindow.SelectType.WEAPON_NONE; break; case AttackDetailTypes.Slash: selectType |= UnitListFilterWindow.SelectType.WEAPON_SLASH; break; case AttackDetailTypes.Stab: selectType |= UnitListFilterWindow.SelectType.WEAPON_STAB; break; case AttackDetailTypes.Blow: selectType |= UnitListFilterWindow.SelectType.WEAPON_BLOW; break; case AttackDetailTypes.Shot: selectType |= UnitListFilterWindow.SelectType.WEAPON_SHOT; break; case AttackDetailTypes.Magic: selectType |= UnitListFilterWindow.SelectType.WEAPON_MAG; break; } if (!string.IsNullOrEmpty((string)unitParam.birth)) { string birth = (string)unitParam.birth; if (birth == "エンヴィリア") { selectType |= UnitListFilterWindow.SelectType.BIRTH_ENV; } else if (birth == "ラーストリス") { selectType |= UnitListFilterWindow.SelectType.BIRTH_WRATH; } else if (birth == "サガ地方") { selectType |= UnitListFilterWindow.SelectType.BIRTH_SAGA; } else if (birth == "スロウスシュタイン") { selectType |= UnitListFilterWindow.SelectType.BIRTH_SLOTH; } else if (birth == "ルストブルグ") { selectType |= UnitListFilterWindow.SelectType.BIRTH_LUST; } else if (birth == "ワダツミ") { selectType |= UnitListFilterWindow.SelectType.BIRTH_WADATSUMI; } else if (birth == "砂漠地帯") { selectType |= UnitListFilterWindow.SelectType.BIRTH_DESERT; } else if (birth == "グリードダイク") { selectType |= UnitListFilterWindow.SelectType.BIRTH_GREED; } else if (birth == "グラトニー=フォス") { selectType |= UnitListFilterWindow.SelectType.BIRTH_GLUTTONY; } else if (birth == "その他") { selectType |= UnitListFilterWindow.SelectType.BIRTH_OTHER; } else if (birth == "ノーザンブライド") { selectType |= UnitListFilterWindow.SelectType.BIRTH_NOZ; } } return(selectType); }
public MeSkill(MapEffectParam me_param, SkillParam skill_param) { this.mMapEffectParam = me_param; this.mSkillParam = skill_param; }