Character.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using System.Collections.Generic;
  2. using System.ComponentModel;
  3. using System.Net;
  4. using ET.Server;
  5. namespace ET
  6. {
  7. public partial class Character
  8. {
  9. /** 初始化技能列表 **/
  10. public List<Struct.IntIntData> InitSkillList = new List<Struct.IntIntData>();
  11. public override void AfterEndInit()
  12. {
  13. if (string.IsNullOrEmpty(this.initSkill))
  14. {
  15. Log.Warning($"配置表 Character 字段 initSkill 为空...Id={this.Id}, initSkill={this.initSkill}");
  16. return;
  17. }
  18. string[] strings = this.initSkill.Split("|");
  19. if (strings.Length <= 0)
  20. {
  21. Log.Error($"配置表 Character 字段 initSkill 格式错误...Id={this.Id}, initSkill={this.initSkill}");
  22. return;
  23. }
  24. foreach (string sss in strings)
  25. {
  26. if (string.IsNullOrEmpty(sss))
  27. {
  28. Log.Error($"配置表 Character 字段 initSkill 格式错误...Id={this.Id}, initSkill={this.initSkill}");
  29. continue;
  30. }
  31. string[] strs = sss.Split(":");
  32. if (strs.Length == 2)
  33. {
  34. this.InitSkillList.Add(new Struct.IntIntData(int.Parse(strs[0]), int.Parse(strs[1])));
  35. }
  36. }
  37. }
  38. }
  39. }