protected override void Compile() { InternalOutgoingMessage.Initialize(2); InternalOutgoingMessage.AppendInt32(FuseRights.Count); foreach (string fuseRight in FuseRights) { InternalOutgoingMessage.AppendString(fuseRight); } }
public override OutgoingMessage Send(IMessageable target) { if (InternalOutgoingMessage.Id == 0) { InternalOutgoingMessage.Initialize(2); InternalOutgoingMessage.AppendInt32(FuseRights.Count); foreach (string fuseRight in FuseRights) { InternalOutgoingMessage.AppendString(fuseRight); } } target.SendMessage(InternalOutgoingMessage); return(this); }
public override OutgoingMessage Send(IMessageable target) { if (InternalOutgoingMessage.Id == 0) { InternalOutgoingMessage.Initialize(12) .AppendInt32(UnknownA) .AppendInt32(UnknownB) .AppendInt32(UnknownC) .AppendInt32(Categories.Count()); // -1 because the default category doesn't count int friendCount = 0; foreach (MessengerCategory category in Categories) { InternalOutgoingMessage .AppendInt32(category.Id) .AppendString(category.Name); friendCount += category.Friends.Count(); } InternalOutgoingMessage.AppendInt32(friendCount); foreach (MessengerCategory category in Categories) { foreach (IBefriendable befriendable in category.Friends) { InternalOutgoingMessage .AppendInt32(befriendable.Id) .AppendString(befriendable.DisplayName) .AppendBoolean(true) // TODO: Find out what this does. .AppendBoolean(befriendable.LoggedIn) .AppendBoolean(befriendable.Stalkable) .AppendString(befriendable.Figure.ToString()) .AppendInt32(category.Id) .AppendString(befriendable.Motto) .AppendString(befriendable.LastAccess.ToString(CultureInfo.InvariantCulture)); } } InternalOutgoingMessage .AppendInt32(MaximumFriends) .AppendBoolean(false); // TODO: Find out what this does. } target.SendMessage(InternalOutgoingMessage); return(this); }
public override OutgoingMessage Send(IMessageable target) { if (InternalOutgoingMessage.Id == 0) { InternalOutgoingMessage.Initialize(229) .AppendInt32(AllBadges.Count); foreach (string badge in AllBadges) { InternalOutgoingMessage .AppendString(badge); } foreach (KeyValuePair <BadgeSlot, string> slotBadge in BadgeSlots) { InternalOutgoingMessage .AppendInt32((int)slotBadge.Key) .AppendString(slotBadge.Value); } } target.SendMessage(InternalOutgoingMessage); return(this); }