summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/Buff/XBuffTriggerByCombo.cs
blob: 46871868297c37fc254228be4d3e03d3e605d86c (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
31
32
using System;

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

		private uint m_Count;

		public XBuffTriggerByCombo(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.m_Count != 0u && this.m_Count % this.m_Base == 0u;
		}

		public override void OnComboChange(uint comboCount)
		{
			this.m_Count = comboCount;
			base.Trigger();
		}
	}
}