From 2fc938c7d82d6a194fa0dfd2acca1cd41f4c9a87 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期一, 19 十一月 2018 15:35:31 +0800
Subject: [PATCH] 2398 【BUG】【1.3】符印合成特效显示错误
---
Utility/EnumHelper.cs | 3 ++-
System/Rune/RuneComposeWin.cs | 29 +++++++++++++++++------------
2 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/System/Rune/RuneComposeWin.cs b/System/Rune/RuneComposeWin.cs
index b1e1461..197b80e 100644
--- a/System/Rune/RuneComposeWin.cs
+++ b/System/Rune/RuneComposeWin.cs
@@ -45,8 +45,6 @@
[SerializeField] UIEffect m_RuneComposeEffect;
- private bool m_PlayEffect = false;
-
[SerializeField] Button m_ComposeBtn;
[SerializeField] RedpointBehaviour m_ComposeRedpoint;
@@ -89,10 +87,10 @@
protected override void OnPreOpen()
{
- m_PlayEffect = false;
runeModel.OnRefreshRuneTowerLv += OnRefreshRuneTowerLv;
runeModel.OnRefreshRunePack += RefreshRuneCompose;
PlayerDatas.Instance.PlayerDataRefreshInfoEvent += OnRefreshPlayerInfo;
+ DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent += MakeItemAnswerEvent;
RefreshRuneType();
RefreshRuneCompose();
}
@@ -106,6 +104,7 @@
runeModel.OnRefreshRuneTowerLv -= OnRefreshRuneTowerLv;
runeModel.OnRefreshRunePack -= RefreshRuneCompose;
PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= OnRefreshPlayerInfo;
+ DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent -= MakeItemAnswerEvent;
}
protected override void OnAfterClose()
@@ -131,6 +130,21 @@
UIHelper.AppendStringColor(TextColType.Red, _magicEssence.ToString()), "/", _cfg.NeedMJ);
}
}
+
+ private void MakeItemAnswerEvent(H0721_tagMakeItemAnswer package)
+ {
+ if (package.MakeType == (int)MakeType.Def_mitRuneCompound)
+ {
+ if (package.Result == 1)
+ {
+ if (m_RuneComposeEffect != null)
+ {
+ m_RuneComposeEffect.Play();
+ }
+ }
+ }
+ }
+
void RefreshRuneCompose()
{
RuneComposeConfig _cfg = model.GetRuneCompose(model.presentSelectRuneQuality, model.presentSelectComposeRune);
@@ -142,12 +156,6 @@
m_Rune1LockImg.gameObject.SetActive(_cfg == null);
m_Rune2LockImg.gameObject.SetActive(_cfg == null);
m_ComposeBtn.gameObject.SetActive(_cfg != null);
-
- if (m_PlayEffect)
- {
- m_RuneComposeEffect.Play();
- m_PlayEffect = false;
- }
if (_cfg != null)
{
@@ -238,14 +246,12 @@
}
model.presentSelectComposeRune = cell.index;
scrollerController.m_Scorller.RefreshActiveCellViews();
- m_PlayEffect = false;
RefreshRuneCompose();
}
private void OnRuneQualityClick(CellView cell)
{
model.presentSelectRuneQuality = model.presentSelectRuneQuality == cell.index ? 0 : cell.index;
model.presentSelectComposeRune = -1;
- m_PlayEffect = false;
RefreshRuneType();
RefreshRuneCompose();
}
@@ -285,7 +291,6 @@
}
if (_rune1 != null && _rune2 != null)
{
- m_PlayEffect = true;
CA578_tagCMRuneCompound _pak = new CA578_tagCMRuneCompound();
_pak.TagItemID = (uint)_cfg.TagItemID;
_pak.Cnt = 2;
diff --git a/Utility/EnumHelper.cs b/Utility/EnumHelper.cs
index 44088f1..98a0698 100644
--- a/Utility/EnumHelper.cs
+++ b/Utility/EnumHelper.cs
@@ -799,7 +799,8 @@
Def_mitRefine = 18, // 鐐间腹
Def_mitMWUpLevel = 19, //娉曞疂杩涢樁
Def_DanRecycle = 20, //涓硅嵂鍥炴敹
- Def_mitDogzEquipPlus=21,// 绁炲吔瑁呭寮哄寲
+ Def_mitDogzEquipPlus = 21,// 绁炲吔瑁呭寮哄寲
+ Def_mitRuneCompound = 22,//绗﹀嵃鍚堟垚
}
/// <summary>
/// 閲戦挶绫诲瀷(铏氭嫙鐗╁搧)
--
Gitblit v1.8.0