diff options
author | megamage <none@none> | 2009-06-13 09:45:44 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-06-13 09:45:44 -0500 |
commit | d38da3dd05d79d59e2de614111da99feff93a29a (patch) | |
tree | d42c1434965f04503dc56c582b8cc5f831752aab /src | |
parent | e3a4622019ea6666aac6c73aa82f3d1b13155601 (diff) |
[8001] Fixed display id checks for creature case. Author: VladimirMangos
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/ObjectMgr.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 076f5900716..f090a95af8e 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -621,7 +621,8 @@ void ObjectMgr::LoadCreatureTemplates() if(cInfo->DisplayID_A2) { - if(CreatureDisplayInfoEntry const* displayEntry = sCreatureDisplayInfoStore.LookupEntry(cInfo->DisplayID_A2)) + CreatureDisplayInfoEntry const* displayEntry = sCreatureDisplayInfoStore.LookupEntry(cInfo->DisplayID_A2); + if(!displayEntry) { sLog.outErrorDb("Creature (Entry: %u) has non-existing DisplayID_A2 id (%u), can crash client", cInfo->Entry, cInfo->DisplayID_A2); const_cast<CreatureInfo*>(cInfo)->DisplayID_A2 = 0; @@ -635,7 +636,8 @@ void ObjectMgr::LoadCreatureTemplates() if(cInfo->DisplayID_H2) { - if(CreatureDisplayInfoEntry const* displayEntry = sCreatureDisplayInfoStore.LookupEntry(cInfo->DisplayID_H2)) + CreatureDisplayInfoEntry const* displayEntry = sCreatureDisplayInfoStore.LookupEntry(cInfo->DisplayID_H2); + if(!displayEntry) { sLog.outErrorDb("Creature (Entry: %u) has non-existing DisplayID_H2 id (%u), can crash client", cInfo->Entry, cInfo->DisplayID_H2); const_cast<CreatureInfo*>(cInfo)->DisplayID_H2 = 0; |