add creature expansion check

--HG--
branch : trunk
This commit is contained in:
silver1ce
2010-03-03 03:29:03 +02:00
parent f4a4a6bfc2
commit ab51061318
+6
View File
@@ -777,6 +777,12 @@ void ObjectMgr::LoadCreatureTemplates()
const_cast<CreatureInfo*>(cInfo)->scale = 1.0f; 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); const_cast<CreatureInfo*>(cInfo)->dmg_multiplier *= Creature::_GetDamageMod(cInfo->rank);
} }
} }