* Set creature_template.unit_class to 1 (UNIT_CLASS_WARRIOR) if the value is wrong to prevent issues in CreatureBaseStats::Generate*() functions.

--HG--
branch : trunk
This commit is contained in:
XTZGZoReX
2010-01-14 19:20:11 +01:00
parent 9e432b8c4a
commit 1fcafbc938

View File

@@ -692,7 +692,10 @@ void ObjectMgr::LoadCreatureTemplates()
}
if (!cInfo->unit_class || ((1 << (cInfo->unit_class-1)) & CLASSMASK_ALL_CREATURES) == 0)
sLog.outErrorDb("Creature (Entry: %u) has invalid unit_class(%u) for creature_template", cInfo->Entry, cInfo->unit_class);
{
sLog.outErrorDb("Creature (Entry: %u) has invalid unit_class(%u) for creature_template. Set to 1 (UNIT_CLASS_WARRIOR).", cInfo->Entry, cInfo->unit_class);
const_cast<CreatureInfo*>(cInfo)->unit_class = UNIT_CLASS_WARRIOR;
}
if(cInfo->dmgschool >= MAX_SPELL_SCHOOL)
{