Re: db.c parse_simple_mob

From: Zizazat Lazuras (zizazat@hotmail.com)
Date: 12/11/01


>Correct me if I'm wrong, but I believe that ch->player points to a
>player-only structure [e.g., a structure that is not allocated for >NPCs at
>all].  Make sure that both NPCs and PCs can have a race and >class first
>[by taking the variables from the player-only structure >and moving them to
>a shared structure].  Then, I would create defines >for just NPCs
>[GET_M_RACE(), GET_M_CLASS()].

I believe you are wrong.

From structs.h:

/* general player-related info, usually PC's and NPC's */
struct char_player_data {
   char passwd[MAX_PWD_LENGTH+1]; /* character's password      */
   char *name;         /* PC / NPC s name (kill ...  )         */
   char *short_descr;  /* for NPC 'actions'                    */
   char *long_descr;   /* for 'look'                           */
   char *description;  /* Extra descriptions                   */
   char *title;        /* PC / NPC's title                     */
   byte sex;           /* PC / NPC's sex                       */
   byte chclass;       /* PC / NPC's class                     */
   byte race;          /* PC / NPC's race                      */
   byte chsize;        /* PC / NPC's size                      */
   byte level;         /* PC / NPC's level                     */
   int  hometown;      /* PC s Hometown (zone)                 */
   struct time_data time;  /* PC's AGE in days                 */
   ubyte weight;       /* PC / NPC's weight                    */
   ubyte height;       /* PC / NPC's height                    */
};

Again, I am REUSING code that works under bpl15, but doesn't seem to work on
bpl17 or bpl19. Maybe there is something else that I have forgotten to do,
but it clearly is reading in the RACE value for me now, but CLASS is always
0.

I suspect something was changed from bpl15 to bpl17 that is affecting this,
or there is an additional snip of code that I neglected to copy in my haste.

Any other ideas?

--Ziz

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/24/03 PDT