ModuleSkill.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using CommonLang.Reflection;
  2. using pomelo.connector;
  3. namespace ZeusBotTest.Runner
  4. {
  5. public class ModuleSkill : BotRunner.RunnerModule
  6. {
  7. public ModuleSkill(BotRunner r) : base(r)
  8. {
  9. }
  10. protected internal override void OnGateBindPlayer(BindPlayerResponse e)
  11. {
  12. base.OnGateBindPlayer(e);
  13. }
  14. protected internal override void OnBattleActorReady(CommonAI.ZoneClient.ZoneLayer layer, CommonAI.ZoneClient.ZoneActor actor)
  15. {
  16. layer.AddTimeDelayMS(Config.CheckIntervalMS, (t) =>
  17. {
  18. if (Enable)
  19. {
  20. }
  21. });
  22. layer.AddTimePeriodicMS(Config.CheckIntervalMS, (t) =>
  23. {
  24. if (Enable)
  25. {
  26. try_get_skill_list();
  27. }
  28. });
  29. }
  30. private void try_get_skill_list()
  31. {
  32. client.GameSocket.skillHandler.getAllSkillRequest(
  33. (err, rsp) =>
  34. { });
  35. }
  36. [Desc("技能配置")]
  37. [Expandable]
  38. public class Config
  39. {
  40. [Desc("技能检测间隔")]
  41. public static int CheckIntervalMS = 5000;
  42. public override string ToString()
  43. {
  44. return "技能配置";
  45. }
  46. }
  47. }
  48. }