示例#1
0
        public static System.Collections.Generic.Dictionary <int, Config.ConfHeroSkin> Read(IBinaryReader o, System.Collections.Generic.Dictionary <int, Config.ConfHeroSkin> d)
        {
            if (o.ReadBoolean() == false)
            {
                return(null);
            }

            int size = o.ReadInt32();

            if (d == null)
            {
                d = new System.Collections.Generic.Dictionary <int, Config.ConfHeroSkin>(size, Int32EqualityComparer.Instance);
            }
            else
            {
                d.Clear();
            }
            for (int i = 0; i < size; ++i)
            {
                int key = o.ReadInt32();
                Config.ConfHeroSkin value = ConfHeroSkinSerializer.Read(o, default(Config.ConfHeroSkin) as Config.ConfHeroSkin);
                d.Add(key, value);
            }
            return(d);
        }
示例#2
0
        public static void Write(IBinaryWriter o, Config.ConfHeroSkin d)
        {
            o.Write(d != null);
            if (d == null)
            {
                return;
            }

            StringSerializer.Write(o, d.Desc);
            o.Write(d.HeroId);
            o.Write(d.Id);
        }
示例#3
0
        public static Config.ConfHeroSkin Read(IBinaryReader o, Config.ConfHeroSkin d)
        {
            if (o.ReadBoolean() == false)
            {
                return(null);
            }

            if (d == null)
            {
                d = new Config.ConfHeroSkin();
            }
            d.Desc   = StringSerializer.Read(o, d.Desc as string) as string;
            d.HeroId = o.ReadInt32();
            d.Id     = o.ReadInt32();
            return(d);
        }