From 68a54e6d91206ed86bad5255c04fa0f932b7856b Mon Sep 17 00:00:00 2001 From: w1sht0l1v3 Date: Wed, 5 Sep 2012 14:04:09 +0300 Subject: Core/SAI: Add condition to run SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL code --- src/server/game/AI/SmartScripts/SmartAI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/server/game/AI/SmartScripts') diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index b86521fee45..a7660a0a44b 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -634,7 +634,7 @@ void SmartAI::SpellHitTarget(Unit* target, const SpellInfo* spellInfo) void SmartAI::DamageTaken(Unit* doneBy, uint32& damage) { GetScript()->ProcessEventsFor(SMART_EVENT_DAMAGED, doneBy, damage); - if (damage >= me->GetHealth() - mInvincibilityHpLevel) + if ((damage >= me->GetHealth() - mInvincibilityHpLevel) && (mInvincibilityHpLevel > 0)) { damage = 0; me->SetHealth(mInvincibilityHpLevel); -- cgit v1.2.3