Beispiel #1
0
 public void Serialize(ServerMessage message)
 {
     message.AppendUInt32(mID);
     message.AppendString(mUsername);
     message.AppendBoolean(true);
     message.AppendBoolean(true);
     message.AppendBoolean(false);
     message.AppendString(mFigure);
     message.AppendBoolean(false);
     message.AppendString(mMotto);
     message.AppendString("1-1-1970");
 }
Beispiel #2
0
 public void Serialize(ServerMessage message)
 {
     message.AppendUInt32(mID);
     message.AppendBoolean(false);
     message.AppendString(mName);
     message.AppendString(mOwnerName);
     message.AppendInt32((int)mAccessType);
     message.AppendInt32((int)mVisitors);
     message.AppendInt32((int)mMaxVisitors);
     message.AppendString(mDescription);
     message.AppendBoolean(false); // All rights
     message.AppendBoolean(false); // Allow trading
 }
Beispiel #3
0
        /// <summary>
        /// Adds activity points to this Habbo and notifies the client.
        /// </summary>
        /// <param name="amount">The amount of activity points to add.</param>
        public void AddActivityPoints(uint amount)
        {
            if (mHabbo != null)
            {
                // Add points
                mHabbo.ActivityPoints += amount;

                // Notify client
                ServerMessage notify = new ServerMessage(ResponseOpcodes.HabboActivityPointNotification);
                notify.AppendUInt32(mHabbo.ActivityPoints);
                notify.AppendUInt32(amount);
                this.GetConnection().SendMessage(notify);

                // Update user
                this.SaveUserObject();
            }
        }
Beispiel #4
0
        /// <summary>
        /// 33 - "@a"
        /// </summary>
        private void SendMsg()
        {
            uint buddyID = Request.PopWireduint();
            string sText = Request.PopFixedString();

            // Buddy in list?
            if (mSession.GetMessenger().GetBuddy(buddyID) != null)
            {
                // Buddy online?
                GameClient buddyClient = IonEnvironment.GetHabboHotel().GetClients().GetClientOfHabbo(buddyID);
                if (buddyClient == null)
                {
                    Response.Initialize(ResponseOpcodes.InstantMessageError); // Opcode
                    Response.AppendInt32(5); // Error code
                    Response.AppendUInt32(mSession.GetHabbo().ID);
                    SendResponse();
                }
                else
                {
                    ServerMessage notify = new ServerMessage(ResponseOpcodes.NewConsole);
                    notify.AppendUInt32(mSession.GetHabbo().ID);
                    notify.AppendString(sText);
                    buddyClient.GetConnection().SendMessage(notify);
                }
            }
        }