public static bool cb(CSVReader csv_reader, ItemToQuestData data, ref uint key1, ref uint key2)
 {
     data.itemId = key1;
     data.key2   = key2;
     csv_reader.Pop(ref data.questId);
     return(true);
 }
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            ItemToQuestData itemToQuestData = obj as ItemToQuestData;

            if (itemToQuestData == null)
            {
                return(false);
            }
            return(itemId == itemToQuestData.itemId && questId == itemToQuestData.questId && grade == itemToQuestData.grade && key2 == itemToQuestData.key2);
        }
 public void AddTableFromAPI(uint itemId, List <int> questIds)
 {
     if (itemToQuestTable == null)
     {
         itemToQuestTable = new DoubleUIntKeyTable <ItemToQuestData>();
     }
     itemToQuestTable.Get(itemId)?.Clear();
     for (int i = 0; i < questIds.Count; i++)
     {
         ItemToQuestData itemToQuestData = new ItemToQuestData();
         itemToQuestData.LoadFromAPI(itemId, (uint)questIds[i], (uint)i);
         itemToQuestTable.Add(itemId, (uint)i, itemToQuestData);
     }
     InitDependencyData();
 }
    public static DoubleUIntKeyTable <ItemToQuestData> CreateTableBinary(byte[] bytes)
    {
        DoubleUIntKeyTable <ItemToQuestData> doubleUIntKeyTable = new DoubleUIntKeyTable <ItemToQuestData>();
        BinaryTableReader binaryTableReader = new BinaryTableReader(bytes);

        while (binaryTableReader.MoveNext())
        {
            uint key  = binaryTableReader.ReadUInt32(0u);
            uint key2 = 0u;
            UIntKeyTable <ItemToQuestData> uIntKeyTable = doubleUIntKeyTable.Get(key);
            if (uIntKeyTable != null)
            {
                key2 = (uint)uIntKeyTable.GetCount();
            }
            ItemToQuestData itemToQuestData = new ItemToQuestData();
            itemToQuestData.LoadFromBinary(binaryTableReader, ref key, ref key2);
            doubleUIntKeyTable.Add(key, key2, itemToQuestData);
        }
        return(doubleUIntKeyTable);
    }