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.8 by root, Mon Dec 18 03:00:02 2006 UTC vs.
Revision 1.17 by elmex, Wed Jan 3 02:30:51 2007 UTC

99 {POTION, "potion", "potions", SK_ALCHEMY, 0}, 99 {POTION, "potion", "potions", SK_ALCHEMY, 0},
100 {FOOD, "food", "food", SK_WOODSMAN, 0}, 100 {FOOD, "food", "food", SK_WOODSMAN, 0},
101 {POISON, "poison", "poisons", SK_ALCHEMY, 0}, 101 {POISON, "poison", "poisons", SK_ALCHEMY, 0},
102 {BOOK, "book", "books", SK_LITERACY, 0}, 102 {BOOK, "book", "books", SK_LITERACY, 0},
103 {CLOCK, "clock", "clocks", 0, 0}, 103 {CLOCK, "clock", "clocks", 0, 0},
104 {LIGHTNING, "lightning", "lightning", 0, 0},
105 {ARROW, "arrow", "arrows", SK_BOWYER, 0}, 104 {ARROW, "arrow", "arrows", SK_BOWYER, 0},
106 {BOW, "bow", "bows", SK_BOWYER, 0}, 105 {BOW, "bow", "bows", SK_BOWYER, 0},
107 {WEAPON, "weapon", "weapons", SK_SMITHERY, 0}, 106 {WEAPON, "weapon", "weapons", SK_SMITHERY, 0},
108 {ARMOUR, "armour", "armour", SK_SMITHERY, 0}, 107 {ARMOUR, "armour", "armour", SK_SMITHERY, 0},
109 {PEDESTAL, "pedestal", "pedestals", 0, 0}, 108 {PEDESTAL, "pedestal", "pedestals", 0, 0},
129 {AMULET, "amulet", "amulets", SK_JEWELER, 0}, 128 {AMULET, "amulet", "amulets", SK_JEWELER, 0},
130 {PLAYERMOVER, "player mover", "player movers", 0, 0}, 129 {PLAYERMOVER, "player mover", "player movers", 0, 0},
131 {TELEPORTER, "teleporter", "teleporters", 0, 0}, 130 {TELEPORTER, "teleporter", "teleporters", 0, 0},
132 {CREATOR, "creator", "creators", 0, 0}, 131 {CREATOR, "creator", "creators", 0, 0},
133 {SKILL, "skill", "skills", 0, 0}, 132 {SKILL, "skill", "skills", 0, 0},
134 {EXPERIENCE, "experience", "experience", 0, 0},
135 {EARTHWALL, "earthwall", "earthwalls", 0, 0}, 133 {EARTHWALL, "earthwall", "earthwalls", 0, 0},
136 {GOLEM, "golem", "golems", 0, 0}, 134 {GOLEM, "golem", "golems", 0, 0},
137 {THROWN_OBJ, "projectile", "projectiles", 0, 0}, 135 {THROWN_OBJ, "projectile", "projectiles", 0, 0},
138 {BLINDNESS, "blindness", "blindness", 0, 0}, 136 {BLINDNESS, "blindness", "blindness", 0, 0},
139 {GOD, "god", "gods", 0, 0}, 137 {GOD, "god", "gods", 0, 0},
159 {FLOOR, "floor", "floors", 0, 0}, 157 {FLOOR, "floor", "floors", 0, 0},
160 {FLESH, "flesh", "flesh", SK_WOODSMAN, 0}, 158 {FLESH, "flesh", "flesh", SK_WOODSMAN, 0},
161 {INORGANIC, "inorganic", "inorganics", SK_ALCHEMY, 0}, 159 {INORGANIC, "inorganic", "inorganics", SK_ALCHEMY, 0},
162 {SKILL_TOOL, "skill tool", "skill tools", 0, 0}, 160 {SKILL_TOOL, "skill tool", "skill tools", 0, 0},
163 {LIGHTER, "lighter", "lighters", 0, 0}, 161 {LIGHTER, "lighter", "lighters", 0, 0},
164 {TRAP_PART, "trap part", "trap parts", 0, 0}, 162 {BUILDABLE_WALL, "buildable wall", "buildable walls", 0, 0},
165 {WALL, "wall", "walls", 0, 0},
166 {LIGHT_SOURCE, "light source", "light sources", 0, 0},
167 {MISC_OBJECT, "bric-a-brac", "bric-a-brac", 0, 0}, 163 {MISC_OBJECT, "bric-a-brac", "bric-a-brac", 0, 0},
168 {MONSTER, "monster", "monsters", 0, 0},
169 {SPAWN_GENERATOR, "monster generator", "monster generators", 0, 0},
170 {LAMP, "lamp", "lamps", 0, 0}, 164 {LAMP, "lamp", "lamps", 0, 0},
171 {DUPLICATOR, "duplicator", "duplicators", 0, 0}, 165 {DUPLICATOR, "duplicator", "duplicators", 0, 0},
172 {TOOL, "tool", "tools", 0, 0},
173 {SPELLBOOK, "spellbook", "spellbooks", SK_LITERACY, 0}, 166 {SPELLBOOK, "spellbook", "spellbooks", SK_LITERACY, 0},
174 {BUILDFAC, "building facility", "building facilities", 0, 0},
175 {CLOAK, "cloak", "cloaks", SK_SMITHERY, 0}, 167 {CLOAK, "cloak", "cloaks", SK_SMITHERY, 0},
176 {SPINNER, "spinner", "spinners", 0, 0}, 168 {SPINNER, "spinner", "spinners", 0, 0},
177 {GATE, "gate", "gates", 0, 0}, 169 {GATE, "gate", "gates", 0, 0},
178 {BUTTON, "button", "buttons", 0, 0}, 170 {BUTTON, "button", "buttons", 0, 0},
179 {CF_HANDLE, "cf handle", "cf handles", 0, 0}, 171 {CF_HANDLE, "cf handle", "cf handles", 0, 0},
186 {SPELL_EFFECT, "spell effect", "spell effects", 0, 0}, 178 {SPELL_EFFECT, "spell effect", "spell effects", 0, 0},
187 {CONVERTER, "converter", "converters", 0, 0}, 179 {CONVERTER, "converter", "converters", 0, 0},
188 {BRACERS, "bracers", "bracers", SK_SMITHERY, 0}, 180 {BRACERS, "bracers", "bracers", SK_SMITHERY, 0},
189 {POISONING, "poisoning", "poisonings", 0, 0}, 181 {POISONING, "poisoning", "poisonings", 0, 0},
190 {SAVEBED, "savebed", "savebeds", 0, 0}, 182 {SAVEBED, "savebed", "savebeds", 0, 0},
191 {POISONCLOUD, "poison cloud", "poison clouds", 0, 0},
192 {FIREHOLES, "fireholes", "fireholes", 0, 0},
193 {WAND, "wand", "wands", SK_THAUMATURGY, 0}, 183 {WAND, "wand", "wands", SK_THAUMATURGY, 0},
194 {SCROLL, "scroll", "scrolls", SK_LITERACY, 0}, 184 {SCROLL, "scroll", "scrolls", SK_LITERACY, 0},
195 {DIRECTOR, "director", "directors", 0, 0}, 185 {DIRECTOR, "director", "directors", 0, 0},
196 {GIRDLE, "girdle", "girdles", SK_SMITHERY, 0}, 186 {GIRDLE, "girdle", "girdles", SK_SMITHERY, 0},
197 {FORCE, "force", "forces", 0, 0}, 187 {FORCE, "force", "forces", 0, 0},
877 867
878 /* Note that the resolution this provides for players really isn't 868 /* Note that the resolution this provides for players really isn't
879 * very good. Any player with a speed greater than .67 will 869 * very good. Any player with a speed greater than .67 will
880 * fall into the 'lightning fast movement' category. 870 * fall into the 'lightning fast movement' category.
881 */ 871 */
882 if (FABS (op->speed) > MIN_ACTIVE_SPEED) 872 if (op->has_active_speed ())
883 { 873 {
884 switch ((int) ((FABS (op->speed)) * 15)) 874 switch ((int) ((FABS (op->speed)) * 15))
885 { 875 {
886 case 0: 876 case 0:
887 strcat (retbuf, "(very slow movement)"); 877 strcat (retbuf, "(very slow movement)");
943 { 933 {
944 treasure *t; 934 treasure *t;
945 int first = 1; 935 int first = 1;
946 936
947 for (t = op->randomitems->items; t != NULL; t = t->next) 937 for (t = op->randomitems->items; t != NULL; t = t->next)
948 if (t->item && (t->item->clone.type == SPELL)) 938 if (t->item && t->item->clone.type == SPELL)
949 { 939 {
950 if (first) 940 if (first)
951 { 941 {
952 first = 0; 942 first = 0;
953 strcat (retbuf, "(Spell abilities:)"); 943 strcat (retbuf, "(Spell abilities:)");
1502 LOG (llevDebug, "need_identify: %s does not need to be id'd\n", op->name); 1492 LOG (llevDebug, "need_identify: %s does not need to be id'd\n", op->name);
1503#endif 1493#endif
1504 return 0; 1494 return 0;
1505} 1495}
1506 1496
1507
1508/* 1497/*
1509 * Supposed to fix face-values as well here, but later. 1498 * Supposed to fix face-values as well here, but later.
1510 */ 1499 */
1511
1512void 1500void
1513identify (object *op) 1501identify (object *op)
1514{ 1502{
1515 object *pl; 1503 object *pl;
1516 1504
1538 /* If the object is on a map, make sure we update its face */ 1526 /* If the object is on a map, make sure we update its face */
1539 if (op->map) 1527 if (op->map)
1540 update_object (op, UP_OBJ_FACE); 1528 update_object (op, UP_OBJ_FACE);
1541 else 1529 else
1542 { 1530 {
1543 pl = is_player_inv (op->env); 1531 pl = op->in_player ();
1544 if (pl) 1532 if (pl)
1545 /* A lot of the values can change from an update - might as well send 1533 /* A lot of the values can change from an update - might as well send
1546 * it all. 1534 * it all.
1547 */ 1535 */
1548 esrv_send_item (pl, op); 1536 esrv_send_item (pl, op);
1549 } 1537 }
1550} 1538}
1539

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines