|
@@ -28,27 +28,17 @@ namespace GFGEditor
|
|
|
SQLiteHelper.Instance.OpenConnection();
|
|
|
try
|
|
|
{
|
|
|
- string typeIndex = "";
|
|
|
- int itemId;
|
|
|
- int id;
|
|
|
- var reader = SQLiteHelper.Instance.ReadFullTable("ShopCfgArray");
|
|
|
- while (reader.Read())
|
|
|
+ List<ShopCfg> clothingShopCfg = ShopCfgArray.Instance.GetCfgsBymenu1Andmenu2(ConstStoreTabId.FU_ZHUANG_DIAN, ConstStoreSubId.FU_ZHUANG_DIAN);
|
|
|
+ for (int i = 0; i < clothingShopCfg.Count; i++)
|
|
|
{
|
|
|
- typeIndex = reader["_typeIndex"].ToString();
|
|
|
- itemId = int.Parse(reader["_itemId"].ToString());
|
|
|
- id = int.Parse(reader["_id"].ToString());
|
|
|
- int menu1 = int.Parse(reader["_menu1"].ToString());
|
|
|
- int menu2 = int.Parse(reader["_menu2"].ToString());
|
|
|
- if (menu1 != ConstStoreTabId.FU_ZHUANG_DIAN || menu2 != ConstStoreSubId.FU_ZHUANG_DIAN) continue;
|
|
|
-
|
|
|
int count;
|
|
|
- if (Array.IndexOf(_shopItemType, typeIndex) >= 0)
|
|
|
+ if (Array.IndexOf(_shopItemType, clothingShopCfg[i].typeIndex) >= 0)
|
|
|
{
|
|
|
- count = Array.IndexOf(_shopItemType, typeIndex);
|
|
|
+ count = Array.IndexOf(_shopItemType, clothingShopCfg[i].typeIndex);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemId);
|
|
|
+ ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(clothingShopCfg[i].itemId);
|
|
|
string itemType = ItemTypeCfgArray.Instance.GetCfg(itemCfg.subType).type.ToString();
|
|
|
|
|
|
if (Array.IndexOf(_shopItemType, itemType) >= 0)
|
|
@@ -60,7 +50,7 @@ namespace GFGEditor
|
|
|
count = _shopItemType.Length - 1;
|
|
|
}
|
|
|
}
|
|
|
- _typeIndexDic.Add(id, count.ToString());
|
|
|
+ _typeIndexDic.Add(clothingShopCfg[i].id, count.ToString());
|
|
|
}
|
|
|
}
|
|
|
catch (Exception e)
|