12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- using CommonAI.Zone;
- using CommonLang;
- using XmdsCommon.Plugin;
- using XmdsCommonServer.Plugin;
- using XmdsCommonServer.Plugin.XmdsSkillTemplate.DamageCalculator;
- using XmdsCommonServer.XLS.Data;
- using XmdsCommonSkill.Plugin.Buffs;
- using static CommonAI.Zone.Instance.InstanceUnit;
- namespace XmdsCommonSkill.Plugin.FunctionEvent
- {
- /// <summary>
- /// 特殊效果 - 穿云箭。提供N层可叠加的buff
- /// </summary>
- public class SpecialFun_2000 : XmdsBattleFunctionEventBase
- {
- public static readonly int EventID = 2000;
- public static int Buff_ID = 2000;
- public override int GetEventID() { return EventID; }
- protected override bool OnInit()
- {
- return XmdsBuffFactory.GetInstance().XmdsBuffPackTest(Buff_ID, XmdsBuffProperties.XmdsBuffAbility.PropChange);
- }
- protected override void OnTriggerEvent(XmdsVirtual target, int value1, int value2, int value3, int value4, int value5, int value6)
- {
- XmdsBuffPack pack = XmdsBuffFactory.GetInstance().GetXmdsBuffPack(Buff_ID);
- var buff1 = pack.GetXmdsBuff(0) as XmdsBuff_PropChange;
- buff1.IsPercent = false;
- buff1.CurrentValue = value1;
- buff1.CurentChangeType = XmdsVirtual.UnitAttributeType.AllDmgAdd;
- BuffTemplate bt = pack.mBuffTemplate;
- bt.IsHarmful = false;
- bt.LifeTimeMS = value2;
- pack.BindTemplateAndDispose();
- ////多层效果叠加
- //BuffState oldBuff = target.mUnit.GetBuffByID(Buff_ID);
- //if(oldBuff != null)
- //{
- // buff1.CurrentValue = value1 * (1 + oldBuff.OverlayLevel);
- //}
- target.mUnit.AddBuff(bt, target.mUnit);
- }
- }
- }
|