XmdsSummonBase_ActiveSkill.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using CommonAI.Data;
  2. using CommonAI.Zone;
  3. using CommonLang.Geometry;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using XmdsCommonServer.Plugin;
  10. using XmdsCommonServer.Plugin.Units;
  11. using XmdsCommonServer.Plugin.XmdsSkillTemplate.Skills;
  12. using XmdsCommonServer.XLS.Data;
  13. using static XmdsCommonServer.XLS.Data.XmdsSkillData;
  14. using static XmdsCommonSkill.Plugin.Skills.XmdsSummonBase;
  15. namespace XmdsCommonSkill.Plugin.Skills
  16. {
  17. /**
  18. * 召唤类boss机制:按照数量,时间,半径召唤小怪
  19. */
  20. public abstract class XmdsSummonBase_ActiveSkill : XmdsSkillBase
  21. {
  22. protected XmdsSummonBase summonModule = new XmdsSummonBase();
  23. //召唤物ID
  24. protected int mSummonID;
  25. protected override void OnRegistEvent()
  26. {
  27. this.RegistEvent(EventType.UseFormluaType, OnUseFormluaTypeEvent);
  28. base.OnRegistEvent();
  29. }
  30. private void OnUseFormluaTypeEvent(BattleParams param)
  31. {
  32. param.UseDamageType = CommonAI.Data.DamageType.None;
  33. }
  34. protected override void OnSkillLogicEvent(BattleParams param)
  35. {
  36. summonModule.SummonUnit(param.Attacker);
  37. }
  38. protected XmdsSkillData InitSummonConfig(SummonType sumType)
  39. {
  40. XmdsSkillData data = XmdsDataMgr.GetInstance().GetXmdsSkillData(this.SkillID);
  41. XmdsSkillValue value1, value2, value3;
  42. InitData(data, out value1, XmdsSkillData.XmdsSkillDataKey.ValueSet);
  43. InitData(data, out value2, XmdsSkillData.XmdsSkillDataKey.ValueSet2);
  44. InitData(data, out value3, XmdsSkillData.XmdsSkillDataKey.ValueSet3);
  45. this.summonModule.InitConfig(sumType, value1, value2, value3);
  46. this.mSummonID = this.summonModule.GetSummonID();
  47. return data;
  48. }
  49. }
  50. }