… | |
… | |
1559 | } |
1559 | } |
1560 | |
1560 | |
1561 | if (player *pl = op->contr) |
1561 | if (player *pl = op->contr) |
1562 | { |
1562 | { |
1563 | bow = pl->ranged_ob; |
1563 | bow = pl->ranged_ob; |
1564 | op->set_weapon (bow); |
1564 | if (!op->change_weapon (bow)) |
|
|
1565 | return 0; |
1565 | } |
1566 | } |
1566 | else |
1567 | else |
1567 | { |
1568 | { |
1568 | for (bow = op->inv; bow; bow = bow->below) |
1569 | for (bow = op->inv; bow; bow = bow->below) |
1569 | /* Don't check for applied - monsters don't apply bows - in that way, they |
1570 | /* Don't check for applied - monsters don't apply bows - in that way, they |
… | |
… | |
1777 | { |
1778 | { |
1778 | LOG (llevError, "Object %s lacks a spell\n", &item->name); |
1779 | LOG (llevError, "Object %s lacks a spell\n", &item->name); |
1779 | return; |
1780 | return; |
1780 | } |
1781 | } |
1781 | |
1782 | |
1782 | op->set_weapon (item); |
1783 | if (!op->change_weapon (item)) |
|
|
1784 | return; |
1783 | |
1785 | |
1784 | if (item->type == WAND) |
1786 | if (item->type == WAND) |
1785 | { |
1787 | { |
1786 | if (item->stats.food <= 0) |
1788 | if (item->stats.food <= 0) |
1787 | { |
1789 | { |