Add Dual Wield/Double Attack NPC skill overrides

The vast majority of mobs on live follow this path. The exception
appears most commonly with PC pets though. Eventually these should
be changeable in the DB.
This commit is contained in:
Michael Cook (mackal) 2015-07-05 00:42:06 -04:00
parent 947145a642
commit 8d3d3d2af2

View File

@ -278,6 +278,18 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, const glm::vec4& position, int if
for(r = 0; r <= HIGHEST_SKILL; r++) { for(r = 0; r <= HIGHEST_SKILL; r++) {
skills[r] = database.GetSkillCap(GetClass(),(SkillUseTypes)r,moblevel); skills[r] = database.GetSkillCap(GetClass(),(SkillUseTypes)r,moblevel);
} }
// 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 (moblevel > 50) {
skills[SkillDoubleAttack] = 250;
skills[SkillDualWield] = 250;
} else if (moblevel > 3) {
skills[SkillDoubleAttack] = moblevel * 5;
skills[SkillDualWield] = skills[SkillDoubleAttack];
} else {
skills[SkillDoubleAttack] = moblevel * 5;
}
if(d->trap_template > 0) if(d->trap_template > 0)
{ {