--- deliantra/server/common/info.C 2006/09/10 16:00:23 1.4 +++ deliantra/server/common/info.C 2007/03/18 03:05:39 1.12 @@ -1,32 +1,27 @@ - /* - * static char *rcsid_info_c = - * "$Id: info.C,v 1.4 2006/09/10 16:00:23 root Exp $"; + * CrossFire, A Multiplayer game for X-windows + * + * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team + * Copyright (C) 2002 Mark Wedel & Crossfire Development Team + * Copyright (C) 1992 Frank Tore Johansen + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * The authors can be reached via e-mail at */ -/* - CrossFire, A Multiplayer game for X-windows - - Copyright (C) 2002 Mark Wedel & Crossfire Development Team - Copyright (C) 1992 Frank Tore Johansen - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - The authors can be reached via e-mail at crossfire-devel@real-time.com -*/ - #include /* @@ -45,7 +40,7 @@ for (at = first_archetype; at; at = at->next) { - char *ch; + const char *ch; const char *gen_name = ""; archetype *gen; @@ -57,22 +52,15 @@ continue; for (gen = first_archetype; gen; gen = gen->next) - { - if (gen->clone.other_arch && gen->clone.other_arch == at) - { - gen_name = gen->name; - break; - } - } + if (gen->clone.other_arch && gen->clone.other_arch == at) + { + gen_name = gen->name; + break; + } ch = describe_item (&at->clone, NULL); -#ifndef WIN32 printf ("%-16s|%6lld|%4d|%3d|%s|%s|%s\n", &at->clone.name, (long long) at->clone.stats.exp, at->clone.stats.hp, at->clone.stats.ac, ch, &at->name, gen_name); -#else - printf ("%-16s|%6I64d|%4d|%3d|%s|%s|%s\n", &at->clone.name, (long long) at->clone.stats.exp, - at->clone.stats.hp, at->clone.stats.ac, ch, &at->name, gen_name); -#endif } } @@ -97,6 +85,7 @@ for (at = first_archetype; at != NULL; at = at->next) { op = arch_to_object (at); + if (QUERY_FLAG (op, FLAG_MONSTER)) { bitstostring ((long) op->attacktype, NROFATTACKS, attbuf); @@ -105,7 +94,8 @@ printf ("%4d", op->resist[i]); printf ("|%8lld|%9d|\n", (long long) op->stats.exp, new_exp (op)); } - free_object (op); + + op->destroy (); } } @@ -129,12 +119,14 @@ str[i + j] = ' '; j++; } + if (bits & 1) str[i + j] = '1'; else str[i + j] = '0'; + bits >>= 1; } + str[i + j] = '\0'; - return; }