feat(Core/SmartScripts) Implement SMART_TARGET_VEHICLE_PASSENGER (#3510)
This commit is contained in:
parent
4b74545744
commit
0d8aa2e8b1
3 changed files with 18 additions and 2 deletions
|
|
@ -3855,6 +3855,17 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
|
|||
delete units;
|
||||
break;
|
||||
}
|
||||
case SMART_TARGET_VEHICLE_PASSENGER:
|
||||
{
|
||||
if (me && me->IsVehicle())
|
||||
{
|
||||
if (Unit* target = me->GetVehicleKit()->GetPassenger(e.target.vehicle.seat))
|
||||
{
|
||||
l->push_back(target);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SMART_TARGET_NONE:
|
||||
case SMART_TARGET_POSITION:
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue