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.78 by root, Fri Nov 6 13:03:34 2009 UTC vs.
Revision 1.80 by root, Sat Nov 7 18:30:05 2009 UTC

209 " Wis %2d\n" 209 " Wis %2d\n"
210 " Cha %2d\n" 210 " Cha %2d\n"
211 " Pow %2d\n" 211 " Pow %2d\n"
212 " wc %d damage %d ac %d\n", 212 " wc %d damage %d ac %d\n",
213 &ob->name, 213 &ob->name,
214 &ob->name, 214 ob->level,
215 ob->stats.hp, ob->stats.maxhp, ob->stats.sp, ob->stats.maxsp, 215 ob->stats.hp, ob->stats.maxhp, ob->stats.sp, ob->stats.maxsp,
216 ob->stats.Str, 216 ob->stats.Str,
217 ob->stats.Dex, 217 ob->stats.Dex,
218 ob->stats.Con, 218 ob->stats.Con,
219 ob->stats.Int, 219 ob->stats.Int,
265 op->contr->infobox (MSG_CHANNEL ("resistances"), msg); 265 op->contr->infobox (MSG_CHANNEL ("resistances"), msg);
266 266
267 return 0; 267 return 0;
268} 268}
269 269
270/*
271 * Actual commands.
272 * Those should be in small separate files (c_object.c, c_wiz.c, cmove.c,...)
273 */
274static int
275onoff_value (const char *line)
276{
277 int i;
278
279 if (sscanf (line, "%d", &i))
280 return (i != 0);
281 switch (line[0])
282 {
283 case 'o':
284 switch (line[1])
285 {
286 case 'n':
287 return 1; /* on */
288 default:
289 return 0; /* o[ff] */
290 }
291 case 'y': /* y[es] */
292 case 'k': /* k[ylla] */
293 case 's':
294 case 'd':
295 return 1;
296 case 'n': /* n[o] */
297 case 'e': /* e[i] */
298 case 'u':
299 default:
300 return 0;
301 }
302}
303
304int 270int
305command_title (object *op, char *params) 271command_title (object *op, char *params)
306{ 272{
307 char buf[MAX_BUF]; 273 char buf[MAX_BUF];
308 274

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines