Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CF: skill_util.c.diff
- To: crossfire (at) ifi.uio.no
- Subject: CF: skill_util.c.diff
- From: Brian Thomas <>
- Date: Wed, 1 May 1996 04:28:35 -0400
- Sender:
This patch file includes the patch from previously, if you
already applied that patch, just edit out the first part
of this patch file. -b.t.
*** dk Wed May 1 03:19:07 1996
--- skill_util.c Wed May 1 04:22:28 1996
***************
*** 477,486 ****
--- 477,488 ----
}
while(!feof(skill_params))
{
fgets(skill_name,49,skill_params);
+ if(*skill_name=='#') continue;
+
skillindex=lookup_skill_by_name(skill_name);
if(skillindex == -1) {
LOG(llevError,"\nskill_params has unrecognized skill: %s",skill_name);
continue;
}
***************
*** 1076,1085 ****
--- 1078,1091 ----
if(sk_index<0) return 0; /* bye,bye. We didn't request a valid skill */
/* ok, look for the requested skill */
if((tmp=find_skill(pl,sk_index))) { /* yes, pl does have named skill */
pl->chosen_skill = tmp;
+
+ /* update skill level from exp obj */
+ if(tmp->exp_obj)
+ pl->chosen_skill->level=tmp->exp_obj->level;
if(!tmp->invisible&&!QUERY_FLAG(tmp,FLAG_APPLIED)) { /* for tools */
if(pl->type==PLAYER) {
new_draw_info_format(NDI_UNIQUE, 0, pl,
"You can now use the skill: %s.", skills[sk_index].name);