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, Yandex

Members: 0
Guests: 6
Stats
Files
Topics
Posts
Members
Newest Member
481
3,735
19,370
618
Micheal64X
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Bugfix Lists » AFKMud Bugfix List » AFKMud Bug Archive » [Bug] Despair not protected a...
Forum Rules | Mark all | Recent Posts

[Bug] Despair not protected against targets who might flee the room
< Newer Topic :: Older Topic > AFKMud 1.64

Pages:<< prev 1 next >>
Post is unread #1 Jan 9, 2005, 12:59 pm   Last edited Nov 13, 2005, 11:58 am by Samson
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

Bug: Despair spell is not protected against targets who might flee the room.
Discovered in: AFKMud 1.64
Danger: High - Potential data corruption + potential game crash.
Found by: Samson
Fixed by: Samson

---

magic.c, locate the following:

SPELLF spell_despair( int sn, int level, CHAR_DATA *ch, void *vo )
{
   CHAR_DATA *vch;
   bool despair = false;

   /*
    * Add check for proper bard instrument in future 
    */
   for( vch = ch->in_room->first_person; vch; vch = vch->next_in_room )
   {
      if( IS_NPC( vch ) )
         continue;

      if( !is_same_char_map( ch, vch ) )
         continue;
      else
      {
         if( saves_spell_staff( level, vch ) )
            continue;
         else
         {
            interpret( vch, "flee" );
            despair = true;
         }
      }
   }
   if( despair )
      send_to_char( "&[magic]Your magic strikes fear into the hearts of the occupants!\n\r", ch );
   else
      send_to_char( "&[magic]You weave your magic, but there was no noticable affect.\n\r", ch );
   return rNONE;
}


Replace with:

SPELLF spell_despair( int sn, int level, CHAR_DATA *ch, void *vo )
{
   CHAR_DATA *vch, *vch_next;
   bool despair = false;

   /*
    * Add check for proper bard instrument in future 
    */
   for( vch = ch->in_room->first_person; vch; vch = vch_next )
   {
      vch_next = vch->next_in_room;

      if( IS_NPC( vch ) )
         continue;

      if( !is_same_map( ch, vch ) )
         continue;
      else
      {
         if( saves_spell_staff( level, vch ) )
            continue;
         else
         {
            interpret( vch, "flee" );
            despair = true;
         }
      }
   }
   if( despair )
      send_to_char( "&[magic]Your magic strikes fear into the hearts of the occupants!\n\r", ch );
   else
      send_to_char( "&[magic]You weave your magic, but there was no noticable affect.\n\r", ch );
   return rNONE;
}


Another classic example. The spell can cause mobs to flee the room, which will result in their pointers being unlinked from the room.
       
Pages:<< prev 1 next >>