|
@@ -5,11 +5,11 @@ namespace GFGGame
|
|
|
public class ClothingShopCfgManager : SingletonBase<ClothingShopCfgManager>
|
|
|
{
|
|
|
private bool _inited;
|
|
|
- private Dictionary<int, Dictionary<int, List<ClothingShopCfg>>> _dataDic = new Dictionary<int, Dictionary<int, List<ClothingShopCfg>>>();
|
|
|
+ private Dictionary<int, Dictionary<int, List<ShopCfg>>> _dataDic = new Dictionary<int, Dictionary<int, List<ShopCfg>>>();
|
|
|
|
|
|
- public List<ClothingShopCfg> GetList(int storeId, int typeIndex, int scoreType)
|
|
|
+ public List<ShopCfg> GetList(int storeId, int typeIndex, int scoreType)
|
|
|
{
|
|
|
- List<ClothingShopCfg> list = new List<ClothingShopCfg>();
|
|
|
+ List<ShopCfg> list = new List<ShopCfg>();
|
|
|
InitData();
|
|
|
if (_dataDic.ContainsKey(storeId) && _dataDic[storeId].ContainsKey(typeIndex))
|
|
|
{
|
|
@@ -19,9 +19,9 @@ namespace GFGGame
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
- private List<ClothingShopCfg> SortItemListByScore(List<ClothingShopCfg> arrayList, int scoreType)
|
|
|
+ private List<ShopCfg> SortItemListByScore(List<ShopCfg> arrayList, int scoreType)
|
|
|
{
|
|
|
- arrayList.Sort((ClothingShopCfg a, ClothingShopCfg b) =>
|
|
|
+ arrayList.Sort((ShopCfg a, ShopCfg b) =>
|
|
|
{
|
|
|
int numA = ItemDataManager.GetItemNum(a.itemID);
|
|
|
int numB = ItemDataManager.GetItemNum(b.itemID);
|
|
@@ -60,43 +60,43 @@ namespace GFGGame
|
|
|
return;
|
|
|
}
|
|
|
_inited = true;
|
|
|
- ClothingShopCfg[] clotiongDataArray = ClothingShopCfgArray.Instance.dataArray;
|
|
|
- foreach (ClothingShopCfg cfg in clotiongDataArray)
|
|
|
+ ShopCfg[] clotiongDataArray = ShopCfgClothingArray.Instance.dataArray;
|
|
|
+ foreach (ShopCfg cfg in clotiongDataArray)
|
|
|
{
|
|
|
if (_dataDic.ContainsKey(ConstStoreId.CLOTHING_STORE_ID)==false){
|
|
|
- _dataDic[ConstStoreId.CLOTHING_STORE_ID] = new Dictionary<int, List<ClothingShopCfg>>();
|
|
|
+ _dataDic[ConstStoreId.CLOTHING_STORE_ID] = new Dictionary<int, List<ShopCfg>>();
|
|
|
}
|
|
|
if (_dataDic[ConstStoreId.CLOTHING_STORE_ID].ContainsKey(cfg.typeIndex)==false)
|
|
|
{
|
|
|
- _dataDic[ConstStoreId.CLOTHING_STORE_ID][cfg.typeIndex] = new List<ClothingShopCfg>();
|
|
|
+ _dataDic[ConstStoreId.CLOTHING_STORE_ID][cfg.typeIndex] = new List<ShopCfg>();
|
|
|
}
|
|
|
_dataDic[ConstStoreId.CLOTHING_STORE_ID][cfg.typeIndex].Add(cfg);
|
|
|
}
|
|
|
|
|
|
- ClothingShopCfg[] clothingCJDataArray = ClothingShopCfgCJArray.Instance.dataArray;
|
|
|
- foreach (ClothingShopCfg cfg in clothingCJDataArray)
|
|
|
+ ShopCfg[] clothingCJDataArray = ShopCfgCJArray.Instance.dataArray;
|
|
|
+ foreach (ShopCfg cfg in clothingCJDataArray)
|
|
|
{
|
|
|
if (_dataDic.ContainsKey(ConstStoreId.LUCKY_BOX_STORE_ID) == false)
|
|
|
{
|
|
|
- _dataDic[ConstStoreId.LUCKY_BOX_STORE_ID] = new Dictionary<int, List<ClothingShopCfg>>();
|
|
|
+ _dataDic[ConstStoreId.LUCKY_BOX_STORE_ID] = new Dictionary<int, List<ShopCfg>>();
|
|
|
}
|
|
|
if (_dataDic[ConstStoreId.LUCKY_BOX_STORE_ID].ContainsKey(cfg.typeIndex) == false)
|
|
|
{
|
|
|
- _dataDic[ConstStoreId.LUCKY_BOX_STORE_ID][cfg.typeIndex] = new List<ClothingShopCfg>();
|
|
|
+ _dataDic[ConstStoreId.LUCKY_BOX_STORE_ID][cfg.typeIndex] = new List<ShopCfg>();
|
|
|
}
|
|
|
_dataDic[ConstStoreId.LUCKY_BOX_STORE_ID][cfg.typeIndex].Add(cfg);
|
|
|
}
|
|
|
|
|
|
- ClothingShopCfg[] clothingCJADataArray = ClothingShopCfgCJArray.Instance.dataArray;
|
|
|
- foreach (ClothingShopCfg cfg in clothingCJADataArray)
|
|
|
+ ShopCfg[] clothingCJADataArray = ShopCfgCJArray.Instance.dataArray;
|
|
|
+ foreach (ShopCfg cfg in clothingCJADataArray)
|
|
|
{
|
|
|
if (_dataDic.ContainsKey(ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID) == false)
|
|
|
{
|
|
|
- _dataDic[ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID] = new Dictionary<int, List<ClothingShopCfg>>();
|
|
|
+ _dataDic[ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID] = new Dictionary<int, List<ShopCfg>>();
|
|
|
}
|
|
|
if (_dataDic[ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID].ContainsKey(cfg.typeIndex) == false)
|
|
|
{
|
|
|
- _dataDic[ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID][cfg.typeIndex] = new List<ClothingShopCfg>();
|
|
|
+ _dataDic[ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID][cfg.typeIndex] = new List<ShopCfg>();
|
|
|
}
|
|
|
_dataDic[ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID][cfg.typeIndex].Add(cfg);
|
|
|
}
|