version 1.50 | | version 1.51 |
---|
| | |
/* | | /* |
* static char *rcsid_skills_c = | | * static char *rcsid_skills_c = |
* "$Id: skills.c,v 1.50 2004/04/25 06:18:39 mwedel Exp $"; | | * "$Id: skills.c,v 1.51 2004/05/12 04:43:06 mwedel Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
success+= calc_skill_exp(pl,tmp, skill); | | success+= calc_skill_exp(pl,tmp, skill); |
} | | } |
| | |
/* Check ground, too */ | | /* Check ground, too, but only objects the player could pick up */ |
for(tmp=get_map_ob(pl->map,pl->x,pl->y);tmp;tmp=tmp->above) | | for(tmp=get_map_ob(pl->map,pl->x,pl->y);tmp;tmp=tmp->above) |
if (!QUERY_FLAG(tmp,FLAG_IDENTIFIED) && !QUERY_FLAG(tmp,FLAG_KNOWN_CURSED) | | if (can_pick(pl, tmp) && |
| | !QUERY_FLAG(tmp,FLAG_IDENTIFIED) && |
| | !QUERY_FLAG(tmp,FLAG_KNOWN_CURSED) |
&& (QUERY_FLAG(tmp,FLAG_CURSED) || QUERY_FLAG(tmp,FLAG_DAMNED)) && | | && (QUERY_FLAG(tmp,FLAG_CURSED) || QUERY_FLAG(tmp,FLAG_DAMNED)) && |
tmp->item_power < skill->level) { | | tmp->item_power < skill->level) { |
SET_FLAG(tmp,FLAG_KNOWN_CURSED); | | SET_FLAG(tmp,FLAG_KNOWN_CURSED); |
| | |
success+=calc_skill_exp(pl,tmp, skill); | | success+=calc_skill_exp(pl,tmp, skill); |
} | | } |
| | |
/* Check ground, too */ | | /* Check ground, too, but like above, only if the object can be picked up*/ |
for(tmp=get_map_ob(pl->map,pl->x,pl->y);tmp;tmp=tmp->above) | | for(tmp=get_map_ob(pl->map,pl->x,pl->y);tmp;tmp=tmp->above) |
if(!QUERY_FLAG(tmp,FLAG_IDENTIFIED) && !QUERY_FLAG(tmp,FLAG_KNOWN_MAGICAL) | | if (can_pick(pl, tmp) && |
| | !QUERY_FLAG(tmp,FLAG_IDENTIFIED) && |
| | !QUERY_FLAG(tmp,FLAG_KNOWN_MAGICAL) |
&& (is_magical(tmp)) && tmp->item_power < skill->level) { | | && (is_magical(tmp)) && tmp->item_power < skill->level) { |
SET_FLAG(tmp,FLAG_KNOWN_MAGICAL); | | SET_FLAG(tmp,FLAG_KNOWN_MAGICAL); |
esrv_update_item(UPD_FLAGS, pl, tmp); | | esrv_update_item(UPD_FLAGS, pl, tmp); |