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


C# Scene.SetObjectCapacity方法代码示例

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


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

示例1: AddRegion

        public void AddRegion(Scene scene)
        {
            // Send ObjectCapacity to Scene..  Which sends it to the SimStatsReporter.
            scene.SetObjectCapacity(ObjectCapacity);

            if (m_enabled)
            {
                scene.RegisterModuleInterface<IMoneyModule>(this);
                IHttpServer httpServer = MainServer.Instance;

                lock (m_scenel)
                {
                    if (m_scenel.Count == 0)
                    {
                        // XMLRPCHandler = scene;

                        // To use the following you need to add:
                        // -helperuri <ADDRESS TO HERE OR grid MONEY SERVER>
                        // to the command line parameters you use to start up your client
                        // This commonly looks like -helperuri http://127.0.0.1:9000/

                       
                        // Local Server..  enables functionality only.
                        httpServer.AddXmlRPCHandler("getCurrencyQuote", quote_func);
                        httpServer.AddXmlRPCHandler("buyCurrency", buy_func);
                        httpServer.AddXmlRPCHandler("preflightBuyLandPrep", preflightBuyLandPrep_func);
                        httpServer.AddXmlRPCHandler("buyLandPrep", landBuy_func);
                       
                    }

                    if (m_scenel.ContainsKey(scene.RegionInfo.RegionHandle))
                    {
                        m_scenel[scene.RegionInfo.RegionHandle] = scene;
                    }
                    else
                    {
                        m_scenel.Add(scene.RegionInfo.RegionHandle, scene);
                    }
                }

                scene.EventManager.OnNewClient += OnNewClient;
                scene.EventManager.OnMoneyTransfer += MoneyTransferAction;
                scene.EventManager.OnClientClosed += ClientClosed;
                scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
                scene.EventManager.OnMakeChildAgent += MakeChildAgent;
                scene.EventManager.OnClientClosed += ClientLoggedOut;
                scene.EventManager.OnValidateLandBuy += ValidateLandBuy;
                scene.EventManager.OnLandBuy += processLandBuy;
            }
        }
开发者ID:AlexRa,项目名称:opensim-mods-Alex,代码行数:50,代码来源:SampleMoneyModule.cs

示例2: ReadConfigAndPopulate

        /// <summary>
        /// Parse Configuration
        /// </summary>
        /// <param name="scene"></param>
        /// <param name="startupConfig"></param>
        /// <param name="config"></param>
        private void ReadConfigAndPopulate(Scene scene, IConfig startupConfig, string config)
        {
            if (config == "Startup" && startupConfig != null)
            {
                gridmode = startupConfig.GetBoolean("gridmode", false);
                m_enabled = (startupConfig.GetString("economymodule", "OpenCurrency") == "OpenCurrency");
            }

            if (config == "Economy" && startupConfig != null)
            {
                ObjectCapacity = startupConfig.GetInt("ObjectCapacity", 45000);
                PriceEnergyUnit = startupConfig.GetInt("PriceEnergyUnit", 100);
                PriceObjectClaim = startupConfig.GetInt("PriceObjectClaim", 10);
                PricePublicObjectDecay = startupConfig.GetInt("PricePublicObjectDecay", 4);
                PricePublicObjectDelete = startupConfig.GetInt("PricePublicObjectDelete", 4);
                PriceParcelClaim = startupConfig.GetInt("PriceParcelClaim", 1);
                PriceParcelClaimFactor = startupConfig.GetFloat("PriceParcelClaimFactor", 1f);
                PriceUpload = startupConfig.GetInt("PriceUpload", 0);
                PriceRentLight = startupConfig.GetInt("PriceRentLight", 5);
                TeleportMinPrice = startupConfig.GetInt("TeleportMinPrice", 2);
                TeleportPriceExponent = startupConfig.GetFloat("TeleportPriceExponent", 2f);
                EnergyEfficiency = startupConfig.GetFloat("EnergyEfficiency", 1);
                PriceObjectRent = startupConfig.GetFloat("PriceObjectRent", 1);
                PriceObjectScaleFactor = startupConfig.GetFloat("PriceObjectScaleFactor", 10);
                PriceParcelRent = startupConfig.GetInt("PriceParcelRent", 1);
                PriceGroupCreate = startupConfig.GetInt("PriceGroupCreate", -1);
                string EconomyBaseAccount = startupConfig.GetString("EconomyBaseAccount", UUID.Zero.ToString());
                
                // UserLevelPaysFees = startupConfig.GetInt("UserLevelPaysFees", -1);
                m_stipend = startupConfig.GetInt("UserStipend", 1000);
                m_minFundsBeforeRefresh = startupConfig.GetInt("IssueStipendWhenClientIsBelowAmount", 10);
                m_keepMoneyAcrossLogins = startupConfig.GetBoolean("KeepMoneyAcrossLogins", true);
                m_MoneyAddress = startupConfig.GetString("CurrencyServer", String.Empty);
            }

            // Send ObjectCapacity to Scene..  Which sends it to the SimStatsReporter.
            scene.SetObjectCapacity(ObjectCapacity);
        }
开发者ID:OS-Development,项目名称:OpenSim.Currency,代码行数:44,代码来源:OpenCurrency.cs


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