internal ServerMessage SerializeTool() { ServerMessage serverMessage = new ServerMessage(Outgoing.LoadModerationToolMessageComposer); serverMessage.AppendInt32(this.Tickets.Count); foreach (SupportTicket current in this.Tickets) { current.Serialize(serverMessage); } serverMessage.AppendInt32(this.UserMessagePresets.Count); foreach (string current2 in this.UserMessagePresets) { serverMessage.AppendString(current2); } IEnumerable <ModerationTemplate> enumerable = from x in this.ModerationTemplates.Values where x.Category == -1 select x; serverMessage.AppendInt32(enumerable.Count <ModerationTemplate>()); using (IEnumerator <ModerationTemplate> enumerator3 = enumerable.GetEnumerator()) { while (enumerator3.MoveNext()) { ModerationTemplate Template = enumerator3.Current; IEnumerable <ModerationTemplate> enumerable2 = from x in this.ModerationTemplates.Values where (long)x.Category == (long)((ulong)Template.Id) select x; serverMessage.AppendString(Template.Caption); serverMessage.AppendBoolean(true); serverMessage.AppendInt32(enumerable2.Count <ModerationTemplate>()); foreach (ModerationTemplate current3 in enumerable2) { serverMessage.AppendString(current3.Caption); serverMessage.AppendString(current3.BanMessage); serverMessage.AppendInt32((int)current3.BanHours); serverMessage.AppendInt32(CyberEnvironment.BoolToInteger(current3.AvatarBan)); serverMessage.AppendInt32(CyberEnvironment.BoolToInteger(current3.Mute)); serverMessage.AppendInt32(CyberEnvironment.BoolToInteger(current3.TradeLock)); serverMessage.AppendString(current3.WarningMessage); } } } serverMessage.AppendBoolean(true); serverMessage.AppendBoolean(true); serverMessage.AppendBoolean(true); serverMessage.AppendBoolean(true); serverMessage.AppendBoolean(true); serverMessage.AppendBoolean(true); serverMessage.AppendBoolean(true); serverMessage.AppendInt32(this.RoomMessagePresets.Count); foreach (string current4 in this.RoomMessagePresets) { serverMessage.AppendString(current4); } return(serverMessage); }