mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[8001] Fixed display id checks for creature case.
This commit is contained in:
parent
a8a4836e1a
commit
cf7482e0c8
2 changed files with 5 additions and 3 deletions
|
|
@ -558,7 +558,8 @@ void ObjectMgr::LoadCreatureTemplates()
|
||||||
|
|
||||||
if(cInfo->DisplayID_A2)
|
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);
|
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;
|
const_cast<CreatureInfo*>(cInfo)->DisplayID_A2 = 0;
|
||||||
|
|
@ -572,7 +573,8 @@ void ObjectMgr::LoadCreatureTemplates()
|
||||||
|
|
||||||
if(cInfo->DisplayID_H2)
|
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);
|
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;
|
const_cast<CreatureInfo*>(cInfo)->DisplayID_H2 = 0;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8000"
|
#define REVISION_NR "8001"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue