aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorw1sht0l1v3 <w1sht0l1v3@gmail.com>2012-09-05 14:04:09 +0300
committerw1sht0l1v3 <w1sht0l1v3@gmail.com>2012-09-05 14:04:09 +0300
commit68a54e6d91206ed86bad5255c04fa0f932b7856b (patch)
treef7b08d918448cf8be61238fa85c42323d1bfb4d7 /src
parent4366dd7d83ff523f1ba93321843f11e09152a753 (diff)
Core/SAI: Add condition to run SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL code
Diffstat (limited to 'src')
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp2
1 files changed, 1 insertions, 1 deletions
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);