45 lines
1.4 KiB
C#
Executable File
45 lines
1.4 KiB
C#
Executable File
using Cal;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace ET
|
|
{
|
|
public class ModifierLogicDstroySystem: DestroySystem<ModifierLogic>
|
|
{
|
|
public override void Destroy(ModifierLogic self)
|
|
{
|
|
self.overlay = 0;
|
|
self.interval = 0;
|
|
self.leastTime = 0;
|
|
self.shield = 0;
|
|
self.multiDamageX10000 = 0;
|
|
self.playAmount = 0;
|
|
self.modifierConfig = null;
|
|
self.cancellationToken?.Cancel();
|
|
self.cancellationToken = null;
|
|
self.skillConfigId = 0;
|
|
self.owner = null;
|
|
self.target = null;
|
|
}
|
|
}
|
|
|
|
public static class ModifierLogicSystem
|
|
{
|
|
public static void HandleEvent(this ModifierLogic self, ModifierEventCondition modifierEventCondition, ISkillSender skillSender)
|
|
{
|
|
Dictionary<ModifierEventCondition, SkillOptionBase[]> dic = self.modifierConfig.modifierEventDic;
|
|
if (dic == null) return;
|
|
if (!dic.TryGetValue(modifierEventCondition, out SkillOptionBase[] list))
|
|
{
|
|
return;
|
|
}
|
|
|
|
foreach (SkillOptionBase item in list)
|
|
{
|
|
SkillOptionLogicBase skillOptionLogicBase = SkillOptionFactory.AcquireSkillOptionLogic(item);
|
|
skillOptionLogicBase.HandleEvent(skillSender);
|
|
}
|
|
}
|
|
}
|
|
} |