private void OnTakeBtnClick(GameObject go) { Globals.Instance.EffectSoundMgr.Play("ui/ui_001"); WorldBossSubSystem worldBossSystem = Globals.Instance.Player.WorldBossSystem; if (worldBossSystem != null && this.mGUILongLinRewardData != null) { if (this.mGUILongLinRewardData.mFDSInfo != null) { if (!worldBossSystem.IsFDSRewardTaken(this.mGUILongLinRewardData.mFDSInfo.ID) && this.mGUILongLinRewardData.mFDSInfo.FireDragonScale < Globals.Instance.Player.Data.FireDragonScale) { this.mBaseScene.AddRewardData(this.mGUILongLinRewardData.mFDSInfo.RewardType, this.mGUILongLinRewardData.mFDSInfo.RewardValue1, this.mGUILongLinRewardData.mFDSInfo.RewardValue2); MC2S_TakeFDSReward mC2S_TakeFDSReward = new MC2S_TakeFDSReward(); mC2S_TakeFDSReward.ID = this.mGUILongLinRewardData.mFDSInfo.ID; Globals.Instance.CliSession.Send(647, mC2S_TakeFDSReward); } } else if (this.mGUILongLinRewardData.mWorldRespawnInfo != null && worldBossSystem.IsWBRewrdCanTaken(this.mGUILongLinRewardData.mWorldRespawnInfo.ID) && !worldBossSystem.IsWBRewardTaken(this.mGUILongLinRewardData.mWorldRespawnInfo.ID)) { bool flag = worldBossSystem.IsWBRewrdDouble(this.mGUILongLinRewardData.mWorldRespawnInfo.ID); if (this.mGUILongLinRewardData.mWorldRespawnInfo.RewardType == 1 || this.mGUILongLinRewardData.mWorldRespawnInfo.RewardType == 2) { this.mBaseScene.AddRewardData(this.mGUILongLinRewardData.mWorldRespawnInfo.RewardType, (!flag) ? this.mGUILongLinRewardData.mWorldRespawnInfo.RewardValue1 : (this.mGUILongLinRewardData.mWorldRespawnInfo.RewardValue1 * 2), 0); } else { this.mBaseScene.AddRewardData(this.mGUILongLinRewardData.mWorldRespawnInfo.RewardType, this.mGUILongLinRewardData.mWorldRespawnInfo.RewardValue1, (!flag) ? this.mGUILongLinRewardData.mWorldRespawnInfo.RewardValue2 : (this.mGUILongLinRewardData.mWorldRespawnInfo.RewardValue2 * 2)); } MC2S_TakeKillWorldBossReward mC2S_TakeKillWorldBossReward = new MC2S_TakeKillWorldBossReward(); mC2S_TakeKillWorldBossReward.Slot = this.mGUILongLinRewardData.mWorldRespawnInfo.ID; Globals.Instance.CliSession.Send(650, mC2S_TakeKillWorldBossReward); } } }
private void OnSureBtnClick(GameObject go) { Globals.Instance.EffectSoundMgr.Play("ui/ui_001"); WorldBossSubSystem worldBossSystem = Globals.Instance.Player.WorldBossSystem; int curPageIndex = this.GetCurPageIndex(); if (curPageIndex == 0) { this.mRwardDatas.Clear(); int fDSMaxId = this.GetFDSMaxId(); for (int i = 1; i <= fDSMaxId; i++) { FDSInfo info = Globals.Instance.AttDB.FDSDict.GetInfo(i); if (info != null) { if (!worldBossSystem.IsFDSRewardTaken(info.ID) && info.FireDragonScale <= Globals.Instance.Player.Data.FireDragonScale) { this.mRwardDatas.Add(new RewardData { RewardType = info.RewardType, RewardValue1 = info.RewardValue1, RewardValue2 = info.RewardValue2 }); } } } MC2S_TakeFDSReward mC2S_TakeFDSReward = new MC2S_TakeFDSReward(); mC2S_TakeFDSReward.ID = 0; Globals.Instance.CliSession.Send(647, mC2S_TakeFDSReward); } else if (curPageIndex == 1) { this.mRwardDatas.Clear(); foreach (WorldRespawnInfo current in Globals.Instance.AttDB.WorldRespawnDict.Values) { if (current != null) { if (worldBossSystem.IsWBRewrdCanTaken(current.ID) && !worldBossSystem.IsWBRewardTaken(current.ID)) { bool flag = worldBossSystem.IsWBRewrdDouble(current.ID); if (current.RewardType == 1 || current.RewardType == 2) { this.mRwardDatas.Add(new RewardData { RewardType = current.RewardType, RewardValue1 = (!flag) ? current.RewardValue1 : (current.RewardValue1 * 2), RewardValue2 = 0 }); } else { this.mRwardDatas.Add(new RewardData { RewardType = current.RewardType, RewardValue1 = current.RewardValue1, RewardValue2 = (!flag) ? current.RewardValue2 : (current.RewardValue2 * 2) }); } } } } MC2S_TakeKillWorldBossReward mC2S_TakeKillWorldBossReward = new MC2S_TakeKillWorldBossReward(); mC2S_TakeKillWorldBossReward.Slot = 0; Globals.Instance.CliSession.Send(650, mC2S_TakeKillWorldBossReward); } }