| | |
| | | var _array = LitJson.JsonMapper.ToObject<int[][]>(_json[_key].ToJson());
|
| | | for (int j = 0; j < _array.Length; j++)
|
| | | {
|
| | | _award.Add(_job, new AwardItem()
|
| | | {
|
| | | item = new Item(_array[j][0], _array[j][1]),
|
| | | isBind = 1,
|
| | | });
|
| | | _award.Add(_job, new Item(_array[j][0], _array[j][1]));
|
| | | }
|
| | | }
|
| | | levelGiftItemDict.Add(_cfgs[i].RewardID, _award);
|
| | |
| | | var intarray = LitJson.JsonMapper.ToObject<int[][]>(_cfgs[i].VIPAward);
|
| | | VIPAward vipAward = new VIPAward()
|
| | | {
|
| | | item = new AwardItem()
|
| | | {
|
| | | item = new Item()
|
| | | {
|
| | | id = intarray[0][0],
|
| | | count = intarray[0][1],
|
| | | },
|
| | | isBind = 0,
|
| | | },
|
| | | item = new Item(intarray[0][0], intarray[0][1]),
|
| | | vipLv = _cfgs[i].VIPLimit,
|
| | | };
|
| | | m_VipItemDict.Add(_cfgs[i].RewardID, vipAward);
|
| | |
| | | }
|
| | | return (vipGiftGetRecord & (1 << _index)) != 0;
|
| | | }
|
| | |
|
| | | //private Dictionary<int, int> limitGiftCntDict = new Dictionary<int, int>();
|
| | | //public event Action OnLimitGiftUpdateEvent;
|
| | | //private void onGetUniversalGameInfo(HA003_tagUniversalGameRecInfo _package)
|
| | | //{
|
| | | // if (_package.Type == 3)
|
| | | // {
|
| | | // for (int i = 0; i < _package.Count; i++)
|
| | | // {
|
| | | // var _data = _package.UniversalGameRec[i];
|
| | | // //limitGiftCntDict[(int)_data.Value1] = (int)_data.Value2;
|
| | | // }
|
| | | // UpdateRedpoint();
|
| | | // if (OnLimitGiftUpdateEvent != null)
|
| | | // {
|
| | | // OnLimitGiftUpdateEvent();
|
| | | // }
|
| | | // }
|
| | | //}
|
| | |
|
| | | //public int LimitGiftGetCount(int _id)
|
| | | //{
|
| | | // if (limitGiftCntDict.ContainsKey(_id))
|
| | | // {
|
| | | // return limitGiftCntDict[_id];
|
| | | // }
|
| | | // return 0;
|
| | | //}
|
| | |
|
| | | public void TryGetLevelGift(out int _index)
|
| | | {
|
| | |
| | |
|
| | | public struct VIPAward
|
| | | {
|
| | | public AwardItem item;
|
| | | public Item item;
|
| | | public int vipLv;
|
| | | }
|
| | | }
|