mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-07 15:28:02 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user