Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, DotBot, Bing

Members: 0
Guests: 14
Stats
Files
Topics
Posts
Members
Newest Member
481
3,739
19,386
621
KellieBusb
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » noimmune not checked everywhe...
Forum Rules | Mark all | Recent Posts

noimmune not checked everywhere it should be
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 May 23, 2006, 7:15 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,874
JoinedJul 26, 2005

In a quick look over magic.c you will see victim->immune being checked for RIS_MAGIC and then doing the immune_casting message if they are immune to magic. At the same time its checking to see if victim is immune to magic it should be making sure they don't have RIS_MAGIC on noimmune. A good example of how this is used can be found in
fight.c
/*
 * Calculate damage based on resistances, immunities and suceptibilities
 *					-Thoric
 */
short ris_damage( CHAR_DATA * ch, short dam, int ris )
{
   short modifier;

   modifier = 10;
   if( IS_SET( ch->immune, ris ) && !IS_SET( ch->no_immune, ris ) )
      modifier -= 10;
   if( IS_SET( ch->resistant, ris ) && !IS_SET( ch->no_resistant, ris ) )
      modifier -= 2;
   if( IS_SET( ch->susceptible, ris ) && !IS_SET( ch->no_susceptible, ris ) )
   {
      if( IS_NPC( ch ) && IS_SET( ch->immune, ris ) )
         modifier += 0;
      else
         modifier += 2;
   }
   if( modifier <= 0 )
      return -1;
   if( modifier == 10 )
      return dam;
   return ( dam * modifier ) / 10;
}

of course as you can tell its not checking noimmune on the if check above modifier += 0 either lol.
Just thought I'd pass along the info so no one forgets to fix the oversight at some point and time later. :)
       
Post is unread #2 May 27, 2006, 10:44 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

Perhaps you would care to elaborate on some examples of where this is happening for those of us with so much on our plates we don't have time to troll through the code to find them? :)
       
Pages:<< prev 1 next >>