mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 12:31:31 +00:00
Bash/Kick stun will respect UNSTUNABLE now
This commit is contained in:
parent
bd0c325762
commit
4a54e262f6
@ -3563,6 +3563,7 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons
|
||||
|
||||
// Calculate the chance to stun
|
||||
int stun_chance = 0;
|
||||
if (!GetSpecialAbility(UNSTUNABLE)) {
|
||||
if (attacker->IsNPC()) {
|
||||
stun_chance = RuleI(Combat, NPCBashKickStunChance);
|
||||
} else if (attacker->IsClient()) {
|
||||
@ -3575,13 +3576,16 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons
|
||||
stun_chance = 100; // only if you're over level 55 and using kick
|
||||
} else { // higher than base immunity or Client vs. Client
|
||||
// not sure on this number, use same as NPC for now
|
||||
if (skill_used == SkillKick && attacker->GetLevel() < RuleI(Combat, ClientStunLevel))
|
||||
stun_chance = RuleI(Combat, NPCBashKickStunChance);
|
||||
if (skill_used == SkillBash)
|
||||
stun_chance += attacker->spellbonuses.StunBashChance +
|
||||
else if (skill_used == SkillBash)
|
||||
stun_chance = RuleI(Combat, NPCBashKickStunChance) +
|
||||
attacker->spellbonuses.StunBashChance +
|
||||
attacker->itembonuses.StunBashChance +
|
||||
attacker->aabonuses.StunBashChance;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (stun_chance && MakeRandomInt(0, 99) < stun_chance) {
|
||||
// Passed stun, try to resist now
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user