private void OnStartBtnClick(GameObject go) { Globals.Instance.EffectSoundMgr.Play("ui/ui_001"); if (Globals.Instance.Player.Data.MGCount >= GameConst.GetInt32(125)) { GameUIManager.mInstance.ShowMessageTipByKey("guard7", 0f, 0f); return; } GameCache.SetGuardLevel(this.index, GUIGuardReadyPopUp.LevelItem.mCur.Index); GameUIManager.mInstance.uiState.AdventureSceneInfo = Globals.Instance.AttDB.SceneDict.GetInfo(GameConst.GetInt32(120)); if (GameUIManager.mInstance.uiState.AdventureSceneInfo == null) { global::Debug.LogError(new object[] { string.Format("SceneInfo is null Error, MemoryGearSceneID : {0}", GameConst.GetInt32(120)) }); return; } GameUIManager.mInstance.uiState.PveSceneID = GameConst.GetInt32(120); GameUIManager.mInstance.uiState.PveSceneValue = this.mMGInfo.ID; MC2S_PveStart mC2S_PveStart = new MC2S_PveStart(); mC2S_PveStart.SceneID = GameUIManager.mInstance.uiState.PveSceneID; mC2S_PveStart.Value = GameUIManager.mInstance.uiState.PveSceneValue; Globals.Instance.CliSession.Send(600, mC2S_PveStart); }
private void OnTakeBtnClick(GameObject go) { Globals.Instance.EffectSoundMgr.Play("ui/ui_001"); if ((ulong)Globals.Instance.Player.Data.Level < (ulong)((long)GameConst.GetInt32(2))) { GameUIManager.mInstance.ShowMessageTipByKey("PveR_41", 0f, 0f); return; } if (!GUIKingRewardScene.CanTakePartIn()) { GameUIManager.mInstance.ShowMessageTipByKey("activityKingRewardMaxCount", 0f, 0f); return; } if (Globals.Instance.Player.Data.Energy < GameConst.GetInt32(146)) { GUIShortcutBuyItem.Show(GUIShortcutBuyItem.BuyType.Energy); return; } GameUIManager.mInstance.uiState.AdventureSceneInfo = Globals.Instance.AttDB.SceneDict.GetInfo(this.questInfo.SceneID); if (GameUIManager.mInstance.uiState.AdventureSceneInfo == null) { global::Debug.LogError(new object[] { string.Format("SceneInfo is null Error , QuestInfoID: {0} , SceneID : {1}", this.questInfo.ID, this.questInfo.SceneID) }); return; } GameUIManager.mInstance.uiState.PveSceneID = this.questInfo.SceneID; GameUIManager.mInstance.uiState.PveSceneValue = this.questInfo.ID; this.SaveKRData(); MC2S_PveStart mC2S_PveStart = new MC2S_PveStart(); mC2S_PveStart.SceneID = this.questInfo.SceneID; mC2S_PveStart.Value = this.questInfo.ID; Globals.Instance.CliSession.Send(600, mC2S_PveStart); }
public void OnReadyStartBtnClicked(GameObject go) { Globals.Instance.EffectSoundMgr.Play("ui/ui_001"); if (this.sceneInfo.Difficulty == 9 && Globals.Instance.Player.Data.NightmareCount >= GameConst.GetInt32(124)) { GameUIManager.mInstance.ShowMessageTipByKey("PveR_48", 0f, 0f); return; } if (this.sceneInfo.DayTimes - Globals.Instance.Player.GetSceneTimes(this.sceneInfo.ID) <= 0) { if (this.sceneInfo.Difficulty != 9) { this.BuySceneTimes(); } else { GameUIManager.mInstance.ShowMessageTipByKey("PveR_18", 0f, 0f); } return; } if (Globals.Instance.Player.Data.Energy < this.sceneInfo.CostValue) { GUIShortcutBuyItem.Show(GUIShortcutBuyItem.BuyType.Energy); return; } GameUIManager.mInstance.uiState.AdventureSceneInfo = this.sceneInfo; GameUIManager.mInstance.uiState.PveSceneID = this.sceneInfo.ID; GameUIManager.mInstance.uiState.PveSceneValue = 0; MC2S_PveStart mC2S_PveStart = new MC2S_PveStart(); mC2S_PveStart.SceneID = this.sceneInfo.ID; Globals.Instance.CliSession.Send(600, mC2S_PveStart); }