private void AddCard(TrackedCard card) { TrackedCard card2 = this.FindCard(card.Index, card.DbId); if (card2 != null) { card2.Count = card.Count; } else { List <TrackedCard> list; if (!this.m_cards.TryGetValue(card.Index, out list)) { this.m_cards[card.Index] = new List <TrackedCard>(); } this.m_cards[card.Index].Add(card); } }
private void Load() { this.m_isInitialized = true; string str = Options.Get().GetString(Option.CHANGED_CARDS_DATA); if (!string.IsNullOrEmpty(str)) { char[] separator = new char[] { '-' }; foreach (string str2 in str.Split(separator)) { if (!string.IsNullOrEmpty(str2)) { char[] chArray2 = new char[] { ',' }; string[] strArray3 = str2.Split(chArray2); if (strArray3.Length == 3) { int num3; int num4; int num5; for (int i = 0; i < 3; i++) { if (string.IsNullOrEmpty(strArray3[i])) { } } if ((GeneralUtils.TryParseInt(strArray3[0], out num3) && GeneralUtils.TryParseInt(strArray3[1], out num4)) && GeneralUtils.TryParseInt(strArray3[2], out num5)) { TrackedCard card = new TrackedCard { Index = num3, DbId = num4, Count = num5 }; this.AddCard(card); if (card.Index > this.m_currentCardNerfIndex) { this.m_currentCardNerfIndex = card.Index; } } } } } this.Save(); } }
public NoteCard(TrackedCard tracked) { Card card = null; if (tracked == null || !Cards.All.ContainsKey(tracked.Id)) { card = Cards.All[NonCollectible.Neutral.NooooooooooooLegacy]; CountText = "x0"; TextColor = Brushes.Red; } else { card = Cards.All[tracked.Id]; CountText = $"x{tracked.Count}"; TextColor = tracked.Unconfirmed == 0 ? Brushes.Black : Brushes.Red; } Name = card.Name; Cost = card.Cost; }
public SingleCard(TrackedCard card) : base(card) { }
public Card(TrackedCard card) { Id = card.Id; Count = card.Count; }
public void AddCard(TrackedCard card) { object[] objArray1 = new object[] { card }; base.method_8("AddCard", objArray1); }