public void StopEffect(Common.Effect effect, Objects.Object performer) { if (effect == Common.Effect.None) return; if (performer == null) lua.ArgumentError(1, "Performer cannot be null"); performer.Publish(new Events.NetworkOut { Action = (ep) => { server.NetworkOut.StopEffect(ep, performer.Id, effect); } }); }
public void PlayEffectWaveFromUnit(Common.Effect effect, Objects.Object unit, Objects.Object target) { if (effect == Common.Effect.None) return; if (unit == null) lua.ArgumentError(2, "Unit cannot be null"); if (target == null) lua.ArgumentError(2, "Target cannot be null"); unit.Publish(new Events.NetworkOut { Action = (ep) => { server.NetworkOut.PlayEffectWaveFromUnit(ep, unit.Id, target.Id, effect); } }); }
public void PlayEffectAtUnitWithLength(Common.Effect effect, Objects.Object unit, float length) { if (effect == Common.Effect.None) return; if (unit == null) lua.ArgumentError(2, "Unit cannot be null"); unit.Publish(new Events.NetworkOut { Action = (ep) => { server.NetworkOut.PlayEffectAtUnitWithLength(ep, unit.Id, effect, length); } }); }
public void PlayEffectMissileToUnit(Common.Effect effect, Objects.Object performer, Objects.Object target, float speed) { if (effect == Common.Effect.None) return; if (performer == null) lua.ArgumentError(1, "Performer cannot be null"); if (target == null) lua.ArgumentError(2, "Target cannot be null"); float time = (target.Position - performer.Position).Length() / speed; performer.Publish(new Events.NetworkOut { Action = (ep) => { server.NetworkOut.PlayEffectMissileToUnit(ep, performer.Id, target.Id, time, effect); } }); }
public void PlayAnimation(String name, Objects.Object performer) { if (performer == null) lua.ArgumentError(1, "Performer cannot be null"); performer.Publish(new Events.NetworkOut { Action = (ep) => { server.NetworkOut.PlayAnimation(ep, performer.Id, name); } }); }