From 4fb48f1522c666e9ba3720ea863e67601a1b9320 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Tue, 7 Dec 2021 14:19:43 -0500 Subject: [PATCH] Core/Vehicles: Fix accessories disappearing on reset Port From (https://github.com/TrinityCore/TrinityCore/commit/a855e6221d517297cfb9e2e78b57a6a57fccc85a) --- Source/Game/AI/CoreAI/CreatureAI.cs | 3 --- Source/Game/Movement/Generators/HomeMovement.cs | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/Game/AI/CoreAI/CreatureAI.cs b/Source/Game/AI/CoreAI/CreatureAI.cs index 60c17d351..b8946fbcd 100644 --- a/Source/Game/AI/CoreAI/CreatureAI.cs +++ b/Source/Game/AI/CoreAI/CreatureAI.cs @@ -175,9 +175,6 @@ namespace Game.AI } Reset(); - - if (me.IsVehicle()) // use the same sequence of addtoworld, aireset may remove all summons! - me.GetVehicleKit().Reset(true); } public bool UpdateVictim() diff --git a/Source/Game/Movement/Generators/HomeMovement.cs b/Source/Game/Movement/Generators/HomeMovement.cs index fcddf18ca..39725b443 100644 --- a/Source/Game/Movement/Generators/HomeMovement.cs +++ b/Source/Game/Movement/Generators/HomeMovement.cs @@ -75,6 +75,8 @@ namespace Game.AI owner.SetWalk(true); owner.SetSpawnHealth(); owner.LoadCreaturesAddon(); + if (owner.IsVehicle()) + owner.GetVehicleKit().Reset(true); owner.GetAI().JustReachedHome(); } }