Core/Vehicles:

- Allow configurable TempSummonType and timer for vehicle_accessory table instead of hard coded values
- Reimplement some earlier charted VehicleSeatFlagsB, that were temporarily removed because of VEHICLE_SEAT_FLAG_UNCONTROLLED (they now work in conjunction with eachother)
This commit is contained in:
Machiavelli
2011-02-22 23:47:28 +01:00
parent a8f9936bea
commit 918f1ce8ec
5 changed files with 22 additions and 12 deletions
+3 -3
View File
@@ -124,7 +124,7 @@ void Vehicle::InstallAllAccessories(uint32 entry)
return;
for (VehicleAccessoryList::const_iterator itr = mVehicleList->begin(); itr != mVehicleList->end(); ++itr)
InstallAccessory(itr->uiAccessory, itr->uiSeat, itr->bMinion);
InstallAccessory(itr->uiAccessory, itr->uiSeat, itr->bMinion, itr->uiSummonType, itr->uiSummonTime);
}
void Vehicle::Uninstall()
@@ -248,7 +248,7 @@ int8 Vehicle::GetNextEmptySeat(int8 seatId, bool next) const
return seat->first;
}
void Vehicle::InstallAccessory(uint32 entry, int8 seatId, bool minion)
void Vehicle::InstallAccessory(uint32 entry, int8 seatId, bool minion, uint8 type, uint32 summonTime)
{
if (Unit *passenger = GetPassenger(seatId))
{
@@ -263,7 +263,7 @@ void Vehicle::InstallAccessory(uint32 entry, int8 seatId, bool minion)
passenger->ExitVehicle(); // this should not happen
}
if (Creature *accessory = me->SummonCreature(entry, *me, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000))
if (Creature *accessory = me->SummonCreature(entry, *me, type, summonTime))
{
if (minion)
accessory->AddUnitTypeMask(UNIT_MASK_ACCESSORY);