using System.Collections.Generic;
namespace Game
{
public enum PageIndex
{
Normal = 0,
Peak = 1
}
public static class TalentHelper
{
///
///每页天赋类型
///
private static readonly Dictionary> TalentPageMap =
new()
{
{
PageIndex.Normal, new List
{
TalentType.Normal, TalentType.Core, TalentType.Skill,TalentType.Final
}
},
{
PageIndex.Peak, new List
{
TalentType.Peak
}
}
};
public static bool IsCurrentPageTalent(PageIndex page, int talentId)
{
var desc = TalentDescMgr.Instance.GetConfig(talentId);
if (desc == null)
{
return false;
}
var type = desc.type;
return TalentPageMap[page].Contains(type);
}
}
}