public ScenarioDbId GetLastSelectedMission() { string selectedAdventureAndModeString = this.GetSelectedAdventureAndModeString(); ScenarioDbId iNVALID = ScenarioDbId.INVALID; this.m_LastSelectedMissions.TryGetValue(selectedAdventureAndModeString, out iNVALID); return(iNVALID); }
public AdventureBossDef GetBossDef(ScenarioDbId mission) { AdventureBossDef def = null; if (!this.m_CachedBossDef.TryGetValue(mission, out def)) { Debug.LogError(string.Format("Boss def for mission not loaded: {0}\nCall LoadBossDef first.", mission)); } return(def); }
public string GetBossDefAssetPath(ScenarioDbId mission) { DbfRecord record = GameDbf.AdventureMission.GetRecord("SCENARIO_ID", (int)mission); if (record == null) { return(null); } return(record.GetAssetName("BOSS_DEF_ASSET_PATH")); }
private void OnRockPraticeMode(bool expert) { if (SingletonOnGameRequest) { return; } SingletonOnGameRequest = true; if (SceneMgr.Get().IsInGame()) { HoldBack(1000); return; } if (DeckPickerTrayDisplay.Get() == null) { HoldBack(1000); Log("DeckPickerTrayDisplay.Get() NULL"); SingletonOnGameRequest = false; AdventureDbId adventureId = Options.Get().GetEnum <AdventureDbId>(Option.SELECTED_ADVENTURE, AdventureDbId.PRACTICE); AdventureModeDbId modeId = Options.Get().GetEnum <AdventureModeDbId>(Option.SELECTED_ADVENTURE_MODE, AdventureModeDbId.NORMAL); if (expert) { modeId = Options.Get().GetEnum <AdventureModeDbId>(Option.SELECTED_ADVENTURE_MODE, AdventureModeDbId.EXPERT); } Log("AdventureConfig.Get().GetSelectedMode " + AdventureConfig.Get().GetSelectedMode()); if (AdventureConfig.Get().CanPlayMode(adventureId, modeId)) { AdventureConfig.Get().SetSelectedAdventureMode(adventureId, modeId); AdventureConfig.Get().ChangeSubSceneToSelectedAdventure(); } else { Log("AdventureConfig.Get().CanPlayMode FALSE"); } return; } long deck = DeckPickerTrayDisplay.Get().GetSelectedDeckID(); if (deck == 0) { HoldBack(1000); Log("DeckPickerTrayDisplay.Get() 0"); SingletonOnGameRequest = false; return; } HoldBack(5000); ScenarioDbId mission = HearthrockUtils.RandomPracticeMission(); GameMgr.Get().FindGame(PegasusShared.GameType.GT_VS_AI, PegasusShared.FormatType.FT_STANDARD, (int)mission, deck, 0L); }
private void OnMissionSelected(ScenarioDbId mission, bool showDetails) { if (mission != ScenarioDbId.INVALID) { if (showDetails) { this.m_slidingTray.ToggleTraySlider(true, null, true); } List <CardRewardData> immediateCardRewardsForDefeatingScenario = AdventureProgressMgr.Get().GetImmediateCardRewardsForDefeatingScenario((int)mission); bool flag = AdventureProgressMgr.Get().HasDefeatedScenario((int)mission); this.m_rewardsChest.gameObject.SetActive(((immediateCardRewardsForDefeatingScenario != null) && (immediateCardRewardsForDefeatingScenario.Count != 0)) && !flag); } }
public AdventureBossDef GetBossDef(ScenarioDbId mission) { object[] objArray1 = new object[] { mission }; return(base.method_14 <AdventureBossDef>("GetBossDef", objArray1)); }
public void UpdateBossChest(AdventureRewardsChest chest, ScenarioDbId mission) { object[] objArray1 = new object[] { chest, mission }; base.method_8("UpdateBossChest", objArray1); }
public bool DoesMissionRequireDeck(ScenarioDbId scenario) { DbfRecord record = GameDbf.Scenario.GetRecord((int)scenario); return((record == null) || (record.GetInt("PLAYER1_DECK_ID") == 0)); }
public void OnMissionSelected(ScenarioDbId mission, bool showDetails) { object[] objArray1 = new object[] { mission, showDetails }; base.method_8("OnMissionSelected", objArray1); }
public void ShowBossFrame(ScenarioDbId mission) { object[] objArray1 = new object[] { mission }; base.method_8("ShowBossFrame", objArray1); }
public void OnBossSelected(AdventureBossCoin coin, ScenarioDbId mission, bool showDetails) { object[] objArray1 = new object[] { coin, mission, showDetails }; base.method_8("OnBossSelected", objArray1); }
public bool SetStatus_PlayingMission(ScenarioDbId missionId) { object[] objArray1 = new object[] { missionId }; return(base.method_11 <bool>("SetStatus_PlayingMission", objArray1)); }
private bool DecodeStatusVal(BinaryReader reader, ref Enum enumVal, ref string key) { System.Type type; key = null; byte num = 0; int num2 = 0; int position = (int)reader.BaseStream.Position; int num4 = position + 1; try { num = reader.ReadByte(); num4 = (int)reader.BaseStream.Position; } catch (Exception exception) { object[] args = new object[] { num, position, exception.GetType().FullName, exception.Message }; Log.Henry.Print("PresenceMgr.DecodeStatusVal - unable to decode enum id {0} at index {1} : {2} {3}", args); return(false); } if (!this.m_idToEnumMap.TryGetValue(num, out type)) { object[] objArray2 = new object[] { num, position }; Log.Henry.Print("PresenceMgr.DecodeStatusVal - id {0} at index {1}, has no enum type", objArray2); return(false); } try { num2 = reader.ReadInt32(); } catch (Exception exception2) { object[] objArray3 = new object[] { num, num4, exception2.GetType().FullName, exception2.Message }; Log.Henry.Print("PresenceMgr.DecodeStatusVal - unable to decode enum value {0} at index {1} : {2} {3}", objArray3); return(false); } if (type == typeof(PresenceStatus)) { PresenceStatus status = (PresenceStatus)num2; enumVal = status; if (!s_stringKeyMap.TryGetValue(status, out key)) { object[] objArray4 = new object[] { type, status, num4 }; Log.Henry.Print("PresenceMgr.DecodeStatusVal - value {0}.{1} at index {2}, has no string", objArray4); return(false); } } else if (type == typeof(PresenceTutorial)) { PresenceTutorial tutorial = (PresenceTutorial)num2; enumVal = tutorial; if (!s_stringKeyMap.TryGetValue(tutorial, out key)) { object[] objArray5 = new object[] { type, tutorial, num4 }; Log.Henry.Print("PresenceMgr.DecodeStatusVal - value {0}.{1} at index {2}, has no string", objArray5); return(false); } } else if (type == typeof(PresenceAdventureMode)) { PresenceAdventureMode mode = (PresenceAdventureMode)num2; enumVal = mode; if (!s_stringKeyMap.TryGetValue(mode, out key)) { object[] objArray6 = new object[] { type, mode, num4 }; Log.Henry.Print("PresenceMgr.DecodeStatusVal - value {0}.{1} at index {2}, has no string", objArray6); return(false); } } else if (type == typeof(ScenarioDbId)) { ScenarioDbId id = (ScenarioDbId)num2; enumVal = id; if (!s_stringKeyMap.TryGetValue(id, out key)) { object[] objArray7 = new object[] { type, id, num4 }; Log.Henry.Print("PresenceMgr.DecodeStatusVal - value {0}.{1} at index {2}, has no string", objArray7); return(false); } } return(true); }
public void ShowBossRewards(ScenarioDbId mission, Vector3 origin) { object[] objArray1 = new object[] { mission, origin }; base.method_8("ShowBossRewards", objArray1); }
public AdventureBossCoin CreateBoss(string coinPrefab, string rewardsPrefab, ScenarioDbId mission, bool enabled) { object[] objArray1 = new object[] { coinPrefab, rewardsPrefab, mission, enabled }; return(base.method_14 <AdventureBossCoin>("CreateBoss", objArray1)); }
public bool DoesMissionRequireDeck(ScenarioDbId scenario) { object[] objArray1 = new object[] { scenario }; return(base.method_11 <bool>("DoesMissionRequireDeck", objArray1)); }
public void SetMission(ScenarioDbId mission, bool showDetails) { object[] objArray1 = new object[] { mission, showDetails }; base.method_8("SetMission", objArray1); }
public bool IsScenarioJustDefeated(ScenarioDbId mission) { object[] objArray1 = new object[] { mission }; return(base.method_11 <bool>("IsScenarioJustDefeated", objArray1)); }
public bool IsScenarioDefeatedAndInitCache(ScenarioDbId mission) { object[] objArray1 = new object[] { mission }; return(base.method_11 <bool>("IsScenarioDefeatedAndInitCache", objArray1)); }
public void FireBossSelectedEvent(AdventureBossCoin coin, ScenarioDbId mission) { object[] objArray1 = new object[] { coin, mission }; base.method_8("FireBossSelectedEvent", objArray1); }
public string GetBossDefAssetPath(ScenarioDbId mission) { object[] objArray1 = new object[] { mission }; return(base.method_13("GetBossDefAssetPath", objArray1)); }
public void HideBossRewards(ScenarioDbId mission) { object[] objArray1 = new object[] { mission }; base.method_8("HideBossRewards", objArray1); }