少年修仙传客户端代码仓库
QD-PangDeRong
2018-08-10 3649bca5c4c8be376924cc6dd9ee998270a6f53b
[2181]增加积分商城红点
4个文件已修改
120 ■■■■■ 已修改文件
System/KnapSack/Logic/EquipTip.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Store/StoreModel.cs 77 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Store/StoreWin.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/WindowJump/WindowJumpMgr.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/EquipTip.cs
@@ -153,19 +153,6 @@
        {
            bottomPart.gameObject.SetActive(false);
            StartCoroutine(SetScrollSize());
            StartCoroutine(CheckPlayerIsReborn());
        }
        IEnumerator CheckPlayerIsReborn()
        {
            int questTimes = 0;
            while (questTimes < 5)
            {
                DesignDebug.Log("CheckPlayerIsReborn:开始");
                yield return new WaitForSeconds(1);
                questTimes += 1;
                DesignDebug.Log("CheckPlayerIsReborn:结束");
            }
        }
        IEnumerator SetScrollSize()
System/Store/StoreModel.cs
@@ -37,6 +37,7 @@
    public Dictionary<int,Dictionary<int,int>> JobReplaceIdDict = new Dictionary<int, Dictionary<int, int>>();
    public Dictionary<int, string> resetTimeDict { get; private set; }
    public Dictionary<int, int> showCoinsUIDict { get; private set; }
    public int[] StoreRedIdlist { get; private set;}
    public override void Init()
    {
        FuncConfigConfig buyItemHinit = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("BuyItemHinit");
@@ -45,6 +46,8 @@
        resetTimeDict = ConfigParse.GetDic<int, string>(restTimeConfig.Numerical1);
        FuncConfigConfig mallCurrency = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("MallCurrency");
        showCoinsUIDict = ConfigParse.GetDic<int, int>(mallCurrency.Numerical1);
        FuncConfigConfig mallPush = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("MallPush");
        StoreRedIdlist = ConfigParse.GetMultipleStr<int>(mallPush.Numerical2);
    }
    public void OnBeforePlayerDataInitialize()
@@ -68,8 +71,8 @@
        PlayerDatas.Instance.fairyData.OnRefreshFairyInfo += RefreshFamilyLv;
        FuncOpen.Instance.OnFuncStateChangeEvent -= FuncStateChange;
        FuncOpen.Instance.OnFuncStateChangeEvent += FuncStateChange;
        PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= RefreshPlayerLv;
        PlayerDatas.Instance.PlayerDataRefreshInfoEvent += RefreshPlayerLv;
        RefreshTCBPlayerDataEvent -= RefreshPlayerLv;
        RefreshTCBPlayerDataEvent += RefreshPlayerLv;
        TimeMgr.Instance.OnHourEvent -= RefreshServerHour;
        TimeMgr.Instance.OnHourEvent += RefreshServerHour;
        shoplist = null;
@@ -120,9 +123,16 @@
    private void RefreshPlayerLv(PlayerDataRefresh type)
    {
        if (type != PlayerDataRefresh.LV && type != PlayerDataRefresh.VIPLv) return;
        CheckShopRedpoint();
        switch(type)
        {
            case PlayerDataRefresh.LV:
            case PlayerDataRefresh.VIPLv:
            case PlayerDataRefresh.Gold:
            case PlayerDataRefresh.GoldPaper:
            case PlayerDataRefresh.FBHelpPoint:
                CheckShopRedpoint();
                break;
        }
    }
    public override void UnInit()
@@ -765,17 +775,7 @@
            StoreConfig storeConfig = ConfigManager.Instance.GetTemplate<StoreConfig>(key);
            if (storeConfig.MoneyNumber == 0)
            {
                int canBuyCnt = 0;
                int addBuyCnt = 0;
                bool isLimitBuy = BuyItemPopModel.Instance.CheckIsLimitBuyCnt(storeConfig, out canBuyCnt, out addBuyCnt);
                BuyShopItemLimit shopItemLimit = GetBuyShopLimit((uint)storeConfig.ID);
                int remainNum = canBuyCnt;
                if (shopItemLimit != null)
                {
                    remainNum -= shopItemLimit.BuyCnt;
                }
                List<StoreConfig> list = StoreConfig.GetSellShoplist();
                if (remainNum > 0 && list.Contains(storeConfig))
                if(CheckShopIsCanBuy(storeConfig))
                {
                    shopRedDict[storeConfig.ID].state = RedPointState.Simple;
                }
@@ -783,15 +783,56 @@
                {
                    shopRedDict[storeConfig.ID].state = RedPointState.None;
                }
            }
            else
            {
                shopRedDict[storeConfig.ID].state = RedPointState.None;
                if(CheckScoreStoreIsCanBuy(storeConfig))
                {
                    shopRedDict[storeConfig.ID].state = RedPointState.Simple;
                }
                else
                {
                    shopRedDict[storeConfig.ID].state = RedPointState.None;
                }
            }
        }
    }
    public bool CheckScoreStoreIsCanBuy(StoreConfig storeConfig)
    {
        List<StoreConfig> list = StoreConfig.GetSellShoplist();
        if(StoreRedIdlist.Contains(storeConfig.ID))
        {
            if (CheckShopIsCanBuy(storeConfig))
            {
                if(UIHelper.GetMoneyCnt(storeConfig.MoneyType) >= (ulong)storeConfig.MoneyNumber)
                {
                    return true;
                }
            }
        }
        return false;
    }
    public bool CheckShopIsCanBuy(StoreConfig storeConfig)
    {
        int canBuyCnt = 0;
        int addBuyCnt = 0;
        bool isLimitBuy = BuyItemPopModel.Instance.CheckIsLimitBuyCnt(storeConfig, out canBuyCnt, out addBuyCnt);
        BuyShopItemLimit shopItemLimit = GetBuyShopLimit((uint)storeConfig.ID);
        int remainNum = canBuyCnt;
        if (shopItemLimit != null)
        {
            remainNum -= shopItemLimit.BuyCnt;
        }
        List<StoreConfig> list = StoreConfig.GetSellShoplist();
        if (remainNum > 0 && list.Contains(storeConfig))
        {
            return true;
        }
        return false;
    }
    #endregion
}
System/Store/StoreWin.cs
@@ -100,7 +100,7 @@
            m_storeModel.RefreshTCBPlayerDataEvent += OnRefreshPlayerInfo;
            m_storeModel.RefreshBuyShopLimitEvent = OnCreate;
            RefreshCoins();
            RefreshResetTime();
        }
        protected override void OnActived()
@@ -108,7 +108,6 @@
            base.OnActived();
            _funcBtnGroup.TriggerByOrder(functionOrder);
            GlobalTimeEvent.Instance.secondEvent += RefreshResetTime;
            RefreshResetTime();
        }
        protected override void OnAfterOpen()
@@ -163,15 +162,22 @@
        private void RefreshResetTime()
        {
            if (_tagStoreModellist.Count < 1)
                return;
            if (_tagStoreModellist[0].RefreshType == 0)
                _resetRefreshTimeText.gameObject.SetActive(false);
            else
            if(_tagStoreModellist == null || _tagStoreModellist.Count < 1)
            {
                _resetRefreshTimeText.gameObject.SetActive(true);
                _resetRefreshTimeText.text = m_storeModel.GetStoreRefreshTimeByType(_tagStoreModellist[0].RefreshType);
                _tagStoreModellist = StoreConfig.GetTypeStoreModel((int)m_storeModel.storeFuncType);
            }
            if(_tagStoreModellist.Count > 0)
            {
                if (_tagStoreModellist[0].RefreshType == 0)
                {
                    _resetRefreshTimeText.gameObject.SetActive(false);
                }
                else
                {
                    _resetRefreshTimeText.gameObject.SetActive(true);
                    _resetRefreshTimeText.text = m_storeModel.GetStoreRefreshTimeByType(_tagStoreModellist[0].RefreshType);
                }
            }
        }
System/WindowJump/WindowJumpMgr.cs
@@ -926,6 +926,10 @@
            openWindows.Clear();
            IsJumpState = false;
            jumpWinNameDict.Clear();
            if(DeadModel.playerIsDie)
            {
                DeadModel.PlayerDie(PlayerDatas.Instance.baseData.PlayerID);
            }
        }
       
    }