本文整理匯總了C#中OpenSim.Region.Framework.Scenes.SceneObjectGroup.ApplyNextOwnerPermissions方法的典型用法代碼示例。如果您正苦於以下問題:C# SceneObjectGroup.ApplyNextOwnerPermissions方法的具體用法?C# SceneObjectGroup.ApplyNextOwnerPermissions怎麽用?C# SceneObjectGroup.ApplyNextOwnerPermissions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類OpenSim.Region.Framework.Scenes.SceneObjectGroup
的用法示例。
在下文中一共展示了SceneObjectGroup.ApplyNextOwnerPermissions方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: RezSingleObjectToWorld
private SceneObjectGroup RezSingleObjectToWorld(IClientAPI remoteClient, UUID itemID,
SceneObjectGroup group, Vector3 RayEnd, Vector3 RayStart,
UUID RayTargetID, byte BypassRayCast, byte bRayEndIsIntersection,
bool RezSelected, bool attachment, Vector3 pos, string name,
string description, IInventoryItem item, ItemPermissionBlock itemPermissions,
int? startParam, UUID? newAvatarGroupId, UUID? rezzedByObjectUUID)
{
bool ownerChanged = false; // record this for the CHANGED_OWNER changed event
if (IsBadUserLoad(group))
{
if (remoteClient != null)
remoteClient.SendAgentAlertMessage("You are currently not allowed to rez objects in this region.", false);
return null; // already reported above
}
if (IsBlacklistedLoad(group))
{
if (remoteClient != null)
remoteClient.SendAgentAlertMessage("Cannot rez blacklisted object '" + group.Name + "'.", false);
return null; // already reported above
}
//set the group here so that positioning in world will enable/disable the
//script correctly based on the group the use is currently in
// Initialize the server weight (LI)
group.RecalcPrimWeights();
group.RezzedFromFolderId = item.Folder;
//group.FromAssetId = item.AssetID; //not needed yet
if (newAvatarGroupId.HasValue)
{
//set the object's land group
group.SetGroup(newAvatarGroupId.Value, null);
}
if (attachment)
{
group.SetFromItemID(itemID);
}
else
{
group.RootPart.SetGroupPositionDirect(pos);
if (RezSelected)
{
//also tell the client there is a new object being rezzed
foreach (SceneObjectPart part in group.GetParts())
{
part.AddFlag(PrimFlags.CreateSelected);
}
}
}
SceneObjectPart rootPart = group.GetChildPart(group.UUID);
if (rootPart == null) {
string what = "object ";
if (attachment)
what = " attachment ";
m_log.Error("[AGENT INVENTORY]: Error rezzing ItemID: " + itemID + what + " root part not found.");
return null;
}
// Since renaming the item in the inventory does not affect the name stored
// in the serialization, transfer the correct name from the inventory to the
// object itself before we rez.
rootPart.Name = name;
rootPart.Description = description;
var partList = group.GetParts();
foreach (SceneObjectPart part in partList)
{
/// This fixes inconsistencies between this part and the root part.
/// In the past, there was a bug in Link operations that did not force
/// these permissions on child prims when linking.
part.SyncChildPermsWithRoot();
}
if (rootPart.OwnerID != item.Owner)
{
if (Permissions.PropagatePermissions())
{
if ((itemPermissions.CurrentPermissions & ScenePermBits.SLAM) != 0)
{ // enforce slam bit, apply item perms to the group parts
foreach (SceneObjectPart part in partList)
{
part.EveryoneMask = item.EveryOnePermissions;
part.NextOwnerMask = item.NextPermissions;
part.GroupMask = 0; // DO NOT propagate here
}
}
group.ApplyNextOwnerPermissions();
}
}
ownerChanged |= group.Rationalize(item.Owner, false);
foreach (SceneObjectPart part in partList)
//.........這裏部分代碼省略.........