mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Scripts/Naxxramas: Missing nullptr check in Patchwerk. Closes #20247.
This commit is contained in:
@@ -140,14 +140,13 @@ public:
|
||||
}
|
||||
|
||||
Unit* pHatefulTarget = nullptr;
|
||||
if (!thirdThreat)
|
||||
if (!secondThreat)
|
||||
pHatefulTarget = currentVictim;
|
||||
else if (!thirdThreat)
|
||||
pHatefulTarget = secondThreat->GetVictim();
|
||||
else if (secondThreat)
|
||||
else
|
||||
pHatefulTarget = (secondThreat->GetVictim()->GetHealth() < thirdThreat->GetVictim()->GetHealth()) ? thirdThreat->GetVictim() : secondThreat->GetVictim();
|
||||
|
||||
if (!pHatefulTarget)
|
||||
pHatefulTarget = me->GetVictim();
|
||||
|
||||
DoCast(pHatefulTarget, SPELL_HATEFUL_STRIKE, true);
|
||||
|
||||
// add threat to highest threat targets
|
||||
|
||||
Reference in New Issue
Block a user