| | |
| | | }
|
| | | return false;
|
| | | }
|
| | | if (_itemModel.itemInfo.IsBind > 0)
|
| | | if (_itemModel.isBind > 0)
|
| | | {
|
| | | if (_showTip)
|
| | | {
|
| | |
| | | }
|
| | | return false;
|
| | | }
|
| | | if (_itemModel.itemInfo.IsSuite > 0)
|
| | | if (_itemModel.isSuite > 0)
|
| | | {
|
| | | if (_showTip)
|
| | | {
|
| | |
| | | for (int i = 0; i < items.Count; i++)
|
| | | {
|
| | | indexs.Add(items[i].itemPlace);
|
| | | nums.Add(items[i].itemInfo.ItemCount);
|
| | | if (items[i].itemInfo.IsBind == 0)
|
| | | nums.Add(items[i].count);
|
| | | if (items[i].isBind == 0)
|
| | | {
|
| | | nobindNums += items[i].itemInfo.ItemCount;
|
| | | nobindNums += items[i].count;
|
| | | }
|
| | | }
|
| | | if (nobindNums > 0)
|
| | |
| | |
|
| | | for (int i = 0; i < itemModels.Count; i++)
|
| | | {
|
| | | string key = StringUtility.Contact(itemModels[i].itemId, "IsBind", itemModels[i].itemInfo.IsBind);
|
| | | string key = StringUtility.Contact(itemModels[i].itemId, "IsBind", itemModels[i].isBind);
|
| | | if (!lookRecycleDict.ContainsKey(key))
|
| | | {
|
| | | List<ItemModel> modellist = new List<ItemModel>();
|
| | | modellist.Add(itemModels[i]);
|
| | | lookRecycleDict.Add(key, modellist);
|
| | | if (itemModels[i].itemInfo.IsBind == 1)
|
| | | if (itemModels[i].isBind == 1)
|
| | | {
|
| | | AddSelectRecycleDan(itemModels[i]);
|
| | | }
|
| | |
| | |
|
| | | private int CompareByDanBindAndLv(ItemModel start, ItemModel end)
|
| | | {
|
| | | bool isBindStart = start.itemInfo.IsBind == 1 ? true : false;
|
| | | bool isBindEnd = end.itemInfo.IsBind == 1 ? true : false;
|
| | | bool isBindStart = start.isBind == 1 ? true : false;
|
| | | bool isBindEnd = end.isBind == 1 ? true : false;
|
| | | if (isBindStart.CompareTo(isBindEnd) != 0) return -isBindStart.CompareTo(isBindEnd);
|
| | |
|
| | | int startLv = start.config.LV;
|
| | |
| | | public event Action RefreshSelectRecycleAct;
|
| | | public void AddSelectRecycleDan(ItemModel itemModel)
|
| | | {
|
| | | string key = StringUtility.Contact(itemModel.itemId, "IsBind", itemModel.itemInfo.IsBind);
|
| | | string key = StringUtility.Contact(itemModel.itemId, "IsBind", itemModel.isBind);
|
| | | if (!recycleStrlist.Contains(key))
|
| | | {
|
| | | recycleStrlist.Add(key);
|
| | |
| | |
|
| | | public void RemoveSelectRecycleDan(ItemModel itemModel)
|
| | | {
|
| | | string key = StringUtility.Contact(itemModel.itemId, "IsBind", itemModel.itemInfo.IsBind);
|
| | | string key = StringUtility.Contact(itemModel.itemId, "IsBind", itemModel.isBind);
|
| | | if (recycleStrlist.Contains(key))
|
| | | {
|
| | | recycleStrlist.Remove(key);
|
| | |
| | | for (int i = 0; i < itemModels.Count; i++)
|
| | | {
|
| | | AttrFruitConfig fruitConfig = AttrFruitConfig.Get(itemModels[i].itemId);
|
| | | money = money + fruitConfig.RecycleExp * itemModels[i].itemInfo.ItemCount;
|
| | | money = money + fruitConfig.RecycleExp * itemModels[i].count;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | for (int j = 0; j < modellist.Count; j++)
|
| | | {
|
| | | sumCnt += modellist[j].itemInfo.ItemCount;
|
| | | if (modellist[j].itemInfo.IsBind == 0)
|
| | | sumCnt += modellist[j].count;
|
| | | if (modellist[j].isBind == 0)
|
| | | {
|
| | | unBindCnt += modellist[j].itemInfo.ItemCount;
|
| | | unBindCnt += modellist[j].count;
|
| | | }
|
| | |
|
| | | if (playerPack.CheckIsDrugById(modellist[j].itemId))
|
| | | {
|
| | | AttrFruitConfig fruitConfig = AttrFruitConfig.Get(modellist[j].itemId);
|
| | | getMoney = getMoney + fruitConfig.RecycleExp * modellist[j].itemInfo.ItemCount;
|
| | | getMoney = getMoney + fruitConfig.RecycleExp * modellist[j].count;
|
| | | }
|
| | |
|
| | | if (!recycleDanDict.ContainsKey(modellist[j].itemPlace))
|
| | | {
|
| | | recycleDanDict.Add(modellist[j].itemPlace, modellist[j].itemInfo.ItemCount);
|
| | | recycleDanDict.Add(modellist[j].itemPlace, modellist[j].count);
|
| | | }
|
| | | else
|
| | | {
|
| | | recycleDanDict[modellist[j].itemPlace] += modellist[j].itemInfo.ItemCount;
|
| | | recycleDanDict[modellist[j].itemPlace] += modellist[j].count;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | itemCell.gameObject.SetActive(true);
|
| | | ItemModel itemModel = list[0];
|
| | | string key = StringUtility.Contact(itemModel.itemId, "IsBind", itemModel.itemInfo.IsBind);
|
| | | string key = StringUtility.Contact(itemModel.itemId, "IsBind", itemModel.isBind);
|
| | | if (blastFurnace.recycleStrlist.Contains(key))
|
| | | {
|
| | | selectImg.SetActive(true);
|
| | |
| | | int itemCount = 0;
|
| | | for(int i = 0; i < list.Count; i++)
|
| | | {
|
| | | itemCount += list[i].itemInfo.ItemCount;
|
| | | itemCount += list[i].count;
|
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(itemModel.itemId,false,(ulong)itemCount,itemModel.itemInfo.IsBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemModel.itemId,false,(ulong)itemCount,itemModel.isBind);
|
| | | itemCell.Init(cellModel);
|
| | | itemCell.cellBtn.RemoveAllListeners();
|
| | | itemCell.cellBtn.AddListener(() =>
|
| | |
| | | bool equip = itemPlaceList[i].packType == PackType.Equip;
|
| | | uint[] stones = equip ? PlayerStoneData.Instance.GetStoneInfo(itemPlaceList[i].itemPlace) : null;
|
| | | _textBuilder.Append(StringUtility.Contact("#item#", itemPlaceList[i].itemId,
|
| | | "|", itemPlaceList[i].itemInfo.IsBind,
|
| | | "|", itemPlaceList[i].itemInfo.ItemCount,
|
| | | "|", itemPlaceList[i].isBind,
|
| | | "|", itemPlaceList[i].count,
|
| | | "|", stones != null ? LitJson.JsonMapper.ToJson(stones) :
|
| | | LitJson.JsonMapper.ToJson(new uint[0]),
|
| | | "|"));
|
| | |
| | | if (!matDict.ContainsKey(itemModel.itemId))
|
| | | {
|
| | | Dictionary<int, int> bindDict = new Dictionary<int, int>();
|
| | | if (!bindDict.ContainsKey(itemModel.itemInfo.IsBind))
|
| | | if (!bindDict.ContainsKey(itemModel.isBind))
|
| | | {
|
| | | bindDict.Add(itemModel.itemInfo.IsBind, itemModel.itemInfo.ItemCount);
|
| | | bindDict.Add(itemModel.isBind, itemModel.count);
|
| | | }
|
| | | matDict.Add(itemModel.itemId, bindDict);
|
| | | }
|
| | | else
|
| | | {
|
| | | if (!matDict[itemModel.itemId].ContainsKey(itemModel.itemInfo.IsBind))
|
| | | if (!matDict[itemModel.itemId].ContainsKey(itemModel.isBind))
|
| | | {
|
| | | matDict[itemModel.itemId].Add(itemModel.itemInfo.IsBind, itemModel.itemInfo.ItemCount);
|
| | | matDict[itemModel.itemId].Add(itemModel.isBind, itemModel.count);
|
| | | }
|
| | | else
|
| | | {
|
| | | matDict[itemModel.itemId][itemModel.itemInfo.IsBind] += itemModel.itemInfo.ItemCount;
|
| | | matDict[itemModel.itemId][itemModel.isBind] += itemModel.count;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | int noBindCnt = 0;
|
| | | for (int j = 0; j < list.Count;j++)
|
| | | {
|
| | | if (list[j].itemInfo.IsBind == 1)
|
| | | if (list[j].isBind == 1)
|
| | | {
|
| | | bindCnt += list[j].itemInfo.ItemCount;
|
| | | bindCnt += list[j].count;
|
| | |
|
| | | }
|
| | | else if (list[j].itemInfo.IsBind == 0)
|
| | | else if (list[j].isBind == 0)
|
| | | {
|
| | | noBindCnt += list[j].itemInfo.ItemCount;
|
| | | noBindCnt += list[j].count;
|
| | | }
|
| | | }
|
| | | bindCntDic.Add(fixedIds[i], bindCnt);
|
| | |
| | | Dictionary<int,ItemModel> unfixedMatDict = selectModel.GetHaveUnfixedSelectItem();
|
| | | foreach(var model in unfixedMatDict.Values)
|
| | | {
|
| | | if(model.itemInfo.IsBind == 1)
|
| | | if(model.isBind == 1)
|
| | | {
|
| | | isBind = true;
|
| | | break;
|
| | |
| | | {
|
| | | for (int j = 0; j < list.Count; j++)
|
| | | {
|
| | | if (list[j].itemInfo.IsBind == 1)
|
| | | if (list[j].isBind == 1)
|
| | | {
|
| | | bindIcon.gameObject.SetActive(true);
|
| | | break;
|
| | |
| | | y = end.config.StarLevel;
|
| | | if (x.CompareTo(y) != 0) return x.CompareTo(y);
|
| | |
|
| | | x = start.itemInfo.IsBind;
|
| | | y = end.itemInfo.IsBind;
|
| | | x = start.isBind;
|
| | | y = end.isBind;
|
| | | if (x.CompareTo(y) != 0) return -x.CompareTo(y);
|
| | |
|
| | | x = oneKeyPutlist.IndexOf(start);
|
| | |
| | |
|
| | | public int CompareByCondition(ItemModel start,ItemModel end)
|
| | | {
|
| | | int startIsBind = start.itemInfo.IsBind;
|
| | | int endIsBind = end.itemInfo.IsBind;
|
| | | int startIsBind = start.isBind;
|
| | | int endIsBind = end.isBind;
|
| | | if (startIsBind.CompareTo(endIsBind) != 0) return startIsBind.CompareTo(endIsBind);
|
| | |
|
| | | int startQuality = start.config.ItemColor;
|
| | |
| | | ItemConfig cfg = ItemConfig.Get((int)itemModel.itemId);
|
| | | m_ItemIcon.SetSprite(cfg.IconKey);
|
| | | m_ItemBG.SetItemBackGround(cfg.ItemColor);
|
| | | if (itemModel.itemInfo.ItemCount > 1)
|
| | | if (itemModel.count > 1)
|
| | | {
|
| | | m_ItemCount.gameObject.SetActive(true);
|
| | | m_ItemCount.text = itemModel.itemInfo.ItemCount.ToString();
|
| | | m_ItemCount.text = itemModel.count.ToString();
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | |
| | | ItemConfig _ChinItem = ItemConfig.Get((int)backpack_dic[item_id].itemId); |
| | | |
| | | if (backpack_dic[item_id].itemInfo.IsBind == 1) |
| | | if (backpack_dic[item_id].isBind == 1) |
| | | continue; |
| | | foreach (int key in _ProductOrderJudgment.Keys) |
| | | { |
| | |
| | | foreach (int item_id in backpack_dic.Keys)
|
| | | {
|
| | | ItemConfig _ChinItem = ItemConfig.Get((int)backpack_dic[item_id].itemId);
|
| | | if (backpack_dic[item_id].itemInfo.IsBind == 1)
|
| | | if (backpack_dic[item_id].isBind == 1)
|
| | | continue;
|
| | | foreach (int key in _ProductOrderJudgment.Keys)
|
| | | {
|
| | |
| | | itemModel = _model;
|
| | | if(itemModel.config.Effect1 == 243)
|
| | | {
|
| | | decomposeExp = itemModel.config.EffectValueB1 * itemModel.itemInfo.ItemCount;
|
| | | decomposeExp = itemModel.config.EffectValueB1 * itemModel.count;
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | |
|
| | | if (clothes != null)
|
| | | {
|
| | | if (clothes.itemInfo.IsSuite == 1)
|
| | | if (clothes.isSuite == 1)
|
| | | {
|
| | | if (clothes.GetUseDataModel(30) != null && clothes.GetUseDataModel(30)[0] != 0)
|
| | | {
|
| | |
| | | {
|
| | | if (_bind)
|
| | | {
|
| | | if (_itemModel.itemInfo.IsBind == _isBind)
|
| | | if (_itemModel.isBind == _isBind)
|
| | | {
|
| | | _count += _itemModel.itemInfo.ItemCount;
|
| | | _count += _itemModel.count;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | _count += _itemModel.itemInfo.ItemCount;
|
| | | _count += _itemModel.count;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | CellInfo _cellInfo = CellInfo.Default;
|
| | | _cellInfo.infoInt1 = _item.itemId;
|
| | | _cellInfo.infoInt2 = _item.itemPlace;
|
| | | _cellInfo.SetInfo(_item.itemInfo.IsBind);
|
| | | _cellInfo.infoStr1 = _item.itemInfo.ItemCount.ToString();
|
| | | _cellInfo.SetInfo(_item.isBind);
|
| | | _cellInfo.infoStr1 = _item.count.ToString();
|
| | | m_SrollerControl.AddCell(ScrollerDataType.Normal, i, OnGemItemClick, _cellInfo);
|
| | | }
|
| | | if (itemId == 0 && gemModel.gemShopIds.ContainsKey(type))
|
| | |
| | | int count = 0;
|
| | | if (itemModel != null)
|
| | | {
|
| | | count = itemModel.itemInfo.ItemCount; |
| | | count = itemModel.count; |
| | | useBtnText.text = Language.Get("OpenBoxUseBtn1");
|
| | | useBtn.AddListener(ClickUseBtn);
|
| | | }
|
| | |
| | | ItemModel itemModel = realDevourlist[i];
|
| | | if (itemModel.config.EquipPlace == 0)
|
| | | {
|
| | | curExp = itemModel.itemInfo.ItemCount * itemModel.config.EffectValueA1;
|
| | | curExp = itemModel.count * itemModel.config.EffectValueA1;
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | ItemModel itemModel = devourModellist[i];
|
| | | if(playerPack.selectDevourlist.Contains(itemModel))
|
| | | {
|
| | | devourCnt += itemModel.itemInfo.ItemCount;
|
| | | devourCnt += itemModel.count;
|
| | | realDevourlist.Add(itemModel);
|
| | | }
|
| | | }
|
| | |
| | | var putInWarehouse = new C0C01_tagCPutItemInWarehouse(); |
| | | putInWarehouse.ItemIndex = (ushort)itemModel.itemPlace; |
| | | putInWarehouse.WarehouseIndex = 0; |
| | | putInWarehouse.Count = (ushort)itemModel.itemInfo.ItemCount; |
| | | putInWarehouse.Count = (ushort)itemModel.count; |
| | | GameNetSystem.Instance.SendInfo(putInWarehouse); |
| | | } |
| | | #endregion |
| | |
| | | var putOutWarehouse = new C0C02_tagCGetItemInWarehouse(); |
| | | putOutWarehouse.WarehouseIndex = (ushort)itemModel.itemPlace; |
| | | putOutWarehouse.ItemIndex = 0; |
| | | putOutWarehouse.Count = (ushort)itemModel.itemInfo.ItemCount; |
| | | putOutWarehouse.Count = (ushort)itemModel.count; |
| | | GameNetSystem.Instance.SendInfo(putOutWarehouse); |
| | | } |
| | | #endregion |
| | |
| | | { |
| | | int extraCnt = remainOffline % itemModel.config.EffectValueA1 > 0 ? 1 : 0; |
| | | maxUseCnt = remainOffline / itemModel.config.EffectValueA1 + extraCnt; |
| | | if (maxUseCnt > itemModel.itemInfo.ItemCount) |
| | | if (maxUseCnt > itemModel.count) |
| | | { |
| | | return itemModel.itemInfo.ItemCount; |
| | | return itemModel.count; |
| | | } |
| | | } |
| | | return maxUseCnt; |
| | |
| | |
|
| | | public string guid { get { return itemInfo == null ? string.Empty : itemInfo.ItemGUID; } }
|
| | | public int itemId { get { return itemInfo == null ? 0 : itemInfo.ItemID; } }
|
| | | public int count { get { return itemInfo == null ? 0 : itemInfo.ItemCount; } }
|
| | | public int itemPlace { get { return itemInfo == null ? 0 : itemInfo.ItemPlace; } }
|
| | | public int isBind { get { return itemInfo == null ? 0 : itemInfo.IsBind; } }
|
| | | public int isSuite { get { return itemInfo == null ? 0 : itemInfo.IsSuite; } }
|
| | | public int preItemCount { get; private set; }
|
| | |
|
| | | PackModelInterface modelInterface { get { return ModelCenter.Instance.GetModel<PackModelInterface>(); } }
|
| | |
| | | ItemModel itemModel = playerPack.GetItemModelByGUID(guid);
|
| | | if (itemModel != null)
|
| | | {
|
| | | curAttrData = new ItemAttrData(itemModel.itemId,false, (ulong)itemModel.itemInfo.ItemCount
|
| | | , itemModel.itemPlace, itemModel.itemInfo.IsBind,isCompare
|
| | | curAttrData = new ItemAttrData(itemModel.itemId,false, (ulong)itemModel.count
|
| | | , itemModel.itemPlace, itemModel.isBind,isCompare
|
| | | , type, guid, ConfigParse.Analysis(itemModel.itemInfo.UserData),childType);
|
| | |
|
| | | if (isCompare)
|
| | |
| | |
|
| | | public void SetCurrentAttrData(ItemModel itemModel,bool isCompare )
|
| | | {
|
| | | curAttrData = new ItemAttrData(itemModel.itemId, false, (ulong)itemModel.itemInfo.ItemCount
|
| | | , itemModel.itemPlace, itemModel.itemInfo.IsBind, isCompare
|
| | | curAttrData = new ItemAttrData(itemModel.itemId, false, (ulong)itemModel.count
|
| | | , itemModel.itemPlace, itemModel.isBind, isCompare
|
| | | , itemModel.packType, itemModel.guid, ConfigParse.Analysis(itemModel.itemInfo.UserData),ItemTipChildType.Normal);
|
| | | }
|
| | |
|
| | |
|
| | | public void SetCompareAttrData(ItemModel itemModel)
|
| | | {
|
| | | compareAttrData = new ItemAttrData(itemModel.itemId, false, (ulong)itemModel.itemInfo.ItemCount
|
| | | , itemModel.itemPlace, itemModel.itemInfo.IsBind, true
|
| | | compareAttrData = new ItemAttrData(itemModel.itemId, false, (ulong)itemModel.count
|
| | | , itemModel.itemPlace, itemModel.isBind, true
|
| | | , itemModel.packType, itemModel.guid, ConfigParse.Analysis(itemModel.itemInfo.UserData));
|
| | | }
|
| | |
|
| | |
| | |
|
| | | if (itemModel != null)
|
| | | {
|
| | | compareAttrData = new ItemAttrData(itemModel.itemId, false, (ulong)itemModel.itemInfo.ItemCount
|
| | | , itemModel.itemPlace, itemModel.itemInfo.IsBind, true
|
| | | compareAttrData = new ItemAttrData(itemModel.itemId, false, (ulong)itemModel.count
|
| | | , itemModel.itemPlace, itemModel.isBind, true
|
| | | , type,itemModel.guid, ConfigParse.Analysis(itemModel.itemInfo.UserData));
|
| | |
|
| | | }
|
| | |
| | | //ItemUseDataKey
|
| | | //if (clothes != null)
|
| | | //{
|
| | | // if (clothes.itemInfo.IsSuite == 1)
|
| | | // if (clothes.isSuite == 1)
|
| | | // {
|
| | | // if (clothes.GetUseDataModel(30) != null && clothes.GetUseDataModel(30)[0] != 0)
|
| | | // {
|
| | |
| | |
|
| | | if (clothes != null)
|
| | | {
|
| | | if (clothes.itemInfo.IsSuite == 1)
|
| | | if (clothes.isSuite == 1)
|
| | | {
|
| | | if (clothes.GetUseDataModel(30) != null && clothes.GetUseDataModel(30)[0] != 0)
|
| | | {
|
| | |
| | | }
|
| | | if (pushItemIds.Contains(itemModel.itemId))
|
| | | {
|
| | | int itemCnt = playerPack.GetItemCountByID(PackType.Item, itemModel.itemId) - itemModel.itemInfo.ItemCount;
|
| | | int itemCnt = playerPack.GetItemCountByID(PackType.Item, itemModel.itemId) - itemModel.count;
|
| | | if (itemCnt > 0)
|
| | | {
|
| | | isReach = false;
|
| | |
| | | if (itemModel != null)
|
| | | {
|
| | | bool isAddItemCount = false;
|
| | | if (refresh.ItemCount > itemModel.itemInfo.ItemCount)
|
| | | if (refresh.ItemCount > itemModel.count)
|
| | | {
|
| | | isAddItemCount = true;
|
| | | }
|
| | |
| | | AttrFruitConfig fruitConfig = AttrFruitConfig.Get(itemModel.itemId);
|
| | | int haveUseCnt = GetDayUseCntByID(itemModel.itemId);
|
| | | int sumHaveUseCnt = GetSumUseCntByID(itemModel.itemId);
|
| | | count = (ulong)itemModel.itemInfo.ItemCount;
|
| | | count = (ulong)itemModel.count;
|
| | | bool isReach = false;
|
| | | int remainDayCnt = 0;
|
| | | if (itemModel.config.MaxSkillCnt > 0)
|
| | | {
|
| | | remainDayCnt = itemModel.config.MaxSkillCnt - haveUseCnt;
|
| | | if (itemModel.itemInfo.ItemCount > remainDayCnt)
|
| | | if (itemModel.count > remainDayCnt)
|
| | | {
|
| | | count = (ulong)remainDayCnt;
|
| | | }
|
| | |
| | | if (fruitConfig != null)
|
| | | {
|
| | | remainSumCnt = fruitConfig.MaxUseCnt - sumHaveUseCnt;
|
| | | if (remainSumCnt <= remainDayCnt && itemModel.itemInfo.ItemCount > remainSumCnt)
|
| | | if (remainSumCnt <= remainDayCnt && itemModel.count > remainSumCnt)
|
| | | {
|
| | | count = (ulong)remainSumCnt;
|
| | | }
|
| | | }
|
| | |
|
| | | if (count < (ulong)itemModel.itemInfo.ItemCount)
|
| | | if (count < (ulong)itemModel.count)
|
| | | {
|
| | | isReach = true;
|
| | | }
|
| | |
| | | {
|
| | | if (defaultUnSelectlist.Contains(itemModels[i].itemId))
|
| | | {
|
| | | preciousCnt += itemModels[i].itemInfo.ItemCount;
|
| | | preciousCnt += itemModels[i].count;
|
| | | }
|
| | | else if (modelInterface.IsFightUp(itemModels[i].itemId, itemModels[i].equipScore) == 1)
|
| | | {
|
| | | betterEquipCnt += itemModels[i].itemInfo.ItemCount;
|
| | | betterEquipCnt += itemModels[i].count;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | if (itemModels[i].config.StarLevel >= 2 && itemModels[i].config.ItemColor >= (int)E_ItemColor.Orange)
|
| | | {
|
| | | twoStarEquipCnt += itemModels[i].itemInfo.ItemCount;
|
| | | twoStarEquipCnt += itemModels[i].count;
|
| | | }
|
| | | }
|
| | | if (twoStarEquipCnt > 0)
|
| | |
| | | { |
| | | if (model.itemId == itemId) |
| | | { |
| | | count += model.itemInfo.ItemCount; |
| | | count += model.count; |
| | | list.Add(model); |
| | | } |
| | | } |
| | |
| | | { |
| | | if (model.itemId == itemId) |
| | | { |
| | | count += model.itemInfo.ItemCount; |
| | | count += model.count; |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | if (model.config.Type == itemType) |
| | | { |
| | | count += model.itemInfo.ItemCount; |
| | | count += model.count; |
| | | list.Add(model); |
| | | } |
| | | } |
| | |
| | | if(count < needCount) |
| | | { |
| | | itemIndexlist.Add(itemModellist[i].itemPlace); |
| | | count += itemModellist[i].itemInfo.ItemCount; |
| | | count += itemModellist[i].count; |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | if(count < needCnt) |
| | | { |
| | | if(itemModellist[i].itemInfo.IsBind == isBind) |
| | | if(itemModellist[i].isBind == isBind) |
| | | { |
| | | itemIndexlist.Add(itemModellist[i].itemPlace); |
| | | count += itemModellist[i].itemInfo.ItemCount; |
| | | count += itemModellist[i].count; |
| | | } |
| | | } |
| | | else |
| | |
| | | { |
| | | if (count < needCnt) |
| | | { |
| | | if (itemModellist[i].itemInfo.IsBind != isBind) |
| | | if (itemModellist[i].isBind != isBind) |
| | | { |
| | | itemIndexlist.Add(itemModellist[i].itemPlace); |
| | | count += itemModellist[i].itemInfo.ItemCount; |
| | | count += itemModellist[i].count; |
| | | } |
| | | } |
| | | else |
| | |
| | | |
| | | private int CompareIsBind(ItemModel start, ItemModel end) |
| | | { |
| | | int startIsBind = start.itemInfo.IsBind; |
| | | int endIsBind = end.itemInfo.IsBind; |
| | | int startIsBind = start.isBind; |
| | | int endIsBind = end.isBind; |
| | | if (startIsBind.CompareTo(endIsBind) != 0) |
| | | return -startIsBind.CompareTo(endIsBind); |
| | | |
| | |
| | | needCnt = needCnt + 1;
|
| | | }
|
| | |
|
| | | if(needCnt > itemModel.itemInfo.ItemCount)
|
| | | if(needCnt > itemModel.count)
|
| | | {
|
| | | needCnt = itemModel.itemInfo.ItemCount;
|
| | | needCnt = itemModel.count;
|
| | | }
|
| | |
|
| | | if (itemModel.config.BatchUse == 1 && needCnt > 1)
|
| | |
| | | maxValue = (ulong)BatchUseModel.Instance.maxValue;
|
| | | }
|
| | |
|
| | | ItemCellModel cellModel = new ItemCellModel(itemModel.itemId, false, (ulong)maxValue, itemModel.itemInfo.IsBind, |
| | | ItemCellModel cellModel = new ItemCellModel(itemModel.itemId, false, (ulong)maxValue, itemModel.isBind, |
| | | itemModel.guid,itemModel.packType, false);
|
| | | _itemCell.Init(cellModel);
|
| | | _itemCell.countText.text = maxValue.ToString();
|
| | |
| | |
|
| | | useNum = int.Parse(numKeyboard.Value);
|
| | |
|
| | | if (useNum > itemModel.itemInfo.ItemCount)
|
| | | if (useNum > itemModel.count)
|
| | | {
|
| | | useNum = itemModel.itemInfo.ItemCount;
|
| | | useNum = itemModel.count;
|
| | | ServerTipDetails.DisplayNormalTip(Language.Get("MaxUseNum"));
|
| | | }
|
| | | else if(useNum < 1)
|
| | |
| | |
|
| | | useNum += 1;
|
| | |
|
| | | if(useNum > itemModel.itemInfo.ItemCount)
|
| | | if(useNum > itemModel.count)
|
| | | {
|
| | | useNum = itemModel.itemInfo.ItemCount;
|
| | | useNum = itemModel.count;
|
| | | ServerTipDetails.DisplayNormalTip(Language.Get("MaxUseNum"));
|
| | | }
|
| | |
|
| | |
| | | public virtual void Init(ItemModel model,bool isCompare = false,int compareScore = 0)
|
| | | {
|
| | | itemConfig = ItemConfig.Get(model.itemId);
|
| | | InitUI(model.guid,model.itemId,(ulong)model.itemInfo.ItemCount,model.equipScore,model.itemInfo.IsBind,model.packType,isCompare,model.useDataDict,compareScore);
|
| | | InitUI(model.guid,model.itemId,(ulong)model.count,model.equipScore,model.isBind,model.packType,isCompare,model.useDataDict,compareScore);
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | m_Stars[i].gameObject.SetActive(false); |
| | | } |
| | | } |
| | | int _Cnt = PutawayData.Instance.itemModel.itemInfo.ItemCount; |
| | | int _Cnt = PutawayData.Instance.itemModel.count; |
| | | if (_Cnt > 1) |
| | | { |
| | | m_ItemCount.gameObject.SetActive(true); |
| | |
| | |
|
| | | if (clothes != null)
|
| | | {
|
| | | if (clothes.itemInfo.IsSuite == 1)
|
| | | if (clothes.isSuite == 1)
|
| | | {
|
| | | if (clothes.GetUseDataModel(30) != null && clothes.GetUseDataModel(30)[0] != 0)
|
| | | {
|
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Friday, September 07, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | //神兽水晶强化选择面板 |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Friday, September 07, 2018
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | | //神兽水晶强化选择面板
|
| | | namespace Snxxz.UI
|
| | | { |
| | | |
| | | public class CrystalSelectionWin : Window |
| | | { |
| | | [SerializeField] Text m_NumberText; |
| | | [SerializeField] Slider m_Slider; |
| | | {
|
| | |
|
| | | public class CrystalSelectionWin : Window
|
| | | {
|
| | | [SerializeField] Text m_NumberText;
|
| | | [SerializeField] Slider m_Slider;
|
| | | [SerializeField] Button m_AddBtn;
|
| | | [SerializeField] Button m_ReduceBtn;
|
| | | [SerializeField] Transform m_Tran;
|
| | | public Vector3 Pos1 = new Vector3(311,160,0);
|
| | | public Vector3 Pos2 = new Vector3(387, 160, 0);
|
| | | public Vector3 Pos3 = new Vector3(465, 160, 0);
|
| | | #region Built-in |
| | | PlayerPackModel _playerPack; |
| | | #region Built-in
|
| | | PlayerPackModel _playerPack;
|
| | | PlayerPackModel playerPack { get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); } }
|
| | | GodBeastModel godBeastModel { get { return ModelCenter.Instance.GetModel<GodBeastModel>(); } } |
| | | protected override void BindController() |
| | | { |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | m_Slider.onValueChanged.AddListener(OnClickSlider); |
| | | m_AddBtn.AddListener(OnClickAddBtn); |
| | | m_ReduceBtn.AddListener(OnClickReduceBtn); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | m_Slider.minValue = 0; |
| | | m_Slider.maxValue = godBeastModel.Crystal_ItemModel.itemInfo.ItemCount; |
| | | GodBeastModel godBeastModel { get { return ModelCenter.Instance.GetModel<GodBeastModel>(); } }
|
| | | protected override void BindController()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | m_Slider.onValueChanged.AddListener(OnClickSlider);
|
| | | m_AddBtn.AddListener(OnClickAddBtn);
|
| | | m_ReduceBtn.AddListener(OnClickReduceBtn);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | m_Slider.minValue = 0;
|
| | | m_Slider.maxValue = godBeastModel.Crystal_ItemModel.count;
|
| | | if (godBeastModel.Absorption_Dic.ContainsKey(godBeastModel.ItemInde))
|
| | | {
|
| | | m_Slider.value = godBeastModel.Absorption_Dic[godBeastModel.ItemInde];
|
| | |
| | | else
|
| | | {
|
| | | m_Slider.value = 0;
|
| | | } |
| | | m_NumberText.text = m_Slider.value.ToString(); |
| | | } |
| | | }
|
| | | m_NumberText.text = m_Slider.value.ToString();
|
| | | }
|
| | | protected override void OnActived()
|
| | | {
|
| | | switch (godBeastModel.ItemPos)
|
| | |
| | |
|
| | |
|
| | | }
|
| | | } |
| | | protected override void OnAfterOpen() |
| | | { |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | godBeastModel.Crystal_ItemModel = null; |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | { |
| | | }
|
| | | #endregion |
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | godBeastModel.Crystal_ItemModel = null;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | }
|
| | | #endregion
|
| | | private void OnClickAddBtn()
|
| | | {
|
| | | if (m_Slider.value < godBeastModel.Crystal_ItemModel.itemInfo.ItemCount)
|
| | | if (m_Slider.value < godBeastModel.Crystal_ItemModel.count)
|
| | | {
|
| | | m_Slider.value += 1;
|
| | | m_NumberText.text = m_Slider.value.ToString();
|
| | |
| | | m_NumberText.text = m_Slider.value.ToString();
|
| | | Determine();//确认
|
| | | }
|
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
| | | {
|
| | | if (_bind)
|
| | | {
|
| | | if (_itemModel.itemInfo.IsBind == _isBind)
|
| | | if (_itemModel.isBind == _isBind)
|
| | | {
|
| | | _count += _itemModel.itemInfo.ItemCount;
|
| | | _count += _itemModel.count;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | _count += _itemModel.itemInfo.ItemCount;
|
| | | _count += _itemModel.count;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Friday, August 17, 2018 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Friday, August 17, 2018
|
| | | //--------------------------------------------------------
|
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | | using UnityEngine.UI;
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | //神兽强化右侧材料吸收列表
|
| | | namespace Snxxz.UI
|
| | | { |
| | | {
|
| | | public class GodBeastBagClass
|
| | | {
|
| | | public int ItemId;//ID
|
| | |
| | | public int EquipScore;//装备评分
|
| | | public int Part;//装备位
|
| | | public int Count;//数量
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | public class GodBeastSlidingList : MonoBehaviour
|
| | | {
|
| | | [SerializeField] ScrollerController m_ScrollerController;
|
| | |
| | | private List<int> DeleteIndexList = new List<int>();
|
| | | private int Quality = 10;
|
| | | private int GetJumpIndex = 0;//获取跳转下标
|
| | | PlayerPackModel _playerPack; |
| | | PlayerPackModel _playerPack;
|
| | | PlayerPackModel playerPack { get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); } }
|
| | | GodBeastModel godBeastModel { get { return ModelCenter.Instance.GetModel<GodBeastModel>(); } }
|
| | | private void Awake()
|
| | |
| | | m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见
|
| | | });
|
| | | m_ToggleAll.onValueChanged.AddListener(OnClickToggle);
|
| | | } |
| | | }
|
| | | private void OnEnable()
|
| | | {
|
| | | DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent += MakeItemAnswerEvent;
|
| | |
| | | m_ScrollerController.OnRefreshCell += OnRefreshGridCell;
|
| | | OnCreateGridLineCell(m_ScrollerController);
|
| | |
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | public void Unit()
|
| | | {
|
| | | m_ScrollerController.OnRefreshCell -= OnRefreshGridCell;
|
| | |
| | | godBeastBagClass.Star = itemModel.config.StarLevel;
|
| | | godBeastBagClass.EquipScore = itemModel.equipScore;
|
| | | godBeastBagClass.Part = itemModel.equipPlace;
|
| | | godBeastBagClass.Count = itemModel.itemInfo.ItemCount;
|
| | | godBeastBagClass.Count = itemModel.count;
|
| | | var IudetDogzEquipPlus = itemModel.GetUseDataModel((int)ItemUseDataKey.dogzEquipPlus);// 神兽装备强化信息列表 [强化等级, 强化熟练度]
|
| | | if (IudetDogzEquipPlus == null)
|
| | | {
|
| | |
| | | if (godBeastModel.Absorption_Dic.ContainsKey(godBeastBagClass.Index))
|
| | | {
|
| | | GodBeastChildNodes.ChoosenImg.SetActive(true);
|
| | | if (itemModel.equipPlace <= 0 && itemModel.itemInfo.ItemCount > 1)
|
| | | if (itemModel.equipPlace <= 0 && itemModel.count > 1)
|
| | | {
|
| | | GodBeastChildNodes.NumberNow.gameObject.SetActive(true);
|
| | | GodBeastChildNodes.NumberNow.text = godBeastModel.Absorption_Dic[godBeastBagClass.Index].ToString() + "/" + itemModel.itemInfo.ItemCount;
|
| | | GodBeastChildNodes.NumberNow.text = godBeastModel.Absorption_Dic[godBeastBagClass.Index].ToString() + "/" + itemModel.count;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (itemModel.equipPlace <= 0 && itemModel.itemInfo.ItemCount > 1)
|
| | | if (itemModel.equipPlace <= 0 && itemModel.count > 1)
|
| | | {
|
| | | GodBeastChildNodes.NumberNow.gameObject.SetActive(true);
|
| | | GodBeastChildNodes.NumberNow.text = itemModel.itemInfo.ItemCount.ToString();
|
| | | GodBeastChildNodes.NumberNow.text = itemModel.count.ToString();
|
| | | }
|
| | | }
|
| | | GodBeastChildNodes.GetGodBeastIndex(godBeastBagClass.Index);
|
| | |
| | | }
|
| | | else//选中的物品为水晶
|
| | | {
|
| | | if (itemModel.itemInfo.ItemCount <= 1)
|
| | | if (itemModel.count <= 1)
|
| | | {
|
| | | if (godBeastModel.Absorption_Dic.ContainsKey(godBeastBagClass.Index))
|
| | | {
|
| | |
| | | });
|
| | | }
|
| | | }
|
| | | } |
| | | }
|
| | | private int JumpIndex()
|
| | | {
|
| | | int jumpIndex = 0;
|
| | |
| | | jumpIndex -= 1;
|
| | | }
|
| | | return jumpIndex;
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
| | | CellInfo _cellInfo = CellInfo.Default;
|
| | | _cellInfo.infoInt1 = _item.itemId;
|
| | | _cellInfo.infoInt2 = _item.itemPlace;
|
| | | _cellInfo.SetInfo(_item.itemInfo.IsBind);
|
| | | _cellInfo.infoStr1 = _item.itemInfo.ItemCount.ToString();
|
| | | _cellInfo.SetInfo(_item.isBind);
|
| | | _cellInfo.infoStr1 = _item.count.ToString();
|
| | | m_Scroller.AddCell(ScrollerDataType.Normal, i, OnGemItemClick, _cellInfo);
|
| | | }
|
| | | if (!hasStone)
|
| | |
| | | {
|
| | | var _WingsInformation = new WingsInformation();
|
| | | _WingsInformation.WingsID = itemId;
|
| | | _WingsInformation.WingsCount = item.itemInfo.ItemCount;
|
| | | _WingsInformation.WingsCount = item.count;
|
| | | _dicWings.Add(index, _WingsInformation);
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | ItemModel model = playerPack.GetItemModelByIndex(PackType.Item, key);
|
| | |
|
| | | for (int i = 0; i < model.itemInfo.ItemCount; i++)
|
| | | for (int i = 0; i < model.count; i++)
|
| | | {
|
| | | if (wingConfig.EXPmaterial != null && !wingConfig.EXPmaterial.Equals(string.Empty))
|
| | | {
|
| | |
| | | else
|
| | | {
|
| | | ItemModel model = playerPack.GetItemModelByIndex(PackType.Item, Index);
|
| | | for (int i = 0; i < model.itemInfo.ItemCount; i++)
|
| | | for (int i = 0; i < model.count; i++)
|
| | | {
|
| | | if (wingConfig.EXPmaterial != null && !wingConfig.EXPmaterial.Equals(string.Empty))
|
| | | {
|
| | |
| | |
|
| | | if (clothes != null)
|
| | | {
|
| | | if (clothes.itemInfo.IsSuite == 1)
|
| | | if (clothes.isSuite == 1)
|
| | | {
|
| | | if (clothes.GetUseDataModel(30) != null && clothes.GetUseDataModel(30)[0] != 0)
|
| | | {
|
| | |
| | | int suitLevel = 0;
|
| | | if (clothes != null)
|
| | | {
|
| | | if (clothes.itemInfo.IsSuite == 1)
|
| | | if (clothes.isSuite == 1)
|
| | | {
|
| | | if (clothes.GetUseDataModel(30) != null && clothes.GetUseDataModel(30)[0] != 0)
|
| | | {
|
| | |
| | | var suitLevel = 0;
|
| | | if (clothes != null)
|
| | | {
|
| | | if (clothes.itemInfo.IsSuite == 1)
|
| | | if (clothes.isSuite == 1)
|
| | | {
|
| | | if (clothes.GetUseDataModel(30) != null && clothes.GetUseDataModel(30)[0] != 0)
|
| | | {
|
| | |
| | | int suitLevel = 0;
|
| | | if (clothes != null)
|
| | | {
|
| | | if (clothes.itemInfo.IsSuite == 1)
|
| | | if (clothes.isSuite == 1)
|
| | | {
|
| | | if (clothes.GetUseDataModel(30) != null && clothes.GetUseDataModel(30)[0] != 0)
|
| | | {
|