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

27 lines
660 B
C#

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;
}
protected override void _OnRemove()
{
base._OnRemove();
owner.fightData.specialAttakcLogicId = _cacheAttackLogicId;
}
}
}