On Mon, 18 Dec 1995, Levork wrote: > > > In utils.h we have the lines: > > > #define IS_NPC(ch) MOB_FLAGS(ch).isnpc > > > #define IS_MOB(ch) (IS_NPC(ch) && ((ch)->nr >-1)) > > > > Note the ((ch)->nr > -1) part of IS_MOB? > > > > That's the number that is automagically assigned to a character whenever > > they are first created. That number will be -1 for a "real mob". If an > > immortal is switched into an NPC, however, that number will be assigned > > to whatever their number is. > > > > So, a MOB is an NPC that isn't switched into. > > Hm, I was under the impression that a MOB meant prototyped mobile as > opposed to a non-prototyped mobile (i.e. the product of an animate dead > spell), and that the ->nr actually was the index into the mob_proto > table. NPC covers both non-prototyped and prototyped. Perhaps it manages both, but it makes little sense. Why would a non-prototype mob be any different from a prototyped mob, short of stats? There is a definite ID number assigned to a character. You can get this by statting that person from the start. The save procs use this, I think, as a lookup in the binary file ( I haven't really checked that code, though). I can tell you, though, that IS_MOB() is how several checks are made. -- Kenneth G. Cavness | http://ccwf.cc.utexas.edu/~cavness Associate Editor | "That which is possible is not always MIDS, TIC | probable." -- Isaac Asimov 1-512-451-7602 | "What about the Tuna?" -- Unknown
This archive was generated by hypermail 2b30 : 12/07/00 PST