Core/Quest: Threat From Above

Port From (https://github.com/TrinityCore/TrinityCore/commit/8202dc28c2dae613c14a52ef4e84932d8c1c9e39)
This commit is contained in:
hondacrx
2022-05-26 16:48:38 -04:00
parent 30aaad290f
commit 0368d5c9c3
3 changed files with 38 additions and 1 deletions
@@ -1126,6 +1126,15 @@ namespace Game.Entities
return $"{base.GetDebugInfo()}\nAIName: {GetAIName()} ScriptName: {GetScriptName()} WaypointPath: {GetWaypointPath()} SpawnId: {GetSpawnId()}";
}
public override void ExitVehicle(Position exitPosition = null)
{
base.ExitVehicle();
// if the creature exits a vehicle, set it's home position to the
// exited position so it won't run away (home) and evade if it's hostile
SetHomePosition(GetPosition());
}
public override bool IsMovementPreventedByCasting()
{
// first check if currently a movement allowed channel is active and we're not casting
+1 -1
View File
@@ -999,7 +999,7 @@ namespace Game.Entities
rideVehicleEffect.ChangeAmount((seatId < 0 ? GetTransSeat() : seatId) + 1);
}
public void ExitVehicle(Position exitPosition = null)
public virtual void ExitVehicle(Position exitPosition = null)
{
//! This function can be called at upper level code to initialize an exit from the passenger's side.
if (m_vehicle == null)