src/genscript.c
SCRIPT_CONT ch_script_cont(struct char_data* ch) {
	SCRIPT_CONT x;

	x.write_level = 0;

	if (!ch) {
		x.data = NULL;
		x.cont_id = 0;
		x.cont_type = SCRIPT_NULL;
		return x;
	}

	x.write_level = MUT_R|MUT_W;
	x.data = ch;
	x.cont_id = GET_ID(ch);
	
	if (!IS_NPC(ch)) 
		x.cont_type = SCRIPT_PLAYER;
	else
		x.cont_type = SCRIPT_MOBILE;
	return x;
}
/**
 * Convert a pointer to a char to a script reference to it
 */
Convert a pointer to a char to a script reference to it
Convert a pointer to a char to a script reference to it
SCRIPT_CONT ch_script_cont(struct char_data* ch) {
	SCRIPT_CONT x;
	x.write_level = 0;
	if (!ch) {
		x.data = NULL;
		x.cont_id = 0;
		x.cont_type = SCRIPT_NULL;
		return x;
	}
	x.write_level = MUT_R|MUT_W;
	x.data = ch;
	x.cont_id = GET_ID(ch);
	if (!IS_NPC(ch)) 
		x.cont_type = SCRIPT_PLAYER;
	else
		x.cont_type = SCRIPT_MOBILE;
	return x;
}
SCRIPT_CONT ch_script_cont ( struct char_data * ch ) { SCRIPT_CONT x ; x . write_level = 0 ; if ( ! ch ) { x . data = NULL ; x . cont_id = 0 ; x . cont_type = SCRIPT_NULL ; return x ; } x . write_level = MUT_R | MUT_W ; x . data = ch ; x . cont_id = GET_ID ( ch ) ; if ( ! IS_NPC ( ch ) ) x . cont_type = SCRIPT_PLAYER ; else x . cont_type = SCRIPT_MOBILE ; return x ; }
Convert a pointer to a char to a script reference to it
Convert a pointer to a char to a script reference to it