1 | /* |
1 | /* |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
3 | * |
3 | * |
4 | * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
7 | * |
7 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify |
8 | * Deliantra is free software: you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by |
9 | * it under the terms of the GNU General Public License as published by |
… | |
… | |
279 | /* we have nowhere to send the prisoner.... */ |
279 | /* we have nowhere to send the prisoner.... */ |
280 | new_draw_info (NDI_UNIQUE, 0, op, "can't jail player, there is no map to hold them"); |
280 | new_draw_info (NDI_UNIQUE, 0, op, "can't jail player, there is no map to hold them"); |
281 | return 0; |
281 | return 0; |
282 | } |
282 | } |
283 | |
283 | |
284 | pl->ob->enter_exit (dummy); |
284 | pl->ob->player_goto (dummy->slaying, dummy->stats.hp, dummy->stats.sp);//TODO |
285 | dummy->destroy (); |
285 | dummy->destroy (); |
|
|
286 | |
286 | new_draw_info (NDI_UNIQUE, 0, pl->ob, "You have been arrested."); |
287 | new_draw_info (NDI_UNIQUE, 0, pl->ob, "You have been arrested."); |
287 | new_draw_info (NDI_UNIQUE, 0, op, "OK."); |
288 | new_draw_info (NDI_UNIQUE, 0, op, "OK."); |
288 | LOG (llevInfo, "Player %s arrested by %s\n", &pl->ob->name, &op->name); |
289 | LOG (llevInfo, "Player %s arrested by %s\n", &pl->ob->name, &op->name); |
289 | return 1; |
290 | return 1; |
290 | } |
291 | } |
… | |
… | |
314 | { |
315 | { |
315 | new_draw_info (NDI_UNIQUE, 0, op, "Can not find a free spot to place summoned player."); |
316 | new_draw_info (NDI_UNIQUE, 0, op, "Can not find a free spot to place summoned player."); |
316 | return 1; |
317 | return 1; |
317 | } |
318 | } |
318 | |
319 | |
319 | dummy = object::create (); |
320 | pl->ob->player_goto (op->map->path, op->x + freearr_x[i], op->y + freearr_y[i]); |
320 | EXIT_PATH (dummy) = op->map->path; |
|
|
321 | EXIT_X (dummy) = op->x + freearr_x[i]; |
|
|
322 | EXIT_Y (dummy) = op->y + freearr_y[i]; |
|
|
323 | pl->ob->enter_exit (dummy); |
|
|
324 | dummy->destroy (); |
|
|
325 | new_draw_info (NDI_UNIQUE, 0, pl->ob, "You are summoned."); |
321 | new_draw_info (NDI_UNIQUE, 0, pl->ob, "You are summoned."); |
326 | new_draw_info (NDI_UNIQUE, 0, op, "OK."); |
322 | new_draw_info (NDI_UNIQUE, 0, op, "OK."); |
327 | |
323 | |
328 | return 1; |
324 | return 1; |
329 | } |
325 | } |
… | |
… | |
1047 | if (checkdm (op, op->name, (params ? params : "*"), op->contr->ns->host)) |
1043 | if (checkdm (op, op->name, (params ? params : "*"), op->contr->ns->host)) |
1048 | { |
1044 | { |
1049 | SET_FLAG (op, FLAG_WIZ); |
1045 | SET_FLAG (op, FLAG_WIZ); |
1050 | SET_FLAG (op, FLAG_WIZPASS); |
1046 | SET_FLAG (op, FLAG_WIZPASS); |
1051 | SET_FLAG (op, FLAG_WIZCAST); |
1047 | SET_FLAG (op, FLAG_WIZCAST); |
|
|
1048 | SET_FLAG (op, FLAG_WIZLOOK); |
1052 | |
1049 | |
1053 | new_draw_info (NDI_UNIQUE, 0, op, "Ok, you are the Dungeon Master!"); |
1050 | new_draw_info (NDI_UNIQUE, 0, op, "Ok, you are the Dungeon Master!"); |
1054 | /* |
|
|
1055 | * Remove setting flying here - that won't work, because next |
|
|
1056 | * fix_player() is called that will get cleared - proper solution |
|
|
1057 | * is probably something like a wiz_force which gives that and any |
|
|
1058 | * other desired abilities. |
|
|
1059 | */ |
|
|
1060 | clear_los (op->contr); |
|
|
1061 | op->contr->write_buf[0] = '\0'; |
1051 | op->contr->write_buf[0] = '\0'; |
1062 | |
1052 | |
1063 | if (!silent) |
1053 | if (!silent) |
1064 | new_draw_info (NDI_UNIQUE | NDI_ALL | NDI_LT_GREEN, 1, NULL, "The Dungeon Master has arrived!"); |
1054 | new_draw_info (NDI_UNIQUE | NDI_ALL | NDI_LT_GREEN, 1, NULL, "The Dungeon Master has arrived!"); |
1065 | |
1055 | |