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

Comparing deliantra/server/server/c_misc.C (file contents):
Revision 1.63 by root, Fri Aug 10 05:25:16 2007 UTC vs.
Revision 1.72 by root, Fri Dec 19 22:47:29 2008 UTC

1/* 1/*
2 * This file is part of Crossfire TRT, the Roguelike Realtime MORPG. 2 * This file is part of Deliantra, the Roguelike Realtime MMORPG.
3 * 3 *
4 * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Crossfire TRT 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 * Crossfire TRT 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
10 * the Free Software Foundation, either version 3 of the License, or 10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version. 11 * (at your option) any later version.
12 * 12 *
13 * 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,
16 * GNU General Public License for more details. 16 * GNU General Public License for more details.
17 * 17 *
18 * 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
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. 19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 * 20 *
21 * The authors can be reached via e-mail to <crossfire@schmorp.de> 21 * The authors can be reached via e-mail to <support@deliantra.net>
22 */ 22 */
23 23
24#include <global.h> 24#include <global.h>
25#include <loader.h> 25#include <loader.h>
26#include <sproto.h> 26#include <sproto.h>
31command_motd (object *op, char *params) 31command_motd (object *op, char *params)
32{ 32{
33 display_motd (op); 33 display_motd (op);
34 return 1; 34 return 1;
35} 35}
36
37#ifdef DEBUG_MALLOC_LEVEL
38int
39command_malloc_verify (object *op, char *parms)
40{
41 extern int malloc_verify (void);
42
43 if (!malloc_verify ())
44 new_draw_info (NDI_UNIQUE, 0, op, "Heap is corrupted.");
45 else
46 new_draw_info (NDI_UNIQUE, 0, op, "Heap checks out OK.");
47 return 1;
48}
49#endif
50 36
51typedef struct 37typedef struct
52{ 38{
53 char namebuf[MAX_BUF]; 39 char namebuf[MAX_BUF];
54 int login_order; 40 int login_order;
104command_dumpfriendlyobjects (object *op, char *params) 90command_dumpfriendlyobjects (object *op, char *params)
105{ 91{
106 dump_friendly_objects (); 92 dump_friendly_objects ();
107 return 0; 93 return 0;
108} 94}
109
110int
111command_printlos (object *op, char *params)
112{
113 if (op)
114 print_los (op);
115 return 0;
116}
117
118 95
119int 96int
120command_version (object *op, char *params) 97command_version (object *op, char *params)
121{ 98{
122 version (op); 99 version (op);
177} 154}
178 155
179int 156int
180command_fix_me (object *op, char *params) 157command_fix_me (object *op, char *params)
181{ 158{
182 sum_weight (op); 159 op->update_weight ();
183 op->update_stats (); 160 op->update_stats ();
184 new_draw_info (NDI_UNIQUE, 0, op, "Your character was fixed."); 161 new_draw_info (NDI_UNIQUE, 0, op, "Your character was fixed.");
185
186 return 1;
187}
188
189int
190command_logs (object *op, char *params)
191{
192 new_draw_info (NDI_UNIQUE, 0, op, "Nobody is currently logging kills.");
193 162
194 return 1; 163 return 1;
195} 164}
196 165
197int 166int
309 int attack; 278 int attack;
310 object *tmp; 279 object *tmp;
311 280
312 for (tmp = op->inv; tmp != NULL; tmp = tmp->below) 281 for (tmp = op->inv; tmp != NULL; tmp = tmp->below)
313 { 282 {
314 if ((tmp->type == FORCE) && (strcmp (tmp->arch->archname, "dragon_skin_force") == 0)) 283 if ((tmp->type == FORCE) && tmp->arch->archname == shstr_dragon_skin_force)
315 { 284 {
316 new_draw_info (NDI_UNIQUE, 0, op, "\nNatural skin resistances:"); 285 new_draw_info (NDI_UNIQUE, 0, op, "\nNatural skin resistances:");
317 for (attack = 0; attack < NROFATTACKS; attack++) 286 for (attack = 0; attack < NROFATTACKS; attack++)
318 { 287 {
319 if (atnr_is_dragon_enabled (attack)) 288 if (atnr_is_dragon_enabled (attack))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines