Re: [Totally Dumb] Question regarding Room_Affections

From: John Evans (evansj@HI-LINE.NET)
Date: 10/26/97

On Sun, 26 Oct 1997, Søren P. Skou wrote:

> Problem is simple, and I'm pretty sure I just overlook the obvious. But
> how on earth do I remove the RAFF_ thingie again, only thing I can see
> is that it *HAS* to run out of ticks. Which is pretty Silly, since I
> want to be able to negate light effect if you cast darkness and negate
> darkness effect if you cast light, no matter if you cast it 10000 times
> right after each other. (In which cast I would seriously look at the
> mana that person has. :)

As you said... The spell wears off after a certain duration.
[gunzip roomaff.txt.gz]
[pico roomaff.txt]      (I've never looked at the code before. :)  )

I found this:
        /* update the room affections */
        for (raff = raff_list; raff; raff = next_raff) {
                next_raff = raff->next;


                if (raff->timer <= 0) {
                        /* this room affection has expired */
                        send_to_room("\r\n", raff->room); 
                        /* remove the affection */
                        REMOVE_FROM_LIST(raff, raff_list, next)

Notice the comment "remove the affection"?
Those three lines are probably what you are looking for. :)

John Evans <>

May the source be with you.

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/08/00 PST