public override bool DeSerialize(byte[] data, Pointer p) { base.DeSerialize(data, p); IsRefresh = BitPacker.GetBool(data, p); IsServerPacket = BitPacker.GetBool(data, p); int num = BitPacker.GetInt(data, p); for (int i = 0; i < num; i++) { if (!IsRefresh) { MatchNotificationType kind = (MatchNotificationType)BitPacker.GetInt(data, p); Kinds.Add(kind); } Game theGame = BitPacker.GetComponent(data, p, IsServerPacket) as Game; TheGames.Add(theGame); bool hasTargetPlayer = BitPacker.GetBool(data, p); if (!IsRefresh && hasTargetPlayer) { TargetPlayers.Add(BitPacker.GetComponent(data, p, false) as ICharacterInfo); } } return(true); }
public void Deserialize(byte[] data, Pointer p) { LastLogin = new DateTime(BitPacker.GetLong(data, p), DateTimeKind.Utc); UserSince = new DateTime(BitPacker.GetLong(data, p), DateTimeKind.Utc); LastPasswordChange = new DateTime(BitPacker.GetLong(data, p), DateTimeKind.Utc); ID = new Guid(BitPacker.GetString(data, p)); Email = BitPacker.GetString(data, p); Username = BitPacker.GetString(data, p); IsLocked = BitPacker.GetBool(data, p); IsOnline = BitPacker.GetBool(data, p); IsApproved = BitPacker.GetBool(data, p); Roles = BitPacker.GetStringList(data, p); int notes = BitPacker.GetInt(data, p); for (int i = 0; i < notes; i++) { ServiceLogEntry sle = new ServiceLogEntry(); sle.Account = ID; sle.EntryBy = BitPacker.GetString(data, p); sle.Note = BitPacker.GetString(data, p); sle.EntryType = BitPacker.GetString(data, p); sle.CharacterId = BitPacker.GetInt(data, p); sle.TimeStampUTC = new DateTime(BitPacker.GetLong(data, p), DateTimeKind.Utc); ServiceNotes.Add(sle); } AddedProperties = BitPacker.GetPropertyBag(data, p); int numSessions = BitPacker.GetInt(data, p); for (int i = 0; i < numSessions; i++) { DateTime login = new DateTime(BitPacker.GetLong(data, p), DateTimeKind.Utc); DateTime logout = new DateTime(BitPacker.GetLong(data, p), DateTimeKind.Utc); string ip = BitPacker.GetString(data, p); ip = ip.Substring(0, ip.LastIndexOf("]") + 1); AccountProfile.Session s = new AccountProfile.Session(login, logout, ip); LoginSessions.Add(s); } //LoginSessions = LoginSessions.OrderBy(session => session.LogoutUTC).ToList(); LoginSessions.Reverse(); CurrentLoginTime = new DateTime(BitPacker.GetLong(data, p), DateTimeKind.Utc); int characters = BitPacker.GetInt(data, p); for (int i = 0; i < characters; i++) { ICharacterInfo ci = BitPacker.GetComponent(data, p) as ICharacterInfo; Characters.Add(ci); } }
public override void DeserializeValue(byte[] dat, Pointer p) { int num = BitPacker.GetInt(dat, p); m_Value = new IComponent[num]; for (int i = 0; i < num; i++) { Name = BitPacker.GetString(dat, p); m_Value[i] = BitPacker.GetComponent(dat, p); } }
public override bool DeSerialize(byte[] data, Pointer p) { base.DeSerialize(data, p); int num = BitPacker.GetInt(data, p); for (int i = 0; i < num; i++) { Characters.Add(BitPacker.GetComponent(data, p, false) as ICharacterInfo); } return(true); }
public override bool DeSerialize(byte[] data, Pointer p) { base.DeSerialize(data, p); bool haveGame = BitPacker.GetBool(data, p); if (haveGame) { TheGame = BitPacker.GetComponent(data, p, false) as Game; } else { TheGame = null; } StillLooking = BitPacker.GetBool(data, p); return(true); }
public override bool DeSerialize(byte[] data, Pointer p) { base.DeSerialize(data, p); Player = new Guid(BitPacker.GetString(data, p)); SharedSecret = new Guid(BitPacker.GetString(data, p)); AccountName = BitPacker.GetString(data, p); TargetResource = new Guid(BitPacker.GetString(data, p)); Profile = (AccountProfile)BitPacker.GetSerializableWispObject(data, p); bool haveCharacterData = BitPacker.GetBool(data, p); if (haveCharacterData) { Character = BitPacker.GetComponent(data, p) as ServerCharacterInfo; } OwningServer = BitPacker.GetString(data, p); return(true); }
public override bool DeSerialize(byte[] data, Pointer p) { base.DeSerialize(data, p); Kind = (MatchNotificationType)BitPacker.GetInt(data, p); bool haveGame = BitPacker.GetBool(data, p); if (haveGame) { TheGame = BitPacker.GetComponent(data, p, false) as IGame; } bool haveTargetPlayer = BitPacker.GetBool(data, p); if (haveTargetPlayer) { TargetPlayer = BitPacker.GetComponent(data, p, false) as ICharacterInfo; } TheGameID = new Guid(BitPacker.GetString(data, p)); return(true); }
public override void DeserializeValue(byte[] dat, Pointer p) { Name = BitPacker.GetString(dat, p); m_Value = BitPacker.GetComponent(dat, p); }