I am trying to learn how to integrate VitaNex into my scripts. I added this to the constructible area of a random mobile
C#:
public override void OnDeath(Container c)
{
    base.OnDeath(c);
    new EnergyWaveEffect(this.Location, this.Map, Direction.Up).Send();
}

and then this to the serial area
C#:
public class EnergyWaveEffect : BaseWaveEffect
{
    public static EffectInfo[] Info => new[]
            {
            new EffectInfo(null, null, 8448, 0, 10, 20),
            new EffectInfo(null, null, 14170, 0, 10, 30, EffectRender.LightenMore, TimeSpan.FromMilliseconds(200)),
            new EffectInfo(null, null, 14201, 0, 10, 40, EffectRender.Normal, TimeSpan.FromMilliseconds(400))
        };

    private readonly EffectInfo[] _Effects = Info;

    public override EffectInfo[] Effects => _Effects;

    public EnergyWaveEffect(
        IPoint3D start,
        Map map,
        Direction d,
        int range = 5,
        int repeat = 0,
        TimeSpan? interval = null,
        Action<EffectInfo> effectHandler = null,
        Action callback = null)
        : base(start, map, d, range, repeat, interval, effectHandler, callback)
    {
        EnableMutate = true;
    }

    public override void MutateEffect(EffectInfo e)
    {
        base.MutateEffect(e);

        if (e == null)
        {
            return;
        }

        switch (e.EffectID)
        {
            case 8448:
                e.Source = new Entity(Serial.Zero, e.Source.Location.Clone3D(zOffset: -10), e.Map);
                break;
            case 14201:
                e.Source = new Entity(Serial.Zero, e.Source.Location.Clone3D(zOffset: -5), e.Map);
                break;
        }
    }
}

It compiles fine but nothing happens on death. Any suggestions?
 
C#:
public override void OnDeath(Container c)

{

    new EnergyWaveEffect(this.Location, this.Map, Direction.Up).Send();

    base.OnDeath(c);

}
 
Back