diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp index 17cf85115..2b06355b9 100644 --- a/src/server/game/AI/CreatureAI.cpp +++ b/src/server/game/AI/CreatureAI.cpp @@ -219,6 +219,12 @@ void CreatureAI::EnterEvadeMode() } } + Reset(); + if (me->IsVehicle()) // use the same sequence of addtoworld, aireset may remove all summons! + { + me->GetVehicleKit()->Reset(true); + } + // despawn bosses at reset - only verified tbc/woltk bosses with this reset type - add bosses in last line respectively (dungeon/raid) and increase array limit CreatureTemplate const* cInfo = sObjectMgr->GetCreatureTemplate(me->GetEntry()); if (cInfo && cInfo->HasFlagsExtra(CREATURE_FLAG_EXTRA_HARD_RESET)) @@ -226,14 +232,6 @@ void CreatureAI::EnterEvadeMode() me->DespawnOnEvade(); me->m_Events.AddEvent(new PhasedRespawn(*me), me->m_Events.CalculateTime(20000)); } - else // bosses will run back to the spawnpoint at reset - { - Reset(); - if (me->IsVehicle()) // use the same sequence of addtoworld, aireset may remove all summons! - { - me->GetVehicleKit()->Reset(true); - } - } } /*void CreatureAI::AttackedBy(Unit* attacker) diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 5c64ef20e..edf6b96a6 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -2012,18 +2012,6 @@ void Creature::DespawnOnEvade() { SetVisible(false); AI()->SummonedCreatureDespawnAll(); - RemoveEvadeAuras(); - - float x, y, z, o; - GetRespawnPosition(x, y, z, &o); - SetHomePosition(x, y, z, o); - SetPosition(x, y, z, o); - - if (IsFalling()) - { - RemoveUnitMovementFlag(MOVEMENTFLAG_FALLING); - } - StopMoving(); } void Creature::RespawnOnEvade()