| | |
| | | public Dictionary<int, string> resetTimeDict { get; private set; }
|
| | | public Dictionary<int, int> showCoinsUIDict { get; private set; }
|
| | | public int[] StoreRedIdlist { get; private set;}
|
| | | bool isLogin = true;
|
| | | public override void Init()
|
| | | {
|
| | | FuncConfigConfig buyItemHinit = Config.Instance.Get<FuncConfigConfig>("BuyItemHinit");
|
| | |
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | isLogin = true;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= FuncStateChange;
|
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyMine -= RefreshServerHour;
|
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyInfo -= RefreshFamilyLv;
|
| | |
| | | SetShopRedpoint();
|
| | | CheckShopRedpoint();
|
| | | SetJobReplaceIDDict();
|
| | | UpdateMustBuyRedpoint();
|
| | | isLogin = false;
|
| | | }
|
| | |
|
| | | public string GetStoreRefreshTimeByType(int type)
|
| | |
| | | switch(type)
|
| | | {
|
| | | case PlayerDataRefresh.LV:
|
| | | CheckShopRedpoint();
|
| | | UpdateMustBuyRedpoint();
|
| | | break;
|
| | | case PlayerDataRefresh.VIPLv:
|
| | | case PlayerDataRefresh.Gold:
|
| | | case PlayerDataRefresh.GoldPaper:
|
| | |
| | | private void RefreshServerHour()
|
| | | {
|
| | | ControllerRedPoint();
|
| | | UpdateMustBuyRedpoint();
|
| | | if(!PlayerDatas.Instance.fairyData.HasFairy)
|
| | | {
|
| | | PlayerPrefs.DeleteKey(UNIONSTORESAVE_KEY);
|
| | |
| | | }
|
| | |
|
| | | }
|
| | | CheckShopRedpoint();
|
| | | |
| | | if(!isLogin)
|
| | | {
|
| | | CheckShopRedpoint();
|
| | | UpdateMustBuyRedpoint();
|
| | | }
|
| | | if (RefreshBuyShopLimitEvent != null)
|
| | | RefreshBuyShopLimitEvent();
|
| | | }
|
| | |
| | | }
|
| | | SetShopRedpoint();
|
| | | CheckShopRedpoint();
|
| | | UpdateMustBuyRedpoint();
|
| | | }
|
| | |
|
| | | public bool CheckWeekStoreIsShopBuy(out List<StoreConfig> buylist)
|
| | |
| | | shopRedDict[storeConfig.ID].state = RedPointState.None;
|
| | | }
|
| | | }
|
| | |
|
| | | UpdateMustBuyRedpoint(storeConfig);
|
| | | }
|
| | | }
|
| | |
|
| | | public void UpdateMustBuyRedpoint(StoreConfig storeConfig)
|
| | | public void UpdateMustBuyRedpoint()
|
| | | {
|
| | | if (CheckIsMustBuy(storeConfig))
|
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Store)) return;
|
| | |
|
| | | foreach (var key in shopRedDict.Keys)
|
| | | {
|
| | | shopRedDict[storeConfig.ID].state = RedPointState.Simple;
|
| | | }
|
| | | else
|
| | | {
|
| | | shopRedDict[storeConfig.ID].state = RedPointState.None;
|
| | | StoreConfig storeConfig = Config.Instance.Get<StoreConfig>(key);
|
| | | if (CheckIsMustBuy(storeConfig))
|
| | | {
|
| | | shopRedDict[storeConfig.ID].state = RedPointState.Simple;
|
| | | }
|
| | | else
|
| | | {
|
| | | shopRedDict[storeConfig.ID].state = RedPointState.None;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|