Core/Combat: When entering a vehicle, transfer any current threat to that vehicle.

Port From (https://github.com/TrinityCore/TrinityCore/commit/970cd097de3a12a15094faf615acbac6c55e391c)
This commit is contained in:
hondacrx
2022-04-28 10:27:06 -04:00
parent e271ca1981
commit eb3c5b6f1c
+3
View File
@@ -699,6 +699,9 @@ namespace Game.Entities
init.SetTransportEnter();
Passenger.GetMotionMaster().LaunchMoveSpline(init, EventId.VehicleBoard, MovementGeneratorPriority.Highest);
foreach (var (_, threatRef) in Passenger.GetThreatManager().GetThreatenedByMeList())
threatRef.GetOwner().GetThreatManager().AddThreat(Target.GetBase(), threatRef.GetThreat(), null, true, true);
Creature creature = Target.GetBase().ToCreature();
if (creature != null)
{