Esempio n. 1
0
        public void SendMessage(OutgoingMessage message)
        {
            Core.GetStandardOut().PrintNotice(" [" + mID + "] <-- " + message.Header + message.GetContentString());

            SendData(message.GetBytes());
        }
Esempio n. 2
0
File: Friend.cs Progetto: habb0/IHI
        internal byte[] GetRawUpdate()
        {
            OutgoingMessage Message = new OutgoingMessage();
            Message.AppendBoolean(true);                            // TODO: Find out what this does

            Message.AppendUInt32(this.fUser.GetID());               // User ID
            Message.AppendString(this.fUser.GetUsername());         // Username

            Message.AppendBoolean(true);                            // Not sure what this does
            Message.AppendBoolean(this.fUser.IsLoggedIn());         // Logged In
            Message.AppendBoolean(this.fUser.GetRoom() != null);    // In Room
            Message.AppendString(this.fUser.GetFigure());           // Figure
            Message.AppendUInt32(this.fLocalCategory);              // Category ID

            if (this.fUser.IsLoggedIn())
            {
                Message.AppendString(this.fUser.GetMotto());        // Motto
                Message.AppendString("");                           // Last Access (N/A)
            }
            else
            {
                Message.AppendString("Offline");                                // Motto ("Offline" in this case)
                Message.AppendString(this.fUser.GetLastAccess().ToString());    // Last Access
            }

            return Message.GetBytes();
        }