Beispiel #1
0
 public static void Encode(this FriendRecord f, IPacket p)
 {
     p.Encode <int>(f.PairCharacterID);
     p.EncodeFixedString(f.PairCharacterName, 13);
     p.Encode <long>(f.SN);
     p.Encode <long>(f.PairSN);
     p.Encode <int>(f.FriendItemID);
 }
        public void AddOrReplace(FriendRecord friend)
        {
            if (this.Friends == null)
            {
                this.Friends = new Hashtable();
            }
            if (this.Friends.ContainsKey(friend.GameRefId()))
            {
                this.Friends.Remove(friend.GameRefId());
            }

            this.Friends.Add(friend.GameRefId(), friend.GetInfo());
        }