fix(Scripts/BossAI): add optional variable to BossAI class to make sure the boss calls for help (#18630)
init
This commit is contained in:
parent
88be6d8150
commit
a870173558
4 changed files with 12 additions and 2 deletions
|
|
@ -571,6 +571,7 @@ BossAI::BossAI(Creature* creature, uint32 bossId) : ScriptedAI(creature),
|
|||
summons(creature),
|
||||
_bossId(bossId)
|
||||
{
|
||||
callForHelpRange = 0.0f;
|
||||
if (instance)
|
||||
SetBoundary(instance->GetBossBoundary(bossId));
|
||||
|
||||
|
|
@ -630,6 +631,13 @@ void BossAI::_JustEngagedWith()
|
|||
me->setActive(true);
|
||||
DoZoneInCombat();
|
||||
ScheduleTasks();
|
||||
if (callForHelpRange)
|
||||
{
|
||||
ScheduleTimedEvent(0s, [&]
|
||||
{
|
||||
me->CallForHelp(callForHelpRange);
|
||||
}, 2s);
|
||||
}
|
||||
if (instance)
|
||||
{
|
||||
// bosses do not respawn, check only on enter combat
|
||||
|
|
|
|||
|
|
@ -462,6 +462,8 @@ public:
|
|||
BossAI(Creature* creature, uint32 bossId);
|
||||
~BossAI() override {}
|
||||
|
||||
float callForHelpRange;
|
||||
|
||||
InstanceScript* const instance;
|
||||
|
||||
bool CanRespawn() override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue