Room Affect Question w/code

From: Ryan Gasper or Steven Arnold (dalamar@CYBERCOM.NET)
Date: 11/16/97


        Greetings,

        I am still having some problems with the room affect code. The
problem is the spell never wears off. I've gotten some suggestions from
here but none seem to work. Here is the code that I have in the
affect_update() function. Should the code which follows theoretically
work?

        for (raff = raff_list; raff; raff = next_raff) {
          next_raff = raff->next;
          raff->timer--;
         if (raff->timer <= 0) {
           send_to_room(spell_wear_off_msg[raff->spell], raff->room);
           send_to_room("\r\n", raff->room);
           REMOVE_BIT(world[(int)raff->room].room_affections,
               raff->affection);
           REMOVE_FROM_LIST(raff, raff_list, next)
           free(raff);
           }
        }

        Another strange thing is that the spell DOES wear off after a
considerable time (I have the spell set to 2 ticks). Also, when I casted
it a  bunch of times in the same room, it seemed to work ok, but I cannot
reproduce it. Any ideas?


        _\|/_____________________________\|/_ Ryan Lane Gasper _\|/_
         /|"You will never see me cause    \/------------------\/|\
          | I'm always alone" -Ministry      dalamar@cybercom.net|
          |"The tree of liberty must be refreshed from time to   |
        _\|_time_with_the_blood_of_patriots_and_tyrants"_-ThomasJ|/_
         /|\                     -*-1997-*-                     /|\



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