Re: in_game (and a reply to OFF TOPIC MAJORLY)

From: John Evans (evansj@HI-LINE.NET)
Date: 04/20/98


On Mon, 20 Apr 1998, Chuck Reed wrote:

> Is there a global function that checks for an item being:
> a) In someone's inventory
> b) In containers
> c) In rooms
>
> and returns a integer of how many there were?
>

No need to. It's dynamically done when an object is loaded and extracted.
Check in read_object() in db.c for the line:
obj_index[i].number++;
whereas 'i' is the real number of the object.

Hope that helps.

PS: Same thing is done for mobs.

John Evans <evansj@hi-line.net>  --  http://www.hi-line.net/~evansj/

Any sufficiently advanced technology is indistinguishable from magic.
  -- Arthur C. Clarke


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



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