12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- using CommonAI.Zone.Instance;
- using CommonAI.Zone.Formula;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using XmdsCommon.Plugin;
- using XmdsCommonServer.Plugin;
- using XmdsCommonServer.Plugin.XmdsSkillTemplate.Skills;
- using XmdsCommonServer.Plugin.XmdsSkillTemplate.DamageCalculator;
- using CommonAI.Data;
- namespace XmdsCommonSkill.Plugin.Buffs
- {
-
-
-
- public class XmdsBuff_Brand_3 : XmdsBuffBase
- {
-
-
-
- public int BuffValue;
- private int mHandleUUID = 0;
- public override int GetAbilityID()
- {
- return (int)XmdsCommon.Plugin.XmdsBuffProperties.XmdsBuffAbility.Brand_3;
- }
- public override void CopyTo(UnitBuff other)
- {
- var ret = other as XmdsBuff_Brand_3;
- ret.BuffValue = this.BuffValue;
- base.CopyTo(other);
- }
- protected override void OnBuffBegin(XmdsCommonServer.Plugin.XmdsVirtual hitter, XmdsCommonServer.Plugin.XmdsVirtual attacker, InstanceUnit.BuffState state)
- {
-
- mHandleUUID = hitter.RegistOnHitOther(OnHandleHitDmage, null);
- }
- protected override void OnBuffEnd(XmdsCommonServer.Plugin.XmdsVirtual hitter, InstanceUnit.BuffState state, bool replace)
- {
-
- hitter.UnRegistOnHitOther(mHandleUUID);
- }
-
- private float OnHandleHitDmage(float damage, XmdsVirtual hitted, XmdsVirtual attacker, AttackSource source,
- ref XmdsVirtual.AtkResult result, DamageType damageType, GameSkill skill, ref bool isEndDispatch)
- {
- damage = damage + BuffValue;
-
- attacker.mUnit.removeBuff(BindBuffID);
- return damage;
- }
- protected override void OnDispose()
- {
- base.OnDispose();
- }
- }
- }
|