On Sat, 30 Nov 1996, Ghost Shaidan wrote: > First of all THANK all of your for both your help with containers 9that > will generate another mail when i have had some sleep) and the help with > these flags, here is the current state of affairs. > I have set elves (just started with one) with the : > SET_BIT(AFF_FLAGS(ch), AFF_INFRAVISION); > and it worked ok, but i made this elf a ranger, and had him practice his > infravision spell, and forceticked my way through the duration, and LO and > BEHOLD! The aff bit was gone. *8( There is the block of code that looks like this: for (i = 0; i < MAX_SPELL_AFFECTS; i++) if (af[i].bitvector || (af[i].location != APPLY_NONE)) affect_join(victim, af+i, accum_duration, FALSE, accum_affect, FALSE); Just before that code you should add: for (i = 0; i < MAX_SPELL_AFFECTS; i++) if (AFF_FLAGGED(victim, af[i].bitvector)) { send_to_char(NOEFFECT, ch); return; } It will check if the player is affected by any bitvectors the spell includes, and if so, it will report that the spell has no effect and returns. Seems the best way to me. -- Daniel Koepke dkoepke@california.com Forgive me father, for I am sin. +-----------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://cspo.queensu.ca/~fletcher/Circle/list_faq.html | +-----------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/18/00 PST