aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTrisjdc <trisjdc@gmail.com>2014-05-15 17:05:02 +0100
committerTrisjdc <trisjdc@gmail.com>2014-05-15 17:05:02 +0100
commit50336af1c74d188d1afd1911ca5886c547c83374 (patch)
tree0496d21fc6a8a2d448b9c1cd09fc649457850449 /src
parent32386be8e7ff2ab0633069780d2d97b5a186e156 (diff)
Core/SAI: Prevent nullifying damage, because of player damage requirements
Diffstat (limited to 'src')
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index 098f3130fed..e769b7c22a5 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -618,10 +618,7 @@ void SmartAI::DamageTaken(Unit* doneBy, uint32& damage)
{
GetScript()->ProcessEventsFor(SMART_EVENT_DAMAGED, doneBy, damage);
if (mInvincibilityHpLevel && (damage >= me->GetHealth() - mInvincibilityHpLevel))
- {
- damage = 0;
- me->SetHealth(mInvincibilityHpLevel);
- }
+ damage = me->GetHealth() - mInvincibilityHpLevel; // damage should not be nullified, because of player damage req.
}
void SmartAI::HealReceived(Unit* doneBy, uint32& addhealth)