[8001] Fixed display id checks for creature case. Author: VladimirMangos

--HG--
branch : trunk
This commit is contained in:
megamage
2009-06-13 09:45:44 -05:00
parent e3a4622019
commit d38da3dd05

View File

@@ -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;