Good day.
I created a rule to force training of certain melee skills. The intention is to only force training if the skill is acquired after level 1.
For Riposte below,
\zone\attack.cpp(412)
Code:
if (IsClient()) {
if (!RuleB(Skills, TrainMeleeSkills)) {
CastToClient()->CheckIncreaseSkill(SkillRiposte, other, -10);
}
else if (RuleB(Skills, TrainMeleeSkills) && CastToClient()->HasSkill(SkillRiposte)) {
(CastToClient()->CheckIncreaseSkill(SkillRiposte, other, -10));
}
}
I'm concerned about what will happen when the rule is true and the character does not have <SkillRiposte>. Do I need some kind of escape from this if it goes beyond <else if>? There is quite a bit more code after what is quoted above.
This question applies to several similar issues I had concern about.
Thanks