コード例 #1
0
        public static string GetPlayerPassword()
        {
            var sFunc = "GetPlayerPassword";

            NWNXCore.NWNX_CallFunction(NWNX_Administration, sFunc);
            return(NWNXCore.NWNX_GetReturnValueString());
        }
コード例 #2
0
        public static string GetServerName()
        {
            var sFunc = "GetServerName";

            NWNXCore.NWNX_CallFunction(NWNX_Administration, sFunc);
            return(NWNXCore.NWNX_GetReturnValueString());
        }
コード例 #3
0
        public static string GetBannedList()
        {
            var sFunc = "GetBannedList";

            NWNXCore.NWNX_CallFunction(NWNX_Administration, sFunc);
            return(NWNXCore.NWNX_GetReturnValueString());
        }
コード例 #4
0
        /// @brief Gets the active item property at the index
        /// @param oItem - the item with the property
        /// @param nIndex - the index such as returned by some Item Events
        /// @return A constructed NWNX_IPUnpacked, except for creator, and spell id.
        public static ItemPropertyUnpacked GetActiveProperty(uint oItem, int nIndex)
        {
            const string sFunc = "GetActiveProperty";

            NWNXCore.NWNX_PushArgumentInt(nIndex);
            NWNXCore.NWNX_PushArgumentObject(oItem);
            NWNXCore.NWNX_CallFunction(PLUGIN_NAME, sFunc);

            return(new ItemPropertyUnpacked
            {
                Property = NWNXCore.NWNX_GetReturnValueInt(),
                SubType = NWNXCore.NWNX_GetReturnValueInt(),
                CostTable = NWNXCore.NWNX_GetReturnValueInt(),
                CostTableValue = NWNXCore.NWNX_GetReturnValueInt(),
                Param1 = NWNXCore.NWNX_GetReturnValueInt(),
                Param1Value = NWNXCore.NWNX_GetReturnValueInt(),
                UsesPerDay = NWNXCore.NWNX_GetReturnValueInt(),
                ChanceToAppear = NWNXCore.NWNX_GetReturnValueInt(),
                IsUseable = Convert.ToBoolean(NWNXCore.NWNX_GetReturnValueInt()),
                Tag = NWNXCore.NWNX_GetReturnValueString()
            });
        }
コード例 #5
0
        // Convert native itemproperty type to unpacked structure
        public static ItemPropertyUnpacked UnpackIP(Lite.ItemProperty ip)
        {
            const string func = "UnpackIP";

            NWNXCore.NWNX_PushArgumentItemProperty(ip);
            NWNXCore.NWNX_CallFunction(PLUGIN_NAME, func);

            return(new ItemPropertyUnpacked
            {
                Id = NWNXCore.NWNX_GetReturnValueString(),
                Property = NWNXCore.NWNX_GetReturnValueInt(),
                SubType = NWNXCore.NWNX_GetReturnValueInt(),
                CostTable = NWNXCore.NWNX_GetReturnValueInt(),
                CostTableValue = NWNXCore.NWNX_GetReturnValueInt(),
                Param1 = NWNXCore.NWNX_GetReturnValueInt(),
                Param1Value = NWNXCore.NWNX_GetReturnValueInt(),
                UsesPerDay = NWNXCore.NWNX_GetReturnValueInt(),
                ChanceToAppear = NWNXCore.NWNX_GetReturnValueInt(),
                IsUseable = Convert.ToBoolean(NWNXCore.NWNX_GetReturnValueInt()),
                SpellId = NWNXCore.NWNX_GetReturnValueInt(),
                Creator = NWNXCore.NWNX_GetReturnValueObject(),
                Tag = NWNXCore.NWNX_GetReturnValueString()
            });
        }