Пример #1
0
        override public void GetBytes(BinaryWriter bw)
        {
            try
            {
                base.GetBytes(bw);

                EncodeString(bw, Id);
                EncodeString(bw, Name);
                EncodeInteger(bw, Kind);
                EncodeString(bw, Icon);
                EncodeString(bw, Owner);
                EncodeInteger(bw, UserCount);
                EncodeInteger(bw, Cash);
                EncodeInteger(bw, Point);
                EncodeInteger(bw, MaxUsers);
                EncodeInteger(bw, IsGame);
                EncodeString(bw, RoomPass);

                if (IsGame > 0)
                {
                    _GameInfo.GetBytes(bw);
                }

                EncodeString(bw, _strUserID);
                EncodeString(bw, _strTargetID);
            }
            catch (Exception ex)
            {
                // Error Handling
            }
        }
Пример #2
0
        override public void GetBytes(BinaryWriter bw)
        {
            try
            {
                base.GetBytes(bw);

                EncodeInteger(bw, listGameFile.Count);

                for (int i = 0; i < listGameFile.Count; i++)
                {
                    EncodeString(bw, listGameFile[i]);
                }

                gameInfo.GetBytes(bw);
            }
            catch (Exception ex)
            {
                // Error Handling
            }
        }