From 91ee03d9bf14e17e048c6b162307524845e9ab64 Mon Sep 17 00:00:00 2001 From: XTZGZoReX Date: Thu, 14 Jan 2010 18:08:42 +0100 Subject: * creature_template.unit_class cannot be 0 - added check for this. --HG-- branch : trunk --- src/game/ObjectMgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/game/ObjectMgr.cpp') diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index b762e2bd85f..36be907cbaa 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -691,7 +691,7 @@ void ObjectMgr::LoadCreatureTemplates() } } - if (cInfo->unit_class && ((1 << (cInfo->unit_class-1)) & CLASSMASK_ALL_CREATURES) == 0) + 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); if(cInfo->dmgschool >= MAX_SPELL_SCHOOL) -- cgit v1.2.3