From ab51061318a8a1255259ce206c3c5c9abbdcc616 Mon Sep 17 00:00:00 2001 From: silver1ce Date: Wed, 3 Mar 2010 03:29:03 +0200 Subject: [PATCH] add creature expansion check --HG-- branch : trunk --- src/game/ObjectMgr.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 6a4236b493..0709d4f6a5 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -777,6 +777,12 @@ void ObjectMgr::LoadCreatureTemplates() const_cast(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(cInfo)->expansion = 0; + } + const_cast(cInfo)->dmg_multiplier *= Creature::_GetDamageMod(cInfo->rank); } }