Beispiel #1
0
        public void SendEffect(AbstractEffect effect)
        {
            int duration = effect.Duration > 0 ? effect.Duration : Config.GetEffectDuration();

            duration = (int)Math.Round(duration * effect.GetMultiplier());

            var msg = new MessageEffect()
            {
                Word     = effect.Word,
                Duration = duration,
                Voter    = effect.GetVoter(),
                Seed     = RandomHandler.Next(9999999)
            };

            socket?.Send(JsonConvert.SerializeObject(msg));
        }