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.9 by root, Wed Dec 20 09:14:21 2006 UTC

668 668
669 use_buf++; 669 use_buf++;
670 use_buf %= 5; 670 use_buf %= 5;
671 671
672#ifdef NEW_MATERIAL_CODE 672#ifdef NEW_MATERIAL_CODE
673 if ((IS_ARMOR (op) || IS_WEAPON (op)) && op->materialname) 673 if ((op->is_armor () || op->is_weapon ()) && op->materialname)
674 { 674 {
675 mt = name_to_material (op->materialname); 675 mt = name_to_material (op->materialname);
676 if (mt) 676 if (mt)
677 { 677 {
678 safe_strcat (buf[use_buf], mt->description, &len, HUGE_BUF); 678 safe_strcat (buf[use_buf], mt->description, &len, HUGE_BUF);
775 return "(null)"; 775 return "(null)";
776 776
777 if (!op->nrof && !op->weight && !op->title && !is_magical (op)) 777 if (!op->nrof && !op->weight && !op->title && !is_magical (op))
778 return op->name; /* To speed things up (or make things slower?) */ 778 return op->name; /* To speed things up (or make things slower?) */
779 779
780 if ((IS_ARMOR (op) || IS_WEAPON (op)) && op->materialname) 780 if ((op->is_armor () || op->is_weapon ()) && op->materialname)
781 mt = name_to_material (op->materialname); 781 mt = name_to_material (op->materialname);
782 782
783#ifdef NEW_MATERIAL_CODE 783#ifdef NEW_MATERIAL_CODE
784 if ((IS_ARMOR (op) || IS_WEAPON (op)) && op->materialname && mt && 784 if ((op->is_armor () || op->is_weapon ()) && op->materialname && mt &&
785 op->arch->clone.materialname != mt->name && !(op->material & M_SPECIAL)) 785 op->arch->clone.materialname != mt->name && !(op->material & M_SPECIAL))
786 { 786 {
787 strcpy (buf, mt->description); 787 strcpy (buf, mt->description);
788 len = strlen (buf); 788 len = strlen (buf);
789 safe_strcat (buf, " ", &len, MAX_BUF); 789 safe_strcat (buf, " ", &len, MAX_BUF);
1502 LOG (llevDebug, "need_identify: %s does not need to be id'd\n", op->name); 1502 LOG (llevDebug, "need_identify: %s does not need to be id'd\n", op->name);
1503#endif 1503#endif
1504 return 0; 1504 return 0;
1505} 1505}
1506 1506
1507
1508/* 1507/*
1509 * Supposed to fix face-values as well here, but later. 1508 * Supposed to fix face-values as well here, but later.
1510 */ 1509 */
1511
1512void 1510void
1513identify (object *op) 1511identify (object *op)
1514{ 1512{
1515 object *pl; 1513 object *pl;
1516 1514
1538 /* If the object is on a map, make sure we update its face */ 1536 /* If the object is on a map, make sure we update its face */
1539 if (op->map) 1537 if (op->map)
1540 update_object (op, UP_OBJ_FACE); 1538 update_object (op, UP_OBJ_FACE);
1541 else 1539 else
1542 { 1540 {
1543 pl = is_player_inv (op->env); 1541 pl = op->in_player ();
1544 if (pl) 1542 if (pl)
1545 /* A lot of the values can change from an update - might as well send 1543 /* A lot of the values can change from an update - might as well send
1546 * it all. 1544 * it all.
1547 */ 1545 */
1548 esrv_send_item (pl, op); 1546 esrv_send_item (pl, op);
1549 } 1547 }
1550} 1548}
1549

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines