35 lines
1.0 KiB
C#
Executable File
35 lines
1.0 KiB
C#
Executable File
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Cal.DataTable
|
|
{
|
|
public partial class TransferJobConfigCategory
|
|
{
|
|
public enum TransferJobType
|
|
{
|
|
None,
|
|
Skill,
|
|
Item
|
|
}
|
|
/// <summary>
|
|
/// key.key = type,key.value = element of arr,value = id
|
|
/// </summary>
|
|
private Dictionary<KeyValuePair<TransferJobType, int>, 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);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|