[Bug Fix] All NPC classes could stun with kick/only warriors could be stunned (#4273)

* [Bug Fix] All NPC classes could stun with kick/only warriors could be stunned.

* Fix default NPCKickStun value to match existing code

* Remove else and make NPC the default.

* assign stun_level in declaration.
This commit is contained in:
Paul Coene
2024-04-24 17:20:58 -04:00
committed by GitHub
parent 1891c9b6de
commit 99612ba7b3
2 changed files with 8 additions and 2 deletions
+6 -2
View File
@@ -4302,8 +4302,12 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
}
}
else if (skill_used == EQ::skills::SkillKick &&
(attacker->GetLevel() > 55 || attacker->IsNPC()) && GetClass() == Class::Warrior) {
can_stun = true;
attacker->GetClass() == Class::Warrior) {
int stun_level = RuleI(Combat, NPCKickStunLevel);
if (attacker->IsClient()) {
stun_level = RuleI(Combat, PCKickStunLevel);
}
can_stun = (attacker->GetLevel() >= stun_level);
}
bool is_immune_to_frontal_stun = false;