summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/Buff/XBuffTriggerByCastSkill.cs
blob: 9478300a40ccb99d50445c7182c87ad2da3e6a07 (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;
using System.Collections.Generic;

namespace XMainClient
{
	internal class XBuffTriggerByCastSkill : XBuffTrigger
	{
		private HurtInfo m_RawInput;

		private HashSet<uint> m_SpecifiedSkillsSet;

		public XBuffTriggerByCastSkill(XBuff buff) : base(buff)
		{
			this.m_SpecifiedSkillsSet = buff.RelevantSkills;
		}

		public override void OnCastSkill(HurtInfo rawInput)
		{
			base.OnCastSkill(rawInput);
			this.m_RawInput = rawInput;
			base.Trigger();
		}

		public override bool CheckTriggerCondition()
		{
			bool flag = this.m_SpecifiedSkillsSet != null && (this.m_RawInput == null || !this.m_SpecifiedSkillsSet.Contains(this.m_RawInput.SkillID));
			return !flag;
		}
	}
}