ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/skill_util.C
(Generate patch)

Comparing deliantra/server/server/skill_util.C (file contents):
Revision 1.55 by root, Wed May 30 03:03:10 2007 UTC vs.
Revision 1.56 by root, Mon Jun 4 13:04:00 2007 UTC

61 * subtypes. 61 * subtypes.
62 */ 62 */
63void 63void
64init_skills (void) 64init_skills (void)
65{ 65{
66 for (archetype *at = first_archetype; at; at = at->next) 66 for_all_archetypes (at)
67 if (at->clone.type == SKILL) 67 if (at->type == SKILL)
68 { 68 {
69 if (skill_names[at->clone.subtype]) 69 if (skill_names[at->subtype])
70 LOG (llevError, "init_skills: multiple skill using same subtype %d, %s, %s\n", 70 LOG (llevError, "init_skills: multiple skill using same subtype %d, %s, %s\n",
71 at->clone.subtype, &skill_names[at->clone.subtype], &at->clone.skill); 71 at->subtype, &skill_names[at->subtype], &at->skill);
72 else 72 else
73 skill_names[at->clone.subtype] = at->clone.skill; 73 skill_names[at->subtype] = at->skill;
74 } 74 }
75 75
76 /* This isn't really an error if there is no skill subtype set, but 76 /* This isn't really an error if there is no skill subtype set, but
77 * checking for this may catch some user errors. 77 * checking for this may catch some user errors.
78 */ 78 */
548 /* if skill really is a skill, then we can look at the skill archetype for 548 /* if skill really is a skill, then we can look at the skill archetype for
549 * bse reward value (exp) and level multiplier factor. 549 * bse reward value (exp) and level multiplier factor.
550 */ 550 */
551 if (skill->type == SKILL) 551 if (skill->type == SKILL)
552 { 552 {
553 base += skill->arch->clone.stats.exp; 553 base += skill->arch->stats.exp;
554 if (settings.simple_exp) 554 if (settings.simple_exp)
555 { 555 {
556 if (skill->arch->clone.level) 556 if (skill->arch->level)
557 lvl_mult = (float) skill->arch->clone.level / 100.0; 557 lvl_mult = (float) skill->arch->level / 100.0;
558 else 558 else
559 lvl_mult = 1.0; /* no adjustment */ 559 lvl_mult = 1.0; /* no adjustment */
560 } 560 }
561 else 561 else
562 { 562 {
563 if (skill->level) 563 if (skill->level)
564 lvl_mult = ((float) skill->arch->clone.level * (float) op_lvl) / ((float) skill->level * 100.0); 564 lvl_mult = ((float) skill->arch->level * (float) op_lvl) / ((float) skill->level * 100.0);
565 else 565 else
566 lvl_mult = 1.0; 566 lvl_mult = 1.0;
567 } 567 }
568 } 568 }
569 else 569 else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines