Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Development
Nov 28, 2018, 10:10 am
By Keirath
First Immortal
Oct 12, 2018, 12:02 pm
By GatewaySysop
Bug in do_climb( )
Jun 5, 2018, 5:31 pm
By joeyfogas
question on overland code
May 31, 2018, 10:03 am
By joeyfogas
KaVir's Protocol Snip
May 15, 2018, 7:57 pm
By joeyfogas
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

Members: 0
Guests: 23
Stats
Files
Topics
Posts
Members
Newest Member
481
3,740
19,397
632
ClarenceKe
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » Few issues in misc.c pullorpu...
Forum Rules | Mark all | Recent Posts

Few issues in misc.c pullorpush function
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Sep 10, 2009, 7:21 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,874
JoinedJul 26, 2005

in misc.c
find
   /*
    * Spell casting support added by Remcon 
    */
   if( IS_SET( obj->value[0], TRIG_CAST ) )
   {
      if( obj->value[1] <= 0 || !IS_VALID_SN( obj->value[1] ) )
      {
         bug( "%s: obj points to invalid sn [%d]", __FUNCTION__, obj->value[1] );
         return;
      }
      obj_cast_spell( obj->value[1], URANGE( 1, ( obj->value[2] > 0 ) ? obj->value[2] : ch->level, MAX_LEVEL ), ch, ch,
                      NULL );
      return;
   }

I'm not going to just plain out say how to do this one since who knows maybe you want to handle it like potions etc..., but what I did was change it so that it will lookup the slot for obj->value[1] and use that since using the straight sn for it can change as spells/skills are added. Just using the slot number is one of the easiest fixes for it I think.

find
   /*
    * Container support added by Remcon 
    */
   if( IS_SET( obj->value[0], TRIG_CONTAINER ) )
   {
      OBJ_DATA *container = NULL;

      room = get_room_index( obj->value[1] );
      if( !room )
         room = obj->in_room;
      if( !room )
      {
         bug( "%s: obj points to invalid room %d", __FUNCTION__, obj->value[1] );
         return;
      }

      for( container = ch->in_room->first_content; container; container = container->next_content )
      {
         if( container->pIndexData->vnum == obj->value[2] )
            break;
      }

You will notice that it varifies the room and then when looking for the container it looks in ch->in_room->first_content change it to room->first_content.

I'm just going through adding some better help files for leverflags on LoP and noticed all this stuff.
If I find more I'll be sure to post them.
       
Pages:<< prev 1 next >>