fix(Core/Scripts): Fix Aeranas reset loop during quest Avruu's Orb (#25290)
Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
parent
4cedf09ff3
commit
433b9afe9b
1 changed files with 16 additions and 4 deletions
|
|
@ -83,6 +83,9 @@ public:
|
|||
|
||||
void Reset() override
|
||||
{
|
||||
if (_defeated)
|
||||
return;
|
||||
|
||||
faction_Timer = 8000;
|
||||
envelopingWinds_Timer = 9000;
|
||||
shock_Timer = 5000;
|
||||
|
|
@ -93,6 +96,15 @@ public:
|
|||
Talk(SAY_SUMMON);
|
||||
}
|
||||
|
||||
void JustReachedHome() override
|
||||
{
|
||||
if (_defeated)
|
||||
{
|
||||
Talk(SAY_FREE);
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (faction_Timer)
|
||||
|
|
@ -110,12 +122,11 @@ public:
|
|||
|
||||
if (HealthBelowPct(30))
|
||||
{
|
||||
me->SetFaction(FACTION_FRIENDLY);
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
|
||||
_defeated = true;
|
||||
me->RemoveAllAuras();
|
||||
me->GetThreatMgr().ClearAllThreat();
|
||||
me->SetFaction(FACTION_FRIENDLY);
|
||||
me->CombatStop(true);
|
||||
Talk(SAY_FREE);
|
||||
me->GetThreatMgr().ClearAllThreat();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -140,6 +151,7 @@ public:
|
|||
uint32 faction_Timer;
|
||||
uint32 envelopingWinds_Timer;
|
||||
uint32 shock_Timer;
|
||||
bool _defeated = false;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue