diff options
| author | megamage <none@none> | 2009-05-29 21:24:23 -0500 |
|---|---|---|
| committer | megamage <none@none> | 2009-05-29 21:24:23 -0500 |
| commit | cc022341ac728a51991a5c1a2572c734403643c6 (patch) | |
| tree | e7694007c45971c52a764361ec617c8d03057350 /src/game/ObjectMgr.cpp | |
| parent | ff4241e5eb34877be668e27473867e45f85df126 (diff) | |
[7908] Extract class data from creature_*_addon bytes0 fields, drop its, amd add unit_class field to creature_template. Author: NoFantasy
--HG--
branch : trunk
Diffstat (limited to 'src/game/ObjectMgr.cpp')
| -rw-r--r-- | src/game/ObjectMgr.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 0e684ee4213..440ee986f43 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -553,6 +553,12 @@ void ObjectMgr::LoadCreatureTemplates() continue; } + if(cInfo->unit_class != heroicInfo->unit_class) + { + sLog.outErrorDb("Creature (Entry: %u, class %u) has different `unit_class` in heroic mode (Entry: %u, class %u).",i, cInfo->unit_class, cInfo->HeroicEntry, heroicInfo->unit_class); + continue; + } + if(cInfo->npcflag != heroicInfo->npcflag) { sLog.outErrorDb("Creature (Entry: %u) listed in `creature_template_substitution` has different `npcflag` in heroic mode.",i); @@ -629,6 +635,9 @@ void ObjectMgr::LoadCreatureTemplates() const_cast<CreatureInfo*>(cInfo)->Modelid_H2 = 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) { sLog.outErrorDb("Creature (Entry: %u) has invalid spell school value (%u) in `dmgschool`",cInfo->Entry,cInfo->dmgschool); |
