Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CF: patch for magic xp -- skill_util.c
- To: crossfire (at) ifi.uio.no
- Subject: CF: patch for magic xp -- skill_util.c
- From: "Brian Thomas" <>
- Date: Thu, 2 May 96 01:11:30 EDT
- Cc:
- Sender:
Note there are 2 sections to this patch. If you
already applied the first part, strip it off here
before you patch away. -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);