1234567891011121314151617181920212223242526272829303132 |
- namespace ET.Server
- {
- /// <summary>
- /// 技能工具类
- /// </summary>
- public static class SkillHelper
- {
- /** 是否是人物被动技能*/
- public static bool IsPassive(SkillConfig prop) {
- return prop.SkillType == (int)SkillType.PLAYER_PASSIVE;
- }
- /// <summary>
- /// 创建技能信息
- /// </summary>
- /// <param name="baseSkill"></param>
- /// <returns></returns>
- public static Struct.SkillInfo NewSkillInfo(Struct.PlayerSkillBaseData baseSkill)
- {
- Struct.SkillInfo data = new ();
- SkillConfig prop = SkillConfigCategory.Instance.Get(baseSkill.id);
- data.type = prop.SkillType;
- data.id = baseSkill.id;
- data.level = baseSkill.level;
- data.skillTime = baseSkill.skillTime;
- data.cdTime = 0;
- return data;
- }
- }
- }
|