diff options
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/Buff/XBuffTriggerByBeHit.cs')
-rw-r--r-- | Client/Assets/Scripts/XMainClient/Buff/XBuffTriggerByBeHit.cs | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/Buff/XBuffTriggerByBeHit.cs b/Client/Assets/Scripts/XMainClient/Buff/XBuffTriggerByBeHit.cs new file mode 100644 index 00000000..6e71f72a --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/Buff/XBuffTriggerByBeHit.cs @@ -0,0 +1,75 @@ +using System;
+
+namespace XMainClient
+{
+ internal class XBuffTriggerByBeHit : XBuffTrigger
+ {
+ public override XBuffEffectPrioriy Priority
+ {
+ get
+ {
+ return XBuffEffectPrioriy.BEP_TriggerByBeHit;
+ }
+ }
+
+ private int m_Type;
+
+ private int m_Param0;
+
+ private XEntity m_Entity;
+
+ private HurtInfo m_RawInput;
+
+ private ProjectDamageResult m_Result;
+
+ public XBuffTriggerByBeHit(XBuff buff) : base(buff)
+ {
+ this.m_Type = base._GetTriggerParamInt(buff.BuffInfo, 0);
+ this.m_Param0 = base._GetTriggerParamInt(buff.BuffInfo, 1);
+ }
+
+ public override void OnAdd(XEntity entity, CombatEffectHelper pEffectHelper)
+ {
+ base.OnAdd(entity, pEffectHelper);
+ this.m_Entity = entity;
+ }
+
+ public override void OnBuffEffect(HurtInfo rawInput, ProjectDamageResult result)
+ {
+ bool flag = rawInput.SkillID == 0u;
+ if (!flag)
+ {
+ this.m_RawInput = rawInput;
+ this.m_Result = result;
+ base.Trigger();
+ }
+ }
+
+ public override bool CheckTriggerCondition()
+ {
+ int type = this.m_Type;
+ if (type != 0)
+ {
+ if (type == 1)
+ {
+ bool flag = this.m_Result.Result != ProjectResultType.PJRES_IMMORTAL;
+ if (flag)
+ {
+ return false;
+ }
+ bool flag2 = this.m_Param0 != 0;
+ if (flag2)
+ {
+ XBuff buffByID = this.m_Entity.Buffs.GetBuffByID(this.m_Param0);
+ bool flag3 = buffByID == null;
+ if (flag3)
+ {
+ return false;
+ }
+ }
+ }
+ }
+ return true;
+ }
+ }
+}
|