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: