displays and OLC

From: Kras Kresh (kras_kresh@hotmail.com)
Date: 03/28/02


When you enter OLC, the PLR_WRITING flag is set on you. But if you were to
use the string_add() function (descriptions) and save or abort, the flag
will be removed. That will allow people to send you tells and whispers and
all that stuff, but you will not even hear them. And if you do, it will
annoy you. I created a fix for it:

in utils.h:
look for "#define STATE(d)" and add/change the following

#define IN_OLC_EDIT(d)  (STATE(d) == CON_TEDIT || STATE(d) == CON_REDIT || \
                         STATE(d) == CON_MEDIT || STATE(d) == CON_OEDIT || \
                         STATE(d) == CON_ZEDIT || STATE(d) == CON_SEDIT)

#define IS_PLAYING(d)   (IN_OLC_EDIT(d) || STATE(d) == CON_PLAYING)

in act.informative.c: do_who():
look for: if (STATE(d) != CON_PLAYING)
replace with: if (!IS_PLAYING(d))

in modify.c: string_add():
look for:
    if (d->character && !IS_NPC(d->character))
      REMOVE_BIT(PLR_FLAGS(d->character), PLR_MAILING | PLR_WRITING);
replace with:
    if (d->character && !IS_NPC(d->character) && !IN_OLC_EDIT(d))
      REMOVE_BIT(PLR_FLAGS(d->character), PLR_MAILING | PLR_WRITING);

Note that you may not have TEDIT and should remove it from the define if you
don't or you may have more and should add it.
The fix will work even with TEDIT in the define because the PLR_WRITING flag
will be removed in cleanup_olc() anyway.

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

--
   +---------------------------------------------------------------+
   | 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