summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/Buff/XBuffTriggerByStacking.cs
blob: d792adec3c082f77ef06fdb8054e918408806917 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System;

namespace XMainClient
{
	internal class XBuffTriggerByStacking : XBuffTrigger
	{
		private uint m_Base;

		public XBuffTriggerByStacking(XBuff buff) : base(buff)
		{
			this.m_Base = (uint)base._GetTriggerParamInt(buff.BuffInfo, 0);
			bool flag = this.m_Base == 0u;
			if (flag)
			{
				this.m_Base = 1u;
			}
		}

		public override bool CheckTriggerCondition()
		{
			return this._Buff.StackCount % this.m_Base == 0u;
		}

		public override void OnAppend(XEntity entity)
		{
			base.OnAppend(entity);
			base.Trigger();
		}
	}
}