| | |
| | | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "selectSkill", _g_get_selectSkill); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "serverInited", _g_get_serverInited); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "skillLevelUpLimitLevel", _g_get_skillLevelUpLimitLevel); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "requireRemind", _g_get_requireRemind); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "newSatisfyActiveExpertDirty", _g_get_newSatisfyActiveExpertDirty); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "selectActivePriority", _g_get_selectActivePriority); |
| | |
| | | |
| | | Snxxz.UI.TreasureSkillModel gen_to_be_invoked = (Snxxz.UI.TreasureSkillModel)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.lua_pushboolean(L, gen_to_be_invoked.serverInited); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_skillLevelUpLimitLevel(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.TreasureSkillModel gen_to_be_invoked = (Snxxz.UI.TreasureSkillModel)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.skillLevelUpLimitLevel); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | |
| | |
|
| | | public bool serverInited { get; private set; }
|
| | |
|
| | | public int skillLevelUpLimitLevel { get; private set; }
|
| | |
|
| | | public bool requireRemind { get; private set; }
|
| | |
|
| | | public bool newSatisfyActiveExpertDirty { get; set; }
|
| | |
| | |
|
| | | private void OnFuncStateChangeEvent(int id)
|
| | | {
|
| | | if (id == 82)
|
| | | if (id == 82 || id == 177)
|
| | | {
|
| | | UpdateRedpoint();
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | var funcConfig = FuncConfigConfig.Get("TreasureSkillLevelUp");
|
| | | skillLevelUpLimitLevel = int.Parse(funcConfig.Numerical1);
|
| | | }
|
| | |
|
| | | public bool TryGetSkills(out List<int> skills)
|
| | |
| | | foreach (var skill in treasureSkills.Values)
|
| | | {
|
| | | var error = 0;
|
| | | if (requireRemind && funcOpen && PlayerDatas.Instance.baseData.LV >= skillLevelUpLimitLevel
|
| | | if (requireRemind && funcOpen && FuncOpen.Instance.IsFuncOpen(177)
|
| | | && TryLevelUpTreasureSkill(skill.skillId, out error)
|
| | | && skill.level > 0)
|
| | | {
|
| | |
| | | model.skillLevelUpRefresh += SkillLevelUpRefresh;
|
| | | packModel.refreshItemCountEvent += RefreshItemCountEvent;
|
| | | model.expertSkillRefresh += ExpertSkillRefresh;
|
| | | PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefreshEvent;
|
| | | WindowCenter.Instance.windowAfterCloseEvent += WindowAfterCloseEvent;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | |
| | | model.skillLevelUpRefresh -= SkillLevelUpRefresh;
|
| | | packModel.refreshItemCountEvent -= RefreshItemCountEvent;
|
| | | model.expertSkillRefresh -= ExpertSkillRefresh;
|
| | | PlayerDatas.Instance.playerDataRefreshEvent -= PlayerDataRefreshEvent;
|
| | | WindowCenter.Instance.windowAfterCloseEvent -= WindowAfterCloseEvent;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
|
| | | model.SetAlreadyRemind();
|
| | | }
|
| | |
|
| | |
| | |
|
| | | void DisplayButtonState()
|
| | | {
|
| | | m_LevelUp.SetColorful(m_LevelUpLabel, PlayerDatas.Instance.baseData.LV >= model.skillLevelUpLimitLevel);
|
| | | m_LevelUp.SetColorful(m_LevelUpLabel, FuncOpen.Instance.IsFuncOpen(177));
|
| | | }
|
| | |
|
| | | void DisplaySkillDetial()
|
| | |
| | |
|
| | | private void LevelUp()
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.LV < model.skillLevelUpLimitLevel)
|
| | | if (!FuncOpen.Instance.IsFuncOpen(177))
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("FuncLimit_JNSJ", model.skillLevelUpLimitLevel);
|
| | | FuncOpen.Instance.ProcessorFuncErrorTip(177);
|
| | | return;
|
| | | }
|
| | | TreasureSkillLevelUpWin.skillId = model.selectSkill;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void PlayerDataRefreshEvent(PlayerDataType dataType)
|
| | | private void OnFuncStateChangeEvent(int id)
|
| | | {
|
| | | if (dataType == PlayerDataType.LV)
|
| | | if (id == 177)
|
| | | {
|
| | | DisplayButtonState();
|
| | | }
|