[CF-Devel] CFPython.SetQuantity()

crossfire-devel-admin at archives.real-time.com crossfire-devel-admin at archives.real-time.com
Fri Sep 26 01:07:54 CDT 2003


Todd Mitchell wrote:
>
     
      I am working on making the IPO banking scripts more fun and have noticed
     
     >
     
      a little glitch.  
     
     >
     
      CFPython.SetQuantity() does not seem to change the displayed number of
     
     >
     
      items in a stack until the stack is clicked or moved or some such
     
     >
     
      change.  It is doing the right hting, just not refreshing the amount
     
     >
     
      right away.  I actually noticed this before with the realestate stuff
     
     >
     
      some time ago but assumed it was my mistake but now I think it is in the
     
     >
     
      function.  I suppose I could destroy and create the stack of objects but
     
     >
     
      SetQuantity should be updating the number right away no?
     
     
  Yeah, it looks like the code that increases the nrof should also make a call 
to (PlugHooks[HOOK_ESRVSENDITEM]) ().

  It's actually a little trickier - if the object in question is in a players 
inventory, that hook works fine.

  However, if the object is on the ground where the player is standing, then we 
update_look tag for the object probably needs to be updated.

  I also notice that the existing CFSetQuantity is a bit odd - it calls 
PlugHooks[HOOK_UPDATEOBJECT](), which doesn't make a lot of sense - the 
updateobject changes how the map looks (eg, face), but changing the nrof of 
objects is not likely to actually change the face.



_______________________________________________
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