Exemple #1
0
        public ConstellationPackbager(Guid managerId, string zoneId = "")
        {
            var package = ConstellationPackageMgr.GetById(managerId, zoneId);

            if (package == null)
            {
                try
                {
                    package             = new ConstellationPackageEntity();
                    package.ManagerId   = managerId;
                    package.PackageSize = 480;
                    package.RowTime     = DateTime.Now;
                    package.ItemString  = new byte[0];
                    ConstellationPackageMgr.Insert(package);
                    package = ConstellationPackageMgr.GetById(managerId);
                }
                catch (Exception ex)
                {
                    SystemlogMgr.Error("星座背包加数据", ex);
                    package = null;
                }
            }
            _packageEntity = package;
            AnalysePackage();
        }
Exemple #2
0
        public bool Save(DbTransaction transaction, string zoneId = "")
        {
            if (_synchronized)
            {
                return(true);
            }
            _packageEntity.ItemString = GenerateItemString();

            return(ConstellationPackageMgr.Update(_packageEntity, transaction, zoneId));
        }