Exemple #1
0
        public static void Serialize(uLink.BitStream stream, object obj, params object[] codecOptions)
        {
            LobbyShopData data = (LobbyShopData)obj;

            stream.Write <int>(data.id);
            stream.Write <int>(data.itemtype);
            stream.Write <int>(data.price);
            stream.Write <int>(data.rebate);
            stream.Write <int>(data.tab);
            stream.Write <bool>(data.bind);
            stream.Write <bool>(data.bshow);
            stream.Write <int>(data.forbid);
        }
Exemple #2
0
        public static object Deserialize(uLink.BitStream stream, params object[] codecOptions)
        {
            LobbyShopData data = new LobbyShopData();

            data.id       = stream.Read <int>();
            data.itemtype = stream.Read <int>();
            data.price    = stream.Read <int>();
            data.rebate   = stream.Read <int>();
            data.tab      = stream.Read <int>();
            data.bind     = stream.Read <bool>();
            data.bshow    = stream.Read <bool>();
            data.forbid   = stream.Read <int>();
            return(data);
        }