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

Comparing deliantra/server/common/readable.C (file contents):
Revision 1.28 by root, Sun Jun 24 04:09:28 2007 UTC vs.
Revision 1.29 by root, Sat Jun 30 02:24:32 2007 UTC

435 * Be careful to keep the order. If you add readable subtype, add them 435 * Be careful to keep the order. If you add readable subtype, add them
436 * at the bottom of the list. Never delete a subtype because index is used as 436 * at the bottom of the list. Never delete a subtype because index is used as
437 * subtype paramater in arch files! 437 * subtype paramater in arch files!
438 */ 438 */
439static readable_message_type readable_message_types[] = { 439static readable_message_type readable_message_types[] = {
440 /*subtype 0 */ {0, 0, ""}, 440 /*subtype 0 */ {0, 0, "info"},
441 /* book messages subtypes */ 441 /* book messages subtypes */
442 /*subtype 1 */ {MSG_TYPE_BOOK, MSG_TYPE_BOOK_CLASP_1, "readable-book-clasp-1"}, 442 /*subtype 1 */ {MSG_TYPE_BOOK, MSG_TYPE_BOOK_CLASP_1, "readable-book-clasp-1"},
443 {MSG_TYPE_BOOK, MSG_TYPE_BOOK_CLASP_2, "readable-book-clasp-2"}, 443 {MSG_TYPE_BOOK, MSG_TYPE_BOOK_CLASP_2, "readable-book-clasp-2"},
444 {MSG_TYPE_BOOK, MSG_TYPE_BOOK_ELEGANT_1, "readable-book-elegant-1"}, 444 {MSG_TYPE_BOOK, MSG_TYPE_BOOK_ELEGANT_1, "readable-book-elegant-1"},
445 {MSG_TYPE_BOOK, MSG_TYPE_BOOK_ELEGANT_2, "readable-book-elegant-2"}, 445 {MSG_TYPE_BOOK, MSG_TYPE_BOOK_ELEGANT_2, "readable-book-elegant-2"},
1983get_readable_message_type (object *readable) 1983get_readable_message_type (object *readable)
1984{ 1984{
1985 uint8 subtype = readable->subtype; 1985 uint8 subtype = readable->subtype;
1986 1986
1987 if (subtype > last_readable_subtype) 1987 if (subtype > last_readable_subtype)
1988 return &(readable_message_types[0]); 1988 return &readable_message_types[0];
1989
1989 return &(readable_message_types[subtype]); 1990 return &readable_message_types[subtype];
1990} 1991}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines