public List <JobParam> FindConditionJobParams(MasterParam masterParam = null) { List <JobParam> jobParamList = new List <JobParam>(); if (this.condition_jobs != null) { for (int index = 0; index < this.condition_jobs.Length; ++index) { if (!string.IsNullOrEmpty(this.condition_jobs[index])) { JobParam jobParam = (JobParam)null; string conditionJob = this.condition_jobs[index]; if (masterParam == null) { GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)instanceDirect, (UnityEngine.Object)null)) { jobParam = instanceDirect.GetJobParam(conditionJob); } } else { jobParam = masterParam.GetJobParam(conditionJob); } if (jobParam != null) { jobParamList.Add(jobParam); } } } } return(jobParamList); }
public void UpdateJobRankTransfarStatus(MasterParam master) { BaseStatus baseStatus = new BaseStatus(); for (int index1 = 0; index1 < this.ranks.Length; ++index1) { if (this.ranks[index1] != null) { this.ranks[index1].TransfarStatus.Clear(); baseStatus.CopyTo(this.ranks[index1].TransfarStatus); if (this.ranks[index1].equips != null || index1 != this.ranks.Length) { for (int index2 = 0; index2 < this.ranks[index1].equips.Length; ++index2) { if (!string.IsNullOrEmpty(this.ranks[index1].equips[index2])) { ItemParam itemParam = master.GetItemParam(this.ranks[index1].equips[index2]); if (itemParam != null && !string.IsNullOrEmpty((string)itemParam.skill)) { SkillData skillData = new SkillData(); skillData.Setup((string)itemParam.skill, 1, 1, master); skillData.BuffSkill(ESkillTiming.Passive, baseStatus, (BaseStatus)null, baseStatus, (BaseStatus)null, (RandXorshift)null, SkillEffectTargets.Target); } } } } } } }
private void CreateBuffList(MasterParam master_param) { for (int index1 = 0; index1 < this.ranks.Length; ++index1) { if (this.ranks[index1] != null) { List <BuffEffect.BuffValues> list = new List <BuffEffect.BuffValues>(); if (this.ranks[index1].equips != null || index1 != this.ranks.Length) { for (int index2 = 0; index2 < this.ranks[index1].equips.Length; ++index2) { if (!string.IsNullOrEmpty(this.ranks[index1].equips[index2])) { ItemParam itemParam = master_param.GetItemParam(this.ranks[index1].equips[index2]); if (itemParam != null && !string.IsNullOrEmpty(itemParam.skill)) { SkillData skillData = new SkillData(); skillData.Setup(itemParam.skill, 1, 1, master_param); skillData.BuffSkill(ESkillTiming.Passive, EElement.None, (BaseStatus)null, (BaseStatus)null, (BaseStatus)null, (BaseStatus)null, (BaseStatus)null, (BaseStatus)null, (RandXorshift)null, SkillEffectTargets.Target, false, list); } } } if (list.Count > 0) { this.ranks[index1].buff_list = new BuffEffect.BuffValues[list.Count]; for (int index2 = 0; index2 < list.Count; ++index2) { this.ranks[index1].buff_list[index2] = list[index2]; } } } } } }
private string MakeResultString(Json_DropInfo[] drops) { MasterParam masterParam = MonoSingleton <GameManager> .Instance.MasterParam; UnitParam[] allUnits = masterParam.GetAllUnits(); string str = string.Empty; foreach (Json_DropInfo drop in drops) { ItemParam itemParam = masterParam.GetItemParam(drop.iname); if (itemParam != null) { str = str + itemParam.name + "\n"; } else { foreach (UnitParam unitParam in allUnits) { if (unitParam.iname == drop.iname) { str = str + unitParam.name + "\n"; break; } } } } return(str); }
private void FindSkillAbilityDeriveParams(MasterParam masterParam) { if (masterParam == null) { return; } this.m_SkillDeriveParams = this.GetSkillDeriveParams(masterParam); this.m_AbilityDeriveParams = this.GetAbilityDeriveParams(masterParam); }
public void Setup(AbilityParam abil, MasterParam master) { this.m_AbilityParam = abil; this.m_CondsUnits = this.m_AbilityParam.FindConditionUnitParams(master); this.m_CondsJobs = this.m_AbilityParam.FindConditionJobParams(master); this.m_CondsBirth = this.m_AbilityParam.condition_birth; this.m_CondsSex = this.m_AbilityParam.condition_sex; this.m_CondsElem = this.m_AbilityParam.condition_element; }
public string GetBufText(BuffEffect effect, BuffEffect.BuffTarget target) { MasterParam masterParam = MonoSingleton <GameManager> .Instance.MasterParam; StringBuilder stringBuilder = new StringBuilder(); ConceptCardConditionsParam conceptCardConditions = masterParam.GetConceptCardConditions(this.ConditionsIname); stringBuilder.Append(conceptCardConditions.GetConditionDescriptionEquip()); UnitGroupParam unitGroup = masterParam.GetUnitGroup(effect.param.un_group); if (unitGroup != null) { stringBuilder.Append(unitGroup.GetName()); } stringBuilder.Append(LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_OF")); string str = LocalizedText.Get("sys." + target.paramType.ToString()); stringBuilder.Append(str); bool flag = 0 <= (int)target.value; int num = Mathf.Abs((int)target.value); string empty = string.Empty; switch (target.calcType) { case SkillParamCalcTypes.Add: if (flag) { empty = LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_CALC_ADD_PLUS", new object[1] { (object)num.ToString() }); break; } empty = LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_CALC_ADD_MINUS", new object[1] { (object)num.ToString() }); break; case SkillParamCalcTypes.Scale: if (flag) { empty = LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_CALC_UP", new object[1] { (object)num.ToString() }); break; } empty = LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_CALC_DOWN", new object[1] { (object)num.ToString() }); break; } stringBuilder.Append(empty); return(stringBuilder.ToString()); }
public void CacheReferences(MasterParam master) { if (this.jobsets == null || this.mJobSetCache != null) { return; } this.mJobSetCache = new JobSetParam[this.jobsets.Length]; for (int index = 0; index < this.jobsets.Length; ++index) { this.mJobSetCache[index] = master.GetJobSetParam((string)this.jobsets[index]); } }
public UnitGetParam(GiftData[] paramList) { MasterParam masterParam = MonoSingleton <GameManager> .Instance.MasterParam; for (int index = 0; index < paramList.Length; ++index) { if (paramList[index].CheckGiftTypeIncluded(GiftTypes.Unit)) { ItemParam itemParam = masterParam.GetItemParam(paramList[index].iname); if (itemParam != null) { this.Add(itemParam); } } } }
private int CalcCanAwakeMaxLv(int awakelv, int awakelvcap, int piece_amount, int element_piece_amount, int common_piece_amount) { int num1 = awakelv; MasterParam masterParam = MonoSingleton <GameManager> .GetInstanceDirect().MasterParam; if (masterParam == null) { return(num1); } int val2 = awakelv; for (int awakeLv = val2; awakeLv < awakelvcap; ++awakeLv) { int awakeNeedPieces = masterParam.GetAwakeNeedPieces(awakeLv); if (piece_amount > 0 && awakeNeedPieces > 0) { int num2 = Math.Min(awakeNeedPieces, piece_amount); awakeNeedPieces -= num2; piece_amount -= num2; } if (element_piece_amount > 0 && awakeNeedPieces > 0) { int num2 = Math.Min(awakeNeedPieces, element_piece_amount); awakeNeedPieces -= num2; element_piece_amount -= num2; } if (common_piece_amount > 0 && awakeNeedPieces > 0) { int num2 = Math.Min(awakeNeedPieces, common_piece_amount); awakeNeedPieces -= num2; common_piece_amount -= num2; } if (awakeNeedPieces == 0) { val2 = awakeLv + 1; } if (piece_amount == 0 && element_piece_amount == 0 && common_piece_amount == 0) { break; } } return(Math.Min(awakelvcap, val2)); }
public bool Deserialize(JSON_ConceptCardParam json, MasterParam master = null) { this.iname = json.iname; this.name = json.name; this.expr = json.expr; this.type = (eCardType)json.type; this.icon = json.icon; this.rare = json.rare; this.sell = json.sell; this.en_cost = json.en_cost; this.en_exp = json.en_exp; this.en_trust = json.en_trust; this.trust_reward = json.trust_reward; this.first_get_unit = json.first_get_unit; this.is_override_lvcap = true; this.lvcap = json.lvcap; if (json.lvcap <= 0) { this.is_override_lvcap = false; RarityParam rarityParam = MonoSingleton <GameManager> .Instance.MasterParam.GetRarityParam(this.rare); if (rarityParam != null) { this.lvcap = (int)rarityParam.ConceptCardLvCap; } } if (json.effects != null) { this.effects = new ConceptCardEffectsParam[json.effects.Length]; for (int index = 0; index < json.effects.Length; ++index) { ConceptCardEffectsParam cardEffectsParam = new ConceptCardEffectsParam(); if (!cardEffectsParam.Deserialize(json.effects[index])) { return(false); } this.effects[index] = cardEffectsParam; } } this.not_sale = json.not_sale == 1; return(true); }
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 int CalcNeedPieceAll(int value) { int num1 = 0; int awakeLv1 = this.mCurrentUnit.AwakeLv; int awakeLevelCap = this.mCurrentUnit.GetAwakeLevelCap(); int num2 = this.mCurrentUnit.AwakeLv + value; if (value == 0 || awakeLv1 >= num2 || num2 > awakeLevelCap) { return(0); } MasterParam masterParam = MonoSingleton <GameManager> .Instance.MasterParam; for (int awakeLv2 = awakeLv1; awakeLv2 < num2; ++awakeLv2) { int awakeNeedPieces = masterParam.GetAwakeNeedPieces(awakeLv2); if (awakeLv2 >= 0) { num1 += awakeNeedPieces; } } return(num1); }
private List <SkillDeriveParam> GetSkillDeriveParams(MasterParam masterParam) { List <SkillDeriveParam> skillDeriveParamList = new List <SkillDeriveParam>(); if (this.base_skills == null || this.derive_skills == null) { return(skillDeriveParamList); } for (int index = 0; index < this.base_skills.Length; ++index) { string baseSkill = this.base_skills[index]; string deriveSkill = this.derive_skills[index]; if ((!string.IsNullOrEmpty(baseSkill) || !string.IsNullOrEmpty(deriveSkill)) && (!string.IsNullOrEmpty(baseSkill) && !string.IsNullOrEmpty(deriveSkill))) { SkillDeriveParam skillDeriveParam = new SkillDeriveParam(); skillDeriveParam.m_BaseParam = masterParam.GetSkillParam(baseSkill); skillDeriveParam.m_DeriveParam = masterParam.GetSkillParam(deriveSkill); skillDeriveParam.m_SkillAbilityDeriveParam = this; skillDeriveParamList.Add(skillDeriveParam); } } return(skillDeriveParamList); }
private List <AbilityDeriveParam> GetAbilityDeriveParams(MasterParam masterParam) { List <AbilityDeriveParam> abilityDeriveParamList = new List <AbilityDeriveParam>(); if (this.base_abils == null || this.derive_abils == null) { return(abilityDeriveParamList); } for (int index = 0; index < this.base_abils.Length; ++index) { string baseAbil = this.base_abils[index]; string deriveAbil = this.derive_abils[index]; if ((!string.IsNullOrEmpty(baseAbil) || !string.IsNullOrEmpty(deriveAbil)) && (!string.IsNullOrEmpty(baseAbil) && !string.IsNullOrEmpty(deriveAbil))) { AbilityDeriveParam abilityDeriveParam = new AbilityDeriveParam(); abilityDeriveParam.m_BaseParam = masterParam.GetAbilityParam(baseAbil); abilityDeriveParam.m_DeriveParam = masterParam.GetAbilityParam(deriveAbil); abilityDeriveParam.m_SkillAbilityDeriveParam = this; abilityDeriveParamList.Add(abilityDeriveParam); } } return(abilityDeriveParamList); }
public void Deserialize(JSON_FriendPresentItemParam json, MasterParam master = null) { if (json == null) { throw new InvalidJSONException(); } this.m_Id = json.iname; this.m_Name = json.name; this.m_Expr = json.expr; if (!string.IsNullOrEmpty(json.item)) { this.m_Item = MonoSingleton <GameManager> .Instance.GetItemParam(json.item); } this.m_Num = json.num; this.m_Zeny = json.zeny; try { if (!string.IsNullOrEmpty(json.begin_at)) { this.m_BeginAt = TimeManager.GetUnixSec(DateTime.Parse(json.begin_at)); } if (!string.IsNullOrEmpty(json.end_at)) { this.m_EndAt = TimeManager.GetUnixSec(DateTime.Parse(json.end_at)); } if (!(this.m_Id == "FP_DEFAULT")) { return; } FriendPresentItemParam.DefaultParam = this; } catch (Exception ex) { DebugUtility.LogError(ex.ToString()); } }
private void Init() { if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.ListParent, (UnityEngine.Object)null) || UnityEngine.Object.op_Equality((UnityEngine.Object) this.ListItemTemplate, (UnityEngine.Object)null)) { return; } this.master = MonoSingleton <GameManager> .Instance.MasterParam; if (this.master == null) { return; } this.player = MonoSingleton <GameManager> .Instance.Player; if (this.player == null) { return; } ArtifactData dataOfClass1 = DataSource.FindDataOfClass <ArtifactData>(((Component)this).get_gameObject(), (ArtifactData)null); if (dataOfClass1 != null) { if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.CurrentLevel, (UnityEngine.Object)null)) { this.CurrentLevel.set_text(dataOfClass1.Lv.ToString()); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.FinishedLevel, (UnityEngine.Object)null)) { this.FinishedLevel.set_text(this.CurrentLevel.get_text()); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.MaxLevel, (UnityEngine.Object)null)) { this.MaxLevel.set_text("/" + dataOfClass1.GetLevelCap().ToString()); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.NextExp, (UnityEngine.Object)null)) { this.NextExp.set_text(dataOfClass1.GetNextExp().ToString()); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.LevelGauge, (UnityEngine.Object)null)) { int totalExpFromLevel = dataOfClass1.GetTotalExpFromLevel((int)dataOfClass1.Lv); float num1 = (float)(dataOfClass1.GetTotalExpFromLevel((int)dataOfClass1.Lv + 1) - totalExpFromLevel); float num2 = (float)(dataOfClass1.Exp - totalExpFromLevel); if ((double)num1 <= 0.0) { num1 = 1f; } this.LevelGauge.AnimateValue(Mathf.Clamp01(num2 / num1), 0.0f); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.GetAllExp, (UnityEngine.Object)null)) { this.GetAllExp.set_text("0"); } this.mOriginArtifact = dataOfClass1; } List <string> stringList = new List <string>((IEnumerable <string>)PlayerPrefsUtility.GetString(PlayerPrefsUtility.ARTIFACT_BULK_LEVELUP, string.Empty).Split('|')); List <ItemData> itemDataList = this.player.Items; ArtifactWindow dataOfClass2 = DataSource.FindDataOfClass <ArtifactWindow>(((Component)this).get_gameObject(), (ArtifactWindow)null); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)dataOfClass2, (UnityEngine.Object)null)) { itemDataList = dataOfClass2.TmpItems; } for (int index = 0; index < itemDataList.Count; ++index) { ItemData data = itemDataList[index]; if (data != null && data.Param != null && (data.Param.type == EItemType.ExpUpArtifact && data.Num > 0)) { GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.ListItemTemplate); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)gameObject, (UnityEngine.Object)null)) { DataSource.Bind <ItemData>(gameObject, data); gameObject.get_transform().SetParent((Transform)this.ListParent, false); ArtifactLevelUpListItem component = (ArtifactLevelUpListItem)gameObject.GetComponent <ArtifactLevelUpListItem>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null)) { component.OnSelect = new ArtifactLevelUpListItem.SelectExpItem(this.RefreshExpSelectItems); component.ChangeUseMax = new ArtifactLevelUpListItem.ChangeToggleEvent(this.RefreshUseMaxItems); component.OnCheck = new ArtifactLevelUpListItem.CheckSliderValue(this.OnCheck); this.mArtifactLevelupLists.Add(component); if (stringList != null && stringList.Count > 0) { component.SetUseMax(stringList.IndexOf(data.Param.iname) != -1); } if (component.IsUseMax()) { this.mCacheExpItemList.Add(data); } gameObject.SetActive(true); } this.mItems.Add(gameObject); } } } if (this.mCacheExpItemList != null && this.mCacheExpItemList.Count > 0) { this.mCacheExpItemList.Sort((Comparison <ItemData>)((a, b) => (int)b.Param.value - (int)a.Param.value)); } ((Selectable)this.MaxBtn).set_interactable(this.mCacheExpItemList != null && this.mCacheExpItemList.Count > 0); ((Selectable)this.DecideBtn).set_interactable(this.mSelectExpItems != null && this.mSelectExpItems.Count > 0); }
public void UpdateValue() { if (Object.op_Equality((Object)this.ListItem, (Object)null)) { return; } ArtifactData dataOfClass = DataSource.FindDataOfClass <ArtifactData>(((Component)this).get_gameObject(), (ArtifactData)null); ArtifactParam artifactParam = dataOfClass == null?DataSource.FindDataOfClass <ArtifactParam>(((Component)this).get_gameObject(), (ArtifactParam)null) : dataOfClass.ArtifactParam; if (artifactParam == null) { for (int index = 0; index < this.mJobListItems.Count; ++index) { this.mJobListItems[index].SetActive(false); } } else { Transform transform = ((Component)this).get_transform(); MasterParam masterParam = MonoSingleton <GameManager> .Instance.MasterParam; string[] conditionJobs = artifactParam.condition_jobs; int index1 = 0; if (conditionJobs != null) { for (int index2 = 0; index2 < conditionJobs.Length; ++index2) { if (!string.IsNullOrEmpty(conditionJobs[index2])) { JobParam jobParam; try { jobParam = masterParam.GetJobParam(conditionJobs[index2]); } catch (Exception ex) { continue; } if (jobParam != null) { if (this.mJobListItems.Count <= index1) { GameObject gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.ListItem); gameObject.get_transform().SetParent(transform, false); this.mJobListItems.Add(gameObject); this.mCurrentJobs.Add((JobParam)null); } this.mJobListItems[index1].SetActive(true); if (this.mCurrentJobs[index1] == jobParam) { ++index1; } else { this.mCurrentJobs[index1] = jobParam; DataSource.Bind <JobParam>(this.mJobListItems[index1], jobParam); GameParameter.UpdateAll(this.mJobListItems[index1]); ++index1; } } } } } for (int index2 = index1; index2 < this.mJobListItems.Count; ++index2) { this.mJobListItems[index2].SetActive(false); } if (Object.op_Inequality((Object)this.AnyJob, (Object)null)) { this.AnyJob.SetActive(index1 == 0); } this.mUpdated = true; } }
private void AddAssets() { GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect(); if (this.mQueue != null) { for (int index = 0; index < this.mQueue.Count; ++index) { AssetDownloader.Add(this.mQueue[index].IDStr); } this.mQueue = (List <AssetList.Item>)null; } if (this.Download == (FlowNode_DownloadAssets.DownloadAssets) - 1) { return; } if ((this.Download & FlowNode_DownloadAssets.DownloadAssets.Tutorial) != (FlowNode_DownloadAssets.DownloadAssets) 0 && instanceDirect.HasTutorialDLAssets) { instanceDirect.DownloadTutorialAssets(); } if ((this.Download & FlowNode_DownloadAssets.DownloadAssets.OwnUnits) != (FlowNode_DownloadAssets.DownloadAssets) 0) { PlayerData player = MonoSingleton <GameManager> .Instance.Player; if (player != null) { for (int index = 0; index < player.Units.Count; ++index) { DownloadUtility.DownloadUnit(player.Units[index].UnitParam, player.Units[index].Jobs); if (player.Units[index].ConceptCard != null) { DownloadUtility.DownloadConceptCard(player.Units[index].ConceptCard.Param); } } } } if ((this.Download & FlowNode_DownloadAssets.DownloadAssets.AllUnits) != (FlowNode_DownloadAssets.DownloadAssets) 0) { UnitParam[] allUnits = MonoSingleton <GameManager> .Instance.MasterParam?.GetAllUnits(); if (allUnits != null) { for (int index = 0; index < allUnits.Length; ++index) { DownloadUtility.DownloadUnit(allUnits[index], (JobData[])null); } } } if ((this.Download & FlowNode_DownloadAssets.DownloadAssets.LoginBonus) != (FlowNode_DownloadAssets.DownloadAssets) 0) { Json_LoginBonusTable loginBonus28days = MonoSingleton <GameManager> .Instance.Player.LoginBonus28days; if (loginBonus28days != null && loginBonus28days.bonus_units != null && loginBonus28days.bonus_units.Length > 0) { MasterParam masterParam = MonoSingleton <GameManager> .Instance.MasterParam; foreach (string bonusUnit in loginBonus28days.bonus_units) { DownloadUtility.DownloadUnit(masterParam.GetUnitParam(bonusUnit), (JobData[])null); } } } if ((this.Download & FlowNode_DownloadAssets.DownloadAssets.Artifacts) != (FlowNode_DownloadAssets.DownloadAssets) 0) { List <ArtifactData> artifacts = MonoSingleton <GameManager> .Instance.Player.Artifacts; if (artifacts != null && artifacts.Count > 0) { for (int index = 0; index < artifacts.Count; ++index) { DownloadUtility.DownloadArtifact(artifacts[index].ArtifactParam); } } } if ((this.Download & FlowNode_DownloadAssets.DownloadAssets.OwnConceptCard) != (FlowNode_DownloadAssets.DownloadAssets) 0) { List <ConceptCardData> conceptCards = MonoSingleton <GameManager> .Instance.Player.ConceptCards; if (conceptCards != null && conceptCards.Count > 0) { for (int index = 0; index < conceptCards.Count; ++index) { DownloadUtility.DownloadConceptCard(conceptCards[index].Param); } } List <ConceptCardMaterialData> cardExpMaterials = MonoSingleton <GameManager> .Instance.Player.ConceptCardExpMaterials; if (cardExpMaterials != null && cardExpMaterials.Count > 0) { for (int index = 0; index < cardExpMaterials.Count; ++index) { DownloadUtility.DownloadConceptCard(cardExpMaterials[index].Param); } } List <ConceptCardMaterialData> cardTrustMaterials = MonoSingleton <GameManager> .Instance.Player.ConceptCardTrustMaterials; if (cardTrustMaterials != null && cardTrustMaterials.Count > 0) { for (int index = 0; index < cardTrustMaterials.Count; ++index) { DownloadUtility.DownloadConceptCard(cardTrustMaterials[index].Param); } } } for (int index = 0; index < this.AssetPaths.Length; ++index) { if (!string.IsNullOrEmpty(this.AssetPaths[index])) { AssetManager.PrepareAssets(this.AssetPaths[index]); } } if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)instanceDirect, (UnityEngine.Object)null)) { return; } for (int index = 0; index < this.DownloadUnits.Length; ++index) { if (!string.IsNullOrEmpty(this.DownloadUnits[index])) { UnitParam unitParam = instanceDirect.GetUnitParam(this.DownloadUnits[index]); if (unitParam != null) { DownloadUtility.DownloadUnit(unitParam, (JobData[])null); } } } for (int index = 0; index < this.DownloadQuests.Length; ++index) { if (!string.IsNullOrEmpty(this.DownloadQuests[index])) { QuestParam quest = instanceDirect.FindQuest(this.DownloadQuests[index]); if (quest == null) { DebugUtility.LogError("Can't download " + this.DownloadQuests[index]); } else { DownloadUtility.DownloadQuestBase(quest); } } } }
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 Refresh() { ArtifactData artifactData = DataSource.FindDataOfClass <ArtifactData>(((Component)this).get_gameObject(), (ArtifactData)null); if (artifactData == null) { ArtifactParam dataOfClass = DataSource.FindDataOfClass <ArtifactParam>(((Component)this).get_gameObject(), (ArtifactParam)null); artifactData = new ArtifactData(); artifactData.Deserialize(new Json_Artifact() { iname = dataOfClass.iname, rare = dataOfClass.rareini }); } this.UnlockArtifact = artifactData; DataSource.Bind <ArtifactData>(((Component)this).get_gameObject(), this.UnlockArtifact); DataSource.Bind <ArtifactParam>(((Component)this).get_gameObject(), this.UnlockArtifact.ArtifactParam); if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.mAbilityListItem, (UnityEngine.Object)null)) { MasterParam masterParam = MonoSingleton <GameManager> .Instance.MasterParam; GameObject mAbilityListItem = this.mAbilityListItem; bool flag = false; ArtifactParam artifactParam = artifactData.ArtifactParam; List <AbilityData> learningAbilities = artifactData.LearningAbilities; if (artifactParam.abil_inames != null) { AbilityParam data1 = (AbilityParam)null; string abil_iname = (string)null; for (int index = 0; index < artifactParam.abil_inames.Length; ++index) { if (!string.IsNullOrEmpty(artifactParam.abil_inames[index]) && artifactParam.abil_shows[index] != 0) { abil_iname = artifactParam.abil_inames[index]; data1 = masterParam.GetAbilityParam(artifactParam.abil_inames[index]); if (data1 != null) { break; } } } if (data1 == null) { this.mAbilityAnimator.SetInteger(this.mAbilityListItemState, 0); DataSource.Bind <AbilityParam>(this.mAbilityListItem, (AbilityParam)null); DataSource.Bind <AbilityData>(this.mAbilityListItem, (AbilityData)null); return; } DataSource.Bind <AbilityParam>(this.mAbilityListItem, data1); DataSource.Bind <AbilityData>(mAbilityListItem, (AbilityData)null); if (learningAbilities != null && learningAbilities != null) { AbilityData data2 = learningAbilities.Find((Predicate <AbilityData>)(x => x.Param.iname == abil_iname)); if (data2 != null) { DataSource.Bind <AbilityData>(mAbilityListItem, data2); flag = true; } } } if (flag) { this.mAbilityAnimator.SetInteger(this.mAbilityListItemState, 2); } else { this.mAbilityAnimator.SetInteger(this.mAbilityListItemState, 0); } } BaseStatus fixed_status = new BaseStatus(); BaseStatus scale_status = new BaseStatus(); this.UnlockArtifact.GetHomePassiveBuffStatus(ref fixed_status, ref scale_status, (UnitData)null, 0, true); this.mArtifactStatus.SetValues(fixed_status, scale_status, false); GameParameter.UpdateAll(((Component)this).get_gameObject()); }
private void Refresh() { ArtifactData artifactData = new ArtifactData(); artifactData.Deserialize(new Json_Artifact() { iname = GlobalVars.ArtifactListItem.param.iname, rare = GlobalVars.ArtifactListItem.param.rareini }); this.UnlockArtifact = artifactData; DataSource.Bind <ArtifactData>(((Component)this).get_gameObject(), this.UnlockArtifact); DataSource.Bind <ArtifactParam>(((Component)this).get_gameObject(), this.UnlockArtifact.ArtifactParam); if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.AbilityListItem, (UnityEngine.Object)null)) { MasterParam masterParam = MonoSingleton <GameManager> .Instance.MasterParam; GameObject abilityListItem = this.AbilityListItem; CanvasGroup component = (CanvasGroup)abilityListItem.GetComponent <CanvasGroup>(); bool flag = false; ArtifactParam artifactParam = artifactData.ArtifactParam; List <AbilityData> learningAbilities = artifactData.LearningAbilities; if (artifactParam.abil_inames != null) { AbilityParam data1 = (AbilityParam)null; string abil_iname = (string)null; for (int index = 0; index < artifactParam.abil_inames.Length; ++index) { if (!string.IsNullOrEmpty(artifactParam.abil_inames[index]) && artifactParam.abil_shows[index] != 0) { abil_iname = artifactParam.abil_inames[index]; data1 = masterParam.GetAbilityParam(artifactParam.abil_inames[index]); if (data1 != null) { break; } } } if (data1 == null) { component.set_alpha(this.ability_hidden_alpha); DataSource.Bind <AbilityParam>(this.AbilityListItem, (AbilityParam)null); DataSource.Bind <AbilityData>(this.AbilityListItem, (AbilityData)null); return; } DataSource.Bind <AbilityParam>(this.AbilityListItem, data1); DataSource.Bind <AbilityData>(abilityListItem, (AbilityData)null); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null) && learningAbilities != null && learningAbilities != null) { AbilityData data2 = learningAbilities.Find((Predicate <AbilityData>)(x => x.Param.iname == abil_iname)); if (data2 != null) { DataSource.Bind <AbilityData>(abilityListItem, data2); flag = true; } } } if (flag) { component.set_alpha(this.ability_unlock_alpha); } else { component.set_alpha(this.ability_hidden_alpha); } } BaseStatus fixed_status = new BaseStatus(); BaseStatus scale_status = new BaseStatus(); this.UnlockArtifact.GetHomePassiveBuffStatus(ref fixed_status, ref scale_status, (UnitData)null, 0, true); this.ArtifactStatus.SetValues(fixed_status, scale_status, false); if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_SetEffectsButton, (UnityEngine.Object)null) && this.UnlockArtifact.ArtifactParam != null) { ((Selectable)this.m_SetEffectsButton).set_interactable(MonoSingleton <GameManager> .Instance.MasterParam.ExistSkillAbilityDeriveDataWithArtifact(this.UnlockArtifact.ArtifactParam.iname)); if (((Selectable)this.m_SetEffectsButton).get_interactable()) { ArtifactSetList.SetSelectedArtifactParam(this.UnlockArtifact.ArtifactParam); } } GameParameter.UpdateAll(((Component)this).get_gameObject()); }
private void AddAssets() { GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect(); if (this.mQueue != null) { for (int index = 0; index < this.mQueue.Count; ++index) { AssetDownloader.Add(this.mQueue[index].IDStr); } this.mQueue = (List <AssetList.Item>)null; } if (this.Download == (FlowNode_DownloadAssets.DownloadAssets) - 1) { return; } if ((this.Download & FlowNode_DownloadAssets.DownloadAssets.Tutorial) != (FlowNode_DownloadAssets.DownloadAssets) 0) { if ((instanceDirect.Player.TutorialFlags & 1L) != 0L) { if (instanceDirect.HasTutorialDLAssets) { instanceDirect.DownloadTutorialAssets(); } AssetManager.PrepareAssets("town001"); } else if (BackgroundDownloader.Instance.IsEnabled) { this.ProgressBar = false; this.ActivateOutputLinks(10); BackgroundDownloader.Instance.GetRequiredAssets(GameSettings.Instance.Tutorial_Steps[instanceDirect.TutorialStep]); } else { if (instanceDirect.HasTutorialDLAssets) { instanceDirect.DownloadTutorialAssets(); } if (!GameUtility.IsDebugBuild || GlobalVars.DebugIsPlayTutorial) { AssetManager.PrepareAssets("PortraitsM/urob"); AssetManager.PrepareAssets("op0002exit"); AssetManager.PrepareAssets("op0005exit"); AssetManager.PrepareAssets("op0006exit"); } AssetManager.PrepareAssets("town001"); AssetManager.PrepareAssets("UI/QuestAssets"); } } if ((this.Download & FlowNode_DownloadAssets.DownloadAssets.OwnUnits) != (FlowNode_DownloadAssets.DownloadAssets) 0 && ((instanceDirect.Player.TutorialFlags & 1L) != 0L || !BackgroundDownloader.Instance.IsEnabled)) { PlayerData player = MonoSingleton <GameManager> .Instance.Player; if (player != null) { for (int index = 0; index < player.Units.Count; ++index) { DownloadUtility.DownloadUnit(player.Units[index].UnitParam, player.Units[index].Jobs); } } } if ((this.Download & FlowNode_DownloadAssets.DownloadAssets.AllUnits) != (FlowNode_DownloadAssets.DownloadAssets) 0) { MasterParam masterParam = MonoSingleton <GameManager> .Instance.MasterParam; UnitParam[] unitParamArray = masterParam != null?masterParam.GetAllUnits() : (UnitParam[])null; if (unitParamArray != null) { for (int index = 0; index < unitParamArray.Length; ++index) { DownloadUtility.DownloadUnit(unitParamArray[index], (JobData[])null); } } } if ((this.Download & FlowNode_DownloadAssets.DownloadAssets.LoginBonus) != (FlowNode_DownloadAssets.DownloadAssets) 0 && ((instanceDirect.Player.TutorialFlags & 1L) != 0L || !BackgroundDownloader.Instance.IsEnabled)) { Json_LoginBonusTable loginBonus28days = MonoSingleton <GameManager> .Instance.Player.LoginBonus28days; if (loginBonus28days != null && loginBonus28days.bonus_units != null && loginBonus28days.bonus_units.Length > 0) { MasterParam masterParam = MonoSingleton <GameManager> .Instance.MasterParam; foreach (string bonusUnit in loginBonus28days.bonus_units) { DownloadUtility.DownloadUnit(masterParam.GetUnitParam(bonusUnit), (JobData[])null); } } } if ((this.Download & FlowNode_DownloadAssets.DownloadAssets.Artifacts) != (FlowNode_DownloadAssets.DownloadAssets) 0) { List <ArtifactData> artifacts = MonoSingleton <GameManager> .Instance.Player.Artifacts; if (artifacts != null && artifacts.Count > 0) { for (int index = 0; index < artifacts.Count; ++index) { DownloadUtility.DownloadArtifact(artifacts[index].ArtifactParam); } } } for (int index = 0; index < this.AssetPaths.Length; ++index) { if (!string.IsNullOrEmpty(this.AssetPaths[index])) { AssetManager.PrepareAssets(this.AssetPaths[index]); } } if (!Object.op_Inequality((Object)instanceDirect, (Object)null)) { return; } for (int index = 0; index < this.DownloadUnits.Length; ++index) { if (!string.IsNullOrEmpty(this.DownloadUnits[index])) { UnitParam unitParam = instanceDirect.GetUnitParam(this.DownloadUnits[index]); if (unitParam != null) { DownloadUtility.DownloadUnit(unitParam, (JobData[])null); } } } for (int index = 0; index < this.DownloadQuests.Length; ++index) { if (!string.IsNullOrEmpty(this.DownloadQuests[index])) { QuestParam quest = instanceDirect.FindQuest(this.DownloadQuests[index]); if (quest == null) { DebugUtility.LogError("Can't download " + this.DownloadQuests[index]); } else { DownloadUtility.DownloadQuestBase(quest); } } } }
private void Refresh() { ArtifactParam data1 = GlobalVars.ArtifactListItem.param; ArtifactData data2 = new ArtifactData(); data2.Deserialize(new Json_Artifact() { iname = GlobalVars.ArtifactListItem.param.iname, rare = GlobalVars.ArtifactListItem.param.rareini }); DataSource.Bind <ArtifactParam>(((Component)this).get_gameObject(), data1); DataSource.Bind <ArtifactData>(((Component)this).get_gameObject(), data2); if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.AbilityListItem, (UnityEngine.Object)null)) { MasterParam masterParam = MonoSingleton <GameManager> .Instance.MasterParam; GameObject abilityListItem = this.AbilityListItem; CanvasGroup component = (CanvasGroup)abilityListItem.GetComponent <CanvasGroup>(); bool flag = false; ArtifactParam artifactParam = data2.ArtifactParam; List <AbilityData> learningAbilities = data2.LearningAbilities; if (artifactParam.abil_inames != null) { AbilityParam data3 = (AbilityParam)null; string abil_iname = (string)null; for (int index = 0; index < artifactParam.abil_inames.Length; ++index) { if (!string.IsNullOrEmpty(artifactParam.abil_inames[index]) && artifactParam.abil_shows[index] != 0) { abil_iname = artifactParam.abil_inames[index]; data3 = masterParam.GetAbilityParam(artifactParam.abil_inames[index]); if (data3 != null) { break; } } } if (data3 == null) { component.set_alpha(this.ability_hidden_alpha); DataSource.Bind <AbilityParam>(this.AbilityListItem, (AbilityParam)null); DataSource.Bind <AbilityData>(this.AbilityListItem, (AbilityData)null); return; } DataSource.Bind <AbilityParam>(this.AbilityListItem, data3); DataSource.Bind <AbilityData>(abilityListItem, (AbilityData)null); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null) && learningAbilities != null && learningAbilities != null) { AbilityData data4 = learningAbilities.Find((Predicate <AbilityData>)(x => x.Param.iname == abil_iname)); if (data4 != null) { DataSource.Bind <AbilityData>(abilityListItem, data4); flag = true; } } } if (flag) { component.set_alpha(this.ability_unlock_alpha); } else { component.set_alpha(this.ability_hidden_alpha); } } GameParameter.UpdateAll(((Component)this).get_gameObject()); }
public void Deserialize(JSON_SkillAbilityDeriveParam json, MasterParam masterParam) { this.Deserialize(json); this.FindSkillAbilityDeriveParams(masterParam); }
public void UpdateValue() { if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.ListItem, (UnityEngine.Object)null) || UnityEngine.Object.op_Equality((UnityEngine.Object) this.AnyJob, (UnityEngine.Object)null)) { return; } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ListItem, (UnityEngine.Object)null)) { this.ListItem.SetActive(false); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.AnyJob, (UnityEngine.Object)null)) { this.AnyJob.SetActive(false); } string[] conditionJobs = GlobalVars.ConditionJobs; MasterParam masterParam = MonoSingleton <GameManager> .Instance.MasterParam; int index1 = 0; if (conditionJobs != null) { for (int index2 = 0; index2 < conditionJobs.Length; ++index2) { if (!string.IsNullOrEmpty(conditionJobs[index2])) { JobParam jobParam; try { jobParam = masterParam.GetJobParam(conditionJobs[index2]); } catch (Exception ex) { continue; } if (jobParam != null) { if (this.mJobListItems.Count <= index1) { GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.ListItem); gameObject.get_transform().SetParent(((Component)this).get_transform(), false); this.mJobListItems.Add(gameObject); this.mCurrentJobs.Add((JobParam)null); } this.mJobListItems[index1].SetActive(true); if (this.mCurrentJobs[index1] == jobParam) { ++index1; } else { this.mCurrentJobs[index1] = jobParam; ArtifactJobItem component = (ArtifactJobItem)this.mJobListItems[index1].GetComponent <ArtifactJobItem>(); DataSource.Bind <JobParam>(component.jobIcon, jobParam); component.jobName.set_text(jobParam.name); ++index1; } } } } } for (int index2 = index1; index2 < this.mJobListItems.Count; ++index2) { this.mJobListItems[index2].SetActive(false); } if (!UnityEngine.Object.op_Inequality((UnityEngine.Object) this.AnyJob, (UnityEngine.Object)null)) { return; } this.AnyJob.SetActive(index1 == 0); }
public bool Deserialize(JSON_JobParam json, MasterParam master_param) { if (json == null) { return(false); } this.iname = json.iname; this.name = json.name; this.expr = json.expr; this.model = json.mdl; this.ac2d = json.ac2d; this.modelp = json.mdlp; this.pet = json.pet; this.buki = json.buki; this.origin = json.origin; this.type = (JobTypes)json.type; this.role = (RoleTypes)json.role; this.wepmdl = json.wepmdl; this.mov = (OInt)json.jmov; this.jmp = (OInt)json.jjmp; this.atkskill[0] = string.IsNullOrEmpty(json.atkskl) ? string.Empty : json.atkskl; this.atkskill[1] = string.IsNullOrEmpty(json.atkfi) ? string.Empty : json.atkfi; this.atkskill[2] = string.IsNullOrEmpty(json.atkwa) ? string.Empty : json.atkwa; this.atkskill[3] = string.IsNullOrEmpty(json.atkwi) ? string.Empty : json.atkwi; this.atkskill[4] = string.IsNullOrEmpty(json.atkth) ? string.Empty : json.atkth; this.atkskill[5] = string.IsNullOrEmpty(json.atksh) ? string.Empty : json.atksh; this.atkskill[6] = string.IsNullOrEmpty(json.atkda) ? string.Empty : json.atkda; this.fixed_ability = json.fixabl; this.artifact = json.artifact; this.ai = json.ai; this.master = json.master; this.MapEffectAbility = json.me_abl; this.IsMapEffectRevReso = json.is_me_rr != 0; this.DescCharacteristic = json.desc_ch; this.DescOther = json.desc_ot; this.status.hp = (OInt)json.hp; this.status.mp = (OShort)json.mp; this.status.atk = (OShort)json.atk; this.status.def = (OShort)json.def; this.status.mag = (OShort)json.mag; this.status.mnd = (OShort)json.mnd; this.status.dex = (OShort)json.dex; this.status.spd = (OShort)json.spd; this.status.cri = (OShort)json.cri; this.status.luk = (OShort)json.luk; this.avoid = (OInt)json.avoid; this.inimp = (OInt)json.inimp; Array.Clear((Array)this.ranks, 0, this.ranks.Length); if (json.ranks != null) { for (int index = 0; index < json.ranks.Length; ++index) { this.ranks[index] = new JobRankParam(); if (!this.ranks[index].Deserialize(json.ranks[index])) { return(false); } } } if (master_param != null) { this.CreateBuffList(master_param); } this.unit_image = json.unit_image; return(true); }
private void Refresh() { ArtifactParam data1 = GlobalVars.ArtifactListItem.param; ArtifactData data2 = new ArtifactData(); data2.Deserialize(new Json_Artifact() { iname = GlobalVars.ArtifactListItem.param.iname, rare = GlobalVars.ArtifactListItem.param.rareini }); DataSource.Bind <ArtifactParam>(((Component)this).get_gameObject(), data1); DataSource.Bind <ArtifactData>(((Component)this).get_gameObject(), data2); if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.AbilityListItem, (UnityEngine.Object)null)) { MasterParam masterParam = MonoSingleton <GameManager> .Instance.MasterParam; GameObject abilityListItem = this.AbilityListItem; CanvasGroup component = (CanvasGroup)abilityListItem.GetComponent <CanvasGroup>(); bool flag = false; ArtifactParam artifactParam = data2.ArtifactParam; List <AbilityData> learningAbilities = data2.LearningAbilities; if (artifactParam.abil_inames != null) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type SelectArtifactInfo.\u003CRefresh\u003Ec__AnonStorey37A refreshCAnonStorey37A = new SelectArtifactInfo.\u003CRefresh\u003Ec__AnonStorey37A(); AbilityParam data3 = (AbilityParam)null; // ISSUE: reference to a compiler-generated field refreshCAnonStorey37A.abil_iname = (string)null; for (int index = 0; index < artifactParam.abil_inames.Length; ++index) { if (!string.IsNullOrEmpty(artifactParam.abil_inames[index]) && artifactParam.abil_shows[index] != 0) { // ISSUE: reference to a compiler-generated field refreshCAnonStorey37A.abil_iname = artifactParam.abil_inames[index]; data3 = masterParam.GetAbilityParam(artifactParam.abil_inames[index]); if (data3 != null) { break; } } } if (data3 == null) { component.set_alpha(this.ability_hidden_alpha); DataSource.Bind <AbilityParam>(this.AbilityListItem, (AbilityParam)null); DataSource.Bind <AbilityData>(this.AbilityListItem, (AbilityData)null); return; } DataSource.Bind <AbilityParam>(this.AbilityListItem, data3); DataSource.Bind <AbilityData>(abilityListItem, (AbilityData)null); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null) && learningAbilities != null && learningAbilities != null) { // ISSUE: reference to a compiler-generated method AbilityData data4 = learningAbilities.Find(new Predicate <AbilityData>(refreshCAnonStorey37A.\u003C\u003Em__40F)); if (data4 != null) { DataSource.Bind <AbilityData>(abilityListItem, data4); flag = true; } } } if (flag) { component.set_alpha(this.ability_unlock_alpha); } else { component.set_alpha(this.ability_hidden_alpha); } } GameParameter.UpdateAll(((Component)this).get_gameObject()); }
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 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); }