Exemple #1
0
        private void On(UpdateMetaEvent e)
        {
            this.WorldName = e.WorldName;
            this.Plays     = e.Plays;
            this.Owner     = e.OwnerUsername;
            this.Favorites = e.Favorites;
            this.Likes     = e.Likes;

            new MetaChangedEvent(e.OwnerUsername, e.Plays, e.Favorites, e.Likes, e.WorldName)
            .RaiseIn(this.BotBits);
        }
Exemple #2
0
        private void OnUpdateMeta(UpdateMetaEvent e)
        {
            this.WorldName    = e.WorldName;
            this.Plays        = e.Plays;
            this.Owner        = e.OwnerUsername;
            this.CurrentWoots = e.CurrentWoots;
            this.TotalWoots   = e.TotalWoots;

            new MetaChangedEvent(e.OwnerUsername, e.Plays, e.CurrentWoots, e.TotalWoots, e.WorldName)
            .RaiseIn(this.BotBits);
        }
        /// <summary>
        /// Processes the message
        /// </summary>
        /// <param name="connectionBase">The connection base</param>
        /// <param name="message">The playerio message</param>
        /// <param name="handled">Whether the message was already handled</param>
        public void Process(ConnectionBase connectionBase, Message message, bool handled)
        {
            WorldConnection worldCon = (WorldConnection)connectionBase;
            World           world    = worldCon.World;

            if (!handled)
            {
                world.Owner      = message.GetString(0);
                world.Title      = message.GetString(1);
                world.Plays      = message.GetInt(2);
                world.Woots      = message.GetInt(3);
                world.TotalWoots = message.GetInt(4);
            }

            UpdateMetaEvent updateMetaEvent = new UpdateMetaEvent()
            {
                Raw   = message,
                World = world
            };

            connectionBase.RaiseServerEvent <UpdateMetaEvent>(updateMetaEvent);
        }