| | |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_fairyLeagueResults(RealStatePtr L) |
| | | { |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_UpdateVipGift(RealStatePtr L) |
| | | { |
| | |
| | | var _itemArray = LitJson.JsonMapper.ToObject<int[][]>(_jsonData[key].ToJson());
|
| | | for (int j = 0; j < _itemArray.Length; j++)
|
| | | {
|
| | | _award.Add(_ranking, new Item(_itemArray[j][0], _itemArray[j][1]));
|
| | | _award.Add(_ranking, new Item(_itemArray[j][0], _itemArray[j][1], _itemArray[j][2] == 1));
|
| | | }
|
| | | }
|
| | | SeasonRewardDic = _award;
|
| | |
| | | {
|
| | | ui.Stop();
|
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(List[i].id, true, (ulong)List[i].count);
|
| | | ItemCellModel cellModel = new ItemCellModel(List[i].id, true, (ulong)List[i].count, List[i].bind ? 1 : 0);
|
| | | _ItemCell.Init(cellModel);
|
| | | int type = i;
|
| | | _ItemCell.cellBtn.SetListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(List[type].id, false, (ulong)List[type].count, -1);
|
| | | ItemAttrData attrData = new ItemAttrData(List[type].id, false, (ulong)List[type].count, -1, List[type].bind ? 1 : 0);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | Number = Equation.Instance.Eval<ulong>("reExp");
|
| | | }
|
| | |
|
| | | ItemCellModel cellModel = new ItemCellModel(AwardItemList[i].id, true, Number);
|
| | | ItemCellModel cellModel = new ItemCellModel(AwardItemList[i].id, true, Number, AwardItemList[i].bind?1:0);
|
| | | itemCell.Init(cellModel);
|
| | | int tab = i;
|
| | | itemCell.cellBtn.SetListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(AwardItemList[tab].id, false, Number, -1);
|
| | | ItemAttrData attrData = new ItemAttrData(AwardItemList[tab].id, false, Number, -1, AwardItemList[tab].bind?1:0);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | var _itemArray = LitJson.JsonMapper.ToObject<int[][]>(_jsonData[key].ToJson());
|
| | | for (int j = 0; j < _itemArray.Length; j++)
|
| | | {
|
| | | _award.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1]));
|
| | | _award.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1], _itemArray[j][2]==1));
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | _rankKey = UIHelper.GetIntervalAward(_dict.Keys, (int)PlayerDatas.Instance.worldLv);
|
| | | var _Award = _dict[_rankKey][0];
|
| | | m_ChampionAward.Init(_Award.id, Mathf.Min(1, _Award.count));
|
| | | m_ChampionAward.Init(_Award.id, Mathf.Min(1, _Award.count), _Award.bind?1:0);
|
| | | m_ChampionAwardBtn.onClick.AddListener(() =>
|
| | | {
|
| | | ItemAttrData _itemData = new ItemAttrData(_Award.id, false, (ulong)_Award.count, -1);
|
| | | ItemAttrData _itemData = new ItemAttrData(_Award.id, false, (ulong)_Award.count, -1, _Award.bind?1:0);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(_itemData);
|
| | | });
|
| | | }
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(List[0].id, false, (ulong)List[0].count, -1);
|
| | | ItemAttrData attrData = new ItemAttrData(List[0].id, false, (ulong)List[0].count, -1, List[0].bind ? 1 : 0);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | // DebugEx.LogError("弹框");
|
| | | }
|
| | |
| | | {
|
| | | m_Number1.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | m_Lock1.gameObject.SetActive(false);
|
| | | if (List[0].bind)
|
| | | {
|
| | | m_Lock1.gameObject.SetActive(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Lock1.gameObject.SetActive(false);
|
| | | }
|
| | | if (FuncOpen.Instance.IsFuncOpen(funcID))
|
| | | {
|
| | | m_ItemBG1.gray = false;
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(List[1].id, false, (ulong)List[1].count, -1);
|
| | | ItemAttrData attrData = new ItemAttrData(List[1].id, false, (ulong)List[1].count, -1, List[1].bind ? 1 : 0);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | //DebugEx.LogError("弹框");
|
| | | }
|
| | |
| | | {
|
| | | m_Number2.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | m_Lock2.gameObject.SetActive(false);
|
| | | if (List[1].bind)
|
| | | {
|
| | | m_Lock2.gameObject.SetActive(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Lock2.gameObject.SetActive(false);
|
| | | }
|
| | | if (FuncOpen.Instance.IsFuncOpen(funcID))
|
| | | {
|
| | | m_ItemBG2.gray = false;
|
| | |
| | | var _itemArray = LitJson.JsonMapper.ToObject<int[][]>(_jsonData[_key].ToJson());
|
| | | for (int j = 0; j < _itemArray.Length; j++)
|
| | | {
|
| | | _award.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1]));
|
| | | _award.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1], _itemArray[j][2] == 1));
|
| | | }
|
| | | }
|
| | | _awardList.Add(_award);
|
| | |
| | | if (_itemList != null && i < _itemList.Count)
|
| | | {
|
| | | var _item = _itemList[i];
|
| | | ItemCellModel _ItemData = new ItemCellModel(_item.id, false, (ulong)_item.count);
|
| | | ItemCellModel _ItemData = new ItemCellModel(_item.id, false, (ulong)_item.count,
|
| | | _item.bind?1:0);
|
| | | _cell.items[i].SetItemRare(_ItemData, 5);
|
| | | _cell.items[i].cellBtn.RemoveAllListeners();
|
| | | _cell.items[i].cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData _itemPropertyData = new ItemAttrData(_item.id, false, (ulong)_item.count, -1);
|
| | | ItemAttrData _itemPropertyData = new ItemAttrData(_item.id, false, (ulong)_item.count, -1,
|
| | | _item.bind?1:0);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(_itemPropertyData);
|
| | | });
|
| | | }
|
| | |
| | | if (list.Count > 0)
|
| | | {
|
| | | Item item = list[0];
|
| | | ItemCellModel cellModel = new ItemCellModel(item.id, true, (ulong)item.count);
|
| | | ItemCellModel cellModel = new ItemCellModel(item.id, true, (ulong)item.count, item.bind ? 1 : 0);
|
| | | m_ItemCell.Init(cellModel);
|
| | | m_ItemCell.cellBtn.RemoveAllListeners();
|
| | | m_ItemCell.cellBtn.AddListener(()=> |
| | | m_ItemCell.cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count, -1);
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count, -1, item.bind ? 1 : 0);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | var _itemArray = LitJson.JsonMapper.ToObject<int[][]>(_jsonData[key].ToJson()); |
| | | for (int j = 0; j < _itemArray.Length; j++) |
| | | { |
| | | _monthyItem.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1])); |
| | | _monthyItem.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1], _itemArray[j][2] == 1)); |
| | | } |
| | | } |
| | | monthlyInvestment.monthlyInvestmentItem = _monthyItem; |
| | |
| | | Item item = monthlyInvestmentItem[i]; |
| | | MotnlyItem motnlyItem = m_Group.GetChild(i).GetComponent<MotnlyItem>(); |
| | | var Item = ItemConfig.Get(item.id); |
| | | ItemCellModel cellModel = new ItemCellModel(item.id, true, (ulong)1); |
| | | ItemCellModel cellModel = new ItemCellModel(item.id, true, (ulong)1, item.bind?1:0); |
| | | motnlyItem.Item_Cell.Init(cellModel); |
| | | motnlyItem.NameText.text = Item.ItemName; |
| | | motnlyItem.MoneyNumberText.text = item.count.ToString(); |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Monday, March 05, 2018
|
| | | //--------------------------------------------------------
|
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | | using UnityEngine.UI;
|
| | | using System.Collections.Generic;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public class RewardInformation : MonoBehaviour
|
| | | {
|
| | | [SerializeField] Text m_Days;
|
| | | [SerializeField] Transform m_Group;
|
| | | [SerializeField] Button m_ReceiveAwardBtn;
|
| | | [SerializeField] Image m_AlreadyReceivedImage;
|
| | | [SerializeField] Text m_IncentiveValue;
|
| | | [SerializeField] Text m_TimeRemaining;
|
| | |
|
| | | InSevenDayModel m_InSevenDayModel;
|
| | | InSevenDayModel inSevenDay { get { return m_InSevenDayModel ?? (m_InSevenDayModel = ModelCenter.Instance.GetModel<InSevenDayModel>()); } }
|
| | | ItemTipsModel _itemTipsModel;
|
| | | ItemTipsModel itemTipsModel { get { return _itemTipsModel ?? (_itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>()); } }
|
| | | private void Start()
|
| | | {
|
| | | }
|
| | |
|
| | |
|
| | | public void GetIsDays(int Day)
|
| | | {
|
| | |
|
| | | DayText(Day);//天数赋值
|
| | | IsResidualAward(Day);
|
| | | var GetInSevenDay = inSevenDay.InSevenDayDic[Day];
|
| | | m_IncentiveValue.text =string.Format(Language.Get("IncentiveValue"), GetInSevenDay.Money);
|
| | | int Job = PlayerDatas.Instance.baseData.Job;
|
| | | List<Item> list = GetInSevenDay.RankAwardItem.GetAwardItem(Job);
|
| | | for (int i = 0; i < m_Group.childCount; i++)
|
| | | {
|
| | | GameObject obj = m_Group.GetChild(i).gameObject;
|
| | | if (i < list.Count)
|
| | | {
|
| | | if (!obj.activeSelf)
|
| | | {
|
| | | obj.SetActive(true);
|
| | | }
|
| | | ItemCell itemCell = obj.GetComponent<ItemCell>();
|
| | | Item item = list[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(item.id, true, (ulong)item.count);
|
| | | itemCell.Init(cellModel);
|
| | | itemCell.cellBtn.RemoveAllListeners();
|
| | | itemCell.cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count, -1);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
|
| | | else
|
| | | {
|
| | | if (obj.activeSelf)
|
| | | {
|
| | | obj.SetActive(false);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | | private void IsResidualAward(int day)//是否领取奖励
|
| | | {
|
| | | int type = inSevenDay.RewardForDic[day];
|
| | | switch (type)
|
| | | {
|
| | | case -1://不可领
|
| | | m_AlreadyReceivedImage.gameObject.SetActive(false);
|
| | | m_ReceiveAwardBtn.gameObject.SetActive(false);
|
| | | m_TimeRemaining.gameObject.SetActive(true);
|
| | | int TimeRemaining = day - inSevenDay.DayCnt;
|
| | | if (TimeRemaining > 1)
|
| | | {
|
| | | m_TimeRemaining.text = string.Format(Language.Get("Rest_Time"), TimeRemaining);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_TimeRemaining.text = Language.Get("Tomorrow_Draw");
|
| | | }
|
| | | break;
|
| | | case 0://可领
|
| | | m_AlreadyReceivedImage.gameObject.SetActive(false);
|
| | | m_TimeRemaining.gameObject.SetActive(false);
|
| | | m_ReceiveAwardBtn.gameObject.SetActive(true);
|
| | | m_ReceiveAwardBtn.RemoveAllListeners();
|
| | | m_ReceiveAwardBtn.AddListener(()=> |
| | | {
|
| | | inSevenDay.ReceiveAward(day);
|
| | | });
|
| | | break;
|
| | | case 1://已领
|
| | | m_AlreadyReceivedImage.gameObject.SetActive(true);
|
| | | m_TimeRemaining.gameObject.SetActive(false);
|
| | | m_ReceiveAwardBtn.gameObject.SetActive(false);
|
| | | break;
|
| | | default:
|
| | | break;
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | | private void DayText(int day)
|
| | | {
|
| | | switch (day)
|
| | | {
|
| | | case 1:
|
| | | m_Days.text = Language.Get("One_day");
|
| | | break;
|
| | | case 2:
|
| | | m_Days.text = Language.Get("Two_day");
|
| | | break;
|
| | | case 3:
|
| | | m_Days.text = Language.Get("Three_day");
|
| | | break;
|
| | | case 4:
|
| | | m_Days.text = Language.Get("Four_day");
|
| | | break;
|
| | | case 5:
|
| | | m_Days.text = Language.Get("Five_day");
|
| | | break;
|
| | | case 6:
|
| | | m_Days.text = Language.Get("Six_day");
|
| | | break;
|
| | | case 7:
|
| | | m_Days.text = Language.Get("Seven_day");
|
| | | break;
|
| | |
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, March 05, 2018 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | using System.Collections.Generic; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class RewardInformation : MonoBehaviour |
| | | { |
| | | [SerializeField] Text m_Days; |
| | | [SerializeField] Transform m_Group; |
| | | [SerializeField] Button m_ReceiveAwardBtn; |
| | | [SerializeField] Image m_AlreadyReceivedImage; |
| | | [SerializeField] Text m_IncentiveValue; |
| | | [SerializeField] Text m_TimeRemaining; |
| | | |
| | | InSevenDayModel m_InSevenDayModel; |
| | | InSevenDayModel inSevenDay { get { return m_InSevenDayModel ?? (m_InSevenDayModel = ModelCenter.Instance.GetModel<InSevenDayModel>()); } } |
| | | ItemTipsModel _itemTipsModel; |
| | | ItemTipsModel itemTipsModel { get { return _itemTipsModel ?? (_itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>()); } } |
| | | private void Start() |
| | | { |
| | | } |
| | | |
| | | |
| | | public void GetIsDays(int Day) |
| | | { |
| | | |
| | | DayText(Day);//天数赋值 |
| | | IsResidualAward(Day); |
| | | var GetInSevenDay = inSevenDay.InSevenDayDic[Day]; |
| | | m_IncentiveValue.text =string.Format(Language.Get("IncentiveValue"), GetInSevenDay.Money); |
| | | int Job = PlayerDatas.Instance.baseData.Job; |
| | | List<Item> list = GetInSevenDay.RankAwardItem.GetAwardItem(Job); |
| | | for (int i = 0; i < m_Group.childCount; i++) |
| | | { |
| | | GameObject obj = m_Group.GetChild(i).gameObject; |
| | | if (i < list.Count) |
| | | { |
| | | if (!obj.activeSelf) |
| | | { |
| | | obj.SetActive(true); |
| | | } |
| | | ItemCell itemCell = obj.GetComponent<ItemCell>(); |
| | | Item item = list[i]; |
| | | ItemCellModel cellModel = new ItemCellModel(item.id, true, (ulong)item.count, item.bind?1:0); |
| | | itemCell.Init(cellModel); |
| | | itemCell.cellBtn.RemoveAllListeners(); |
| | | itemCell.cellBtn.AddListener(() => |
| | | { |
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count, -1, item.bind?1:0); |
| | | itemTipsModel.SetItemTipsModel(attrData); |
| | | }); |
| | | } |
| | | |
| | | else |
| | | { |
| | | if (obj.activeSelf) |
| | | { |
| | | obj.SetActive(false); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | private void IsResidualAward(int day)//是否领取奖励 |
| | | { |
| | | int type = inSevenDay.RewardForDic[day]; |
| | | switch (type) |
| | | { |
| | | case -1://不可领 |
| | | m_AlreadyReceivedImage.gameObject.SetActive(false); |
| | | m_ReceiveAwardBtn.gameObject.SetActive(false); |
| | | m_TimeRemaining.gameObject.SetActive(true); |
| | | int TimeRemaining = day - inSevenDay.DayCnt; |
| | | if (TimeRemaining > 1) |
| | | { |
| | | m_TimeRemaining.text = string.Format(Language.Get("Rest_Time"), TimeRemaining); |
| | | } |
| | | else |
| | | { |
| | | m_TimeRemaining.text = Language.Get("Tomorrow_Draw"); |
| | | } |
| | | break; |
| | | case 0://可领 |
| | | m_AlreadyReceivedImage.gameObject.SetActive(false); |
| | | m_TimeRemaining.gameObject.SetActive(false); |
| | | m_ReceiveAwardBtn.gameObject.SetActive(true); |
| | | m_ReceiveAwardBtn.RemoveAllListeners(); |
| | | m_ReceiveAwardBtn.AddListener(()=> |
| | | { |
| | | inSevenDay.ReceiveAward(day); |
| | | }); |
| | | break; |
| | | case 1://已领 |
| | | m_AlreadyReceivedImage.gameObject.SetActive(true); |
| | | m_TimeRemaining.gameObject.SetActive(false); |
| | | m_ReceiveAwardBtn.gameObject.SetActive(false); |
| | | break; |
| | | default: |
| | | break; |
| | | |
| | | } |
| | | |
| | | } |
| | | private void DayText(int day) |
| | | { |
| | | switch (day) |
| | | { |
| | | case 1: |
| | | m_Days.text = Language.Get("One_day"); |
| | | break; |
| | | case 2: |
| | | m_Days.text = Language.Get("Two_day"); |
| | | break; |
| | | case 3: |
| | | m_Days.text = Language.Get("Three_day"); |
| | | break; |
| | | case 4: |
| | | m_Days.text = Language.Get("Four_day"); |
| | | break; |
| | | case 5: |
| | | m_Days.text = Language.Get("Five_day"); |
| | | break; |
| | | case 6: |
| | | m_Days.text = Language.Get("Six_day"); |
| | | break; |
| | | case 7: |
| | | m_Days.text = Language.Get("Seven_day"); |
| | | break; |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | if (index < items.Count)
|
| | | {
|
| | | var item = items[index];
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count, -1);
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count, -1, item.bind?1:0);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(attrData);
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | m_Items[i].gameObject.SetActive(true);
|
| | | var _item = items[i];
|
| | | var _itemModel = new ItemCellModel(_item.id, false, (ulong)_item.count);
|
| | | var _itemModel = new ItemCellModel(_item.id, false, (ulong)_item.count, _item.bind?1:0);
|
| | | m_Items[i].SetItemRare(_itemModel, i == 0);
|
| | | }
|
| | | else
|
| | |
| | | for (int i = 0; i < itemArray.Length; i++)
|
| | | {
|
| | | var _array = itemArray[i];
|
| | | items.Add(new Item(_array[0], _array[1]));
|
| | | items.Add(new Item(_array[0], _array[1], _array[2] == 1));
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | if (special.items != null && i < special.items.Count)
|
| | | {
|
| | | var award = special.items[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(award.id, true, (ulong)award.count);
|
| | | ItemCellModel cellModel = new ItemCellModel(award.id, true, (ulong)award.count, award.bind?1:0);
|
| | | m_Items[i].Init(cellModel);
|
| | | m_Items[i].cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(award.id, true, (ulong)award.count, -1);
|
| | | ItemAttrData attrData = new ItemAttrData(award.id, true, (ulong)award.count, -1, award.bind?1:0);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | |
| | | Item item = fairyJadeInvestmentItem[i];
|
| | | MotnlyItem motnlyItem = m_Group.GetChild(i).GetComponent<MotnlyItem>();
|
| | | var Item = ItemConfig.Get(item.id);
|
| | | ItemCellModel cellModel = new ItemCellModel(item.id, true, (ulong)1);
|
| | | ItemCellModel cellModel = new ItemCellModel(item.id, true, (ulong)1, item.bind?1:0);
|
| | | motnlyItem.Item_Cell.Init(cellModel);
|
| | |
|
| | | if (IsReceive == 0)
|
| | |
| | | var _itemArray = LitJson.JsonMapper.ToObject<int[][]>(_jsonData[key].ToJson());
|
| | | for (int j = 0; j < _itemArray.Length; j++)
|
| | | {
|
| | | FairyJadeItem.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1]));
|
| | | FairyJadeItem.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1], _itemArray[j][2]==1));
|
| | | }
|
| | | }
|
| | | fairyJadeInvestment.FairyJadeInvestmentItem = FairyJadeItem;
|
| | |
| | | var _itemArray = LitJson.JsonMapper.ToObject<int[][]>(_jsonData[key].ToJson());
|
| | | for (int j = 0; j < _itemArray.Length; j++)
|
| | | {
|
| | | FairyJadeItem.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1]));
|
| | | FairyJadeItem.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1], _itemArray[j][2]==1));
|
| | | }
|
| | | }
|
| | | fairyJadeInvestment.FairyJadeInvestmentItem = FairyJadeItem;
|
| | |
| | | }
|
| | | m_Items[i].gameObject.SetActive(true);
|
| | | var _item = _list[i];
|
| | | var _itemModel = new ItemCellModel(_item.id, false, (ulong)_item.count);
|
| | | var _itemModel = new ItemCellModel(_item.id, false, (ulong)_item.count, _item.bind?1:0);
|
| | | m_Items[i].Init(_itemModel);
|
| | | }
|
| | | }
|
| | |
| | | if (_index < _list.Count)
|
| | | {
|
| | | var item = _list[_index];
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, true, (ulong)item.count, -1, 0, true);
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, true, (ulong)item.count, -1, item.bind?1:0, true);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(attrData);
|
| | | }
|
| | | }
|
| | |
| | | int Type = i;
|
| | | Item item = NeedForWhiteItem[i];
|
| | | var Item = ItemConfig.Get(item.id);
|
| | | ItemCellModel cellModel = new ItemCellModel(item.id, true, (ulong)item.count);
|
| | | ItemCellModel cellModel = new ItemCellModel(item.id, true, (ulong)item.count, item.bind?1:0);
|
| | | switch (Type)
|
| | | {
|
| | | case 0:
|
| | |
| | | m_ItemCell_One.cellBtn.RemoveAllListeners();
|
| | | m_ItemCell_One.cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count, -1);
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count, -1, item.bind ? 1 : 0);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | break;
|
| | |
| | | m_ItemCell_Two.cellBtn.RemoveAllListeners();
|
| | | m_ItemCell_Two.cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count, -1);
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count, -1, item.bind ? 1 : 0);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | break;
|
| | |
| | | m_ItemCell_Three.cellBtn.RemoveAllListeners();
|
| | | m_ItemCell_Three.cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count, -1);
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count, -1, item.bind?1:0);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | break;
|
| | |
| | | var _itemArray = LitJson.JsonMapper.ToObject<int[][]>(_jsonData[key].ToJson());
|
| | | for (int j = 0; j < _itemArray.Length; j++)
|
| | | {
|
| | | awardItem.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1]));
|
| | | awardItem.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1], _itemArray[j][2]==1));
|
| | | }
|
| | | }
|
| | | NeedForWhite.AwardItem = awardItem;
|
| | |
| | | }
|
| | | m_Items[i].gameObject.SetActive(true);
|
| | | var _item = _list[i];
|
| | | var _itemModel = new ItemCellModel(_item.id, false, (ulong)_item.count);
|
| | | var _itemModel = new ItemCellModel(_item.id, false, (ulong)_item.count, _item.bind?1:0);
|
| | | m_Items[i].SetItemRare(_itemModel, 4);
|
| | | }
|
| | | }
|
| | |
| | | if (index < _list.Count)
|
| | | {
|
| | | var item = _list[index];
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count, -1);
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count, -1, item.bind ? 1:0);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(attrData);
|
| | | }
|
| | | }
|
| | |
| | | var _itemArray = LitJson.JsonMapper.ToObject<int[][]>(_jsonData[_key].ToJson());
|
| | | for (int j = 0; j < _itemArray.Length; j++)
|
| | | {
|
| | | _item.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1]));
|
| | | _item.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1], _itemArray[j][2]==1));
|
| | | }
|
| | | }
|
| | | data.giftItems = _item;
|
| | |
| | | m_RechargeGainItemDict.Add(configs[i].CTGID, _itemList);
|
| | | for (int k = 0; k < _itemArray.Length; k++)
|
| | | {
|
| | | Item _item = new Item(_itemArray[k][0], _itemArray[k][1]);
|
| | | Item _item = new Item(_itemArray[k][0], _itemArray[k][1], _itemArray[k][2]==1);
|
| | | _itemList.Add(_item);
|
| | | }
|
| | | }
|
| | |
| | | var _itemArray = JsonMapper.ToObject<int[][]>(_itemJson[_key].ToJson());
|
| | | for (int i = 0; i < _itemArray.Length; i++)
|
| | | {
|
| | | Item _item = new Item(_itemArray[i][0], _itemArray[i][1]);
|
| | | Item _item = new Item(_itemArray[i][0], _itemArray[i][1], _itemArray[i][2] == 1);
|
| | | _list.Add(_item);
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | if (index < m_Items.Length)
|
| | | {
|
| | | ItemCellModel cellModel = new ItemCellModel(award.id, false, (ulong)award.count);
|
| | | ItemCellModel cellModel = new ItemCellModel(award.id, false, (ulong)award.count, award.bind?1:0);
|
| | | m_Items[index].Init(cellModel);
|
| | | m_Items[index].cellBtn.RemoveAllListeners();
|
| | | m_Items[index].cellBtn.AddListener(() =>
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(award.id, false, (ulong)award.count, -1);
|
| | | ItemAttrData attrData = new ItemAttrData(award.id, false, (ulong)award.count, -1, award.bind?1:0);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | }
|
| | | });
|
| | |
| | | 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)
|
| | | {
|
| | | _index = 0;
|
| | |
| | | _cell.items[i].gameObject.SetActive(true);
|
| | | _cell.gotImages[i].gameObject.SetActive(_isGet);
|
| | | var _item = _items[i];
|
| | | ItemCellModel _ItemData = new ItemCellModel(_item.id, false, (ulong)_item.count);
|
| | | ItemCellModel _ItemData = new ItemCellModel(_item.id, false, (ulong)_item.count, _item.bind?1:0);
|
| | | _cell.items[i].Init(_ItemData);
|
| | | _cell.items[i].cellBtn.RemoveAllListeners();
|
| | | _cell.items[i].cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData _itemPropertyData = new ItemAttrData(_item.id, false, (ulong)_item.count, -1);
|
| | | ItemAttrData _itemPropertyData = new ItemAttrData(_item.id, false, (ulong)_item.count, -1, _item.bind ? 1 : 0);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(_itemPropertyData);
|
| | | });
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | var _vipAward = model.m_VipItemDict[_cell.index];
|
| | | ItemCellModel _vipDate = new ItemCellModel(_vipAward.item.id, false, (ulong)_vipAward.item.count);
|
| | | ItemCellModel _vipDate = new ItemCellModel(_vipAward.item.id, false, (ulong)_vipAward.item.count, _vipAward.item.bind ? 1 : 0);
|
| | | _cell.vipItem.Init(_vipDate);
|
| | | _cell.vipItem.cellBtn.RemoveAllListeners();
|
| | | _cell.vipItem.cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData _itemPropertyData = new ItemAttrData(_vipAward.item.id, false, (ulong)_vipAward.item.count, -1);
|
| | | ItemAttrData _itemPropertyData = new ItemAttrData(_vipAward.item.id, false, (ulong)_vipAward.item.count, -1, _vipAward.item.bind ? 1 : 0);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(_itemPropertyData);
|
| | | });
|
| | | _cell.vipGotImage.gameObject.SetActive(_vipGot);
|