diff options
author | Vincent_Michael <Vincent_Michael@gmx.de> | 2013-10-19 04:23:45 +0200 |
---|---|---|
committer | Vincent_Michael <Vincent_Michael@gmx.de> | 2013-10-19 04:23:45 +0200 |
commit | d0948f572b7bdf38830e15b14640b15df70e6288 (patch) | |
tree | 66557058816e8da2d334c45d8d403cfd0b6771c9 /src/server/game/Globals/ObjectMgr.cpp | |
parent | 4ce12dc481323c11b4830d06f8080412d855cc64 (diff) | |
parent | 5915a220a51ccc118273fb5eccbe73e022530ab7 (diff) |
Merge branch 'master' of github.com:TrinityCore/TrinityCore into mmaps_rw
Diffstat (limited to 'src/server/game/Globals/ObjectMgr.cpp')
-rw-r--r-- | src/server/game/Globals/ObjectMgr.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 2f309c07cce..86e6963b1de 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -804,6 +804,18 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo) if ((cInfo->npcflag & UNIT_NPC_FLAG_TRAINER) && cInfo->trainer_type >= MAX_TRAINER_TYPE) TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has wrong trainer type %u.", cInfo->Entry, cInfo->trainer_type); + if (cInfo->speed_walk == 0.0f) + { + TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has wrong value (%f) in speed_walk, set to 1.", cInfo->Entry, cInfo->speed_walk); + const_cast<CreatureTemplate*>(cInfo)->speed_walk = 1.0f; + } + + if (cInfo->speed_run == 0.0f) + { + TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has wrong value (%f) in speed_run, set to 1.14286.", cInfo->Entry, cInfo->speed_run); + const_cast<CreatureTemplate*>(cInfo)->speed_run = 1.14286f; + } + if (cInfo->type && !sCreatureTypeStore.LookupEntry(cInfo->type)) { TC_LOG_ERROR(LOG_FILTER_SQL, "Creature (Entry: %u) has invalid creature type (%u) in `type`.", cInfo->Entry, cInfo->type); |