| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 | using Common.Utility.CombatEvent;using Fort23.Core;using GameLogic.Combat.Buff;using GameLogic.Combat.CombatTool;using GameLogic.Player;namespace GameLogic.Combat.Skill{    /// <summary>    /// 灵油    ///前方功法附加上灵气汇聚而成的可燃物质,火属性伤害提升{0}%并额外施加一层灼烧    /// </summary>    public class S2017 : SkillBasic    {        protected override void ProActiveSkill()        {            CombatEventManager.Instance.AddEventListener(CombatEventType.StartInjured, StartInjured);            CombatEventManager.Instance.AddEventListener(CombatEventType.HeroInjured, HeroInjured);        }        protected override void ProUseSkill()        {        }        protected override void ProDispose()        {            CombatEventManager.Instance.RemoveEventListener(CombatEventType.StartInjured, StartInjured);            CombatEventManager.Instance.RemoveEventListener(CombatEventType.HeroInjured, HeroInjured);        }        private void StartInjured(IEventData iEventData)        {            StartInjuredEventData heroInjuredEventData = iEventData as StartInjuredEventData;            if (heroInjuredEventData.HarmReturnInfo.source == CombatHeroEntity)            {                SkillBasic skillBasic = heroInjuredEventData.HarmReturnInfo.triggerData.Source as SkillBasic;                if (skillBasic != null && IsPassiveActivateSkill(skillBasic) &&                    skillBasic.wuXingType.HasFlag(WuXingType.Fire))                {                    long v = CombatCalculateTool.Instance.GetVlaueRatioForLong(heroInjuredEventData.HarmReturnInfo.att,                        effectValue[0]);                    heroInjuredEventData.HarmReturnInfo.att += v;                }            }        }        private void HeroInjured(IEventData iEventData)        {            HeroInjuredEventData heroInjuredEventData = iEventData as HeroInjuredEventData;            if (heroInjuredEventData.HarmReturnInfo.source == CombatHeroEntity &&                heroInjuredEventData.HarmReturnInfo.isHitHero)            {                SkillBasic skillBasic = heroInjuredEventData.HarmReturnInfo.triggerData.Source as SkillBasic;                if (skillBasic != null && IsPassiveActivateSkill(skillBasic) &&                    skillBasic.wuXingType.HasFlag(WuXingType.Fire))                {                    CombatHeroEntity target =                        heroInjuredEventData.HarmReturnInfo.target.combatHeroEntity as CombatHeroEntity;                    BuffInfo buffInfo = BuffInfo.GetBuffInfo(10051, 1,skillBasic);                    target.BuffControl.AddBuff(CombatHeroEntity,                        buffInfo);                }            }        }    }}
 |