mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-19 08:30:34 +01:00
Core/Vehicles: Fix accessories disappearing on reset
(cherry picked from commit 6dae4a747d)
This commit is contained in:
@@ -174,9 +174,6 @@ void CreatureAI::EnterEvadeMode(EvadeReason why)
|
||||
}
|
||||
|
||||
Reset();
|
||||
|
||||
if (me->IsVehicle()) // use the same sequence of addtoworld, aireset may remove all summons!
|
||||
me->GetVehicleKit()->Reset(true);
|
||||
}
|
||||
|
||||
bool CreatureAI::UpdateVictim()
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "MovementDefines.h"
|
||||
#include "MoveSpline.h"
|
||||
#include "MoveSplineInit.h"
|
||||
#include "Vehicle.h"
|
||||
|
||||
template<class T>
|
||||
HomeMovementGenerator<T>::HomeMovementGenerator()
|
||||
@@ -144,6 +145,8 @@ void HomeMovementGenerator<Creature>::DoFinalize(Creature* owner, bool active, b
|
||||
owner->SetWalk(true);
|
||||
owner->SetSpawnHealth();
|
||||
owner->LoadCreaturesAddon();
|
||||
if (owner->IsVehicle())
|
||||
owner->GetVehicleKit()->Reset(true);
|
||||
owner->AI()->JustReachedHome();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user