[CF-Devel] Questions about plugin code

crossfire-devel at archives.real-time.com crossfire-devel at archives.real-time.com
Thu Oct 14 13:10:26 CDT 2004


Todd Mitchell wrote:
>
     
      CreateObjectInside and CreateInvisibleObjectInside are functions to
     
     >
     
      add items to player inventory (and containers?). I have used the
     
     >
     
      second abovementioned without any problems (python/misc/CFWearDisguise
     
     >
     
      inserts a marker in the player's inventory, I have a few scripts that
     
     >
     
      do this) so I know is works so you might compare the two.
     
     
The implementation of CreateInvisibleObjectInside is quite different
from CreateObjectInside. (And CreateInvisibleObjectInside does not
contain that broken code.)

Both functions that contain the broken code are actually used by some
existing Python scripts, therefore they'll work in principle, I think.

The problem seems to affect the creation of artifacts only: the code
calls

    myob = HOOK_GETARCHETYPE(txt)

to create the object named "txt". (txt is the parameter passed in by the
Python script.)

It then invokes the broken code only if query_name(myob) != txt. I
assume, the intention was to repeatedly call

    HOOK_CREATEARTIFACT(myob, <txt without query_name(myob) prefix>)

until the artifact is complete.

_______________________________________________
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