fix(Core/Creature): Fire JustRespawned for non-compat spawns (#25482)

Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
Co-authored-by: Treeston <treeston.mmoc@gmail.com>
This commit is contained in:
blinkysc
2026-04-17 09:28:52 -05:00
committed by GitHub
parent 589784baa0
commit 7cc967adc4
2 changed files with 9 additions and 4 deletions

View File

@@ -284,7 +284,7 @@ Creature::Creature(): Unit(), MovableMapObject(), m_groupLootTimer(0), lootingGr
m_CombatDistance = 0.0f;
ResetLootMode(); // restore default loot mode
TriggerJustRespawned = false;
TriggerJustRespawned = true;
_focusSpell = nullptr;
m_respawnedTime = time_t(0);
@@ -705,12 +705,12 @@ bool Creature::UpdateEntry(uint32 Entry, const CreatureData* data, bool changele
void Creature::Update(uint32 diff)
{
if (IsAIEnabled && TriggerJustRespawned)
if (IsAIEnabled && TriggerJustRespawned && getDeathState() != DeathState::Dead)
{
if (_respawnCompatibilityMode && m_vehicleKit)
m_vehicleKit->Reset();
TriggerJustRespawned = false;
AI()->JustRespawned();
if (m_vehicleKit)
m_vehicleKit->Reset();
}
switch (m_deathState)