XmdsBattleFunction.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. 
  2. using CommonAI.data;
  3. using System;
  4. using System.Collections.Generic;
  5. using XmdsCommon.Plugin;
  6. using XmdsCommonServer.Plugin;
  7. using XmdsCommonServer.Plugin.XmdsSkillTemplate.Skills;
  8. using XmdsCommonSkill.Plugin.Buffs;
  9. using CommonAI.Zone.Formula;
  10. namespace XmdsCommonSkill.Plugin
  11. {
  12. public class XmdsBattleFunction : BattleFunction
  13. {
  14. public override int TriggrBattleFunction(int functionID, IVirtualUnit target, IVirtualUnit sender)
  15. {
  16. var evt = XmdsBattleSkill.GetBattleFunctionEvent(functionID);
  17. if (evt == null)
  18. {
  19. LogError(functionID.ToString());
  20. return 0;
  21. }
  22. else
  23. {
  24. return evt.TriggerEvent(target, sender == null ? target : sender);
  25. }
  26. }
  27. public override int TriggrBattleFunction(int functionID, CommonAI.Zone.Formula.IVirtualUnit target, int value1, int value2, int value3, int value4, int value5, int value6)
  28. {
  29. var evt = XmdsBattleSkill.GetBattleFunctionEvent(functionID);
  30. if (evt == null)
  31. {
  32. LogError(functionID.ToString());
  33. return 0;
  34. }
  35. else
  36. {
  37. return evt.TriggerEvent(target, value1, value2, value3, value4, value5, value6);
  38. }
  39. }
  40. }
  41. }