using System;
using System.Collections.Generic;
namespace Cal.DataTable
{
public partial class TransferJobConfigCategory
{
public enum TransferJobType
{
None,
Skill,
Item
}
///
/// key.key = type,key.value = element of arr,value = id
///
private Dictionary, int> dic = new();
public TransferJobConfig Get(TransferJobType transferJobType,int skillIdOrItemId)
{
dic.TryGetValue(KeyValuePair.Create(transferJobType, skillIdOrItemId), out int configid);
return Get(configid);
}
public override void EndInit()
{
foreach (TransferJobConfig config in this.dict.Values)
{
foreach (int item in config.ids)
{
dic.Add(KeyValuePair.Create((TransferJobType)config.Type, item), (int)config.Id);
}
}
}
}
}