public override void Execute(GameCommandTrigger trigger) { bool enable = trigger.Get <byte>("enable") == 1; if (!enable) { trigger.Session.Send(TimeScalePacket.SetTimeScale(false, 0, 0, 0, 0)); return; } float startScale = trigger.Get <float>("startScale"); float endScale = trigger.Get <float>("endScale"); float duration = trigger.Get <float>("duration"); byte interpolator = trigger.Get <byte>("interpolator"); bool broadcast = trigger.Get <byte>("broadcast") == 1; PacketWriter packet = TimeScalePacket.SetTimeScale(true, startScale, endScale, duration, interpolator); if (broadcast) { trigger.Session.FieldManager.BroadcastPacket(packet); return; } trigger.Session.Send(packet); }
public void SetTimeScale(bool enable, float startScale, float endScale, float duration, byte interpolator) { Field.BroadcastPacket(TimeScalePacket.SetTimeScale(enable, startScale, endScale, duration, interpolator)); }