本文整理汇总了C#中IClientAPI.SendObjectPropertiesReply方法的典型用法代码示例。如果您正苦于以下问题:C# IClientAPI.SendObjectPropertiesReply方法的具体用法?C# IClientAPI.SendObjectPropertiesReply怎么用?C# IClientAPI.SendObjectPropertiesReply使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IClientAPI
的用法示例。
在下文中一共展示了IClientAPI.SendObjectPropertiesReply方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetProperties
public void GetProperties(IClientAPI client)
{
client.SendObjectPropertiesReply(
m_fromUserInventoryItemID, (ulong)_creationDate, _creatorID, UUID.Zero, UUID.Zero,
_groupID, (short)InventorySerial, _lastOwnerID, UUID, _ownerID,
ParentGroup.RootPart.TouchName, new byte[0], ParentGroup.RootPart.SitName, Name, Description,
ParentGroup.RootPart._ownerMask, ParentGroup.RootPart._nextOwnerMask, ParentGroup.RootPart._groupMask, ParentGroup.RootPart._everyoneMask,
ParentGroup.RootPart._baseMask,
ParentGroup.RootPart.ObjectSaleType,
ParentGroup.RootPart.SalePrice);
}
示例2: SendPropertiesToClient
/// <summary>
/// Send this part's properties (name, description, inventory serial, base mask, etc.) to a client
/// </summary>
/// <param name="client"></param>
public void SendPropertiesToClient(IClientAPI client)
{
client.SendObjectPropertiesReply(this);
}
示例3: GetProperties
public void GetProperties(IClientAPI client)
{
client.SendObjectPropertiesReply(new List<ISceneEntity>(new ISceneEntity []{ this }));
}
示例4: GetProperties
public void GetProperties(IClientAPI client)
{
ulong micros = 1000000UL * (uint)_creationDate;
// uint perms = ParentGroup.GetEffectivePermissions(false); // folded ownermask of all prims
// Permissions of an object match those of the root prim.
// It's up to the Link operation to change child prims to match, and transfers to update all prims from Next.
uint perms = ParentGroup.GetEffectivePermissions(false);
uint nextperms = perms & ParentGroup.RootPart.NextOwnerMask;
client.SendObjectPropertiesReply(
m_fromUserInventoryItemID, micros, _creatorID, UUID.Zero, UUID.Zero,
_groupID, (short)InventorySerial, _lastOwnerID, UUID, _ownerID,
ParentGroup.RootPart.TouchName, new byte[0], ParentGroup.RootPart.SitName, Name, Description,
perms & ParentGroup.RootPart._ownerMask,
nextperms & ParentGroup.RootPart._nextOwnerMask,
perms & ParentGroup.RootPart._groupMask,
perms & ParentGroup.RootPart._everyoneMask,
perms & ParentGroup.RootPart._baseMask,
ParentGroup.GetEffectivePermissions(true), // folded owner perms
ParentGroup.GetEffectiveNextPermissions(true), // folded next owner perms
ParentGroup.RootPart.ObjectSaleType,
ParentGroup.RootPart.SalePrice);
}
示例5: SelectPrim
/// <summary>
/// Invoked when the client selects a prim.
/// </summary>
/// <param name="primLocalID"></param>
/// <param name="remoteClient"></param>
protected void SelectPrim(List<uint> primLocalIDs, IClientAPI remoteClient)
{
Scene scene = ((Scene)remoteClient.Scene);
List<IEntity> EntitiesToUpdate = new List<IEntity> ();
SceneObjectPart prim = null;
foreach (uint primLocalID in primLocalIDs)
{
ISceneChildEntity entity = null;
if (scene.SceneGraph.TryGetPart(primLocalID, out entity))
{
if (entity is SceneObjectPart)
{
prim = entity as SceneObjectPart;
// changed so that we send select to all the indicated prims
// also to root prim (done in prim.IsSelected)
// so "edit link parts" keep the object select and not moved by physics
// similar changes on deselect
// part.IsSelect is on SceneObjectPart.cs
// Ubit
// if (prim.IsRoot)
{
// prim.ParentGroup.IsSelected = true;
prim.IsSelected = true;
scene.AuroraEventManager.FireGenericEventHandler("ObjectSelected", prim);
}
}
}
//Check for avies! They arn't prims!
if (scene.GetScenePresence(primLocalID) != null)
{
continue;
}
if (entity != null)
EntitiesToUpdate.Add(entity);
else
{
m_log.Error("[SCENEPACKETHANDLER]: Could not find prim in SelectPrim, killing prim.");
//Send a kill packet to the viewer so it doesn't come up again
remoteClient.SendKillObject(scene.RegionInfo.RegionHandle, new uint[1] { primLocalID });
}
}
if (EntitiesToUpdate.Count != 0)
remoteClient.SendObjectPropertiesReply(EntitiesToUpdate);
IScenePresence SP;
scene.TryGetScenePresence(remoteClient.AgentId, out SP);
PerClientSelectionParticles selection = SP.RequestModuleInterface<PerClientSelectionParticles>();
if (selection != null)
{
selection.SelectedUUID = prim;
selection.IsSelecting = true;
}
}
示例6: GetProperties
public void GetProperties(IClientAPI client)
{
client.SendObjectPropertiesReply(this);
}
示例7: SelectPrim
/// <summary>
/// Invoked when the client selects a prim.
/// </summary>
/// <param name="primLocalID"></param>
/// <param name="remoteClient"></param>
public void SelectPrim(List<uint> primLocalIDs, IClientAPI remoteClient)
{
List<ISceneEntity> EntitiesToUpdate = new List<ISceneEntity>();
SceneObjectPart prim = null;
foreach (uint primLocalID in primLocalIDs)
{
ISceneEntity entity = null;
if (Entities.TryGetChildPrim(primLocalID, out entity))
{
if (entity is SceneObjectPart)
{
prim = entity as SceneObjectPart;
if (prim.IsRoot)
{
prim.ParentGroup.IsSelected = true;
if (Permissions.CanEditObject(prim.ParentGroup.UUID, remoteClient.AgentId)
|| Permissions.CanMoveObject(prim.ParentGroup.UUID, remoteClient.AgentId))
{
EventManager.TriggerParcelPrimCountTainted();
}
}
}
}
if (entity != null)
EntitiesToUpdate.Add(entity);
/*foreach (EntityBase ent in EntityList)
{
if (ent is SceneObjectGroup)
{
if (((SceneObjectGroup)ent).LocalId == primLocalID)
{
((SceneObjectGroup)ent).GetProperties(remoteClient);
((SceneObjectGroup)ent).IsSelected = true;
// A prim is only tainted if it's allowed to be edited by the person clicking it.
if (Permissions.CanEditObject(((SceneObjectGroup)ent).UUID, remoteClient.AgentId)
|| Permissions.CanMoveObject(((SceneObjectGroup)ent).UUID, remoteClient.AgentId))
{
EventManager.TriggerParcelPrimCountTainted();
}
prim = ((SceneObjectGroup)ent).RootPart;
break;
}
else
{
// We also need to check the children of this prim as they
// can be selected as well and send property information
bool foundPrim = false;
foreach (SceneObjectPart child in ((SceneObjectGroup)ent).ChildrenList)
{
if (child.LocalId == primLocalID)
{
child.GetProperties(remoteClient);
foundPrim = true;
prim = child;
break;
}
}
if (foundPrim) break;
}
}
}*/
}
if (EntitiesToUpdate.Count != 0)
remoteClient.SendObjectPropertiesReply(EntitiesToUpdate);
ScenePresence SP;
TryGetScenePresence(remoteClient.AgentId, out SP);
SP.SelectedUUID = prim;
SP.IsSelecting = true;
}