Aurora.Addon.HyperGrid.UserAgentServerConnector.GetHomeRegion C# (CSharp) Метод

GetHomeRegion() публичный Метод

public GetHomeRegion ( Nwc.XmlRpc.XmlRpcRequest request, IPEndPoint remoteClient ) : Nwc.XmlRpc.XmlRpcResponse
request Nwc.XmlRpc.XmlRpcRequest
remoteClient System.Net.IPEndPoint
Результат Nwc.XmlRpc.XmlRpcResponse
        public XmlRpcResponse GetHomeRegion(XmlRpcRequest request, IPEndPoint remoteClient)
        {
            Hashtable requestData = (Hashtable)request.Params[0];
            //string host = (string)requestData["host"];
            //string portstr = (string)requestData["port"];
            string userID_str = (string)requestData["userID"];
            UUID userID = UUID.Zero;
            UUID.TryParse (userID_str, out userID);

            Vector3 position = Vector3.UnitY, lookAt = Vector3.UnitY;
            GridRegion regInfo = m_HomeUsersService.GetHomeRegion (userID, out position, out lookAt);

            Hashtable hash = new Hashtable ();
            if (regInfo == null)
                hash["result"] = "false";
            else
            {
                hash["result"] = "true";
                hash["uuid"] = regInfo.RegionID.ToString ();
                hash["x"] = regInfo.RegionLocX.ToString ();
                hash["y"] = regInfo.RegionLocY.ToString ();
                hash["region_name"] = regInfo.RegionName;
                hash["hostname"] = regInfo.ExternalHostName;
                hash["http_port"] = regInfo.HttpPort.ToString ();
                hash["internal_port"] = regInfo.InternalEndPoint.Port.ToString ();
                hash["position"] = position.ToString ();
                hash["lookAt"] = lookAt.ToString ();
            }
            XmlRpcResponse response = new XmlRpcResponse ();
            response.Value = hash;
            return response;
        }