private List <QuestRewardItemGroup> BuildClassQuestJobRewardItemGroups(string itemPrefix, int count)
        {
            List <QuestRewardItemGroup> groups = new List <QuestRewardItemGroup>();

            for (int i = 0; i < count; ++i)
            {
                XivRow row = (XivRow)Quest[$"{itemPrefix}[{i}]"];
                if (row == null)
                {
                    continue;
                }

                Ex.Variant2.DataRow parentRow = (SaintCoinach.Ex.Variant2.DataRow)row.SourceRow;
                foreach (Ex.Variant2.SubRow subRow in parentRow.SubRows)
                {
                    ClassJobCategory       category = (ClassJobCategory)subRow["ClassJobCategory"];
                    List <QuestRewardItem> items    = new List <QuestRewardItem>();
                    for (int ii = 0; ii < 3; ++ii)
                    {
                        Item itm = (Item)subRow["Reward{Item}[" + ii + "]"];
                        byte c   = (byte)subRow["Reward{Amount}[" + ii + "]"];
                        if (itm.Key == 0 || c == 0 || category.Key == 0)
                        {
                            continue;
                        }

                        items.Add(new QuestRewardItem(itm, c, null, false));
                    }
                    groups.Add(new QuestRewardItemGroup(items, QuestRewardGroupType.ClassJob, category));
                }
            }

            return(groups);
        }
            public bool MoveNext()
            {
                if (_SourceSubEnumerator != null && _SourceSubEnumerator.MoveNext())
                {
                    return(true);
                }

                if (!_SourceParentEnumerator.MoveNext())
                {
                    return(false);
                }

                _CurrentParent       = (Ex.Variant2.DataRow)_SourceParentEnumerator.Current;
                _SourceSubEnumerator = _CurrentParent.SubRows.GetEnumerator();
                return(_SourceSubEnumerator.MoveNext()); // Should always be true.
            }
 public void Reset()
 {
     _SourceParentEnumerator.Reset();
     _SourceSubEnumerator = null;
     _CurrentParent       = null;
 }