diff options
author | silver1ce <none@none> | 2010-03-03 03:29:03 +0200 |
---|---|---|
committer | silver1ce <none@none> | 2010-03-03 03:29:03 +0200 |
commit | ab51061318a8a1255259ce206c3c5c9abbdcc616 (patch) | |
tree | 6466054554222a889b12b9165b798960fd605586 /src/game/ObjectMgr.cpp | |
parent | f4a4a6bfc2c3b4ef78baebd57a5563f862ccdbb8 (diff) |
add creature expansion check
--HG--
branch : trunk
Diffstat (limited to 'src/game/ObjectMgr.cpp')
-rw-r--r-- | src/game/ObjectMgr.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 6a4236b4932..0709d4f6a5a 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -777,6 +777,12 @@ void ObjectMgr::LoadCreatureTemplates() const_cast<CreatureInfo*>(cInfo)->scale = 1.0f; } + if(cInfo->expansion > (MAX_CREATURE_BASE_HP - 1)) + { + sLog.outErrorDb("Table `creature_template` have creature (Entry: %u) with expansion %u ignore and set to NULL.", cInfo->expansion); + const_cast<CreatureInfo*>(cInfo)->expansion = 0; + } + const_cast<CreatureInfo*>(cInfo)->dmg_multiplier *= Creature::_GetDamageMod(cInfo->rank); } } |