[CF-Devel] python plugin drop patch

crossfire-devel at archives.real-time.com crossfire-devel at archives.real-time.com
Wed Jun 16 01:28:29 CDT 2004


Todd Mitchell wrote:
>
     
      I think the intended effect is to run the script twice - if an object is
     
     >
     
      worn/applied it is run, if it is unworn/unapplied it is run - that was the
     
     >
     
      current situation,  the apply hook was called on apply and unapply.  I am
     
     >
     
      only addressing a loophole that when an applied object is dropped it does not
     
     >
     
      call unapply.  This brings the behaviour in line with existing behaviour.  It
     
     >
     
      should be noted in the plugin docs however that apply is also called on
     
     >
     
      unapply.  Now granted the hook may be in the wrong place - but IMHO the
     
     >
     
      behaviour seems to be correct.
     
     
  Having the script called for the apply once and unapply once is fine.

  My point was that if a player unequips an item, with the code that you 
submitted, the script will be called _twice_ when a player unequips the item.

  I don't know if that will cause any problems, but is something that script 
writes may not expect.


>
     
     
     >
     
      Mark said:
     
     >
     
     
     >>
     
      One effect that I think will happen is that when a player manually
     
     >>
     
      unapplies the object, the apply event script will be run twice - once from
     
     >>
     
      manual_apply, and once from unapply_special.  I'm not sure if this will
     
     >>
     
      have any bad effects, but I could certainly see the possibility of that
     
     >>
     
      happening.
     
     >>
     
     
     

_______________________________________________
crossfire-devel mailing list
     
     crossfire-devel at lists.real-time.com
     
     
     https://mailman.real-time.com/mailman/listinfo/crossfire-devel
     
     
    


More information about the crossfire mailing list