Core/Units: Allow mind controlling non-controllable vehicles (for example players that become vehicle during boss encounters or creatures that only are vehicles to show non standard power type)

Port From (https://github.com/TrinityCore/TrinityCore/commit/d56d92fbe7436af00e00b00ca5e7640f852d3485)
This commit is contained in:
hondacrx
2022-02-22 13:43:52 -05:00
parent d5281ebe14
commit c9fa7d22fc
3 changed files with 11 additions and 2 deletions
+9
View File
@@ -434,6 +434,15 @@ namespace Game.Entities
return false;
}
public bool IsControllableVehicle()
{
foreach (var itr in Seats)
if (itr.Value.SeatInfo.HasFlag(VehicleSeatFlags.CanControl))
return true;
return false;
}
void InitMovementInfoForBase()
{
VehicleFlags vehicleFlags = (VehicleFlags)GetVehicleInfo().Flags;