public ArtStack AddCards(CardFlair cardFlair, DateTime newestInsertDate, int count, int numSeen) { ArtStack artStack; if (this.ContainsArtStack(cardFlair)) { artStack = this.GetArtStack(cardFlair); artStack.AddCards(newestInsertDate, count, numSeen); return(artStack); } artStack = new ArtStack(this.CardID, cardFlair, newestInsertDate, count, numSeen); this.m_artStacks.Add(cardFlair, artStack); return(artStack); }
public ArtStack RemoveCards(CardFlair cardFlair, int count) { ArtStack artStack = this.GetArtStack(cardFlair); if (artStack == null) { Debug.LogWarning(string.Format("CollectionCardStack.RemoveCards() - cannot remove {0} copies of {1} with card flair {2} - art stack does not exist.", count, this.CardID, cardFlair)); return(artStack); } artStack.RemoveCards(count); if (artStack.Count == 0) { this.m_artStacks.Remove(cardFlair); artStack = new ArtStack(this.CardID, cardFlair, new DateTime(), 0, 0); } return(artStack); }