OnOtherBuffApply/Remove监听

This commit is contained in:
SoulliesOfficial
2025-11-10 12:57:04 -05:00
parent 41a0990600
commit 0e66d4d0dd
29 changed files with 321 additions and 27 deletions

View File

@@ -46,6 +46,7 @@ namespace Continentis.MainGame.Character
public override void OnAfterFirstApply()
{
statusSubmodule?.AddStatus();
attachedCharacter.combatBuffSubmodule.buffList.Exclude(this).For(buff => buff.eventSubmodule?.onOtherBuffFirstApplied.Invoke(this));
}
public override void OnBuffRemove()
@@ -90,7 +91,8 @@ namespace Continentis.MainGame.Character
{
existingBuff.iconSubmodule?.Update();
}
attachedCharacter.combatBuffSubmodule.buffList.Exclude(this).For(buff => buff.eventSubmodule?.onOtherBuffApplied.Invoke(this));
RefreshAttributes();
iconSubmodule?.Update();
attachedCharacter.deckSubmodule.GetAllCards().ForEach(card => card.cardLogic.RefreshCardAttributes());
@@ -101,6 +103,7 @@ namespace Continentis.MainGame.Character
OnBuffRemove();
this.attachedCharacter.combatBuffSubmodule.buffList.Remove(this);
attachedCharacter.deckSubmodule.GetAllCards().ForEach(card => card.cardLogic.RefreshCardAttributes());
attachedCharacter.combatBuffSubmodule.buffList.Exclude(this).For(buff => buff.eventSubmodule?.onOtherBuffRemoved.Invoke(this));
}
public override void UntriggerRemove()