You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

45 lines
1.1 KiB

using System.Collections.Generic;
namespace Game
{
public enum PageIndex
{
Normal = 0,
Peak = 1
}
public static class TalentHelper
{
/// <summary>
///每页天赋类型
/// </summary>
private static readonly Dictionary<PageIndex, List<TalentType>> TalentPageMap =
new()
{
{
PageIndex.Normal, new List<TalentType>
{
TalentType.Normal, TalentType.Core, TalentType.Skill,TalentType.Final
}
},
{
PageIndex.Peak, new List<TalentType>
{
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);
}
}
}