EventsBattleFunction.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using CommonAI.data;
  2. using CommonAI.Zone.EventTrigger;
  3. using CommonAI.Zone.Instance;
  4. using CommonAI.Zone.ZoneEditor.EventTrigger;
  5. using CommonLang.Property;
  6. using XmdsCommonServer.Plugin.XmdsSkillTemplate.Skills;
  7. namespace XmdsCommonServer.Plugin.Editor
  8. {
  9. /// <summary>
  10. /// 触发特殊战斗事件
  11. /// </summary>
  12. [DescAttribute("Xmds扩展事件-触发特殊战斗事件", "Xmds扩展")]
  13. public class EventsBattleFunctionAction : AbstractAction
  14. {
  15. [DescAttribute("单位")]
  16. public UnitValue Unit = new UnitValue.Trigging();
  17. [DescAttribute("事件ID")]
  18. public int EventID;
  19. public override string ToString()
  20. {
  21. return string.Format("Xmds扩展事件-触发特殊战斗事件", Unit);
  22. }
  23. public override void DoAction(EventTriggerAdapter api, EventArguments args)
  24. {
  25. InstancePlayer unit = Unit.GetValue(api, args) as InstancePlayer;
  26. if (unit != null)
  27. {
  28. BattleFunction.GetInstance().TriggrBattleFunction(EventID, (unit.Virtual as XmdsVirtual), (unit.Virtual as XmdsVirtual));
  29. }
  30. }
  31. }
  32. }