Skip to content

Commit

Permalink
Fix Razorgore melee attacks when possessed.
Browse files Browse the repository at this point in the history
  • Loading branch information
ratkosrb committed Dec 1, 2023
1 parent e1a4ca5 commit 91ab2c1
Showing 1 changed file with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,20 @@ struct boss_razorgoreAI : public ScriptedAI
m_creature->GetThreatManager().modifyThreatPercent(pTarget, -30);
}

void Aggro(Unit* /*pWho*/) override
void AttackStart(Unit* pVictim) override
{
CharmInfo* charmInfo = m_creature->GetCharmInfo();
if (charmInfo && charmInfo->IsCommandAttack())
{
charmInfo->SetIsCommandAttack(false);
if (m_creature->IsValidAttackTarget(pVictim))
m_creature->Attack(pVictim, true);
}
else
ScriptedAI::AttackStart(pVictim);
}

void EnterCombat(Unit* /*pWho*/) override
{
if (!m_pInstance)
return;
Expand Down Expand Up @@ -255,7 +268,7 @@ struct boss_razorgoreAI : public ScriptedAI
{
if (m_creature->HasUnitState(UNIT_STAT_POSSESSED))
{
ScriptedAI::UpdateAI(uiDiff);
DoMeleeAttackIfReady();
return;
}

Expand Down

0 comments on commit 91ab2c1

Please sign in to comment.