12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- 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.Zone;
- using XmdsCommonSkill.Plugin.Interface;
- using static XmdsCommonSkill.Plugin.Interface.ComSpellTemplate;
- using CommonAI.Zone.Helper;
- namespace XmdsCommonSkill.Plugin.Buffs
- {
- /// <summary>
- /// buff结束时,创建法术
- /// </summary>
- public class XmdsBuff_Brand_6 : XmdsBuffBase
- {
- public XmdsSpellID spellId;
- private int mHandleUUID = 0;
- public override int GetAbilityID()
- {
- return (int)XmdsCommon.Plugin.XmdsBuffProperties.XmdsBuffAbility.Brand_6;
- }
- public override void CopyTo(UnitBuff other)
- {
- var ret = other as XmdsBuff_Brand_6;
- ret.spellId = this.spellId;
- base.CopyTo(other);
- }
- protected override void OnBuffBegin(XmdsCommonServer.Plugin.XmdsVirtual hitter, XmdsCommonServer.Plugin.XmdsVirtual attacker, InstanceUnit.BuffState state)
- {
- //注册监听.
- attacker = hitter;
- }
- protected override void OnBuffEnd(XmdsCommonServer.Plugin.XmdsVirtual hitter, InstanceUnit.BuffState state, bool replace)
- {
- //取消监听.
- hitter.UnRegistOnHitDamage(mHandleUUID);
- hitter.mUnit.Parent.unitLaunchSpell(XmdsSkillType.none, hitter.mUnit,
- ComSpellTemplate.Instance().GetSpellByID(this.spellId),
- hitter.mUnit.X, hitter.mUnit.Y, hitter.mUnit.ID);
- }
- protected override void OnDispose()
- {
- base.OnDispose();
- }
- }
- }
|