Scripts/IcecrownCitadel: Prevent players from becoming inaccessible when killed by Lord Marrowgar's Impale spell (the initial damage, not the DoT). Also fix the underlying bug in vehicle logic.

Port From (https://github.com/TrinityCore/TrinityCore/commit/e69b5d8fcc44728abd189e4832a383543218e5c1)
This commit is contained in:
hondacrx
2020-08-22 15:35:55 -04:00
parent 7060f728a3
commit 51e914e0f3
3 changed files with 964 additions and 943 deletions
+7
View File
@@ -559,6 +559,13 @@ namespace Game.Entities
Target.RemovePendingEventsForSeat(Seat.Key);
Target.RemovePendingEventsForPassenger(Passenger);
// Passenger might've died in the meantime - abort if this is the case
if (!Passenger.IsAlive())
{
Abort(0);
return true;
}
Passenger.SetVehicle(Target);
Seat.Value.Passenger.Guid = Passenger.GetGUID();
Seat.Value.Passenger.IsUnselectable = Passenger.HasUnitFlag(UnitFlags.NotSelectable);