… | |
… | |
1144 | apply_container (op, sack); |
1144 | apply_container (op, sack); |
1145 | return 1; |
1145 | return 1; |
1146 | } |
1146 | } |
1147 | } |
1147 | } |
1148 | } |
1148 | } |
|
|
1149 | |
1149 | new_draw_info (NDI_UNIQUE, 0, op, buf); |
1150 | new_draw_info (NDI_UNIQUE, 0, op, buf); |
|
|
1151 | |
1150 | if (op->contr) |
1152 | if (op->contr) |
1151 | op->contr->socket.update_look = 1; |
1153 | op->contr->socket->update_look = 1; |
|
|
1154 | |
1152 | return 1; |
1155 | return 1; |
1153 | } |
1156 | } |
1154 | |
1157 | |
1155 | /** |
1158 | /** |
1156 | * Eneq(@csd.uu.se): Handle apply on containers. This is for containers |
1159 | * Eneq(@csd.uu.se): Handle apply on containers. This is for containers |
… | |
… | |
1787 | |
1790 | |
1788 | if (!QUERY_FLAG (tmp, FLAG_IDENTIFIED)) |
1791 | if (!QUERY_FLAG (tmp, FLAG_IDENTIFIED)) |
1789 | { |
1792 | { |
1790 | /*exp_gain *= 2; because they just identified it too */ |
1793 | /*exp_gain *= 2; because they just identified it too */ |
1791 | SET_FLAG (tmp, FLAG_IDENTIFIED); |
1794 | SET_FLAG (tmp, FLAG_IDENTIFIED); |
|
|
1795 | |
1792 | /* If in a container, update how it looks */ |
1796 | /* If in a container, update how it looks */ |
1793 | if (tmp->env) |
1797 | if (tmp->env) |
1794 | esrv_update_item (UPD_FLAGS | UPD_NAME, op, tmp); |
1798 | esrv_update_item (UPD_FLAGS | UPD_NAME, op, tmp); |
1795 | else |
1799 | else |
1796 | op->contr->socket.update_look = 1; |
1800 | op->contr->socket->update_look = 1; |
1797 | } |
1801 | } |
|
|
1802 | |
1798 | change_exp (op, exp_gain, skill_ob->skill, 0); |
1803 | change_exp (op, exp_gain, skill_ob->skill, 0); |
1799 | SET_FLAG (tmp, FLAG_NO_SKILL_IDENT); /* so no more xp gained from this book */ |
1804 | SET_FLAG (tmp, FLAG_NO_SKILL_IDENT); /* so no more xp gained from this book */ |
1800 | } |
1805 | } |
1801 | } |
1806 | } |
1802 | |
1807 | |
… | |
… | |
1949 | new_draw_info_format (NDI_UNIQUE, 0, op, "The spellbook contains the %s level spell %s.", get_levelnumber (spell->level), &spell->name); |
1954 | new_draw_info_format (NDI_UNIQUE, 0, op, "The spellbook contains the %s level spell %s.", get_levelnumber (spell->level), &spell->name); |
1950 | |
1955 | |
1951 | if (!QUERY_FLAG (tmp, FLAG_IDENTIFIED)) |
1956 | if (!QUERY_FLAG (tmp, FLAG_IDENTIFIED)) |
1952 | { |
1957 | { |
1953 | identify (tmp); |
1958 | identify (tmp); |
|
|
1959 | |
1954 | if (tmp->env) |
1960 | if (tmp->env) |
1955 | esrv_update_item (UPD_FLAGS | UPD_NAME, op, tmp); |
1961 | esrv_update_item (UPD_FLAGS | UPD_NAME, op, tmp); |
1956 | else |
1962 | else |
1957 | op->contr->socket.update_look = 1; |
1963 | op->contr->socket->update_look = 1; |
1958 | } |
1964 | } |
1959 | |
1965 | |
1960 | /* I removed the check for special_prayer_mark here - it didn't make |
1966 | /* I removed the check for special_prayer_mark here - it didn't make |
1961 | * a lot of sense - special prayers are not found in spellbooks, and |
1967 | * a lot of sense - special prayers are not found in spellbooks, and |
1962 | * if the player doesn't know the spell, doesn't make a lot of sense that |
1968 | * if the player doesn't know the spell, doesn't make a lot of sense that |