[CODE] Patch Update to Shop.c for bp21

From: Justin Adler (spam@WORLD-DOMINATION.COM.AU)
Date: 07/27/02


/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*
** ARGH!! Sorry about the email before, i did it via WEBMAIL client and i
hit send before i finished / proof read. PLEASE IGNORE PREVIOUS EMAIL.

*take 2*
/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*



While trying to update my shop.c from bp11 to 21 (eeks!), i noticed both
versions (and therefore all versions?) do not display the item being SOLD
properly.

in shop.c, around line 806 (bp21), i've added these two lines in

<< MAILER CODE >>
...
  GET_GOLD(ch) += goldamt;

+ strlcpy (name, obj->short_description, sizeof(name));

  strlcpy(tempstr, times_message(0, name, sold), sizeof(tempstr));
  snprintf(tempbuf, sizeof(tempbuf), "$n sells %s.", tempstr);
  act(tempbuf, FALSE, ch, obj, 0, TO_ROOM);

  snprintf(tempbuf, sizeof(tempbuf), shop_index[shop_nr].message_sell,
GET_NAME(ch), goldamt);
  do_tell(keeper, tempbuf, cmd_tell, 0);

- send_to_char(ch, "The shopkeeper now has %s.\r\n", tempstr);
+ send_to_char(ch, "%s now has %s.\r\n", GET_NAME(keeper), tempstr);
...


if u don't add that line, then the text displayed is the keyword the
SELLER has entered.

eg.
**OLD**
The Keeper now has a pair.

**UPDATE**
Simon the Shopkeer now has a pair of leather boots.


-Pure Krome-

--
   +---------------------------------------------------------------+
   | 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/25/03 PDT