Beispiel #1
0
        private void OnItemGetClickEvent(IEvent ievent)
        {
            var _e         = ievent as Event_ItemInfoClick;
            var _item      = DataModel.GetPathList[_e.Index];
            var _tbItemGet = Table.GetItemGetInfo(_item.ItemGetId);

            if (_tbItemGet.IsShow == -1) //开启条件
            {
                if (_item.ItemGetId == 21)
                {//领地争夺有灭世入口
                    MainUIController MainCtr = UIManager.Instance.GetController(UIConfig.MainUI) as MainUIController;
                    if (1 != (MainCtr.GetDataModel("MainUI") as MainUIDataModel).MainActivity)
                    {
                        GameUtils.ShowHintTip(GameUtils.GetDictionaryText(270229));
                        return;
                    }
                }
                EventDispatcher.Instance.DispatchEvent(new Close_UI_Event(UIConfig.ItemInfoUI));
                EventDispatcher.Instance.DispatchEvent(new Close_UI_Event(UIConfig.ChestInfoUI));
                GameUtils.GotoUiTab(_tbItemGet.UIName, _tbItemGet.Param[0], _tbItemGet.Param[1], _tbItemGet.Param[2]);
            }
            else
            {
                var _dic = PlayerDataManager.Instance.CheckCondition(_tbItemGet.IsShow);
                if (_dic != 0)
                {
                    //不符合副本扫荡条件
                    EventDispatcher.Instance.DispatchEvent(new ShowUIHintBoard(_dic));
                    return;
                }
                EventDispatcher.Instance.DispatchEvent(new Close_UI_Event(UIConfig.ItemInfoUI));
                EventDispatcher.Instance.DispatchEvent(new Close_UI_Event(UIConfig.ChestInfoUI));
                //从道具途径进入活动二级界面,关闭时不回活动一级界面,但是如果道具在活动界面时,关闭要显示一级界面
                if (UIManager.Instance.GetController(UIConfig.ActivityUI).State == FrameState.Open)
                {
                    GameUtils.GotoUiTab(_tbItemGet.UIName, _tbItemGet.Param[0], _tbItemGet.Param[1], _tbItemGet.Param[2]);
                }
                else
                {
                    GameUtils.GotoUiTab(_tbItemGet.UIName, _tbItemGet.Param[0], _tbItemGet.Param[1], 0);
                }
            }
            if (UIManager.Instance.GetController(UIConfig.QuickBuyUi).State == FrameState.Open)
            {
                var e = new Close_UI_Event(UIConfig.QuickBuyUi);
                EventDispatcher.Instance.DispatchEvent(e);
            }
        }