SkillHelper.cs 924 B

1234567891011121314151617181920212223242526272829303132
  1. namespace ET.Server
  2. {
  3. /// <summary>
  4. /// 技能工具类
  5. /// </summary>
  6. public static class SkillHelper
  7. {
  8. /** 是否是人物被动技能*/
  9. public static bool IsPassive(SkillConfig prop) {
  10. return prop.SkillType == (int)SkillType.PLAYER_PASSIVE;
  11. }
  12. /// <summary>
  13. /// 创建技能信息
  14. /// </summary>
  15. /// <param name="baseSkill"></param>
  16. /// <returns></returns>
  17. public static Struct.SkillInfo NewSkillInfo(Struct.PlayerSkillBaseData baseSkill)
  18. {
  19. Struct.SkillInfo data = new ();
  20. SkillConfig prop = SkillConfigCategory.Instance.Get(baseSkill.id);
  21. data.type = prop.SkillType;
  22. data.id = baseSkill.id;
  23. data.level = baseSkill.level;
  24. data.skillTime = baseSkill.skillTime;
  25. data.cdTime = 0;
  26. return data;
  27. }
  28. }
  29. }