Aurora.Addon.HyperGrid.UserAgentService.UpdateTravelInfo C# (CSharp) Метод

UpdateTravelInfo() приватный Метод

private UpdateTravelInfo ( Aurora.Framework.AgentCircuitData agentCircuit, GridRegion region ) : TravelingAgentInfo
agentCircuit Aurora.Framework.AgentCircuitData
region OpenSim.Services.Interfaces.GridRegion
Результат TravelingAgentInfo
        TravelingAgentInfo UpdateTravelInfo(AgentCircuitData agentCircuit, GridRegion region)
        {
            TravelingAgentInfo travel = new TravelingAgentInfo ();
            TravelingAgentInfo old = null;
            lock (m_TravelingAgents)
            {
                if (m_TravelingAgents.ContainsKey (agentCircuit.SessionID))
                {
                    // Very important! Override whatever this agent comes with.
                    // UserAgentService always sets the IP for every new agent
                    // with the original IP address.
                    agentCircuit.IPAddress = m_TravelingAgents[agentCircuit.SessionID].ClientIPAddress;

                    old = m_TravelingAgents[agentCircuit.SessionID];
                }

                m_TravelingAgents[agentCircuit.SessionID] = travel;
            }
            travel.UserID = agentCircuit.AgentID;
            travel.GridExternalName = region.ServerURI;
            travel.ServiceToken = agentCircuit.ServiceSessionID;
            if (old != null)
                travel.ClientIPAddress = old.ClientIPAddress;

            return old;
        }