Re: [Bug] Item Dup (old bug)

From: ;P (siv@CYBERENET.NET)
Date: 11/22/97


> > Does anyone know a fix for this?  Someone posted one here a while back
> > but it was FAR from stock and totally confusing... in fact looked exactly
> > like code already in place (elsewhere in the login sequence code).
>
> Well the fix is pretty simple... Just make it so, that character is saved
> at the end of these commands: give/buy/sell/drop/get
>
> Just one save_char(ch, NOWHERE);

more importantly, make sure that the character's objects are saved
whenever they get/drop/put/etc an object...the only thing to watch out
for is that extract char uses obj_from_char when the player quits...and
this could lead to people returning without items if you have it save in
that function...i put an objsave(ch) (or whatever the stock equivalent
is) in the obj_to(from)_char and made a new one for when the player quits
that didn't have the save..that way their objects are saved when they
give/receive an object during normal play, but when it won't when i take
objects away while extracting their char..something like

void extract_char(struct char_data *ch) {
.
.
  objsave(ch)
  quit_extract_objs(ch); // this won't save after taking each obj away
.
.

btw, i'm not using rent (in fact, the word rent doesn't appear in my
code anymore, except as part of words like current), so that could
complicate things..

siv


     +------------------------------------------------------------+
     | 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/08/00 PST