mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 02:46:33 +01:00
* Add error checking for vehicle IDs that are in creature_template but don't
* exist in Vehicle.dbc. This *WILL* cause the client to freeze / hang. * Look on TDB in the "Core related DB content" forum for a query to clean * these up. * Thanks to MaXiMiUS for the slap in the face :) --HG-- branch : trunk
This commit is contained in:
@@ -730,6 +730,13 @@ void ObjectMgr::LoadCreatureTemplates()
|
||||
const_cast<CreatureInfo*>(cInfo)->InhabitType = INHABIT_ANYWHERE;
|
||||
}
|
||||
|
||||
if (cInfo->VehicleId)
|
||||
{
|
||||
VehicleEntry const* vehId = sVehicleStore.LookupEntry(cInfo->Entry);
|
||||
if (!vehId)
|
||||
sLog.outErrorDb("Creature (Entry: %u) has a non-existing VehicleId (%u). This *WILL* cause the client to freeze!", cInfo->Entry, cInfo->VehicleId);
|
||||
}
|
||||
|
||||
if(cInfo->PetSpellDataId)
|
||||
{
|
||||
CreatureSpellDataEntry const* spellDataId = sCreatureSpellDataStore.LookupEntry(cInfo->PetSpellDataId);
|
||||
|
||||
Reference in New Issue
Block a user