本文整理汇总了C#中OpenSim.Services.Interfaces.GridRegion类的典型用法代码示例。如果您正苦于以下问题:C# OpenSim.Services.Interfaces.GridRegion类的具体用法?C# OpenSim.Services.Interfaces.GridRegion怎么用?C# OpenSim.Services.Interfaces.GridRegion使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OpenSim.Services.Interfaces.GridRegion类属于命名空间,在下文中一共展示了OpenSim.Services.Interfaces.GridRegion类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: OnRegionUp
private void OnRegionUp(GridRegion otherRegion)
{
// This shouldn't happen
if (otherRegion == null)
return;
m_log.DebugFormat("[REGION CACHE]: (on region {0}) Region {1} is up @ {2}-{3}",
m_scene.RegionInfo.RegionName, otherRegion.RegionName, Util.WorldToRegionLoc((uint)otherRegion.RegionLocX), Util.WorldToRegionLoc((uint)otherRegion.RegionLocY));
m_neighbours[otherRegion.RegionHandle] = otherRegion;
}
开发者ID:BogusCurry,项目名称:arribasim-dev,代码行数:11,代码来源:RegionCache.cs
示例2: CrossAgent
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);
}
开发者ID:kow,项目名称:Aurora-Sim,代码行数:12,代码来源:SyncMessageHelper.cs
示例3: FriendshipApproved
public bool FriendshipApproved(GridRegion region, UUID userID, string userName, UUID friendID)
{
Dictionary<string, object> sendData = new Dictionary<string, object>();
//sendData["VERSIONMIN"] = ProtocolVersions.ClientProtocolVersionMin.ToString();
//sendData["VERSIONMAX"] = ProtocolVersions.ClientProtocolVersionMax.ToString();
sendData["METHOD"] = "friendship_approved";
sendData["FromID"] = userID.ToString();
sendData["FromName"] = userName;
sendData["ToID"] = friendID.ToString();
return Call(region, sendData);
}
开发者ID:BogusCurry,项目名称:arribasim-dev,代码行数:13,代码来源:FriendsSimConnector.cs
示例4: FriendshipOffered
public virtual bool FriendshipOffered(GridRegion region, UUID userID, UUID friendID, string message, string userName)
{
Dictionary<string, object> sendData = new Dictionary<string, object>();
//sendData["VERSIONMIN"] = ProtocolVersions.ClientProtocolVersionMin.ToString();
//sendData["VERSIONMAX"] = ProtocolVersions.ClientProtocolVersionMax.ToString();
sendData["METHOD"] = "friendship_offered";
sendData["FromID"] = userID.ToString();
sendData["ToID"] = friendID.ToString();
sendData["Message"] = message;
if (userName != String.Empty)
sendData["FromName"] = userName;
return Call(region, sendData);
}
开发者ID:BogusCurry,项目名称:arribasim-dev,代码行数:15,代码来源:FriendsSimConnector.cs
示例5: Map2BlockFromGridRegion
public List<MapBlockData> Map2BlockFromGridRegion(GridRegion r, uint flag)
{
List<MapBlockData> blocks = new List<MapBlockData>();
MapBlockData block = new MapBlockData();
if (r == null)
{
block.Access = (byte)SimAccess.Down;
block.MapImageId = UUID.Zero;
blocks.Add(block);
}
else
{
block.Access = r.Access;
switch (flag & 0xffff)
{
case 0:
block.MapImageId = r.TerrainImage;
break;
case 2:
block.MapImageId = r.ParcelImage;
break;
default:
block.MapImageId = UUID.Zero;
break;
}
block.Name = r.RegionName;
block.X = (ushort)(r.RegionLocX / Constants.RegionSize);
block.Y = (ushort)(r.RegionLocY / Constants.RegionSize);
block.SizeX = (ushort)r.RegionSizeX;
block.SizeY = (ushort)r.RegionSizeY;
blocks.Add(block);
}
return blocks;
}
开发者ID:ffoliveira,项目名称:opensimulator,代码行数:34,代码来源:WorldMapModule.cs
示例6: TeleportStart
protected void TeleportStart(IClientAPI client, GridRegion destination, GridRegion finalDestination, uint teleportFlags, bool gridLogout)
{
if (gridLogout && m_RestrictInventoryAccessAbroad)
{
IUserManagement uMan = m_Scene.RequestModuleInterface<IUserManagement>();
if (uMan != null && uMan.IsLocalGridUser(client.AgentId))
{
// local grid user
ProcessInventoryForHypergriding(client);
}
else
{
// Foreigner
ProcessInventoryForLeaving(client);
}
}
}
开发者ID:BogusCurry,项目名称:arribasim-dev,代码行数:18,代码来源:HGInventoryAccessModule.cs
示例7: MapBlockFromGridRegion
// Fill a passed MapBlockData from a GridRegion
public MapBlockData MapBlockFromGridRegion(GridRegion r, uint flag)
{
MapBlockData block = new MapBlockData();
block.Access = r.Access;
switch (flag & 0xffff)
{
case 0:
block.MapImageId = r.TerrainImage;
break;
case 2:
block.MapImageId = r.ParcelImage;
break;
default:
block.MapImageId = UUID.Zero;
break;
}
block.Name = r.RegionName;
block.X = (ushort)Util.WorldToRegionLoc((uint)r.RegionLocX);
block.Y = (ushort)Util.WorldToRegionLoc((uint)r.RegionLocY);
block.SizeX = (ushort) r.RegionSizeX;
block.SizeY = (ushort) r.RegionSizeY;
return block;
}
开发者ID:ffoliveira,项目名称:opensimulator,代码行数:26,代码来源:WorldMapModule.cs
示例8: MapBlockFromGridRegion
protected MapBlockData MapBlockFromGridRegion(GridRegion r, int x, int y)
{
MapBlockData block = new MapBlockData();
if (r == null)
{
block.Access = (byte)SimAccess.NonExistent;
block.X = (ushort)x;
block.Y = (ushort)y;
block.MapImageID = UUID.Zero;
return block;
}
if ((r.Flags & (int)Aurora.Framework.RegionFlags.RegionOnline) == (int)Aurora.Framework.RegionFlags.RegionOnline)
block.Access = r.Access;
else
block.Access = (byte)OpenMetaverse.SimAccess.Down;
block.MapImageID = r.TerrainImage;
block.Name = r.RegionName;
block.X = (ushort)(r.RegionLocX / Constants.RegionSize);
block.Y = (ushort)(r.RegionLocY / Constants.RegionSize);
block.SizeX = (ushort)r.RegionSizeX;
block.SizeY = (ushort)r.RegionSizeY;
return block;
}
开发者ID:samiam123,项目名称:Aurora-Sim,代码行数:24,代码来源:WorldMap.cs
示例9: TriggerOnRegionUp
public void TriggerOnRegionUp(GridRegion otherRegion)
{
handlerOnRegionUp = OnRegionUp;
if (handlerOnRegionUp != null)
handlerOnRegionUp(otherRegion);
}
开发者ID:intari,项目名称:OpenSimMirror,代码行数:6,代码来源:EventManager.cs
示例10: MapBlockFromGridRegion
protected void MapBlockFromGridRegion(MapBlockData block, GridRegion r, uint flag)
{
block.Access = r.Access;
switch (flag & 0xffff)
{
case 0:
block.MapImageId = r.TerrainImage;
break;
case 2:
block.MapImageId = r.ParcelImage;
break;
default:
block.MapImageId = UUID.Zero;
break;
}
block.Name = r.RegionName;
block.X = (ushort)(r.RegionLocX / Constants.RegionSize);
block.Y = (ushort)(r.RegionLocY / Constants.RegionSize);
}
开发者ID:pluraldj,项目名称:opensim,代码行数:19,代码来源:WorldMapModule.cs
示例11: Lure
private void Lure(IClientAPI client, uint teleportflags, GridInstantMessage im)
{
Scene scene = (Scene)(client.Scene);
GridRegion region = scene.GridService.GetRegionByUUID(scene.RegionInfo.ScopeID, new UUID(im.RegionID));
if (region != null)
scene.RequestTeleportLocation(client, region.RegionHandle, im.Position + new Vector3(0.5f, 0.5f, 0f), Vector3.UnitX, teleportflags);
else // we don't have that region here. Check if it's HG
{
string[] parts = im.message.Split(new char[] { '@' });
if (parts.Length > 1)
{
string url = parts[parts.Length - 1]; // the last part
if (url.Trim(new char[] {'/'}) != m_ThisGridURL.Trim(new char[] {'/'}))
{
m_log.DebugFormat("[HG LURE MODULE]: Luring agent to grid {0} region {1} position {2}", url, im.RegionID, im.Position);
GatekeeperServiceConnector gConn = new GatekeeperServiceConnector();
GridRegion gatekeeper = new GridRegion();
gatekeeper.ServerURI = url;
string homeURI = scene.GetAgentHomeURI(client.AgentId);
string message;
GridRegion finalDestination = gConn.GetHyperlinkRegion(gatekeeper, new UUID(im.RegionID), client.AgentId, homeURI, out message);
if (finalDestination != null)
{
ScenePresence sp = scene.GetScenePresence(client.AgentId);
IEntityTransferModule transferMod = scene.RequestModuleInterface<IEntityTransferModule>();
if (transferMod != null && sp != null)
{
if (message != null)
sp.ControllingClient.SendAgentAlertMessage(message, true);
transferMod.DoTeleport(
sp, gatekeeper, finalDestination, im.Position + new Vector3(0.5f, 0.5f, 0f),
Vector3.UnitX, teleportflags);
}
}
else
{
m_log.InfoFormat("[HG LURE MODULE]: Lure failed: {0}", message);
client.SendAgentAlertMessage(message, true);
}
}
}
}
}
开发者ID:CassieEllen,项目名称:opensim,代码行数:46,代码来源:HGLureModule.cs
示例12: EventManager_OnMakeChildAgent
private void EventManager_OnMakeChildAgent(IScenePresence presence, GridRegion destination)
{
lock (scriptedcontrols)
{
scriptedcontrols.Clear(); //Remove all controls when we leave the region
}
}
开发者ID:nathanmarck,项目名称:Aurora-Sim,代码行数:7,代码来源:ScriptControllerModule.cs
示例13: OnRegionUp
public void OnRegionUp(GridRegion otherRegion)
{
ulong regionhandle = otherRegion.RegionHandle;
string httpserver = otherRegion.ServerURI + "MAP/MapItems/" + regionhandle.ToString();
m_blacklistedregions.Remove(regionhandle);
m_blacklistedurls.Remove(httpserver);
m_cachedRegionMapItemsAddress.Remove(regionhandle);
}
开发者ID:BogusCurry,项目名称:arribasim-dev,代码行数:11,代码来源:WorldMapModule.cs
示例14: OtherRegionUp
public override void OtherRegionUp(GridRegion otherRegion) { }
开发者ID:4U2NV,项目名称:opensim,代码行数:1,代码来源:MockScene.cs
示例15: TestRegisterRegion
public void TestRegisterRegion()
{
TestHelpers.InMethod();
// log4net.Config.XmlConfigurator.Configure();
// Create 4 regions
GridRegion r1 = new GridRegion();
r1.RegionName = "Test Region 1";
r1.RegionID = new UUID(1);
r1.RegionLocX = 1000 * (int)Constants.RegionSize;
r1.RegionLocY = 1000 * (int)Constants.RegionSize;
r1.ExternalHostName = "127.0.0.1";
r1.HttpPort = 9001;
r1.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0);
Scene s = new Scene(new RegionInfo());
s.RegionInfo.RegionID = r1.RegionID;
m_LocalConnector.AddRegion(s);
GridRegion r2 = new GridRegion();
r2.RegionName = "Test Region 2";
r2.RegionID = new UUID(2);
r2.RegionLocX = 1001 * (int)Constants.RegionSize;
r2.RegionLocY = 1000 * (int)Constants.RegionSize;
r2.ExternalHostName = "127.0.0.1";
r2.HttpPort = 9002;
r2.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0);
s = new Scene(new RegionInfo());
s.RegionInfo.RegionID = r2.RegionID;
m_LocalConnector.AddRegion(s);
GridRegion r3 = new GridRegion();
r3.RegionName = "Test Region 3";
r3.RegionID = new UUID(3);
r3.RegionLocX = 1005 * (int)Constants.RegionSize;
r3.RegionLocY = 1000 * (int)Constants.RegionSize;
r3.ExternalHostName = "127.0.0.1";
r3.HttpPort = 9003;
r3.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0);
s = new Scene(new RegionInfo());
s.RegionInfo.RegionID = r3.RegionID;
m_LocalConnector.AddRegion(s);
GridRegion r4 = new GridRegion();
r4.RegionName = "Other Region 4";
r4.RegionID = new UUID(4);
r4.RegionLocX = 1004 * (int)Constants.RegionSize;
r4.RegionLocY = 1002 * (int)Constants.RegionSize;
r4.ExternalHostName = "127.0.0.1";
r4.HttpPort = 9004;
r4.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0);
s = new Scene(new RegionInfo());
s.RegionInfo.RegionID = r4.RegionID;
m_LocalConnector.AddRegion(s);
m_LocalConnector.RegisterRegion(UUID.Zero, r1);
GridRegion result = m_LocalConnector.GetRegionByName(UUID.Zero, "Test");
Assert.IsNull(result, "Retrieved GetRegionByName \"Test\" is not null");
result = m_LocalConnector.GetRegionByName(UUID.Zero, "Test Region 1");
Assert.IsNotNull(result, "Retrieved GetRegionByName is null");
Assert.That(result.RegionName, Is.EqualTo("Test Region 1"), "Retrieved region's name does not match");
m_LocalConnector.RegisterRegion(UUID.Zero, r2);
m_LocalConnector.RegisterRegion(UUID.Zero, r3);
m_LocalConnector.RegisterRegion(UUID.Zero, r4);
result = m_LocalConnector.GetRegionByUUID(UUID.Zero, new UUID(1));
Assert.IsNotNull(result, "Retrieved GetRegionByUUID is null");
Assert.That(result.RegionID, Is.EqualTo(new UUID(1)), "Retrieved region's UUID does not match");
result = m_LocalConnector.GetRegionByPosition(UUID.Zero, (int)Util.RegionToWorldLoc(1000), (int)Util.RegionToWorldLoc(1000));
Assert.IsNotNull(result, "Retrieved GetRegionByPosition is null");
Assert.That(result.RegionLocX, Is.EqualTo(1000 * (int)Constants.RegionSize), "Retrieved region's position does not match");
List<GridRegion> results = m_LocalConnector.GetNeighbours(UUID.Zero, new UUID(1));
Assert.IsNotNull(results, "Retrieved neighbours list is null");
Assert.That(results.Count, Is.EqualTo(1), "Retrieved neighbour collection is greater than expected");
Assert.That(results[0].RegionID, Is.EqualTo(new UUID(2)), "Retrieved region's UUID does not match");
results = m_LocalConnector.GetRegionsByName(UUID.Zero, "Test", 10);
Assert.IsNotNull(results, "Retrieved GetRegionsByName collection is null");
Assert.That(results.Count, Is.EqualTo(3), "Retrieved neighbour collection is less than expected");
results = m_LocalConnector.GetRegionRange(UUID.Zero, 900 * (int)Constants.RegionSize, 1002 * (int)Constants.RegionSize,
900 * (int)Constants.RegionSize, 1100 * (int)Constants.RegionSize);
Assert.IsNotNull(results, "Retrieved GetRegionRange collection is null");
Assert.That(results.Count, Is.EqualTo(2), "Retrieved neighbour collection is not the number expected");
results = m_LocalConnector.GetDefaultRegions(UUID.Zero);
Assert.IsNotNull(results, "Retrieved GetDefaultRegions collection is null");
Assert.That(results.Count, Is.EqualTo(1), "Retrieved default regions collection has not the expected size");
Assert.That(results[0].RegionID, Is.EqualTo(new UUID(1)), "Retrieved default region's UUID does not match");
results = m_LocalConnector.GetFallbackRegions(UUID.Zero, r1.RegionLocX, r1.RegionLocY);
Assert.IsNotNull(results, "Retrieved GetFallbackRegions collection for region 1 is null");
Assert.That(results.Count, Is.EqualTo(3), "Retrieved fallback regions collection for region 1 has not the expected size");
Assert.That(results[0].RegionID, Is.EqualTo(new UUID(2)), "Retrieved fallback regions for default region are not in the expected order 2-4-3");
Assert.That(results[1].RegionID, Is.EqualTo(new UUID(4)), "Retrieved fallback regions for default region are not in the expected order 2-4-3");
Assert.That(results[2].RegionID, Is.EqualTo(new UUID(3)), "Retrieved fallback regions for default region are not in the expected order 2-4-3");
//.........这里部分代码省略.........
开发者ID:Gitlab11,项目名称:opensim,代码行数:101,代码来源:GridConnectorsTests.cs
示例16: OnMakeChildAgent
protected void OnMakeChildAgent(IScenePresence presence, GridRegion destination)
{
//Switch child agent to root agent
m_rootAgents--;
m_childAgents++;
}
开发者ID:nathanmarck,项目名称:Aurora-Sim,代码行数:6,代码来源:EntityCountModule.cs
示例17: OtherRegionUp
public override void OtherRegionUp(GridRegion otherRegion)
{
throw new NotImplementedException();
}
开发者ID:gumho,项目名称:diva-distribution,代码行数:4,代码来源:SceneBaseTests.cs
示例18: TestRegisterRegionV0_2
public void TestRegisterRegionV0_2()
{
SetUp();
// Create 3 regions
GridRegion r1 = new GridRegion();
r1.RegionName = "Test Region 1";
r1.RegionID = new UUID(1);
r1.RegionLocX = 1000 * (int)Constants.RegionSize;
r1.RegionLocY = 1000 * (int)Constants.RegionSize;
r1.ExternalHostName = "127.0.0.1";
r1.HttpPort = 9001;
r1.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0);
Scene s = new Scene(new RegionInfo());
s.RegionInfo.RegionID = r1.RegionID;
m_LocalConnector.AddRegion(s);
GridRegion r2 = new GridRegion();
r2.RegionName = "Test Region 2";
r2.RegionID = new UUID(2);
r2.RegionLocX = 1001 * (int)Constants.RegionSize;
r2.RegionLocY = 1000 * (int)Constants.RegionSize;
r2.ExternalHostName = "127.0.0.1";
r2.HttpPort = 9002;
r2.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0);
s = new Scene(new RegionInfo());
s.RegionInfo.RegionID = r1.RegionID;
m_LocalConnector.AddRegion(s);
GridRegion r3 = new GridRegion();
r3.RegionName = "Test Region 3";
r3.RegionID = new UUID(3);
r3.RegionLocX = 1005 * (int)Constants.RegionSize;
r3.RegionLocY = 1000 * (int)Constants.RegionSize;
r3.ExternalHostName = "127.0.0.1";
r3.HttpPort = 9003;
r3.InternalEndPoint = new System.Net.IPEndPoint(System.Net.IPAddress.Parse("0.0.0.0"), 0);
s = new Scene(new RegionInfo());
s.RegionInfo.RegionID = r1.RegionID;
m_LocalConnector.AddRegion(s);
m_LocalConnector.RegisterRegion(UUID.Zero, r1);
GridRegion result = m_LocalConnector.GetRegionByName(UUID.Zero, "Test");
Assert.IsNotNull(result, "Retrieved GetRegionByName is null");
Assert.That(result.RegionName, Is.EqualTo("Test Region 1"), "Retrieved region's name does not match");
result = m_LocalConnector.GetRegionByUUID(UUID.Zero, new UUID(1));
Assert.IsNotNull(result, "Retrieved GetRegionByUUID is null");
Assert.That(result.RegionID, Is.EqualTo(new UUID(1)), "Retrieved region's UUID does not match");
result = m_LocalConnector.GetRegionByPosition(UUID.Zero, 1000 * (int)Constants.RegionSize, 1000 * (int)Constants.RegionSize);
Assert.IsNotNull(result, "Retrieved GetRegionByPosition is null");
Assert.That(result.RegionLocX, Is.EqualTo(1000 * (int)Constants.RegionSize), "Retrieved region's position does not match");
m_LocalConnector.RegisterRegion(UUID.Zero, r2);
m_LocalConnector.RegisterRegion(UUID.Zero, r3);
List<GridRegion> results = m_LocalConnector.GetNeighbours(UUID.Zero, new UUID(1));
Assert.IsNotNull(results, "Retrieved neighbours list is null");
Assert.That(results.Count, Is.EqualTo(1), "Retrieved neighbour collection is greater than expected");
Assert.That(results[0].RegionID, Is.EqualTo(new UUID(2)), "Retrieved region's UUID does not match");
results = m_LocalConnector.GetRegionsByName(UUID.Zero, "Test", 10);
Assert.IsNotNull(results, "Retrieved GetRegionsByName list is null");
Assert.That(results.Count, Is.EqualTo(3), "Retrieved neighbour collection is less than expected");
results = m_LocalConnector.GetRegionRange(UUID.Zero, 900 * (int)Constants.RegionSize, 1002 * (int)Constants.RegionSize,
900 * (int)Constants.RegionSize, 1100 * (int)Constants.RegionSize);
Assert.IsNotNull(results, "Retrieved GetRegionRange list is null");
Assert.That(results.Count, Is.EqualTo(2), "Retrieved neighbour collection is not the number expected");
}
开发者ID:AlphaStaxLLC,项目名称:taiga,代码行数:72,代码来源:GridConnectorsTests.cs
示例19: Map2BlockFromGridRegion
protected List<MapBlockData> Map2BlockFromGridRegion (GridRegion r)
{
List<MapBlockData> blocks = new List<MapBlockData> ();
MapBlockData block = new MapBlockData ();
if (r == null)
{
block.Access = (byte)SimAccess.Down;
block.MapImageID = UUID.Zero;
blocks.Add (block);
return blocks;
}
block.Access = r.Access;
block.MapImageID = r.TerrainImage;
if ((r.Access & (byte)SimAccess.Down) == (byte)SimAccess.Down)
block.Name = r.RegionName + " (offline)";
else
block.Name = r.RegionName;
block.X = (ushort)(r.RegionLocX / Constants.RegionSize);
block.Y = (ushort)(r.RegionLocY / Constants.RegionSize);
block.SizeX = (ushort)r.RegionSizeX;
block.SizeY = (ushort)r.RegionSizeY;
blocks.Add(block);
if (r.RegionSizeX > Constants.RegionSize || r.RegionSizeY > Constants.RegionSize)
{
for (int x = 0; x < r.RegionSizeX / Constants.RegionSize; x++)
{
for (int y = 0; y < r.RegionSizeY / Constants.RegionSize; y++)
{
if (x == 0 && y == 0)
continue;
block = new MapBlockData
{
Access = r.Access,
MapImageID = r.TerrainImage,
Name = r.RegionName,
X = (ushort) ((r.RegionLocX/Constants.RegionSize) + x),
Y = (ushort) ((r.RegionLocY/Constants.RegionSize) + y),
SizeX = (ushort) r.RegionSizeX,
SizeY = (ushort) r.RegionSizeY
};
//Child piece, so ignore it
blocks.Add (block);
}
}
}
return blocks;
}
开发者ID:satlanski2,项目名称:Aurora-Sim,代码行数:47,代码来源:WorldMap.cs
示例20: EnableChildAgents
public static OSD EnableChildAgents(int DrawDistance, GridRegion[] neighbors,
AgentCircuitData circuit, uint TeleportFlags, AgentData data, byte[] IPAddress, int Port)
{
OSDMap llsdBody = new OSDMap();
llsdBody.Add("DrawDistance", DrawDistance);
OSDArray regionsArray = new OSDArray();
foreach (GridRegion r in neighbors)
{
regionsArray.Add(r.ToOSD());
}
llsdBody.Add("Regions", regionsArray);
if(IPAddress != null)
llsdBody.Add("IPAddress", IPAddress);
if(Port != 0) //0 is the eqivilent of null
llsdBody.Add("Port", Port);
llsdBody.Add("Circuit", circuit.PackAgentCircuitData());
llsdBody.Add("TeleportFlags", TeleportFlags);
if(data != null)
llsdBody.Add("AgentData", data.Pack());
return buildEvent("EnableChildAgents", llsdBody);
}
开发者ID:KristenMynx,项目名称:Aurora-Sim,代码行数:22,代码来源:EventQueueHelper.cs
注:本文中的OpenSim.Services.Interfaces.GridRegion类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论