1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
using System; namespace XMainClient { internal class XBuffTriggerWhenRemove : XBuffTrigger { public XBuffTriggerWhenRemove(XBuff buff) : base(buff) { } public override void OnRemove(XEntity entity, bool IsReplaced) { bool flag = !IsReplaced; if (flag) { base.Trigger(); } base.OnRemove(entity, IsReplaced); } } }