mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-05 08:28:57 +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. # Conflicts: # src/server/game/AI/ScriptedAI/ScriptedEscortAI.h
This commit is contained in:
@@ -108,7 +108,7 @@ void EscortAI::JustDied(Unit* /*killer*/)
|
||||
}
|
||||
}
|
||||
|
||||
void EscortAI::JustAppeared()
|
||||
void EscortAI::InitializeAI()
|
||||
{
|
||||
_escortState = STATE_ESCORT_NONE;
|
||||
|
||||
@@ -120,8 +120,6 @@ void EscortAI::JustAppeared()
|
||||
|
||||
if (me->GetFaction() != me->GetCreatureTemplate()->faction)
|
||||
me->RestoreFaction();
|
||||
|
||||
Reset();
|
||||
}
|
||||
|
||||
void EscortAI::ReturnToLastPoint()
|
||||
|
||||
@@ -40,10 +40,10 @@ struct TC_GAME_API EscortAI : public ScriptedAI
|
||||
explicit EscortAI(Creature* creature);
|
||||
~EscortAI() { }
|
||||
|
||||
void InitializeAI() override;
|
||||
void UpdateAI(uint32 diff) override; // the "internal" update, calls UpdateEscortAI()
|
||||
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