1 | |
|
|
2 | /* |
|
|
3 | * static char *rcsid_c_wiz_c = |
|
|
4 | * "$Id: c_wiz.C,v 1.10 2006/09/10 14:54:02 root Exp $"; |
|
|
5 | */ |
|
|
6 | |
|
|
7 | /* |
1 | /* |
8 | CrossFire, A Multiplayer game for X-windows |
2 | CrossFire, A Multiplayer game for X-windows |
9 | |
3 | |
10 | Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
4 | Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
11 | Copyright (C) 1992 Frank Tore Johansen |
5 | Copyright (C) 1992 Frank Tore Johansen |
… | |
… | |
22 | |
16 | |
23 | You should have received a copy of the GNU General Public License |
17 | You should have received a copy of the GNU General Public License |
24 | along with this program; if not, write to the Free Software |
18 | along with this program; if not, write to the Free Software |
25 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
26 | |
20 | |
27 | The authors can be reached via e-mail at crossfire-devel@real-time.com |
21 | The authors can be reached via e-mail at <crossfire@schmorp.de> |
28 | */ |
22 | */ |
29 | |
23 | |
30 | #include <global.h> |
24 | #include <global.h> |
31 | #ifndef __CEXTRACT__ |
25 | #ifndef __CEXTRACT__ |
32 | # include <sproto.h> |
26 | # include <sproto.h> |
… | |
… | |
322 | if (op != NULL && !QUERY_FLAG (op, FLAG_WIZ)) |
316 | if (op != NULL && !QUERY_FLAG (op, FLAG_WIZ)) |
323 | { |
317 | { |
324 | new_draw_info (NDI_UNIQUE, 0, op, "Sorry, you can't shutdown the server."); |
318 | new_draw_info (NDI_UNIQUE, 0, op, "Sorry, you can't shutdown the server."); |
325 | return 1; |
319 | return 1; |
326 | } |
320 | } |
327 | |
|
|
328 | for (pl = first_player; pl != NULL; pl = pl->next) |
|
|
329 | save_player (pl->ob, 0); |
|
|
330 | |
|
|
331 | for (pl = first_player; pl != NULL; pl = pl->next) |
|
|
332 | if (!QUERY_FLAG (pl->ob, FLAG_REMOVED)) |
|
|
333 | leave_map (pl->ob); |
|
|
334 | |
321 | |
335 | cleanup (); |
322 | cleanup (); |
336 | /* not reached */ |
323 | /* not reached */ |
337 | return 1; |
324 | return 1; |
338 | } |
325 | } |
… | |
… | |
623 | bp2++; |
610 | bp2++; |
624 | break; |
611 | break; |
625 | } |
612 | } |
626 | } |
613 | } |
627 | |
614 | |
628 | if ((at = find_archetype (bp)) == NULL) |
615 | if ((at = archetype::find (bp)) == NULL) |
629 | { |
616 | { |
630 | new_draw_info (NDI_UNIQUE, 0, op, "No such archetype."); |
617 | new_draw_info (NDI_UNIQUE, 0, op, "No such archetype."); |
631 | return 1; |
618 | return 1; |
632 | } |
619 | } |
633 | |
620 | |
… | |
… | |
639 | * Try to find a spell object for this. Note that |
626 | * Try to find a spell object for this. Note that |
640 | * we also set up spell_name which is only |
627 | * we also set up spell_name which is only |
641 | * the first word. |
628 | * the first word. |
642 | */ |
629 | */ |
643 | |
630 | |
644 | at_spell = find_archetype (cp); |
631 | at_spell = archetype::find (cp); |
645 | if (!at_spell || at_spell->clone.type != SPELL) |
632 | if (!at_spell || at_spell->clone.type != SPELL) |
646 | at_spell = find_archetype_by_object_name (cp); |
633 | at_spell = find_archetype_by_object_name (cp); |
647 | if (!at_spell || at_spell->clone.type != SPELL) |
634 | if (!at_spell || at_spell->clone.type != SPELL) |
648 | { |
635 | { |
649 | strcpy (spell_name, cp); |
636 | strcpy (spell_name, cp); |
650 | fsp = strchr (spell_name, ' '); |
637 | fsp = strchr (spell_name, ' '); |
651 | if (fsp) |
638 | if (fsp) |
652 | { |
639 | { |
653 | *fsp = 0; |
640 | *fsp = 0; |
654 | fsp++; |
641 | fsp++; |
655 | at_spell = find_archetype (spell_name); |
642 | at_spell = archetype::find (spell_name); |
656 | |
643 | |
657 | /* Got a spell, update the first string pointer */ |
644 | /* Got a spell, update the first string pointer */ |
658 | if (at_spell && at_spell->clone.type == SPELL) |
645 | if (at_spell && at_spell->clone.type == SPELL) |
659 | bp2 = cp + strlen (spell_name) + 1; |
646 | bp2 = cp + strlen (spell_name) + 1; |
660 | else |
647 | else |