mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
[8001] Fixed display id checks for creature case. Author: VladimirMangos
--HG-- branch : trunk
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user