00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include <global.h>
00024 #include <ob_methods.h>
00025 #include <ob_types.h>
00038 void legacy_ob_describe(const ob_methods *context, const object *op, const object *observer, char *buf, size_t size) {
00039 buf[0] = '\0';
00040 if (op == NULL)
00041 return;
00042
00043 switch (op->type) {
00044 case RING:
00045 case SKILL:
00046 case WEAPON:
00047 case ARMOUR:
00048 case BRACERS:
00049 case HELMET:
00050 case SHIELD:
00051 case BOOTS:
00052 case GLOVES:
00053 case AMULET:
00054 case GIRDLE:
00055 case BOW:
00056 case ARROW:
00057 case CLOAK:
00058 case FOOD:
00059 case DRINK:
00060 case FLESH:
00061 case SKILL_TOOL:
00062 case LAMP:
00063 common_ob_describe(context, op, observer, buf, size);
00064 return;
00065
00066 default:
00067 if (buf[0] == '\0') {
00068 query_name(op, buf, size-1);
00069 buf[size-1] = 0;
00070 }
00071 return;
00072 }
00073 }