mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Core/SmartAI: Tiny tiny optimization in an if
This commit is contained in:
@@ -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) && (mInvincibilityHpLevel > 0))
|
||||
if (mInvincibilityHpLevel && (damage >= me->GetHealth() - mInvincibilityHpLevel))
|
||||
{
|
||||
damage = 0;
|
||||
me->SetHealth(mInvincibilityHpLevel);
|
||||
|
||||
Reference in New Issue
Block a user