示例#1
0
 public void Serialize(ref byte[] buffer, Pointer p)
 {
     BitPacker.AddString(ref buffer, p, CommandName);
     BitPacker.AddString(ref buffer, p, CommandGroup);
     BitPacker.AddString(ref buffer, p, UsageHelp);
     BitPacker.AddStringList(ref buffer, p, new List <string>(AllowedRoles));
     BitPacker.AddStringList(ref buffer, p, new List <string>(ParmNames));
 }
示例#2
0
        public void Serialize(ref byte[] buffer, Pointer p)
        {
            BitPacker.AddLong(ref buffer, p, LastLogin.Ticks);
            BitPacker.AddLong(ref buffer, p, UserSince.Ticks);
            BitPacker.AddLong(ref buffer, p, LastPasswordChange.Ticks);

            BitPacker.AddString(ref buffer, p, ID.ToString());

            BitPacker.AddString(ref buffer, p, Email);
            BitPacker.AddString(ref buffer, p, Username);

            BitPacker.AddBool(ref buffer, p, IsLocked);
            BitPacker.AddBool(ref buffer, p, IsOnline);
            BitPacker.AddBool(ref buffer, p, IsApproved);

            BitPacker.AddStringList(ref buffer, p, Roles);

            BitPacker.AddInt(ref buffer, p, ServiceNotes.Count);
            for (int i = 0; i < ServiceNotes.Count; i++)
            {
                ServiceLogEntry sle = ServiceNotes[i];
                BitPacker.AddString(ref buffer, p, sle.EntryBy);
                BitPacker.AddString(ref buffer, p, sle.Note);
                BitPacker.AddString(ref buffer, p, sle.EntryType);
                BitPacker.AddInt(ref buffer, p, sle.CharacterId);
                BitPacker.AddLong(ref buffer, p, sle.TimeStampUTC.Ticks);
            }

            BitPacker.AddPropertyBag(ref buffer, p, AddedProperties);

            BitPacker.AddInt(ref buffer, p, LoginSessions.Count);
            for (int i = 0; i < LoginSessions.Count; i++)
            {
                AccountProfile.Session s = LoginSessions[i];
                BitPacker.AddLong(ref buffer, p, s.LoginUTC.Ticks);
                BitPacker.AddLong(ref buffer, p, s.LogoutUTC.Ticks);
                BitPacker.AddString(ref buffer, p, s.IP);
            }

            BitPacker.AddLong(ref buffer, p, CurrentLoginTime.Ticks);

            BitPacker.AddInt(ref buffer, p, Characters.Count);
            for (int i = 0; i < Characters.Count; i++)
            {
                ICharacterInfo ci = Characters[i];
                BitPacker.AddComponent(ref buffer, p, ci);
            }
        }
示例#3
0
        public void Serialize(ref byte[] buffer, Pointer p)
        {
            BitPacker.AddBool(ref buffer, p, AllowRemoteConnections);
            BitPacker.AddInt(ref buffer, p, TotalUserCount);
            BitPacker.AddString(ref buffer, p, UserDataStore);
            BitPacker.AddInt(ref buffer, p, Users.Count);

            foreach (User su in Users)
            {
                BitPacker.AddString(ref buffer, p, su.Username);
                BitPacker.AddStringList(ref buffer, p, new List <string>(su.Roles));
                BitPacker.AddBool(ref buffer, p, su.IsLocked);
                BitPacker.AddString(ref buffer, p, su.ID.ToString());
                BitPacker.AddString(ref buffer, p, su.Email);
                BitPacker.AddLong(ref buffer, p, su.LastLogin.Ticks);
            }
        }