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

@@ -1,6 +1,7 @@
using System.Linq;
using Continentis.MainGame.Card;
using Continentis.MainGame.Character;
using SLSFramework.General;
using UnityEngine;
namespace Continentis.MainGame.Card
@@ -32,6 +33,7 @@ namespace Continentis.MainGame.Card
public override void OnBuffRemove()
{
//attachedCard.combatBuffSubmodule.buffList.For(buff => buff.eventSubmodule.onOtherBuffRemoved.Invoke(this));
attributeSubmodule?.RefreshAllModifiedAttributes();
}
@@ -94,7 +96,8 @@ namespace Continentis.MainGame.Card
public override void Remove()
{
OnBuffRemove();
this.attachedCard.combatBuffSubmodule.buffList.Remove(this);
attachedCard.combatBuffSubmodule.buffList.Remove(this);
//attachedCard.combatBuffSubmodule.buffList.Exclude(this).For(buff => buff.eventSubmodule?.onOtherBuffRemoved.Invoke(this));
}
public override void UntriggerRemove()

View File

@@ -41,7 +41,7 @@ namespace Continentis.MainGame.Card
/// </summary>
public static CardLogicBase GenerateCardLogic(CardData data)
{
string typeID = ModManager.GetTypeID(data.modName, "Cards", data.className);
string typeID = ModManager.GetTypeID(data.modName, "Cards", data.categoryName, data.className);
Type logicType = ModManager.GetType(typeID);
if(logicType == null)