diff options
author | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
commit | 6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch) | |
tree | 7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/XCommandDirectSys.cs |
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/XCommandDirectSys.cs')
-rw-r--r-- | Client/Assets/Scripts/XMainClient/XCommandDirectSys.cs | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/XCommandDirectSys.cs b/Client/Assets/Scripts/XMainClient/XCommandDirectSys.cs new file mode 100644 index 00000000..19b5bdde --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/XCommandDirectSys.cs @@ -0,0 +1,64 @@ +using System;
+using XMainClient.UI;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient
+{
+ internal class XCommandDirectSys : XBaseCommand
+ {
+ private uint CachedOpenSystem;
+
+ public override bool Execute()
+ {
+ base.publicModule();
+ return this._execute(this._cmd.param1, this._cmd.param2);
+ }
+
+ public override void OnFinish()
+ {
+ XSingleton<XTutorialMgr>.singleton.Exculsive = false;
+ base.OnFinish();
+ }
+
+ public bool _execute(string param1, string param2)
+ {
+ this.CachedOpenSystem = uint.Parse(param1);
+ XPlayerAttributes xplayerAttributes = XSingleton<XEntityMgr>.singleton.Player.Attributes as XPlayerAttributes;
+ bool flag = xplayerAttributes.IsSystemOpened(this.CachedOpenSystem);
+ bool result;
+ if (flag)
+ {
+ result = true;
+ }
+ else
+ {
+ bool flag2 = !XSingleton<XTutorialHelper>.singleton.IsSysOpend(this.CachedOpenSystem);
+ if (flag2)
+ {
+ result = false;
+ }
+ else
+ {
+ bool flag3 = this.CachedOpenSystem > 0u;
+ if (flag3)
+ {
+ (XSingleton<XEntityMgr>.singleton.Player.Attributes as XPlayerAttributes).ReallyOpenSystem(this.CachedOpenSystem);
+ bool flag4 = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.IsVisible();
+ if (flag4)
+ {
+ DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.OnSysChange((XSysDefine)this.CachedOpenSystem);
+ XSingleton<XGameSysMgr>.singleton.RecalculateRedPointState((XSysDefine)this.CachedOpenSystem, true);
+ }
+ result = true;
+ }
+ else
+ {
+ result = false;
+ }
+ }
+ }
+ return result;
+ }
+ }
+}
|