Esempio n. 1
0
 public static Lite.Effect ItemPropertyToEffect(Lite.ItemProperty ip)
 {
     Internal.NativeFunctions.nwnxSetFunction(PLUGIN_NAME, "EffectTypeCast");
     Internal.NativeFunctions.nwnxPushItemProperty(ip.Handle);
     Internal.NativeFunctions.nwnxCallFunction();
     return(new Lite.Effect(Internal.NativeFunctions.nwnxPopEffect()));
 }
        // 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()
            });
        }
Esempio n. 3
0
 public static void NWNX_PushArgumentItemProperty(Lite.ItemProperty value)
 {
     TagItemProperty(value, NWNX_PUSH);
 }