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:
blinkysc 2026-03-29 04:31:18 -05:00 committed by GitHub
parent 4cedf09ff3
commit 433b9afe9b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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