aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorenjoi <none@none>2010-08-18 15:49:51 +0100
committerenjoi <none@none>2010-08-18 15:49:51 +0100
commitb8a613647f8d204186fa30f35a8b4e2cb9337a73 (patch)
treee571280a13e45fc3d1ff025795620e35dde69199 /src
parent71a5320edace0a2de85c32fc479ca7a44bbbd264 (diff)
Core/ObjectMgr: Prevent vehicleid from having an incorrect value when reloaded with .reload creature_template.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index d83f7447f4c..7a54f49e2b9 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -744,7 +744,10 @@ void ObjectMgr::CheckCreatureTemplate(CreatureInfo const* cInfo)
{
VehicleEntry const* vehId = sVehicleStore.LookupEntry(cInfo->VehicleId);
if (!vehId)
+ {
sLog.outErrorDb("Creature (Entry: %u) has a non-existing VehicleId (%u). This *WILL* cause the client to freeze!", cInfo->Entry, cInfo->VehicleId);
+ const_cast<CreatureInfo*>(cInfo)->VehicleId = 0;
+ }
}
if (cInfo->PetSpellDataId)