| | |
| | | public class StoreModel : GameSystemManager<StoreModel>
|
| | | {
|
| | |
|
| | | public int[] normalBuyCoinsTypes { get; private set; }
|
| | | public string UNIONSTORESAVE_KEY { get; private set; }
|
| | | public string MUSTBUYSAVE_KEY { get; private set; }
|
| | | public string StoreEffectRecord_Key { get; private set; }
|
| | | 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 Dictionary<int, int> showCoinUIDict { get; private set; }
|
| | | public int storeTrailerLv { get; private set; }
|
| | |
|
| | |
|
| | |
| | | ParseFuncConfig();
|
| | | ParseStoreConfig();
|
| | | SetShopRedpoint();
|
| | | FuncConfigConfig buyItemHinit = FuncConfigConfig.Get("BuyItemHinit");
|
| | | normalBuyCoinsTypes = ConfigParse.GetMultipleStr<int>(buyItemHinit.Numerical1);
|
| | | FuncConfigConfig restTimeConfig = FuncConfigConfig.Get("RefreshText");
|
| | | resetTimeDict = ConfigParse.GetDic<int, string>(restTimeConfig.Numerical1);
|
| | | FuncConfigConfig mallCurrency = FuncConfigConfig.Get("MallCurrency");
|
| | | showCoinsUIDict = ConfigParse.GetDic<int, int>(mallCurrency.Numerical1);
|
| | | FuncConfigConfig mallPush = FuncConfigConfig.Get("MallPush");
|
| | | storeTrailerLv = int.Parse(mallPush.Numerical1);
|
| | |
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | |
| | | }
|
| | | #endregion
|
| | |
|
| | | public string GetStoreRefreshTimeByType(int type)
|
| | | {
|
| | | if (resetTimeDict == null || !resetTimeDict.ContainsKey(type)) return string.Empty;
|
| | |
|
| | | switch (type)
|
| | | {
|
| | | case 7:
|
| | | int willRefreshTime = GetWillRefreshTime();
|
| | | return Language.Get(resetTimeDict[type], UIHelper.AppendColor(TextColType.Green, TimeUtility.SecondsToHMS(willRefreshTime), true));
|
| | | default:
|
| | | return Language.Get(resetTimeDict[type]);
|
| | | }
|
| | | }
|
| | |
|
| | | public string GetMysteryStoreRefreshTime()
|
| | | {
|
| | |
| | | public void GetBuyResult(HA811_tagMCShoppingResult result)
|
| | | {
|
| | |
|
| | | Debug.Log("GetBuyResult");
|
| | | //Debug.Log("GetBuyResult");
|
| | | StoreConfig tagStore = StoreConfig.Get((int)result.ItemIndex);
|
| | |
|
| | | if (tagStore != null)
|
| | | {
|
| | | ItemConfig chinModel = ItemConfig.Get(GetReplaceId(tagStore.ID, tagStore.ItemID));
|
| | | if (!normalBuyCoinsTypes.Contains(tagStore.MoneyType))
|
| | | if (tagStore.RemindSuccess == 0)
|
| | | {
|
| | | if (tagStore.RemindSuccess == 0)
|
| | | {
|
| | | return;
|
| | | }
|
| | | // BuySuccessModel.Instance.SetBuySuccessModel(chinModel.ID, (int)result.ItemCnt);
|
| | | // if (!WindowCenter.Instance.IsOpen<BuySuccessWin>())
|
| | | // {
|
| | | // WindowCenter.Instance.Open<BuySuccessWin>();
|
| | | // }
|
| | | }
|
| | | else
|
| | | {
|
| | | float costMoney = tagStore.MoneyNumber;
|
| | | SysNotifyMgr.Instance.ShowTip("BuyItemHinit", costMoney, tagStore.MoneyType, chinModel.ItemName);
|
| | | return;
|
| | | }
|
| | |
|
| | | if (RefreshBuyResultEvent != null)
|