Chat Console

wow97

New Member
Apr 14, 2019
6
0
I have a big problem whit Chat Console.. I see double user.
You must be registered for see images attach











C#:
/// <summary>
        /// Called when [status changed].
        /// </summary>
        /// <param name="notification">if set to <c>true</c> [notification].</param>
        internal void OnStatusChanged(bool notification)
        {
            if (Friends == null)
                return;

            IEnumerable<GameClient> onlineUsers = Plus.GetGame().GetClientManager().GetClientsById(Friends.Keys);

            foreach (GameClient client in onlineUsers)
            {
                if (client == null || client.GetHabbo() == null || client.GetHabbo().GetMessenger() == null)
                    continue;

                client.GetHabbo().GetMessenger().UpdateFriend(_userId, client, true);
                if (client.GetHabbo() != null && client != null && notification != null)
                {
                    if (client.GetHabbo().Id != null && client.GetHabbo().Id != 0)
                    {
                        UpdateFriend(client.GetHabbo().Id, client, notification);
                    }
                }
            }
        }

        /// <summary>
        /// Updates the friend.
        /// </summary>
        /// <param name="userid">The userid.</param>
        /// <param name="client">The client.</param>
        /// <param name="notification">if set to <c>true</c> [notification].</param>
        internal void UpdateFriend(uint userid, GameClient client, bool notification)
        {
            if (!Friends.ContainsKey(userid))
                return;
            Friends[userid].UpdateUser();
            if (!notification)
                return;
            var client2 = GetClient();
            if (client2 != null)
                client2.SendMessage(SerializeUpdate(Friends[userid]));
        }
Code:
 

LaPatron

Smile, because it confuses people.
Nov 23, 2017
72
155
Ok i use retialation v2... And, i see double table in the db... (Sorry for my english. Paste screen)


You must be registered for see images attach


He meant if you had duplicate records of each friendship instance between two user (ids), which you don't as far as the screenshot suggests. I believe this is an issue with your emulator.
 

wow97

New Member
Apr 14, 2019
6
0
He meant if you had duplicate records of each friendship instance between two user (ids), which you don't as far as the screenshot suggests. I believe this is an issue with your emulator.


Forgive me I am not so inclined for the emulators, however I found this:


C#:
 Response.Init(LibraryParser.OutgoingRequest("UserProfileMessageComposer"));
            Response.AppendInteger(habbo.Id);
            Response.AppendString(habbo.UserName);
            Response.AppendString(habbo.Look);
            Response.AppendString(habbo.Motto);
            Response.AppendString(createTime.ToString("dd/MM/yyyy"));
            Response.AppendInteger(habbo.AchievementPoints);
            Response.AppendInteger(GetFriendsCount(userId));
            Response.AppendBool(habbo.Id != Session.GetHabbo().Id &&
                                Session.GetHabbo().GetMessenger().FriendshipExists(habbo.Id));
            Response.AppendBool(habbo.Id != Session.GetHabbo().Id &&
                                !Session.GetHabbo().GetMessenger().FriendshipExists(habbo.Id) &&
                                Session.GetHabbo().GetMessenger().RequestExists(habbo.Id));
            Response.AppendBool(Plus.GetGame().GetClientManager().GetClientByUserId(habbo.Id) != null);
            var groups = Plus.GetGame().GetGroupManager().GetUserGroups(habbo.Id);
            Response.AppendInteger(groups.Count);
            foreach (var @group in groups.Select(groupUs => Plus.GetGame().GetGroupManager().GetGroup(groupUs.GroupId))
                )
                if (@group != null)
 

Hypothesis

Programmer
Jan 6, 2019
524
361
Porco dio (God Pig) does not make me post all the code

IS THIS MY HABBOMESSENGER!
FUCK 20000 CHARACTER SYSTEM!!!!!!!!!!!!!!!
Post automatically merged:


Help me please
Weird, I can't quite infer the problem, the code looks fine. I assume it may be the structure of your table?
 

Users who are viewing this thread

Top