Exemplo n.º 1
0
        // Get Attack Event Data (to use only on Attack Event Script)
        public static AttackEventData GetAttackEventData()
        {
            var data = new AttackEventData();

            Internal.NativeFunctions.nwnxSetFunction(PLUGIN_NAME, "GetAttackEventData");
            Internal.NativeFunctions.nwnxCallFunction();
            data.Target       = Internal.NativeFunctions.nwnxPopObject();
            data.Bludgeoning  = Internal.NativeFunctions.nwnxPopInt();
            data.Pierce       = Internal.NativeFunctions.nwnxPopInt();
            data.Slash        = Internal.NativeFunctions.nwnxPopInt();
            data.Magical      = Internal.NativeFunctions.nwnxPopInt();
            data.Acid         = Internal.NativeFunctions.nwnxPopInt();
            data.Cold         = Internal.NativeFunctions.nwnxPopInt();
            data.Divine       = Internal.NativeFunctions.nwnxPopInt();
            data.Electrical   = Internal.NativeFunctions.nwnxPopInt();
            data.Fire         = Internal.NativeFunctions.nwnxPopInt();
            data.Negative     = Internal.NativeFunctions.nwnxPopInt();
            data.Positive     = Internal.NativeFunctions.nwnxPopInt();
            data.Sonic        = Internal.NativeFunctions.nwnxPopInt();
            data.Base         = Internal.NativeFunctions.nwnxPopInt();
            data.AttackNumber = Internal.NativeFunctions.nwnxPopInt();
            data.AttackResult = Internal.NativeFunctions.nwnxPopInt();
            data.AttackType   = Internal.NativeFunctions.nwnxPopInt();
            data.SneakAttack  = Internal.NativeFunctions.nwnxPopInt();
            return(data);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Get Attack Event Data (to use only on Attack Event Script)
        /// </summary>
        /// <returns></returns>
        public static AttackEventData GetAttackEventData()
        {
            string          sFunc = "GetAttackEventData";
            AttackEventData data  = new AttackEventData();

            NWNX_CallFunction(NWNX_Damage, sFunc);

            data.Target       = NWNX_GetReturnValueObject(NWNX_Damage, sFunc);
            data.Bludgeoning  = NWNX_GetReturnValueInt(NWNX_Damage, sFunc);
            data.Pierce       = NWNX_GetReturnValueInt(NWNX_Damage, sFunc);
            data.Slash        = NWNX_GetReturnValueInt(NWNX_Damage, sFunc);
            data.Magical      = NWNX_GetReturnValueInt(NWNX_Damage, sFunc);
            data.Acid         = NWNX_GetReturnValueInt(NWNX_Damage, sFunc);
            data.Cold         = NWNX_GetReturnValueInt(NWNX_Damage, sFunc);
            data.Divine       = NWNX_GetReturnValueInt(NWNX_Damage, sFunc);
            data.Electrical   = NWNX_GetReturnValueInt(NWNX_Damage, sFunc);
            data.Fire         = NWNX_GetReturnValueInt(NWNX_Damage, sFunc);
            data.Negative     = NWNX_GetReturnValueInt(NWNX_Damage, sFunc);
            data.Positive     = NWNX_GetReturnValueInt(NWNX_Damage, sFunc);
            data.Sonic        = NWNX_GetReturnValueInt(NWNX_Damage, sFunc);
            data.Base         = NWNX_GetReturnValueInt(NWNX_Damage, sFunc);
            data.AttackNumber = NWNX_GetReturnValueInt(NWNX_Damage, sFunc);
            data.AttackResult = NWNX_GetReturnValueInt(NWNX_Damage, sFunc);
            data.AttackType   = NWNX_GetReturnValueInt(NWNX_Damage, sFunc);
            data.SneakAttack  = NWNX_GetReturnValueInt(NWNX_Damage, sFunc);

            return(data);
        }
Exemplo n.º 3
0
 // Set Attack Event Data (to use only on Attack Event Script)
 public static void SetAttackEventData(AttackEventData data)
 {
     Internal.NativeFunctions.nwnxSetFunction(PLUGIN_NAME, "SetAttackEventData");
     Internal.NativeFunctions.nwnxPushInt(data.Base);
     Internal.NativeFunctions.nwnxPushInt(data.Sonic);
     Internal.NativeFunctions.nwnxPushInt(data.Positive);
     Internal.NativeFunctions.nwnxPushInt(data.Negative);
     Internal.NativeFunctions.nwnxPushInt(data.Fire);
     Internal.NativeFunctions.nwnxPushInt(data.Electrical);
     Internal.NativeFunctions.nwnxPushInt(data.Divine);
     Internal.NativeFunctions.nwnxPushInt(data.Cold);
     Internal.NativeFunctions.nwnxPushInt(data.Acid);
     Internal.NativeFunctions.nwnxPushInt(data.Magical);
     Internal.NativeFunctions.nwnxPushInt(data.Slash);
     Internal.NativeFunctions.nwnxPushInt(data.Pierce);
     Internal.NativeFunctions.nwnxPushInt(data.Bludgeoning);
     Internal.NativeFunctions.nwnxCallFunction();
 }
Exemplo n.º 4
0
        /// <summary>
        /// Set Attack Event Data (to use only on Attack Event Script)
        /// </summary>
        /// <param name="data"></param>
        public static void SetAttackEventData(AttackEventData data)
        {
            string sFunc = "SetAttackEventData";

            NWNX_PushArgumentInt(NWNX_Damage, sFunc, data.Base);
            NWNX_PushArgumentInt(NWNX_Damage, sFunc, data.Sonic);
            NWNX_PushArgumentInt(NWNX_Damage, sFunc, data.Positive);
            NWNX_PushArgumentInt(NWNX_Damage, sFunc, data.Negative);
            NWNX_PushArgumentInt(NWNX_Damage, sFunc, data.Fire);
            NWNX_PushArgumentInt(NWNX_Damage, sFunc, data.Electrical);
            NWNX_PushArgumentInt(NWNX_Damage, sFunc, data.Divine);
            NWNX_PushArgumentInt(NWNX_Damage, sFunc, data.Cold);
            NWNX_PushArgumentInt(NWNX_Damage, sFunc, data.Acid);
            NWNX_PushArgumentInt(NWNX_Damage, sFunc, data.Magical);
            NWNX_PushArgumentInt(NWNX_Damage, sFunc, data.Slash);
            NWNX_PushArgumentInt(NWNX_Damage, sFunc, data.Pierce);
            NWNX_PushArgumentInt(NWNX_Damage, sFunc, data.Bludgeoning);

            NWNX_CallFunction(NWNX_Damage, sFunc);
        }