ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/info.C
(Generate patch)

Comparing deliantra/server/common/info.C (file contents):
Revision 1.9 by root, Sat Dec 23 05:25:17 2006 UTC vs.
Revision 1.12 by root, Sun Mar 18 03:05:39 2007 UTC

1/* 1/*
2 CrossFire, A Multiplayer game for X-windows 2 * CrossFire, A Multiplayer game for X-windows
3 3 *
4 * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team
4 Copyright (C) 2002 Mark Wedel & Crossfire Development Team 5 * Copyright (C) 2002 Mark Wedel & Crossfire Development Team
5 Copyright (C) 1992 Frank Tore Johansen 6 * Copyright (C) 1992 Frank Tore Johansen
6 7 *
7 This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
8 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
9 the Free Software Foundation; either version 2 of the License, or 10 * the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version. 11 * (at your option) any later version.
11 12 *
12 This program is distributed in the hope that it will be useful, 13 * This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details. 16 * GNU General Public License for more details.
16 17 *
17 You should have received a copy of the GNU General Public License 18 * You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software 19 * along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 21 *
21 The authors can be reached via e-mail at <crossfire@schmorp.de> 22 * The authors can be reached via e-mail at <crossfire@schmorp.de>
22*/ 23 */
23 24
24#include <global.h> 25#include <global.h>
25 26
26/* 27/*
27 * The functions in this file are purely mean to generate information 28 * The functions in this file are purely mean to generate information
37{ 38{
38 archetype *at; 39 archetype *at;
39 40
40 for (at = first_archetype; at; at = at->next) 41 for (at = first_archetype; at; at = at->next)
41 { 42 {
42 char *ch; 43 const char *ch;
43 const char *gen_name = ""; 44 const char *gen_name = "";
44 archetype *gen; 45 archetype *gen;
45 46
46 if (!QUERY_FLAG (&at->clone, FLAG_MONSTER)) 47 if (!QUERY_FLAG (&at->clone, FLAG_MONSTER))
47 continue; 48 continue;
49 /* Get rid of e.g. multiple black puddings */ 50 /* Get rid of e.g. multiple black puddings */
50 if (QUERY_FLAG (&at->clone, FLAG_CHANGING)) 51 if (QUERY_FLAG (&at->clone, FLAG_CHANGING))
51 continue; 52 continue;
52 53
53 for (gen = first_archetype; gen; gen = gen->next) 54 for (gen = first_archetype; gen; gen = gen->next)
54 {
55 if (gen->clone.other_arch && gen->clone.other_arch == at) 55 if (gen->clone.other_arch && gen->clone.other_arch == at)
56 { 56 {
57 gen_name = gen->name; 57 gen_name = gen->name;
58 break; 58 break;
59 } 59 }
60 }
61 60
62 ch = describe_item (&at->clone, NULL); 61 ch = describe_item (&at->clone, NULL);
63 printf ("%-16s|%6lld|%4d|%3d|%s|%s|%s\n", &at->clone.name, (long long) at->clone.stats.exp, 62 printf ("%-16s|%6lld|%4d|%3d|%s|%s|%s\n", &at->clone.name, (long long) at->clone.stats.exp,
64 at->clone.stats.hp, at->clone.stats.ac, ch, &at->name, gen_name); 63 at->clone.stats.hp, at->clone.stats.ac, ch, &at->name, gen_name);
65 } 64 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines