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(); }
public bool Save(DbTransaction transaction, string zoneId = "") { if (_synchronized) { return(true); } _packageEntity.ItemString = GenerateItemString(); return(ConstellationPackageMgr.Update(_packageEntity, transaction, zoneId)); }