mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
[Combat] Add rule to set stun duration. Add rule to add stun messages. (#4284)
* [Combat] Add rule to set stun duration. Add rule to add stun messages. * Missed a spot with hard coded constant. * Fix spacing.
This commit is contained in:
+10
-2
@@ -4379,7 +4379,15 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
|
||||
if (zone->random.Int(0, 100) >= stun_resist) {
|
||||
// did stun
|
||||
// nothing else to check!
|
||||
Stun(2000); // straight 2 seconds every time
|
||||
Stun(RuleI(Combat, StunDuration));
|
||||
if (RuleB(Combat, ClientStunMessage) && attacker->IsClient()) {
|
||||
if (attacker) {
|
||||
entity_list.MessageClose(this, true, 500, Chat::Emote, "%s is stunned after being bashed by %s.", GetCleanName(), attacker->GetCleanName());
|
||||
}
|
||||
else {
|
||||
entity_list.MessageClose(this, true, 500, Chat::Emote, "%s is stunned by a bash to the head.", GetCleanName());
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
// stun resist passed!
|
||||
@@ -5463,7 +5471,7 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
|
||||
// staggers message.
|
||||
if (defender->GetLevel() <= 55 && !defender->GetSpecialAbility(UNSTUNABLE)) {
|
||||
defender->Emote("staggers.");
|
||||
defender->Stun(2000);
|
||||
defender->Stun(RuleI(Combat, StunDuration));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user