mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/AI: EscortAI init logic moved from JustAppeared to InitializeAI. There are no escort NPCs using compatibility mode anymore, so this is equivalent.
As a result, inheriting scripts calling Start in on-create hooks (like JustSummoned) will now work properly again. Tagging #20310.
This commit is contained in:
@@ -72,7 +72,7 @@ void EscortAI::JustDied(Unit* /*killer*/)
|
||||
}
|
||||
}
|
||||
|
||||
void EscortAI::JustAppeared()
|
||||
void EscortAI::InitializeAI()
|
||||
{
|
||||
_escortState = STATE_ESCORT_NONE;
|
||||
|
||||
@@ -84,8 +84,6 @@ void EscortAI::JustAppeared()
|
||||
|
||||
if (me->GetFaction() != me->GetCreatureTemplate()->faction)
|
||||
me->RestoreFaction();
|
||||
|
||||
Reset();
|
||||
}
|
||||
|
||||
void EscortAI::ReturnToLastPoint()
|
||||
|
||||
@@ -40,9 +40,9 @@ struct TC_GAME_API EscortAI : public ScriptedAI
|
||||
explicit EscortAI(Creature* creature);
|
||||
~EscortAI() { }
|
||||
|
||||
void InitializeAI() override;
|
||||
void MoveInLineOfSight(Unit* who) override;
|
||||
void JustDied(Unit*) override;
|
||||
void JustAppeared() override;
|
||||
void ReturnToLastPoint();
|
||||
void EnterEvadeMode(EvadeReason /*why*/ = EVADE_REASON_OTHER) override;
|
||||
void MovementInform(uint32, uint32) override;
|
||||
|
||||
Reference in New Issue
Block a user