using CommonAI.Zone; using System; using System.Collections.Generic; using System.Linq; using System.Text; using XmdsCommon.Plugin; using XmdsCommonServer.Plugin; using XmdsCommonServer.Plugin.XmdsSkillTemplate.DamageCalculator; using XmdsCommonServer.Plugin.XmdsSkillTemplate.Skills; using XmdsCommonServer.XLS.Data; using XmdsCommonSkill.Plugin.Buffs; namespace XmdsCommonSkill.Plugin.FunctionEvent { /** 一次性伤害 */ public class XmdsBattleFunctionEvent_9003 : XmdsBattleFunctionEventBase { public static readonly int EventID = 9003; private int mMockTime = 0; private int mBuffID; public override int GetEventID() { return EventID; } protected override bool OnInit() { BuffConfig config = base.GetBuffConfig(); mMockTime = System.Int32.Parse(config.ValueSet1); mBuffID = config.BuffID; return true; } protected override void OnTriggerEvent(XmdsVirtual target, XmdsVirtual sender) { XmdsBuffPack pack = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(mBuffID); if(pack == null) { log.Error("XmdsBattleFunctionEvent_9003不存在buff:" + mBuffID); return; } // XmdsBuff_Invincible_LuanchSkillBreak buff = (XmdsBuff_Invincible_LuanchSkillBreak)pack.GetXmdsBuff(XmdsBuffProperties.XmdsBuffAbility.JINGU); BuffTemplate bt = pack.mBuffTemplate; bt.LifeTimeMS = mMockTime; pack.BindTemplateAndDispose(); target.mUnit.AddBuff(bt, sender.mUnit); } } }