[SMAUG] looking for a mob in a room

[SMAUG] looking for a mob in a room



How would I look for a MOB_INDEX_DATA in a given room. Here is the data I have...

CHAR_DATA *rch;
ROOM_INDEX_DATA *location;
location = get_room_index( vnum )    (((Vnum is declared up higher in the funciton)))
for ( rch = location->first_person; rch; rch = rch->next_in_room )
if ( IS_NPC(rch) && rch->pIndexData->vnum == 98 )
break;

That's what I have, works fine, but that's not what I need. I need to find MOB_INDEX_DATA instead of CHAR_DATA. I can't simply change it because MOB does not include next_in_room, although it does include next. It cause minor errors... If anyone could be of little assisstance it would be greatly apprieciated. Thank you.

tasark
dr.wolfpaw.net 7000

p.s. Merry Christmas