本文整理汇总了C#中IClientAPI.IsGroupMember方法的典型用法代码示例。如果您正苦于以下问题:C# IClientAPI.IsGroupMember方法的具体用法?C# IClientAPI.IsGroupMember怎么用?C# IClientAPI.IsGroupMember使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IClientAPI
的用法示例。
在下文中一共展示了IClientAPI.IsGroupMember方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SendParcelOverlay
/// <summary>
/// Send the parcel overlay blocks to the client. We send the overlay packets
/// around a location and limited by the 'parcelLayerViewDistance'. This number
/// is usually 128 and the code is arranged so it sends all the parcel overlay
/// information for a whole region if the region is legacy sized (256x256). If
/// the region is larger, only the parcel layer information is sent around
/// the point specified. This reduces the problem of parcel layer information
/// blocks increasing exponentially as region size increases.
/// </summary>
/// <param name="remote_client">The object representing the client</param>
/// <param name="xPlace">X position in the region to send surrounding parcel layer info</param>
/// <param name="yPlace">y position in the region to send surrounding parcel layer info</param>
/// <param name="layerViewDistance">Distance from x,y position to send parcel layer info</param>
public void SendParcelOverlay(IClientAPI remote_client)
{
if (remote_client.SceneAgent.PresenceType == PresenceType.Npc)
return;
const int LAND_BLOCKS_PER_PACKET = 1024;
byte[] byteArray = new byte[LAND_BLOCKS_PER_PACKET];
int byteArrayCount = 0;
int sequenceID = 0;
// Layer data is in LandUnit (4m) chunks
for (int y = 0; y < m_scene.RegionInfo.RegionSizeY; y += LandUnit)
{
for (int x = 0; x < m_scene.RegionInfo.RegionSizeX; x += LandUnit)
{
byte tempByte = 0; //This represents the byte for the current 4x4
ILandObject currentParcelBlock = GetLandObject(x, y);
if (currentParcelBlock != null)
{
// types
if (currentParcelBlock.LandData.OwnerID == remote_client.AgentId)
{
//Owner Flag
tempByte = (byte)LandChannel.LAND_TYPE_OWNED_BY_REQUESTER;
}
else if (currentParcelBlock.LandData.IsGroupOwned && remote_client.IsGroupMember(currentParcelBlock.LandData.GroupID))
{
tempByte = (byte)LandChannel.LAND_TYPE_OWNED_BY_GROUP;
}
else if (currentParcelBlock.LandData.SalePrice > 0 &&
(currentParcelBlock.LandData.AuthBuyerID == UUID.Zero ||
currentParcelBlock.LandData.AuthBuyerID == remote_client.AgentId))
{
//Sale type
tempByte = (byte)LandChannel.LAND_TYPE_IS_FOR_SALE;
}
else if (currentParcelBlock.LandData.OwnerID == UUID.Zero)
{
//Public type
tempByte = (byte)LandChannel.LAND_TYPE_PUBLIC; // this does nothing, its zero
}
// LAND_TYPE_IS_BEING_AUCTIONED still unsuported
else
{
//Other Flag
tempByte = (byte)LandChannel.LAND_TYPE_OWNED_BY_OTHER;
}
// now flags
// border control
ILandObject westParcel = null;
ILandObject southParcel = null;
if (x > 0)
{
westParcel = GetLandObject((x - 1), y);
}
if (y > 0)
{
southParcel = GetLandObject(x, (y - 1));
}
if (x == 0)
{
tempByte |= (byte)LandChannel.LAND_FLAG_PROPERTY_BORDER_WEST;
}
else if (westParcel != null && westParcel != currentParcelBlock)
{
tempByte |= (byte)LandChannel.LAND_FLAG_PROPERTY_BORDER_WEST;
}
if (y == 0)
{
tempByte |= (byte)LandChannel.LAND_FLAG_PROPERTY_BORDER_SOUTH;
}
else if (southParcel != null && southParcel != currentParcelBlock)
{
tempByte |= (byte)LandChannel.LAND_FLAG_PROPERTY_BORDER_SOUTH;
}
// local sound
if ((currentParcelBlock.LandData.Flags & (uint)ParcelFlags.SoundLocal) != 0)
tempByte |= (byte)LandChannel.LAND_FLAG_LOCALSOUND;
//.........这里部分代码省略.........
示例2: HandleObjectGroupUpdate
protected internal void HandleObjectGroupUpdate(
IClientAPI remoteClient, UUID GroupID, uint objectLocalID, UUID Garbage)
{
if (!remoteClient.IsGroupMember(GroupID))
return;
SceneObjectGroup group = GetGroupByPrim(objectLocalID);
if (group != null)
{
if (group.OwnerID == remoteClient.AgentId)
group.SetGroup(GroupID, remoteClient);
}
}
示例3: IsAgentInGroup
public bool IsAgentInGroup(IClientAPI remoteClient, UUID groupID)
{
// Use the known in-memory group membership data if available before going to db.
if (remoteClient != null)
remoteClient.IsGroupMember(groupID);
return m_groupData.IsAgentInGroup(groupID, remoteClient.AgentId);
}
示例4: HandleObjectGroupUpdate
protected internal void HandleObjectGroupUpdate(
IClientAPI remoteClient, UUID GroupID, uint objectLocalID, UUID Garbage)
{
if (!remoteClient.IsGroupMember(GroupID))
return; // No settings to groups you arn't in
SceneObjectGroup group = GetGroupByPrim(objectLocalID);
if (group != null)
{
if(m_parentScene.Permissions.CanEditObject(group.UUID, remoteClient.AgentId))
if (group.OwnerID == remoteClient.AgentId)
group.SetGroup(GroupID, remoteClient);
}
}