From bea79b07112208d5fac892db358b416587668b1a Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 17 Feb 2010 00:51:19 -0700 Subject: * 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 --- src/game/ObjectMgr.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 13f991cd5a3..3de2bf13232 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -730,6 +730,13 @@ void ObjectMgr::LoadCreatureTemplates() const_cast(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); -- cgit v1.2.3