22 Mar, 2010, Enildo wrote in the 1st comment:
Votes: 0
I'm looking in the load_mobiles function in db2.c. It creates and populates a MOB_INDEX_DATA struct.

However, in fight.c, all combat happens between CHAR_DATA types.

void one_hit( CHAR_DATA *ch, CHAR_DATA *victim, int dt )

So how does the mobile become a CHAR_DATA?

It probably has something to do with this line:
struct	char_data
// several lines skipped…
MOB_INDEX_DATA * pIndexData;
22 Mar, 2010, Enildo wrote in the 2nd comment:
Votes: 0
Okay I think I found it. I swear I've been puzzling over this for a few days, but in db.c there's the following code:

mob = create_mobile( pMobIndex );

in the reset_area function. So I guess that loading the area just sets up the data, then resetting it actually populates the world? It appears to be something like that.

22 Mar, 2010, Zeno wrote in the 3rd comment:
Votes: 0
MOBILE_INDEX_DATA does not store active mobs. It stores the index of the mob.

CHAR_DATA is for active PCs or NPCs.
22 Mar, 2010, Kline wrote in the 4th comment:
Votes: 0
Yes, create_mobile() takes a MOB_INDEX_DATA (the 'prototype' for the mob, read from the area file) and turns it into a CHAR_DATA of a live character (PC or NPC) within the game.