fix(Scripts/MoltenCore): Majordomo's spawn line should be said instantly (#9515)

This commit is contained in:
Skjalf
2021-12-07 15:18:50 -03:00
committed by GitHub
parent 385473d39d
commit f56953f920
2 changed files with 14 additions and 18 deletions

View File

@@ -128,7 +128,7 @@ public:
struct boss_majordomoAI : public BossAI
{
boss_majordomoAI(Creature* creature) : BossAI(creature, DATA_MAJORDOMO_EXECUTUS), spawnInTextTimer(0) {}
boss_majordomoAI(Creature* creature) : BossAI(creature, DATA_MAJORDOMO_EXECUTUS) {}
void JustDied(Unit* /*killer*/) override
{
@@ -166,8 +166,6 @@ public:
}
}
}
spawnInTextTimer = 10000;
}
else
{
@@ -218,7 +216,6 @@ public:
_EnterCombat();
DoCastAOE(SPELL_SEPARATION_ANXIETY);
spawnInTextTimer = 0;
Talk(SAY_AGGRO);
DoCastSelf(SPELL_AEGIS_OF_RAGNAROS, true);
@@ -290,18 +287,6 @@ public:
void UpdateAI(uint32 diff) override
{
if (spawnInTextTimer)
{
if (spawnInTextTimer <= diff)
{
spawnInTextTimer = 0;
Talk(SAY_SPAWN);
}
else
{
spawnInTextTimer -= diff;
}
}
switch (events.GetPhaseMask())
{
@@ -510,7 +495,6 @@ public:
private:
GuidSet static_minionsGUIDS; // contained data should be changed on encounter completion
GuidSet aliveMinionsGUIDS; // used for calculations
uint32 spawnInTextTimer;
};
bool OnGossipHello(Player* player, Creature* creature) override

View File

@@ -52,6 +52,8 @@ MCBossObject const linkedBossObjData[MAX_MC_LINKED_BOSS_OBJ]=
{ DATA_SULFURON, GO_RUNE_KORO, GO_CIRCLE_SULFURON },
};
constexpr uint8 SAY_SPAWN = 1;
class instance_molten_core : public InstanceMapScript
{
public:
@@ -349,7 +351,17 @@ public:
return;
}
instance->SummonCreature(NPC_MAJORDOMO_EXECUTUS, GetBossState(DATA_MAJORDOMO_EXECUTUS) != DONE ? MajordomoSummonPos : MajordomoRagnaros);
if (GetBossState(DATA_MAJORDOMO_EXECUTUS) != DONE)
{
if (Creature* creature = instance->SummonCreature(NPC_MAJORDOMO_EXECUTUS, MajordomoSummonPos))
{
creature->AI()->Talk(SAY_SPAWN);
}
}
else
{
instance->SummonCreature(NPC_MAJORDOMO_EXECUTUS, MajordomoRagnaros);
}
}
bool CheckMajordomoExecutus() const