/
LIB3/
LIB3/D/ADMIN/
LIB3/D/ADMIN/OBJ/
LIB3/D/ADMIN/ROOM/W/
LIB3/D/HOME/
LIB3/D/HOME/CITY/ARENA/
LIB3/D/HOME/CITY/ITEMS/
LIB3/D/HOME/CITY/POSTOFFI/
LIB3/DOC/
LIB3/GLOBAL/SPECIAL/
LIB3/GLOBAL/VIRTUAL/
LIB3/NET/
LIB3/NET/CONFIG/
LIB3/NET/DAEMON/CHARS/
LIB3/NET/GOPHER/
LIB3/NET/INHERIT/
LIB3/NET/OBJ/
LIB3/NET/SAVE/
LIB3/NET/VIRTUAL/
LIB3/OBJ/B_DAY/
LIB3/OBJ/HANDLERS/TERM_TYP/
LIB3/PLAYERS/B/
LIB3/PLAYERS/N/
LIB3/ROOM/
LIB3/SAVE/
LIB3/SAVE/BOARDS/
LIB3/SAVE/ENVIRON/
LIB3/SAVE/POST/
LIB3/STD/COMMANDS/SHADOWS/
LIB3/STD/CREATOR/
LIB3/STD/DOM/
LIB3/STD/EFFECTS/
LIB3/STD/EFFECTS/HEALING/
LIB3/STD/EFFECTS/OTHER/
LIB3/STD/EFFECTS/POISONS/
LIB3/STD/ENVIRON/
LIB3/STD/GUILDS/
LIB3/STD/LIQUIDS/
LIB3/STD/ROOM/
LIB3/STD/TRIGGER/SHADOW/
LIB3/W/
LIB3/W/BANNOR/
LIB3/W/NEWSTYLE/
#pragma save_binary
/* the standard curses/diseases stuff to be inherited into the
 * living object.
 *
 * Should be pretty easy stuff.
 * Some of these functions are player specific... But the remove
 * stuff can be done on npcs too.
 *
 * Curses/diseases objects to interface with this...
 * The object should have some
 * functions defined on it called player_quit, query_remove and
 * player_start.
 * The player_quit function is called when the player quits.  This is
 * used to clean up anthing that might need cleaning up.
 * The query_remove function checks to see if the caller can remove it.
 * this should be used by the clerics remove curse to check this. Should
 * be pased the skill bonus in the appropriate skill.
 * The player_start will be called when the player logs on.
 */

mapping curses, diseases;

void    create()
{
    curses = ([ ]);
    diseases = ([ ]);
}

string  query_curse( string name )
{
    if( !curses )
	curses = ([ ]);
    return curses[ name ];
}

string  query_disease( string name )
{
    if( !diseases )
	diseases = ([ ]);
    return diseases[ name ];
}

mapping query_curses()
{
    return curses;
}
mapping query_diseases()
{
    return diseases;
}

int     add_disease( string name, string ob )
{
    if( !diseases )
	diseases = ([ ]);
    diseases[ name ] = ob;
    return 1;
}

int     remove_disease( string name )
{
    if( !diseases )
	diseases = ([ ]);
    if( !diseases[ name ] )
	return 0;
    this_player()->destruct_disease( name );
    diseases = m_delete( diseases, name );
    return 1;
}

int     remove_curse( string name )
{
    if( !curses )
	curses = ([ ]);
    if( !curses[ name ] )
	return 0;
    this_player()->destruct_curse( name );
    curses = m_delete( curses, name );
    return 1;
}

int     add_curse( string name, string ob )
{
    if( !curses )
	curses = ([ ]);
    if( curses[ name ] )
	remove_curse( name );
    curses[ name ] = ob;
    return 1;
}

void    curses_quit()
{
    if( !diseases )
	diseases = ([ ]);
    if( !curses )
	curses = ([ ]);
    filter_mapping( curses, "player_curses_quit", this_object() );
    filter_mapping( diseases, "player_curses_quit", this_object() );
}

void    player_curses_quit( object ob )
{
    ob->player_quit();
}

void reset_curses()
{
  curses = ([ ]);
}

void reset_diseases()
{
  diseases = ([ ]);
}

void    curses_start()
{
    int     i;

    if( !diseases )
	diseases = ([ ]);
    if( !curses )
	curses = ([ ]);
    filter_mapping( curses, "player_curses_start", this_object() );
    filter_mapping( diseases, "player_curses_start", this_object() );
}

int     player_curses_start( object ob )
{
    ob->player_start();
}