S89013.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. using CombatLibrary.CombatLibrary.CombatCore.CustomizeTimeLogic.FxLogic;
  2. using Common.Utility.CombatEvent;
  3. using Fort23.Core;
  4. using GameLogic.Combat.Buff;
  5. using GameLogic.Combat.CombatTool;
  6. using GameLogic.Combat.Hero;
  7. using UTool.CustomizeTimeLogic.FxLogic.TimeLineEventinterface;
  8. namespace GameLogic.Combat.Skill
  9. {
  10. /// <summary>
  11. /// 剑祖的攻击会让目标受到一层剑毅
  12. /// </summary>
  13. public class S89013 : SkillBasic
  14. {
  15. private bool isTrgger;
  16. private float currTime;
  17. private int count;
  18. protected override void ProInitSkill()
  19. {
  20. CombatEventManager.Instance.AddEventListener(CombatEventType.HeroInjured, HeroInjured);
  21. }
  22. protected override void ProDispose()
  23. {
  24. CombatEventManager.Instance.RemoveEventListener(CombatEventType.HeroInjured, HeroInjured);
  25. }
  26. protected override void ProUseSkill()
  27. {
  28. }
  29. private void HeroInjured(IEventData iEventData)
  30. {
  31. HeroInjuredEventData heroInjuredEventData = iEventData as HeroInjuredEventData;
  32. if (heroInjuredEventData.HarmReturnInfo.source == CombatHeroEntity)
  33. {
  34. IBarrier barrier= heroInjuredEventData.HarmReturnInfo.triggerData.IBarrier as IBarrier;
  35. if (barrier == null)
  36. {
  37. return;
  38. }
  39. S89011 s89011 = heroInjuredEventData.HarmReturnInfo.triggerData.Source as S89011;
  40. if (s89011 == null)
  41. {
  42. BuffInfo buffInfo = BuffInfo.GetBuffInfo(10071, -1, 1);
  43. heroInjuredEventData.HarmReturnInfo.target.combatHeroEntity.BuffControl.AddBuff(CombatHeroEntity, buffInfo);
  44. }
  45. }
  46. }
  47. }
  48. }