Skip to content

Commit

Permalink
Refactor Dire Maul arena (vmangos#2773)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gamemechanicwow authored Sep 22, 2024
1 parent 2fc2072 commit d199895
Showing 1 changed file with 12 additions and 23 deletions.
35 changes: 12 additions & 23 deletions src/scripts/kalimdor/feralas/feralas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,15 +280,12 @@ struct MushgogAI : public ScriptedAI

void Aggro(Unit* pWho) override
{
m_creature->SetInCombatWithZone();
if (!m_bAggro)
{
std::list<Creature*> m_AggroList;
GetCreatureListWithEntryInGrid(m_AggroList, m_creature, 14395, 1800.0f);
for (const auto& it : m_AggroList)
if (Creature* pGriniblix = GetClosestCreatureWithEntry(m_creature, 14395, 120.0f))
{
if (it->IsAlive())
it->MonsterYell(GRINIBLIX_THE_SPECTATOR_ANNOUNCE_TEXT_01);
if (pGriniblix->IsAlive())
pGriniblix->MonsterYell(GRINIBLIX_THE_SPECTATOR_ANNOUNCE_TEXT_01);
}
m_bAggro = true;
}
Expand Down Expand Up @@ -401,28 +398,23 @@ struct TheRazzaAI : public ScriptedAI

void Aggro(Unit* pWho) override
{
m_creature->SetInCombatWithZone();
if (!m_bAggro)
{
std::list<Creature*> m_AggroList;
GetCreatureListWithEntryInGrid(m_AggroList, m_creature, 14395, 1800.0f);
for (const auto& it : m_AggroList)
if (Creature* pGriniblix = GetClosestCreatureWithEntry(m_creature, 14395, 120.0f))
{
if (it->IsAlive())
it->MonsterYell(GRINIBLIX_THE_SPECTATOR_ANNOUNCE_TEXT_02);
if (pGriniblix->IsAlive())
pGriniblix->MonsterYell(GRINIBLIX_THE_SPECTATOR_ANNOUNCE_TEXT_02);
}
m_bAggro = true;
}
}

void JustDied(Unit* pWho) override
{
std::list<Creature*> m_AggroList;
GetCreatureListWithEntryInGrid(m_AggroList, m_creature, 14395, 1800.0f);
for (const auto& it : m_AggroList)
if (Creature* pGriniblix = GetClosestCreatureWithEntry(m_creature, 14395, 120.0f))
{
if (it->IsAlive())
it->MonsterYell(GRINIBLIX_THE_SPECTATOR_ANNOUNCE_TEXT_03);
if (pGriniblix->IsAlive())
pGriniblix->MonsterYell(GRINIBLIX_THE_SPECTATOR_ANNOUNCE_TEXT_03);
}
}

Expand Down Expand Up @@ -506,15 +498,12 @@ struct SkarrTheUnbreakableAI : public ScriptedAI

void Aggro(Unit* pWho) override
{
m_creature->SetInCombatWithZone();
if (!m_bAggro)
{
std::list<Creature*> m_AggroList;
GetCreatureListWithEntryInGrid(m_AggroList, m_creature, 14395, 1800.0f);
for (const auto& it : m_AggroList)
if (Creature* pGriniblix = GetClosestCreatureWithEntry(m_creature, 14395, 120.0f))
{
if (it->IsAlive())
it->MonsterYell(GRINIBLIX_THE_SPECTATOR_ANNOUNCE_TEXT_04);
if (pGriniblix->IsAlive())
pGriniblix->MonsterYell(GRINIBLIX_THE_SPECTATOR_ANNOUNCE_TEXT_04);
}
m_bAggro = true;
}
Expand Down

0 comments on commit d199895

Please sign in to comment.