diff options
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/Buff/XBuffChangeEventArgs.cs')
-rw-r--r-- | Client/Assets/Scripts/XMainClient/Buff/XBuffChangeEventArgs.cs | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/Buff/XBuffChangeEventArgs.cs b/Client/Assets/Scripts/XMainClient/Buff/XBuffChangeEventArgs.cs new file mode 100644 index 00000000..fdc3892f --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/Buff/XBuffChangeEventArgs.cs @@ -0,0 +1,65 @@ +using System;
+
+namespace XMainClient
+{
+ internal class XBuffChangeEventArgs : XEventArgs
+ {
+ public UIBuffInfo addBuff;
+
+ public UIBuffInfo removeBuff;
+
+ public UIBuffInfo updateBuff;
+
+ public XEntity entity;
+
+ public XBuffChangeEventArgs()
+ {
+ this._eDefine = XEventDefine.XEvent_BuffChange;
+ this.addBuff = null;
+ this.removeBuff = null;
+ this.updateBuff = null;
+ this.entity = null;
+ }
+
+ public override void Recycle()
+ {
+ base.Recycle();
+ this.addBuff = null;
+ this.removeBuff = null;
+ this.updateBuff = null;
+ this.entity = null;
+ XEventPool<XBuffChangeEventArgs>.Recycle(this);
+ }
+
+ public UIBuffInfo GetActive()
+ {
+ bool flag = this.addBuff != null;
+ UIBuffInfo result;
+ if (flag)
+ {
+ result = this.addBuff;
+ }
+ else
+ {
+ bool flag2 = this.removeBuff != null;
+ if (flag2)
+ {
+ result = this.removeBuff;
+ }
+ else
+ {
+ bool flag3 = this.updateBuff != null;
+ if (flag3)
+ {
+ result = this.updateBuff;
+ }
+ else
+ {
+ result = null;
+ }
+ }
+ }
+ return result;
+ }
+ }
+}
|