• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# ILandObject类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ILandObject的典型用法代码示例。如果您正苦于以下问题:C# ILandObject类的具体用法?C# ILandObject怎么用?C# ILandObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ILandObject类属于命名空间,在下文中一共展示了ILandObject类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: BuyPoint

 public BuyPoint(UUID uuid, string name, Vector3 position, ILandObject parcel)
     : this(uuid)
 {
     Name = name;
     Location.LocalPosition = position;
     Location.Parcel = parcel;
 }
开发者ID:cmickeyb,项目名称:waterwars,代码行数:7,代码来源:BuyPoint.cs


示例2: CreateBuyPoint

        public BuyPoint CreateBuyPoint(UUID uuid, string name, Vector3 pos, ILandObject osParcel, RegionInfo regionInfo)
        {
            BuyPoint bp = new BuyPoint(uuid, name, pos, osParcel) { Game = m_controller.Game };
            bp.Location.RegionName = regionInfo.RegionName;
            bp.Location.RegionId = regionInfo.RegionID;
            bp.Location.RegionX = regionInfo.RegionLocX;
            bp.Location.RegionY = regionInfo.RegionLocY;

            return bp;
        }
开发者ID:justinccdev,项目名称:waterwars,代码行数:10,代码来源:ModelFactory.cs


示例3: SetUp

 public void SetUp()
 {
     m_pcm = new PrimCountModule();
     LandManagementModule lmm = new LandManagementModule();
     m_scene = SceneHelpers.SetupScene();            
     SceneHelpers.SetupSceneModules(m_scene, lmm, m_pcm);             
                 
     int xParcelDivider = (int)Constants.RegionSize - 1;
     
     ILandObject lo = new LandObject(m_userId, false, m_scene);
     lo.LandData.Name = "m_lo";
     lo.SetLandBitmap(
         lo.GetSquareLandBitmap(0, 0, xParcelDivider, (int)Constants.RegionSize));
     m_lo = lmm.AddLandObject(lo);          
     
     ILandObject lo2 = new LandObject(m_userId, false, m_scene);
     lo2.SetLandBitmap(
         lo2.GetSquareLandBitmap(xParcelDivider, 0, (int)Constants.RegionSize, (int)Constants.RegionSize));
     lo2.LandData.Name = "m_lo2";
     m_lo2 = lmm.AddLandObject(lo2);
 } 
开发者ID:NovaGrid,项目名称:opensim,代码行数:21,代码来源:PrimCountModuleTests.cs


示例4: GetParcelDistancefromPoint

 private float GetParcelDistancefromPoint(ILandObject parcel, float x, float y)
 {
     return Vector2.Distance(new Vector2(x, y), GetParcelCenter(parcel));
 }
开发者ID:shangcheng,项目名称:Aurora,代码行数:4,代码来源:LandChannel.cs


示例5: GetParcelCenterAtGround

 public Vector3 GetParcelCenterAtGround(ILandObject parcel)
 {
     Vector2 center = GetParcelCenter(parcel);
     return GetPositionAtGround(center.X, center.Y);
 }
开发者ID:shangcheng,项目名称:Aurora,代码行数:5,代码来源:LandChannel.cs


示例6: TriggerLandObjectUpdated

 public void TriggerLandObjectUpdated(uint localParcelID, ILandObject newParcel)
 {
     TriggerLandObjectAdded(newParcel);
 }
开发者ID:CCIR,项目名称:opensim,代码行数:4,代码来源:EventManager.cs


示例7: TestLandRestrictions

        private bool TestLandRestrictions(AgentCircuitData agent, ILandObject land,  out string reason)
        {
            bool banned = land.IsBannedFromLand(agent.AgentID);
            bool restricted = land.IsRestrictedFromLand(agent.AgentID);

            if (banned || restricted)
            {
                ILandObject nearestParcel = GetNearestAllowedParcel(agent.AgentID, agent.startpos.X, agent.startpos.Y);
                if (nearestParcel != null)
                {
                    //Move agent to nearest allowed
                    Vector3 newPosition = GetParcelCenterAtGround(nearestParcel);
                    agent.startpos.X = newPosition.X;
                    agent.startpos.Y = newPosition.Y;
                }
                else
                {
                    if (banned)
                    {
                        reason = "Cannot regioncross into banned parcel.";
                    }
                    else
                    {
                        reason = String.Format("Denied access to private region {0}: You are not on the access list for that region.",
                                   RegionInfo.RegionName);
                    }
                    return false;
                }
            }
            reason = "";
            return true;
        }
开发者ID:CCIR,项目名称:opensim,代码行数:32,代码来源:Scene.cs


示例8: CanDeedParcel

        private bool CanDeedParcel(UUID user, ILandObject parcel, Scene scene)
        {
            DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
            if (m_bypassPermissions) return m_bypassPermissionsValue;

            if (parcel.LandData.OwnerID != user) // Only the owner can deed!
                return false;

            ScenePresence sp = scene.GetScenePresence(user);
            IClientAPI client = sp.ControllingClient;

            if ((client.GetGroupPowers(parcel.LandData.GroupID) & (ulong)GroupPowers.LandDeed) == 0)
                return false;

            return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandDeed);
        }
开发者ID:JamesStallings,项目名称:opensimulator,代码行数:16,代码来源:PermissionsModule.cs


示例9: CanAbandonParcel

 private bool CanAbandonParcel(UUID user, ILandObject parcel, Scene scene)
 {
     DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
     if (m_bypassPermissions) return m_bypassPermissionsValue;
 
     return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandRelease);
 }
开发者ID:JamesStallings,项目名称:opensimulator,代码行数:7,代码来源:PermissionsModule.cs


示例10: CheckRezPerms

        // If objectID is specified (not UUID.Zero), then that object (owned by "owner") is trying to rez another object.
        // pass 0 for landImpact if you do not want this method to do any Land Impact limit checks.
        private bool CheckRezPerms(ILandObject parcel, UUID owner, UUID objectID, Vector3 objectPosition, bool isTemp, Scene scene)
        {
            DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);

            if (m_bypassPermissions) return m_bypassPermissionsValue;

            // User or object owner is an admin?
            if (IsGodUser(owner))
                return true;    // we're done here, no need to check more

            // This code block handles the Scenic option of EO (and partner) only.
            if (scene.RegionInfo.AllowRezzers == ProductRulesWho.OnlyEO)
            {
                // only the estate OWNER or PARTNER can rez in scenic regions unless it's a temprez object
                if (scene.IsEstateOwner(owner))
                    return true;
                if (scene.RegionInfo.AllowPartnerRez)
                    if (scene.IsEstateOwnerPartner(owner))
                        return true;
                if (!isTemp)    // non-temp rezzing not allowed
                    return false;
            }

            // At this point, we need to test a specific parcel.
            if (parcel == null) return false;

            // Is this a Plus region?
            if (scene.RegionInfo.Product == ProductRulesUse.PlusUse)
            {
                // If this is an unclaimed Plus parcel (or community land)
                if (scene.IsEstateOwner(parcel.landData.OwnerID))
                    return scene.IsEstateManager(owner);    // only EM can rez
                // Else only the Plus user (and possibly partner) can rez in a Plus parcel.
                if (owner == parcel.landData.OwnerID)
                    return true;
                // Otherwise, only the Plus user's partner can rez in a Plus parcel.
                if (scene.RegionInfo.AllowPartnerRez)
                {
                    UserProfileData parcelOwner = m_scene.CommsManager.UserService.GetUserProfile(parcel.landData.OwnerID);
                    if (parcelOwner != null)
                        if (parcelOwner.Partner != UUID.Zero)
                            if (parcelOwner.Partner == owner)
                                return true;
                }
                return false;
            }

            // Create enabled for everyone?
            if ((parcel.landData.Flags & ((int)ParcelFlags.CreateObjects)) == (uint)ParcelFlags.CreateObjects)
                return true;    // we're done here, no need to check more

            ulong roleNeeded = (ulong)GroupPowers.AllowRez;
            if ((parcel.landData.Flags & (uint)ParcelFlags.CreateGroupObjects) == (uint)ParcelFlags.CreateGroupObjects)
                roleNeeded = (ulong)GroupPowers.None; // if group rezzing is enabled, we just need to be a member, no specific role ability

            // Is an object rezzing the other object?
            if (objectID != UUID.Zero)
            {   // A scripted object is doing the rezzing...
                SceneObjectGroup group = this.FindObjectGroup(objectID);
                if (group == null) return false;

                // Now continue the rezzing permissions checks
                if (group.OwnerID == parcel.landData.OwnerID)
                    return true;
                // Owner doesn't match the land parcel, check partner perms.
                if (scene.RegionInfo.AllowPartnerRez)
                {   // this one is will not be called based on current products (Scenic, Plus) but completes the rule set for objects.
                    UserProfileData parcelOwner = m_scene.CommsManager.UserService.GetUserProfile(parcel.landData.OwnerID);
                    if (parcelOwner != null)
                        if (parcelOwner.Partner != UUID.Zero)
                            if (parcelOwner.Partner == group.OwnerID)
                                return true;
                }

                // Owner doesn't match the land parcel, check group perms.
                UUID activeGroupId = group.GroupID;
                // Handle the special case of active group for a worn attachment
                if (group.RootPart.IsAttachment)
                {
                    ScenePresence sp = m_scene.GetScenePresence(group.RootPart.AttachedAvatar);
                    if (sp == null)
                        return false;
                    IClientAPI client = sp.ControllingClient;
                    activeGroupId = client.ActiveGroupId;
                }

                // See if the agent or object doing the rezzing has permission itself.
                if ((parcel.landData.Flags & (uint)ParcelFlags.CreateGroupObjects) == (uint)ParcelFlags.CreateGroupObjects)
                {
                    if (activeGroupId == parcel.landData.GroupID)
                        return true;
                }

                // Create role enabled for this group member on group land?
                if (GenericParcelPermission(group.OwnerID, parcel, roleNeeded))
                    return true;    // we're done here, no need to check more

                return false;
//.........这里部分代码省略.........
开发者ID:M-O-S-E-S,项目名称:halcyon,代码行数:101,代码来源:PermissionsModule.cs


示例11: CanPushObject

        private bool CanPushObject(UUID userID, ILandObject parcel)
        {
            //This is used to check who is pusing objects in the parcel
            //When this is called, the AllowPushObject flag has already been checked

            return GenericParcelPermission(userID, parcel, (ulong) GroupPowers.ObjectManipulate);
        }
开发者ID:samiam123,项目名称:Aurora-Sim,代码行数:7,代码来源:PermissionsModule.cs


示例12: CanSellParcel

        private bool CanSellParcel(UUID user, ILandObject parcel, IScene scene)
        {
            DebugPermissionInformation(MethodBase.GetCurrentMethod().Name);
            if (m_bypassPermissions) return m_bypassPermissionsValue;

            return GenericParcelPermission(user, parcel, (ulong) GroupPowers.LandSetSale);
        }
开发者ID:samiam123,项目名称:Aurora-Sim,代码行数:7,代码来源:PermissionsModule.cs


示例13: CanReturnObjects

        private bool CanReturnObjects(ILandObject land, UUID user, List<ISceneEntity> objects, IScene scene)
        {
            DebugPermissionInformation(MethodBase.GetCurrentMethod().Name);
            if (m_bypassPermissions) return m_bypassPermissionsValue;

            ILandObject l;

            IScenePresence sp = scene.GetScenePresence(user);
            if (sp == null)
                return false;

            IClientAPI client = sp.ControllingClient;

            //Make a copy so that it doesn't get modified outside of this loop
#if (!ISWIN)
            foreach (ISceneEntity g in new List<ISceneEntity>(objects))
            {
                if (!GenericObjectPermission(user, g.UUID, false))
                {
                    // This is a short cut for efficiency. If land is non-null,
                    // then all objects are on that parcel and we can save
                    // ourselves the checking for each prim. Much faster.
                    //
                    if (land != null)
                    {
                        l = land;
                    }
                    else
                    {
                        Vector3 pos = g.AbsolutePosition;
                        if (m_parcelManagement == null)
                            continue;

                        l = m_parcelManagement.GetLandObject(pos.X, pos.Y);
                    }

                    // If it's not over any land, then we can't do a thing
                    if (l == null)
                    {
                        objects.Remove(g);
                        continue;
                    }

                    // If we own the land outright, then allow
                    //
                    if (l.LandData.OwnerID == user)
                        continue;

                    // Group voodoo
                    //
                    if (l.LandData.IsGroupOwned)
                    {
                        // Not a group member, or no rights at all
                        //
                        if (!m_groupsModule.GroupPermissionCheck(client.AgentId, g.GroupID, GroupPowers.None))
                        {
                            objects.Remove(g);
                            continue;
                        }

                        // Group deeded object?
                        //
                        if (g.OwnerID == l.LandData.GroupID && !m_groupsModule.GroupPermissionCheck(client.AgentId, g.GroupID, GroupPowers.ReturnGroupOwned))
                        {
                            objects.Remove(g);
                            continue;
                        }

                        // Group set object?
                        //
                        if (g.GroupID == l.LandData.GroupID && !m_groupsModule.GroupPermissionCheck(client.AgentId, g.GroupID, GroupPowers.ReturnGroupSet))
                        {
                            objects.Remove(g);
                            continue;
                        }

                        if (!m_groupsModule.GroupPermissionCheck(client.AgentId, g.GroupID, GroupPowers.ReturnNonGroup))
                        {
                            objects.Remove(g);
                            continue;
                        }

                        // So we can remove all objects from this group land.
                        // Fine.
                        //
                        continue;
                    }

                    // By default, we can't remove
                    //
                    objects.Remove(g);
                }
            }
#else
            foreach (ISceneEntity g in new List<ISceneEntity>(objects).Where(g => !GenericObjectPermission(user, g.UUID, false)))
            {
                // This is a short cut for efficiency. If land is non-null,
                // then all objects are on that parcel and we can save
                // ourselves the checking for each prim. Much faster.
                //
//.........这里部分代码省略.........
开发者ID:samiam123,项目名称:Aurora-Sim,代码行数:101,代码来源:PermissionsModule.cs


示例14: CanDeedParcel

        private bool CanDeedParcel(UUID user, ILandObject parcel, IScene scene)
        {
            DebugPermissionInformation(MethodBase.GetCurrentMethod().Name);
            if (m_bypassPermissions) return m_bypassPermissionsValue;

            if (parcel.LandData.OwnerID != user) // Only the owner can deed!
                return false;

            return GenericParcelPermission(user, parcel, (ulong) GroupPowers.LandDeed);
        }
开发者ID:samiam123,项目名称:Aurora-Sim,代码行数:10,代码来源:PermissionsModule.cs


示例15: GenericParcelPermission

        protected bool GenericParcelPermission(UUID user, ILandObject parcel, ulong groupPowers)
        {
            if (parcel.LandData.OwnerID == user)
                return true;

            if ((parcel.LandData.GroupID != UUID.Zero) && IsGroupMember(parcel.LandData.GroupID, user, groupPowers))
                return true;

            if (GenericEstatePermission(user))
                return true;

            return false;
        }
开发者ID:samiam123,项目名称:Aurora-Sim,代码行数:13,代码来源:PermissionsModule.cs


示例16: GenericParcelPermission

        protected bool GenericParcelPermission(UUID user, ILandObject parcel, ulong groupPowers)
        {
            bool permission = false;

            if (parcel.LandData.OwnerID == user)
            {
                permission = true;
            }

            if ((parcel.LandData.GroupID != UUID.Zero) && IsGroupMember(parcel.LandData.GroupID, user, groupPowers))
            {
                permission = true;
            }

            if (IsEstateManager(user))
            {
                permission = true;
            }

            if (IsAdministrator(user))
            {
                permission = true;
            }

            if (m_SimpleBuildPermissions &&
                (parcel.LandData.Flags & (uint)ParcelFlags.UseAccessList) == 0 && parcel.IsInLandAccessList(user))
                permission = true;

            return permission;
        }
开发者ID:JamesStallings,项目名称:opensimulator,代码行数:30,代码来源:PermissionsModule.cs


示例17: GenericParcelOwnerPermission

        protected bool GenericParcelOwnerPermission(UUID user, ILandObject parcel, ulong groupPowers)
        {
            if (parcel.LandData.OwnerID == user)
            {
                // Returning immediately so that group deeded objects on group deeded land don't trigger a NRE on
                // the subsequent redundant checks when using lParcelMediaCommandList()
                // See http://opensimulator.org/mantis/view.php?id=3999 for more details
                return true;
            }

            if (parcel.LandData.IsGroupOwned && IsGroupMember(parcel.LandData.GroupID, user, groupPowers))
            {
                return true;
            }
    
            if (IsEstateManager(user))
            {
                return true;
            }

            if (IsAdministrator(user))
            {
                return true;
            }

            return false;
        }
开发者ID:JamesStallings,项目名称:opensimulator,代码行数:27,代码来源:PermissionsModule.cs


示例18: CanUseObjectReturn

        private bool CanUseObjectReturn(ILandObject parcel, uint type, IClientAPI client, List<SceneObjectGroup> retlist, Scene scene)
        {
            DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
            if (m_bypassPermissions) return m_bypassPermissionsValue;

            ulong powers = 0;
            if (parcel.landData.GroupID != UUID.Zero)
                powers = client.GetGroupPowers(parcel.landData.GroupID);

            switch (type)
            {
            case (uint)ObjectReturnType.Owner:
                // Don't let group members return owner's objects, ever
                //
                if (parcel.landData.IsGroupOwned)
                {
                    if ((powers & (ulong)GroupPowers.ReturnGroupOwned) != 0)
                        return true;
                }
                else
                {
                    if (parcel.landData.OwnerID != client.AgentId)
                        return false;
                }
        return GenericParcelOwnerPermission(client.AgentId, parcel, (ulong)GroupPowers.ReturnGroupOwned);
            case (uint)ObjectReturnType.Group:
                if (parcel.landData.OwnerID != client.AgentId)
                {
                    // If permissionis granted through a group...
                    //
                    if ((powers & (long)GroupPowers.ReturnGroupSet) != 0)
                    {
                        foreach (SceneObjectGroup g in new List<SceneObjectGroup>(retlist))
                        {
                            // check for and remove group owned objects unless
                            // the user also has permissions to return those
                            //
                            if (g.OwnerID == g.GroupID &&
                                    ((powers & (long)GroupPowers.ReturnGroupOwned) == 0))
                            {
                                retlist.Remove(g);
                            }
                        }
                        // And allow the operation
                        //
                        return true;
                    }
                }
                return GenericParcelOwnerPermission(client.AgentId, parcel, (ulong)GroupPowers.ReturnNonGroup);
            case (uint)ObjectReturnType.Other:
                if ((powers & (long)GroupPowers.ReturnNonGroup) != 0)
                    return true;
                return GenericParcelOwnerPermission(client.AgentId, parcel, (ulong)GroupPowers.ReturnNonGroup);
            case (uint)ObjectReturnType.List:
                    foreach (SceneObjectGroup g in new List<SceneObjectGroup>(retlist))
                    {
                        if (!CanReturnObject(g.UUID, client.AgentId, scene))
                        {
                            retlist.Remove(g);
                        }
                    }
                    // And allow the operation
                    //
                    return true;
            }

            return GenericParcelPermission(client.AgentId, parcel, 0);
        }
开发者ID:M-O-S-E-S,项目名称:halcyon,代码行数:68,代码来源:PermissionsModule.cs


示例19: CanReclaimParcel

        private bool CanReclaimParcel(UUID user, ILandObject parcel, Scene scene)
        {
            DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
            if (m_bypassPermissions) return m_bypassPermissionsValue;

            return GenericParcelOwnerPermission(user, parcel, 0);
        }
开发者ID:JamesStallings,项目名称:opensimulator,代码行数:7,代码来源:PermissionsModule.cs


示例20: GenericParcelPermission

        protected bool GenericParcelPermission(UUID user, ILandObject parcel, ulong groupPowers)
        {
            if (parcel.landData.OwnerID == user)
                return true;

            if ((parcel.landData.GroupID != UUID.Zero) && IsAgentInGroupRole(parcel.landData.GroupID, user, groupPowers))
                return true;

            if (m_scene.IsEstateManager(user))
                return true;

            if (IsGodUser(user))
                return true;

            return false;
        }
开发者ID:M-O-S-E-S,项目名称:halcyon,代码行数:16,代码来源:PermissionsModule.cs



注:本文中的ILandObject类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ILanguage类代码示例发布时间:2022-05-24
下一篇:
C# ILabel类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap