Skip to content

Commit

Permalink
Brewfest: Make minions despawn on coren and make ilsa and ursula resp…
Browse files Browse the repository at this point in the history
…awn during fight if killed
killerwife committed Oct 17, 2021
1 parent dcb01fd commit 06aa5d4
Showing 3 changed files with 32 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -141,7 +141,10 @@ enum
YELL_SENATOR_3 = -1230062,
YELL_SENATOR_4 = -1230063,

YELL_MAGMUS_INTRO = -1230070
YELL_MAGMUS_INTRO = -1230070,

NPC_DIREBREW_MINION = 26776,
NPC_COREN_DIREBREW = 23872,
};

// Random emotes for Grim Guzzler patrons
@@ -230,6 +233,7 @@ class instance_blackrock_depths : public ScriptedInstance
void OnCreatureDeath(Creature* pCreature) override;
void OnCreatureEvade(Creature* pCreature) override;
void OnObjectCreate(GameObject* pGo) override;
void OnCreatureRespawn(Creature* creature) override;

void SetData(uint32 uiType, uint32 uiData) override;
uint32 GetData(uint32 uiType) const override;
Original file line number Diff line number Diff line change
@@ -51,7 +51,6 @@ enum
SPELL_DIREBREWS_DISARM_GROW = 47409,

// npcs
NPC_DIREBREW_MINION = 26776,
NPC_ILSA_DIREBREW = 26764,
NPC_URSULA_DIREBREW = 26822,
NPC_DARK_IRON_ANTAGONIST = 23795,
@@ -108,18 +107,32 @@ struct boss_coren_direbrewAI : public CombatAI
{
switch (summoned->GetEntry())
{
case NPC_DIREBREW_MINION:
summoned->CastSpell(m_creature, SPELL_DIREBREW_MINION_KNOCKBACK, TRIGGERED_OLD_TRIGGERED);
break;
case NPC_ILSA_DIREBREW:
case NPC_URSULA_DIREBREW:
summoned->CastSpell(m_creature, SPELL_PORT_TO_COREN, TRIGGERED_OLD_TRIGGERED);
summoned->AI()->AttackStart(m_creature->GetVictim());
summoned->SetCorpseDelay(5);
break;
}
m_guids.push_back(summoned->GetObjectGuid());
}

void SummonedCreatureDespawn(Creature* summoned) override
{
if (!m_creature->IsAlive() || !m_creature->IsInCombat())
return;

switch (summoned->GetEntry())
{
case NPC_ILSA_DIREBREW:
SetActionReadyStatus(COREN_SPAWN_ILSA, true);
break;
case NPC_URSULA_DIREBREW:
SetActionReadyStatus(COREN_SPAWN_ILSA, true);
break;
}
}

void JustSummoned(GameObject* go) override
{
go->Use(m_creature);
@@ -149,19 +162,15 @@ struct boss_coren_direbrewAI : public CombatAI
// Spawn Ilsa
if (m_creature->GetHealthPercent() < 66.0f)
{
float fX, fY, fZ;
m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 10, fX, fY, fZ);
m_creature->SummonCreature(NPC_ILSA_DIREBREW, fX, fY, fZ, 0, TEMPSPAWN_DEAD_DESPAWN, 0);
m_creature->SummonCreature(NPC_ILSA_DIREBREW, 889.1403f, -130.9002f, -49.660107f, 5.427973747253417968f, TEMPSPAWN_DEAD_DESPAWN, 0);
SetActionReadyStatus(action, false);
}
break;
case COREN_SPAWN_URSULA:
// Spawn Ursula
if (m_creature->GetHealthPercent() < 33.0f)
{
float fX, fY, fZ;
m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 10, fX, fY, fZ);
m_creature->SummonCreature(NPC_URSULA_DIREBREW, fX, fY, fZ, 0, TEMPSPAWN_DEAD_DESPAWN, 0);
m_creature->SummonCreature(NPC_URSULA_DIREBREW, 894.956f, -127.81718f, -49.659885f, 5.270894527435302734f, TEMPSPAWN_DEAD_DESPAWN, 0);
SetActionReadyStatus(action, false);
}
break;
Original file line number Diff line number Diff line change
@@ -75,6 +75,7 @@ void instance_blackrock_depths::OnCreatureCreate(Creature* pCreature)
case NPC_DUGHAL:
case NPC_LOREGRAIN:
case NPC_RIBBLY_SCREWSPIGGOT:
case NPC_COREN_DIREBREW:
m_npcEntryGuidStore[pCreature->GetEntry()] = pCreature->GetObjectGuid();
break;
case NPC_WARBRINGER_CONST:
@@ -181,6 +182,13 @@ void instance_blackrock_depths::OnObjectCreate(GameObject* pGo)
m_goEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid();
}

void instance_blackrock_depths::OnCreatureRespawn(Creature* creature)
{
if (creature->GetEntry() == NPC_DIREBREW_MINION)
if (Creature* coren = GetSingleCreatureFromStorage(NPC_COREN_DIREBREW))
coren->AI()->JustSummoned(creature);
}

void instance_blackrock_depths::SetData(uint32 uiType, uint32 uiData)
{
switch (uiType)

0 comments on commit 06aa5d4

Please sign in to comment.