Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- internal void LoadProfile()
- {
- uint userId = this.Request.PopWiredUInt();
- this.Request.PopWiredBoolean();
- Habbo Habbo = SilverwaveEnvironment.getHabboForId(userId);
- if (Habbo == null)
- {8
- this.Session.SendNotif("This user may not exist.");
- return;
- }
- DateTime CreateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0).AddSeconds(Habbo.CreateDate);
- this.Response.Init(Outgoing.ProfileInformation);
- this.Response.AppendInt32(Habbo.Id);
- this.Response.AppendString(Habbo.Username);
- this.Response.AppendString(Habbo.Look);
- this.Response.AppendString(Habbo.Motto);
- this.Response.AppendString(CreateTime.ToString("dd/MM/yyyy"));
- this.Response.AppendInt32(Habbo.AchievementPoints);
- this.Response.AppendInt32(this.getFriendsCount(userId));
- this.Response.AppendBoolean(Habbo.Id != this.Session.GetHabbo().Id && this.Session.GetHabbo().GetMessenger().FriendshipExists(Habbo.Id));
- this.Response.AppendBoolean(Habbo.Id != this.Session.GetHabbo().Id && !this.Session.GetHabbo().GetMessenger().FriendshipExists(Habbo.Id) && this.Session.GetHabbo().GetMessenger().RequestExists(Habbo.Id));
- this.Response.AppendBoolean(SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUserID(Habbo.Id) != null);
- List<GroupUser> Groups = SilverwaveEnvironment.GetGame().GetGroupManager().GetUserGroups(Habbo.Id);
- this.Response.AppendInt32(Groups.Count);
- foreach (GroupUser GroupUs in Groups)
- {
- Group Group = SilverwaveEnvironment.GetGame().GetGroupManager().GetGroup(GroupUs.GroupId);
- if (Group != null)
- {
- this.Response.AppendInt32(Group.Id);
- this.Response.AppendString(Group.Name);
- this.Response.AppendString(Group.Badge);
- this.Response.AppendString(SilverwaveEnvironment.GetGame().GetGroupManager().GetGroupColour(Group.Colour1, true));
- this.Response.AppendString(SilverwaveEnvironment.GetGame().GetGroupManager().GetGroupColour(Group.Colour2, false));
- this.Response.AppendBoolean(Group.Id == Habbo.FavouriteGroup);
- this.Response.AppendInt32(-1);
- this.Response.AppendBoolean(true);
- }
- else
- {
- this.Response.AppendInt32(1);
- this.Response.AppendString("");
- this.Response.AppendString("");
- this.Response.AppendString("");
- this.Response.AppendString("");
- this.Response.AppendBoolean(false);
- this.Response.AppendInt32(-1);
- this.Response.AppendBoolean(false);
- }
- }
- this.Response.AppendInt32(checked(SilverwaveEnvironment.GetUnixTimestamp() - Habbo.LastOnline));
- this.Response.AppendBoolean(true);
- this.SendResponse();
- this.Response.Init(Outgoing.GetUserBadges);
- this.Response.AppendInt32(Habbo.Id);
- this.Response.AppendInt32(Habbo.GetBadgeComponent().EquippedCount);
- foreach (Badge Badge in Habbo.GetBadgeComponent().BadgeList.Values)
- {
- if (Badge.Slot > 0)
- {
- this.Response.AppendInt32(Badge.Slot);
- this.Response.AppendString(Badge.Code);
- }
- }
- this.SendResponse();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement