Ok, I left out something very important in my previous post. The game
doesn't like the
d->character call for non-playing characters. Also, I wasn't checking
items in the players inventory. The only thing that needs to be changed
are the two functions call_room_specs and call_obj_specs. These should fix
the problem:
void call_obj_specs(void)
{
extern struct descriptor_data *descriptor_list;
struct descriptor_data *d;
extern struct index_data *obj_index;
struct obj_data *i;
int j;
for (d = descriptor_list; d; d = d->next) {
for (j = 0; j < NUM_WEARS; j++)
if (d->character && GET_EQ(d->character, j) &&
GET_OBJ_SPEC(GET_EQ(d->character, j)))
if (GET_OBJ_SPEC(GET_EQ(d->character, j)) (d->character,
GET_EQ(d->character, j), 0, ""))
continue;
}
for (d = descriptor_list; d; d = d->next) {
if(d->character)
for (i = d->character->carrying; i; i = i->next_content)
if (GET_OBJ_SPEC(i) != NULL)
if (GET_OBJ_SPEC(i) (d->character, i, cmd, arg))
continue;
}
void call_room_specs(void)
{
extern struct descriptor_data *descriptor_list;
struct descriptor_data *d;
for (d = descriptor_list; d; d = d->next) {
if(d->character && d->character->in_room &&
GET_ROOM_SPEC(d->character->in_room) != NULL)
if (GET_ROOM_SPEC(d->character->in_room) (d->character, world +
d->character->in_room, 0, ""))
continue;
}
}
Chuck Reed | Q: Who's your favorite Spice Girl? |
creed@i-55.com | A: The dead one. |
"Jesus saves . . . . he passes to Moses. Moses shoots, HE SCORES!"
-Unknown
+------------------------------------------------------------+
| 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