コード例 #1
0
ファイル: Database.cs プロジェクト: Blecki/BMud
 public Database(String basePath, MudCore core)
 {
     this.staticPath = basePath + "static/";
     this.serializedPath = basePath + "serialized/";
     this.core = core;
 }
コード例 #2
0
ファイル: MudCoreSetupScript.cs プロジェクト: Blecki/BMud
        public override void Execute(MudCore core)
        {
            core._databaseLock.WaitOne();
            Client client = null;

            if (player is Client) client = player as Client;
            else
            {
                var path = player.GetLocalProperty("@path") as String;
                if (path != null)
                    foreach (var c in core.ConnectedClients)
                        if (c.player.GetLocalProperty("@path") == path)
                            client = c;
            }

            if (client != null)
                client.Disconnect();

            core._databaseLock.ReleaseMutex();
        }