public ServerInventory SourceObject(IRes resource) { ServerInventory serverInventory = new ServerInventory(this.MaxSlots); if (this.Items != null) { serverInventory.SetItems(DatabaseUtils.TransformForInventory(this.Items)); } return(serverInventory); }
public WorkhouseStation SourceObject(IRes resourcse) { WorkhouseStation station = new WorkhouseStation(); //if(this.Hold != null ) { // station.SetHold(this.Hold); //} if (this.StationInventoryItems == null) { this.StationInventoryItems = new List <InventoryItemDocumentElement>(); } ServerInventory serverInventory = new ServerInventory(this.StationInventoryMaxSlots); serverInventory.SetItems(DatabaseUtils.TransformForInventory(this.StationInventoryItems)); station.SetInventory(serverInventory); station.SetPetSchemeAdded(petSchemeAdded); return(station); }