mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-07 23:38:00 +00:00
fix(Core/Vehicles): Prevent accessory double-install and respawn orphans (#25499)
Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
@@ -1113,9 +1113,6 @@ bool Creature::AIM_Initialize(CreatureAI* ai)
|
||||
IsAIEnabled = true;
|
||||
i_AI->InitializeAI();
|
||||
|
||||
// Xinef: Initialize vehicle if it is not summoned!
|
||||
if (GetVehicleKit() && m_spawnId)
|
||||
GetVehicleKit()->Reset();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2052,6 +2049,10 @@ void Creature::Respawn(bool force)
|
||||
|
||||
if (getDeathState() == DeathState::Dead)
|
||||
{
|
||||
// TempSummons (no m_spawnId) shouldn't be resurrected here; TempSummon::Update UnSummons them on the next tick once deathState is Dead.
|
||||
if (!m_spawnId && !force)
|
||||
return;
|
||||
|
||||
if (m_spawnId)
|
||||
{
|
||||
GetMap()->RemoveCreatureRespawnTime(m_spawnId);
|
||||
|
||||
Reference in New Issue
Block a user