From ed63aa36ced400b4eef79862e85498213ae40c4a Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期五, 19 十二月 2025 16:43:55 +0800
Subject: [PATCH] 0312 满星蓝卡提醒可遣散
---
Main/System/Battle/BattleObject/BattleObject.cs | 69 +++++++++++++++++++++++++---------
1 files changed, 51 insertions(+), 18 deletions(-)
diff --git a/Main/System/Battle/BattleObject/BattleObject.cs b/Main/System/Battle/BattleObject/BattleObject.cs
index d0a4b6e..40b8493 100644
--- a/Main/System/Battle/BattleObject/BattleObject.cs
+++ b/Main/System/Battle/BattleObject/BattleObject.cs
@@ -177,13 +177,19 @@
{
case PlayerDataType.HP:
long toHp = GeneralDefine.GetFactValue(_refreshInfo.Value, _refreshInfo.ValueEx);
- heroInfoBar.UpdateHP(teamHero.curHp, toHp, teamHero.maxHp, false);
+ if (!IsTianziBoss())
+ {
+ heroInfoBar.UpdateHP(teamHero.curHp, toHp, teamHero.maxHp, false);
+ }
teamHero.curHp = GeneralDefine.GetFactValue(_refreshInfo.Value, _refreshInfo.ValueEx);
// Debug.LogError("OnObjInfoRefresh " + teamHero.curHp);
break;
case PlayerDataType.MaxHP:
teamHero.maxHp = GeneralDefine.GetFactValue(_refreshInfo.Value, _refreshInfo.ValueEx);
- heroInfoBar.UpdateHP(teamHero.curHp, teamHero.curHp, teamHero.maxHp, false);
+ if (!IsTianziBoss())
+ {
+ heroInfoBar.UpdateHP(teamHero.curHp, teamHero.curHp, teamHero.maxHp, false);
+ }
break;
case PlayerDataType.XP:
long toXp = GeneralDefine.GetFactValue(_refreshInfo.Value, _refreshInfo.ValueEx);
@@ -344,14 +350,14 @@
{
PushDropItems(battleHurtParam.battleDrops);
}
- battleField.OnObjsDead(new List<HB422_tagMCTurnFightObjDead>() { battleHurtParam.deadPack });
+ battleField.OnObjsDead(new List<BattleDeadPack>() { battleHurtParam.deadPack });
}
else
{
if (dmgInfo.IsType(DamageType.Block))
{
- battleField.battleEffectMgr.PlayEffect(this, BattleConst.BlockEffectID, heroRectTrans, Camp);
+ battleField.battleEffectMgr.PlayEffect(this, BattleConst.BlockEffectID, heroRectTrans, Camp, teamHero.modelScale);
}
// else
// {
@@ -359,7 +365,7 @@
{
if (!buffMgr.isControled[BattleConst.HardControlGroup])
{
- battleField.soundManager.PlayEffectSound(teamHero.heroConfig.HitSFX);
+ battleField.soundManager.PlayEffectSound(teamHero.heroConfig.HitSFX, false);
motionBase.PlayAnimation(MotionName.hit, false);
}
}
@@ -436,16 +442,29 @@
battleField.battleTweenMgr.OnPlayTween(tween);
}
- public virtual void OnDeath(Action _onDeathAnimationComplete)
+ public virtual void OnDeath(Action _onDeathAnimationComplete, bool withoutAnime = false)
{
buffMgr.RemoveAllBuff();
- battleField.soundManager.PlayEffectSound(teamHero.heroConfig.DeathSFX);
- motionBase.PlayDeadAnimation(() =>
+ battleField.soundManager.PlayEffectSound(teamHero.heroConfig.DeathSFX, false);
+ if (withoutAnime)
{
- teamHero.isDead = true;
- OnDeadAnimationComplete();
+ SetDeath();
_onDeathAnimationComplete?.Invoke();
- });
+ }
+ else
+ {
+ motionBase.PlayDeadAnimation(() =>
+ {
+ SetDeath();
+ _onDeathAnimationComplete?.Invoke();
+ });
+ }
+ }
+
+ public void SetDeath()
+ {
+ teamHero.isDead = true;
+ OnDeadAnimationComplete();
}
protected virtual void OnDeadAnimationComplete()
@@ -460,11 +479,18 @@
public void OnReborn(HB427_tagSCUseSkill.tagSCUseSkillHurt vNetData)
{
// 澶勭悊澶嶆椿閫昏緫
- teamHero.curHp = GeneralDefine.GetFactValue(vNetData.CurHP, vNetData.CurHPEx);
- // Debug.LogError("OnReborn " + teamHero.curHp);
- teamHero.isDead = false;
- heroGo.SetActive(true);
- motionBase.ResetToIdleAnimation();
+ RebornRecordAction recordAction = new RebornRecordAction(battleField, this, () =>
+ {
+ battleField.OnObjReborn((uint)ObjID);
+
+ teamHero.curHp = GeneralDefine.GetFactValue(vNetData.CurHP, vNetData.CurHPEx);
+ heroRectTrans.anchoredPosition = Vector2.zero;
+ // Debug.LogError("OnReborn " + teamHero.curHp);
+ teamHero.isDead = false;
+ heroGo.SetActive(true);
+ motionBase.ResetForReborn();
+ });
+ battleField.recordPlayer.InsertRecord(recordAction);
}
// 浼ゅ杩樿鐪� 鏄惁闂伩 鏆村嚮 and so on 闇�瑕佹湁涓�涓狣amageType 鏈嶅姟鍣ㄥ簲璇ヤ細缁�
@@ -603,13 +629,20 @@
{
case PlayerDataType.HP:
long toHp = GeneralDefine.GetFactValue(vNetData.Value, vNetData.ValueEx);
- heroInfoBar.UpdateHP(teamHero.curHp, toHp, teamHero.maxHp, true);
+
+ if (!IsTianziBoss())
+ {
+ heroInfoBar.UpdateHP(teamHero.curHp, toHp, teamHero.maxHp, true);
+ }
teamHero.curHp = newValue;
// Debug.LogError("OnObjPropertyRefreshView " + teamHero.curHp);
break;
case PlayerDataType.MaxHP:
teamHero.maxHp = newValue;
- heroInfoBar.UpdateHP(teamHero.curHp, teamHero.curHp, teamHero.maxHp, true);
+ if (!IsTianziBoss())
+ {
+ heroInfoBar.UpdateHP(teamHero.curHp, teamHero.curHp, teamHero.maxHp, true);
+ }
break;
case PlayerDataType.XP:
long toXp = newValue;
--
Gitblit v1.8.0