do_save - A few questions...

From: Julian Buckley (caniffe@caniffe.org)
Date: 07/04/00


Hello,

I was trying to decide what value would be the most preferable
"autosave" time for crash_saving - Circle's default is currently 5
minutes.  Then however, I came to thinking about do_save, and the change
made post bpl16 thus:
***CUT***
    if (auto_save && GET_LEVEL(ch) <= LVL_IMMORT) {
      send_to_char("Saving aliases.\r\n", ch);
      write_aliases(ch);
      return;
    }
    sprintf(buf, "Saving %s and aliases.\r\n", GET_NAME(ch));
    send_to_char(buf, ch);
***END***

If all this change was mainly entailing was to prohibit item duplication
via the age-old give+crash routine, why can't:
  save_char(ch, NOWHERE);
be called even if autosave is enabled?

i.e.: (original comments snipped)
ACMD(do_save)
{
  if (IS_NPC(ch) || !ch->desc)
    return;

  if (cmd) {
    sprintf(buf, "Saving %s and aliases.\r\n", GET_NAME(ch));
    send_to_char(buf, ch);
  }

  write_aliases(ch);
  save_char(ch, NOWHERE);
  if (auto_save && GET_LEVEL(ch) <= LVL_IMMORT) {
    Crash_crashsave(ch);
    if (ROOM_FLAGGED(ch->in_room, ROOM_HOUSE_CRASH))
      House_crashsave(GET_ROOM_VNUM(IN_ROOM(ch)));
  }
}

The advantage of this as I see it is that Immortal (LVL_IMMORTs)
preferences (and indeed, player preferences such as prompts, titles,
etc) will be saved without having to wait for the auto_save to kick in.
At least, that's how I see it.  Perhaps char_to_store has something to
do with duplication besides unequipping that I'm simply overlooking...?

-C.
--
Julian "Caniffe" Buckley
http://www.caniffe.org


     +------------------------------------------------------------+
     | 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/10/01 PDT