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.81 by root, Sat Jan 16 13:41:37 2010 UTC vs.
Revision 1.89 by root, Sat Nov 17 23:40:03 2018 UTC

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 (©) 2017,2018 Marc Alexander Lehmann / the Deliantra team
4 * Copyright (©) 2005,2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team 5 * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
5 * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team 6 * Copyright (©) 2002 Mark Wedel & Crossfire Development Team
6 * Copyright (©) 1992,2007 Frank Tore Johansen 7 * Copyright (©) 1992 Frank Tore Johansen
7 * 8 *
8 * Deliantra is free software: you can redistribute it and/or modify it under 9 * Deliantra is free software: you can redistribute it and/or modify it under
9 * the terms of the Affero GNU General Public License as published by the 10 * the terms of the Affero GNU General Public License as published by the
10 * Free Software Foundation, either version 3 of the License, or (at your 11 * Free Software Foundation, either version 3 of the License, or (at your
11 * option) any later version. 12 * option) any later version.
12 * 13 *
13 * This program is distributed in the hope that it will be useful, 14 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details. 17 * GNU General Public License for more details.
17 * 18 *
18 * You should have received a copy of the Affero GNU General Public License 19 * You should have received a copy of the Affero GNU General Public License
19 * and the GNU General Public License along with this program. If not, see 20 * and the GNU General Public License along with this program. If not, see
20 * <http://www.gnu.org/licenses/>. 21 * <http://www.gnu.org/licenses/>.
21 * 22 *
22 * The authors can be reached via e-mail to <support@deliantra.net> 23 * The authors can be reached via e-mail to <support@deliantra.net>
23 */ 24 */
24 25
25#include <global.h> 26#include <global.h>
26#include <sproto.h> 27#include <sproto.h>
27 28
28/* Handles misc. input request - things like hash table, malloc, maps, etc */ 29/* Handles misc. input request - things like hash table, malloc, maps, etc */
29
30typedef struct
31{
32 char namebuf[MAX_BUF];
33 int login_order;
34} chars_names;
35 30
36int 31int
37command_time (object *op, char *params) 32command_time (object *op, char *params)
38{ 33{
39 print_tod (op); 34 print_tod (op);
246 for (int i = 0; i < NROFATTACKS; i++) 241 for (int i = 0; i < NROFATTACKS; i++)
247 if (i != ATNR_INTERNAL) 242 if (i != ATNR_INTERNAL)
248 msg.printf (" %-20s %+4d\n", attacktype_desc [i], op->resist [i]); 243 msg.printf (" %-20s %+4d\n", attacktype_desc [i], op->resist [i]);
249 244
250 /* If dragon player, let's display natural resistances */ 245 /* If dragon player, let's display natural resistances */
251 if (is_dragon_pl (op)) 246 if (op->is_dragon ())
252 for (object *tmp = op->inv; tmp; tmp = tmp->below) 247 for (object *tmp = op->inv; tmp; tmp = tmp->below)
253 if ((tmp->type == FORCE) && tmp->arch->archname == shstr_dragon_skin_force) 248 if ((tmp->type == FORCE) && tmp->arch->archname == shstr_dragon_skin_force)
254 { 249 {
255 msg << "\nOf those, these are natural skin resistances:\n\n"; 250 msg << "\nOf those, these are natural skin resistances:\n\n";
256 251
276 new_draw_info (NDI_UNIQUE, 0, op, "You cannot change your title."); 271 new_draw_info (NDI_UNIQUE, 0, op, "You cannot change your title.");
277 return 1; 272 return 1;
278 } 273 }
279 274
280 /* dragon players cannot change titles */ 275 /* dragon players cannot change titles */
281 if (is_dragon_pl (op)) 276 if (op->is_dragon ())
282 { 277 {
283 new_draw_info (NDI_UNIQUE, 0, op, "Dragons cannot change titles."); 278 new_draw_info (NDI_UNIQUE, 0, op, "Dragons cannot change titles.");
284 return 1; 279 return 1;
285 } 280 }
286 281

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines