diff options
author | megamage <none@none> | 2009-04-21 13:49:39 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-04-21 13:49:39 -0500 |
commit | 787cd7fcb51df492769bd3594efb26891a4dbcd5 (patch) | |
tree | e6b3aed195ca75b9c9c1730bf6d4654c26aeb46a /src/game/Vehicle.cpp | |
parent | b154137401d49b66d585463226e62b31b3be9d80 (diff) |
*More work on vehicle.
--HG--
branch : trunk
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) |