- Timestamp:
- 07/03/09 22:14:12 (14 months ago)
- Files:
-
- 1 modified
-
trunk/src/object/obj-util.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/object/obj-util.c
r1462 r1464 1523 1523 bool object_similar(const object_type *o_ptr, const object_type *j_ptr) 1524 1524 { 1525 int i; 1525 1526 int total = o_ptr->number + j_ptr->number; 1526 1527 … … 1564 1565 } 1565 1566 1566 /* Weapons and Armor*/1567 /* Weaponsm, armour and jewelery */ 1567 1568 case TV_BOW: 1568 1569 case TV_DIGGING: … … 1579 1580 case TV_HARD_ARMOR: 1580 1581 case TV_DRAG_ARMOR: 1581 {1582 /* Fall through */1583 }1584 1585 /* Rings, Amulets, Lites */1586 1582 case TV_RING: 1587 1583 case TV_AMULET: 1588 1584 case TV_LITE: 1589 1585 { 1590 /* Require both items to be known */1591 if (!object_known_p(o_ptr) || !object_known_p(j_ptr)) return (0);1592 1593 1586 /* Fall through */ 1594 1587 } … … 1599 1592 case TV_SHOT: 1600 1593 { 1601 /* Require identical knowledge of both items */1602 if (object_known_p(o_ptr) != object_known_p(j_ptr)) return (0);1603 1604 1594 /* Require identical "bonuses" */ 1605 1595 if (o_ptr->to_h != j_ptr->to_h) return (FALSE); … … 1636 1626 default: 1637 1627 { 1638 /* Require knowledge */1639 if (!object_known_p(o_ptr) || !object_known_p(j_ptr)) return (0);1640 1641 1628 /* Probably okay */ 1642 1629 break; … … 1654 1641 1655 1642 /* Different flags */ 1656 if (o_ptr->flags[0] != j_ptr->flags[0] || 1657 o_ptr->flags[1] != j_ptr->flags[1] || 1658 o_ptr->flags[2] != j_ptr->flags[2]) 1659 return FALSE; 1643 for (i = 0; i < OBJ_FLAG_N; i++) 1644 if (o_ptr->flags[i] != j_ptr->flags[1]) 1645 return FALSE; 1660 1646 1661 1647 … … 1689 1675 object_kind *k_ptr = &k_info[o_ptr->k_idx]; 1690 1676 1677 int i; 1691 1678 int total = o_ptr->number + j_ptr->number; 1692 1679 … … 1694 1681 o_ptr->number = ((total < MAX_STACK_SIZE) ? total : (MAX_STACK_SIZE - 1)); 1695 1682 1696 /* Hack -- Blend "known" status */ 1697 if (object_known_p(j_ptr)) object_known(o_ptr); 1698 1699 /* Hack -- Blend store status */ 1700 if (j_ptr->ident & (IDENT_STORE)) o_ptr->ident |= (IDENT_STORE); 1683 /* Blend all knowledge */ 1684 o_ptr->ident |= (j_ptr->ident & ~IDENT_EMPTY); 1685 for (i = 0; i < OBJ_FLAG_N; i++) 1686 o_ptr->known_flags[i] |= j_ptr->known_flags[i]; 1701 1687 1702 1688 /* Hack -- Blend "notes" */ … … 3593 3579 u32b f[OBJ_FLAG_N]; 3594 3580 3595 /* Not known */3596 if (!object_known_p(o_ptr)) return (FALSE);3597 3598 3581 /* Extract the flags */ 3599 3582 object_flags(o_ptr, f);
