fix(Scripts/LBRS): Wyrmthalak, adds no longer despawn after death (#9036)

This commit is contained in:
patou01
2021-11-09 03:57:59 +01:00
committed by GitHub
parent f090d23d2c
commit 6dab5a32c0
2 changed files with 11 additions and 3 deletions

View File

@@ -41,8 +41,10 @@ enum Adds
NPC_SMOLDERTHORN_BERSERKER = 9268
};
const Position SummonLocation1 = { -39.355f, -513.456f, 88.472f, 4.679f };
const Position SummonLocation2 = { -49.875f, -511.896f, 88.195f, 4.613f };
constexpr uint32 CALL_HELP = 0;
const Position SummonLocation1 = {-49.43f, -455.82f, 77.82f, 4.61f};
const Position SummonLocation2 = {-58.48f, -456.29f, 77.82f, 4.613f};
class boss_overlord_wyrmthalak : public CreatureScript
{
@@ -77,7 +79,7 @@ public:
void JustDied(Unit* /*killer*/) override
{
_JustDied();
instance->SetBossState(DATA_OVERLORD_WYRMTHALAK, DONE);
}
void UpdateAI(uint32 diff) override
@@ -87,6 +89,7 @@ public:
if (!Summoned && HealthBelowPct(51))
{
Talk(CALL_HELP);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
{
if (Creature* warlord = me->SummonCreature(NPC_SPIRESTONE_WARLORD, SummonLocation1, TEMPSUMMON_TIMED_DESPAWN, 300 * IN_MILLISECONDS))