protected void ShowHookQuitUI() { if (EntityWorld.Instance.EntSelf == null) { return; } InstanceManager.StopAllClientAI(true); if (UIManagerControl.Instance.IsOpen("BattleBackpackUI")) { UIManagerControl.Instance.HideUI("BattleBackpackUI"); } CommonBattlePassUI commonBattlePassUI = LinkNavigationManager.OpenCommonBattlePassUI(); if (commonBattlePassUI) { commonBattlePassUI.UpdateHookReward(this.fixRealTimeExp, this.fixRealTimeGold, (this.CurWave - 1 >= 0) ? (this.CurWave - 1) : 0, delegate { BattleBackpackUI battleBackpackUI = UIManagerControl.Instance.OpenUI("BattleBackpackUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush) as BattleBackpackUI; battleBackpackUI.SetTitleName(GameDataUtils.GetChineseContent(511612, false)); battleBackpackUI.ShowTips(false, string.Empty); this.UpdateRealTimeDrop(InstanceManager.RealTimeDropCache); }, new Action(this.ExitHookInstance)); commonBattlePassUI.PlayAnimation(InstanceResultType.Result); this.autoExitTimer = TimerHeap.AddTimer(this.autoExitTime, 0, new Action(this.ExitHookInstance)); } else { this.ExitHookInstance(); } }
public override void UpdateRealTimeDrop(XDict <int, long> realTimeDrop) { this.fixRealTimeDrop.Clear(); this.fixRealTimeExp = 0L; this.fixRealTimeGold = 0L; List <Items> list = new List <Items>(); for (int i = 0; i < realTimeDrop.Keys.get_Count(); i++) { if (realTimeDrop.Keys.get_Item(i) == 1) { this.fixRealTimeExp = realTimeDrop.Values.get_Item(i); } else if (realTimeDrop.Keys.get_Item(i) == 2) { this.fixRealTimeGold = realTimeDrop.Values.get_Item(i); } else if (DataReader <Items> .Contains(realTimeDrop.Keys.get_Item(i))) { if (realTimeDrop.Values.get_Item(i) > 0L) { list.Add(DataReader <Items> .Get(realTimeDrop.Keys.get_Item(i))); } } } list.Sort(ComparisonUtility.ItemComparison); for (int j = 0; j < list.get_Count(); j++) { long num = realTimeDrop[list.get_Item(j).id]; if (list.get_Item(j).overlay == 0) { Debug.LogError("Logic Error overlay == 0: " + list.get_Item(j).id); } else { while (num > (long)list.get_Item(j).overlay) { num -= (long)list.get_Item(j).overlay; this.fixRealTimeDrop.Add(new KeyValuePair <int, long>(list.get_Item(j).id, (long)list.get_Item(j).overlay)); } if (num > 0L) { this.fixRealTimeDrop.Add(new KeyValuePair <int, long>(list.get_Item(j).id, num)); } } } this.battleBackpackUI = (UIManagerControl.Instance.GetUIIfExist("BattleBackpackUI") as BattleBackpackUI); if (this.battleBackpackUI) { this.battleBackpackUI.SetItem(this.fixRealTimeDrop, GameDataUtils.GetChineseContent(50727, false)); } }
public override void UpdateRealTimeDrop(XDict <int, long> realTimeDrop) { this.fixRealTimeDrop.Clear(); this.fixRealTimeExp = 0L; this.fixRealTimeGold = 0L; List <Items> list = new List <Items>(); for (int i = 0; i < realTimeDrop.Keys.get_Count(); i++) { if (realTimeDrop.Keys.get_Item(i) == 1) { this.fixRealTimeExp = realTimeDrop.Values.get_Item(i); } else if (realTimeDrop.Keys.get_Item(i) == 2) { this.fixRealTimeGold = realTimeDrop.Values.get_Item(i); } else if (DataReader <Items> .Contains(realTimeDrop.Keys.get_Item(i))) { if (realTimeDrop.Values.get_Item(i) > 0L) { list.Add(DataReader <Items> .Get(realTimeDrop.Keys.get_Item(i))); } } } list.Sort(ComparisonUtility.ItemComparison); for (int j = 0; j < list.get_Count(); j++) { long num = realTimeDrop[list.get_Item(j).id]; if (list.get_Item(j).overlay == 0) { Debug.LogError("Logic Error overlay == 0: " + list.get_Item(j).id); } else { while (num > (long)list.get_Item(j).overlay) { num -= (long)list.get_Item(j).overlay; this.fixRealTimeDrop.Add(new KeyValuePair <int, long>(list.get_Item(j).id, (long)list.get_Item(j).overlay)); } if (num > 0L) { this.fixRealTimeDrop.Add(new KeyValuePair <int, long>(list.get_Item(j).id, num)); } } } if (this.battleUI && EntityWorld.Instance.EntSelf != null) { long defaultBatchExp = 0L; if (DataReader <GuaJiQuYuPeiZhi> .Contains(HuntManager.Instance.AreaId)) { defaultBatchExp = DataReader <GuaJiQuYuPeiZhi> .Get(HuntManager.Instance.AreaId).exp; } this.battleUI.ShowRewardPreviewUI(true, RewardPreviewUI.CopyType.HOOK, this.fixRealTimeExp, defaultBatchExp); } this.battleBackpackUI = (UIManagerControl.Instance.GetUIIfExist("BattleBackpackUI") as BattleBackpackUI); if (this.battleBackpackUI) { this.battleBackpackUI.SetItem(this.fixRealTimeDrop, this.backpackLockInfo, string.Empty); } }