1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- using Common.Utility.CombatEvent;
- using Fort23.Core;
- using GameLogic.Combat.CombatTool;
- using GameLogic.Player;
- namespace GameLogic.Combat.Buff
- {
- /// <summary>
- /// 灼热:对敌人照成{0}火属性灼烧伤害,满层后敌人获得灼痛,有灼痛时不在获得,满层时敌人会受到痛苦,敌人使用功法时自身受到当前生命{1}%伤
- /// </summary>
- public class b_1005 : BuffBasic
- {
- private float _time;
- protected override void ProInit()
- {
- CombatEventManager.Instance.AddEventListener(CombatEventType.AddUseGongFa, AddUseGongFa);
- }
- private void AddUseGongFa(IEventData eventData)
- {
- AddUseGongFaEventData data = (AddUseGongFaEventData)eventData;
- if (data.SkillBasic.CombatHeroEntity == combatHeroEntity)
- {
- if (buffCount < buffInf.BuffConfig.overlayCount)
- {
- return;
- }
- float harmbl = buffInf.BuffConfig.effectValue[1];
- long harm = CombatCalculateTool.Instance.GetVlaueRatioForLong(
- source.CurrCombatHeroInfo.hp.Value, harmbl);
- CombatCalculateTool.Instance.Harm(source, combatHeroEntity, harm, AttType.Buff, _triggerData,
- WuXingType.Fire,null,HarmType.Buff);
- }
- }
-
- protected override void ProUpdate(float t)
- {
- _time += t;
- if (_time >= 1)
- {
- _time -= 1;
- float harmbl = buffCount * buffInf.BuffConfig.effectValue[0];
- long harm = CombatCalculateTool.Instance.GetVlaueRatioForLong(
- source.CurrCombatHeroInfo.attack.Value, harmbl);
- harm += CombatCalculateTool.Instance.GetVlaueRatioForLong(
- harm, source.CurrCombatHeroInfo.Fire_Proficient);
- CombatCalculateTool.Instance.Harm(source, combatHeroEntity, harm, AttType.Buff, _triggerData,
- WuXingType.Fire, null, HarmType.Buff);
- }
- }
- // protected override void ProUpdateEffect()
- // {
- // if (buffCount >= buffInf.BuffConfig.overlayCount) //最大叠加数量
- // {
- // b_1010 b1010 = combatHeroEntity.BuffControl.GetBuffBasicForType<b_1010>();
- // if (b1010 != null)
- // {
- // return;
- // }
- //
- // BuffInfo buffInfo = BuffInfo.GetBuffInfo(10101, 1,this);
- // combatHeroEntity.BuffControl.AddBuff(source, buffInfo);
- // // combatHeroEntity.BuffControl.RemoveBuff(this);
- // }
- // }
- protected override void ProDormancyObj()
- {
- CombatEventManager.Instance.RemoveEventListener(CombatEventType.AddUseGongFa, AddUseGongFa);
- }
- }
- }
|