NLDClient-yudde/ProjectNLD/Assets/Code/Scripts/Gameplay/Buff/Impl/BuffChangeAttackLogic.cs

27 lines
660 B
C#
Raw Normal View History

2024-05-17 14:20:53 +08:00
namespace Gameplay.Buff
{
public class BuffChangeAttackLogic : BaseBuff
{
private int _cacheAttackLogicId;
protected override void _OnAdd()
{
base._OnAdd();
_cacheAttackLogicId = owner.fightData.specialAttakcLogicId;
var configAttackLogicId = _TryGetIntParam(0);
owner.fightData.specialAttakcLogicId = configAttackLogicId;
owner.controlData.forceUpdateTarget = true;
2024-05-17 14:20:53 +08:00
}
protected override void _OnRemove()
{
base._OnRemove();
owner.fightData.specialAttakcLogicId = _cacheAttackLogicId;
}
}
}