Avoid lookup of charmer or owner in CalculateHeartBeat.

This commit is contained in:
ratkosrb
2025-02-21 08:37:20 +02:00
committed by GitHub
parent d141c9783a
commit bc431059f4
+1 -1
View File
@@ -8368,7 +8368,7 @@ void SpellAuraHolder::CalculateHeartBeat(Unit* caster, Unit* target)
|| m_spellProto->Id == 13327) // Reckless Charge
{
// Only update the random value if a player is involved
if (target->GetCharmerOrOwnerPlayerOrPlayerItself())
if (target->IsCharmerOrOwnerPlayerOrPlayerItself())
_heartBeatRandValue = rand_norm_f() * 100.0f;
}
// For PvE/effects on NPCs. Doesn't affect certain spells with DR (For example: Fear being dispelled by damage).