| | |
| | | SuccessConfig successConfig = Config.Instance.Get<SuccessConfig>(AchievementGoto.guideAchievementId);
|
| | | if (successConfig.Type == 97)
|
| | | {
|
| | | p_shopItemlist = StoreConfig.GetTypeStoreModel((int)m_storeModel.storeFuncType);
|
| | | List<StoreConfig> orderlist = new List<StoreConfig>();
|
| | | p_shopItemlist = m_storeModel.TryGetStoreDatas((int)m_storeModel.storeFuncType);
|
| | | List<StoreModel.StoreData> orderlist = new List<StoreModel.StoreData>();
|
| | | orderlist.AddRange(p_shopItemlist);
|
| | | orderlist.Sort(CompareByMoney);
|
| | | for (int i = 0; i < p_shopItemlist.Count; i++)
|
| | | {
|
| | | if (p_shopItemlist[i].ID == orderlist[0].ID)
|
| | | if (p_shopItemlist[i].shopId == orderlist[0].shopId)
|
| | | {
|
| | | shopId = p_shopItemlist[i].ID;
|
| | | shopId = p_shopItemlist[i].shopId;
|
| | | int index = i / 2;
|
| | | _shopCtrl.JumpIndex(index);
|
| | | _shopCtrl.m_Scorller.RefreshActiveCellViews();
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public int CompareByMoney(StoreConfig start, StoreConfig end)
|
| | | public int CompareByMoney(StoreModel.StoreData start, StoreModel.StoreData end)
|
| | | {
|
| | | int money1 = start.MoneyNumber;
|
| | | int money2 = end.MoneyNumber;
|
| | | int money1 = start.storeConfig.MoneyNumber;
|
| | | int money2 = end.storeConfig.MoneyNumber;
|
| | | if (money1.CompareTo(money2) != 0) return money1.CompareTo(money2);
|
| | | int index1 = p_shopItemlist.IndexOf(start);
|
| | | int index2 = p_shopItemlist.IndexOf(end);
|
| | |
| | |
|
| | | if (p_shopItemlist.Count >= cellCount)
|
| | | {
|
| | | StoreConfig shopInfo = p_shopItemlist[cellCount - 1];
|
| | | StoreConfig shopInfo = p_shopItemlist[cellCount - 1].storeConfig;
|
| | | cell.transform.GetChild(childCode).gameObject.SetActive(true);
|
| | | if (shopInfo.SalesStatus.Trim() != "")
|
| | | {
|
| | |
| | | {
|
| | | shopItemCell.stateImage.gameObject.SetActive(false);
|
| | | }
|
| | | ItemConfig chinModel = Config.Instance.Get<ItemConfig>(m_storeModel.ReplaceItemIdByJob(shopInfo.ID, shopInfo.ItemID));
|
| | | ItemConfig chinModel = Config.Instance.Get<ItemConfig>(m_storeModel.GetReplaceId(shopInfo.ID));
|
| | | if (chinModel != null)
|
| | | {
|
| | | ItemCellModel cellModel = new ItemCellModel(chinModel.ID,false, 0, shopInfo.IsBind);
|