version 1.74 | | version 1.75 |
---|
| | |
/* | | /* |
* static char *rcsid_c_wiz_c = | | * static char *rcsid_c_wiz_c = |
* "$Id: c_wiz.c,v 1.74 2005/10/31 20:58:06 akirschbaum Exp $"; | | * "$Id: c_wiz.c,v 1.75 2005/11/16 08:16:08 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
pl = get_other_player_from_name(op, params); | | pl = get_other_player_from_name(op, params); |
if (!pl) return 1; | | if (!pl) return 1; |
| | |
i=find_free_spot(op->arch,op->map,op->x,op->y,1,9); | | i=find_free_spot(op,op->map,op->x,op->y,1,9); |
if (i==-1) { | | if (i==-1) { |
new_draw_info(NDI_UNIQUE, 0, op, "Can not find a free spot to place summoned player."); | | new_draw_info(NDI_UNIQUE, 0, op, "Can not find a free spot to place summoned player."); |
return 1; | | return 1; |
| | |
pl = get_other_player_from_name(op, params); | | pl = get_other_player_from_name(op, params); |
if (!pl) return 1; | | if (!pl) return 1; |
| | |
i = find_free_spot(pl->ob->arch, pl->ob->map, pl->ob->x, pl->ob->y, 1, 9); | | i = find_free_spot(pl->ob, pl->ob->map, pl->ob->x, pl->ob->y, 1, 9); |
if (i==-1) { | | if (i==-1) { |
new_draw_info(NDI_UNIQUE, 0, op, "Can not find a free spot to teleport to."); | | new_draw_info(NDI_UNIQUE, 0, op, "Can not find a free spot to teleport to."); |
return 1; | | return 1; |
| | |
CLEAR_FLAG(op, FLAG_WIZ); | | CLEAR_FLAG(op, FLAG_WIZ); |
CLEAR_FLAG(op, FLAG_WIZPASS); | | CLEAR_FLAG(op, FLAG_WIZPASS); |
CLEAR_FLAG(op, FLAG_WIZCAST); | | CLEAR_FLAG(op, FLAG_WIZCAST); |
CLEAR_FLAG(op, FLAG_FLYING); | | |
if (settings.real_wiz == TRUE) | | if (settings.real_wiz == TRUE) |
CLEAR_FLAG(op, FLAG_WAS_WIZ); | | CLEAR_FLAG(op, FLAG_WAS_WIZ); |
if ( op->contr->hidden ) | | if ( op->contr->hidden ) |
| | |
return (0); | | return (0); |
} | | } |
| | |
int do_wizard_dm( object* op, char* params, int silent ) | | int do_wizard_dm( object* op, char* params, int silent ) { |
{ | | |
if ( !op->contr ) | | if ( !op->contr ) |
return 0; | | return 0; |
| | |
if ( QUERY_FLAG( op, FLAG_WIZ ) ) | | if ( QUERY_FLAG( op, FLAG_WIZ ) ) { |
{ | | |
new_draw_info( NDI_UNIQUE, 0, op, "You are already the Dungeon Master!" ); | | new_draw_info( NDI_UNIQUE, 0, op, "You are already the Dungeon Master!" ); |
return 0; | | return 0; |
} | | } |
| | |
SET_FLAG(op, FLAG_WIZPASS); | | SET_FLAG(op, FLAG_WIZPASS); |
SET_FLAG(op, FLAG_WIZCAST); | | SET_FLAG(op, FLAG_WIZCAST); |
new_draw_info(NDI_UNIQUE, 0,op, "Ok, you are the Dungeon Master!"); | | new_draw_info(NDI_UNIQUE, 0,op, "Ok, you are the Dungeon Master!"); |
SET_FLAG(op, FLAG_FLYING); | | /* Remove setting flying here - that won't work, because next |
| | * fix_player() is called that will get cleared - proper solution |
| | * is probably something like a wiz_force which gives that and any |
| | * other desired abilities. |
| | */ |
clear_los(op); | | clear_los(op); |
op->contr->write_buf[0] ='\0'; | | op->contr->write_buf[0] ='\0'; |
| | |