Re: Object data structures

From: Alvoria MUD (mudguy@conan.ids.net)
Date: 01/13/97


On Mon, 13 Jan 1997, Ron Cole wrote:
> Can anyone explain the difference between the contains and the next_content
> fields in the object data structures?  I'm trying to write a mobprog ifcheck to
> count the quantity of a particular vnum that a character has, and I'm having a
> bit of trouble figuring out how to recurse into the containers.
> 
> Thanks, Ron

The field 'contains' always points to the linked list of objects inside
an object. The 'next_content' always points to the next object within the
inventory of some other entity, like a mob, room, player, or the object
prototype list. In this case, you want to use the 'next_content' to check
a player's inventory, and if you want to check inside those objs, for each
of those objects in the inventory you would then have to examine using
'contains'.

Alvoria MUD -- ""
  Address   -- telnet://conan.ids.net:4000/
  Homepage  -- http://users.ids.net/~mudguy/
  Host Site -- http://www.ids.net/


+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/18/00 PST