[AFFECTS] Decreasing Timer

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


        I am writing a small function that will take a spells duration and
set it to 0. Its prototyped as such:
void affect_decrease(struct char_data *ch, int type, int affect)
where type is the spell_num and affect is the number of the affect to
decrease. For example
in Magic.c:
  SPELL_XXX:
    af[0].bitvector = AFF_XXX;
    af[0].duration = 5;
    af[1].bitvector = AFF_XXX2;
    af[1].duration = 5;

        What the function will do is set the duration of the bitvector to
0 according to what was passed to it. (affect = 1 here so we are setting
af[1].duration to 0). My question, is how do I access the different
durations for the same spell. I had something like
  if (hjp->type == type)
   hjp[affect]->duration = 0;

   This obviously does not work, so anyone know how I can manipulate the
different durations in the same spell?


        _\|/_____________________________\|/_ 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