mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Vehicles: Fix accessories disappearing on reset
This commit is contained in:
@@ -167,9 +167,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()
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "MovementDefines.h"
|
||||
#include "MoveSpline.h"
|
||||
#include "MoveSplineInit.h"
|
||||
#include "Vehicle.h"
|
||||
|
||||
template<class T>
|
||||
HomeMovementGenerator<T>::HomeMovementGenerator()
|
||||
@@ -145,6 +146,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