Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
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
LoP 1.46
Author: Remcon
Submitted by: Remcon
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
Users Online
CommonCrawl, Yahoo!, Sogou

Members: 0
Guests: 11
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Bugfix Lists » SmaugFUSS Bugfix List » [Bug] mposet can cause object...
Forum Rules | Mark all | Recent Posts

[Bug] mposet can cause object short descriptions to change mid-script
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Sep 3, 2006, 11:56 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Bug: mposet can cause object short descriptions to change mid-script
Danger: Trivial - Can only happen under very restricted conditions.
Found by: Valcados
Fixed by: Valcados

---

mud.h

Locate:
extern CHAR_DATA *supermob;


Below that, add:
extern OBJ_DATA *supermob_obj;


db.c

Locate:
AUCTION_DATA *auction;  /* auctions */


Below that, add:
OBJ_DATA *supermob_obj;


mud_prog.c, release_supermob

Replace the function with:
void release_supermob(  )
{
   supermob_obj = NULL;
   char_from_room( supermob );
   char_to_room( supermob, get_room_index( ROOM_VNUM_POLY ) );
}


mud_prog.c, set_supermob

Locate:
   if( !obj )
      return;


Below that, add:
   supermob_obj = obj;


mpxset.c, do_mposet

Locate:
      STRFREE( obj->short_descr );
      obj->short_descr = STRALLOC( arg3 );


Below that, add:
      if( obj == supermob_obj )
      {
         STRFREE( supermob->short_descr );
         supermob->short_descr = QUICKLINK( obj->short_descr );
      }


The conditions by which an object processing a program can have the short description changed are pretty narrow. The object itself would have to call do_mposet and would then need to be altering its short description field. Doing so under these specific circumstances would cause the supermob to act out for the object under its old short description. Changing the short description by any other means is highly unlikely to affect the supermob.
       
Pages:<< prev 1 next >>