Index: Services/WCell.RealmServer/Network/RealmServer.cs =================================================================== --- Services/WCell.RealmServer/Network/RealmServer.cs (revision 223) +++ Services/WCell.RealmServer/Network/RealmServer.cs (working copy) @@ -289,12 +289,12 @@ // Reconnect instead! m_authServiceClient.Channel.UpdateRealmServer(m_realmID, m_configuration.ServerName, ((IPEndPoint)m_tcpListen.LocalEndPoint).ToString(), - WorldMgr.ServerPopulation, 0, 0, 1, 0); + WorldMgr.ServerPopulation, 0, 0, 1, WorldMgr.IsLocked); if (Configuration.RegisterOutsideAddress) { m_authServiceClient.Channel.UpdateRealmServer(m_outsideRealmID, m_configuration.OutsideServerName, string.Format("{0}:{1}", Configuration.OutsideAddress, Configuration.Port.ToString()), - WorldMgr.ServerPopulation, 0, 0, 1, 0); + WorldMgr.ServerPopulation, 0, 0, 1, WorldMgr.IsLocked); } } } @@ -463,7 +463,16 @@ } #endregion - + public static void LockRealm() + { + WorldMgr.IsLocked = 1; + WorldMgr.Broadcast("Realm has been locked!"); + } + public static void UnlockRealm() + { + WorldMgr.IsLocked = 0; + WorldMgr.Broadcast("Realm has been unlocked!"); + } #region Send methods /// Index: Services/WCell.RealmServer/World/WorldMgr.cs =================================================================== --- Services/WCell.RealmServer/World/WorldMgr.cs (revision 223) +++ Services/WCell.RealmServer/World/WorldMgr.cs (working copy) @@ -163,6 +163,10 @@ return (Characters.Count > capacity * 0.75 ? 1.7f : (Characters.Count > capacity / 3 ? 1.6f : 1.5f)); } } + /// + /// Determines if the server has been locked or not + /// + public static int IsLocked = 0; #endregion