mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
*Some clean up and add debug info to find the reason of crash.
--HG-- branch : trunk
This commit is contained in:
@@ -44,6 +44,8 @@ Vehicle::Vehicle(Unit *unit, VehicleEntry const *vehInfo) : me(unit), m_vehicleI
|
||||
|
||||
Vehicle::~Vehicle()
|
||||
{
|
||||
for(SeatMap::const_iterator itr = m_Seats.begin(); itr != m_Seats.end(); ++itr)
|
||||
assert(!itr->second.passenger);
|
||||
}
|
||||
|
||||
void Vehicle::Install()
|
||||
@@ -198,7 +200,7 @@ void Vehicle::InstallAccessory(uint32 entry, int8 seatId)
|
||||
passenger->ExitVehicle(); // this should not happen
|
||||
}
|
||||
|
||||
Creature *accessory = me->SummonCreature(entry, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, 0);
|
||||
Creature *accessory = me->SummonCreature(entry, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
|
||||
if(!accessory)
|
||||
return;
|
||||
accessory->AddUnitTypeMask(UNIT_MASK_ACCESSORY);
|
||||
|
||||
Reference in New Issue
Block a user