| | |
| | | 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, |
| | |
| | | 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) |
| | |
| | | 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) |
| | | { |
| | |
| | |
|
| | | switch ((DailyQuestType)data.id)
|
| | | {
|
| | | case DailyQuestType.Trial:
|
| | | m_FuncRedpointBehaviour.redpointId = model.trialExchangeRedpoint.id;
|
| | | break;
|
| | | default:
|
| | | m_FuncRedpointBehaviour.redpointId = 0;
|
| | | break;
|
| | |
| | |
|
| | | 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);
|
| | |
| | | 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 {
|
| | |
| | | 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) =>
|
| | |
| | | #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)
|
| | |
| | |
|
| | | public bool IsAnySatisfyExchangeBetter(int _itemId)
|
| | | {
|
| | | return false;
|
| | | if (PlayerDatas.Instance.baseData.LV >= trialExchangeRemindLevel)
|
| | | {
|
| | | return false;
|
| | |
| | | Button m_Close;
|
| | | [SerializeField]
|
| | | Text trialChallengeCntTxt;
|
| | | [SerializeField] Button m_Exchange;
|
| | |
|
| | | public event Action<Dungeon> dungeonSelectEvent;
|
| | | Dungeon m_CurrentSelectDungeon;
|
| | |
| | | {
|
| | | //m_Confirm.AddListener(ChallengeDungeon);
|
| | | m_Close.AddListener(CloseClick);
|
| | | m_Exchange.AddListener(Exchange);
|
| | | //m_Exchange.AddListener(Exchange);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | |
| | | 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>();
|
| | | //}
|
| | |
|
| | | }
|
| | |
|
| | |
| | | } |
| | | } |
| | | |
| | | 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)) |
| | | { |