Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, DotBot, Yahoo!, Majestic-12, Google, Yandex

Members: 0
Guests: 16
Stats
Files
Topics
Posts
Members
Newest Member
477
3,706
19,240
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Bugfix Lists » LoP Bugfix List » LoP 1.31 Issues
Forum Rules | Mark all | Recent Posts

LoP 1.31 Issues
< Newer Topic :: Older Topic > do_gift and do_bodybag issues

Pages:<< prev 1 next >>
Post is unread #1 Oct 3, 2008, 12:58 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,866
JoinedJul 26, 2005

Since there isn't a LoP main forum site anymore figured I'd post this here for everyone :)

In act_wiz.c function do_bodybag
find
   for( obj = first_corpse; obj; obj = obj->next_corpse )
   {
      if( obj->pIndexData->vnum != OBJ_VNUM_CORPSE_PC || str_cmp( buf2, obj->short_descr ) )
         continue;
      pager_printf( ch, "\r\n&P%sCorpse: &w%-12.12s %2s ",
         bag ? "Bagging " : "", capitalize( arg1 ),
         is_obj_stat( obj, ITEM_CLANCORPSE ) ? "&RPK" : "" );
      if( obj->in_room )
         pager_printf( ch, "&PIn Room: &w%-22.22s &P[&w%5d&P] ", obj->in_room->area->name, obj->in_room->vnum );
      else if( obj->in_obj )
         pager_printf( ch, "&PIn Obj:  &w%-22.22s &P[&w%5d&P] ", obj->in_obj->short_descr, obj->in_obj->pIndexData->vnum );
      else if( obj->carried_by )
         pager_printf( ch, "&PCarried: &w%-30.30s ", obj->carried_by->name );
      else
         pager_printf( ch, "&P%-39.39s ", "Unknown Location!!!" );
      pager_printf( ch, "&PTimer: &w%d\r\n", obj->timer );

      /* Maybe we should only move the ones in a room */
      if( bag && obj->in_room )
      {
         obj = obj_to_char( obj, ch );
         obj->timer = -1;
         save_char_obj( ch );
      }
   }

change it to this
   for( obj = first_corpse; obj; obj = obj->next_corpse )
   {
      if( obj->pIndexData->vnum != OBJ_VNUM_CORPSE_PC || str_cmp( buf2, obj->short_descr ) )
         continue;
      found = true;
      pager_printf( ch, "\r\n&P%sCorpse: &w%-12.12s %2s ",
         bag ? "Bagging " : "", capitalize( arg1 ),
         is_obj_stat( obj, ITEM_CLANCORPSE ) ? "&RPK" : "" );
      if( obj->in_room )
         pager_printf( ch, "&PIn Room: &w%-22.22s &P[&w%5d&P] ", obj->in_room->area->name, obj->in_room->vnum );
      else if( obj->in_obj )
         pager_printf( ch, "&PIn Obj:  &w%-22.22s &P[&w%5d&P] ", obj->in_obj->short_descr, obj->in_obj->pIndexData->vnum );
      else if( obj->carried_by )
         pager_printf( ch, "&PCarried: &w%-30.30s ", obj->carried_by->name );
      else
         pager_printf( ch, "&P%-39.39s ", "Unknown Location!!!" );
      pager_printf( ch, "&PTimer: &w%d\r\n", obj->timer );

      /* Maybe we should only move the ones in a room */
      if( bag && obj->in_room )
      {
         obj_from_room( obj );
         obj = obj_to_char( obj, ch );
         obj->timer = -1;
         save_char_obj( ch );
      }
   }

This makes it so bodybag will work correctly.

in act_obj.c function do_gift
find
   obj = obj_to_char( obj, victim );
   if( !is_npc( ch ) && !char_died( ch ) )
      save_char_obj( ch );
   if( !is_npc( victim ) && !char_died( victim ) )
      save_char_obj( victim );

change it to this
   obj_from_char( obj );
   obj = obj_to_char( obj, victim );
   if( !is_npc( ch ) && !char_died( ch ) )
      save_char_obj( ch );
   if( !is_npc( victim ) && !char_died( victim ) )
      save_char_obj( victim );

This will make gift work correctly.

The problem with these and maybe a few others was I at one point had obj_to_char, obj_to_room, etc... remove the old info and looks like at some point I stopped it there and forgot to update it in a few places to remove from old pointers.
       
Pages:<< prev 1 next >>