~case/dbns

60200740f570476740f7f4a21f48d4baa5f2ecb2 — case 4 years ago 5578f11
formatting and worth
6 files changed, 242 insertions(+), 326 deletions(-)

M src/act_obj.c
M src/build.c
M src/colorize.c
M src/db.c
M src/mud.h
M src/save.c
M src/act_obj.c => src/act_obj.c +6 -91
@@ 69,9 69,6 @@ sh_int get_obj_resistance( OBJ_DATA *obj )
	if ( IS_OBJ_STAT( obj, ITEM_INVENTORY ) )
		resist += 20;

	/* okay... let's add some bonus/penalty for item level... */
	//    resist += (obj->level / 10) - 2;

	/* and lasty... take armor or weapon's condition into consideration */
	if (obj->item_type == ITEM_ARMOR || obj->item_type == ITEM_WEAPON)
		resist += (obj->value[0] / 2) - 2;


@@ 202,30 199,6 @@ void get_obj( CHAR_DATA *ch, OBJ_DATA *obj, OBJ_DATA *container )
		 *  by more than 1.0.  Use less than 1.0 for ogre, orc, troll, etc.
		 *  (Ie: a penalty rather than a bonus)
		 */
#ifdef GOLD_MULT

		switch (ch->race)
		{
			case(1): amt *= 1.1;
				break; /* elf */
			case(2): amt *= 0.97;
				break; /* dwarf */
			case(3): amt *= 1.02;
				break; /* halfling */
			case(4): amt *= 1.08;
				break; /* pixie */
			case(6): amt *= 0.92;
				break; /* half-ogre */
			case(7): amt *= 0.94;
				break; /* half-orc */
			case(8): amt *= 0.90;
				break; /* half-troll */
			case(9): amt *= 1.04;
				break; /* half-elf */
			case(10): amt *= 1.06;
				break; /* gith */
		}
#endif

		ch->gold += amt;
		extract_obj( obj );


@@ 373,10 346,7 @@ void do_get( CHAR_DATA *ch, char *argument )
			else
			{
				save_house_by_vnum(ch->in_room->vnum); /* House Object Saving */

//				if ( IS_SET( sysdata.save_flags, SV_GET ) )
//				if ( IS_SET( sysdata.save_flags, SV_GIVE ) )
					save_char_obj( ch );
				save_char_obj( ch );
			}
		}
	}


@@ 620,8 590,6 @@ void do_get( CHAR_DATA *ch, char *argument )
			        */
			if ( container->item_type == ITEM_CORPSE_PC )
				write_corpses( NULL, container->short_descr + 14, NULL );
//			if ( found && IS_SET( sysdata.save_flags, SV_GET ) )
//			if ( found && IS_SET( sysdata.save_flags, SV_GIVE ) )
                        if ( found )
				save_char_obj( ch );
		}


@@ 685,8 653,6 @@ void do_put( CHAR_DATA *ch, char *argument )
		return ;
	}

//	if ( !container->carried_by && IS_SET(sysdata.save_flags, SV_PUT) )
//	if ( !container->carried_by && IS_SET(sysdata.save_flags, SV_GIVE) )
	if ( !container->carried_by )
		save_char = true;



@@ 905,8 871,6 @@ void do_put( CHAR_DATA *ch, char *argument )
					save_clan_storeroom(ch, clan);
		}
	}

	return ;
}




@@ 958,47 922,7 @@ void do_drop( CHAR_DATA *ch, char *argument )
		send_to_char( "Someone tells you, 'No littering here!'\n\r", ch );
		return ;
	}
/*
	if ( number > 0 )
	{
		if ( !str_cmp( arg, "coins" ) || !str_cmp( arg, "coin" ) || !str_cmp( arg, "zeni" ))
		{
			if ( ch->gold < number )
			{
				send_to_char( "You haven't got that many zeni.\n\r", ch );
				return ;
			}

			ch->gold -= number;

			for ( obj = ch->in_room->first_content; obj; obj = obj_next )
			{
				obj_next = obj->next_content;

				switch ( obj->pIndexData->vnum )
				{
					case OBJ_VNUM_MONEY_ONE:
						number += 1;
						extract_obj( obj );
						break;

					case OBJ_VNUM_MONEY_SOME:
						number += obj->value[0];
						extract_obj( obj );
						break;
				}
			}

			act( AT_ACTION, "$n drops some zeni.", ch, NULL, NULL, TO_ROOM );
			obj_to_room( create_money( number ), ch->in_room );
			save_house_by_vnum(ch->in_room->vnum);
			send_to_char( "You let the zeni slip from your hand.\n\r", ch );
				save_char_obj( ch );
			return ;
		}

	}
*/
	if ( number <= 1 && str_cmp( arg, "all" ) && str_prefix( "all.", arg ) )
	{
		/* 'drop obj' */


@@ 1122,10 1046,7 @@ void do_drop( CHAR_DATA *ch, char *argument )
	}

	save_house_by_vnum(ch->in_room->vnum); /* House Object Saving */

//	if ( IS_SET( sysdata.save_flags, SV_DROP ) )
//	if ( IS_SET( sysdata.save_flags, SV_GIVE ) )
		save_char_obj( ch );	/* duping protector */
	save_char_obj( ch );	/* duping protector */
	return ;
}



@@ 1204,11 1125,8 @@ void do_give( CHAR_DATA *ch, char *argument )
		act( AT_ACTION, "$n gives $N some zeni.", ch, NULL, victim, TO_NOTVICT );
		act( AT_ACTION, "You give $N some zeni.", ch, NULL, victim, TO_CHAR );
		mprog_bribe_trigger( victim, ch, amount );
//		if ( IS_SET( sysdata.save_flags, SV_GIVE ) && !char_died(ch) )
                if ( !char_died( ch ) )
			save_char_obj(ch);
//		if ( IS_SET( sysdata.save_flags, SV_RECEIVE ) && !char_died(victim) )
//		if ( IS_SET( sysdata.save_flags, SV_GIVE ) && !char_died(victim) )
                if ( !char_died( victim ) )
			save_char_obj(victim);
		return ;


@@ 1275,13 1193,10 @@ void do_give( CHAR_DATA *ch, char *argument )
	act(AT_ACTION, "You give $p to $N.", ch, obj, victim, TO_CHAR );
	obj = obj_to_char(obj, victim);
	mprog_give_trigger(victim, ch, obj);
//	if ( IS_SET(sysdata.save_flags, SV_GIVE) && !char_died(ch) )
                if ( !char_died( ch ) )
		save_char_obj(ch);
//	if ( IS_SET(sysdata.save_flags, SV_RECEIVE) && !char_died(victim) )
//	if ( IS_SET(sysdata.save_flags, SV_GIVE) && !char_died(victim) )
                if ( !char_died( victim ) )
		save_char_obj(victim);
	if ( !char_died( ch ) )
	    save_char_obj(ch);
	if ( !char_died( victim ) )
	    save_char_obj(victim);
	return ;
}


M src/build.c => src/build.c +13 -12
@@ 1015,7 1015,7 @@ do_mset(CHAR_DATA * ch, char *argument)
		break;
	case SUB_MOB_DESC:
		if (!ch->dest_buf) {
			send_to_char("Fatal error: report to Goku.\n\r", ch);
			send_to_char("Fatal error: report to Admin.\n\r", ch);
			bug("do_mset: sub_mob_desc: NULL ch->dest_buf", 0);
			ch->substate = SUB_NONE;
			return;


@@ 1095,7 1095,7 @@ do_mset(CHAR_DATA * ch, char *argument)
			send_to_char("Syntax: mset <victim> <field>  <value>\n\r", ch);
		send_to_char("\n\r", ch);
		send_to_char("Field being one of:\n\r", ch);
		send_to_char("  str int spd con lck sex class\n\r", ch);
		send_to_char("  str int spd con lck sex worth class\n\r", ch);
		send_to_char("  zeni hp mana move practice align race\n\r", ch);
		send_to_char("  hitroll damroll damage affected level\n\r", ch);
		send_to_char("  thirst drunk full blood flags\n\r", ch);


@@ 1141,15 1141,6 @@ do_mset(CHAR_DATA * ch, char *argument)
	if (lockvictim)
		ch->dest_buf = victim;

	/*
          if (!IS_NPC(victim) && ch->level < LEVEL_SUPREME && ch != victim)
          {
          send_to_char("Use GODSET to change a players stats\n\r", ch);
          ch->dest_buf = NULL;
          return;
          }
        */

	minattr = 1;
	maxattr = 500;



@@ 1565,11 1556,21 @@ do_mset(CHAR_DATA * ch, char *argument)
			victim->pIndexData->sex = value;
		return;
	}
	if (!str_cmp(arg2, "worth")) {
		if (!can_mmodify(ch, victim))
			return;
		if (value >= 0 || value <= 100) {
		    victim->worth = value;
		    if (IS_NPC(victim) && xIS_SET(victim->act, ACT_PROTOTYPE))
			    victim->pIndexData->worth = value;
		} else {
		  send_to_char("Worth range is 0 to 100.\n\r", ch);
		}
	}
	if (!str_cmp(arg2, "class")) {
		if (!can_mmodify(ch, victim))
			return;


		if (IS_NPC(victim)) {
			if (value >= MAX_NPC_CLASS || value < 0) {
				ch_printf(ch, "NPC Class range is 0 to %d.\n", MAX_NPC_CLASS);

M src/colorize.c => src/colorize.c +218 -221
@@ 1,7 1,7 @@
/****************************************************************************
 * [S]imulated [M]edieval [A]dventure multi[U]ser [G]ame      |   \\._.//   *
 * -----------------------------------------------------------|   (0...0)   *
 * SMAUG 1.4 (C) 1994, 1995, 1996, 1998  by Derek Snider      |    ).:.(    *
 * SMAUG 1.4 (C) 1994, 1995, 1996, 1998  by Derek Snider      |   ).:.(   *
 * -----------------------------------------------------------|    {o o}    *
 * SMAUG code team: Thoric, Altrag, Blodkai, Narn, Haus,      |   / ' ' \   *
 * Scryn, Rennard, Swordbearer, Gorog, Grishnakh, Nivek,      |~'~.VxvxV.~'~*


@@ 24,235 24,232 @@

struct at_color_type at_color_table[AT_MAXCOLOR];

void load_colors( void )
void load_colors(void)
{
  extern char strArea[MAX_INPUT_LENGTH];
  extern FILE *fpArea;
  char buf[20];
  int at;
	extern char strArea[MAX_INPUT_LENGTH];
	extern FILE *fpArea;
	char buf[20];
	int at;
  
  for (at = 0; at < AT_MAXCOLOR; ++at)
  {
    sprintf(buf, "%d", at);
    at_color_table[at].name = str_dup(buf);
    at_color_table[at].def_color = AT_GREY;
  }
  strcpy(strArea, COLOR_FILE);
  if (!(fpArea = fopen(COLOR_FILE, "r")))
  {
    bug("Load_colors: can't open color file -- bland city time!");
    return;
  }
  for (;;)
  {
    at = (feof(fpArea) ? -1 : fread_number(fpArea));
    if (at < 0)
      break;
    if (at < AT_COLORBASE || at >= AT_TOPCOLOR)
    {
      bug("Load_colors: color %d invalid.", at);
      fread_to_eol(fpArea);
      continue;
    }
    at -= AT_COLORBASE;
    DISPOSE(at_color_table[at].name);
    at_color_table[at].name = fread_string_nohash(fpArea);
    at_color_table[at].def_color = fread_number(fpArea);
  }
  fclose(fpArea);
  fpArea = NULL;
  return;
	for (at = 0; at < AT_MAXCOLOR; ++at)
	{
		sprintf(buf, "%d", at);
		at_color_table[at].name = str_dup(buf);
		at_color_table[at].def_color = AT_GREY;
	}
	strcpy(strArea, COLOR_FILE);
	if (!(fpArea = fopen(COLOR_FILE, "r")))
	{
		bug("Load_colors: can't open color file -- bland city time!");
		return;
	}
	for (;;)
	{
		at = (feof(fpArea) ? -1 : fread_number(fpArea));
		if (at < 0)
			break;
		if (at < AT_COLORBASE || at >= AT_TOPCOLOR)
		{
			bug("Load_colors: color %d invalid.", at);
			fread_to_eol(fpArea);
			continue;
		}
		at -= AT_COLORBASE;
		DISPOSE(at_color_table[at].name);
		at_color_table[at].name = fread_string_nohash(fpArea);
		at_color_table[at].def_color = fread_number(fpArea);
	}
	fclose(fpArea);
	fpArea = NULL;
}

void save_colors( void )
void save_colors(void)
{
  FILE *fp;
  int at;
	FILE *fp;
	int at;
  
  if (!(fp = fopen(COLOR_FILE, "w")))
  {
    bug("Save_colors: can't open color file.");
    return;
  }
  for (at = 0; at < AT_MAXCOLOR; ++at)
    fprintf(fp, "%d %s~ %d\n", at+AT_COLORBASE, at_color_table[at].name,
    		at_color_table[at].def_color);
  fprintf(fp, "-1\n");
  fclose(fp);
  return;
	if (!(fp = fopen(COLOR_FILE, "w")))
	{
		bug("Save_colors: can't open color file.");
		return;
	}
	for (at = 0; at < AT_MAXCOLOR; ++at)
		fprintf(fp, "%d %s~ %d\n", at+AT_COLORBASE, at_color_table[at].name,
			at_color_table[at].def_color);
	fprintf(fp, "-1\n");
	fclose(fp);
}

void do_colorize( CHAR_DATA *ch, char *argument )
void do_colorize(CHAR_DATA *ch, char *argument)
{
#define MAX_COLOR 16
  static const char colors[MAX_COLOR] = "xrgObpcwzRGYBPCW";
  static const char *color_names[MAX_COLOR] =
    { "black", "blood", "dgreen", "orange", "dblue", "purple", "cyan",
      "grey", "dgrey", "red", "green", "yellow", "blue", "pink", "lblue",
      "white" };
  char arg[MAX_INPUT_LENGTH], *a;
  int color;
  int at;
  bool blink = false;
  CHAR_DATA *victim;
  bool def = false;
  int level = get_trust(ch);
	static const char colors[MAX_COLOR] = "xrgObpcwzRGYBPCW";
	static const char *color_names[MAX_COLOR] =
		{ "black", "blood", "dgreen", "orange", "dblue", "purple", "cyan",
		  "grey", "dgrey", "red", "green", "yellow", "blue", "pink", "lblue",
		  "white" };
	char arg[MAX_INPUT_LENGTH], *a;
	int color;
	int at;
	bool blink = false;
	CHAR_DATA *victim;
	bool def = false;
	int level = get_trust(ch);
  
  argument = one_argument(argument, arg);
  if (level >= LEVEL_SUB_IMPLEM &&
      (!str_cmp(arg, "def") || !str_cmp(arg, "default")))
  {
    def = true;
    argument = one_argument(argument, arg);
    victim = NULL;
  }
  else if (level >= LEVEL_SUB_IMPLEM &&
           (victim = get_char_room(ch, arg)) != NULL)
  {
    if (level < get_trust(victim))
    {
      send_to_char("They might not like that.\n\r", ch);
      return;
    }
    argument = one_argument(argument, arg);
  }
  else
    victim = ch;
  if (!def && IS_NPC(victim))
  {
    send_to_char("Not on NPCs.\n\r", ch);
    return;
  }
  if (!*arg)
  {
    for (at = 0; at < AT_MAXCOLOR; ++at)
    {
      if (def || victim->pcdata->colorize[at] == -1)
        color = at_color_table[at].def_color;
      else
        color = victim->pcdata->colorize[at];
      if (color >= AT_BLINK)
      {
        blink = true;
        color -= AT_BLINK;
      }
      else
        blink = false;
      pager_printf_color(ch, "%-8s: %s%c%-15s&D",
      				at_color_table[at].name,
      				(blink ? "+}" : " &"), colors[color],
      				color_names[color]);
      if (at%3 == 2)
        send_to_pager("\n\r", ch);
    }
    if (at%3 != 0)
      send_to_pager("\n\r", ch);
    send_to_pager("\n\rValid colors are:\n\r", ch);
    for (color = 0; color < MAX_COLOR; ++color)
    {
      if (color)
        set_pager_color(color, ch);
      else
        set_pager_color(AT_PLAIN, ch);
      pager_printf(ch, "%-9s", color_names[color]);
      if (color%8 == 7)
        send_to_pager("\n\r", ch);
    }
    if (color%8 != 0)
      send_to_pager("\n\r", ch);
    set_pager_color(AT_GREY + AT_BLINK, ch);
    send_to_pager("\n\rBlinking ", ch);
    set_pager_color(AT_GREY, ch);
    send_to_pager("can be specified by prefixing the color name with a +."
    			"\n\r", ch);
    set_pager_color(AT_PLAIN, ch);
    return;
  }
  for (at = 0; at < AT_MAXCOLOR; ++at)
    if (!str_prefix(arg, at_color_table[at].name))
      break;
  if (at == AT_MAXCOLOR)
  {
    send_to_char("Not a settable color.\n\r", ch);
    return;
  }
  argument = one_argument(argument, arg);
  if (!*arg)
  {
    send_to_char("Set it to what color?\n\r", ch);
    return;
  }
  if (!str_cmp(arg, "def") || !str_cmp(arg, "default"))
  {
    if (def)
      send_to_char("That *IS* the default!\n\r", ch);
    else
    {
      victim->pcdata->colorize[at] = -1;
      send_to_char("Color set to default.\n\r", ch);
    }
    return;
  }
  if (*arg == '+')
  {
    a = arg+1;
    if (!*a)
    {
      if (def)
      {
        if (at_color_table[at].def_color >= AT_BLINK)
        {
          at_color_table[at].def_color -= AT_BLINK;
          send_to_char("Default color will no longer blink.\n\r", ch);
        }
        else
        {
          at_color_table[at].def_color += AT_BLINK;
          send_to_char("Default color will now blink.\n\r", ch);
        }
        save_colors();
      }
      else
      {
        if (victim->pcdata->colorize[at] == -1)
          victim->pcdata->colorize[at] = at_color_table[at].def_color;
        if (victim->pcdata->colorize[at] >= AT_BLINK)
        {
          victim->pcdata->colorize[at] -= AT_BLINK;
          send_to_char("Color will no longer blink.\n\r", ch);
        }
        else
        {
          victim->pcdata->colorize[at] += AT_BLINK;
          send_to_char("Color will now blink.\n\r", ch);
        }
      }
      return;
    }
    blink = true;
  }
  else
    a = arg;
  for (color = 0; color < MAX_COLOR; ++color)
    if (!str_prefix(a, color_names[color]))
      break;
  if (color == MAX_COLOR)
  {
    send_to_char("Invalid color name.\n\r", ch);
    return;
  }
  if (blink)
    color += AT_BLINK;
  if (def)
  {
    at_color_table[at].def_color = color;
    send_to_char("Default color set.\n\r", ch);
    save_colors();
  }
  else
  {
    victim->pcdata->colorize[at] = color;
    send_to_char("Color set.\n\r", ch);
  }
  return;
	argument = one_argument(argument, arg);
	if (level >= LEVEL_SUB_IMPLEM &&
	    (!str_cmp(arg, "def") || !str_cmp(arg, "default")))
	{
		def = true;
		argument = one_argument(argument, arg);
		victim = NULL;
	}
	else if (level >= LEVEL_SUB_IMPLEM &&
		 (victim = get_char_room(ch, arg)) != NULL)
	{
		if (level < get_trust(victim))
		{
			send_to_char("They might not like that.\n\r", ch);
			return;
		}
		argument = one_argument(argument, arg);
	}
	else
		victim = ch;
	if (!def && IS_NPC(victim))
	{
		send_to_char("Not on NPCs.\n\r", ch);
		return;
	}
	if (!*arg)
	{
		for (at = 0; at < AT_MAXCOLOR; ++at)
		{
			if (def || victim->pcdata->colorize[at] == -1)
				color = at_color_table[at].def_color;
			else
				color = victim->pcdata->colorize[at];
			if (color >= AT_BLINK)
			{
				blink = true;
				color -= AT_BLINK;
			}
			else
				blink = false;
			pager_printf_color(ch, "%-8s: %s%c%-15s&D",
					   at_color_table[at].name,
					   (blink ? "+}" : " &"), colors[color],
					   color_names[color]);
			if (at%3 == 2)
				send_to_pager("\n\r", ch);
		}
		if (at%3 != 0)
			send_to_pager("\n\r", ch);
		send_to_pager("\n\rValid colors are:\n\r", ch);
		for (color = 0; color < MAX_COLOR; ++color)
		{
			if (color)
				set_pager_color(color, ch);
			else
				set_pager_color(AT_PLAIN, ch);
			pager_printf(ch, "%-9s", color_names[color]);
			if (color%8 == 7)
				send_to_pager("\n\r", ch);
		}
		if (color%8 != 0)
			send_to_pager("\n\r", ch);
		set_pager_color(AT_GREY + AT_BLINK, ch);
		send_to_pager("\n\rBlinking ", ch);
		set_pager_color(AT_GREY, ch);
		send_to_pager("can be specified by prefixing the color name with a +."
			      "\n\r", ch);
		set_pager_color(AT_PLAIN, ch);
		return;
	}
	for (at = 0; at < AT_MAXCOLOR; ++at)
		if (!str_prefix(arg, at_color_table[at].name))
			break;
	if (at == AT_MAXCOLOR)
	{
		send_to_char("Not a settable color.\n\r", ch);
		return;
	}
	argument = one_argument(argument, arg);
	if (!*arg)
	{
		send_to_char("Set it to what color?\n\r", ch);
		return;
	}
	if (!str_cmp(arg, "def") || !str_cmp(arg, "default"))
	{
		if (def)
			send_to_char("That *IS* the default!\n\r", ch);
		else
		{
			victim->pcdata->colorize[at] = -1;
			send_to_char("Color set to default.\n\r", ch);
		}
		return;
	}
	if (*arg == '+')
	{
		a = arg+1;
		if (!*a)
		{
			if (def)
			{
				if (at_color_table[at].def_color >= AT_BLINK)
				{
					at_color_table[at].def_color -= AT_BLINK;
					send_to_char("Default color will no longer blink.\n\r", ch);
				}
				else
				{
					at_color_table[at].def_color += AT_BLINK;
					send_to_char("Default color will now blink.\n\r", ch);
				}
				save_colors();
			}
			else
			{
				if (victim->pcdata->colorize[at] == -1)
					victim->pcdata->colorize[at] = at_color_table[at].def_color;
				if (victim->pcdata->colorize[at] >= AT_BLINK)
				{
					victim->pcdata->colorize[at] -= AT_BLINK;
					send_to_char("Color will no longer blink.\n\r", ch);
				}
				else
				{
					victim->pcdata->colorize[at] += AT_BLINK;
					send_to_char("Color will now blink.\n\r", ch);
				}
			}
			return;
		}
		blink = true;
	}
	else
		a = arg;
	for (color = 0; color < MAX_COLOR; ++color)
		if (!str_prefix(a, color_names[color]))
			break;
	if (color == MAX_COLOR)
	{
		send_to_char("Invalid color name.\n\r", ch);
		return;
	}
	if (blink)
		color += AT_BLINK;
	if (def)
	{
		at_color_table[at].def_color = color;
		send_to_char("Default color set.\n\r", ch);
		save_colors();
	}
	else
	{
		victim->pcdata->colorize[at] = color;
		send_to_char("Color set.\n\r", ch);
	}
}

M src/db.c => src/db.c +1 -1
@@ 3130,6 3130,7 @@ clear_char(CHAR_DATA * ch)
	ch->max_train = 4;
	ch->hit = 100;
	ch->max_hit = 100;
	ch->worth = 100;
	ch->mana = 100;
	ch->max_mana = 100;
	ch->max_energy = 1;


@@ 3165,7 3166,6 @@ clear_char(CHAR_DATA * ch)
	ch->inter_editing = NULL;	/* BUILD INTERFACE */
	ch->inter_editing_vnum = -1;	/* BUILD INTERFACE */
	ch->inter_substate = SUB_NORTH;	/* BUILD INTERFACE */
	return;
}



M src/mud.h => src/mud.h +2 -0
@@ 2512,6 2512,7 @@ struct mob_index_data {
	char   *long_descr;
	char   *description;
	int 	vnum;
	int     worth;
	sh_int 	count;
	sh_int 	killed;
	sh_int 	sex;


@@ 2644,6 2645,7 @@ struct char_data {
	sh_int 	wait;
	sh_int 	hit;
	sh_int 	max_hit;
	int     worth;
	int 	mana;
	int 	max_mana;
	sh_int 	max_energy;

M src/save.c => src/save.c +2 -1
@@ 315,7 315,7 @@ fwrite_char (CHAR_DATA * ch, FILE * fp)
     fprintf (fp, "Room           %d\n",
       (ch->in_room == get_room_index (ROOM_VNUM_LIMBO)
	 && ch->was_in_room) ? ch->was_in_room->vnum : ch->in_room->vnum);

     fprintf (fp, "Worth %d\n", ch->worth);
     fprintf (fp, "HpManaMove     %d %d %d %d %d %d\n",
       ch->hit, ch->max_hit, ch->mana, ch->max_mana, ch->move,
       ch->max_move);


@@ 2171,6 2171,7 @@ fread_char (CHAR_DATA * ch, FILE * fp, bool preload)
	       break;

	  case 'W':
	       KEY ("Worth", ch->worth, fread_number (fp));
	       KEY ("Weight", ch->weight, fread_number (fp));
	       if (!strcmp (word, "Weapon")) {
		    int sn;