diff options
Diffstat (limited to 'src/game/Vehicle.cpp')
-rw-r--r-- | src/game/Vehicle.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/game/Vehicle.cpp b/src/game/Vehicle.cpp index 48edcdd9340..2be74bd628b 100644 --- a/src/game/Vehicle.cpp +++ b/src/game/Vehicle.cpp @@ -157,6 +157,17 @@ Vehicle* Vehicle::HasEmptySeat(int8 seatNum) const return NULL; } +void Vehicle::InstallAccessory(uint32 entry, int8 seatNum) +{ + Creature *accessory = SummonCreature(entry, GetPositionX(), GetPositionY(), GetPositionZ()); + if(!accessory) + return; + + accessory->m_Vehicle = this; + accessory->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT); + AddPassenger(accessory, seatNum); +} + bool Vehicle::AddPassenger(Unit *unit, int8 seatNum) { if(unit->m_Vehicle != this) |