|
using System.Collections.Generic;
|
using System.Collections.Specialized;
|
using LitJson;
|
|
public partial class TreeLVConfig : IConfigPostProcess
|
{
|
//¸ñʽ [[5000,[]],[10000,[3501,10]]]; [[¸ÅÂÊ£¬ÎïÆ·ÐÅÏ¢]]
|
public static OrderedDictionary itemUnlockInfo = new OrderedDictionary();
|
|
public void OnConfigParseCompleted()
|
{
|
if (ExAwardItemRateList.Length < 3)
|
return;
|
JsonData jsonData = JsonMapper.ToObject(ExAwardItemRateList);
|
//²»ÒªÓÃvar »á±»½âÎö³Éobject ÓÃJsonData
|
for (int i = 0; i < jsonData.Count; i++)
|
{
|
JsonData item = jsonData[i];
|
if (item.Count < 2)
|
continue;
|
int rate = (int)item[0];
|
JsonData itemInfo = item[1];
|
if (itemInfo.Count < 2)
|
continue;
|
int itemId = (int)itemInfo[0];
|
if (itemUnlockInfo.Contains(itemId))
|
{
|
continue;
|
}
|
itemUnlockInfo.Add(itemId, TreeLV);
|
}
|
}
|
|
|
}
|