[9176] Add commented check for unit_class == 0.

In fact creature unit class must not be 0, but some creatures (like triggers) have this.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
XTZGZoReX 2010-01-14 20:57:46 +03:00 committed by VladimirMangos
parent 9901282592
commit ee26f74796
3 changed files with 13 additions and 3 deletions

View file

@ -677,7 +677,8 @@ void ObjectMgr::LoadCreatureTemplates()
}
}
if (cInfo->unit_class && ((1 << (cInfo->unit_class-1)) & CLASSMASK_ALL_CREATURES) == 0)
// use below code for 0-checks for unit_class
if (/*!cInfo->unit_class ||*/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);
if(cInfo->dmgschool >= MAX_SPELL_SCHOOL)