35 lines
1016 B
C#
35 lines
1016 B
C#
|
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 var configid);
|
|||
|
return Get(configid);
|
|||
|
}
|
|||
|
public override void EndInit()
|
|||
|
{
|
|||
|
foreach (var config in this.dict.Values)
|
|||
|
{
|
|||
|
foreach (var item in config.ids)
|
|||
|
{
|
|||
|
dic.Add(KeyValuePair.Create((TransferJobType)config.Type, item), (int)config.Id);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|