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

Comparing deliantra/server/common/item.C (file contents):
Revision 1.63 by root, Fri Nov 6 13:03:34 2009 UTC vs.
Revision 1.64 by root, Fri Nov 6 13:31:47 2009 UTC

63 {KW_body_foot , "You can put it on your foot" , "It goes on a human's foot"}, 63 {KW_body_foot , "You can put it on your foot" , "It goes on a human's foot"},
64 {KW_body_hand , "You can put it on your hand" , "It goes on a human's hand"}, 64 {KW_body_hand , "You can put it on your hand" , "It goes on a human's hand"},
65 {KW_body_wrist , "You can wear it around your wrist" , "It goes around a human's wrist"}, 65 {KW_body_wrist , "You can wear it around your wrist" , "It goes around a human's wrist"},
66 {KW_body_waist , "You can wear it around your waist" , "It goes around a human's waist"}, 66 {KW_body_waist , "You can wear it around your waist" , "It goes around a human's waist"},
67/*{"body_dragon_torso", "your body", "a dragon's body"} */ 67/*{"body_dragon_torso", "your body", "a dragon's body"} */
68};
69
70static char numbers[21][20] = {
71 "no", "", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten",
72 "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen",
73 "eighteen", "nineteen", "twenty"
74}; 68};
75 69
76static char numbers_10[10][20] = { 70static char numbers_10[10][20] = {
77 "zero", "ten", "twenty", "thirty", "fourty", "fifty", "sixty", "seventy", 71 "zero", "ten", "twenty", "thirty", "fourty", "fifty", "sixty", "seventy",
78 "eighty", "ninety" 72 "eighty", "ninety"
441 strcat (buf, levelnumbers[i % 10]); 435 strcat (buf, levelnumbers[i % 10]);
442 return buf; 436 return buf;
443} 437}
444 438
445/* 439/*
446 * get_number(integer) returns the text-representation of the given number
447 * in a static buffer. The buffer might be overwritten at the next
448 * call to get_number().
449 * It is currently only used by the query_name() function.
450 */
451static const char *
452get_number (int i)
453{
454 if (i <= 20)
455 return numbers[i];
456 else
457 {
458 static char buf[MAX_BUF];
459
460 sprintf (buf, "%d", i);
461 return buf;
462 }
463}
464
465/*
466 * Returns pointer to static buffer containing ring's or amulet's 440 * Returns pointer to static buffer containing ring's or amulet's
467 * abilities 441 * abilities
468 * These are taken from old query_name(), but it would work better 442 * These are taken from old query_name(), but it would work better
469 * if describle_item() would be called to get this information and 443 * if describle_item() would be called to get this information and
470 * caller would handle FULL_RING_DESCRIPTION definition. 444 * caller would handle FULL_RING_DESCRIPTION definition.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines