private void Init() { GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect(); GameManager gameManager; if (Object.op_Inequality((Object)instanceDirect, (Object)null)) { Object.DestroyImmediate((Object)instanceDirect); gameManager = (GameManager)null; } CriticalSection.ForceReset(); SRPG_TouchInputModule.UnlockInput(true); PunMonoSingleton <MyPhoton> .Instance.Disconnect(); UIUtility.PopCanvasAll(); AssetManager.UnloadAll(); AssetDownloader.Reset(); AssetDownloader.ResetTextSetting(); Network.Reset(); gameManager = MonoSingleton <GameManager> .Instance; GameUtility.ForceSetDefaultSleepSetting(); if (GameUtility.IsStripBuild) { GameUtility.Config_UseAssetBundles.Value = true; } LocalizedText.UnloadAllTables(); }
public static int GetTobiraUnlockLevel(string unit_iname) { int num = 0; TobiraConditionParam[] conditionsForUnit = MonoSingleton <GameManager> .GetInstanceDirect().MasterParam.GetTobiraConditionsForUnit(unit_iname, TobiraParam.Category.START); if (conditionsForUnit == null) { return(num); } foreach (TobiraConditionParam tobiraConditionParam in conditionsForUnit) { if (tobiraConditionParam.CondType == TobiraConditionParam.ConditionType.Unit) { if (string.IsNullOrEmpty(tobiraConditionParam.CondUnit.UnitIname)) { num = tobiraConditionParam.CondUnit.Level; break; } if (unit_iname == tobiraConditionParam.CondUnit.UnitIname) { num = tobiraConditionParam.CondUnit.Level; break; } } } return(num); }
public void Deserialize(JSON_TobiraParam json) { if (json == null) { return; } this.mUnitIname = json.unit_iname; this.mEnable = json.enable == 1; this.mCategory = (TobiraParam.Category)json.category; this.mRecipeId = json.recipe_id; this.mSkillIname = json.skill_iname; this.mLearnAbilities.Clear(); if (json.learn_abils != null) { for (int index = 0; index < json.learn_abils.Length; ++index) { TobiraLearnAbilityParam learnAbilityParam = new TobiraLearnAbilityParam(); learnAbilityParam.Deserialize(json.learn_abils[index]); this.mLearnAbilities.Add(learnAbilityParam); } } this.mOverwriteLeaderSkillIname = json.overwrite_ls_iname; if (!string.IsNullOrEmpty(this.mOverwriteLeaderSkillIname)) { GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect(); if (Object.op_Inequality((Object)instanceDirect, (Object)null) && instanceDirect.MasterParam != null) { this.mOverwriteLeaderSkillLevel = (int)instanceDirect.MasterParam.FixParam.TobiraLvCap; } } this.mPriority = json.priority; }
public static void CalcUnitLevelStatus(UnitParam unit, int unitLv, ref BaseStatus status) { GrowParam growParam = MonoSingleton <GameManager> .GetInstanceDirect().GetGrowParam((string)unit.grow); if (growParam != null && growParam.curve != null) { growParam.CalcLevelCurveStatus(unitLv, ref status, unit.ini_status, unit.max_status); } else { unit.ini_status.param.CopyTo(status.param); if (unit.ini_status.enchant_resist != null) { unit.ini_status.enchant_resist.CopyTo(status.enchant_resist); } } FixParam fixParam = MonoSingleton <GameManager> .GetInstanceDirect().MasterParam.FixParam; status.enchant_assist.esa_fire = (OShort)fixParam.EsaAssist; status.enchant_assist.esa_water = (OShort)fixParam.EsaAssist; status.enchant_assist.esa_wind = (OShort)fixParam.EsaAssist; status.enchant_assist.esa_thunder = (OShort)fixParam.EsaAssist; status.enchant_assist.esa_shine = (OShort)fixParam.EsaAssist; status.enchant_assist.esa_dark = (OShort)fixParam.EsaAssist; status.enchant_resist.esa_fire = (OShort)fixParam.EsaResist; status.enchant_resist.esa_water = (OShort)fixParam.EsaResist; status.enchant_resist.esa_wind = (OShort)fixParam.EsaResist; status.enchant_resist.esa_thunder = (OShort)fixParam.EsaResist; status.enchant_resist.esa_shine = (OShort)fixParam.EsaResist; status.enchant_resist.esa_dark = (OShort)fixParam.EsaResist; status.param.rec = (OShort)fixParam.IniValRec; }
private List <GenericBadge <ArtifactData> > AddCreatableInfo(List <ArtifactData> artifactDataList) { List <GenericBadge <ArtifactData> > genericBadgeList = new List <GenericBadge <ArtifactData> >(); GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect(); if (UnityEngine.Object.op_Equality((UnityEngine.Object)instanceDirect, (UnityEngine.Object)null) || instanceDirect.Player == null) { return(genericBadgeList); } List <ItemData> all = instanceDirect.Player.Items.FindAll((Predicate <ItemData>)(i => i.ItemType == EItemType.ArtifactPiece)); using (List <ArtifactData> .Enumerator enumerator = artifactDataList.GetEnumerator()) { while (enumerator.MoveNext()) { ArtifactData current = enumerator.Current; ArtifactParam artifactParam = current.ArtifactParam; ItemData itemData = all.Find((Predicate <ItemData>)(piece => piece.Param.iname == artifactParam.iname)); if (itemData == null) { genericBadgeList.Add(new GenericBadge <ArtifactData>(current, false)); } else { RarityParam rarityParam = MonoSingleton <GameManager> .Instance.GetRarityParam(artifactParam.rareini); bool flag = itemData.Num >= (int)rarityParam.ArtifactCreatePieceNum; genericBadgeList.Add(new GenericBadge <ArtifactData>(current, flag)); } } } return(genericBadgeList); }
public static List <string> GetLearnSkill(string quest_iname, string unit_iname) { List <string> stringList = new List <string>(); if (string.IsNullOrEmpty(quest_iname) || string.IsNullOrEmpty(unit_iname)) { return(stringList); } GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect(); if (Object.op_Equality((Object)instanceDirect, (Object)null)) { return(stringList); } CollaboSkillParam collaboSkillParam = instanceDirect.MasterParam.CollaboSkills.Find((Predicate <CollaboSkillParam>)(fcs => fcs.UnitIname == unit_iname)); if (collaboSkillParam == null) { return(stringList); } using (List <CollaboSkillParam.LearnSkill> .Enumerator enumerator = collaboSkillParam.mLearnSkillLists.GetEnumerator()) { while (enumerator.MoveNext()) { CollaboSkillParam.LearnSkill current = enumerator.Current; if (!(current.QuestIname != quest_iname)) { stringList.Add(current.SkillIname); } } } return(stringList); }
private void setup(string iname, int grid_x, int grid_y, string tag, Unit creator, int create_clock, int rank, int rankcap) { if (string.IsNullOrEmpty(iname)) { return; } GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect(); if (!UnityEngine.Object.op_Implicit((UnityEngine.Object)instanceDirect)) { return; } this.mTrickParam = instanceDirect.MasterParam.GetTrickParam(iname); if (this.mTrickParam == null) { return; } this.mRankCap = (OInt)Math.Max(rankcap, 1); this.mRank = (OInt)Math.Min(rank, (int)this.mRankCap); this.mBuffEffect = BuffEffect.CreateBuffEffect(instanceDirect.MasterParam.GetBuffEffectParam(this.mTrickParam.BuffId), (int)this.mRank, (int)this.mRankCap); this.mCondEffect = CondEffect.CreateCondEffect(instanceDirect.MasterParam.GetCondEffectParam(this.mTrickParam.CondId), (int)this.mRank, (int)this.mRankCap); this.mCreateUnit = creator; this.mGridX = (OInt)grid_x; this.mGridY = (OInt)grid_y; this.mTag = tag; this.mRestActionCount = this.mTrickParam.ActionCount; this.mCreateClock = (OInt)create_clock; this.mValid = (OBool)true; }
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); }
private void AddArtifactContents(BundleParam.BundleItemInfo itemInfo) { GameObject gameObject = this.itemCount >= this.limited_shop_item_set_list.Count ? (GameObject)Object.Instantiate <GameObject>((M0)this.ItemTemplate) : ((Component)this.limited_shop_item_set_list[this.itemCount]).get_gameObject(); if (Object.op_Inequality((Object)gameObject, (Object)null)) { gameObject.SetActive(true); Vector3 localScale = gameObject.get_transform().get_localScale(); gameObject.get_transform().SetParent(this.ItemParent.get_transform()); gameObject.get_transform().set_localScale(localScale); LimitedShopSetItemListElement component = (LimitedShopSetItemListElement)gameObject.GetComponent <LimitedShopSetItemListElement>(); ArtifactParam artifactParam1 = new ArtifactParam(); ArtifactParam artifactParam2 = MonoSingleton <GameManager> .GetInstanceDirect().MasterParam.GetArtifactParam(itemInfo.Name); ItemData itemData = new ItemData(); StringBuilder stringBuilder = GameUtility.GetStringBuilder(); if (itemData != null) { stringBuilder.Append(artifactParam2.name); } stringBuilder.Append(" × "); stringBuilder.Append(itemInfo.Quantity.ToString()); component.itemName.set_text(stringBuilder.ToString()); component.itemData = itemData; component.ArtifactParam = artifactParam2; this.limited_shop_item_set_list.Add(component); } ++this.itemCount; }
public static List <RankingQuestParam> FindRankingQuestParamBySchedule(RankingQuestScheduleParam.RakingQuestScheduleGetFlags flag) { List <RankingQuestParam> rankingQuestParamList = new List <RankingQuestParam>(); GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect(); if (UnityEngine.Object.op_Equality((UnityEngine.Object)instanceDirect, (UnityEngine.Object)null)) { return(rankingQuestParamList); } if (instanceDirect.RankingQuestParams == null) { DebugUtility.LogError("GameManager.Instance.RankingQuestParamsがnullです"); return(rankingQuestParamList); } List <RankingQuestScheduleParam> questScheduleParam = RankingQuestScheduleParam.GetRankingQuestScheduleParam(flag); List <RankingQuestParam> rankingQuestParams = instanceDirect.RankingQuestParams; for (int index1 = 0; index1 < rankingQuestParams.Count; ++index1) { for (int index2 = 0; index2 < questScheduleParam.Count; ++index2) { if (rankingQuestParams[index1].schedule_id == questScheduleParam[index2].id) { rankingQuestParamList.Add(rankingQuestParams[index1]); break; } } } return(rankingQuestParamList); }
public bool CheckEnableUseAbility(UnitData self, int job_index) { if (this.condition_units != null) { bool flag = Array.Find <string>(this.condition_units, (Predicate <string>)(p => p == self.UnitParam.iname)) != null; if (!(this.units_conditions_type != EUseConditionsType.Match ? !flag : flag)) { return(false); } } if (this.condition_jobs != null) { JobData job = self.GetJobData(job_index); if (job == null) { return(false); } bool flag = Array.Find <string>(this.condition_jobs, (Predicate <string>)(p => p == job.JobID)) != null; if (!flag && !string.IsNullOrEmpty(job.Param.origin)) { JobParam originJobParam = MonoSingleton <GameManager> .GetInstanceDirect().GetJobParam(job.Param.origin); if (originJobParam != null) { flag = Array.Find <string>(this.condition_jobs, (Predicate <string>)(p => p == originJobParam.iname)) != null; } } if (!(this.jobs_conditions_type != EUseConditionsType.Match ? !flag : flag)) { return(false); } } return((string.IsNullOrEmpty(this.condition_birth) || !((string)self.UnitParam.birth != this.condition_birth)) && (this.condition_sex == ESex.Unknown || self.UnitParam.sex == this.condition_sex) && (this.condition_element == EElement.None || self.Element == this.condition_element) && ((int)this.condition_raremax == 0 || (int)this.condition_raremin <= self.Rarity && (int)this.condition_raremax >= self.Rarity && (int)this.condition_raremax >= (int)this.condition_raremin)); }
private bool IsCreatableArtifact(List <ArtifactData> artifactDataList) { GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect(); if (UnityEngine.Object.op_Equality((UnityEngine.Object)instanceDirect, (UnityEngine.Object)null) || instanceDirect.Player == null) { return(false); } List <ItemData> all = instanceDirect.Player.Items.FindAll((Predicate <ItemData>)(i => i.ItemType == EItemType.ArtifactPiece)); using (List <ArtifactData> .Enumerator enumerator = artifactDataList.GetEnumerator()) { while (enumerator.MoveNext()) { ArtifactParam artifactParam = enumerator.Current.ArtifactParam; ItemData itemData = all.Find((Predicate <ItemData>)(piece => piece.Param.iname == artifactParam.iname)); if (itemData != null) { RarityParam rarityParam = MonoSingleton <GameManager> .Instance.GetRarityParam(artifactParam.rareini); if (itemData.Num >= (int)rarityParam.ArtifactCreatePieceNum) { return(true); } } } } return(false); }
public void RarityUp() { if ((int)this.mLv < this.GetLevelCap()) { return; } int kakeraNumForRarityUp = this.GetKakeraNumForRarityUp(); int kakeraNeedNum = this.GetKakeraNeedNum(); if (kakeraNumForRarityUp < kakeraNeedNum) { return; } if (!this.ConsumeKakera(kakeraNeedNum)) { DebugUtility.LogWarning("カケラが不足している場合"); } else { GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect(); int artifactRarityUpCost = (int)this.mRarityParam.ArtifactRarityUpCost; if (instanceDirect.Player.Gold < artifactRarityUpCost) { return; } instanceDirect.Player.GainGold(-artifactRarityUpCost); this.mRarity = (OInt)Math.Min(Math.Max((int)(++this.mRarity), this.mArtifactParam.rareini), this.mArtifactParam.raremax); this.mRarityParam = instanceDirect.GetRarityParam((int)this.mRarity); this.UpdateEquipEffect(); this.UpdateLearningAbilities(true); } }
private Json_ItemSelectResponse DummyResponse() { string[] strArray = new string[2] { "IT_SET_EQUP_MIT_03", "IT_SET_EQUP_MIT_03" }; int length = strArray.Length; Json_ItemSelectResponse itemSelectResponse = new Json_ItemSelectResponse(); itemSelectResponse.select = new Json_ItemSelectItem[length]; if (Object.op_Equality((Object)MonoSingleton <GameManager> .GetInstanceDirect(), (Object)null)) { GameManager instance = MonoSingleton <GameManager> .Instance; } for (int index = 0; index < length; ++index) { itemSelectResponse.select[index] = new Json_ItemSelectItem() { iname = strArray[index] } } ; return(itemSelectResponse); }
public bool IsAdvantage() { switch (this.effect_type) { case SkillEffectTypes.Attack: case SkillEffectTypes.Debuff: case SkillEffectTypes.RateDamage: case SkillEffectTypes.RateDamageCurrent: return(false); case SkillEffectTypes.FailCondition: return(this.target == ESkillTarget.Self || this.target == ESkillTarget.SelfSide); case SkillEffectTypes.SetTrick: if (!string.IsNullOrEmpty(this.TrickId)) { TrickParam trickParam = MonoSingleton <GameManager> .GetInstanceDirect().MasterParam.GetTrickParam(this.TrickId); if (trickParam != null && trickParam.DamageType == eTrickDamageType.DAMAGE) { return(false); } break; } break; } return(true); }
public static List <MapEffectParam> GetHaveMapEffectLists(string skill_iname) { List <MapEffectParam> mapEffectParamList = new List <MapEffectParam>(); if (string.IsNullOrEmpty(skill_iname)) { return(mapEffectParamList); } GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect(); if (!Object.op_Implicit((Object)instanceDirect) || instanceDirect.MapEffectParam == null) { return(mapEffectParamList); } using (List <MapEffectParam> .Enumerator enumerator = instanceDirect.MapEffectParam.GetEnumerator()) { while (enumerator.MoveNext()) { MapEffectParam current = enumerator.Current; if (current.ValidSkillLists.Contains(skill_iname)) { mapEffectParamList.Add(current); } } } return(mapEffectParamList); }
public static string GetPartnerIname(string unit_iname, string skill_iname) { if (string.IsNullOrEmpty(unit_iname) || string.IsNullOrEmpty(skill_iname)) { return((string)null); } GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect(); if (Object.op_Equality((Object)instanceDirect, (Object)null)) { return((string)null); } CollaboSkillParam collaboSkillParam = instanceDirect.MasterParam.CollaboSkills.Find((Predicate <CollaboSkillParam>)(fcs => fcs.UnitIname == unit_iname)); if (collaboSkillParam == null) { DebugUtility.LogError(string.Format("CollaboSkillParam/GetPartnerIname CollaboSkillParam not found. unit_iname={0}", (object)unit_iname)); return((string)null); } CollaboSkillParam.LearnSkill learnSkill = collaboSkillParam.mLearnSkillLists.Find((Predicate <CollaboSkillParam.LearnSkill>)(fls => fls.SkillIname == skill_iname)); if (learnSkill != null) { return(learnSkill.PartnerUnitIname); } DebugUtility.LogError(string.Format("CollaboSkillParam/GetPartnerIname LearnSkill not found. skill_iname={0}", (object)skill_iname)); return((string)null); }
private void RefreshSubPanel(int index = -1) { this.ClearPanel(); if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.MainPanelCloseBtn, (UnityEngine.Object)null)) { DebugUtility.LogWarning("UnitEvolutionWindow.cs => RefreshSubPanel():MainPanelCloseBtn is Null References!"); } else { ((Component)this.MainPanelCloseBtn).get_gameObject().SetActive(false); if (index < 0) { DebugUtility.LogWarning("UnitEvolutionWindow.cs => RefreshSubPanel():index is 0!"); } else { RecipeParam currentRecipe = this.GetCurrentRecipe(this.mCurrentUnit); if (currentRecipe == null) { DebugUtility.LogError("UnitEvolutionWindow.cs => RefreshSubPanel():recipeParam is Null References!"); } else { ItemParam itemParam = MonoSingleton <GameManager> .GetInstanceDirect().GetItemParam(currentRecipe.items[index].iname); if (itemParam == null) { DebugUtility.LogError("UnitEvolutionWindow.cs => RefreshSubPanel():itemParam is Null References!"); } else { this.SubPanel.SetActive(true); DataSource.Bind <ItemParam>(this.SubPanel, itemParam); GameParameter.UpdateAll(this.SubPanel.get_gameObject()); if (this.mLastSelectItemIname != itemParam.iname) { this.ResetScrollPosition(); this.mLastSelectItemIname = itemParam.iname; } if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)QuestDropParam.Instance, (UnityEngine.Object)null)) { return; } QuestParam[] availableQuests = MonoSingleton <GameManager> .Instance.Player.AvailableQuests; List <QuestParam> itemDropQuestList = QuestDropParam.Instance.GetItemDropQuestList(itemParam, GlobalVars.GetDropTableGeneratedDateTime()); using (List <QuestParam> .Enumerator enumerator = itemDropQuestList.GetEnumerator()) { while (enumerator.MoveNext()) { QuestParam qp = enumerator.Current; DebugUtility.Log("QuestList:" + qp.iname); bool isActive = Array.Find <QuestParam>(availableQuests, (Predicate <QuestParam>)(p => p.iname == qp.iname)) != null; this.AddList(qp, isActive); } } } } } } }
public void Activated(int pinID) { switch (pinID) { case 0: this.gm = MonoSingleton <GameManager> .GetInstanceDirect(); if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.gm, (UnityEngine.Object)null)) { DebugUtility.LogWarning("AwardList.cs -> Activated():GameManager is Null References!"); break; } this.RefreshAwardDatas(); this.TabChange(AwardParam.Tab.Normal); FlowNode_GameObject.ActivateOutputLinks((Component)this, 10); break; case 1: this.IsRefresh = true; break; case 50: this.TabChange(AwardParam.Tab.Normal); break; case 51: this.TabChange(AwardParam.Tab.Extra); break; } }
public static CollaboSkillParam.Pair IsLearnQuest(string quest_id) { GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect(); if (UnityEngine.Object.op_Equality((UnityEngine.Object)instanceDirect, (UnityEngine.Object)null)) { return((CollaboSkillParam.Pair)null); } List <string> stringList = new List <string>(); using (List <CollaboSkillParam> .Enumerator enumerator1 = instanceDirect.MasterParam.CollaboSkills.GetEnumerator()) { while (enumerator1.MoveNext()) { using (List <CollaboSkillParam.LearnSkill> .Enumerator enumerator2 = enumerator1.Current.mLearnSkillLists.GetEnumerator()) { while (enumerator2.MoveNext()) { CollaboSkillParam.LearnSkill current = enumerator2.Current; if (current.QuestIname == quest_id) { stringList.Add(current.PartnerUnitIname); } } } } } if (stringList.Count == 2) { return(new CollaboSkillParam.Pair(instanceDirect.MasterParam.GetUnitParam(stringList[1]), instanceDirect.MasterParam.GetUnitParam(stringList[0]))); } return((CollaboSkillParam.Pair)null); }
private void OnDestroy() { if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)MonoSingleton <GameManager> .GetInstanceDirect(), (UnityEngine.Object)null)) { return; } MonoSingleton <GameManager> .Instance.OnAbilityRankUpCountChange -= new GameManager.RankUpCountChangeEvent(this.OnAbilityRankUpCountChange); }
public bool Setup(long iid, string iname) { this.mArtifactParam = MonoSingleton <GameManager> .GetInstanceDirect().MasterParam.GetArtifactParam(iname); DebugUtility.Assert(this.mArtifactParam != null, "Failed ArtifactParam iname \"" + iname + "\" not found."); this.mUniqueID = (OLong)iid; return(true); }
private void OnDisable() { if (!Object.op_Inequality((Object)MonoSingleton <GameManager> .GetInstanceDirect(), (Object)null)) { return; } MonoSingleton <GameManager> .Instance.OnDayChange -= new GameManager.DayChangeEvent(this.RefreshBattleCountOnDayChange); }
private void OnDestroy() { if (!Object.op_Inequality((Object)MonoSingleton <GameManager> .GetInstanceDirect(), (Object)null)) { return; } MonoSingleton <GameManager> .GetInstanceDirect().OnSceneChange -= new GameManager.SceneChangeEvent(this.OnGoOutShop); }
public int GetEnhanceRankCap() { if (this.type != EItemType.Equip) { return(1); } return((int)MonoSingleton <GameManager> .GetInstanceDirect().GetRarityParam(this.rare).EquipEnhanceParam.rankcap); }
public int GetPiercePoint() { if (this.type != EItemType.UnitPiece) { return(0); } return((int)MonoSingleton <GameManager> .GetInstanceDirect().GetRarityParam(this.rare).PieceToPoint); }
private void Refresh() { string unlockUnitId = GlobalVars.UnlockUnitID; this.UnlockUnit = MonoSingleton <GameManager> .Instance.GetUnitParam(unlockUnitId); DataSource.Bind <UnitParam>(((Component)this).get_gameObject(), this.UnlockUnit); UnitData unitDataByUnitId = MonoSingleton <GameManager> .GetInstanceDirect().Player.FindUnitDataByUnitID(unlockUnitId); if (unitDataByUnitId != null) { DataSource.Bind <UnitData>(((Component)this).get_gameObject(), unitDataByUnitId); } bool flag = false; if (MonoSingleton <GameManager> .Instance.Player.FindUnitDataByUniqueParam(this.UnlockUnit) == null) { flag = MonoSingleton <GameManager> .Instance.Player.GetItemAmount((string)this.UnlockUnit.piece) >= this.UnlockUnit.GetUnlockNeedPieces(); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.QuestList, (UnityEngine.Object)null)) { this.QuestList.SetActive(!flag); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.BtnDecide, (UnityEngine.Object)null)) { ((Component)this.BtnDecide).get_gameObject().SetActive(flag); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.BtnCancel, (UnityEngine.Object)null)) { ((Component)this.BtnCancel).get_gameObject().SetActive(flag); } if (flag) { if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.TxtTitle, (UnityEngine.Object)null)) { this.TxtTitle.set_text(LocalizedText.Get("sys.UNIT_UNLOCK_TITLE")); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.TxtComment, (UnityEngine.Object)null)) { this.TxtComment.set_text(LocalizedText.Get("sys.UNIT_UNLOCK_COMMENT")); ((Component)this.TxtComment).get_gameObject().SetActive(true); } } else { if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.TxtTitle, (UnityEngine.Object)null)) { this.TxtTitle.set_text(LocalizedText.Get("sys.UNIT_GAINED_QUEST_TITLE")); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.TxtComment, (UnityEngine.Object)null)) { this.TxtComment.set_text(LocalizedText.Get("sys.UNIT_GAINED_COMMENT")); ((Component)this.TxtComment).get_gameObject().SetActive(this.mGainedQuests.Count == 0); } this.RefreshGainedQuests(this.UnlockUnit); } GameParameter.UpdateAll(((Component)this).get_gameObject()); }
private void CreateStoryList() { if (Object.op_Equality((Object)MonoSingleton <GameManager> .GetInstanceDirect(), (Object)null)) { return; } List <QuestParam> collaboSkillQuests = CollaboSkillQuestList.GetCollaboSkillQuests(this.CurrentUnit1, this.CurrentUnit2); if (collaboSkillQuests == null) { DebugUtility.LogError(string.Format("連携スキルクエストが見つかりません:{0} × {1}", (object)this.CurrentUnit1.UnitParam.iname, (object)this.CurrentUnit2.UnitParam.iname)); } else { QuestParam[] availableQuests = MonoSingleton <GameManager> .Instance.Player.AvailableQuests; for (int index = 0; index < collaboSkillQuests.Count; ++index) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type CollaboSkillQuestList.\u003CCreateStoryList\u003Ec__AnonStorey23F listCAnonStorey23F = new CollaboSkillQuestList.\u003CCreateStoryList\u003Ec__AnonStorey23F(); // ISSUE: reference to a compiler-generated field listCAnonStorey23F.questParam = collaboSkillQuests[index]; // ISSUE: reference to a compiler-generated field bool flag1 = listCAnonStorey23F.questParam.IsDateUnlock(-1L); // ISSUE: reference to a compiler-generated method bool flag2 = Array.Find <QuestParam>(availableQuests, new Predicate <QuestParam>(listCAnonStorey23F.\u003C\u003Em__258)) != null; // ISSUE: reference to a compiler-generated field bool flag3 = listCAnonStorey23F.questParam.state == QuestStates.Cleared; bool flag4 = flag1 && flag2 && !flag3; GameObject gameObject; if (flag2 || flag3) { gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.StoryQuestItemTemplate); ((Selectable)gameObject.GetComponent <Button>()).set_interactable(flag4); } else { gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.StoryQuestDisableItemTemplate); } gameObject.SetActive(true); gameObject.get_transform().SetParent(this.QuestList, false); // ISSUE: reference to a compiler-generated field DataSource.Bind <QuestParam>(gameObject, listCAnonStorey23F.questParam); CharacterQuestListItem component1 = (CharacterQuestListItem)gameObject.GetComponent <CharacterQuestListItem>(); if (Object.op_Inequality((Object)component1, (Object)null)) { // ISSUE: reference to a compiler-generated field component1.SetUp(this.CurrentUnit1, this.CurrentUnit2, listCAnonStorey23F.questParam); } ListItemEvents component2 = (ListItemEvents)gameObject.GetComponent <ListItemEvents>(); component2.OnSelect = new ListItemEvents.ListItemEvent(this.OnQuestSelect); component2.OnOpenDetail = new ListItemEvents.ListItemEvent(this.OnOpenItemDetail); component2.OnCloseDetail = new ListItemEvents.ListItemEvent(this.OnCloseItemDetail); this.mStoryQuestListItems.Add(gameObject); } } }
public void AddArary(ItemData[] list) { List <UnitData> units = MonoSingleton <GameManager> .GetInstanceDirect().Player.Units; for (int index = 0; index < list.Length; ++index) { this.AddInternal(list[index].Param, units); } }
private void OnDisable() { this.ClearAllItems(); if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)MonoSingleton <GameManager> .GetInstanceDirect(), (UnityEngine.Object)null)) { return; } MonoSingleton <GameManager> .Instance.OnDayChange -= new GameManager.DayChangeEvent(this.OnTrophyReset); }