Added NPC::RecalculateSkills

This commit is contained in:
Xackery Xtal
2020-02-18 09:21:18 -08:00
parent a63dc7d5e0
commit 0a4429c0c0
5 changed files with 59 additions and 1 deletions
+25
View File
@@ -3209,3 +3209,28 @@ void NPC::AIYellForHelp(Mob *sender, Mob *attacker)
}
}
void NPC::RecalculateSkills()
{
int r;
for (r = 0; r <= EQEmu::skills::HIGHEST_SKILL; r++) {
skills[r] = database.GetSkillCap(GetClass(), (EQEmu::skills::SkillType)r, level);
}
// some overrides -- really we need to be able to set skills for mobs in the DB
// There are some known low level SHM/BST pets that do not follow this, which supports
// the theory of needing to be able to set skills for each mob separately
if (!IsBot()) {
if (level > 50) {
skills[EQEmu::skills::SkillDoubleAttack] = 250;
skills[EQEmu::skills::SkillDualWield] = 250;
}
else if (level > 3) {
skills[EQEmu::skills::SkillDoubleAttack] = level * 5;
skills[EQEmu::skills::SkillDualWield] = skills[EQEmu::skills::SkillDoubleAttack];
}
else {
skills[EQEmu::skills::SkillDoubleAttack] = level * 5;
}
}
}