From a8f353518e324024fec382aa00b1d8a98378c761 Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Fri, 12 Feb 2016 18:19:03 -0500 Subject: [PATCH] Allow backstabs done with bane weapons to hit targets immune to all melee except bane. Skill attacks will now give appropriate immune messages. --- zone/special_attacks.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/zone/special_attacks.cpp b/zone/special_attacks.cpp index 2c763df13..3758d2e1b 100644 --- a/zone/special_attacks.cpp +++ b/zone/special_attacks.cpp @@ -100,11 +100,14 @@ void Mob::DoSpecialAttackDamage(Mob *who, SkillUseTypes skill, int32 max_damage, //this really should go through the same code as normal melee damage to //pick up all the special behavior there - if (!who) + if ((who == nullptr || ((IsClient() && CastToClient()->dead) || (who->IsClient() && who->CastToClient()->dead)) || HasDied() || (!IsAttackAllowed(who)))) return; + + if(who->GetInvul() || who->GetSpecialAbility(IMMUNE_MELEE)) + max_damage = -5; - if(who->GetInvul() || who->GetSpecialAbility(IMMUNE_MELEE) || who->GetSpecialAbility(IMMUNE_MELEE_EXCEPT_BANE)) - return; //-5? + if (who->GetSpecialAbility(IMMUNE_MELEE_EXCEPT_BANE) && skill != SkillBackstab) + max_damage = -5; uint32 hate = max_damage; if(hate_override > -1)