4144 【前端】人物粉色品质防具装备的合成与拆解
| | |
| | | List<int> dismantleReturnlist = attrData.GetUseDataModel((int)ItemUseDataKey.Def_IudetItemDecompound);
|
| | | if (dismantleReturnlist != null && dismantleReturnlist.Count > 0)
|
| | | {
|
| | | int needGridCnt = 0;
|
| | | for(int i = 0; i < dismantleReturnlist.Count; i++)
|
| | | {
|
| | | if(i == 0)
|
| | | {
|
| | | if(dismantleReturnlist[i] != 0)
|
| | | {
|
| | | needGridCnt += 1;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if((i-1) % 3 == 0)
|
| | | {
|
| | | if (dismantleReturnlist[i] != 0)
|
| | | {
|
| | | needGridCnt += 1;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if(needGridCnt > playerPack.GetReaminGridCount(PackType.rptItem))
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("BagFull102",attrData.itemConfig.ItemName,needGridCnt);
|
| | | }
|
| | | else
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.dismantle, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.SendDismantleQuest(ItemWinBtnType.dismantle, attrData); });
|
| | | }
|
| | | }
|
| | |
|
| | | if (!isOverdue)
|
| | |
| | | #region 发送拆解请求
|
| | | public void SendDismantleQuest(ItemWinBtnType btnType, ItemAttrData attrData)
|
| | | {
|
| | | List<int> dismantleReturnlist = attrData.GetUseDataModel((int)ItemUseDataKey.Def_IudetItemDecompound);
|
| | | int needGridCnt = 0;
|
| | | for (int i = 0; i < dismantleReturnlist.Count; i++)
|
| | | {
|
| | | if (i == 0)
|
| | | {
|
| | | if (dismantleReturnlist[i] != 0)
|
| | | {
|
| | | needGridCnt += 1;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if ((i - 1) % 3 == 0)
|
| | | {
|
| | | if (dismantleReturnlist[i] != 0)
|
| | | {
|
| | | needGridCnt += 1;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | int offsetGrid = needGridCnt - playerPack.GetReaminGridCount(PackType.rptItem) - 1;
|
| | | if (offsetGrid > 0)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("BagFull102", attrData.itemConfig.ItemName, offsetGrid);
|
| | | return;
|
| | | }
|
| | |
|
| | | CA313_tagCMItemDecompound decompound = new CA313_tagCMItemDecompound();
|
| | | decompound.Index = (byte)attrData.index;
|
| | | GameNetSystem.Instance.SendInfo(decompound);
|