From b2d13700fa68c7f334fccb7d4f3c3f7e02a66b8e Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期四, 04 七月 2019 10:11:57 +0800
Subject: [PATCH] 7774 【2.0.200】【开发】灵根升品显示特效
---
System/SelectRole/SelectRoleBehaviour.cs | 2 ++
System/Equip/EquipModel.cs | 8 ++++----
UI/Common/UI3DShowHero.cs | 8 +++++---
Core/GameEngine/Model/Config/ReikiRootEffectConfig.cs | 9 ++++++---
Core/GameEngine/Model/Config/ReikiRootEffectConfig.cs.meta | 2 +-
UI/Common/UI3DModelExhibition.cs | 4 ++--
System/Role/ReikiRootQualityPromoteWin.cs | 9 +++++++++
Core/GameEngine/Model/Player/Character/PlayerBaseData.cs | 16 ++++++++++++++++
8 files changed, 45 insertions(+), 13 deletions(-)
diff --git a/Core/GameEngine/Model/Config/ReikiRootEffectConfig.cs b/Core/GameEngine/Model/Config/ReikiRootEffectConfig.cs
index 7c45aa3..59a0a81 100644
--- a/Core/GameEngine/Model/Config/ReikiRootEffectConfig.cs
+++ b/Core/GameEngine/Model/Config/ReikiRootEffectConfig.cs
@@ -1,6 +1,6 @@
锘�//--------------------------------------------------------
// [Author]: Fish
-// [ Date ]: Wednesday, July 03, 2019
+// [ Date ]: Thursday, July 04, 2019
//--------------------------------------------------------
using System.Collections.Generic;
@@ -17,7 +17,8 @@
public readonly int id;
public readonly int quality;
public readonly int effect;
- public readonly int uiScale;
+ public readonly int uiScale;
+ public readonly int offsetY;
public ReikiRootEffectConfig()
{
@@ -37,7 +38,9 @@
int.TryParse(tables[3],out effect);
- int.TryParse(tables[4],out uiScale);
+ int.TryParse(tables[4],out uiScale);
+
+ int.TryParse(tables[5],out offsetY);
}
catch (Exception ex)
{
diff --git a/Core/GameEngine/Model/Config/ReikiRootEffectConfig.cs.meta b/Core/GameEngine/Model/Config/ReikiRootEffectConfig.cs.meta
index 8545b34..f355e04 100644
--- a/Core/GameEngine/Model/Config/ReikiRootEffectConfig.cs.meta
+++ b/Core/GameEngine/Model/Config/ReikiRootEffectConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: a2e46f2557ae97f40a17d7d92d04e4f6
-timeCreated: 1562148448
+timeCreated: 1562206024
licenseType: Pro
MonoImporter:
serializedVersion: 2
diff --git a/Core/GameEngine/Model/Player/Character/PlayerBaseData.cs b/Core/GameEngine/Model/Player/Character/PlayerBaseData.cs
index ad0e082..83e72e6 100644
--- a/Core/GameEngine/Model/Player/Character/PlayerBaseData.cs
+++ b/Core/GameEngine/Model/Player/Character/PlayerBaseData.cs
@@ -80,6 +80,22 @@
public int godWeaponLV_3;
public int godWeaponLV_4;
+ public int reikiRootEffectId
+ {
+ get
+ {
+ return (int)equipShowSwitch / 1000 % 1000;
+ }
+ }
+
+ public int suitLevel
+ {
+ get
+ {
+ return (int)equipShowSwitch / 10 % 100;
+ }
+ }
+
public void UpdateData(H0102_tagCDBPlayer _serverInfo)
{
if (_serverInfo.socketType == ServerType.Main)
diff --git a/System/Equip/EquipModel.cs b/System/Equip/EquipModel.cs
index a772881..d89223a 100644
--- a/System/Equip/EquipModel.cs
+++ b/System/Equip/EquipModel.cs
@@ -427,7 +427,7 @@
public EquipAppearance GetAppearance()
{
- var level = PlayerDatas.Instance.baseData.equipShowSwitch / 10;
+ var level = PlayerDatas.Instance.baseData.suitLevel;
var isSuit = PlayerDatas.Instance.baseData.equipShowSwitch % 10 > 0;
var appearance = GetAppearance((int)level);
@@ -665,7 +665,7 @@
case PlayerDataType.EquipShowSwitch:
UpdateAppearanceState(selectedLevel.value);
- var level = (int)PlayerDatas.Instance.baseData.equipShowSwitch / 10;
+ var level = (int)PlayerDatas.Instance.baseData.suitLevel;
if (level != 0 && level == selectedLevel.value)
{
var equipSet = GetEquipSet(level);
@@ -754,7 +754,7 @@
equipDirty = true;
}
- if (clientPlace.x == PlayerDatas.Instance.baseData.equipShowSwitch / 10)
+ if (clientPlace.x == PlayerDatas.Instance.baseData.suitLevel)
{
if (appearanceChangeEvent != null)
{
@@ -850,7 +850,7 @@
private void UpdateAppearanceState(int level)
{
- isAppearanceLevel.value = level == PlayerDatas.Instance.baseData.equipShowSwitch / 10;
+ isAppearanceLevel.value = level == PlayerDatas.Instance.baseData.suitLevel;
}
private void UpdateSuitPlaces(int level, int star)
diff --git a/System/Role/ReikiRootQualityPromoteWin.cs b/System/Role/ReikiRootQualityPromoteWin.cs
index 28c6f67..c5bcb55 100644
--- a/System/Role/ReikiRootQualityPromoteWin.cs
+++ b/System/Role/ReikiRootQualityPromoteWin.cs
@@ -14,6 +14,7 @@
public class ReikiRootQualityPromoteWin : Window
{
+ [SerializeField] RawImage m_RawRole;
[SerializeField] ScrollRect m_Scroller;
[SerializeField] VerticalLayoutGroup m_Layout;
[SerializeField] ReikiRootPromoteBehaviour[] m_ReikiRootBehaviours;
@@ -49,10 +50,12 @@
protected override void OnAfterOpen()
{
+ DisplayPlayer();
}
protected override void OnPreClose()
{
+ UI3DModelExhibition.Instance.StopShow();
}
protected override void OnAfterClose()
@@ -104,6 +107,12 @@
}
}
+ void DisplayPlayer()
+ {
+ m_RawRole.gameObject.SetActive(true);
+ UI3DModelExhibition.Instance.ShowPlayer(m_RawRole, PlayerDatas.Instance.baseData.Job);
+ }
+
private void OnClose()
{
if ((DateTime.Now - openTime).TotalSeconds < 2f)
diff --git a/System/SelectRole/SelectRoleBehaviour.cs b/System/SelectRole/SelectRoleBehaviour.cs
index fa54863..cdaad2a 100644
--- a/System/SelectRole/SelectRoleBehaviour.cs
+++ b/System/SelectRole/SelectRoleBehaviour.cs
@@ -26,6 +26,7 @@
var secondaryItemId = 0;
var suitLevel = (int)PlayerDatas.Instance.loginInfo.EquipShowSwitch % 10;
var equipInfos = PlayerDatas.Instance.loginInfo.EquipInfo;
+ var reikiRootEffectId = (int)PlayerDatas.Instance.loginInfo.EquipShowSwitch / 1000 % 1000;
for (int i = 0; i < equipInfos.Length; i++)
{
@@ -68,6 +69,7 @@
wingsId = wingsItemId,
fashionSecondaryId = fashionSecondary,
secondaryId = secondaryItemId,
+ reikiRootEffectId = reikiRootEffectId,
};
ceateRoleCamera.gameObject.SetActive(true);
diff --git a/UI/Common/UI3DModelExhibition.cs b/UI/Common/UI3DModelExhibition.cs
index 31ba23d..4f78db9 100644
--- a/UI/Common/UI3DModelExhibition.cs
+++ b/UI/Common/UI3DModelExhibition.cs
@@ -175,7 +175,7 @@
public void ShowPlayer(RawImage rawImage, int job, bool isDialogue = false)
{
var apperance = equipModel.GetAppearance();
- var reikiRootEffectId = PlayerDatas.Instance.baseData.equipShowSwitch / 1000 % 1000;
+ var reikiRootEffectId = PlayerDatas.Instance.baseData.reikiRootEffectId;
var data = new UI3DPlayerExhibitionData
{
job = job,
@@ -197,7 +197,7 @@
public void ShowPlayer(RawImage rawImage, int job, RoleEquipType exceptEquip)
{
var apperance = equipModel.GetAppearance();
- var reikiRootEffectId = PlayerDatas.Instance.baseData.equipShowSwitch / 1000 % 1000;
+ var reikiRootEffectId = PlayerDatas.Instance.baseData.reikiRootEffectId;
var data = new UI3DPlayerExhibitionData
{
job = job,
diff --git a/UI/Common/UI3DShowHero.cs b/UI/Common/UI3DShowHero.cs
index 4133dcb..db33277 100644
--- a/UI/Common/UI3DShowHero.cs
+++ b/UI/Common/UI3DShowHero.cs
@@ -721,17 +721,19 @@
HideReikiRootEffect();
if (id != 0 && ReikiRootEffectConfig.Has(id) && clothesModel)
{
- if (reikiRootShowPoint == null)
+ if (reikiRootShowPoint == null && showPoint.parent != null)
{
reikiRootShowPoint = new GameObject("ReikiRootShowPoint");
- reikiRootShowPoint.transform.SetParentEx(showPoint.parent, Vector3.zero, Quaternion.identity, Vector3.one);
+ reikiRootShowPoint.transform.SetParentEx(showPoint.parent, showPoint.localPosition, showPoint.rotation, showPoint.localScale);
}
var config = ReikiRootEffectConfig.Get(id);
- reikiRootEffect = SFXPlayUtility.Instance.Play(config.effect, reikiRootShowPoint.transform);
+ reikiRootEffect = SFXPlayUtility.Instance.Play(config.effect, reikiRootShowPoint == null ? showPoint : reikiRootShowPoint.transform);
if (reikiRootEffect != null)
{
var scale = config.uiScale / 100f;
+ var offsetY = config.offsetY / 100f;
reikiRootEffect.transform.localScale = Vector3.one * scale;
+ reikiRootEffect.transform.localPosition = reikiRootEffect.transform.localPosition.SetY(offsetY);
}
}
}
--
Gitblit v1.8.0