mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Merge pull request #12070 from Trisjdc/more_sai
Core/SAI: Prevent nullifying damage, because of player damage requirements
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user