Ejemplo n.º 1
0
        public void AppendSparePart(UserSparePart sparePart)
        {
            var cacheSet = new GameDataCacheSet<UserSparePackage>();
            UserSparePackage package = null;
            if (cacheSet.FindKey(UserID) == null)
            {
                package = new UserSparePackage() { UserID = UserID };
                cacheSet.Add(package, GameEnvironment.CacheUserPeriod);
            }
            package = cacheSet.FindKey(UserID);
            package.SparePackage.Add(sparePart);

            //package.Update();
        }
Ejemplo n.º 2
0
        public void AppendSparePart(UserSparePart sparePart)
        {
            var cacheSet = new PersonalCacheStruct<UserSparePackage>();
            UserSparePackage package = null;
            if (cacheSet.FindKey(UserID) == null)
            {
                package = new UserSparePackage() { UserID = UserID };
                cacheSet.Add(package);
            }
            package = cacheSet.FindKey(UserID);
            package.SparePackage.Add(sparePart);

            //package.Update();
        }