Exemple #1
0
        public static OSDMap CrossAgent(GridRegion crossingRegion, Vector3 pos,
                                        Vector3 velocity, AgentCircuitData circuit, AgentData cAgent, ulong RequestingRegion)
        {
            OSDMap llsdBody = new OSDMap();

            llsdBody.Add("Pos", pos);
            llsdBody.Add("Vel", velocity);
            llsdBody.Add("Region", crossingRegion.ToOSD());
            llsdBody.Add("Circuit", circuit.PackAgentCircuitData());
            llsdBody.Add("AgentData", cAgent.Pack());
            return(buildEvent("CrossAgent", llsdBody, circuit.AgentID, RequestingRegion));
        }
Exemple #2
0
        public static OSDMap TeleportAgent(int DrawDistance, AgentCircuitData circuit,
                                           AgentData data, uint TeleportFlags,
                                           GridRegion destination, ulong requestingRegion)
        {
            OSDMap llsdBody = new OSDMap();

            llsdBody.Add("DrawDistance", DrawDistance);
            llsdBody.Add("Circuit", circuit.PackAgentCircuitData());
            llsdBody.Add("TeleportFlags", TeleportFlags);
            llsdBody.Add("AgentData", data.Pack());
            llsdBody.Add("Region", destination.ToOSD());
            return(buildEvent("TeleportAgent", llsdBody, circuit.AgentID, requestingRegion));
        }
Exemple #3
0
        public bool Store(GridRegion region)
        {
            if (region.EstateOwner == UUID.Zero)
            {
                IEstateConnector EstateConnector = Aurora.DataManager.DataManager.RequestPlugin <IEstateConnector>();
                EstateSettings   ES = null;
                if (EstateConnector != null)
                {
                    ES = EstateConnector.GetEstateSettings(region.RegionID);
                    if (ES != null)
                    {
                        region.EstateOwner = ES.EstateOwner;
                    }
                }
                if (region.EstateOwner == UUID.Zero && ES != null && ES.EstateID != 0)
                {
                    MainConsole.Instance.Error("[LocalGridConnector] Attempt to store region with owner of UUID.Zero detected:" + (new System.Diagnostics.StackTrace()).GetFrame(1).ToString());
                }
            }

            Dictionary <string, object> row = new Dictionary <string, object>(14);

            row["ScopeID"]    = region.ScopeID;
            row["RegionUUID"] = region.RegionID;
            row["RegionName"] = region.RegionName;
            row["LocX"]       = region.RegionLocX;
            row["LocY"]       = region.RegionLocY;
            row["LocZ"]       = region.RegionLocZ;
            row["OwnerUUID"]  = region.EstateOwner;
            row["Access"]     = region.Access;
            row["SizeX"]      = region.RegionSizeX;
            row["SizeY"]      = region.RegionSizeY;
            row["SizeZ"]      = region.RegionSizeZ;
            row["Flags"]      = region.Flags;
            row["SessionID"]  = region.SessionID;
            row["Info"]       = OSDParser.SerializeJsonString(region.ToOSD());

            return(GD.Replace(m_realm, row));
        }
        public bool Store(GridRegion region)
        {
            List <string> keys   = new List <string>();
            List <object> values = new List <object>();

            keys.Add("ScopeID");
            keys.Add("RegionUUID");
            keys.Add("RegionName");
            keys.Add("LocX");
            keys.Add("LocY");
            keys.Add("LocZ");
            keys.Add("OwnerUUID");
            keys.Add("Access");
            keys.Add("SizeX");
            keys.Add("SizeY");
            keys.Add("SizeZ");
            keys.Add("Flags");
            keys.Add("SessionID");
            keys.Add("Info");

            values.Add(region.ScopeID);
            values.Add(region.RegionID);
            values.Add(region.RegionName.MySqlEscape(50));
            values.Add(region.RegionLocX);
            values.Add(region.RegionLocY);
            values.Add(region.RegionLocZ);
            values.Add(region.EstateOwner);
            values.Add(region.Access);
            values.Add(region.RegionSizeX);
            values.Add(region.RegionSizeY);
            values.Add(region.RegionSizeZ);
            values.Add(region.Flags); //Flags
            values.Add(region.SessionID);
            values.Add(OSDParser.SerializeJsonString(region.ToOSD()));

            return(GD.Replace(m_realm, keys.ToArray(), values.ToArray()));
        }
Exemple #5
0
        public static OSDMap TeleportAgent(int DrawDistance, AgentCircuitData circuit,
            AgentData data, uint TeleportFlags,
            GridRegion destination, ulong requestingRegion)
        {
            OSDMap llsdBody = new OSDMap();

            llsdBody.Add("DrawDistance", DrawDistance);
            llsdBody.Add("Circuit", circuit.PackAgentCircuitData());
            llsdBody.Add("TeleportFlags", TeleportFlags);
            llsdBody.Add("AgentData", data.Pack());
            llsdBody.Add("Region", destination.ToOSD());
            return buildEvent("TeleportAgent", llsdBody, circuit.AgentID, requestingRegion);
        }
Exemple #6
0
        public static OSDMap CrossAgent(GridRegion crossingRegion, Vector3 pos,
            Vector3 velocity, AgentCircuitData circuit, AgentData cAgent, ulong RequestingRegion)
        {
            OSDMap llsdBody = new OSDMap();

            llsdBody.Add("Pos", pos);
            llsdBody.Add("Vel", velocity);
            llsdBody.Add("Region", crossingRegion.ToOSD());
            llsdBody.Add("Circuit", circuit.PackAgentCircuitData());
            llsdBody.Add("AgentData", cAgent.Pack());
            return buildEvent("CrossAgent", llsdBody, circuit.AgentID, RequestingRegion);
        }