Ejemplo n.º 1
0
        private void UpdateGetRewardSuccess()
        {
            ExpeditionData data       = ExpeditionData.GetExpeditionDataByID(ExpeditionProxy.instance.selectExpeditionDungeonInfo.id);
            LuaTable       tips_model = LuaScriptMgr.Instance.CallLuaFunction("gamemanager.GetModel", "tips_model")[0] as LuaTable;
            LuaTable       tip_view   = tips_model.GetLuaFunction("GetTipView").Call("common_reward_tips_view")[0] as LuaTable;

            tip_view.GetLuaFunction("CreateByCSharpGameResDataList").Call(data.rewardList);
        }
        public void OnClickDungeonButtonHandler()
        {
            if (!expeditionDungeonInfo.isUnlocked)
            {
                if (expeditionDungeonInfo.data.type != (int)ExpeditionDungeonType.Expedition_Normal)
                {
                    ExpeditionData data = ExpeditionData.GetExpeditionDataByID(expeditionDungeonInfo.id);
                    CommonRewardTipsView.Open(data.rewardList);
                }

                return;
            }
            ExpeditionProxy.instance.selectExpeditionDungeonInfo = expeditionDungeonInfo;
            int type = expeditionDungeonInfo.data.type;

            if (type == (int)ExpeditionDungeonType.Expedition_Normal)
            {
                if (expeditionDungeonInfo.isFinished)
                {
                    CommonAutoDestroyTipsView.Open(Localization.Get("ui.expedition_view.conquerOther"));
                    return;
                }
            }
            else
            {
                if (expeditionDungeonInfo.isFinished)
                {
                    ExpeditionData data = ExpeditionData.GetExpeditionDataByID(expeditionDungeonInfo.id);
                    if (!expeditionDungeonInfo.isGetReward)
                    {
                        CommonRewardTipsView.Open(data.rewardList, true, ClickRewardBtnHandler);
                    }
                    else
                    {
                        CommonRewardTipsView.Open(data.rewardList);
                    }
                    return;
                }
            }

            //ExpeditionFormationView.Open(true);
            ExpeditionEmbattleView.Open(true);
        }