| | |
| | | ItemCellModel cellModel = new ItemCellModel(serverItem.ItemID, false, (ulong)serverItem.Count
|
| | | , "", PackType.Deleted, false, ConfigParse.Analysis(serverItem.UserData));
|
| | | itemCell.Init(cellModel);
|
| | | itemCell.cellBtn.RemoveAllListeners();
|
| | | itemCell.cellBtn.AddListener(() =>
|
| | | itemCell.button.RemoveAllListeners();
|
| | | itemCell.button.AddListener(() =>
|
| | | {
|
| | | ShowItemDetails(serverItem);
|
| | | });
|
| | |
| | | ItemCellModel cellModel = new ItemCellModel(serverItem.ItemID, false, (ulong)serverItem.Count,
|
| | | "", PackType.Deleted, false, ConfigParse.Analysis(serverItem.UserData));
|
| | | itemCell.Init(cellModel);
|
| | | itemCell.cellBtn.RemoveAllListeners();
|
| | | itemCell.cellBtn.AddListener(() =>
|
| | | itemCell.button.RemoveAllListeners();
|
| | | itemCell.button.AddListener(() =>
|
| | | {
|
| | | ShowItemDetails(serverItem);
|
| | | });
|
| | |
| | | {
|
| | | if (!string.IsNullOrEmpty(guid))
|
| | | {
|
| | | var sourcelist = betterModel.GetUseDataModel((int)ItemUseDataKey.source);
|
| | | var sourcelist = betterModel.GetUseData((int)ItemUseDataKey.source);
|
| | | if (sourcelist != null && sourcelist[0] == 4)
|
| | | {
|
| | | SnxxzGame.Instance.StartCoroutine(Co_DelayRefreshBetterEquip(guid));
|
| | |
| | | if (!string.IsNullOrEmpty(tempGuid))
|
| | | {
|
| | | var itemModel = playerPack.GetItemByGuid(tempGuid);
|
| | | var sourcelist = itemModel.GetUseDataModel((int)ItemUseDataKey.source);
|
| | | var sourcelist = itemModel.GetUseData((int)ItemUseDataKey.source);
|
| | | if (sourcelist != null && sourcelist[0] == 4)
|
| | | {
|
| | | SnxxzGame.Instance.StartCoroutine(Co_DelayRefreshBetterEquip(tempGuid));
|
| | |
| | | fireChooseCell.itemCell.countText.gameObject.SetActive(true);
|
| | | fireChooseCell.nameText.text = chinItemModel.ItemName;
|
| | | fireChooseCell.addSuccessRateText.text = effectStr;
|
| | | fireChooseCell.itemCell.cellBtn.RemoveAllListeners();
|
| | | fireChooseCell.itemCell.cellBtn.AddListener(() =>
|
| | | fireChooseCell.itemCell.button.RemoveAllListeners();
|
| | | fireChooseCell.itemCell.button.AddListener(() =>
|
| | | {
|
| | | itemPathModel.SetChinItemModel(matId);
|
| | | });
|
| | |
| | | itemCell.countText.text = UIHelper.AppendColor(TextColType.Red, haveMaterCount.ToString()) + "/" + materialNum;
|
| | | }
|
| | |
|
| | | itemCell.cellBtn.RemoveAllListeners();
|
| | | itemCell.cellBtn.AddListener(() => |
| | | itemCell.button.RemoveAllListeners();
|
| | | itemCell.button.AddListener(() => |
| | | {
|
| | | itemPathModel.SetChinItemModel(materialId);
|
| | | });
|
| | |
| | | fullImg.SetActive(false);
|
| | | }
|
| | |
|
| | | itemCell.cellBtn.RemoveAllListeners();
|
| | | itemCell.cellBtn.AddListener(() =>
|
| | | itemCell.button.RemoveAllListeners();
|
| | | itemCell.button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemId);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | |
| | | itemBaisc.gameObject.SetActive(true);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemId,false,0);
|
| | | itemBaisc.Init(cellModel);
|
| | | itemBaisc.cellBtn.RemoveAllListeners();
|
| | | itemBaisc.cellBtn.AddListener(()=>
|
| | | itemBaisc.button.RemoveAllListeners();
|
| | | itemBaisc.button.AddListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemId,false,0);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | |
| | | {
|
| | | ItemCellModel cellModel = new ItemCellModel(prayModel.itemId,false,1);
|
| | | itemBaisc.Init(cellModel);
|
| | | itemBaisc.cellBtn.RemoveAllListeners();
|
| | | itemBaisc.cellBtn.AddListener(()=>
|
| | | itemBaisc.button.RemoveAllListeners();
|
| | | itemBaisc.button.AddListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(prayModel.itemId,false,1);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | |
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(itemModel.itemId,false,(ulong)itemCount);
|
| | | itemCell.Init(cellModel);
|
| | | itemCell.cellBtn.RemoveAllListeners();
|
| | | itemCell.cellBtn.AddListener(() =>
|
| | | itemCell.button.RemoveAllListeners();
|
| | | itemCell.button.AddListener(() =>
|
| | | {
|
| | | if (selectImg.activeInHierarchy)
|
| | | {
|
| | |
| | | ItemConfig itemCfg = ItemConfig.Get((int)_item.itemId);
|
| | | _itemCell.items[i].Init(_item);
|
| | | _itemCell.itemEquips[i].gameObject.SetActive(_item.packType == PackType.Equip);
|
| | | _itemCell.items[i].cellBtn.onClick.RemoveAllListeners();
|
| | | _itemCell.items[i].cellBtn.onClick.AddListener(() =>
|
| | | _itemCell.items[i].button.onClick.RemoveAllListeners();
|
| | | _itemCell.items[i].button.onClick.AddListener(() =>
|
| | | {
|
| | | OnItemClick(_item);
|
| | | });
|
| | |
| | | bool isShow = model.config.ExpireTime > 0;
|
| | | if (isShow)
|
| | | {
|
| | | List<int> itemEffectTime = model.GetUseDataModel((int)ItemUseDataKey.createTime);
|
| | | List<int> itemEffectTime = model.GetUseData((int)ItemUseDataKey.createTime);
|
| | | seconds = model.config.ExpireTime;
|
| | | if (itemEffectTime != null && itemEffectTime[0] != 0 && model.guid != "")
|
| | | {
|
| | |
| | | {
|
| | | bool isShowMat = itemId != 0 || itemModel != null ? true : false;
|
| | | itemCell.gameObject.SetActive(isShowMat);
|
| | | itemCell.cellBtn.RemoveAllListeners();
|
| | | itemCell.button.RemoveAllListeners();
|
| | | itemCell.reducebtn.RemoveAllListeners();
|
| | | if (isShowMat)
|
| | | {
|
| | | if (itemModel != null)
|
| | | {
|
| | | itemCell.Init(itemModel);
|
| | | itemCell.cellBtn.AddListener(ClickItemCell);
|
| | | itemCell.button.AddListener(ClickItemCell);
|
| | | }
|
| | | else
|
| | | {
|
| | |
|
| | | ItemCellModel cellModel = new ItemCellModel(itemId);
|
| | | itemCell.Init(cellModel);
|
| | | itemCell.cellBtn.AddListener(ClickItemCell);
|
| | | itemCell.button.AddListener(ClickItemCell);
|
| | | }
|
| | |
|
| | | switch(matType)
|
| | |
| | | remainTimeText.gameObject.SetActive(isShow);
|
| | | if (isShow)
|
| | | {
|
| | | List<int> itemEffectTime = itemModel.GetUseDataModel((int)ItemUseDataKey.createTime);
|
| | | List<int> itemEffectTime = itemModel.GetUseData((int)ItemUseDataKey.createTime);
|
| | | double remianTime = itemModel.config.ExpireTime;
|
| | | if (itemEffectTime != null && itemEffectTime[0] != 0 && itemModel.guid != "")
|
| | | {
|
| | |
| | | bool isRefineMat = false;
|
| | | foreach (var model in unfixedDic.Values)
|
| | | {
|
| | | if (model.GetUseDataModel((int)ItemUseDataKey.wingMaterialItemID) != null)
|
| | | if (model.GetUseData((int)ItemUseDataKey.wingMaterialItemID) != null)
|
| | | {
|
| | | isRefineMat = true;
|
| | | break;
|
| | |
| | | {
|
| | | var matCell = fixedAndUnfixeds[fixedDisplay - 1];
|
| | | int fixedId = fixedIds[i];
|
| | | var bindIcon = matCell.itemCell.bindIcon;
|
| | | var bindIcon = matCell.itemCell.auctionIcon;
|
| | | bindIcon.gameObject.SetActive(false);
|
| | | //if (isBind)
|
| | | //{
|
| | |
| | | bool isShow = model.config.ExpireTime > 0;
|
| | | if (isShow)
|
| | | {
|
| | | List<int> itemEffectTime = model.GetUseDataModel((int)ItemUseDataKey.createTime);
|
| | | List<int> itemEffectTime = model.GetUseData((int)ItemUseDataKey.createTime);
|
| | | seconds = model.config.ExpireTime;
|
| | | if (itemEffectTime != null && itemEffectTime[0] != 0 && model.guid != "")
|
| | | {
|
| | |
| | | var awardItem = awardItems[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(awardItem.itemId, true, (ulong)awardItem.itemCount);
|
| | | itemBasic.Init(cellModel);
|
| | | itemBasic.cellBtn.RemoveAllListeners();
|
| | | itemBasic.cellBtn.AddListener(() =>
|
| | | itemBasic.button.RemoveAllListeners();
|
| | | itemBasic.button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(awardItem.itemId, true, (ulong)awardItem.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | |
| | | ItemCellModel cellModel = new ItemCellModel(List[i].id, true, (ulong)List[i].count);
|
| | | _ItemCell.Init(cellModel);
|
| | | int type = i;
|
| | | _ItemCell.cellBtn.SetListener(() =>
|
| | | _ItemCell.button.SetListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(List[type].id, false, (ulong)List[type].count);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | |
| | | ItemCellModel cellModel = new ItemCellModel(List[i].ItemId, true, (ulong)List[i].ItemNumber);
|
| | | _ItemCell.Init(cellModel);
|
| | | int type = i;
|
| | | _ItemCell.cellBtn.SetListener(() =>
|
| | | _ItemCell.button.SetListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(List[type].ItemId, false, (ulong)List[type].ItemNumber);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | |
| | | ItemCell _ItemCell = ObjChild.GetComponent<ItemCell>();
|
| | | ItemCellModel cellModel = new ItemCellModel(itemClass.ItemId, true, (ulong)itemClass.ItemNumber);
|
| | | _ItemCell.Init(cellModel);
|
| | | _ItemCell.cellBtn.SetListener(() =>
|
| | | _ItemCell.button.SetListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemClass.ItemId, false, (ulong)itemClass.ItemNumber);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | |
| | | public void Display(ItemModel model)
|
| | | {
|
| | | itemBaisc.Init(model);
|
| | | itemBaisc.bindIcon.gameObject.SetActive(false);
|
| | | itemBaisc.auctionIcon.gameObject.SetActive(false);
|
| | | int strenLv = 0;
|
| | | if(model.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus) != null)
|
| | | if(model.GetUseData((int)ItemUseDataKey.dogzEquipPlus) != null)
|
| | | {
|
| | | strenLv = model.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus)[0];
|
| | | strenLv = model.GetUseData((int)ItemUseDataKey.dogzEquipPlus)[0];
|
| | | }
|
| | | if (strenLv > 0)
|
| | | {
|
| | |
| | | {
|
| | | strengLvTxt.gameObject.SetActive(false);
|
| | | }
|
| | | itemBaisc.cellBtn.RemoveAllListeners();
|
| | | itemBaisc.cellBtn.AddListener(()=>
|
| | | itemBaisc.button.RemoveAllListeners();
|
| | | itemBaisc.button.AddListener(()=>
|
| | | {
|
| | | tipsModel.SetItemTipsModel(model.packType,model.guid,false,false);
|
| | | tipsModel.SetDogzEquipBtn(tipsModel.curAttrData);
|
| | |
| | | }
|
| | | DebugEx.Log("model:"+ model.itemId);
|
| | | int strenLv = 0;
|
| | | if (model.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus) != null)
|
| | | if (model.GetUseData((int)ItemUseDataKey.dogzEquipPlus) != null)
|
| | | {
|
| | | strenLv = model.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus)[0];
|
| | | strenLv = model.GetUseData((int)ItemUseDataKey.dogzEquipPlus)[0];
|
| | | }
|
| | | if (strenLv > 0)
|
| | | {
|
| | |
| | | itemBaisc.stateIcon.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | itemBaisc.bindIcon.gameObject.SetActive(false);
|
| | | itemBaisc.cellBtn.RemoveAllListeners();
|
| | | itemBaisc.cellBtn.AddListener(()=>
|
| | | itemBaisc.auctionIcon.gameObject.SetActive(false);
|
| | | itemBaisc.button.RemoveAllListeners();
|
| | | itemBaisc.button.AddListener(()=>
|
| | | {
|
| | | tipsModel.SetItemTipsModel(model.packType, model.guid, false, true);
|
| | | tipsModel.SetDogzItemBtn(tipsModel.curAttrData);
|
| | |
| | | y = end.equipScore;
|
| | | if (x.CompareTo(y) != 0) return -x.CompareTo(y);
|
| | |
|
| | | List<int> strenglist = start.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);
|
| | | List<int> strenglist = start.GetUseData((int)ItemUseDataKey.dogzEquipPlus);
|
| | | x = strenglist != null ? strenglist[0] : 0;
|
| | | strenglist = end.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);
|
| | | strenglist = end.GetUseData((int)ItemUseDataKey.dogzEquipPlus);
|
| | | y = strenglist != null ? strenglist[0] : 0;
|
| | | if (x.CompareTo(y) != 0) return -x.CompareTo(y);
|
| | |
|
| | |
| | | else
|
| | | {
|
| | | int putStrenLv = 0;
|
| | | if (itemModel.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus) != null)
|
| | | if (itemModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus) != null)
|
| | | {
|
| | | putStrenLv = itemModel.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus)[0];
|
| | | putStrenLv = itemModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus)[0];
|
| | | }
|
| | |
|
| | | int selectStrenLv = 0;
|
| | | if (selectModel.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus) != null)
|
| | | if (selectModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus) != null)
|
| | | {
|
| | | selectStrenLv = selectModel.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus)[0];
|
| | | selectStrenLv = selectModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus)[0];
|
| | | }
|
| | |
|
| | | if (itemModel.config.ItemColor < selectModel.config.ItemColor
|
| | |
| | | nameTex.text = model.config.ItemName;
|
| | | nameTex.color = UIHelper.GetUIColor(model.config.ItemColor,true);
|
| | | itemBaisc.Init(model);
|
| | | itemBaisc.bindIcon.gameObject.SetActive(false);
|
| | | itemBaisc.auctionIcon.gameObject.SetActive(false);
|
| | | int strenLv = 0;
|
| | | if (model.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus) != null)
|
| | | if (model.GetUseData((int)ItemUseDataKey.dogzEquipPlus) != null)
|
| | | {
|
| | | strenLv = model.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus)[0];
|
| | | strenLv = model.GetUseData((int)ItemUseDataKey.dogzEquipPlus)[0];
|
| | | }
|
| | | if (strenLv > 0)
|
| | | {
|
| | |
| | | _achievement.m_ItemCell.gameObject.SetActive(true);
|
| | | ItemCellModel _itemCellModel = new ItemCellModel(presentAchieve.rewardItem[0].id, false, (ulong)presentAchieve.rewardItem[0].count);
|
| | | _achievement.m_ItemCell.Init(_itemCellModel);
|
| | | _achievement.m_ItemCell.cellBtn.RemoveAllListeners();
|
| | | _achievement.m_ItemCell.cellBtn.onClick.AddListener(() =>
|
| | | _achievement.m_ItemCell.button.RemoveAllListeners();
|
| | | _achievement.m_ItemCell.button.onClick.AddListener(() =>
|
| | | {
|
| | | if (presentAchieve.rewardItem != null && presentAchieve.rewardItem.Length > 0)
|
| | | {
|
| | |
| | | {
|
| | | _achievement.m_ContainerUnComplete.gameObject.SetActive(false);
|
| | | _achievement.m_ContainerComplete.gameObject.SetActive(true);
|
| | | _achievement.m_ItemCell.cellBtn.RemoveAllListeners();
|
| | | _achievement.m_ItemCell.button.RemoveAllListeners();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | var awards = GeneralDefine.ancientKingAwards;
|
| | | for (int i = 0; i < m_Items.Length; i++)
|
| | | {
|
| | | m_Items[i].cellBtn.RemoveAllListeners();
|
| | | m_Items[i].button.RemoveAllListeners();
|
| | | if (i < awards.Count)
|
| | | {
|
| | | var award = awards[i];
|
| | | m_Items[i].gameObject.SetActive(true);
|
| | | ItemCellModel itemCellModel = new ItemCellModel(award.id, true, (ulong)award.count);
|
| | | m_Items[i].Init(itemCellModel);
|
| | | m_Items[i].cellBtn.AddListener(() =>
|
| | | m_Items[i].button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData itemAttrData = new ItemAttrData(award.id, true, (ulong)award.count);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
|
| | |
| | |
|
| | | private void OnEnable()
|
| | | {
|
| | | cellBtn.AddListener(ShowItemTip);
|
| | | button.AddListener(ShowItemTip);
|
| | | RequestSfx();
|
| | | }
|
| | |
|
| | | private void OnDisable()
|
| | | {
|
| | | cellBtn.RemoveAllListeners();
|
| | | button.RemoveAllListeners();
|
| | | RecycleSfx();
|
| | | }
|
| | |
|
| | |
| | | ItemCell _ItemCell = ObjChild.GetComponent<ItemCell>();
|
| | | ItemCellModel cellModel = new ItemCellModel(key, true, (ulong)IceCrystalVeinMiddleDic[key]);
|
| | | _ItemCell.Init(cellModel);
|
| | | _ItemCell.cellBtn.SetListener(() =>
|
| | | _ItemCell.button.SetListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(key, false, (ulong)IceCrystalVeinMiddleDic[key]);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | |
| | | ItemCellModel cellModel = new ItemCellModel(IceLode.ItemID, true, (ulong)IceLode.ItemCount);
|
| | | _ItemCell.Init(cellModel);
|
| | | int type = i;
|
| | | _ItemCell.cellBtn.SetListener(() =>
|
| | | _ItemCell.button.SetListener(() =>
|
| | | {
|
| | | if (StarAll >= IceLode.Star && !_bool)
|
| | | {
|
| | |
| | | trialExchangeId = 0;
|
| | | return;
|
| | | }
|
| | | m_Item.cellBtn.RemoveAllListeners();
|
| | | m_Item.button.RemoveAllListeners();
|
| | | m_Item.gameObject.SetActive(true);
|
| | | ItemCellModel cellModel = new ItemCellModel(model.GetExchangeItemByJob(config), true, (ulong)config.exchangeItemCount);
|
| | | m_Item.Init(cellModel);
|
| | | m_Item.cellBtn.AddListener(() =>
|
| | | m_Item.button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData itemAttrData = new ItemAttrData(model.GetExchangeItemByJob(config), true, (ulong)config.exchangeItemCount, -1, true);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
|
| | |
| | | { |
| | | foreach (var item in items) |
| | | { |
| | | if (item.isBind == 0) |
| | | if (!item.isAuction) |
| | | { |
| | | candidateEquips.Add(new CandidateEquip(item.guid)); |
| | | } |
| | |
| | | Button _button = go.transform.GetComponent<Button>();
|
| | | ItemCellModel cellModel = new ItemCellModel(rewardList[i].itemCfg.ID, true, (ulong)rewardList[i].num);
|
| | | itemcell.Init(cellModel);
|
| | | itemcell.cellBtn.RemoveAllListeners();
|
| | | itemcell.button.RemoveAllListeners();
|
| | | int tab = i;
|
| | | itemcell.cellBtn.AddListener(() =>
|
| | | itemcell.button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(rewardList[tab].itemCfg.ID, false, (ulong)rewardList[tab].num);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | |
| | | ItemCellModel cellModel = new ItemCellModel(AwardItemList[i].id, true, Number);
|
| | | itemCell.Init(cellModel);
|
| | | int tab = i;
|
| | | itemCell.cellBtn.SetListener(()=> |
| | | itemCell.button.SetListener(()=> |
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(AwardItemList[tab].id, false, Number);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | |
| | | beginBtn.onClick.AddListener(OnBeginBtn);
|
| | | m_GetWayBtn.onClick.AddListener(OnFoodGetWay);
|
| | | m_HandIn.onClick.AddListener(HandIn);
|
| | | m_FairyFood.cellBtn.AddListener(OnFoodGetWay);
|
| | | m_FairyFood.button.AddListener(OnFoodGetWay);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | |
| | | model.TryGetDropItems(model.selectBoss, out dropItems);
|
| | | for (int i = 0; i < m_DropItems.Length; i++)
|
| | | {
|
| | | m_DropItems[i].cellBtn.RemoveAllListeners();
|
| | | m_DropItems[i].button.RemoveAllListeners();
|
| | | if (dropItems != null && i < dropItems.Count)
|
| | | {
|
| | | m_DropItems[i].gameObject.SetActive(true);
|
| | | var item = dropItems[i];
|
| | | ItemCellModel itemCellModel = new ItemCellModel(item.id, true, (ulong)item.count);
|
| | | m_DropItems[i].Init(itemCellModel);
|
| | | m_DropItems[i].cellBtn.AddListener(() =>
|
| | | m_DropItems[i].button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData itemAttrData = new ItemAttrData(item.id, true, (ulong)item.count);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
|
| | |
| | | itemList[i].gameObject.SetActive(true);
|
| | | ItemCellModel cellModel = new ItemCellModel(_itemArray[0], false, (ulong)_itemArray[1]);
|
| | | itemList[i].Init(cellModel);
|
| | | itemList[i].cellBtn.onClick.RemoveAllListeners();
|
| | | itemList[i].cellBtn.onClick.AddListener(() =>
|
| | | itemList[i].button.onClick.RemoveAllListeners();
|
| | | itemList[i].button.onClick.AddListener(() =>
|
| | | {
|
| | | model.ViewKingFairyChest(_itemArray[0], _itemArray[1], _itemArray[2]);
|
| | | //ItemAttrData itemAttrData = new ItemAttrData(_itemArray[0], false, (ulong)_itemArray[1], -1, _itemArray[2]);
|
| | |
| | | m_FinalityBtn.onClick.AddListener(OnFinalityBtn);
|
| | | m_GuideBtn.onClick.AddListener(OnGuideBtn);
|
| | | m_SalaryBtn.onClick.AddListener(OnSalaryBtn);
|
| | | m_PrivilegeItem.cellBtn.onClick.AddListener(OnPrivilegeItem);
|
| | | m_PrivilegeItem.button.onClick.AddListener(OnPrivilegeItem);
|
| | | for (int i = 0; i < m_SalaryItemList.Count; i++)
|
| | | {
|
| | | var _index = i;
|
| | | m_SalaryItemList[i].cellBtn.onClick.AddListener(()=> |
| | | m_SalaryItemList[i].button.onClick.AddListener(()=> |
| | | {
|
| | | OnSalaryItem(_index);
|
| | | });
|
| | |
| | | }
|
| | |
|
| | | LightUpJudgment(warehouseGrid.Lllume, _bool, playerFairyAuTreasureData._DicfamilyStoreItem[_IndexKey].Index);
|
| | | warehouseGrid.ItemCell.cellBtn.RemoveAllListeners();
|
| | | warehouseGrid.ItemCell.cellBtn.AddListener(() =>
|
| | | warehouseGrid.ItemCell.button.RemoveAllListeners();
|
| | | warehouseGrid.ItemCell.button.AddListener(() =>
|
| | | {
|
| | | TypeJudgment(warehouseGrid.Lllume, _bool, (int)itemModel.ItemID, playerFairyAuTreasureData._DicfamilyStoreItem[_IndexKey].Index);
|
| | | });
|
| | |
| | | buyPriceText.text = storeConfig.MoneyNumber.ToString();
|
| | | ItemCellModel fireModel = new ItemCellModel(storeConfig.ItemID,true,(ulong)storeConfig.ItemCnt);
|
| | | fireItem.Init(fireModel);
|
| | | fireItem.cellBtn.AddListener(() =>
|
| | | fireItem.button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(storeConfig.ItemID,true, (ulong)storeConfig.ItemCnt);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | |
| | | FairylandCeremonyModel.AwardItem itemData = itemlist[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount);
|
| | | itemBaiscs[i].Init(cellModel);
|
| | | itemBaiscs[i].cellBtn.RemoveAllListeners();
|
| | | itemBaiscs[i].cellBtn.AddListener(() =>
|
| | | itemBaiscs[i].button.RemoveAllListeners();
|
| | | itemBaiscs[i].button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | |
| | | FairylandCeremonyModel.AwardItem itemData = list[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount);
|
| | | baiscs[i].Init(cellModel);
|
| | | baiscs[i].cellBtn.RemoveAllListeners();
|
| | | baiscs[i].cellBtn.AddListener(() =>
|
| | | baiscs[i].button.RemoveAllListeners();
|
| | | baiscs[i].button.AddListener(() =>
|
| | | {
|
| | | switch(itemData.itemId)
|
| | | {
|
| | |
| | | FairylandCeremonyModel.AwardItem itemData = itemlist[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId,true, (ulong)itemData.itemCount);
|
| | | itemBaiscs[i].Init(cellModel);
|
| | | itemBaiscs[i].cellBtn.RemoveAllListeners();
|
| | | itemBaiscs[i].cellBtn.AddListener(()=>
|
| | | itemBaiscs[i].button.RemoveAllListeners();
|
| | | itemBaiscs[i].button.AddListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | |
| | | FairylandCeremonyModel.AwardItem itemData = itemlist[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount);
|
| | | itemBaiscs[i].Init(cellModel);
|
| | | itemBaiscs[i].cellBtn.RemoveAllListeners();
|
| | | itemBaiscs[i].cellBtn.AddListener(() =>
|
| | | itemBaiscs[i].button.RemoveAllListeners();
|
| | | itemBaiscs[i].button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | |
| | | selectObj.SetActive(_isSelect);
|
| | | var decomposeModel = FashionDecomposeModel.Instance;
|
| | | itemBaisc.Init(itemModel);
|
| | | itemBaisc.cellBtn.RemoveAllListeners();
|
| | | itemBaisc.cellBtn.AddListener(()=>
|
| | | itemBaisc.button.RemoveAllListeners();
|
| | | itemBaisc.button.AddListener(()=>
|
| | | {
|
| | | decomposeModel.UpdateDecomposeItem(itemModel.guid, !selectObj.activeInHierarchy);
|
| | | selectObj.SetActive(!selectObj.activeInHierarchy);
|
| | |
| | | ItemCellModel cellModel = new ItemCellModel((int)itemModel.ItemID, false, (ulong)itemModel.Count,
|
| | | "", PackType.Deleted, false, ConfigParse.Analysis(itemModel.UserData));
|
| | | itemCell.Init(cellModel);
|
| | | itemCell.cellBtn.onClick.RemoveAllListeners();
|
| | | itemCell.cellBtn.onClick.AddListener(() =>
|
| | | itemCell.button.onClick.RemoveAllListeners();
|
| | | itemCell.button.onClick.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData((int)itemModel.ItemID, false, (ulong)itemModel.Count, -1, true, PackType.Deleted, "", ConfigParse.Analysis(itemModel.UserData));
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | |
| | | XBGetItemCell itemBasic = item.transform.Find("CommonItemCell").GetComponent<XBGetItemCell>();
|
| | | ItemCellModel cellModel = new ItemCellModel(xbItem.itemId, false, (ulong)xbItem.count);
|
| | | itemBasic.Init(cellModel);
|
| | | itemBasic.cellBtn.RemoveAllListeners();
|
| | | itemBasic.cellBtn.AddListener(() =>
|
| | | itemBasic.button.RemoveAllListeners();
|
| | | itemBasic.button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(xbItem.itemId, false, (ulong)xbItem.count);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | |
| | | { |
| | | itemCell.gameObject.SetActive(true); |
| | | itemCell.Init(itemModel); |
| | | itemCell.cellBtn.RemoveAllListeners(); |
| | | itemCell.cellBtn.AddListener(() => { ClickItemCell(itemModel); }); |
| | | itemCell.button.RemoveAllListeners(); |
| | | itemCell.button.AddListener(() => { ClickItemCell(itemModel); }); |
| | | } |
| | | else |
| | | { |
| | |
| | | nameText.text = itemConfig.ItemName;
|
| | | nameText.color = UIHelper.GetUIColor(itemConfig.ItemColor,false);
|
| | | }
|
| | | itemCell.cellBtn.RemoveAllListeners();
|
| | | itemCell.cellBtn.AddListener(()=>
|
| | | itemCell.button.RemoveAllListeners();
|
| | | itemCell.button.AddListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemId,true,(ulong)count);
|
| | | itemTips.SetItemTipsModel(attrData);
|
| | |
| | | item.gameObject.SetActive(true); |
| | | item.InitModel(heavenModel.campVicRewardDict[id], id); |
| | | GetList.Add(item); |
| | | item.cellBtn.RemoveAllListeners(); |
| | | item.cellBtn.AddListener(() => |
| | | item.button.RemoveAllListeners(); |
| | | item.button.AddListener(() => |
| | | { |
| | | ClickRewardCell(itemId); |
| | | }); |
| | |
| | | item.gameObject.SetActive(true); |
| | | item.InitModel(heavenModel.campFailRewardDict[id], id); |
| | | GetList.Add(item); |
| | | item.cellBtn.RemoveAllListeners(); |
| | | item.cellBtn.AddListener(() => |
| | | item.button.RemoveAllListeners(); |
| | | item.button.AddListener(() => |
| | | { |
| | | ClickRewardCell(itemId); |
| | | }); |
| | |
| | | var baseInfo = new BaseInfo() |
| | | { |
| | | itemId = item.itemId, |
| | | isAuction = item.isBind == 1, |
| | | isAuction = item.isAuction , |
| | | isEquiped = equipModel.GetEquip(item.config.LV, item.config.EquipPlace) == guid, |
| | | score = item.equipScore, |
| | | auctionSurplusTime = item.auctionSurplusTime, |
| | |
| | | var data = new LegendProperty(); |
| | | data.isPreview = false; |
| | | |
| | | var ids = item.GetUseDataModel(17); |
| | | var values = item.GetUseDataModel(19); |
| | | var ids = item.GetUseData(17); |
| | | var values = item.GetUseData(19); |
| | | if (!ids.IsNullOrEmpty() && values.IsNullOrEmpty()) |
| | | { |
| | | var properties = new List<Int2>(); |
| | |
| | | model.TryGetDropItems(model.selectBossId, out dropItems);
|
| | | for (int i = 0; i < m_Items.Length; i++)
|
| | | {
|
| | | m_Items[i].cellBtn.RemoveAllListeners();
|
| | | m_Items[i].button.RemoveAllListeners();
|
| | | if (dropItems != null && i < dropItems.Count)
|
| | | {
|
| | | m_Items[i].gameObject.SetActive(true);
|
| | | var item = dropItems[i];
|
| | | ItemCellModel itemCellModel = new ItemCellModel(item.id, true, (ulong)item.count);
|
| | | m_Items[i].Init(itemCellModel);
|
| | | m_Items[i].cellBtn.AddListener(() =>
|
| | | m_Items[i].button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData itemAttrData = new ItemAttrData(item.id, true, (ulong)item.count);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
|
| | |
| | | CommonItemBaisc itemBasic = item.transform.Find("CommonItemCell").GetComponent<CommonItemBaisc>();
|
| | | ItemCellModel cellModel = new ItemCellModel(matInfo.itemId, false, (ulong)matInfo.itemCount);
|
| | | itemBasic.Init(cellModel);
|
| | | itemBasic.cellBtn.RemoveAllListeners();
|
| | | itemBasic.cellBtn.AddListener(() =>
|
| | | itemBasic.button.RemoveAllListeners();
|
| | | itemBasic.button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(matInfo.itemId, false, (ulong)matInfo.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | |
| | |
|
| | | public void SetDisplay(ItemModel itemModel,List<string> selectGuids)
|
| | | {
|
| | | itemBaisc.cellBtn.RemoveAllListeners();
|
| | | itemBaisc.button.RemoveAllListeners();
|
| | | equipLvObj.SetActive(false);
|
| | | if (itemModel == null || selectGuids == null)
|
| | | {
|
| | |
| | | string equipLvSB = Language.Get(StringUtility.Contact("Num_CHS_", itemModel.config.LV));
|
| | | equipLvText.text = Language.Get("L1091", equipLvSB);
|
| | | }
|
| | | itemBaisc.cellBtn.AddListener(()=>
|
| | | itemBaisc.button.AddListener(()=>
|
| | | {
|
| | | if (selectObj.activeInHierarchy)
|
| | | {
|
| | |
| | | lockText.gameObject.SetActive(false);
|
| | | lockObj.SetActive(islock);
|
| | | equipBtn.RemoveAllListeners();
|
| | | itemCell.cellBtn.RemoveAllListeners();
|
| | | itemCell.button.RemoveAllListeners();
|
| | | equipLvObj.SetActive(false);
|
| | | composeImg.SetActive(false);
|
| | | if(islock)
|
| | |
| | | equipLvObj.SetActive(true);
|
| | | nameText.gameObject.SetActive(false);
|
| | | itemCell.Init(itemModel);
|
| | | itemCell.cellBtn.AddListener(() => { ClickItemCell(itemModel); });
|
| | | itemCell.button.AddListener(() => { ClickItemCell(itemModel); });
|
| | | string equipLvSB = Language.Get(StringUtility.Contact("Num_CHS_", itemModel.config.LV));
|
| | | equipLvText.text = Language.Get("L1091",equipLvSB);
|
| | | }
|
| | |
| | | equipLvText.text = Language.Get("L1091", equipLvSB);
|
| | | }
|
| | |
|
| | | itemCell.cellBtn.RemoveAllListeners();
|
| | | itemCell.cellBtn.AddListener(()=>
|
| | | itemCell.button.RemoveAllListeners();
|
| | | itemCell.button.AddListener(()=>
|
| | | {
|
| | | equipModel.ClearLookItemModel();
|
| | | tipsModel.SetItemTipsModel(itemModel.packType,itemModel.guid,false,true);
|
| | |
| | | ItemCellModel cellModel = new ItemCellModel(itemInfo.ItemID, false, (ulong)itemInfo.Count,
|
| | | "", type, false, ConfigParse.Analysis(itemInfo.UserData));
|
| | | itemBasic.Init(cellModel);
|
| | | itemBasic.cellBtn.RemoveAllListeners();
|
| | | itemBasic.cellBtn.AddListener(() =>
|
| | | itemBasic.button.RemoveAllListeners();
|
| | | itemBasic.button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemInfo.ItemID, false, (ulong)itemInfo.Count, -1,
|
| | | false, type, "", ConfigParse.Analysis(itemInfo.UserData));
|
| | |
| | | ItemCellModel cellModel = new ItemCellModel(matInfo.ItemID, false, (ulong)matInfo.Count,
|
| | | "", PackType.Deleted, false, ConfigParse.Analysis(matInfo.UserData));
|
| | | itemBasic.Init(cellModel);
|
| | | itemBasic.cellBtn.RemoveAllListeners();
|
| | | itemBasic.cellBtn.AddListener(() =>
|
| | | itemBasic.button.RemoveAllListeners();
|
| | | itemBasic.button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(matInfo.ItemID, false, (ulong)matInfo.Count, -1,
|
| | | false, PackType.Deleted, "", ConfigParse.Analysis(matInfo.UserData));
|
| | |
| | | {
|
| | | itemBaisc.gameObject.SetActive(true);
|
| | | itemBaisc.Init(model,true);
|
| | | itemBaisc.cellBtn.RemoveAllListeners();
|
| | | itemBaisc.cellBtn.AddListener(()=>ClickItem(model));
|
| | | itemBaisc.button.RemoveAllListeners();
|
| | | itemBaisc.button.AddListener(()=>ClickItem(model));
|
| | | if (playerPack.selectDevourlist.Contains(model))
|
| | | {
|
| | | selectImg.SetActive(true);
|
| | |
| | | ItemCellModel cellModel = new ItemCellModel(matInfo.ItemID, false, (ulong)matInfo.Count,
|
| | | "", PackType.Deleted, false, ConfigParse.Analysis(matInfo.UserData));
|
| | | getMatlist[i].Init(cellModel);
|
| | | getMatlist[i].cellBtn.RemoveAllListeners();
|
| | | getMatlist[i].cellBtn.AddListener(() =>
|
| | | getMatlist[i].button.RemoveAllListeners();
|
| | | getMatlist[i].button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(matInfo.ItemID, false, (ulong)matInfo.Count,-1,
|
| | | false, PackType.Deleted, "", ConfigParse.Analysis(matInfo.UserData));
|
| | |
| | | {
|
| | | bottomPart.gameObject.SetActive(false);
|
| | | StartCoroutine(SetScrollSize());
|
| | | DebugEx.Log("分支测试");
|
| | | }
|
| | |
|
| | | IEnumerator SetScrollSize()
|
| | |
| | | |
| | | private void SetGetBetterEquipEvent(ItemModel model) |
| | | { |
| | | List<int> itemEffectTime = model.GetUseDataModel((int)ItemUseDataKey.createTime); |
| | | if (itemEffectTime != null) |
| | | if (model.isAuction)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | var itemEffectTime = model.GetUseData((int)ItemUseDataKey.createTime); |
| | | if (!itemEffectTime.IsNullOrEmpty() && itemEffectTime.Count > 0) |
| | | { |
| | | if (itemEffectTime[0] != 0) |
| | | { |
| | | ItemCDCool cool = KnapsackTimeCDMgr.Instance.GetItemCoolById(model.guid); |
| | | var cool = KnapsackTimeCDMgr.Instance.GetItemCoolById(model.guid); |
| | | double remainTime = 0; |
| | | if (cool != null) |
| | | { |
| | |
| | | } |
| | | |
| | | int isFightUp = IsFightUp(model.itemId, model.equipScore); |
| | | int equipPlace = model.config.EquipPlace; |
| | | if (isFightUp == 1) |
| | | { |
| | | switch (equipPlace) |
| | | { |
| | | case 9: |
| | | break; |
| | | default: |
| | | if (model.packType == PackType.Item) |
| | | { |
| | | var equipItemModel = playerPack.GetItemByIndex(PackType.Equip, model.config.EquipPlace); |
| | | if (PlayerDatas.Instance.baseData.LV >= 200) |
| | | { |
| | | if (model.config.EquipPlace > (int)RoleEquipType.Weapon2 && model.config.EquipPlace < (int)RoleEquipType.Neck) |
| | | { |
| | | if (equipItemModel != null && equipItemModel.config.ItemColor > model.config.ItemColor) |
| | | if (isFightUp != 1)
|
| | | { |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | break; |
| | | } |
| | | |
| | | if (GetBetterEquipEvent != null) |
| | | { |
| | | GetBetterEquipEvent(model.guid); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | return false; |
| | | } |
| | | |
| | | var putOnlimitList = item.GetUseDataModel((int)ItemUseDataKey.cancelUseLimit); |
| | | var putOnlimitList = item.GetUseData((int)ItemUseDataKey.cancelUseLimit); |
| | | if (!putOnlimitList.IsNullOrEmpty()) |
| | | { |
| | | if (putOnlimitList[0] == 1) |
| | |
| | | public int itemId { get { return itemInfo == null ? 0 : itemInfo.itemId; } }
|
| | | public int count { get { return itemInfo == null ? 0 : itemInfo.count; } }
|
| | | public int gridIndex { get { return itemInfo == null ? 0 : itemInfo.index; } }
|
| | | public int isBind { get { return itemInfo == null ? 0 : itemInfo.isBind; } }
|
| | | public bool isAuction { get { return itemInfo == null ? false : itemInfo.isAuction == 1; } }
|
| | | public int preItemCount { get; private set; }
|
| | | public int auctionSurplusTime {
|
| | | get {
|
| | |
| | | }
|
| | |
|
| | | this.equipScore = ItemLogicUtility.Instance.GetEquipScore(packType, itemId, useDataDict);
|
| | | if (GetUseDataModel((int)ItemUseDataKey.itemCount) != null)
|
| | | if (GetUseData((int)ItemUseDataKey.itemCount) != null)
|
| | | {
|
| | | itemInfo.count = GetUseDataModel((int)ItemUseDataKey.itemCount)[0];
|
| | | itemInfo.count = GetUseData((int)ItemUseDataKey.itemCount)[0];
|
| | | }
|
| | |
|
| | | var itemEffectTime = GetUseDataModel((int)ItemUseDataKey.createTime);
|
| | | var itemEffectTime = GetUseData((int)ItemUseDataKey.createTime);
|
| | | if (config.ExpireTime > 0 && !itemEffectTime.IsNullOrEmpty() && itemEffectTime[0] != 0)
|
| | | {
|
| | | switch ((EquipReduceType)config.EndureReduceType)
|
| | |
| | | itemInfo.count = count;
|
| | | }
|
| | |
|
| | | public List<int> GetUseDataModel(int key)
|
| | | public List<int> GetUseData(int key)
|
| | | {
|
| | | List<int> list = null;
|
| | | if (useDataDict != null)
|
| | |
| | |
|
| | | public int count; //物品数量
|
| | |
|
| | | public int isBind;//是否绑定
|
| | | public int isAuction;//是否拍品
|
| | |
|
| | | public int remainHour; //剩余时间(小时)
|
| | |
|
| | |
| | | remainHour = (int)serverItem.RemainHour;
|
| | | userData = serverItem.UserData;
|
| | | guid = serverItem.ItemGUID;
|
| | | isBind = serverItem.IsBind;
|
| | | isAuction = serverItem.IsBind;
|
| | | }
|
| | |
|
| | | public ItemInfo(H0704_tagRolePackRefresh serverItem)
|
| | |
| | | remainHour = (int)serverItem.RemainHour;
|
| | | userData = serverItem.UserData;
|
| | | guid = serverItem.ItemGUID;
|
| | | isBind = serverItem.IsBind;
|
| | | isAuction = serverItem.IsBind;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | return; |
| | | } |
| | | |
| | | var putOnLimits = selectedItem.GetUseDataModel((int)ItemUseDataKey.cancelUseLimit); |
| | | var putOnLimits = selectedItem.GetUseData((int)ItemUseDataKey.cancelUseLimit); |
| | | if (putOnLimits != null && putOnLimits[0] == 1) |
| | | { |
| | | PutOnEquip(selectedItem.equipPlace, selectedItem.guid); |
| | |
| | | switch ((EquipReduceType)itemModel.config.EndureReduceType) |
| | | { |
| | | case EquipReduceType.Def_EquipReduceType_Time: |
| | | List<int> itemEffectTime = itemModel.GetUseDataModel((int)ItemUseDataKey.createTime); |
| | | List<int> itemEffectTime = itemModel.GetUseData((int)ItemUseDataKey.createTime); |
| | | if (itemEffectTime != null && itemEffectTime[0] != 0) |
| | | { |
| | | if (cool == null || cool.GetRemainTime() <= 0) |
| | |
| | | {
|
| | | gridCell.itemCellBtn.OnOneParaClick = (int info) =>
|
| | | {
|
| | | if (itemModel.itemInfo.isBind== 1)
|
| | | if (itemModel.itemInfo.isAuction== 1)
|
| | | {
|
| | | AuctionHelpModel auctionHelpModel = ModelCenter.Instance.GetModel<AuctionHelpModel>();
|
| | | auctionHelpModel.ItemModel = itemModel;
|
| | |
| | | {
|
| | | public class CommonItemBaisc : MonoBehaviour
|
| | | {
|
| | | Image _bgIcon;
|
| | | Image m_BgIcon;
|
| | | public Image bgIcon {
|
| | | get {
|
| | | if (_bgIcon == null)
|
| | | if (m_BgIcon == null)
|
| | | {
|
| | | var _trans = transform.Find("EquipBG");
|
| | | _bgIcon = _trans != null ? _trans.GetComponent<Image>() : null;
|
| | | m_BgIcon = this.transform.GetComponent<Image>("EquipBG");
|
| | | }
|
| | | return _bgIcon;
|
| | | return m_BgIcon;
|
| | | }
|
| | | }
|
| | |
|
| | | Image _itemIcon;
|
| | | Image m_ItemIcon;
|
| | | public Image itemIcon {
|
| | | get {
|
| | | if (_itemIcon == null)
|
| | | if (m_ItemIcon == null)
|
| | | {
|
| | | var _trans = transform.Find("ItemIcon");
|
| | | _itemIcon = _trans != null ? _trans.GetComponent<Image>() : null;
|
| | | m_ItemIcon = this.transform.GetComponent<Image>("ItemIcon");
|
| | | }
|
| | | return _itemIcon;
|
| | | return m_ItemIcon;
|
| | | }
|
| | | }
|
| | |
|
| | | Image _bindIcon;
|
| | | public Image bindIcon {
|
| | | Image m_AuctionIcon;
|
| | | public Image auctionIcon {
|
| | | get {
|
| | | if (_bindIcon == null)
|
| | | if (m_AuctionIcon == null)
|
| | | {
|
| | | var _trans = transform.Find("BindBG");
|
| | | _bindIcon = _trans != null ? _trans.GetComponent<Image>() : null;
|
| | | m_AuctionIcon = this.transform.GetComponent<Image>("BindBG");
|
| | | }
|
| | | return _bindIcon;
|
| | | return m_AuctionIcon;
|
| | | }
|
| | | }
|
| | |
|
| | | Image _stateIcon;
|
| | | Image m_StateIcon;
|
| | | public Image stateIcon {
|
| | | get {
|
| | | if (_stateIcon == null)
|
| | | if (m_StateIcon == null)
|
| | | {
|
| | | var _trans = transform.Find("stateIcon");
|
| | | _stateIcon = _trans != null ? _trans.GetComponent<Image>() : null;
|
| | | m_StateIcon = this.transform.GetComponent<Image>("stateIcon");
|
| | | }
|
| | | return _stateIcon;
|
| | | return m_StateIcon;
|
| | | }
|
| | | }
|
| | |
|
| | | Text _countText;
|
| | | Text m_CountText;
|
| | | public Text countText {
|
| | | get {
|
| | | if (_countText == null)
|
| | | if (m_CountText == null)
|
| | | {
|
| | | var _trans = transform.Find("CountText");
|
| | | _countText = _trans != null ? _trans.GetComponent<Text>() : null;
|
| | | m_CountText = this.transform.GetComponent<Text>("CountText");
|
| | | }
|
| | | return _countText;
|
| | | return m_CountText;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | Button _cellBtn;
|
| | | public Button cellBtn {
|
| | | Button m_Button;
|
| | | public Button button {
|
| | | get {
|
| | | if (_cellBtn == null)
|
| | | _cellBtn = this.GetComponent<Button>();
|
| | | return _cellBtn;
|
| | | if (m_Button == null)
|
| | | {
|
| | | m_Button = this.GetComponent<Button>();
|
| | | }
|
| | | return m_Button;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | public virtual void Init(ItemModel model, bool isCompare = false, int compareScore = 0)
|
| | | {
|
| | | itemConfig = model.config;
|
| | | InitUI(model.guid, model.itemId, (ulong)model.count, model.equipScore, model.isBind, model.packType, isCompare, model.useDataDict, compareScore);
|
| | | InitUI(model.guid, model.itemId, (ulong)model.count, model.equipScore, model.isAuction, model.packType, isCompare, model.useDataDict, compareScore);
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | public virtual void Init(ItemCellModel model, int compareScore = 0)
|
| | | {
|
| | | itemConfig = model.itemConfig;
|
| | | InitUI(model.guid, model.itemId, model.count, model.score, 0, model.packType, model.isCompare, model.useDataDic, compareScore);
|
| | | InitUI(model.guid, model.itemId, model.count, model.score, false, model.packType, model.isCompare, model.useDataDic, compareScore);
|
| | | }
|
| | |
|
| | | private void InitUI(string guid, int itemId, ulong count, int score, int bind, PackType type, bool isCompare, Dictionary<int, List<int>> useDataDic, int compareScore = 0)
|
| | | private void InitUI(string guid, int itemId, ulong count, int score, bool isAuction, PackType type, bool isCompare, Dictionary<int, List<int>> useDataDic, int compareScore = 0)
|
| | | {
|
| | | if (itemConfig == null) return;
|
| | |
|
| | |
| | | itemIcon.SetSprite(itemConfig.IconKey);
|
| | | bgIcon.SetItemBackGround(ItemLogicUtility.Instance.GetItemQuality(itemId, useDataDic));
|
| | |
|
| | | int i = 0;
|
| | | for (i = 0; i < starlist.transform.childCount; i++)
|
| | | for (var i = 0; i < starlist.transform.childCount; i++)
|
| | | {
|
| | | Image starIcon = starlist.transform.GetChild(i).GetComponent<Image>();
|
| | | starIcon.SetSprite("Stars_a");
|
| | | starIcon.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | bindIcon.gameObject.SetActive(bind == 1);
|
| | | auctionIcon.gameObject.SetActive(isAuction);
|
| | |
|
| | | countText.text = UIHelper.ReplaceLargeNum((double)count);
|
| | | countText.gameObject.SetActive(count > 1);
|
| | | if (count > 1)
|
| | | {
|
| | | countText.gameObject.SetActive(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | countText.gameObject.SetActive(false);
|
| | | countText.text = UIHelper.ReplaceLargeNum((double)count);
|
| | | }
|
| | |
|
| | | int compareReslut = Compare(type, itemId, score, isCompare, compareScore, guid);
|
| | |
| | | public PackType packType { get; private set; }
|
| | | public Dictionary<int, List<int>> useDataDic { get; private set; }
|
| | |
|
| | | public Dictionary<int, int> specAttrDic { get; private set; }
|
| | |
|
| | | public ItemCellModel(int itemId, bool isPreview = false, ulong count = 0, string guid = "", PackType type = PackType.Deleted, bool isCompare = false, Dictionary<int, List<int>> useDataDic = null)
|
| | | {
|
| | | specAttrDic = new Dictionary<int, int>();
|
| | | this.itemId = AdjustItemId(itemId);
|
| | | this.guid = guid;
|
| | | this.itemId = itemId;
|
| | | this.count = count;
|
| | | this.itemConfig = ItemConfig.Get(itemId);
|
| | | this.isCompare = isCompare;
|
| | | this.useDataDic = useDataDic;
|
| | | this.packType = type;
|
| | | if (CheckIsCustomItem())
|
| | | {
|
| | | this.itemId = itemConfig.EffectValueA1;
|
| | | this.itemConfig = ItemConfig.Get(this.itemId);
|
| | | }
|
| | |
|
| | | this.score = ItemLogicUtility.Instance.GetEquipScore(type, itemId, useDataDic, isPreview);
|
| | | }
|
| | |
|
| | | public bool CheckIsCustomItem()
|
| | | public ItemCellModel(int itemId)
|
| | | {
|
| | | if (itemConfig == null) return false;
|
| | | this.itemId = AdjustItemId(itemId);
|
| | | this.guid = "";
|
| | | this.count = 0;
|
| | | this.isCompare = false;
|
| | | this.useDataDic = null;
|
| | | this.packType = PackType.Deleted;
|
| | | this.score = 0;
|
| | | }
|
| | |
|
| | | if (itemConfig.Effect1 == 220)
|
| | | public ItemCellModel(int itemId, bool isPreview, ulong count)
|
| | | {
|
| | | return true;
|
| | | this.itemId = AdjustItemId(itemId);
|
| | | this.guid = "";
|
| | | this.count = count;
|
| | | this.isCompare = false;
|
| | | this.useDataDic = null;
|
| | | this.packType = PackType.Deleted;
|
| | |
|
| | | this.score = ItemLogicUtility.Instance.GetEquipScore(PackType.Deleted, itemId, null, isPreview);
|
| | | }
|
| | | return false;
|
| | |
|
| | | int AdjustItemId(int itemId)
|
| | | {
|
| | | var config = ItemConfig.Get(itemId);
|
| | | if (config != null && config.Effect1 == 220)
|
| | | {
|
| | | return config.EffectValueA1;
|
| | | }
|
| | | else
|
| | | {
|
| | | return itemId;
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
| | | m_AddEquip.gameObject.SetActive(false);
|
| | | m_ItemCell.gameObject.SetActive(true);
|
| | | m_ItemCell.Init(item);
|
| | | m_ItemCell.cellBtn.SetListener(ShowEquipTip);
|
| | | m_ItemCell.button.SetListener(ShowEquipTip);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | //pdr ToDo |
| | | ItemCellModel cellModel = new ItemCellModel(_chinItemModel.ID); |
| | | _itemCell.Init(cellModel); |
| | | _itemCell.cellBtn.RemoveAllListeners(); |
| | | _itemCell.cellBtn.onClick.AddListener(()=> |
| | | _itemCell.button.RemoveAllListeners(); |
| | | _itemCell.button.onClick.AddListener(()=> |
| | | { |
| | | ItemAttrData attrData = new ItemAttrData(_chinItemModel.ID); |
| | | itemTipsModel.SetItemTipsModel(attrData); |
| | |
| | | itemCell.gameObject.SetActive(true);
|
| | | ItemModel itemModel = _oneKeySelllist[cellCount - 1];
|
| | | itemCell.Init(itemModel,true);
|
| | | itemCell.cellBtn.onClick.RemoveAllListeners();
|
| | | itemCell.cellBtn.onClick.AddListener(()=> { OnSingleClickItemCell(itemModel,itemCell.gameObject); });
|
| | | itemCell.button.onClick.RemoveAllListeners();
|
| | | itemCell.button.onClick.AddListener(()=> { OnSingleClickItemCell(itemModel,itemCell.gameObject); });
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | if (itemModel != null && itemModel.packType == PackType.Item)
|
| | | {
|
| | | DrawItem(itemModel);
|
| | | List<int> sourcelist = itemModel.GetUseDataModel((int)ItemUseDataKey.source);
|
| | | List<int> sourcelist = itemModel.GetUseData((int)ItemUseDataKey.source);
|
| | | if (sourcelist != null
|
| | | && sourcelist[0] == 4
|
| | | && model.isGetNewItem)
|
| | |
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(rewardList[i].itemCfg.ID, true, (ulong)number);
|
| | | itemcell.Init(cellModel);
|
| | | itemcell.cellBtn.RemoveAllListeners();
|
| | | itemcell.button.RemoveAllListeners();
|
| | | int tab = i;
|
| | | itemcell.cellBtn.AddListener(() =>
|
| | | itemcell.button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(rewardList[tab].itemCfg.ID, false, (ulong)number);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | |
| | | public void Display(ItemModel _itemModel)
|
| | | {
|
| | | m_GuardItem.Init(_itemModel, true);
|
| | | m_GuardItem.cellBtn.RemoveAllListeners();
|
| | | m_GuardItem.cellBtn.AddListener(() =>
|
| | | m_GuardItem.button.RemoveAllListeners();
|
| | | m_GuardItem.button.AddListener(() =>
|
| | | {
|
| | | if (_itemModel != null)
|
| | | {
|
| | |
| | | go.transform.localPosition = pos.SetZ(0);
|
| | | ItemCellModel cellModel = new ItemCellModel(rewardList[i].itemCfg.ID, true, (ulong)rewardList[i].num);
|
| | | itemcell.Init(cellModel);
|
| | | itemcell.cellBtn.RemoveAllListeners();
|
| | | itemcell.button.RemoveAllListeners();
|
| | | int tab = i;
|
| | | itemcell.cellBtn.AddListener(() =>
|
| | | itemcell.button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(rewardList[tab].itemCfg.ID, true, (ulong)rewardList[tab].num);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | |
| | | go.transform.localPosition = pos.SetZ(0);
|
| | | ItemCellModel cellModel = new ItemCellModel(rewardList[i].itemCfg.ID, true, (ulong)rewardList[i].num);
|
| | | itemcell.Init(cellModel);
|
| | | itemcell.cellBtn.RemoveAllListeners();
|
| | | itemcell.button.RemoveAllListeners();
|
| | | int tab = i;
|
| | | itemcell.cellBtn.AddListener(() =>
|
| | | itemcell.button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(rewardList[tab].itemCfg.ID, true, (ulong)rewardList[tab].num);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | |
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(rewardList[i].itemCfg.ID, true, (ulong)number);
|
| | | itemcell.Init(cellModel);
|
| | | itemcell.cellBtn.RemoveAllListeners();
|
| | | itemcell.button.RemoveAllListeners();
|
| | | int tab = i;
|
| | | itemcell.cellBtn.AddListener(() =>
|
| | | itemcell.button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(rewardList[tab].itemCfg.ID, false, (ulong)number);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | |
| | | buyPriceText.text = storeConfig.MoneyNumber.ToString();
|
| | | ItemCellModel fireModel = new ItemCellModel(storeConfig.ItemID,true,(ulong)storeConfig.ItemCnt);
|
| | | fireItem.Init(fireModel);
|
| | | fireItem.cellBtn.AddListener(() =>
|
| | | fireItem.button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(storeConfig.ItemID,true, (ulong)storeConfig.ItemCnt);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | |
| | | NewYearFairylandCeremonyModel.AwardItem itemData = itemlist[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount);
|
| | | itemBaiscs[i].Init(cellModel);
|
| | | itemBaiscs[i].cellBtn.RemoveAllListeners();
|
| | | itemBaiscs[i].cellBtn.AddListener(() =>
|
| | | itemBaiscs[i].button.RemoveAllListeners();
|
| | | itemBaiscs[i].button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | |
| | | NewYearFairylandCeremonyModel.AwardItem itemData = list[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount);
|
| | | baiscs[i].Init(cellModel);
|
| | | baiscs[i].cellBtn.RemoveAllListeners();
|
| | | baiscs[i].cellBtn.AddListener(() =>
|
| | | baiscs[i].button.RemoveAllListeners();
|
| | | baiscs[i].button.AddListener(() =>
|
| | | {
|
| | | switch(itemData.itemId)
|
| | | {
|
| | |
| | | NewYearFairylandCeremonyModel.AwardItem itemData = itemlist[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId,true, (ulong)itemData.itemCount);
|
| | | itemBaiscs[i].Init(cellModel);
|
| | | itemBaiscs[i].cellBtn.RemoveAllListeners();
|
| | | itemBaiscs[i].cellBtn.AddListener(()=>
|
| | | itemBaiscs[i].button.RemoveAllListeners();
|
| | | itemBaiscs[i].button.AddListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | |
| | | NewYearFairylandCeremonyModel.AwardItem itemData = itemlist[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount);
|
| | | itemBaiscs[i].Init(cellModel);
|
| | | itemBaiscs[i].cellBtn.RemoveAllListeners();
|
| | | itemBaiscs[i].cellBtn.AddListener(() =>
|
| | | itemBaiscs[i].button.RemoveAllListeners();
|
| | | itemBaiscs[i].button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | |
| | | }
|
| | | for (int i = 0; i < m_Items.Length; i++)
|
| | | {
|
| | | m_Items[i].cellBtn.RemoveAllListeners();
|
| | | m_Items[i].button.RemoveAllListeners();
|
| | | if (recharge != null && i < recharge.items.Count)
|
| | | {
|
| | | var item = recharge.items[i];
|
| | | m_Items[i].gameObject.SetActive(true);
|
| | | ItemCellModel itemCellModel = new ItemCellModel(item.id, true, (ulong)item.count);
|
| | | m_Items[i].Init(itemCellModel);
|
| | | m_Items[i].cellBtn.AddListener(() =>
|
| | | m_Items[i].button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData itemAttrData = new ItemAttrData(item.id, true, (ulong)item.count);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
|
| | |
| | | var luckyItem = autoLuckyItems[index];
|
| | | ItemCellModel itemCellModel = new ItemCellModel(luckyItem.itemId,false,(ulong)luckyItem.itemCount);
|
| | | awardItem.itemBaisc.Init(itemCellModel);
|
| | | awardItem.itemBaisc.cellBtn.RemoveAllListeners();
|
| | | awardItem.itemBaisc.cellBtn.AddListener(() =>
|
| | | awardItem.itemBaisc.button.RemoveAllListeners();
|
| | | awardItem.itemBaisc.button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(luckyItem.itemId, false, (ulong)luckyItem.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | |
| | | }
|
| | | ItemCellModel model = new ItemCellModel(luckyItem.itemId,false,(ulong)luckyItem.itemCount);
|
| | | itemBaisc.Init(model);
|
| | | itemBaisc.cellBtn.RemoveAllListeners();
|
| | | itemBaisc.cellBtn.AddListener(()=>
|
| | | itemBaisc.button.RemoveAllListeners();
|
| | | itemBaisc.button.AddListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(luckyItem.itemId, false, (ulong)luckyItem.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | |
| | | var Item = weekPartyItemClass[0];
|
| | | ItemCellModel cellModel = new ItemCellModel(Item.ItemID, true, (ulong)Item.ItemCnt);
|
| | | m_ItemCell.Init(cellModel);
|
| | | m_ItemCell.cellBtn.SetListener(() =>
|
| | | m_ItemCell.button.SetListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(Item.ItemID, false, (ulong)Item.ItemCnt);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | |
| | | m_FlashSaleItems[i].gameObject.SetActive(true);
|
| | | var itemcellmodel = new ItemCellModel(item.itemId, true, (ulong)item.itemCount);
|
| | | m_FlashSaleItems[i].SetItemRare(itemcellmodel, item.isMainItem);
|
| | | m_FlashSaleItems[i].cellBtn.RemoveAllListeners();
|
| | | m_FlashSaleItems[i].cellBtn.AddListener(() =>
|
| | | m_FlashSaleItems[i].button.RemoveAllListeners();
|
| | | m_FlashSaleItems[i].button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData itemAttrData = new ItemAttrData(item.itemId, true, (ulong)item.itemCount);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
|
| | |
| | | code = rushToBuyModel.presentFlashShop.dayIndex * 1000 + rushToBuyModel.presentFlashShop.timeIndex * 100 + index;
|
| | | ItemCellModel cellModel = new ItemCellModel(saleItem.itemId,true,(ulong)saleItem.itemCount);
|
| | | itemBaisc.Init(cellModel);
|
| | | itemBaisc.cellBtn.RemoveAllListeners();
|
| | | itemBaisc.cellBtn.AddListener(()=>
|
| | | itemBaisc.button.RemoveAllListeners();
|
| | | itemBaisc.button.AddListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(saleItem.itemId,true, (ulong)saleItem.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | |
| | | var _item = _itemList[i];
|
| | | ItemCellModel _ItemData = new ItemCellModel(_item.id, false, (ulong)_item.count);
|
| | | _cell.items[i].SetItemRare(_ItemData, 5);
|
| | | _cell.items[i].cellBtn.RemoveAllListeners();
|
| | | _cell.items[i].cellBtn.AddListener(() =>
|
| | | _cell.items[i].button.RemoveAllListeners();
|
| | | _cell.items[i].button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData _itemPropertyData = new ItemAttrData(_item.id, false, (ulong)_item.count);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(_itemPropertyData);
|
| | |
| | | Item item = list[0];
|
| | | ItemCellModel cellModel = new ItemCellModel(item.id, true, (ulong)item.count);
|
| | | m_ItemCell.Init(cellModel);
|
| | | m_ItemCell.cellBtn.RemoveAllListeners();
|
| | | m_ItemCell.cellBtn.AddListener(() =>
|
| | | m_ItemCell.button.RemoveAllListeners();
|
| | | m_ItemCell.button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | |
| | | awardCell.itemBaisc.gameObject.SetActive(true);
|
| | | ItemCellModel itemCellModel = new ItemCellModel(treasureItem.itemId,false,(ulong)treasureItem.itemCount);
|
| | | awardCell.itemBaisc.Init(itemCellModel);
|
| | | awardCell.itemBaisc.cellBtn.RemoveAllListeners();
|
| | | awardCell.itemBaisc.cellBtn.AddListener(() =>
|
| | | awardCell.itemBaisc.button.RemoveAllListeners();
|
| | | awardCell.itemBaisc.button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(treasureItem.itemId, false, (ulong)treasureItem.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | |
| | | }
|
| | | ItemCellModel itemCellModel = new ItemCellModel(luckyItem.itemId);
|
| | | luckAward_Item.Init(itemCellModel);
|
| | | luckAward_Item.cellBtn.RemoveAllListeners();
|
| | | luckAward_Item.cellBtn.AddListener(() =>
|
| | | luckAward_Item.button.RemoveAllListeners();
|
| | | luckAward_Item.button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(luckyItem.itemId);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | |
| | | itemBaisc.gameObject.SetActive(true);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemInfo.itemId,false, (ulong)itemInfo.count);
|
| | | itemBaisc.Init(cellModel);
|
| | | itemBaisc.cellBtn.RemoveAllListeners();
|
| | | itemBaisc.cellBtn.AddListener(()=>
|
| | | itemBaisc.button.RemoveAllListeners();
|
| | | itemBaisc.button.AddListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemInfo.itemId, false, (ulong)itemInfo.count );
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | |
| | | for (int i = 0; i < m_Items.Length; i++)
|
| | | {
|
| | | var _index = i;
|
| | | m_Items[i].cellBtn.onClick.AddListener(() =>
|
| | | m_Items[i].button.onClick.AddListener(() =>
|
| | | {
|
| | | OnItemClick(_index);
|
| | | });
|
| | |
| | | var Item = WeekPartyAction.WeekPartyItem[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(Item.ItemID, true, (ulong)Item.ItemCnt);
|
| | | itemCell.Init(cellModel);
|
| | | itemCell.cellBtn.SetListener(() =>
|
| | | itemCell.button.SetListener(() =>
|
| | | {
|
| | | var attrData = new ItemAttrData(Item.ItemID, false, (ulong)Item.ItemCnt);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | |
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(wellItem.itemId,false,(ulong)wellItem.itemCount);
|
| | | itemBaisc.Init(cellModel);
|
| | | itemBaisc.cellBtn.RemoveAllListeners();
|
| | | itemBaisc.cellBtn.AddListener(()=>
|
| | | itemBaisc.button.RemoveAllListeners();
|
| | | itemBaisc.button.AddListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(wellItem.itemId, true, (ulong)wellItem.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | |
| | | Item item = list[i]; |
| | | ItemCellModel cellModel = new ItemCellModel(item.id, true, (ulong)item.count); |
| | | itemCell.Init(cellModel); |
| | | itemCell.cellBtn.RemoveAllListeners(); |
| | | itemCell.cellBtn.AddListener(() => |
| | | itemCell.button.RemoveAllListeners(); |
| | | itemCell.button.AddListener(() => |
| | | { |
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count); |
| | | itemTipsModel.SetItemTipsModel(attrData); |
| | |
| | | var Item = SpringFestival.WeekPartyItem[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(Item.ItemID, true, (ulong)Item.ItemCnt);
|
| | | itemCell.Init(cellModel);
|
| | | itemCell.cellBtn.SetListener(() =>
|
| | | itemCell.button.SetListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(Item.ItemID, false, (ulong)Item.ItemCnt);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | |
| | | for (int i = 0; i < m_Items.Length; i++)
|
| | | {
|
| | | var _index = i;
|
| | | m_Items[i].cellBtn.onClick.AddListener(() =>
|
| | | m_Items[i].button.onClick.AddListener(() =>
|
| | | {
|
| | | OnItemClick(_index);
|
| | | });
|
| | |
| | | {
|
| | | poolItem.bestImg.SetSprite(rareIconKey);
|
| | | }
|
| | | poolItem.itemBaisc.cellBtn.RemoveAllListeners();
|
| | | poolItem.itemBaisc.cellBtn.AddListener(()=>
|
| | | poolItem.itemBaisc.button.RemoveAllListeners();
|
| | | poolItem.itemBaisc.button.AddListener(()=>
|
| | | {
|
| | | var attrData = new ItemAttrData(info.itemId,true, (ulong)info.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | |
| | | nameText.color = UIHelper.GetUIColor(itemConfig.ItemColor);
|
| | | ItemCellModel cellModel = new ItemCellModel(wellItem.itemId, false, (ulong)wellItem.itemCount);
|
| | | itemBaisc.Init(cellModel);
|
| | | itemBaisc.cellBtn.RemoveAllListeners();
|
| | | itemBaisc.cellBtn.AddListener(() =>
|
| | | itemBaisc.button.RemoveAllListeners();
|
| | | itemBaisc.button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(wellItem.itemId, true, (ulong)wellItem.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | |
| | | {
|
| | | awardItem.bestIcon.SetSprite(rareIconKey);
|
| | | }
|
| | | awardItem.itemBaisc.cellBtn.RemoveAllListeners();
|
| | | awardItem.itemBaisc.cellBtn.AddListener(() =>
|
| | | awardItem.itemBaisc.button.RemoveAllListeners();
|
| | | awardItem.itemBaisc.button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData((int)wellItem.itemId, true , (ulong)wellItem.itemCount);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | |
| | | for (int i = 0; i < m_Items.Length; i++)
|
| | | {
|
| | | var index = i;
|
| | | m_Items[i].cellBtn.onClick.AddListener(() =>
|
| | | m_Items[i].button.onClick.AddListener(() =>
|
| | | {
|
| | | OnSelectItem(index);
|
| | | });
|
| | |
| | | itemCell.countText.text = StringUtility.Contact(UIHelper.AppendColor(TextColType.Red,0.ToString()),
|
| | | "/", 1);
|
| | | }
|
| | | itemCell.cellBtn.RemoveAllListeners();
|
| | | itemCell.cellBtn.AddListener(()=>
|
| | | itemCell.button.RemoveAllListeners();
|
| | | itemCell.button.AddListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(renameToolId);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | |
| | | for (int i = 0; i < roleEquipList.Count; i++)
|
| | | {
|
| | | RoleEquipType roleEquipType = roleEquipList[i].type;
|
| | | roleEquipList[i].itemCell.cellBtn.onClick.AddListener(() =>
|
| | | roleEquipList[i].itemCell.button.onClick.AddListener(() =>
|
| | | {
|
| | | OnRoleEquipClick(roleEquipType);
|
| | | });
|
| | |
| | | ItemCellModel cellModel = new ItemCellModel(itemId, true, (ulong)count);
|
| | | m_Item.Init(cellModel);
|
| | |
|
| | | m_Item.cellBtn.RemoveAllListeners();
|
| | | m_Item.cellBtn.AddListener(() =>
|
| | | m_Item.button.RemoveAllListeners();
|
| | | m_Item.button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData itemAttrData = new ItemAttrData(itemId, true);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
|
| | |
| | | {
|
| | | ItemCellModel ItemModel = new ItemCellModel(itemModel[i].itemId, true, 0);//默认显示不上锁
|
| | | m_ItemCell.Init(ItemModel);
|
| | | m_ItemCell.cellBtn.RemoveAllListeners();
|
| | | m_ItemCell.button.RemoveAllListeners();
|
| | | int type = i;
|
| | | m_ItemCell.cellBtn.AddListener(() =>
|
| | | m_ItemCell.button.AddListener(() =>
|
| | | {
|
| | | itemTipsModel.SetItemTipsModel(PackType.DogzEquip, itemModel[type].guid);
|
| | | });
|
| | |
| | | }
|
| | | GainProficiency();//获取熟练度
|
| | | m_BottomBox.SetActive(true);
|
| | | var IudetDogzEquipPlus = m_DogZItemModel.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);
|
| | | var IudetDogzEquipPlus = m_DogZItemModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus);
|
| | | if (IudetDogzEquipPlus != null)
|
| | | {
|
| | | int lv = godBeastModel.QualityLimit[m_DogZItemModel.config.ItemColor];
|
| | |
| | | {
|
| | | if (itemModel.config.Effect1 == 235)
|
| | | {
|
| | | var IudetDogzEquipPlus = itemModel.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);
|
| | | var IudetDogzEquipPlus = itemModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus);
|
| | | SingleProficiency += itemModel.config.EffectValueA1 * DicAb[key];
|
| | | if (IudetDogzEquipPlus != null)
|
| | | {
|
| | |
| | | return DogzLv;
|
| | | }
|
| | | int lv = godBeastModel.QualityLimit[m_DogZItemModel.config.ItemColor];
|
| | | var IudetDogzEquipPlus = m_DogZItemModel.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);
|
| | | var IudetDogzEquipPlus = m_DogZItemModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus);
|
| | | if (IudetDogzEquipPlus != null && IudetDogzEquipPlus.Count > 1)
|
| | | {
|
| | | ToExpTotal += IudetDogzEquipPlus[1];
|
| | |
| | | return;
|
| | | }
|
| | | m_DogZItemModel = ItemModel;
|
| | | var IudetDogzEquipPlus = ItemModel.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);
|
| | | var IudetDogzEquipPlus = ItemModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus);
|
| | | if (IudetDogzEquipPlus != null && IudetDogzEquipPlus.Count > 1)
|
| | | {
|
| | | DogZLv = IudetDogzEquipPlus[0];
|
| | |
| | | ItemModel itemModel = playerPack.GetItemByIndex(PackType.DogzItem, Index);
|
| | | m_ItemCell.Init(itemModel);
|
| | | m_ItemCell.countText.gameObject.SetActive(false);
|
| | | m_ItemCell.bindIcon.gameObject.SetActive(false);
|
| | | var IudetDogzEquipPlus = itemModel.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);// 神兽装备强化信息列表 [强化等级, 强化熟练度]
|
| | | m_ItemCell.auctionIcon.gameObject.SetActive(false);
|
| | | var IudetDogzEquipPlus = itemModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus);// 神兽装备强化信息列表 [强化等级, 强化熟练度]
|
| | | TextNumber.gameObject.SetActive(false);
|
| | | if (IudetDogzEquipPlus != null)
|
| | | {
|
| | |
| | | }
|
| | | m_itemCell.Init(ItemModel);
|
| | | var itemConfig = ItemConfig.Get(itemModel[i].itemId);
|
| | | var IudetDogzEquipPlus = itemModel[i].GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);// 神兽装备强化信息列表 [强化等级, 强化熟练度]
|
| | | var IudetDogzEquipPlus = itemModel[i].GetUseData((int)ItemUseDataKey.dogzEquipPlus);// 神兽装备强化信息列表 [强化等级, 强化熟练度]
|
| | | m_Item_Text.color = UIHelper.GetUIColor(itemConfig.ItemColor);
|
| | | if (IudetDogzEquipPlus != null && IudetDogzEquipPlus[0] > 0)
|
| | | {
|
| | |
| | | for (int i = 0; i < itemModel.Count; i++)
|
| | | {
|
| | | ItemModel item = itemModel[i];
|
| | | var IudetDogzEquipPlus = item.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);
|
| | | var IudetDogzEquipPlus = item.GetUseData((int)ItemUseDataKey.dogzEquipPlus);
|
| | | if (IudetDogzEquipPlus != null)
|
| | | {
|
| | | int lv = IudetDogzEquipPlus[0];
|
| | |
| | | {
|
| | | return SiteEnhancementAttributeDic;
|
| | | }
|
| | | var IudetDogzEquipPlus = item.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);
|
| | | var IudetDogzEquipPlus = item.GetUseData((int)ItemUseDataKey.dogzEquipPlus);
|
| | | if (IudetDogzEquipPlus != null && IudetDogzEquipPlus[0] > 0)
|
| | | {
|
| | | var DogzEquipConfig = DogzEquipPlusConfig.GetEquipplaceAndLevel(item.config.EquipPlace, IudetDogzEquipPlus[0]);
|
| | |
| | | }
|
| | | int lv = QualityLimit[itemModel.config.ItemColor];//获取最大强化等级
|
| | | var DogzEquipMaxConfig = DogzEquipPlusConfig.GetEquipplaceAndLevel(itemModel.config.EquipPlace, lv);
|
| | | var IudetDogzEquipPlus = itemModel.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);
|
| | | var IudetDogzEquipPlus = itemModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus);
|
| | |
|
| | | if (IudetDogzEquipPlus != null)
|
| | | {
|
| | |
| | | {
|
| | | if (item_Model.config.Effect1 == 235)
|
| | | {
|
| | | var _IudetDogzEquipPlus = item_Model.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);
|
| | | var _IudetDogzEquipPlus = item_Model.GetUseData((int)ItemUseDataKey.dogzEquipPlus);
|
| | | SingleProficiency += item_Model.config.EffectValueA1 * Absorption_Dic[key];
|
| | | if (_IudetDogzEquipPlus != null)
|
| | | {
|
| | |
| | |
|
| | | private int GetLV(ItemModel _ItemModel)
|
| | | {
|
| | | var IudetDogzEquipPlus = _ItemModel.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);
|
| | | var IudetDogzEquipPlus = _ItemModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus);
|
| | | if (IudetDogzEquipPlus != null)
|
| | | {
|
| | | return IudetDogzEquipPlus[0];
|
| | |
| | | }
|
| | | private int GetProficiency(ItemModel _ItemModel)
|
| | | {
|
| | | var IudetDogzEquipPlus = _ItemModel.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);
|
| | | var IudetDogzEquipPlus = _ItemModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus);
|
| | | if (IudetDogzEquipPlus != null)
|
| | | {
|
| | | return IudetDogzEquipPlus[1];
|
| | |
| | | {
|
| | | ItemColor = itemModel[i].config.ItemColor;
|
| | | }
|
| | | var IudetDogzEquipPlus = itemModel[i].GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);// 神兽装备强化信息列表 [强化等级, 强化熟练度]
|
| | | var IudetDogzEquipPlus = itemModel[i].GetUseData((int)ItemUseDataKey.dogzEquipPlus);// 神兽装备强化信息列表 [强化等级, 强化熟练度]
|
| | | if (IudetDogzEquipPlus == null)//判断是否都满级 满级不可亮红点
|
| | | {
|
| | | Istrue = true;
|
| | |
| | | {
|
| | | ItemModel _itemModel = playerPack.GetItemByIndex(PackType.DogzEquip, RedPointLIst[i]);
|
| | | int MaxLv= QualityLimit[_itemModel.config.ItemColor];//获取最大强化等级
|
| | | var _IudetDogzEquipPlus = _itemModel.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);
|
| | | var _IudetDogzEquipPlus = _itemModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus);
|
| | | if (_IudetDogzEquipPlus != null)
|
| | | {
|
| | | if (_IudetDogzEquipPlus[0]<MaxLv && _IudetDogzEquipPlus[0] < Lv)
|
| | |
| | | godBeastClass.EquipScore = itemModel[i].equipScore;
|
| | | godBeastClass.ItemPlace = itemModel[i].gridIndex;
|
| | | godBeastClass.GodBeastId = key;
|
| | | var IudetDogzEquipPlus = itemModel[i].GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);// 神兽装备强化信息列表 [强化等级, 强化熟练度]
|
| | | var IudetDogzEquipPlus = itemModel[i].GetUseData((int)ItemUseDataKey.dogzEquipPlus);// 神兽装备强化信息列表 [强化等级, 强化熟练度]
|
| | | if (IudetDogzEquipPlus == null)
|
| | | {
|
| | | godBeastClass.GodBeastLv = 0;
|
| | |
| | | godBeastBagClass.EquipScore = itemModel.equipScore;
|
| | | godBeastBagClass.Part = itemModel.config.EquipPlace;
|
| | | godBeastBagClass.Count = itemModel.count;
|
| | | var IudetDogzEquipPlus = itemModel.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);// 神兽装备强化信息列表 [强化等级, 强化熟练度]
|
| | | var IudetDogzEquipPlus = itemModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus);// 神兽装备强化信息列表 [强化等级, 强化熟练度]
|
| | | if (IudetDogzEquipPlus == null)
|
| | | {
|
| | | godBeastBagClass.LV = 0;
|
| | |
| | | { |
| | | itemBaisc.gameObject.SetActive(true); |
| | | itemBaisc.Init(itemModel); |
| | | itemBaisc.cellBtn.RemoveAllListeners(); |
| | | itemBaisc.cellBtn.AddListener(()=> |
| | | itemBaisc.button.RemoveAllListeners(); |
| | | itemBaisc.button.AddListener(()=> |
| | | { |
| | | tipsModel.SetItemTipsModel(PackType.Equip,itemModel.guid); |
| | | }); |
| | |
| | | return false; |
| | | } |
| | | ItemModel itemModel = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Wing); |
| | | if (itemModel.GetUseDataModel((int)ItemUseDataKey.wingProgressValue) != null) |
| | | if (itemModel.GetUseData((int)ItemUseDataKey.wingProgressValue) != null) |
| | | { |
| | | int currentRefining = 0; |
| | | int currentReAll = 0; |
| | | currentRefining = itemModel.GetUseDataModel((int)ItemUseDataKey.wingProgressValue)[0];//当前精炼度 |
| | | currentRefining = itemModel.GetUseData((int)ItemUseDataKey.wingProgressValue)[0];//当前精炼度 |
| | | if (tegWing.Count <= 0) |
| | | { |
| | | tegWing = WingRefineAttrConfig.GetValues(); |
| | |
| | | _WingButton.Icon.SetSprite(tagItem.IconKey);
|
| | | _WingButton.WingsText.text = UIHelper.AppendColor((TextColType)color, tagItem.ItemName, true);
|
| | | int _currentRefining = 0;//当前精炼度
|
| | | if (WingDic[Index].GetUseDataModel(42) != null)
|
| | | _currentRefining = WingDic[Index].GetUseDataModel(42)[0];
|
| | | if (WingDic[Index].GetUseData(42) != null)
|
| | | _currentRefining = WingDic[Index].GetUseData(42)[0];
|
| | |
|
| | | foreach (var config in refineAttrConfigs)
|
| | | {
|
| | |
| | | SinglePack singlePackModel = packModel.GetSinglePack(PackType.Item); |
| | | Dictionary<int, ItemModel> backpack_dic = singlePackModel.GetAllItems(); |
| | | |
| | | List<int> wingsRefinelist = itemModel.GetUseDataModel((int)ItemUseDataKey.wingProgressValue); |
| | | List<int> wingsRefinelist = itemModel.GetUseData((int)ItemUseDataKey.wingProgressValue); |
| | | if (wingsRefinelist != null) |
| | | { |
| | | var config = WingRefineExpConfig.Get((int)itemModel.itemId); |
| | |
| | | foreach (var key in _DevourDIc.Keys)
|
| | | {
|
| | | var wingConfig = WingRefineExpConfig.Get(_wingItemDic[key]);
|
| | | if (WingDic[key].GetUseDataModel((int)ItemUseDataKey.wingProgressValue) != null || WingDic[key].GetUseDataModel((int)ItemUseDataKey.wingMaterialItemID) != null)
|
| | | if (WingDic[key].GetUseData((int)ItemUseDataKey.wingProgressValue) != null || WingDic[key].GetUseData((int)ItemUseDataKey.wingMaterialItemID) != null)
|
| | | {
|
| | |
|
| | | Min += wingConfig.EXPlower + GetWingRefiningValue(WingDic[key]); ;
|
| | |
| | | {
|
| | | dicWingUseDateValue.Clear();
|
| | | int GetUseDateValue = 0;
|
| | | if (ItemModel.GetUseDataModel((int)ItemUseDataKey.wingMaterialItemID) != null
|
| | | || ItemModel.GetUseDataModel((int)ItemUseDataKey.wingMaterialItemCount) != null)
|
| | | if (ItemModel.GetUseData((int)ItemUseDataKey.wingMaterialItemID) != null
|
| | | || ItemModel.GetUseData((int)ItemUseDataKey.wingMaterialItemCount) != null)
|
| | | {
|
| | | for (int i = 0; i < ItemModel.GetUseDataModel((int)ItemUseDataKey.wingMaterialItemID).Count; i++)
|
| | | for (int i = 0; i < ItemModel.GetUseData((int)ItemUseDataKey.wingMaterialItemID).Count; i++)
|
| | | {
|
| | | dicWingUseDateValue.Add(ItemModel.GetUseDataModel((int)ItemUseDataKey.wingMaterialItemID)[i], ItemModel.GetUseDataModel((int)ItemUseDataKey.wingMaterialItemCount)[i]);
|
| | | dicWingUseDateValue.Add(ItemModel.GetUseData((int)ItemUseDataKey.wingMaterialItemID)[i], ItemModel.GetUseData((int)ItemUseDataKey.wingMaterialItemCount)[i]);
|
| | | }
|
| | | }
|
| | | if (ItemModel.GetUseDataModel((int)ItemUseDataKey.wingProgressValue) != null)
|
| | | if (ItemModel.GetUseData((int)ItemUseDataKey.wingProgressValue) != null)
|
| | | {
|
| | | GetUseDateValue += ItemModel.GetUseDataModel((int)ItemUseDataKey.wingProgressValue)[0];
|
| | | GetUseDateValue += ItemModel.GetUseData((int)ItemUseDataKey.wingProgressValue)[0];
|
| | | }
|
| | | int WingLv1 = ItemModel.config.LV;
|
| | | foreach (var key in dicWingUseDateValue.Keys)
|
| | |
| | |
|
| | | ItemModel itemModel = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | |
|
| | | if (itemModel.GetUseDataModel((int)ItemUseDataKey.wingProgressValue) != null)
|
| | | if (itemModel.GetUseData((int)ItemUseDataKey.wingProgressValue) != null)
|
| | | {
|
| | | _currentRefining = itemModel.GetUseDataModel((int)ItemUseDataKey.wingProgressValue)[0];//当前精炼度
|
| | | _currentRefining = itemModel.GetUseData((int)ItemUseDataKey.wingProgressValue)[0];//当前精炼度
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | return 0;
|
| | | }
|
| | | var wingConfig = WingRefineExpConfig.Get(_wingItemDic[Index]);
|
| | | if (WingDic[Index].GetUseDataModel((int)ItemUseDataKey.wingProgressValue) != null || WingDic[Index].GetUseDataModel((int)ItemUseDataKey.wingMaterialItemID) != null)
|
| | | if (WingDic[Index].GetUseData((int)ItemUseDataKey.wingProgressValue) != null || WingDic[Index].GetUseData((int)ItemUseDataKey.wingMaterialItemID) != null)
|
| | | {
|
| | | Max = wingConfig.EXPupper + GetWingRefiningValue(WingDic[Index]);
|
| | | }
|
| | |
| | | itemBaisc.countText.text = ConfirmCancel.iconHaveCnt.ToString();
|
| | | }
|
| | |
|
| | | itemBaisc.cellBtn.RemoveAllListeners();
|
| | | itemBaisc.cellBtn.AddListener(() =>
|
| | | itemBaisc.button.RemoveAllListeners();
|
| | | itemBaisc.button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(ConfirmCancel.iconItemId);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | |
| | | for (int i = 0; i < m_Items.Length; i++)
|
| | | {
|
| | | m_Items[i].gameObject.SetActive(special.items != null && i < special.items.Count);
|
| | | m_Items[i].cellBtn.RemoveAllListeners();
|
| | | m_Items[i].button.RemoveAllListeners();
|
| | | if (special.items != null && i < special.items.Count)
|
| | | {
|
| | | var award = special.items[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(award.id, true, (ulong)award.count);
|
| | | m_Items[i].Init(cellModel);
|
| | | m_Items[i].cellBtn.AddListener(() =>
|
| | | m_Items[i].button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(award.id, true, (ulong)award.count);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(attrData);
|
| | |
| | | float value = 0;
|
| | | if (ContainsProperty(itemConfig, 6, out value))
|
| | | {
|
| | | if (itemModel.GetUseDataModel(42) != null)
|
| | | if (itemModel.GetUseData(42) != null)
|
| | | {
|
| | | value += strengthengmodel.BackpackWings(itemModel.itemId, itemModel.GetUseDataModel(42)[0])[1];
|
| | | value += strengthengmodel.BackpackWings(itemModel.itemId, itemModel.GetUseData(42)[0])[1];
|
| | | }
|
| | | }
|
| | | properties[0].gameObject.SetActive(true);
|
| | |
| | | float value = 0;
|
| | | if (ContainsProperty(itemConfig, 6, out value))
|
| | | {
|
| | | if (itemModel.GetUseDataModel(42) != null)
|
| | | if (itemModel.GetUseData(42) != null)
|
| | | {
|
| | | value += strengthengmodel.BackpackWings(itemModel.itemId, itemModel.GetUseDataModel(42)[0])[1];
|
| | | value += strengthengmodel.BackpackWings(itemModel.itemId, itemModel.GetUseData(42)[0])[1];
|
| | | }
|
| | | }
|
| | | m_PreviewPropretys[0].gameObject.SetActive(true);
|
| | |
| | | UI3DModelExhibition.Instance.ShowEquipment(config.ChangeOrd, _angle, _rawImage);
|
| | | ItemCellModel ItemModel = new ItemCellModel(_weaponId,true,0);
|
| | | m_ItemCell.Init(ItemModel);
|
| | | m_ItemCell.cellBtn.RemoveAllListeners();
|
| | | m_ItemCell.cellBtn.AddListener(()=> |
| | | m_ItemCell.button.RemoveAllListeners();
|
| | | m_ItemCell.button.AddListener(()=> |
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(_weaponId,false,1);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | |
| | | for (int i = 0; i < m_Items.Length; i++)
|
| | | {
|
| | | var _index = i;
|
| | | m_Items[i].cellBtn.onClick.AddListener(() =>
|
| | | m_Items[i].button.onClick.AddListener(() =>
|
| | | {
|
| | | OnItemClick(_index);
|
| | | });
|
| | |
| | | var Item = ItemConfig.Get(items[type].itemId);
|
| | | ItemCellModel cellModel = new ItemCellModel(items[type].itemId, true, (ulong)items[type].itemCount);
|
| | | ItemCell.Init(cellModel);
|
| | | ItemCell.cellBtn.RemoveAllListeners();
|
| | | ItemCell.cellBtn.AddListener(() =>
|
| | | ItemCell.button.RemoveAllListeners();
|
| | | ItemCell.button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(items[type].itemId, false, (ulong)items[type].itemCount);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | |
| | | case 0:
|
| | | m_ItemCell_One.gameObject.SetActive(true);
|
| | | m_ItemCell_One.Init(cellModel);
|
| | | m_ItemCell_One.cellBtn.RemoveAllListeners();
|
| | | m_ItemCell_One.cellBtn.AddListener(() =>
|
| | | m_ItemCell_One.button.RemoveAllListeners();
|
| | | m_ItemCell_One.button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | |
| | | case 1:
|
| | | m_ItemCell_Two.gameObject.SetActive(true);
|
| | | m_ItemCell_Two.Init(cellModel);
|
| | | m_ItemCell_Two.cellBtn.RemoveAllListeners();
|
| | | m_ItemCell_Two.cellBtn.AddListener(() =>
|
| | | m_ItemCell_Two.button.RemoveAllListeners();
|
| | | m_ItemCell_Two.button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | |
| | | case 2:
|
| | | m_ItemCell_Three.gameObject.SetActive(true);
|
| | | m_ItemCell_Three.Init(cellModel);
|
| | | m_ItemCell_Three.cellBtn.RemoveAllListeners();
|
| | | m_ItemCell_Three.cellBtn.AddListener(() =>
|
| | | m_ItemCell_Three.button.RemoveAllListeners();
|
| | | m_ItemCell_Three.button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(item.id, false, (ulong)item.count);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | |
| | | for (int i = 0; i < m_Items.Length; i++)
|
| | | {
|
| | | var _index = i;
|
| | | m_Items[i].cellBtn.onClick.AddListener(() =>
|
| | | m_Items[i].button.onClick.AddListener(() =>
|
| | | {
|
| | | OnItemClick(_index);
|
| | | });
|
| | |
| | | InvestReward reward = rewardlist[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(reward.id, false, reward.count);
|
| | | itemBaisc.Init(cellModel);
|
| | | itemBaisc.cellBtn.RemoveAllListeners();
|
| | | itemBaisc.cellBtn.AddListener(() =>
|
| | | itemBaisc.button.RemoveAllListeners();
|
| | | itemBaisc.button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(reward.id, false, reward.count);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | |
| | | {
|
| | | ItemCellModel cellModel = new ItemCellModel(award.id, false, (ulong)award.count);
|
| | | m_Items[index].Init(cellModel);
|
| | | m_Items[index].cellBtn.RemoveAllListeners();
|
| | | m_Items[index].cellBtn.AddListener(() =>
|
| | | m_Items[index].button.RemoveAllListeners();
|
| | | m_Items[index].button.AddListener(() =>
|
| | | {
|
| | | TreasureEffectModel effectModel = ModelCenter.Instance.GetModel<TreasureEffectModel>();
|
| | | ItemConfig itemConfig = ItemConfig.Get(award.id);
|
| | |
| | | m_RebateItems[i].gameObject.SetActive(true);
|
| | | ItemCellModel itemCell = new ItemCellModel(itemDate.itemId, true, (ulong)itemDate.count);
|
| | | m_RebateItems[i].Init(itemCell);
|
| | | m_RebateItems[i].cellBtn.RemoveAllListeners();
|
| | | m_RebateItems[i].cellBtn.AddListener(() =>
|
| | | m_RebateItems[i].button.RemoveAllListeners();
|
| | | m_RebateItems[i].button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData itemAttrData = new ItemAttrData(itemDate.itemId, true, (ulong)itemDate.count);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
|
| | |
| | | ItemCellModel cellModel = new ItemCellModel((int)itemModel.ItemID,false ,(ulong)itemModel.Count, "",PackType.Deleted,
|
| | | false,ConfigParse.Analysis(itemModel.UserData));
|
| | | itemBaiscs[i].Init(cellModel);
|
| | | itemBaiscs[i].cellBtn.RemoveAllListeners();
|
| | | itemBaiscs[i].cellBtn.AddListener(()=>
|
| | | itemBaiscs[i].button.RemoveAllListeners();
|
| | | itemBaiscs[i].button.AddListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData((int)itemModel.ItemID, false
|
| | | , (ulong)itemModel.Count,-1,false, PackType.Deleted,
|
| | |
| | | var _item = _items[i];
|
| | | ItemCellModel _ItemData = new ItemCellModel(_item.id, false, (ulong)_item.count);
|
| | | _cell.items[i].Init(_ItemData);
|
| | | _cell.items[i].cellBtn.RemoveAllListeners();
|
| | | _cell.items[i].cellBtn.AddListener(() =>
|
| | | _cell.items[i].button.RemoveAllListeners();
|
| | | _cell.items[i].button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData _itemPropertyData = new ItemAttrData(_item.id, false, (ulong)_item.count);
|
| | | 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);
|
| | | _cell.vipItem.Init(_vipDate);
|
| | | _cell.vipItem.cellBtn.RemoveAllListeners();
|
| | | _cell.vipItem.cellBtn.AddListener(() =>
|
| | | _cell.vipItem.button.RemoveAllListeners();
|
| | | _cell.vipItem.button.AddListener(() =>
|
| | | {
|
| | | ItemAttrData _itemPropertyData = new ItemAttrData(_vipAward.item.id, false, (ulong)_vipAward.item.count);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(_itemPropertyData);
|
| | |
| | | var dict = singlePack.GetAllItems();
|
| | | foreach (var model in dict.Values)
|
| | | {
|
| | | var legendIds = model.GetUseDataModel((int)ItemUseDataKey.legendAttrID);
|
| | | var legendValues = model.GetUseDataModel((int)ItemUseDataKey.legendAttrValue);
|
| | | var legendIds = model.GetUseData((int)ItemUseDataKey.legendAttrID);
|
| | | var legendValues = model.GetUseData((int)ItemUseDataKey.legendAttrValue);
|
| | | if (legendIds != null && legendValues != null)
|
| | | {
|
| | | for(int i = 0; i < legendIds.Count; i++)
|