aboutsummaryrefslogtreecommitdiff
path: root/src/game/ObjectMgr.cpp
diff options
context:
space:
mode:
authorBrian <runningnak3d@gmail.com>2010-02-17 00:51:19 -0700
committerBrian <runningnak3d@gmail.com>2010-02-17 00:51:19 -0700
commitbea79b07112208d5fac892db358b416587668b1a (patch)
tree626e5d3726bbc12141b669cb62a2486ad5270015 /src/game/ObjectMgr.cpp
parent777a4361a0b51e3d098a23216f18d0d8e427bf75 (diff)
* 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
Diffstat (limited to 'src/game/ObjectMgr.cpp')
-rw-r--r--src/game/ObjectMgr.cpp7
1 files changed, 7 insertions, 0 deletions
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<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);