From ed4312ff529fd56bad20ef15eeeb1a7e45051ae3 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期四, 04 六月 2026 18:04:26 +0800
Subject: [PATCH] 花鬘复活卡死问题修复
---
Main/System/Battle/BattleObject/HeroBattleObject.cs | 30 ++++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/Main/System/Battle/BattleObject/HeroBattleObject.cs b/Main/System/Battle/BattleObject/HeroBattleObject.cs
index feceba8..c02b288 100644
--- a/Main/System/Battle/BattleObject/HeroBattleObject.cs
+++ b/Main/System/Battle/BattleObject/HeroBattleObject.cs
@@ -476,6 +476,12 @@
public override void OnDeath(Action _onDeathAnimationComplete, bool withoutAnime = false)
{
+#if UNITY_EDITOR
+ if (Launch.Instance != null && Launch.Instance.isOpenBattleDebug)
+ {
+ // BattleDebug.LogError($"[HeroBattleObject姝讳骸璇婃柇] OnDeath objId={ObjID} name={GetName()} hp={GetCurHp()} isDead={IsDead()} isReborning={IsReborning()} withoutAnime={withoutAnime} motionHash={motionBase?.GetHashCode() ?? 0}");
+ }
+#endif
buffMgr.RemoveAllBuff();
battleField.soundManager.PlayEffectSound(teamHero.heroConfig.DeathSFX, false);
if (withoutAnime)
@@ -487,6 +493,12 @@
{
motionBase.PlayDeadAnimation(() =>
{
+#if UNITY_EDITOR
+ if (Launch.Instance != null && Launch.Instance.isOpenBattleDebug)
+ {
+ // BattleDebug.LogError($"[HeroBattleObject姝讳骸璇婃柇] 姝讳骸鍔ㄧ敾鍥炶皟 objId={ObjID} name={GetName()} hp={GetCurHp()} isDead={IsDead()} isReborning={IsReborning()} motionHash={motionBase?.GetHashCode() ?? 0}");
+ }
+#endif
SetDeath();
_onDeathAnimationComplete?.Invoke();
});
@@ -511,6 +523,12 @@
// 閲婃斁鑰呭氨鏄娲昏�呮椂璋冪敤
public override void PreReborn(bool reviveSelf = false)
{
+#if UNITY_EDITOR
+ if (Launch.Instance != null && Launch.Instance.isOpenBattleDebug)
+ {
+ // BattleDebug.LogError($"[HeroBattleObject姝讳骸璇婃柇] PreReborn objId={ObjID} name={GetName()} hp={GetCurHp()} isDead={IsDead()} isReborning={IsReborning()} reviveSelf={reviveSelf} motionHash={motionBase?.GetHashCode() ?? 0}");
+ }
+#endif
heroGo.SetActive(true);
motionBase.skeletonAnim.skeleton.A = 0f;
motionBase.skeletonAnim.LateUpdate();
@@ -521,6 +539,12 @@
// 澶嶆椿action
public override void OnReborn(HB427_tagSCUseSkill.tagSCUseSkillHurt vNetData, bool reviveSelf = false, RecordAction parentAction = null)
{
+#if UNITY_EDITOR
+ if (Launch.Instance != null && Launch.Instance.isOpenBattleDebug)
+ {
+ // BattleDebug.LogError($"[HeroBattleObject姝讳骸璇婃柇] OnReborn objId={ObjID} name={GetName()} hp={GetCurHp()} isDead={IsDead()} isReborning={IsReborning()} reviveSelf={reviveSelf} motionHash={motionBase?.GetHashCode() ?? 0}");
+ }
+#endif
isReborning = true;
heroGo.SetActive(true);
motionBase.ResetForReborn(reviveSelf);
@@ -531,6 +555,12 @@
public override void AfterReborn()
{
+#if UNITY_EDITOR
+ if (Launch.Instance != null && Launch.Instance.isOpenBattleDebug)
+ {
+ // BattleDebug.LogError($"[HeroBattleObject姝讳骸璇婃柇] AfterReborn objId={ObjID} name={GetName()} hp={GetCurHp()} isDead={IsDead()} isReborning={IsReborning()} motionHash={motionBase?.GetHashCode() ?? 0}");
+ }
+#endif
// 娓呯┖鎵�鏈�
motionBase.ResetForReborn(false);
isReborning = false;
--
Gitblit v1.8.0