diff options
author | w12x <none@none> | 2008-10-27 15:28:04 -0500 |
---|---|---|
committer | w12x <none@none> | 2008-10-27 15:28:04 -0500 |
commit | dd977765014498fd97dd89f68738e5fa2306e465 (patch) | |
tree | 430b12a23424896c2cb2a5aaaef8192030f12888 /src/game/ObjectMgr.cpp | |
parent | 1b820f93ebadc6f253a0b1baa958abe3ab482e2d (diff) |
[svn] * Fixed startup error flood if creature model id is 0
* Fixed totems using proper model ids broken after recent change
* Set pet grid activity state to that of caster upon summoning
* Fix a possible crash in ObjectAccessor
note to self: don't commit anything without 3 days testing. ever. after this one ofc.
--HG--
branch : trunk
Diffstat (limited to 'src/game/ObjectMgr.cpp')
-rw-r--r-- | src/game/ObjectMgr.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 0d290c26876..38926c8cef0 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -711,22 +711,22 @@ void ObjectMgr::LoadCreatureTemplates() sLog.outErrorDb("Creature (Entry: %u) has non-existing faction_H template (%u)", cInfo->Entry, cInfo->faction_H); // check model ids, supplying and sending non-existent ids to the client might crash them - if(!sCreatureModelStorage.LookupEntry<CreatureModelInfo>(cInfo->Modelid1)) + if(cInfo->Modelid1 && !sCreatureModelStorage.LookupEntry<CreatureModelInfo>(cInfo->Modelid1)) { sLog.outErrorDb("Creature (Entry: %u) has non-existing modelId_A (%u), setting it to 0", cInfo->Entry, cInfo->Modelid1); const_cast<CreatureInfo*>(cInfo)->Modelid1 = 0; } - if(!sCreatureModelStorage.LookupEntry<CreatureModelInfo>(cInfo->Modelid2)) + if(cInfo->Modelid2 && !sCreatureModelStorage.LookupEntry<CreatureModelInfo>(cInfo->Modelid2)) { sLog.outErrorDb("Creature (Entry: %u) has non-existing modelId_A2 (%u), setting it to 0", cInfo->Entry, cInfo->Modelid2); const_cast<CreatureInfo*>(cInfo)->Modelid2 = 0; } - if(!sCreatureModelStorage.LookupEntry<CreatureModelInfo>(cInfo->Modelid3)) + if(cInfo->Modelid3 && !sCreatureModelStorage.LookupEntry<CreatureModelInfo>(cInfo->Modelid3)) { sLog.outErrorDb("Creature (Entry: %u) has non-existing modelId_H (%u), setting it to 0", cInfo->Entry, cInfo->Modelid3); const_cast<CreatureInfo*>(cInfo)->Modelid3 = 0; } - if(!sCreatureModelStorage.LookupEntry<CreatureModelInfo>(cInfo->Modelid4)) + if(cInfo->Modelid4 && !sCreatureModelStorage.LookupEntry<CreatureModelInfo>(cInfo->Modelid4)) { sLog.outErrorDb("Creature (Entry: %u) has non-existing modelId_H2 (%u), setting it to 0", cInfo->Entry, cInfo->Modelid4); const_cast<CreatureInfo*>(cInfo)->Modelid4 = 0; |