From 2fcb2c11e225352c85a26e3b8cb3d71d4fba68c1 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期二, 09 十月 2018 14:38:26 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/SystemSetting/SettingEffectMgr.cs | 49 ++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 46 insertions(+), 3 deletions(-)
diff --git a/System/SystemSetting/SettingEffectMgr.cs b/System/SystemSetting/SettingEffectMgr.cs
index acc5687..f420d9e 100644
--- a/System/SystemSetting/SettingEffectMgr.cs
+++ b/System/SystemSetting/SettingEffectMgr.cs
@@ -52,6 +52,8 @@
private float delayTime = 2f;
private bool isGetNewItem = false;
+ public bool isStartDecompose { get; set; }
+ public bool isStartOneKeySell { get; set; }
private void Awake()
{
@@ -68,15 +70,21 @@
DeadModel.playerDieEvent += OnPlayerDie;
m_storeModel.RefreshBuyResultEvent += RefreshBuySuccess;
DeadModel.CloseRebornWinEvent += PlayerRebornSuccess;
+ playerPack.RefreshDecomAttrAct += DecomposeSuccess;
+ DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent += OneKeySellSuccess;
}
+
public void Begin()
{
-
+ isStartDecompose = false;
+ isStartOneKeySell = false;
}
float secondTimer = 0;
float halfSecondTimer = 0;
+ float autoSellCoolTimer = 0;
+ float autoDecomposeCoolTimer = 0;
private void LateUpdate()
{
if (!(StageManager.Instance.CurrentStage is DungeonStage))
@@ -100,11 +108,32 @@
}
}
+ if(isStartDecompose)
+ {
+ autoDecomposeCoolTimer += Time.deltaTime;
+ if(autoDecomposeCoolTimer >= 5f)
+ {
+ autoDecomposeCoolTimer = 0;
+ isStartDecompose = false;
+ }
+ }
+
+ if (isStartOneKeySell)
+ {
+ autoSellCoolTimer += Time.deltaTime;
+ if (autoSellCoolTimer >= 5f)
+ {
+ autoSellCoolTimer = 0;
+ isStartOneKeySell = false;
+ }
+ }
+
if (secondTimer >= 1f)
{
secondTimer = 0f;
RefreshBagItem();
}
+
}
private void PlayerRebornSuccess()
@@ -112,6 +141,18 @@
isPlayerDie = false;
}
+ private void OneKeySellSuccess(H0721_tagMakeItemAnswer obj)
+ {
+ if (obj.MakeType != (byte)MakeType.Def_mitKeySell)
+ return;
+
+ isStartOneKeySell = false;
+ }
+
+ private void DecomposeSuccess()
+ {
+ isStartDecompose = false;
+ }
public bool GetSettingEffect()
{
@@ -158,7 +199,7 @@
{
if (playerPack.GetReaminGridCount(PackType.rptItem) < 5 && modelInterface.isPackResetOk)
{
- if (HangUpSetModel.Instance.GetBool(HangUpAutoBoolType.isAutoDevour))
+ if (HangUpSetModel.Instance.GetBool(HangUpAutoBoolType.isAutoDevour) && !isStartDecompose)
{
if(playerPack.IsReachMinDecomposeNum())
{
@@ -167,7 +208,9 @@
}
}
- if (HangUpSetModel.Instance.GetBool(HangUpAutoBoolType.isAutoSell) && modelInterface.GetSellItemList().Count > 0)
+ if (HangUpSetModel.Instance.GetBool(HangUpAutoBoolType.isAutoSell)
+ && !isStartOneKeySell
+ && modelInterface.GetSellItemList().Count > 0)
{
modelInterface.SendOneKeySellQuest(modelInterface.GetSellItemList());
return;
--
Gitblit v1.8.0