[CF-Devel] python plugin drop patch

crossfire-devel at archives.real-time.com crossfire-devel at archives.real-time.com
Tue Jun 15 02:19:48 CDT 2004


Todd Mitchell wrote:
>
     
      This is a wild stab at fixing the problem with the python plugin not
     
     >
     
      calling the apply hook when applied/worn items are directly droped
     
     >
     
      instead of unworn/unapplied.  Please look it over as it is still a bit
     
     >
     
      of voodo to me and I really really want this bug fixed so I can finish
     
     >
     
      my smugglers cove maps.  It works for my wear disguise script anyway and
     
     >
     
      I haven't seen any ill effects (yet).
     
     
  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.

  Also looking at the code in general, it seems this has to get to the script to 
figure if the object is being applied/unapplied.  So that's just something that 
the script has to be aware of.

  One solution to this problem is to move the suggested code change into 
apply_special.  And then change manual_apply to not call the scripting if it 
knows apply special will take care of it (basically just move a switch statement 
for checking for those objects to near the top of the manual_apply function, and 
if it passes those checks, call the event stuff for all the other objects 
manual_apply deal with.


_______________________________________________
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