当前位置: 首页>>代码示例>>C#>>正文


C# ILandObject.GetSimulatorMaxPrimCount方法代码示例

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


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

示例1: AppendParcelReport

        private void AppendParcelReport(StringBuilder report, ILandObject lo)
        {
            LandData ld = lo.LandData;

            ConsoleDisplayList cdl = new ConsoleDisplayList();
            cdl.AddRow("Parcel name", ld.Name);
            cdl.AddRow("Local ID", ld.LocalID);
            cdl.AddRow("Description", ld.Description);
            cdl.AddRow("Snapshot ID", ld.SnapshotID);
            cdl.AddRow("Area", ld.Area);
            cdl.AddRow("AABB Min", ld.AABBMin);
            cdl.AddRow("AABB Max", ld.AABBMax);
            string ownerName;
            if (ld.IsGroupOwned)
            {
                GroupRecord rec = m_groupManager.GetGroupRecord(ld.GroupID);
                ownerName = (rec != null) ? rec.GroupName : "Unknown Group";
            }
            else
            {
                ownerName = m_userManager.GetUserName(ld.OwnerID);
            }
            cdl.AddRow("Owner", ownerName);
            cdl.AddRow("Is group owned?", ld.IsGroupOwned);
            cdl.AddRow("GroupID", ld.GroupID);

            cdl.AddRow("Status", ld.Status);
            cdl.AddRow("Flags", (ParcelFlags)ld.Flags);           

            cdl.AddRow("Landing Type", (LandingType)ld.LandingType);
            cdl.AddRow("User Location", ld.UserLocation);
            cdl.AddRow("User look at", ld.UserLookAt);

            cdl.AddRow("Other clean time", ld.OtherCleanTime);

            cdl.AddRow("Max Prims", lo.GetParcelMaxPrimCount());
            cdl.AddRow("Simwide Max Prims (owner)", lo.GetSimulatorMaxPrimCount());
            IPrimCounts pc = lo.PrimCounts;
            cdl.AddRow("Owner Prims", pc.Owner);
            cdl.AddRow("Group Prims", pc.Group);
            cdl.AddRow("Other Prims", pc.Others);
            cdl.AddRow("Selected Prims", pc.Selected);
            cdl.AddRow("Total Prims", pc.Total);
            cdl.AddRow("SimWide Prims (owner)", pc.Simulator);

            cdl.AddRow("Music URL", ld.MusicURL);
            cdl.AddRow("Obscure Music", ld.ObscureMusic);

            cdl.AddRow("Media ID", ld.MediaID);
            cdl.AddRow("Media Autoscale", Convert.ToBoolean(ld.MediaAutoScale));
            cdl.AddRow("Media URL", ld.MediaURL);
            cdl.AddRow("Media Type", ld.MediaType);
            cdl.AddRow("Media Description", ld.MediaDescription);
            cdl.AddRow("Media Width", ld.MediaWidth);
            cdl.AddRow("Media Height", ld.MediaHeight);
            cdl.AddRow("Media Loop", ld.MediaLoop);
            cdl.AddRow("Obscure Media", ld.ObscureMedia);

            cdl.AddRow("Parcel Category", ld.Category);

            cdl.AddRow("Claim Date", ld.ClaimDate);
            cdl.AddRow("Claim Price", ld.ClaimPrice);
            cdl.AddRow("Pass Hours", ld.PassHours);
            cdl.AddRow("Pass Price", ld.PassPrice);

            cdl.AddRow("Auction ID", ld.AuctionID);
            cdl.AddRow("Authorized Buyer ID", ld.AuthBuyerID);
            cdl.AddRow("Sale Price", ld.SalePrice);

            cdl.AddToStringBuilder(report);
        }
开发者ID:nebadon2025,项目名称:opensimulator,代码行数:71,代码来源:LandManagementModule.cs

示例2: DoCommonChecks

        private string DoCommonChecks(int objectCount, UUID ownerID, ILandObject lo, Scene scene)
        {
            string response = null;

            int simulatorCapacity = lo.GetSimulatorMaxPrimCount();
            if ((objectCount + lo.PrimCounts.Total) > simulatorCapacity)
            {
                response = "Unable to rez object because the parcel is too full";
            }
            else
            {
                int maxPrimsPerUser = scene.RegionInfo.MaxPrimsPerUser;
                if (maxPrimsPerUser >= 0)
                {
                    // per-user prim limit is set
                    if (ownerID != lo.LandData.OwnerID || lo.LandData.IsGroupOwned)
                    {
                        // caller is not the sole Parcel owner
                        EstateSettings estateSettings = scene.RegionInfo.EstateSettings;
                        if (ownerID != estateSettings.EstateOwner)
                        {
                            // caller is NOT the Estate owner
                            List<UUID> mgrs = new List<UUID>(estateSettings.EstateManagers);
                            if (!mgrs.Contains(ownerID))
                            {
                                // caller is not an Estate Manager
                                if ((lo.PrimCounts.Users[ownerID] + objectCount) >  maxPrimsPerUser)
                                {
                                    response = "Unable to rez object because you have reached your limit";
                                }
                            }
                        }
                    }
                }
            }
            return response;
        }
开发者ID:RadaSangOn,项目名称:workCore2,代码行数:37,代码来源:PrimLimitsModule.cs


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