XmdsBuff_Brand_6.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. using CommonAI.Zone.Instance;
  2. using CommonAI.Zone.Formula;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using XmdsCommon.Plugin;
  8. using XmdsCommonServer.Plugin;
  9. using XmdsCommonServer.Plugin.XmdsSkillTemplate.Skills;
  10. using XmdsCommonServer.Plugin.XmdsSkillTemplate.DamageCalculator;
  11. using CommonAI.Zone;
  12. using XmdsCommonSkill.Plugin.Interface;
  13. using static XmdsCommonSkill.Plugin.Interface.ComSpellTemplate;
  14. using CommonAI.Zone.Helper;
  15. namespace XmdsCommonSkill.Plugin.Buffs
  16. {
  17. /// <summary>
  18. /// buff结束时,创建法术
  19. /// </summary>
  20. public class XmdsBuff_Brand_6 : XmdsBuffBase
  21. {
  22. public XmdsSpellID spellId;
  23. private int mHandleUUID = 0;
  24. public override int GetAbilityID()
  25. {
  26. return (int)XmdsCommon.Plugin.XmdsBuffProperties.XmdsBuffAbility.Brand_6;
  27. }
  28. public override void CopyTo(UnitBuff other)
  29. {
  30. var ret = other as XmdsBuff_Brand_6;
  31. ret.spellId = this.spellId;
  32. base.CopyTo(other);
  33. }
  34. protected override void OnBuffBegin(XmdsCommonServer.Plugin.XmdsVirtual hitter, XmdsCommonServer.Plugin.XmdsVirtual attacker, InstanceUnit.BuffState state)
  35. {
  36. //注册监听.
  37. attacker = hitter;
  38. }
  39. protected override void OnBuffEnd(XmdsCommonServer.Plugin.XmdsVirtual hitter, InstanceUnit.BuffState state, bool replace)
  40. {
  41. //取消监听.
  42. hitter.UnRegistOnHitDamage(mHandleUUID);
  43. hitter.mUnit.Parent.unitLaunchSpell(XmdsSkillType.none, hitter.mUnit,
  44. ComSpellTemplate.Instance().GetSpellByID(this.spellId),
  45. hitter.mUnit.X, hitter.mUnit.Y, hitter.mUnit.ID);
  46. }
  47. protected override void OnDispose()
  48. {
  49. base.OnDispose();
  50. }
  51. }
  52. }