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

            NWNXCore.NWNX_CallFunction(NWNX_Administration, sFunc);
            return(NWNXCore.NWNX_GetReturnValueInt());
        }
コード例 #2
0
        public static AdministrationDebugType GetDebugValue(int type)
        {
            var sFunc = "GetDebugValue";

            NWNXCore.NWNX_PushArgumentInt(type);
            NWNXCore.NWNX_CallFunction(NWNX_Administration, sFunc);

            return((AdministrationDebugType)NWNXCore.NWNX_GetReturnValueInt());
        }
コード例 #3
0
        public static int GetPlayOption(AdministrationOption option)
        {
            var sFunc = "GetPlayOption";

            NWNXCore.NWNX_PushArgumentInt((int)option);
            NWNXCore.NWNX_CallFunction(NWNX_Administration, sFunc);

            return(NWNXCore.NWNX_GetReturnValueInt());
        }
コード例 #4
0
        public static int DeleteTURD(string playerName, string characterName)
        {
            var sFunc = "DeleteTURD";

            NWNXCore.NWNX_PushArgumentString(characterName);
            NWNXCore.NWNX_PushArgumentString(playerName);
            NWNXCore.NWNX_CallFunction(NWNX_Administration, sFunc);

            return(NWNXCore.NWNX_GetReturnValueInt());
        }
コード例 #5
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()
            });
        }
コード例 #6
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()
            });
        }