public static GatewayInfo GetNormalGateway(uint exceptID) { uint[] keys = GatewayServerMgr.GetKeys(); foreach (uint id in keys) { if (id == exceptID) { continue; } GatewayInfo info = GameGlobal.GatewayMgr.FindTemplate(id); if (info != null && info.Fulled == false) { return(info); } } return(null); }