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
+6 -3
View File
@@ -2736,7 +2736,7 @@ void ObjectMgr::LoadVehicleAccessories()
uint32 count = 0;
QueryResult result = WorldDatabase.Query("SELECT `entry`,`accessory_entry`,`seat_id`,`minion` FROM `vehicle_accessory`");
QueryResult result = WorldDatabase.Query("SELECT `entry`,`accessory_entry`,`seat_id`,`minion`,`summontype`,`summontimer` FROM `vehicle_accessory`");
if (!result)
{
@@ -2754,6 +2754,8 @@ void ObjectMgr::LoadVehicleAccessories()
uint32 uiAccessory = fields[1].GetUInt32();
int8 uiSeat = int8(fields[2].GetInt16());
bool bMinion = fields[3].GetBool();
uint8 uiSummonType = fields[4].GetUInt8();
uint32 uiSummonTimer = fields[5].GetUInt32();
if (!sCreatureStorage.LookupEntry<CreatureInfo>(uiEntry))
{
@@ -2767,10 +2769,11 @@ void ObjectMgr::LoadVehicleAccessories()
continue;
}
m_VehicleAccessoryMap[uiEntry].push_back(VehicleAccessory(uiAccessory, uiSeat, bMinion));
m_VehicleAccessoryMap[uiEntry].push_back(VehicleAccessory(uiAccessory, uiSeat, bMinion, uiSummonType, uiSummonTimer));
++count;
} while (result->NextRow());
}
while (result->NextRow());
sLog->outString(">> Loaded %u Vehicle Accessories in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
sLog->outString();