Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | | if (isOpenPrompting)
|
| | | {
|
| | | ConfirmCancel.ToggleConfirmCancel(Language.Get("Mail101"), Language.Get("BlastFurnace114",sumCnt,getMoney,string.Format("<Img chat={0}/>",StringUtility.Contact("Money_Type_",27))),
|
| | | Language.Get("ConfirmCancel102"),(bool isOk, bool isToggle) =>
|
| | | {
|
| | | if (isOk)
|
| | | {
|
| | | if(unBindCnt > 0)
|
| | | {
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("BlastFurnace115", unBindCnt),
|
| | | (bool isRecycle) =>
|
| | | {
|
| | | if (isRecycle)
|
| | | {
|
| | | SendRecycleDrugQuest(recycleDanDict.Keys.ToList(), recycleDanDict.Values.ToList());
|
| | | }
|
| | | });
|
| | | }
|
| | | else
|
| | | {
|
| | | SendRecycleDrugQuest(recycleDanDict.Keys.ToList(), recycleDanDict.Values.ToList());
|
| | | }
|
| | | }
|
| | | isOpenPrompting = !isToggle;
|
| | | });
|
| | | }
|
| | | else
|
| | | {
|
| | | if (unBindCnt > 0)
|
| | | {
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("BlastFurnace115", unBindCnt),
|
| | | (bool isRecycle) =>
|
| | | {
|
| | | if (isRecycle)
|
| | | {
|
| | | SendRecycleDrugQuest(recycleDanDict.Keys.ToList(), recycleDanDict.Values.ToList());
|
| | | }
|
| | | });
|
| | | }
|
| | | else
|
| | | {
|
| | | SendRecycleDrugQuest(recycleDanDict.Keys.ToList(), recycleDanDict.Values.ToList());
|
| | | }
|
| | | }
|
| | | SendRecycleDrugQuest(recycleDanDict.Keys.ToList(), recycleDanDict.Values.ToList());
|
| | | //if (isOpenPrompting)
|
| | | //{
|
| | | // ConfirmCancel.ToggleConfirmCancel(Language.Get("Mail101"), Language.Get("BlastFurnace114",sumCnt,getMoney,string.Format("<Img chat={0}/>",StringUtility.Contact("Money_Type_",27))),
|
| | | // Language.Get("ConfirmCancel102"),(bool isOk, bool isToggle) =>
|
| | | // {
|
| | | // if (isOk)
|
| | | // {
|
| | | // if(unBindCnt > 0)
|
| | | // {
|
| | | // ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("BlastFurnace115", unBindCnt),
|
| | | // (bool isRecycle) =>
|
| | | // {
|
| | | // if (isRecycle)
|
| | | // {
|
| | | // SendRecycleDrugQuest(recycleDanDict.Keys.ToList(), recycleDanDict.Values.ToList());
|
| | | // }
|
| | | // });
|
| | | // }
|
| | | // else
|
| | | // {
|
| | | // SendRecycleDrugQuest(recycleDanDict.Keys.ToList(), recycleDanDict.Values.ToList());
|
| | | // }
|
| | | // }
|
| | | // isOpenPrompting = !isToggle;
|
| | | // });
|
| | | //}
|
| | | //else
|
| | | //{
|
| | | // if (unBindCnt > 0)
|
| | | // {
|
| | | // ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("BlastFurnace115", unBindCnt),
|
| | | // (bool isRecycle) =>
|
| | | // {
|
| | | // if (isRecycle)
|
| | | // {
|
| | | // SendRecycleDrugQuest(recycleDanDict.Keys.ToList(), recycleDanDict.Values.ToList());
|
| | | // }
|
| | | // });
|
| | | // }
|
| | | // else
|
| | | // {
|
| | | // SendRecycleDrugQuest(recycleDanDict.Keys.ToList(), recycleDanDict.Values.ToList());
|
| | | // }
|
| | | //}
|
| | |
|
| | | }
|
| | |
|
| | |
| | |
|
| | | public bool CheckIsComposeByType(int firstType,int secondType,int thirdType)
|
| | | {
|
| | | ItemCompoundConfig itemCompound = GetThirdTypeModellist(firstType,secondType,thirdType)[0];
|
| | | ItemCompoundConfig itemCompound = ItemCompoundConfig.GetItemCompoundByType(firstType, secondType, thirdType);
|
| | | if (itemCompound == null) return false;
|
| | |
|
| | | if (itemCompound.levelNeed <= PlayerDatas.Instance.baseData.LV)
|
| | | {
|
| | | return true;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | if(playerPack.CheckIsDrugById(itemModel.itemId))
|
| | | {
|
| | | if(itemModel.chinItemModel.RealmLimit > PlayerDatas.Instance.baseData.realmLevel)
|
| | | {
|
| | | isReach = false;
|
| | | return isReach;
|
| | | }
|
| | | }
|
| | |
|
| | | switch (itemModel.chinItemModel.Type)
|
| | | {
|
| | | case 8:
|
| | |
| | | return isReach;
|
| | | }
|
| | | break;
|
| | | case 39:
|
| | | break;
|
| | | case 52:
|
| | | if (!strengthDatas.IsHint(itemModel.itemId))
|
| | | {
|
| | |
| | | return 0;
|
| | | }
|
| | |
|
| | | public List<ItemModel> canDevourModellist = new List<ItemModel>();
|
| | | public List<ItemModel> GetCanDevourModellist()
|
| | | {
|
| | | canDevourModellist.Clear();
|
| | | List<ItemModel> canDevourModellist = new List<ItemModel>();
|
| | | SinglePackModel singlePack = GetSinglePackModel(PackType.rptItem);
|
| | | if (singlePack == null
|
| | | || colorType == EquipColorType.None
|
| | |
| | | public List<ItemModel> selectDevourlist = new List<ItemModel>();
|
| | | public void GetSelectDevourList()
|
| | | {
|
| | | GetCanDevourModellist();
|
| | | selectDevourlist.Clear();
|
| | | selectDevourlist.AddRange(canDevourModellist);
|
| | | List<ItemModel> itemModels = GetCanDevourModellist();
|
| | | if (itemModels != null)
|
| | | {
|
| | | selectDevourlist.AddRange(itemModels);
|
| | | }
|
| | | }
|
| | |
|
| | | public void RefreshGetNewItem(ItemModel model)
|
| | |
| | | return null;
|
| | | }
|
| | |
|
| | | public bool IsReachMinDecomposeNum()
|
| | | {
|
| | | List<ItemModel> itemModels = GetCanDevourModellist();
|
| | | if(itemModels != null && itemModels.Count >= minDecomposeNum)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public void SendEquipdevourQuest()
|
| | | {
|
| | | if (canDevourModellist.Count < minDecomposeNum) return;
|
| | | List<ItemModel> itemModels = GetCanDevourModellist();
|
| | | if (itemModels == null || itemModels.Count < minDecomposeNum) return;
|
| | |
|
| | | isAutoDecompose = true;
|
| | | recordAutoDecomNum = canDevourModellist.Count;
|
| | | recordAutoDecomNum = itemModels.Count;
|
| | | CA32C_tagCMEquipDecompose _petEat = new CA32C_tagCMEquipDecompose();
|
| | | byte[] _petIndex = new byte[canDevourModellist.Count];
|
| | | for (int i = 0; i < canDevourModellist.Count; i++)
|
| | | byte[] _petIndex = new byte[recordAutoDecomNum];
|
| | | for (int i = 0; i < recordAutoDecomNum; i++)
|
| | | {
|
| | | _petIndex[i] = (byte)canDevourModellist[i].itemInfo.ItemPlace;
|
| | | _petIndex[i] = (byte)itemModels[i].itemInfo.ItemPlace;
|
| | | if (itemModels[i].chinItemModel.StarLevel >= 2 |
| | | || (itemModels[i].chinItemModel.EquipPlace == 0 && itemModels[i].chinItemModel.Type != 29))
|
| | | {
|
| | | return;
|
| | | }
|
| | | }
|
| | | _petEat.IndexCount = (byte)_petIndex.Length;
|
| | | _petEat.IndexList = _petIndex;
|
| | |
| | | delayTime = 2;
|
| | | HeroBehaviour.OnStartHandupAI -= OnStartHandupAI;
|
| | | HeroBehaviour.OnStopHandupAI -= OnStopHandupAI;
|
| | | playerPack.ItemCntAddAct -= RefreshItemCnt;
|
| | | DeadModel.playerDieEvent -= OnPlayerDie;
|
| | | m_storeModel.RefreshBuyResultEvent -= RefreshBuySuccess;
|
| | | DeadModel.CloseRebornWinEvent -= PlayerRebornSuccess;
|
| | | HeroBehaviour.OnStartHandupAI += OnStartHandupAI;
|
| | | HeroBehaviour.OnStopHandupAI += OnStopHandupAI;
|
| | | playerPack.ItemCntAddAct += RefreshItemCnt;
|
| | | DeadModel.playerDieEvent += OnPlayerDie;
|
| | | m_storeModel.RefreshBuyResultEvent += RefreshBuySuccess;
|
| | | DeadModel.CloseRebornWinEvent += PlayerRebornSuccess;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | if (secondTimer > 1f)
|
| | | if (secondTimer >= 1f)
|
| | | {
|
| | | if(isGetNewItem)
|
| | | {
|
| | | secondTimer = 0f;
|
| | | delayTime -= 1;
|
| | | if (delayTime <= 0)
|
| | | {
|
| | | isGetNewItem = false;
|
| | | delayTime = 2f;
|
| | | DealBagItem();
|
| | | }
|
| | | }
|
| | | secondTimer = 0f;
|
| | | RefreshBagItem();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void RefreshItemCnt(PackType type, int index, int id)
|
| | | {
|
| | | RefreshBagItem();
|
| | | }
|
| | |
|
| | | public void RefreshBagItem()
|
| | | {
|
| | | if (!_isAutoHangUp)
|
| | |
| | | DebugEx.Log("请开启自动挂机,否则无法出售");
|
| | | return;
|
| | | }
|
| | |
|
| | | DealBagItem();
|
| | | isGetNewItem = true;
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | /// </summary>
|
| | | private void DealBagItem()
|
| | | {
|
| | | if (playerPack.GetReaminGridCount(PackType.rptItem) < 5)
|
| | | if (playerPack.GetReaminGridCount(PackType.rptItem) < 5 && modelInterface.isPackResetOk)
|
| | | {
|
| | | if (HangUpSetModel.Instance.GetBool(HangUpAutoBoolType.isAutoDevour))
|
| | | {
|
| | | List<ItemModel> list = playerPack.GetCanDevourModellist();
|
| | | if (list != null && list.Count > 0)
|
| | | if(playerPack.IsReachMinDecomposeNum())
|
| | | {
|
| | | playerPack.SendEquipdevourQuest();
|
| | | return;
|