From 1d62f28e8b60441d6434fd950cd1c597e1372e14 Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期三, 26 九月 2018 11:30:51 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/KnapSack/Logic/PackModelInterface.cs | 11 +++
System/Compose/New/ComposeWinModel.cs | 4 +
System/BlastFurnace/BlastFurnaceModel.cs | 90 +++++++++++++++---------------
System/KnapSack/Logic/PlayerPackModels.cs | 36 +++++++++---
System/SystemSetting/SettingEffectMgr.cs | 29 +--------
5 files changed, 91 insertions(+), 79 deletions(-)
diff --git a/System/BlastFurnace/BlastFurnaceModel.cs b/System/BlastFurnace/BlastFurnaceModel.cs
index 04a1403..5bc948f 100644
--- a/System/BlastFurnace/BlastFurnaceModel.cs
+++ b/System/BlastFurnace/BlastFurnaceModel.cs
@@ -1251,51 +1251,51 @@
}
}
#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());
+ // }
+ //}
}
diff --git a/System/Compose/New/ComposeWinModel.cs b/System/Compose/New/ComposeWinModel.cs
index f100981..241d6be 100644
--- a/System/Compose/New/ComposeWinModel.cs
+++ b/System/Compose/New/ComposeWinModel.cs
@@ -861,7 +861,9 @@
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;
diff --git a/System/KnapSack/Logic/PackModelInterface.cs b/System/KnapSack/Logic/PackModelInterface.cs
index e7b7e93..53a259b 100644
--- a/System/KnapSack/Logic/PackModelInterface.cs
+++ b/System/KnapSack/Logic/PackModelInterface.cs
@@ -489,6 +489,15 @@
}
}
+ if(playerPack.CheckIsDrugById(itemModel.itemId))
+ {
+ if(itemModel.chinItemModel.RealmLimit > PlayerDatas.Instance.baseData.realmLevel)
+ {
+ isReach = false;
+ return isReach;
+ }
+ }
+
switch (itemModel.chinItemModel.Type)
{
case 8:
@@ -554,6 +563,8 @@
return isReach;
}
break;
+ case 39:
+ break;
case 52:
if (!strengthDatas.IsHint(itemModel.itemId))
{
diff --git a/System/KnapSack/Logic/PlayerPackModels.cs b/System/KnapSack/Logic/PlayerPackModels.cs
index 8b4bfc1..7d132da 100644
--- a/System/KnapSack/Logic/PlayerPackModels.cs
+++ b/System/KnapSack/Logic/PlayerPackModels.cs
@@ -1230,10 +1230,9 @@
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
@@ -1309,9 +1308,12 @@
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)
@@ -1380,17 +1382,33 @@
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;
diff --git a/System/SystemSetting/SettingEffectMgr.cs b/System/SystemSetting/SettingEffectMgr.cs
index 1722176..20b6012 100644
--- a/System/SystemSetting/SettingEffectMgr.cs
+++ b/System/SystemSetting/SettingEffectMgr.cs
@@ -60,13 +60,11 @@
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;
@@ -102,19 +100,10 @@
}
}
- if (secondTimer > 1f)
+ if (secondTimer >= 1f)
{
- if(isGetNewItem)
- {
- secondTimer = 0f;
- delayTime -= 1;
- if (delayTime <= 0)
- {
- isGetNewItem = false;
- delayTime = 2f;
- DealBagItem();
- }
- }
+ secondTimer = 0f;
+ RefreshBagItem();
}
}
@@ -153,11 +142,6 @@
}
}
- private void RefreshItemCnt(PackType type, int index, int id)
- {
- RefreshBagItem();
- }
-
public void RefreshBagItem()
{
if (!_isAutoHangUp)
@@ -165,9 +149,7 @@
DebugEx.Log("璇峰紑鍚嚜鍔ㄦ寕鏈猴紝鍚﹀垯鏃犳硶鍑哄敭");
return;
}
-
DealBagItem();
- isGetNewItem = true;
}
/// <summary>
@@ -175,12 +157,11 @@
/// </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;
--
Gitblit v1.8.0