XmdsBuff_ChangeSkill.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using XmdsCommon.Plugin;
  6. using XmdsCommonServer.Plugin.XmdsSkillTemplate.Skills;
  7. namespace XmdsCommonSkill.Plugin.Buffs
  8. {
  9. /// <summary>
  10. /// FileName: XmdsBuff_ChangeSkill.cs
  11. /// Author: Alex.Yu
  12. /// Corporation:...
  13. /// Description:
  14. /// DateTime: 2015/7/22 16:32:58
  15. /// </summary>
  16. public class XmdsBuff_ChangeSkill : XmdsBuffBase
  17. {
  18. public List<GameSkill> SkillList = null;
  19. public override int GetAbilityID()
  20. {
  21. return (int)XmdsCommon.Plugin.XmdsBuffProperties.XmdsBuffAbility.ChangeSkill;
  22. }
  23. public override void CopyTo(UnitBuff other)
  24. {
  25. if (SkillList != null)
  26. {
  27. var ret = other as XmdsBuff_ChangeSkill;
  28. ret.SkillList = new List<GameSkill>(this.SkillList);
  29. this.SkillList.Clear();
  30. this.SkillList = null;
  31. }
  32. base.CopyTo(other);
  33. }
  34. protected override void OnBuffBegin(XmdsCommonServer.Plugin.XmdsVirtual hitter, XmdsCommonServer.Plugin.XmdsVirtual attacker, CommonAI.Zone.Instance.InstanceUnit.BuffState state)
  35. {
  36. }
  37. protected override void OnBuffEnd(XmdsCommonServer.Plugin.XmdsVirtual hitter, CommonAI.Zone.Instance.InstanceUnit.BuffState state, bool replace)
  38. {
  39. }
  40. protected override void OnDispose()
  41. {
  42. if (SkillList != null)
  43. {
  44. SkillList.Clear();
  45. }
  46. base.OnDispose();
  47. }
  48. }
  49. }