mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
* 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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user