[Skill Caps] Further improvements (#4205)

This commit is contained in:
Chris Miles
2024-03-24 12:04:26 -05:00
committed by GitHub
parent 823a5956de
commit cf7f0f4321
19 changed files with 94 additions and 77 deletions
+3 -2
View File
@@ -48,6 +48,7 @@
#include "npc_scale_manager.h"
#include "bot.h"
#include "../common/skill_caps.h"
#include <stdio.h>
#include <string>
@@ -363,7 +364,7 @@ NPC::NPC(const NPCType *npc_type_data, Spawn2 *in_respawn, const glm::vec4 &posi
//give NPCs skill values...
int r;
for (r = 0; r <= EQ::skills::HIGHEST_SKILL; r++) {
skills[r] = content_db.GetSkillCap(GetClass(), (EQ::skills::SkillType)r, moblevel);
skills[r] = skill_caps.GetSkillCap(GetClass(), (EQ::skills::SkillType)r, moblevel).cap;
}
// 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
@@ -3437,7 +3438,7 @@ void NPC::RecalculateSkills()
{
int r;
for (r = 0; r <= EQ::skills::HIGHEST_SKILL; r++) {
skills[r] = content_db.GetSkillCap(GetClass(), (EQ::skills::SkillType)r, level);
skills[r] = skill_caps.GetSkillCap(GetClass(), (EQ::skills::SkillType)r, level).cap;
}
// some overrides -- really we need to be able to set skills for mobs in the DB