少年修仙传客户端代码仓库
client_linchunjie
2019-04-12 1fd5714a8721a45527eeec1889ea280bbe07fb28
3335 宗门试炼删除兑换逻辑
6个文件已修改
108 ■■■■■ 已修改文件
Lua/Gen/SnxxzUIDailyQuestModelWrap.cs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/DailyQuest/DailyQuestBehaviour.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/DailyQuest/DailyQuestModel.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/TrialDungeonModel.cs 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/TrialDungeonSelectWin.cs 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/ItemLogicUtility.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/SnxxzUIDailyQuestModelWrap.cs
@@ -58,12 +58,10 @@
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "currentActiveValue", _g_get_currentActiveValue);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "everyDayRedpoint", _g_get_everyDayRedpoint);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "timeLimitRedpoint", _g_get_timeLimitRedpoint);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "trialExchangeRedpoint", _g_get_trialExchangeRedpoint);
            
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "currentDailyQuest", _s_set_currentDailyQuest);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "everyDayRedpoint", _s_set_everyDayRedpoint);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "timeLimitRedpoint", _s_set_timeLimitRedpoint);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "trialExchangeRedpoint", _s_set_trialExchangeRedpoint);
            
            
            Utils.EndObjectRegister(type, L, translator, null, null,
@@ -925,21 +923,6 @@
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_trialExchangeRedpoint(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                Snxxz.UI.DailyQuestModel gen_to_be_invoked = (Snxxz.UI.DailyQuestModel)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.trialExchangeRedpoint);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_currentDailyQuest(RealStatePtr L)
@@ -986,23 +969,6 @@
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_trialExchangeRedpoint(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                Snxxz.UI.DailyQuestModel gen_to_be_invoked = (Snxxz.UI.DailyQuestModel)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.trialExchangeRedpoint = (Snxxz.UI.Redpoint)translator.GetObject(L, 2, typeof(Snxxz.UI.Redpoint));
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 0;
        }
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _e_activeValueRewardGotEvent(RealStatePtr L)
        {
System/DailyQuest/DailyQuestBehaviour.cs
@@ -84,9 +84,6 @@
            switch ((DailyQuestType)data.id)
            {
                case DailyQuestType.Trial:
                    m_FuncRedpointBehaviour.redpointId = model.trialExchangeRedpoint.id;
                    break;
                default:
                    m_FuncRedpointBehaviour.redpointId = 0;
                    break;
@@ -289,10 +286,6 @@
            switch ((DailyQuestType)data.id)
            {
                case DailyQuestType.Trial:
                    m_Func.gameObject.SetActive(state != DailyQuestModel.DailyQuestState.Locked);
                    m_FuncDisplay.text = Language.Get("ItemHandle_exchange");
                    break;
                case DailyQuestType.DungeonAssist:
                    m_Func.gameObject.SetActive(false);
                    m_Complete.gameObject.SetActive(false);
System/DailyQuest/DailyQuestModel.cs
@@ -26,7 +26,6 @@
        public Redpoint timeLimitRedpoint = new Redpoint(DAILYQUEST_REDPOINTID, TIMELIMIT_REDPOINTID);
        Redpoint activeValueRedpoint = new Redpoint(EVERYDAY_REDPOINTID, ACTIVEVALUE_REDPOINT);
        Redpoint realmPointRedpoint = new Redpoint(EVERYDAY_REDPOINTID, REALMPOINT_REPOINT);
        public Redpoint trialExchangeRedpoint = new Redpoint(EVERYDAY_REDPOINTID, TRIALEXCHANGE_REDPOINTID);
        int m_DailyQuestTotalActiveValue = 150;
        public int dailyQuestTotalActiveValue {
System/Dungeon/TrialDungeonModel.cs
@@ -255,10 +255,10 @@
                error = 1;
                return false;
            }
            if (!NewBieCenter.Instance.completeGuidesBuf.Contains(TRIALEXCHANGE_GUIDE))
            {
                NewBieCenter.Instance.RemoveNewBieGuide(TRIALEXCHANGE_GUIDE);
            }
            //if (!NewBieCenter.Instance.completeGuidesBuf.Contains(TRIALEXCHANGE_GUIDE))
            //{
            //    NewBieCenter.Instance.RemoveNewBieGuide(TRIALEXCHANGE_GUIDE);
            //}
            //var tokenConfig = ItemConfig.Get(config.tokenId);
            //ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"),
            //    Language.Get("TokenUseConfirm", config.tokenCount, tokenConfig.ItemName, config.description), (bool isOk) =>
@@ -428,17 +428,17 @@
        #region 红点
        void UpdateRedpoint()
        {
            dailyQuestModel.trialExchangeRedpoint.state = RedPointState.None;
            if (!FuncOpen.Instance.IsFuncOpen(88) ||
                PlayerDatas.Instance.baseData.LV >= trialExchangeRemindLevel)
            {
                return;
            }
            var maxClass = 0;
            if (TryGetSatisfyExchange(out maxClass))
            {
                dailyQuestModel.trialExchangeRedpoint.state = RedPointState.Simple;
            }
            //dailyQuestModel.trialExchangeRedpoint.state = RedPointState.None;
            //if (!FuncOpen.Instance.IsFuncOpen(88) ||
            //    PlayerDatas.Instance.baseData.LV >= trialExchangeRemindLevel)
            //{
            //    return;
            //}
            //var maxClass = 0;
            //if (TryGetSatisfyExchange(out maxClass))
            //{
            //    dailyQuestModel.trialExchangeRedpoint.state = RedPointState.Simple;
            //}
        }
        public bool TryGetSatisfyExchange(out int maxClass)
@@ -515,6 +515,7 @@
        public bool IsAnySatisfyExchangeBetter(int _itemId)
        {
            return false;
            if (PlayerDatas.Instance.baseData.LV >= trialExchangeRemindLevel)
            {
                return false;
System/Dungeon/TrialDungeonSelectWin.cs
@@ -26,7 +26,6 @@
        Button m_Close;
        [SerializeField]
        Text trialChallengeCntTxt;
        [SerializeField] Button m_Exchange;
        public event Action<Dungeon> dungeonSelectEvent;
        Dungeon m_CurrentSelectDungeon;
@@ -64,7 +63,7 @@
        {
            //m_Confirm.AddListener(ChallengeDungeon);
            m_Close.AddListener(CloseClick);
            m_Exchange.AddListener(Exchange);
            //m_Exchange.AddListener(Exchange);
        }
        protected override void OnPreOpen()
@@ -136,15 +135,15 @@
                TextColType.Red : TextColType.NavyBrown, completedTimes.ToString(), true), totalTimes);
        }
        private void Exchange()
        {
            if (!trialDungeonModel.CompleteTrialFloor(0))
            {
                trialDungeonModel.ProcessOpenTrialExchangeError();
                return;
            }
            WindowCenter.Instance.Open<TrialExchangeWin>();
        }
        //private void Exchange()
        //{
        //    if (!trialDungeonModel.CompleteTrialFloor(0))
        //    {
        //        trialDungeonModel.ProcessOpenTrialExchangeError();
        //        return;
        //    }
        //    WindowCenter.Instance.Open<TrialExchangeWin>();
        //}
    }
System/KnapSack/Logic/ItemLogicUtility.cs
@@ -460,13 +460,13 @@
                }
            }
            if (trialModel.trialTokens.Contains(item.itemId))
            {
                if (!trialModel.IsAnySatisfyExchangeBetter(item.itemId))
                {
                    return false;
                }
            }
            //if (trialModel.trialTokens.Contains(item.itemId))
            //{
            //    if (!trialModel.IsAnySatisfyExchangeBetter(item.itemId))
            //    {
            //        return false;
            //    }
            //}
            if (packModel.CheckIsDrugById(item.itemId))
            {