Example #1
0
 /// <description>
 /// Called when the spell ends naturally.
 /// </description>
 /// <param name="spell">the spell object</param>
 public virtual void OnDeactivate(afxMagicSpell spell)
 {
     InternalUnsafeMethods.OnDeactivate__Args _args = new InternalUnsafeMethods.OnDeactivate__Args()
     {
         spell = spell.ObjectPtr,
     };
     InternalUnsafeMethods.OnDeactivate()(ObjectPtr, _args);
 }
Example #2
0
 /// <description>
 /// Called when the spell ends unnaturally due to an interruption.
 /// </description>
 /// <param name="spell">the spell object</param>
 public virtual void OnInterrupt(afxMagicSpell spell, ShapeBase caster)
 {
     InternalUnsafeMethods.OnInterrupt__Args _args = new InternalUnsafeMethods.OnInterrupt__Args()
     {
         spell  = spell.ObjectPtr,
         caster = caster.ObjectPtr,
     };
     InternalUnsafeMethods.OnInterrupt()(ObjectPtr, _args);
 }
Example #3
0
 /// <description>
 /// Called when the spell starts.
 /// </description>
 /// <param name="spell">the spell object</param>
 public virtual void OnActivate(afxMagicSpell spell, ShapeBase caster, SceneObject target)
 {
     InternalUnsafeMethods.OnActivate__Args _args = new InternalUnsafeMethods.OnActivate__Args()
     {
         spell  = spell.ObjectPtr,
         caster = caster.ObjectPtr,
         target = target.ObjectPtr,
     };
     InternalUnsafeMethods.OnActivate()(ObjectPtr, _args);
 }
Example #4
0
 /// <description>
 /// Called when the spell's casting stage ends and the delivery stage begins.
 /// </description>
 /// <param name="spell">the spell object</param>
 public virtual void OnLaunch(afxMagicSpell spell, ShapeBase caster, SceneObject target, afxMagicMissile missile)
 {
     InternalUnsafeMethods.OnLaunch__Args _args = new InternalUnsafeMethods.OnLaunch__Args()
     {
         spell   = spell.ObjectPtr,
         caster  = caster.ObjectPtr,
         target  = target.ObjectPtr,
         missile = missile.ObjectPtr,
     };
     InternalUnsafeMethods.OnLaunch()(ObjectPtr, _args);
 }
Example #5
0
 /// <description>
 /// Called at the spell's missile impact marking the end of the deliver stage and the start of the linger stage.
 /// </description>
 /// <param name="spell">the spell object</param>
 public virtual void OnImpact(afxMagicSpell spell, ShapeBase caster, SceneObject impacted, Point3F pos, Point3F normal)
 {
     pos.Alloc(); normal.Alloc();             InternalUnsafeMethods.OnImpact__Args _args = new InternalUnsafeMethods.OnImpact__Args()
     {
         spell    = spell.ObjectPtr,
         caster   = caster.ObjectPtr,
         impacted = impacted.ObjectPtr,
         pos      = pos.internalStructPtr,
         normal   = normal.internalStructPtr,
     };
     InternalUnsafeMethods.OnImpact()(ObjectPtr, _args);
     pos.Free(); normal.Free();
 }
Example #6
0
 /// <description>
 /// Called when the spell deals damage.
 /// </description>
 /// <param name="spell">the spell object</param>
 public virtual void OnDamage(afxMagicSpell spell, string label, string flaver, uint target_id, float amount, byte n, Point3F pos, float ad_amount, float radius, float impulse)
 {
     pos.Alloc();             InternalUnsafeMethods.OnDamage__Args _args = new InternalUnsafeMethods.OnDamage__Args()
     {
         spell     = spell.ObjectPtr,
         label     = label,
         flaver    = flaver,
         target_id = target_id,
         amount    = amount,
         n         = n,
         pos       = pos.internalStructPtr,
         ad_amount = ad_amount,
         radius    = radius,
         impulse   = impulse,
     };
     InternalUnsafeMethods.OnDamage()(ObjectPtr, _args);
     pos.Free();
 }