Exemple #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);
        }
Exemple #2
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();
 }