除了充盈都做完了
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Continentis.MainGame;
|
||||
using Continentis.MainGame.Character;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Buffs
|
||||
@@ -34,6 +35,14 @@ namespace Continentis.Mods.Basic.Buffs
|
||||
public override bool OnBuffApply(out CharacterCombatBuffBase existingBuff)
|
||||
{
|
||||
MainGameManager.Instance.basePrefabs.GenerateInfoText(contentSubmodule.displayName, attachedCharacter.characterView);
|
||||
|
||||
if (attachedCharacter.combatBuffSubmodule.TryGetBuff(out Protected conflictProtected))
|
||||
{
|
||||
//如果目标已经有Protected Buff,则应当将其移除,以防止冲突.
|
||||
//使用移除所有保护者的方式来移除。
|
||||
Debug.Log($"Conflicted Protected buff found, with {conflictProtected.protectingSources.Count} protecting sources. Removing all.");
|
||||
conflictProtected.protectingSources.For(ps => ps.Remove());
|
||||
}
|
||||
|
||||
if (FindExistingSameBuff(out existingBuff))
|
||||
{
|
||||
@@ -46,13 +55,12 @@ namespace Continentis.Mods.Basic.Buffs
|
||||
existProtecting.roundCountSubmodule.AddCount(this.roundCountSubmodule.remainingCount);
|
||||
return false;
|
||||
}
|
||||
|
||||
this.protectedBuff ??= target.combatBuffSubmodule.GetBuff<Protected>();
|
||||
this.protectedBuff.protectingSources.Add(this);
|
||||
return true; //独立处理,直接返回true
|
||||
}
|
||||
|
||||
Debug.Log("No existing same buff found.");
|
||||
this.protectedBuff ??= target.combatBuffSubmodule.GetBuff<Protected>();
|
||||
this.protectedBuff.protectingSources.Add(this);
|
||||
Debug.Log(protectedBuff.protectingSources.Count);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user