Skill_910020.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using CommonAI.Zone;
  2. using CommonAI.Zone.Helper;
  3. using CommonAI.Zone.Instance;
  4. using System;
  5. using XmdsCommon.Plugin;
  6. using XmdsCommonServer.Plugin;
  7. using XmdsCommonServer.Plugin.XmdsSkillTemplate.Skills;
  8. using XmdsCommonServer.XLS.Data;
  9. using XmdsCommonSkill.Plugin.Buffs;
  10. using XmdsCommonSkill.Plugin.PassiveSkills.Magic;
  11. using static CommonAI.Zone.Instance.InstanceUnit;
  12. using static XmdsCommonSkill.Plugin.Buffs.XmdsBuff_SwordShadow;
  13. namespace XmdsCommonSkill.Plugin.Skills.Magic
  14. {
  15. /// <summary>
  16. /// 交叉型
  17. /// </summary>
  18. public class Skill_910020 : XmdsSkillBase
  19. {
  20. private static readonly int ID = 910020;
  21. public override int SkillID { get { return ID; } }
  22. //当前释放帧
  23. private int mLaunchIndex;
  24. protected override void OnInit(GameSkill info, XmdsVirtual unit, ref SkillTemplate template)
  25. {
  26. unit.RegistTryLaunchSkillEvent(OnTryLaunchSkillEventHandle, info);
  27. unit.RegistLaunchSkillOver(OnLaunchSkillOver, info);
  28. }
  29. private bool OnTryLaunchSkillEventHandle(GameSkill skillInfo, ref InstanceUnit.SkillState skill, XmdsVirtual launcher, ref InstanceUnit.LaunchSkillParam param)
  30. {
  31. this.mLaunchIndex = launcher.mUnit.RandomN.Next() % 2;
  32. skill.LockActionStep = this.mLaunchIndex;
  33. return true;
  34. }
  35. private int OnLaunchSkillOver(GameSkill info, XmdsCommonServer.Plugin.XmdsVirtual launcher, CommonAI.Zone.Instance.InstanceUnit.SkillState skill)
  36. {
  37. skill.LockActionStep = this.mLaunchIndex;
  38. return 0;
  39. }
  40. protected override void OnInitSkillParam()
  41. {
  42. XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(ID);
  43. //InitData(data, out mDamageRate, XmdsSkillData.XmdsSkillDataKey.DmgRate);
  44. }
  45. }
  46. }