[CODE][BUG?] Bug in the stock (pl17) do_examine function?

From: Adam Scriven (scriven@lore.com)
Date: 09/27/00


Hey again.

While I was hacking around with the multi-exit stuff, playing with the code
(pl17 + random typo and multi-exits), I tried to fix a bug that I found.

Here's the bug:
You can examine a container, like a bag, and it gives you the result of the
examine ("...nothing special", perhaps), and then says what's inside.
This part works like a charm.

The problem is, if you "examine 2.bag", it gives you the contents of
the first bag, no matter what happens.

This happens with not only containers that you're holding, but that are in
a room as well (multiple corpses, for instance).

I've looked at the code, and it looks OK (based on the "look in" code from
do_look.  The problem seems to be here:

  if (tmp_object) {
    if ((GET_OBJ_TYPE(tmp_object) == ITEM_DRINKCON) ||
        (GET_OBJ_TYPE(tmp_object) == ITEM_FOUNTAIN) ||
        (GET_OBJ_TYPE(tmp_object) == ITEM_CONTAINER)) {
      send_to_char("When you look inside, you see:\r\n", ch);
      look_in_obj(ch, arg);
    }

I'll try and hack around a bit more myself (my c's very rusty, so this may
take a while. 8-) ), but if there's a ready fix available, I'd also love a
pointer to it.

Thanks very much!
Adam


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/11/01 PDT