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.7 by root, Thu Sep 21 00:05:24 2006 UTC vs.
Revision 1.10 by elmex, Wed Dec 20 10:31:00 2006 UTC

129 {AMULET, "amulet", "amulets", SK_JEWELER, 0}, 129 {AMULET, "amulet", "amulets", SK_JEWELER, 0},
130 {PLAYERMOVER, "player mover", "player movers", 0, 0}, 130 {PLAYERMOVER, "player mover", "player movers", 0, 0},
131 {TELEPORTER, "teleporter", "teleporters", 0, 0}, 131 {TELEPORTER, "teleporter", "teleporters", 0, 0},
132 {CREATOR, "creator", "creators", 0, 0}, 132 {CREATOR, "creator", "creators", 0, 0},
133 {SKILL, "skill", "skills", 0, 0}, 133 {SKILL, "skill", "skills", 0, 0},
134 {EXPERIENCE, "experience", "experience", 0, 0},
135 {EARTHWALL, "earthwall", "earthwalls", 0, 0}, 134 {EARTHWALL, "earthwall", "earthwalls", 0, 0},
136 {GOLEM, "golem", "golems", 0, 0}, 135 {GOLEM, "golem", "golems", 0, 0},
137 {THROWN_OBJ, "projectile", "projectiles", 0, 0}, 136 {THROWN_OBJ, "projectile", "projectiles", 0, 0},
138 {BLINDNESS, "blindness", "blindness", 0, 0}, 137 {BLINDNESS, "blindness", "blindness", 0, 0},
139 {GOD, "god", "gods", 0, 0}, 138 {GOD, "god", "gods", 0, 0},
668 667
669 use_buf++; 668 use_buf++;
670 use_buf %= 5; 669 use_buf %= 5;
671 670
672#ifdef NEW_MATERIAL_CODE 671#ifdef NEW_MATERIAL_CODE
673 if ((IS_ARMOR (op) || IS_WEAPON (op)) && op->materialname) 672 if ((op->is_armor () || op->is_weapon ()) && op->materialname)
674 { 673 {
675 mt = name_to_material (op->materialname); 674 mt = name_to_material (op->materialname);
676 if (mt) 675 if (mt)
677 { 676 {
678 safe_strcat (buf[use_buf], mt->description, &len, HUGE_BUF); 677 safe_strcat (buf[use_buf], mt->description, &len, HUGE_BUF);
775 return "(null)"; 774 return "(null)";
776 775
777 if (!op->nrof && !op->weight && !op->title && !is_magical (op)) 776 if (!op->nrof && !op->weight && !op->title && !is_magical (op))
778 return op->name; /* To speed things up (or make things slower?) */ 777 return op->name; /* To speed things up (or make things slower?) */
779 778
780 if ((IS_ARMOR (op) || IS_WEAPON (op)) && op->materialname) 779 if ((op->is_armor () || op->is_weapon ()) && op->materialname)
781 mt = name_to_material (op->materialname); 780 mt = name_to_material (op->materialname);
782 781
783#ifdef NEW_MATERIAL_CODE 782#ifdef NEW_MATERIAL_CODE
784 if ((IS_ARMOR (op) || IS_WEAPON (op)) && op->materialname && mt && 783 if ((op->is_armor () || op->is_weapon ()) && op->materialname && mt &&
785 op->arch->clone.materialname != mt->name && !(op->material & M_SPECIAL)) 784 op->arch->clone.materialname != mt->name && !(op->material & M_SPECIAL))
786 { 785 {
787 strcpy (buf, mt->description); 786 strcpy (buf, mt->description);
788 len = strlen (buf); 787 len = strlen (buf);
789 safe_strcat (buf, " ", &len, MAX_BUF); 788 safe_strcat (buf, " ", &len, MAX_BUF);
1502 LOG (llevDebug, "need_identify: %s does not need to be id'd\n", op->name); 1501 LOG (llevDebug, "need_identify: %s does not need to be id'd\n", op->name);
1503#endif 1502#endif
1504 return 0; 1503 return 0;
1505} 1504}
1506 1505
1507
1508/* 1506/*
1509 * Supposed to fix face-values as well here, but later. 1507 * Supposed to fix face-values as well here, but later.
1510 */ 1508 */
1511
1512void 1509void
1513identify (object *op) 1510identify (object *op)
1514{ 1511{
1515 object *pl; 1512 object *pl;
1516 1513
1538 /* If the object is on a map, make sure we update its face */ 1535 /* If the object is on a map, make sure we update its face */
1539 if (op->map) 1536 if (op->map)
1540 update_object (op, UP_OBJ_FACE); 1537 update_object (op, UP_OBJ_FACE);
1541 else 1538 else
1542 { 1539 {
1543 pl = is_player_inv (op->env); 1540 pl = op->in_player ();
1544 if (pl) 1541 if (pl)
1545 /* A lot of the values can change from an update - might as well send 1542 /* A lot of the values can change from an update - might as well send
1546 * it all. 1543 * it all.
1547 */ 1544 */
1548 esrv_send_item (pl, op); 1545 esrv_send_item (pl, op);
1549 } 1546 }
1550} 1547}
1548

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines